Your IP : 18.116.69.147


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

{"version":3,"file":"stepbystep.bundle.js","sources":["../src/stepbystep.item.js","../src/stepbystep.js"],"sourcesContent":["import { EventEmitter } from 'main.core.events';\nimport { Type, Tag, Dom } from 'main.core';\nimport 'ui.hint';\n\n\n\nexport default class StepByStepItem extends EventEmitter\n{\n\tconstructor(options = {}, number)\n\t{\n\t\tsuper();\n\n\t\tthis.header = options?.header;\n\t\tthis.node = options?.node;\n\t\tthis.number = number;\n\t\tthis.isFirst = options?.isFirst || '';\n\t\tthis.isLast = options?.isLast || ''\n\t\tthis.class = Type.isString(options?.nodeClass) ? options.nodeClass : null;\n\t\tthis.backgroundColor = Type.isString(options?.backgroundColor) ? options.backgroundColor : null;\n\t\tthis.layout = {\n\t\t\tcontainer: null\n\t\t};\n\t}\n\n\tgetHeader()\n\t{\n\t\tif (Type.isString(this.header))\n\t\t{\n\t\t\treturn Tag.render`\n\t\t\t\t<div class=\"ui-stepbystep__section-item--title\">${this.header}</div>\n\t\t\t`;\n\t\t}\n\n\t\tif (Type.isObject(this.header))\n\t\t{\n\n\t\t\tlet titleWrapper = Tag.render`\n\t\t\t\t<div class=\"ui-stepbystep__section-item--title\">\n\n\t\t\t\t</div>\n\t\t\t`;\n\n\t\t\tif (this.header.title)\n\t\t\t{\n\t\t\t\ttitleWrapper.innerText = this.header.title;\n\t\t\t}\n\n\t\t\tif (Type.isString(this.header.hint))\n\t\t\t{\n\t\t\t\tlet hintNode = Tag.render`\n\t\t\t\t\t<span data-hint=\"${this.header.hint}\" class=\"ui-hint ui-stepbystep__section-item--hint\">\n\t\t\t\t\t\t<i class=\"ui-hint-icon\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t`;\n\n\t\t\t\ttitleWrapper.appendChild(hintNode);\n\n\t\t\t\tthis.initHint(titleWrapper);\n\t\t\t}\n\n\t\t\treturn titleWrapper;\n\t\t}\n\n\t\treturn '';\n\t}\n\n\n\tinitHint(node: HTMLElement)\n\t{\n\t\tBX.UI.Hint.init(node);\n\t}\n\n\tgetContent()\n\t{\n\n\t\tif (this.node)\n\t\t{\n\t\t\treturn Tag.render`\n\t\t\t\t<div class=\"ui-stepbystep__section-item--content\">\n\t\t\t\t\t${this.node}\n\t\t\t\t</div>\n\t\t\t`;\n\t\t}\n\n\t\treturn '';\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-stepbystep__section-item\">\n\t\t\t\t\t<div class=\"ui-stepbystep__section-item--counter\">\n\t\t\t\t\t\t<div class=\"ui-stepbystep__section-item--counter-number ${this.isFirst} ${this.isLast}\">\n\t\t\t\t\t\t\t<span>${this.number}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"ui-stepbystep__section-item--information\">\n\t\t\t\t\t\t${this.getHeader()}\n\t\t\t\t\t\t${this.getContent()}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t`;\n\n\t\t\tif (this.backgroundColor)\n\t\t\t{\n\t\t\t\tthis.layout.container.style.backgroundColor = this.backgroundColor;\n\t\t\t}\n\n\t\t\tif (this.class)\n\t\t\t{\n\t\t\t\tthis.layout.container.classList.add(this.class);\n\t\t\t}\n\t\t}\n\n\t\treturn this.layout.container;\n\t}\n}","import StepByStepItem from './stepbystep.item';\nimport { Tag, Dom } from 'main.core';\nimport 'ui.fonts.opensans';\nimport './css/style.css';\n\n\nexport class StepByStep\n{\n\tconstructor(options = {})\n\t{\n\t\tthis.target = options.target || null;\n\t\tthis.content = options.content || null;\n\t\tthis.contentWrapper = null;\n\t\tthis.items = [];\n\t\tthis.counter = 0;\n\t}\n\n\tgetItem(item): StepByStepItem\n\t{\n\t\tif (item instanceof StepByStepItem)\n\t\t{\n\t\t\treturn item;\n\t\t}\n\n\t\tthis.counter++;\n\n\t\tif (this.counter === 1)\n\t\t{\n\t\t\titem.isFirst = '--first';\n\t\t}\n\n\t\tif (this.counter === this.content.length)\n\t\t{\n\t\t\titem.isLast = '--last';\n\t\t}\n\n\t\titem = new StepByStepItem(item, this.counter);\n\n\t\tif (this.items.indexOf(item) === -1)\n\t\t{\n\t\t\tthis.items.push(item);\n\t\t}\n\n\t\treturn item;\n\t}\n\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-stepbystep__content ui-stepbystep__scope\"></div>\n\t\t\t`;\n\n\t\t\tthis.content.map((item)=> {\n\n\t\t\t\titem.html.map((itemObj)=> {\n\t\t\t\t\tthis.contentWrapper.appendChild(this.getItem(itemObj).getContainer());\n\t\t\t\t});\n\n\t\t\t});\n\t\t}\n\n\t\treturn this.contentWrapper;\n\t}\n\n\tinit()\n\t{\n\t\tif (this.target && this.content)\n\t\t{\n\t\t\tDom.clean(this.target);\n\t\t\tthis.target.appendChild(this.getContentWrapper());\n\t\t}\n\t}\n}\n"],"names":["StepByStepItem","EventEmitter","constructor","options","number","header","node","isFirst","isLast","class","Type","isString","nodeClass","backgroundColor","layout","container","getHeader","Tag","render","isObject","titleWrapper","title","innerText","hint","hintNode","appendChild","initHint","BX","UI","Hint","init","getContent","getContainer","style","classList","add","StepByStep","target","content","contentWrapper","items","counter","getItem","item","length","indexOf","push","getContentWrapper","map","html","itemObj","Dom","clean"],"mappings":";;;;;;;;;;;AAAA,CAMe,MAAMA,cAAc,SAASC,6BAAY,CACxD;GACCC,WAAW,CAACC,OAAO,GAAG,EAAE,EAAEC,MAAM,EAChC;KACC,KAAK,EAAE;KAEP,IAAI,CAACC,MAAM,GAAGF,OAAO,oBAAPA,OAAO,CAAEE,MAAM;KAC7B,IAAI,CAACC,IAAI,GAAGH,OAA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