File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/modules/ui/install/js/ui/popupcomponentsmader/dist/popupcomponentsmader.bundle.js.map
Back
{"version":3,"file":"popupcomponentsmader.bundle.js","sources":["../src/popup.item.js","../src/popup.js"],"sourcesContent":["import { EventEmitter } from 'main.core.events';\nimport { Type, Tag, Dom } from 'main.core';\nimport { Loader } from 'main.loader';\n\nexport default class PopupComponentsMaderItem extends EventEmitter\n{\n\tconstructor(options = {})\n\t{\n\t\tsuper();\n\n\t\tthis.html = Type.isDomNode(options?.html) ? options.html : null;\n\t\tthis.awaitContent = Type.isBoolean(options?.awaitContent) ? options?.awaitContent : null;\n\t\tthis.flex = Type.isNumber(options?.flex) ? options.flex : null;\n\t\tthis.withoutBackground = Type.isBoolean(options?.withoutBackground) ? options.withoutBackground : null;\n\t\tthis.layout = {\n\t\t\tcontainer: null\n\t\t};\n\n\t\tif (this.awaitContent)\n\t\t{\n\t\t\tthis.await();\n\t\t}\n\t}\n\n\tgetLoader(): Loader\n\t{\n\t\tif (!this.loader)\n\t\t{\n\t\t\tthis.loader = new Loader({\n\t\t\t\ttarget: this.getContainer(),\n\t\t\t\tsize: 45\n\t\t\t});\n\t\t}\n\n\t\treturn this.loader;\n\t}\n\n\tawait()\n\t{\n\t\tthis.getContainer().classList.add('--awaiting');\n\t\tthis.showLoader();\n\t}\n\n\tstopAwait()\n\t{\n\t\tthis.getContainer().classList.remove('--awaiting');\n\t\tthis.hideLoader();\n\t}\n\n\tshowLoader(): void\n\t{\n\t\tvoid this.getLoader().show();\n\t}\n\n\thideLoader(): void\n\t{\n\t\tvoid this.getLoader().hide();\n\t}\n\n\tgetContent()\n\t{\n\t\tif (this.html)\n\t\t{\n\t\t\treturn this.html;\n\t\t}\n\n\t\treturn '';\n\t}\n\n\tupdateContent(node: HTMLElement)\n\t{\n\t\tif (Type.isDomNode(node))\n\t\t{\n\t\t\tDom.clean(this.getContainer());\n\t\t\tthis.getContainer().appendChild(node);\n\t\t}\n\t}\n\n\tgetContainer(): HTMLElement\n\t{\n\t\tif (!this.layout.container)\n\t\t{\n\t\t\tthis.layout.container = Tag.render`\n\t\t\t\t<div class=\"ui-qr-popupcomponentmader__content--section-item\">${this.getContent()}</div>\n\t\t\t`;\n\n\t\t\tif (this.withoutBackground)\n\t\t\t{\n\t\t\t\tthis.layout.container.classList.add('--transparent');\n\t\t\t}\n\n\t\t\tif (this.flex)\n\t\t\t{\n\t\t\t\tthis.layout.container.style.flex = this.flex;\n\t\t\t}\n\t\t}\n\n\t\treturn this.layout.container;\n\t}\n}\n","import PopupComponentsMaderItem from './popup.item';\nimport { Type, Tag } from 'main.core';\nimport { Popup } from 'main.popup';\n\nexport class PopupComponentsMader\n{\n\tconstructor(options = {})\n\t{\n\t\tthis.target = Type.isElementNode(options.target) ? options.target : null;\n\t\tthis.content = options.content || null;\n\t\tthis.contentWrapper = null;\n\t\tthis.popup = null;\n\t\tthis.loader = null;\n\t}\n\n\tgetItem(item)\n\t{\n\t\tif (item instanceof PopupComponentsMaderItem)\n\t\t{\n\t\t\treturn item;\n\t\t}\n\n\t\treturn new PopupComponentsMaderItem(item);\n\t}\n\n\taddItem(item, sectionNode: HTMLElement): PopupComponentsMaderItem\n\t{\n\t\tif (!(item instanceof PopupComponentsMaderItem))\n\t\t{\n\t\t\titem = this.getItem(item);\n\t\t}\n\n\t\tif (Type.isDomNode(sectionNode))\n\t\t{\n\t\t\tsectionNode.appendChild(item.getContainer());\n\t\t}\n\t}\n\n\tgetPopup(): Popup\n\t{\n\t\tif (!this.popup)\n\t\t{\n\t\t\tlet popupWidth = 350;\n\n\t\t\tthis.popup = new Popup(null, this.target, {\n\t\t\t\tclassName: 'ui-qr-popupcomponentmader',\n\t\t\t\tbackground: 'rgba(255,255,255,.88)',\n\t\t\t\tcontentBackground: 'transparent',\n\t\t\t\tangle: {\n\t\t\t\t\toffset: (popupWidth / 2) - 16\n\t\t\t\t},\n\t\t\t\tmaxWidth: popupWidth,\n\t\t\t\toffsetLeft: -(popupWidth / 2) + (this.target.offsetWidth / 2) + 40,\n\t\t\t\tautoHide: true,\n\t\t\t\tcloseByEsc: true,\n\t\t\t\tpadding: 13,\n\t\t\t\tanimation: 'fading-slide',\n\t\t\t\tcontent: this.getContentWrapper()\n\t\t\t});\n\n\t\t\tthis.popup.getContentContainer().style.overflowX = null;\n\t\t}\n\n\t\treturn this.popup;\n\t}\n\n\tisShown()\n\t{\n\t\treturn this.getPopup().isShown();\n\t}\n\n\t/**\n\t * @private\n\t */\n\tgetContentWrapper(): HTMLElement\n\t{\n\t\tif (!this.contentWrapper)\n\t\t{\n\t\t\tthis.contentWrapper = Tag.render`\n\t\t\t\t<div class=\"ui-qr-popupcomponentmader__content\"></div>\n\t\t\t`;\n\n\t\t\tif (!this.content)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.content.map((item)=> {\n\t\t\t\tlet sectionNode = this.getSection()\n\n\t\t\t\tif (item?.marginBottom)\n\t\t\t\t{\n\t\t\t\t\tType.isNumber(item.marginBottom)\n\t\t\t\t\t\t? sectionNode.style.marginBottom = item.marginBottom + 'px'\n\t\t\t\t\t\t: sectionNode.style.marginBottom = item.marginBottom;\n\t\t\t\t}\n\n\t\t\t\tif (Type.isDomNode(item?.html))\n\t\t\t\t{\n\t\t\t\t\tsectionNode.appendChild(this.getItem(item).getContainer());\n\t\t\t\t\tthis.contentWrapper.appendChild(sectionNode);\n\t\t\t\t}\n\n\t\t\t\tif (Type.isArray(item?.html))\n\t\t\t\t{\n\t\t\t\t\titem.html.map((itemObj)=> {\n\t\t\t\t\t\titemObj?.html?.then\n\t\t\t\t\t\t\t? this.adjustPromise(itemObj, sectionNode)\n\t\t\t\t\t\t\t: sectionNode.appendChild(this.getItem(itemObj).getContainer());\n\t\t\t\t\t});\n\t\t\t\t\tthis.contentWrapper.appendChild(sectionNode);\n\t\t\t\t}\n\n\t\t\t\tif (Type.isFunction(item?.html?.then))\n\t\t\t\t{\n\t\t\t\t\tthis.adjustPromise(item, sectionNode);\n\t\t\t\t\tthis.contentWrapper.appendChild(sectionNode);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn this.contentWrapper;\n\t}\n\n\tadjustPromise(item: Object, sectionNode: HTMLElement)\n\t{\n\t\titem.awaitContent = true;\n\t\tlet itemObj = this.getItem(item);\n\n\t\tif (sectionNode)\n\t\t{\n\t\t\tsectionNode.appendChild(itemObj.getContainer());\n\t\t\titem?.html?.then((node) => {\n\t\t\t\tif (Type.isDomNode(node))\n\t\t\t\t{\n\t\t\t\t\titemObj.stopAwait();\n\t\t\t\t\titemObj.updateContent(node);\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\tgetSection(): HTMLElement\n\t{\n\t\treturn Tag.render`\n\t\t\t<div class=\"ui-qr-popupcomponentmader__content--section\"></div>\n\t\t`;\n\t}\n\n\tshow()\n\t{\n\t\tif (!Type.isDomNode(this.target))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.getPopup().show();\n\t}\n\n\tclose()\n\t{\n\t\tthis.getPopup().close();\n\t}\n}"],"names":["PopupComponentsMaderItem","options","html","Type","isDomNode","awaitContent","isBoolean","flex","isNumber","withoutBackground","layout","container","await","loader","Loader","target","getContainer","size","classList","add","showLoader","remove","hideLoader","getLoader","show","hide","node","Dom","clean","appendChild","Tag","render","getContent","style","EventEmitter","PopupComponentsMader","isElementNode","content","contentWrapper","popup","item","sectionNode","getItem","popupWidth","Popup","className","background","contentBackground","angle","offset","maxWidth","offsetLeft","offsetWidth","autoHide","closeByEsc","padding","animation","getContentWrapper","getContentContainer","overflowX","getPopup","isShown","map","getSection","marginBottom","isArray","itemObj","then","adjustPromise","isFunction","stopAwait","updateContent","close"],"mappings":";;;;;;KAIqBA;;;CAEpB,sCACA;CAAA;;CAAA,QADYC,OACZ,uEADsB,EACtB;CAAA;CACC;CAEA,UAAKC,IAAL,GAAYC,cAAI,CAACC,SAAL,CAAeH,OAA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