| Current Path : /var/www/homesaver/www/bitrix/js/landing/ui/field/userselect/dist/ |
| Current File : /var/www/homesaver/www/bitrix/js/landing/ui/field/userselect/dist/userselect.bundle.js.map |
{"version":3,"file":"userselect.bundle.js","sources":["../src/userselect.js"],"sourcesContent":["import {BaseField} from 'landing.ui.field.basefield';\nimport {Dom} from 'main.core';\nimport {TagSelector} from 'ui.entity-selector';\n\nexport class UserSelect extends BaseField\n{\n\tconstructor(options)\n\t{\n\t\tsuper(options);\n\t\tthis.setEventNamespace('BX.Landing.UI.Field.UserSelectField');\n\n\t\tthis.userId = parseInt(options.userId ?? 0);\n\n\t\tDom.addClass(this.layout, 'landing-ui-field-userselect');\n\t\tthis.createDialog();\n\t}\n\n\tcreateDialog()\n\t{\n\t\tthis.dialog = new TagSelector({\n\t\t\tmultiple: false,\n\t\t\tdialogOptions: {\n\t\t\t\tpreselectedItems: [\n\t\t\t\t\t['user', this.userId],\n\t\t\t\t],\n\t\t\t\tenableSearch: true,\n\t\t\t\tmultiple: false,\n\t\t\t\tautoHide: true,\n\t\t\t\thideByEsc: true,\n\t\t\t\tcontext: 'LANDING_USER_SELECT',\n\t\t\t\tentities: [{\n\t\t\t\t\tid: 'user',\n\t\t\t\t}],\n\t\t\t\tpopupOptions: {\n\t\t\t\t\ttargetContainer: parent.document.body,\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\tthis.dialog.renderTo(this.input);\n\t}\n\n\treset()\n\t{\n\t\tthis.setValue(0);\n\t}\n\n\tgetValue()\n\t{\n\t\tthis.dialog.getTags().forEach(tag => {\n\t\t\tthis.userId = tag.getId();\n\t\t});\n\n\t\treturn this.userId;\n\t}\n\n\tsetValue(userId: number)\n\t{\n\t\tthis.userId = Math.max(0, userId);\n\t}\n}"],"names":["UserSelect","options","setEventNamespace","userId","parseInt","Dom","addClass","layout","createDialog","dialog","TagSelector","multiple","dialogOptions","preselectedItems","enableSearch","autoHide","hideByEsc","context","entities","id","popupOptions","targetContainer","parent","document","body","renderTo","input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