Your IP : 3.138.120.251


Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/menu/menu/dist/
Upload File :
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/menu/menu/dist/menu.bundle.js.map

{"version":3,"file":"menu.bundle.js","sources":["../src/build-tree.js","../src/make-flat-tree.js","../src/get-node-class.js","../src/menu.js"],"sourcesContent":["export default function buildTree(root: HTMLElement, selector, parent = null, depth = 0)\n{\n\treturn [...root.querySelectorAll(selector)]\n\t\t.filter((element) => {\n\t\t\treturn element.parentElement.closest(selector) === parent;\n\t\t})\n\t\t.map((element) => {\n\t\t\tconst newDepth = depth + 1;\n\t\t\treturn {\n\t\t\t\tlayout: element,\n\t\t\t\tchildren: buildTree(element, selector, element, newDepth),\n\t\t\t\tdepth,\n\t\t\t};\n\t\t});\n}","import {MenuItem} from 'landing.menu.menuitem';\n\nexport default function makeFlatTree(tree: Array<MenuItem>, acc = []): Array<MenuItem>\n{\n\ttree.forEach((item) => {\n\t\tacc.push(item);\n\t\tmakeFlatTree(item.children, acc);\n\t});\n\n\treturn acc;\n}","export default function getNodeClass(type)\n{\n\tif (type === 'link')\n\t{\n\t\treturn BX.Landing.Node.Link;\n\t}\n\n\tif (type === 'img')\n\t{\n\t\treturn BX.Landing.Node.Img;\n\t}\n\n\tif (type === 'icon')\n\t{\n\t\treturn BX.Landing.Node.Icon;\n\t}\n\n\tif (type === 'embed')\n\t{\n\t\treturn BX.Landing.Node.Embed;\n\t}\n\n\tif (type === 'map')\n\t{\n\t\treturn BX.Landing.Node.Map;\n\t}\n\n\tif (type === 'component')\n\t{\n\t\treturn BX.Landing.Node.Component;\n\t}\n\n\treturn BX.Landing.Node.Text;\n}","import {Event, Cache, Tag, Dom, Type, Text} from 'main.core';\nimport {Loc} from 'landing.loc';\nimport {Env} from 'landing.env';\nimport {Main} from 'landing.main';\nimport {Backend} from 'landing.backend';\nimport {MenuItem} from 'landing.menu.menuitem';\nimport {MenuForm} from 'landing.ui.form.menuform';\nimport {StylePanel} from 'landing.ui.panel.stylepanel';\nimport buildTree from './build-tree';\nimport makeFlatTree from './make-flat-tree';\nimport getNodeClass from './get-node-class';\n\nimport './css/style.css';\n\n/**\n * @memberOf BX.Landing.Menu\n */\nexport class Menu extends Event.EventEmitter\n{\n\tconstructor(options = {})\n\t{\n\t\tsuper(options);\n\t\tthis.setEventNamespace('BX.Landing.Menu.Menu');\n\n\t\tthis.code = options.code;\n\t\tthis.root = options.root;\n\t\tthis.block = options.block;\n\t\tthis.manifest = Object.freeze({...options.manifest});\n\t\tthis.cache = new Cache.MemoryCache();\n\n\t\tif (\n\t\t\tEnv.getInstance().getType() === 'KNOWLEDGE'\n\t\t\t|| Env.getInstance().getType() === 'GROUP'\n\t\t)\n\t\t{\n\t\t\tif (Dom.hasClass(this.root.nextElementSibling, 'landing-menu-add'))\n\t\t\t{\n\t\t\t\tDom.remove(this.root.nextElementSibling);\n\t\t\t}\n\n\t\t\tDom.addClass(this.root, 'landing-menu-root-list');\n\t\t\tDom.insertAfter(this.getAddPageLayout(), this.root);\n\t\t}\n\n\t\tEvent.bind(this.root, 'click', (event: MouseEvent) => {\n\t\t\tif (\n\t\t\t\t!StylePanel.getInstance().isShown()\n\t\t\t\t&& event.target.nodeName === 'A'\n\t\t\t)\n\t\t\t{\n\t\t\t\tevent.preventDefault();\n\t\t\t\tlet href = Dom.attr(event.target, 'href');\n\t\t\t\tconst hrefPagePrefix = 'page:';\n\t\t\t\tif (href.startsWith(hrefPagePrefix))\n\t\t\t\t{\n\t\t\t\t\thref = href.replace(hrefPagePrefix, '');\n\t\t\t\t}\n\t\t\t\tif (href.startsWith('#landing'))\n\t\t\t\t{\n\t\t\t\t\tconst pageId = Text.toNumber(href.replace('#landing', ''));\n\t\t\t\t\tthis.reloadPage(pageId);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tcreateMenuItem(options): MenuItem\n\t{\n\t\tconst nodes = new BX.Landing.Collection.NodeCollection();\n\n\t\tObject.entries(this.manifest.nodes).forEach(([code, nodeManifest]) => {\n\t\t\tconst nodeElements = [\n\t\t\t\t...options.layout.querySelectorAll(code),\n\t\t\t].filter((nodeElement) => {\n\t\t\t\tconst elementParent = nodeElement.closest(this.manifest.item);\n\t\t\t\treturn elementParent === options.layout;\n\t\t\t});\n\n\t\t\tif (nodeElements.length > 0)\n\t\t\t{\n\t\t\t\tconst NodeClass = getNodeClass(nodeManifest.type);\n\n\t\t\t\tnodeElements.forEach((nodeElement) => {\n\t\t\t\t\tnodes.push(\n\t\t\t\t\t\tnew NodeClass({\n\t\t\t\t\t\t\tnode: nodeElement,\n\t\t\t\t\t\t\tmanifest: {...nodeManifest, allowInlineEdit: false, menuMode: true},\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\treturn new MenuItem({\n\t\t\tlayout: options.layout,\n\t\t\tchildren: options.children.map((itemOptions, index) => {\n\t\t\t\treturn this.createMenuItem({...itemOptions, index});\n\t\t\t}),\n\t\t\tselector: `${this.manifest.item}@${options.index}`,\n\t\t\tdepth: options.depth,\n\t\t\tnodes,\n\t\t});\n\t}\n\n\tgetTree()\n\t{\n\t\tconst {item} = this.manifest;\n\t\treturn buildTree(this.root, item)\n\t\t\t.map((options, index) => this.createMenuItem({...options, index}));\n\t}\n\n\tgetFlatTree()\n\t{\n\t\treturn makeFlatTree(this.getTree());\n\t}\n\n\tgetForm(): MenuForm\n\t{\n\t\treturn new MenuForm({\n\t\t\ttitle: Loc.getMessage('LANDING_MENU_TITLE'),\n\t\t\ttype: 'menu',\n\t\t\tcode: this.code,\n\t\t\tforms: this.getFlatTree().map((item) => {\n\t\t\t\treturn item.getForm();\n\t\t\t}),\n\t\t});\n\t}\n\n\tgetAddPageButton(): HTMLButtonElement\n\t{\n\t\treturn this.cache.remember('addPageButton', () => {\n\t\t\treturn Tag.render`\n\t\t\t\t<button \n\t\t\t\t\tclass=\"ui-btn ui-btn-light-border ui-btn-icon-add ui-btn-round landing-ui-menu-add-button\"\n\t\t\t\t\tonclick=\"${this.onAddPageButtonClick.bind(this)}\"\n\t\t\t\t\t>\n\t\t\t\t\t${Loc.getMessage('LANDING_MENU_CREATE_NEW_PAGE')}\n\t\t\t\t</button>\n\t\t\t`;\n\t\t});\n\t}\n\n\tonAddPageTextInputKeydown(event: KeyboardEvent)\n\t{\n\t\tif (event.keyCode === 13)\n\t\t{\n\t\t\tthis.addPage();\n\t\t}\n\t}\n\n\taddPage()\n\t{\n\t\tconst input = this.getAddPageInput();\n\t\tconst {value} = input;\n\n\t\tinput.value = '';\n\t\tinput.focus();\n\n\t\tif (Type.isStringFilled(value))\n\t\t{\n\t\t\tconst code = BX.translit(\n\t\t\t\tvalue,\n\t\t\t\t{\n\t\t\t\t\tchange_case: 'L',\n\t\t\t\t\treplace_space: '-',\n\t\t\t\t\treplace_other: '',\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tconst backend = Backend.getInstance();\n\n\t\t\tbackend\n\t\t\t\t.createPage({\n\t\t\t\t\ttitle: value,\n\t\t\t\t\tmenuCode: this.code,\n\t\t\t\t\tblockId: this.block,\n\t\t\t\t\tcode,\n\t\t\t\t})\n\t\t\t\t.then((id) => {\n\t\t\t\t\tconst li = this.createLi({\n\t\t\t\t\t\ttext: value,\n\t\t\t\t\t\thref: `#landing${id}`,\n\t\t\t\t\t\ttarget: '_self',\n\t\t\t\t\t\tchildren: [],\n\t\t\t\t\t});\n\n\t\t\t\t\tDom.append(li, this.root);\n\t\t\t\t\tDom.remove(this.getAddPageField());\n\t\t\t\t\tDom.removeClass(this.root, 'landing-menu-root-list-with-field');\n\t\t\t\t\tDom.removeClass(this.getAddPageLayout(), 'landing-menu-add-with-background');\n\n\t\t\t\t\tthis.reloadPage(id);\n\t\t\t\t});\n\t\t}\n\t}\n\n\t// eslint-disable-next-line class-methods-use-this\n\treloadPage(id: number)\n\t{\n\t\tconst main = Main.getInstance();\n\t\tconst url = Env.getInstance().getLandingEditorUrl({\n\t\t\tlanding: id,\n\t\t});\n\n\t\tvoid main.reloadSlider(url);\n\t}\n\n\tgetAddPageInput(): TextField\n\t{\n\t\treturn this.cache.remember('addPageTextInput', () => {\n\t\t\treturn Tag.render`\n\t\t\t\t<input \n\t\t\t\t\ttype=\"text\" \n\t\t\t\t\tclass=\"landing-menu-add-field-input\"\n\t\t\t\t\tplaceholder=\"${Loc.getMessage('LANDING_MENU_CREATE_NEW_PAGE')}\"\n\t\t\t\t\tonkeydown=\"${this.onAddPageTextInputKeydown.bind(this)}\"\n\t\t\t\t\t>\n\t\t\t`;\n\t\t});\n\t}\n\n\tonAddPageInputCloseButtonClick(event: MouseEvent)\n\t{\n\t\tevent.preventDefault();\n\n\t\tconst input = this.getAddPageInput();\n\n\t\tinput.value = '';\n\t\tDom.removeClass(this.root, 'landing-menu-root-list-with-field');\n\t\tDom.removeClass(this.getAddPageLayout(), 'landing-menu-add-with-background');\n\t\tDom.remove(this.getAddPageField());\n\t\tDom.append(this.getAddPageButton(), this.getAddPageLayout());\n\t}\n\n\tgetAddPageInputCloseButton(): HTMLElement\n\t{\n\t\treturn this.cache.remember('addPageInputCloseButton', () => {\n\t\t\treturn Tag.render`\n\t\t\t\t<span \n\t\t\t\t\tclass=\"landing-menu-add-field-close\"\n\t\t\t\t\tonclick=\"${this.onAddPageInputCloseButtonClick.bind(this)}\"\n\t\t\t\t\ttitle=\"${Loc.getMessage('LANDING_MENU_CLOSE_BUTTON_LABEL')}\"\n\t\t\t\t\t>\n\t\t\t\t</span>\n\t\t\t`;\n\t\t});\n\t}\n\n\tgetAddPageInputApplyButton(): HTMLElement\n\t{\n\t\treturn this.cache.remember('addPageInputApplyButton', () => {\n\t\t\treturn Tag.render`\n\t\t\t\t<span \n\t\t\t\t\tclass=\"landing-menu-add-field-apply\"\n\t\t\t\t\tonclick=\"${this.onAddPageInputApplyButtonClick.bind(this)}\"\n\t\t\t\t\ttitle=\"${Loc.getMessage('LANDING_MENU_APPLY_BUTTON_LABEL')}\"\n\t\t\t\t\t>\n\t\t\t\t</span>\n\t\t\t`;\n\t\t});\n\t}\n\n\tonAddPageInputApplyButtonClick(event: MouseEvent)\n\t{\n\t\tevent.preventDefault();\n\t\tthis.addPage();\n\t}\n\n\tgetAddPageField(): HTMLElement\n\t{\n\t\treturn this.cache.remember('addPageInput', () => {\n\t\t\treturn Tag.render`\n\t\t\t\t<div class=\"landing-menu-add-field\">\n\t\t\t\t\t${this.getAddPageInput()}\n\t\t\t\t\t${this.getAddPageInputApplyButton()}\n\t\t\t\t\t${this.getAddPageInputCloseButton()}\n\t\t\t\t</div>\n\t\t\t`;\n\t\t});\n\t}\n\n\tgetAddPageLayout(): HTMLElement\n\t{\n\t\treturn this.cache.remember('addPageLayout', () => {\n\t\t\treturn Tag.render`\n\t\t\t\t<div class=\"landing-menu-add\">\n\t\t\t\t\t${this.getAddPageButton()}\n\t\t\t\t</div>\n\t\t\t`;\n\t\t});\n\t}\n\n\tonAddPageButtonClick(event: MouseEvent)\n\t{\n\t\tevent.preventDefault();\n\t\tDom.addClass(this.root, 'landing-menu-root-list-with-field');\n\t\tDom.addClass(this.getAddPageLayout(), 'landing-menu-add-with-background');\n\t\tDom.prepend(this.getAddPageField(), this.getAddPageLayout());\n\t\tDom.remove(this.getAddPageButton());\n\t\tthis.getAddPageInput().focus();\n\t}\n\n\tcreateList(items, type = 'root')\n\t{\n\t\tconst {ulClassName} = this.manifest[type];\n\t\treturn Tag.render`\n\t\t\t<ul class=\"${ulClassName}\">${items.map((item) => this.createLi(item, type))}</ul>\n\t\t`;\n\t}\n\n\tcreateA(item, type = 'root')\n\t{\n\t\tconst {aClassName} = this.manifest[type];\n\t\treturn Tag.render`\n\t\t\t<a class=\"${aClassName}\" href=\"${item.href}\" target=\"${item.target}\">${Text.encode(item.text)}</a>\n\t\t`;\n\t}\n\n\tcreateLi(item, type = 'root')\n\t{\n\t\tconst {liClassName} = this.manifest[type];\n\t\treturn Tag.render`\n\t\t\t<li class=\"${liClassName}\">\n\t\t\t\t${this.createA(item, type)}\n\t\t\t\t${item.children ? this.createList(item.children, 'children') : undefined}\n\t\t\t</li>\n\t\t`;\n\t}\n\n\trebuild(items)\n\t{\n\t\tconst newList = this.createList(items);\n\n\t\tDom.replace(this.root, newList);\n\t\tthis.root = newList;\n\t}\n}"],"names":["buildTree","root","selector","parent","depth","querySelectorAll","filter","element","parentElement","closest","map","newDepth","layout","children","makeFlatTree","tree","acc","forEach","item","push","getNodeClass","type","BX","Landing","Node","Link","Img","Icon","Embed","Map","Component","Text","Menu","options","setEventNamespace","code","block","manifest","Object","freeze","cache","Cache","MemoryCache","Env","getInstance","getType","Dom","hasClass","nextElementSibling","remove","addClass","insertAfter","getAddPageLayout","Event","bind","event","StylePanel","isShown","target","nodeName","preventDefault","href","attr","hrefPagePrefix","startsWith","replace","pageId","toNumber","reloadPage","nodes","Collection","NodeCollection","entries","nodeManifest","nodeElements","nodeElement","elementParent","length","NodeClass","node","allowInlineEdit","menuMode","MenuItem","itemOptions","index","createMenuItem","getTree","MenuForm","title","Loc","getMessage","forms","getFlatTree","getForm","remember","Tag","render","onAddPageButtonClick","keyCode","addPage","input","getAddPageInput","value","focus","Type","isStringFilled","translit","change_case","replace_space","replace_other","backend","Backend","createPage","menuCode","blockId","then","id","li","createLi","text","append","getAddPageField","removeClass","main","Main","url","getLandingEditorUrl","landing","reloadSlider","onAddPageTextInputKeydown","getAddPageButton","onAddPageInputCloseButtonClick","onAddPageInputApplyButtonClick","getAddPageInputApplyButton","getAddPageInputCloseButton","prepend","items","ulClassName","aClassName","encode","liClassName","createA","createList","undefined","newList","EventEmitter"],"mappings":";;;;;CAAe,SAASA,SAAS,CAACC,IAAiB,EAAEC,QAAQ,EAC7D;GAAA,IAD+DC,MAAM,uEAAG,IAAI;GAAA,IAAEC,KAAK,uEAAG,CAAC;GAEtF,OAAO,+BAAIH,IAAI,CAACI,gBAAgB,CAACH,QAAQ,CAAC,EACxCI,MAAM,CAAC,UAACC,OAAO,EAAK;KAC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