%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 52.15.173.64
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/panel/fieldspanel/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/panel/fieldspanel/dist/fieldspanel.bundle.js.map
{"version":3,"file":"fieldspanel.bundle.js","sources":["../src/fieldspanel.js"],"sourcesContent":["import {Cache, Dom, Tag, Type} from 'main.core';\nimport {Content} from 'landing.ui.panel.content';\nimport {Loader} from 'main.loader';\nimport {Backend} from 'landing.backend';\nimport {PageObject} from 'landing.pageobject';\nimport {SidebarButton} from 'landing.ui.button.sidebarbutton';\nimport {Loc} from 'landing.loc';\nimport {FormSettingsForm} from 'landing.ui.form.formsettingsform';\nimport {BaseButton} from 'landing.ui.button.basebutton';\nimport {Text} from 'landing.ui.field.textfield';\nimport {FormSettingsPanel} from 'landing.ui.panel.formsettingspanel';\nimport {FormClient} from 'crm.form.client';\nimport 'ui.userfieldfactory';\n\nimport './css/style.css';\n\ntype CrmField = {\n\ttype: 'list' | 'string' | 'checkbox' | 'date' | 'text' | 'typed_string' | 'file',\n\tentity_field_name: string,\n\tentity_name: string,\n\tname: string,\n\tcaption: string,\n\tmultiple: boolean,\n\trequired: boolean,\n\thidden: boolean,\n\titems: Array<{ID: any, VALUE: any}>,\n};\n\ntype CrmFieldsList = {\n\t[categoryId: string]: {\n\t\tCAPTION: string,\n\t\tFIELDS: Array<CrmField>\n\t},\n};\n\n/**\n * @memberOf BX.Landing.UI.Panel\n */\nexport class FieldsPanel extends Content\n{\n\tstatic getInstance(options): FieldsPanel\n\t{\n\t\tconst rootWindow = PageObject.getRootWindow();\n\t\tconst rootWindowPanel = rootWindow.BX.Landing.UI.Panel.FieldsPanel;\n\t\tif (!rootWindowPanel.instance && !FieldsPanel.instance)\n\t\t{\n\t\t\trootWindowPanel.instance = new FieldsPanel(options);\n\t\t}\n\n\t\tconst instance = (rootWindowPanel.instance || FieldsPanel.instance);\n\t\tinstance.options = options;\n\n\t\treturn instance;\n\t}\n\n\tadjustActionsPanels = false;\n\n\tconstructor(options = {})\n\t{\n\t\tsuper();\n\t\tthis.setEventNamespace('BX.Landing.UI.Panel.FieldsPanel');\n\t\tthis.setLayoutClass('landing-ui-panel-fields');\n\t\tthis.setOverlayClass('landing-ui-panel-fields-overlay');\n\t\tthis.setTitle(Loc.getMessage('LANDING_FIELDS_PANEL_TITLE'));\n\n\t\tthis.onSaveClick = this.onSaveClick.bind(this);\n\t\tthis.onCancelClick = this.onCancelClick.bind(this);\n\n\t\tthis.options = options;\n\t\tthis.cache = new Cache.MemoryCache();\n\n\t\tDom.append(this.layout, this.getViewContainer());\n\t\tDom.append(this.overlay, this.getViewContainer());\n\t\tDom.insertAfter(this.getSearchContainer(), this.header);\n\t\tDom.append(this.getCreateFieldLayout(), this.body);\n\n\t\tthis.showLoader();\n\t\tthis.loadPromise = this.load()\n\t\t\t.then(() => {\n\t\t\t\tthis.hideLoader();\n\n\t\t\t\tObject.entries(this.getCrmFields())\n\t\t\t\t\t.forEach(([categoryId, category]) => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcategoryId !== 'CATALOG'\n\t\t\t\t\t\t\t&& categoryId !== 'ACTIVITY'\n\t\t\t\t\t\t\t&& categoryId !== 'INVOICE'\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tType.isPlainObject(options)\n\t\t\t\t\t\t\t\t&& Type.isBoolean(options.isLeadEnabled)\n\t\t\t\t\t\t\t\t&& !options.isLeadEnabled\n\t\t\t\t\t\t\t\t&& categoryId === 'LEAD'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst button = new SidebarButton({\n\t\t\t\t\t\t\t\tid: categoryId,\n\t\t\t\t\t\t\t\ttext: category.CAPTION,\n\t\t\t\t\t\t\t\tchild: true,\n\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\tthis.onSidebarButtonClick(button);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tthis.appendSidebarButton(button);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t});\n\n\t\tthis.appendFooterButton(\n\t\t\tnew BaseButton('save_settings', {\n\t\t\t\ttext: Loc.getMessage('LANDING_FIELDS_PANEL_ADD_SELECTED_BUTTON'),\n\t\t\t\tonClick: this.onSaveClick,\n\t\t\t\tclassName: 'landing-ui-button-content-save',\n\t\t\t\tattrs: {title: Loc.getMessage('LANDING_TITLE_OF_SLIDER_SAVE')},\n\t\t\t}),\n\t\t);\n\n\t\tthis.appendFooterButton(\n\t\t\tnew BaseButton('cancel_settings', {\n\t\t\t\ttext: Loc.getMessage('BLOCK_CANCEL'),\n\t\t\t\tonClick: this.onCancelClick,\n\t\t\t\tclassName: 'landing-ui-button-content-cancel',\n\t\t\t\tattrs: {title: Loc.getMessage('LANDING_TITLE_OF_SLIDER_CANCEL')},\n\t\t\t}),\n\t\t);\n\t}\n\n\tisMultiple(): boolean\n\t{\n\t\treturn this.cache.get('multiple', true);\n\t}\n\n\tsetMultiple(mode: boolean)\n\t{\n\t\tthis.cache.set('multiple', mode);\n\t}\n\n\tsetAllowedTypes(types: Array<string>)\n\t{\n\t\tthis.cache.set('allowedTypes', types);\n\t}\n\n\tgetAllowedTypes(): Array<string>\n\t{\n\t\treturn this.cache.get('allowedTypes', []);\n\t}\n\n\tsetDisabledFields(fields: Array<string>)\n\t{\n\t\tthis.cache.set('disabledFields', fields);\n\t}\n\n\tgetDisabledFields(): Array<string>\n\t{\n\t\treturn this.cache.get('disabledFields', []);\n\t}\n\n\tsetAllowedCategories(categories: Array<string>)\n\t{\n\t\tthis.cache.set('allowedCategories', categories);\n\t}\n\n\tgetAllowedCategories(): Array<string>\n\t{\n\t\treturn this.cache.get('allowedCategories', []);\n\t}\n\n\tresetFactoriesCache()\n\t{\n\t\tthis.cache.keys().forEach((key) => {\n\t\t\tif (key.startsWith('userFieldFactory_'))\n\t\t\t{\n\t\t\t\tthis.cache.delete(key);\n\t\t\t}\n\t\t});\n\t}\n\n\tshow(options = {}): Promise<any>\n\t{\n\t\tthis.getSearchField().input.textContent = '';\n\n\t\tthis.setMultiple(true);\n\t\tthis.setAllowedTypes([]);\n\t\tthis.setDisabledFields([]);\n\t\tthis.setAllowedCategories([]);\n\t\tthis.resetFactoriesCache();\n\n\t\tif (Type.isArrayFilled(options.disabledFields))\n\t\t{\n\t\t\tthis.setDisabledFields(options.disabledFields);\n\t\t}\n\n\t\tif (Type.isArrayFilled(options.allowedCategories))\n\t\t{\n\t\t\tthis.setAllowedCategories(options.allowedCategories);\n\t\t}\n\n\t\tif (Type.isArrayFilled(options.allowedTypes))\n\t\t{\n\t\t\tthis.setAllowedTypes(options.allowedTypes);\n\t\t}\n\n\t\tif (Type.isBoolean(options.multiple))\n\t\t{\n\t\t\tthis.setMultiple(options.multiple);\n\t\t}\n\n\t\tthis.loadPromise\n\t\t\t.then(() => {\n\t\t\t\tthis.sidebarButtons.forEach((button) => {\n\t\t\t\t\tDom.show(button.layout);\n\t\t\t\t});\n\n\t\t\t\tif (options.isLeadEnabled === false)\n\t\t\t\t{\n\t\t\t\t\tconst leadButton = this.sidebarButtons.get('LEAD');\n\t\t\t\t\tif (leadButton)\n\t\t\t\t\t{\n\t\t\t\t\t\tDom.hide(leadButton.layout);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (Type.isArrayFilled(options.allowedCategories))\n\t\t\t\t{\n\t\t\t\t\tthis.sidebarButtons.forEach((button) => {\n\t\t\t\t\t\tif (!options.allowedCategories.includes(button.id))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDom.hide(button.layout);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDom.show(button.layout);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.sidebarButtons.forEach((button) => {\n\t\t\t\t\t\tDom.show(button.layout);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tconst filteredFieldsTree = this.getFilteredFieldsTree();\n\t\t\t\tconst categories = Object.keys(filteredFieldsTree);\n\n\t\t\t\tthis.sidebarButtons.forEach((button) => {\n\t\t\t\t\tbutton.deactivate();\n\n\t\t\t\t\tif (categories.includes(button.id))\n\t\t\t\t\t{\n\t\t\t\t\t\tDom.show(button.getLayout());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tDom.hide(button.getLayout());\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (this.sidebarButtons.length > 0)\n\t\t\t\t{\n\t\t\t\t\tthis.resetState();\n\n\t\t\t\t\tconst firstShowedButton = this.sidebarButtons.find((button) => {\n\t\t\t\t\t\treturn button.getLayout().hidden !== true;\n\t\t\t\t\t});\n\t\t\t\t\tif (firstShowedButton)\n\t\t\t\t\t{\n\t\t\t\t\t\tfirstShowedButton.getLayout().click();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\tsuper.show(options).then(() => {\n\t\t\tthis.getSearchField().enableEdit();\n\t\t\tthis.getSearchField().input.focus();\n\t\t});\n\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.promiseResolver = resolve;\n\t\t});\n\t}\n\n\thide()\n\t{\n\t\tthis.setCrmFields(this.getOriginalCrmFields());\n\t\treturn super.hide();\n\t}\n\n\tonSaveClick()\n\t{\n\t\tconst selectedFields = Object.values(this.getState())\n\t\t\t.reduce((acc, fields) => {\n\t\t\t\treturn [...acc, ...fields];\n\t\t\t}, []);\n\n\t\tthis.promiseResolver(selectedFields);\n\t\tvoid this.hide();\n\t\tthis.resetState();\n\t}\n\n\tonCancelClick()\n\t{\n\t\tvoid this.hide();\n\t\tthis.resetState();\n\t}\n\n\tgetViewContainer(): HTMLDivElement\n\t{\n\t\treturn this.cache.remember('viewContainer', () => {\n\t\t\tconst rootWindow = PageObject.getRootWindow();\n\t\t\treturn rootWindow.document.querySelector('.landing-ui-view-container');\n\t\t});\n\t}\n\n\tgetLoader(): Loader\n\t{\n\t\treturn this.cache.remember('loader', () => {\n\t\t\treturn new Loader({\n\t\t\t\ttarget: this.body,\n\t\t\t});\n\t\t});\n\t}\n\n\tshowLoader()\n\t{\n\t\tthis.hideCreateFieldButton();\n\t\tvoid this.getLoader().show();\n\t}\n\n\thideLoader()\n\t{\n\t\tthis.showCreateFieldButton();\n\t\tvoid this.getLoader().hide();\n\t}\n\n\tload(): Promise<any>\n\t{\n\t\treturn Backend.getInstance()\n\t\t\t.action('Form::getCrmFields')\n\t\t\t.then((result) => {\n\t\t\t\tthis.setOriginalCrmFields(result);\n\t\t\t\tthis.setCrmFields(result);\n\t\t\t\tObject.assign(FormSettingsPanel.getInstance().getCrmFields(), result);\n\n\t\t\t\treturn FormClient\n\t\t\t\t\t.getInstance()\n\t\t\t\t\t.getDictionary()\n\t\t\t\t\t.then((dictionary) => {\n\t\t\t\t\t\tthis.setFormDictionary(dictionary);\n\t\t\t\t\t});\n\t\t\t});\n\t}\n\n\tsetFormDictionary(dictionary)\n\t{\n\t\tthis.cache.set('formDictionary', dictionary);\n\t}\n\n\tgetFormDictionary(): {[key: string]: any}\n\t{\n\t\treturn this.cache.get('formDictionary', {});\n\t}\n\n\tsetOriginalCrmFields(fields)\n\t{\n\t\tthis.cache.set('originalFields', fields);\n\t}\n\n\tgetOriginalCrmFields(): CrmFieldsList\n\t{\n\t\treturn this.cache.get('originalFields') || {};\n\t}\n\n\tsetCrmFields(fields)\n\t{\n\t\tthis.cache.set('fields', fields);\n\t}\n\n\tgetCrmFields(): CrmFieldsList\n\t{\n\t\treturn this.cache.get('fields') || {};\n\t}\n\n\tsetState(state: {[categoryId: string]: Array<string>})\n\t{\n\t\tthis.cache.set('state', state);\n\t}\n\n\tgetState(): {[categoryId: string]: Array<string>}\n\t{\n\t\treturn this.cache.get('state') || {};\n\t}\n\n\tresetState()\n\t{\n\t\tthis.cache.delete('state');\n\t}\n\n\tonSidebarButtonClick(button: SidebarButton)\n\t{\n\t\tconst activeButton = this.sidebarButtons.getActive();\n\t\tif (activeButton)\n\t\t{\n\t\t\tactiveButton.deactivate();\n\t\t}\n\n\t\tbutton.activate();\n\n\t\tconst hideCreateButton = this.getAllowedTypes().every((type) => {\n\t\t\treturn Type.isPlainObject(type);\n\t\t});\n\t\tif (Type.isArrayFilled(this.getAllowedTypes()) && hideCreateButton)\n\t\t{\n\t\t\tthis.hideCreateFieldButton();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.showCreateFieldButton();\n\t\t}\n\n\t\tconst crmFields = this.getCrmFields();\n\t\tif (Reflect.has(crmFields, button.id))\n\t\t{\n\t\t\tthis.clearContent();\n\n\t\t\tconst form = this.createFieldsListForm(button.id);\n\t\t\tthis.appendForm(form);\n\t\t}\n\t}\n\n\tgetFilteredFieldsTree()\n\t{\n\t\tconst searchString = String(this.getSearchField().getValue()).toLowerCase().trim();\n\t\tconst allowedCategories = this.getAllowedCategories();\n\t\tconst allowedTypes = this.getAllowedTypes();\n\n\t\treturn Object\n\t\t\t.entries(this.getCrmFields())\n\t\t\t.reduce((acc, [categoryId, category]) => {\n\t\t\t\tif (\n\t\t\t\t\t(\n\t\t\t\t\t\tcategoryId !== 'CATALOG'\n\t\t\t\t\t\t&& categoryId !== 'ACTIVITY'\n\t\t\t\t\t\t&& categoryId !== 'INVOICE'\n\t\t\t\t\t)\n\t\t\t\t\t&& (\n\t\t\t\t\t\t!Type.isArrayFilled(allowedCategories)\n\t\t\t\t\t\t|| allowedCategories.includes(categoryId)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tconst filteredFields = category.FIELDS.filter((field) => {\n\t\t\t\t\t\tconst fieldCaption = String(field.caption).toLowerCase().trim();\n\t\t\t\t\t\tif (Type.isArrayFilled(allowedTypes))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconst isTypeAllowed = allowedTypes.some(allowedType => {\n\t\t\t\t\t\t\t\tif (!Type.isPlainObject(allowedType))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedType = {type: allowedType};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tallowedType.entityFieldName\n\t\t\t\t\t\t\t\t\t&& allowedType.entityFieldName !== field.entity_field_name\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tType.isBoolean(allowedType.multiple)\n\t\t\t\t\t\t\t\t\t&& allowedType.multiple !== field.multiple\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn field.type === allowedType.type;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (!isTypeAllowed)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t!Type.isStringFilled(searchString)\n\t\t\t\t\t\t\t|| fieldCaption.includes(searchString)\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\n\t\t\t\t\tif (Type.isArrayFilled(filteredFields))\n\t\t\t\t\t{\n\t\t\t\t\t\tacc[categoryId] = {\n\t\t\t\t\t\t\t...category,\n\t\t\t\t\t\t\tFIELDS: filteredFields,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn acc;\n\t\t\t}, {});\n\t}\n\n\tcreateFieldsListForm(category: string): FormSettingsForm\n\t{\n\t\tconst fieldsListTree = this.getFilteredFieldsTree();\n\t\tconst disabledFields = this.getDisabledFields();\n\t\tconst fieldOptions = {\n\t\t\titems: fieldsListTree[category].FIELDS.map((field) => {\n\t\t\t\treturn {\n\t\t\t\t\tname: field.caption,\n\t\t\t\t\tvalue: field.name,\n\t\t\t\t\tdisabled: (\n\t\t\t\t\t\tType.isArrayFilled(disabledFields)\n\t\t\t\t\t\t&& disabledFields.includes(field.name)\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}),\n\t\t\tvalue: this.getState()[category] || [],\n\t\t\tonValueChange: (checkbox) => {\n\t\t\t\tconst state = {...this.getState()};\n\t\t\t\tstate[category] = checkbox.getValue();\n\t\t\t\tthis.setState(state);\n\t\t\t},\n\t\t};\n\n\t\treturn new FormSettingsForm({\n\t\t\tfields: [\n\t\t\t\tthis.isMultiple()\n\t\t\t\t\t? new BX.Landing.UI.Field.Checkbox(fieldOptions)\n\t\t\t\t\t: new BX.Landing.UI.Field.Radio(fieldOptions)\n\t\t\t\t,\n\t\t\t],\n\t\t});\n\t}\n\n\tonSearchChange()\n\t{\n\t\tconst filteredFieldsTree = this.getFilteredFieldsTree();\n\t\tconst categories = Object.keys(filteredFieldsTree);\n\n\t\tthis.sidebarButtons.forEach((button) => {\n\t\t\tbutton.deactivate();\n\n\t\t\tif (categories.includes(button.id))\n\t\t\t{\n\t\t\t\tDom.show(button.getLayout());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tDom.hide(button.getLayout());\n\t\t\t}\n\t\t});\n\n\t\tthis.clearContent();\n\n\t\tconst [firstCategory] = categories;\n\t\tif (firstCategory)\n\t\t{\n\t\t\tconst firstCategoryButton = this.sidebarButtons.get(firstCategory);\n\t\t\tif (firstCategoryButton)\n\t\t\t{\n\t\t\t\tfirstCategoryButton.activate();\n\t\t\t}\n\n\t\t\tconst form = this.createFieldsListForm(firstCategory);\n\n\t\t\tthis.showCreateFieldButton();\n\t\t\tthis.appendForm(form);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.hideCreateFieldButton();\n\t\t}\n\t}\n\n\tgetSearchField(): Text\n\t{\n\t\treturn this.cache.remember('searchField', () => {\n\t\t\tconst rootWindow = PageObject.getRootWindow();\n\t\t\treturn new rootWindow.BX.Landing.UI.Field.Text({\n\t\t\t\tselector: 'search',\n\t\t\t\ttextOnly: true,\n\t\t\t\tplaceholder: Loc.getMessage('LANDING_FIELDS_PANEL_SEARCH'),\n\t\t\t\tonChange: this.onSearchChange.bind(this),\n\t\t\t});\n\t\t});\n\t}\n\n\tgetSearchContainer(): HTMLDivElement\n\t{\n\t\treturn this.cache.remember('searchLayout', () => {\n\t\t\treturn Tag.render`\n\t\t\t\t<div class=\"landing-ui-panel-content-element landing-ui-panel-content-search\">\n\t\t\t\t\t${this.getSearchField().getLayout()}\n\t\t\t\t\t<div class=\"landing-ui-panel-content-search-icon\"></div>\n\t\t\t\t</div>\n\t\t\t`;\n\t\t});\n\t}\n\n\tgetUserFieldFactory(entityId: string)\n\t{\n\t\tconst factory = this.cache.remember(`userFieldFactory_${entityId}`, () => {\n\t\t\tconst rootWindow = PageObject.getRootWindow();\n\t\t\tconst preparedEntityId = (() => {\n\t\t\t\tif (entityId.startsWith('DYNAMIC_'))\n\t\t\t\t{\n\t\t\t\t\treturn this.getCrmFields()[entityId].DYNAMIC_ID;\n\t\t\t\t}\n\n\t\t\t\treturn `CRM_${entityId}`;\n\t\t\t})();\n\n\t\t\treturn new rootWindow.BX.UI.UserFieldFactory.Factory(\n\t\t\t\tpreparedEntityId,\n\t\t\t\t{\n\t\t\t\t\tmoduleId: 'crm',\n\t\t\t\t\tbindElement: this.getCreateFieldButton(),\n\t\t\t\t},\n\t\t\t);\n\t\t});\n\n\t\tif (Type.isArrayFilled(this.getAllowedTypes()))\n\t\t{\n\t\t\tfactory.types = factory.types.filter((type) => {\n\t\t\t\treturn this.getAllowedTypes().includes(type.name);\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfactory.types = factory.types.filter((type) => {\n\t\t\t\treturn type.name !== 'employee';\n\t\t\t});\n\t\t}\n\n\t\treturn factory;\n\t}\n\n\tonCreateFieldClick(event: MouseEvent)\n\t{\n\t\tevent.preventDefault();\n\n\t\tconst dictionary = this.getFormDictionary();\n\n\t\tif (\n\t\t\tType.isPlainObject(dictionary.permissions)\n\t\t\t&& Type.isPlainObject(dictionary.permissions.userField)\n\t\t\t&& dictionary.permissions.userField.add === false\n\t\t)\n\t\t{\n\t\t\tconst rootWindow = PageObject.getRootWindow();\n\t\t\trootWindow.BX.UI.Dialogs.MessageBox.alert(Loc.getMessage('LANDING_FORM_ADD_USER_FIELD_PERMISSION_DENIED'));\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeButton = this.sidebarButtons.getActive();\n\t\tconst currentCategoryId = activeButton.id;\n\n\t\tconst factory = this.getUserFieldFactory(currentCategoryId);\n\t\tconst menu = factory.getMenu();\n\n\t\tmenu.open((type) => {\n\t\t\tconst configurator = factory.getConfigurator({\n\t\t\t\tuserField: factory.createUserField(type),\n\t\t\t\tonSave: (userField) => {\n\t\t\t\t\tuserField\n\t\t\t\t\t\t.save()\n\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\treturn this.load();\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\tthis.getSearchField()\n\t\t\t\t\t\t\t\t.setValue(userField.getData().editFormLabel[Loc.getMessage('LANGUAGE_ID')]);\n\t\t\t\t\t\t\tthis.showCreateFieldButton();\n\t\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tonCancel: () => {\n\t\t\t\t\tthis.showCreateFieldButton();\n\t\t\t\t\tthis.sidebarButtons.getActive().getLayout().click();\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tthis.clearContent();\n\t\t\tDom.append(configurator.render(), this.content);\n\t\t\tthis.hideCreateFieldButton();\n\t\t});\n\t}\n\n\tgetCreateFieldButton(): HTMLSpanElement\n\t{\n\t\treturn this.cache.remember('getCreateFieldButton', () => {\n\t\t\treturn Tag.render`\n\t\t\t\t<div\n\t\t\t\t\tclass=\"landing-ui-panel-content-create-field-button\"\n\t\t\t\t\tonclick=\"${this.onCreateFieldClick.bind(this)}\"\n\t\t\t\t>\n\t\t\t\t\t${Loc.getMessage('LANDING_FIELDS_PANEL_CREATE_FIELD')}\n\t\t\t\t</div>\n\t\t\t`;\n\t\t});\n\t}\n\n\tgetCreateFieldLayout(): HTMLDivElement\n\t{\n\t\treturn this.cache.remember('createFieldLayout', () => {\n\t\t\treturn Tag.render`\n\t\t\t\t<div class=\"landing-ui-panel-content-create-field\">\n\t\t\t\t\t${this.getCreateFieldButton()}\n\t\t\t\t</div>\n\t\t\t`;\n\t\t});\n\t}\n\n\tisUserFieldEditorShowed(): boolean\n\t{\n\t\treturn Type.isDomNode(this.content.querySelector('.ui-userfieldfactory-configurator'));\n\t}\n\n\tshowCreateFieldButton()\n\t{\n\t\tDom.append(this.getCreateFieldLayout(), this.body);\n\t}\n\n\thideCreateFieldButton()\n\t{\n\t\tDom.remove(this.getCreateFieldLayout(), this.body);\n\t}\n}"],"names":["FieldsPanel","options","rootWindow","PageObject","getRootWindow","rootWindowPanel","BX","Landing","UI","Panel","instance","setEventNamespace","setLayoutClass","setOverlayClass","setTitle","Loc","getMessage","onSaveClick","bind","onCancelClick","cache","Cache","MemoryCache","Dom","append","layout","getViewContainer","overlay","insertAfter","getSearchContainer","header","getCreateFieldLayout","body","showLoader","loadPromise","load","then","hideLoader","Object","entries","getCrmFields","forEach","categoryId","category","Type","isPlainObject","isBoolean","isLeadEnabled","button","SidebarButton","id","text","CAPTION","child","onClick","onSidebarButtonClick","appendSidebarButton","appendFooterButton","BaseButton","className","attrs","title","get","mode","set","types","fields","categories","keys","key","startsWith","delete","getSearchField","input","textContent","setMultiple","setAllowedTypes","setDisabledFields","setAllowedCategories","resetFactoriesCache","isArrayFilled","disabledFields","allowedCategories","allowedTypes","multiple","sidebarButtons","show","leadButton","hide","includes","filteredFieldsTree","getFilteredFieldsTree","deactivate","getLayout","length","resetState","firstShowedButton","find","hidden","click","enableEdit","focus","Promise","resolve","promiseResolver","setCrmFields","getOriginalCrmFields","selectedFields","values","getState","reduce","acc","remember","document","querySelector","Loader","target","hideCreateFieldButton","getLoader","showCreateFieldButton","Backend","getInstance","action","result","setOriginalCrmFields","assign","FormSettingsPanel","FormClient","getDictionary","dictionary","setFormDictionary","state","activeButton","getActive","activate","hideCreateButton","getAllowedTypes","every","type","crmFields","Reflect","has","clearContent","form","createFieldsListForm","appendForm","searchString","String","getValue","toLowerCase","trim","getAllowedCategories","filteredFields","FIELDS","filter","field","fieldCaption","caption","isTypeAllowed","some","allowedType","entityFieldName","entity_field_name","isStringFilled","fieldsListTree","getDisabledFields","fieldOptions","items","map","name","value","disabled","onValueChange","checkbox","setState","FormSettingsForm","isMultiple","Field","Checkbox","Radio","firstCategory","firstCategoryButton","Text","selector","textOnly","placeholder","onChange","onSearchChange","Tag","render","entityId","factory","preparedEntityId","DYNAMIC_ID","UserFieldFactory","Factory","moduleId","bindElement","getCreateFieldButton","event","preventDefault","getFormDictionary","permissions","userField","add","Dialogs","MessageBox","alert","currentCategoryId","getUserFieldFactory","menu","getMenu","open","configurator","getConfigurator","createUserField","onSave","save","setValue","getData","editFormLabel","onCancel","content","onCreateFieldClick","isDomNode","remove","Content"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCA;;;AAGA,KAAaA,WAAb;CAAA;CAAA;CAAA;CAAA,gCAEoBC,OAFpB,EAGC;CACC,UAAMC,UAAU,GAAGC,6BAAU,CAACC,aAAX,EAAnB;CACA,UAAMC,eAAe,GAAGH,UAAU,CAACI,EAAX,CAAcC,OAAd,CAAsBC,EAAtB,CAAyBC,KAAzB,CAA+BT,WAAvD;;CACA,UAAI,CAACK,eAAe,CAACK,QAAjB,IAA6B,CAACV,WAAW,CAACU,QAA9C,EACA;CACCL,QAAAA,eAAe,CAACK,QAAhB,GAA2B,IAAIV,WAAJ,CAAgBC,OAAhB,CAA3B;CACA;;CAED,UAAMS,QAAQ,GAAIL,eAAe,CAACK,QAAhB,IAA4BV,WAAW,CAACU,QAA1D;CACAA,MAAAA,QAAQ,CAACT,OAAT,GAAmBA,OAAnB;CAEA,aAAOS,QAAP;CACA;CAfF;;CAmBC,yBACA;CAAA;;CAAA,QADYT,OACZ,uEADsB,EACtB;CAAA;CACC;CADD,kGAHsB,KAGtB;;CAEC,UAAKU,iBAAL,CAAuB,iCAAvB;;CACA,UAAKC,cAAL,CAAoB,yBAApB;;CACA,UAAKC,eAAL,CAAqB,iCAArB;;CACA,UAAKC,QAAL,CAAcC,eAAG,CAACC,UAAJ,CAAe,4BAAf,CAAd;;CAEA,UAAKC,WAAL,GAAmB,MAAKA,WAAL,CAAiBC,IAAjB,2CAAnB;CACA,UAAKC,aAAL,GAAqB,MAAKA,aAAL,CAAmBD,IAAnB,2CAArB;CAEA,UAAKjB,OAAL,GAAeA,OAAf;CACA,UAAKmB,KAAL,GAAa,IAAIC,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