Current Path : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/ui/tabs/dist/ |
Current File : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/ui/tabs/dist/tabs.bundle.js.map |
{"version":3,"file":"tabs.bundle.js","sources":["../src/tab.js","../src/tabs.js"],"sourcesContent":["import {Tag, Dom, Loc, Type, Cache, Text, Event} from 'main.core';\nimport {EventEmitter} from 'main.core.events';\nimport { Loader } from 'main.loader';\nimport { Tabs } from './tabs';\nimport type { TabOptionsType, TabHeadOptionsType } from './types';\n\nconst justCounter = {\n\tlocalId: 0,\n\tlocalSorting: 0\n};\n\nexport class Tab extends EventEmitter\n{\n\t#parentElement: ?Tabs;\n\n\t#id: string;\n\t#sort: number = 0;\n\t#head: HTMLElement;\n\t#body: HTMLElement;\n\t#dataContainer: HTMLElement;\n\t#active: boolean = false;\n\t#restricted: boolean = true;\n\t#bannerCode: ?string = null;\n\t#helpDeskCode: ?string = null;\n\n\t#loader: ?Loader = null;\n\n\tconstructor(options: TabOptionsType, parentElement: ?Tabs = null)\n\t{\n\t\tsuper({});\n\n\t\tthis.setEventNamespace('UI:Tabs:');\n\t\tthis.setParent(parentElement);\n\n\t\tthis.#id = Type.isStringFilled(options.id) ? options.id : ('TabId' + (++justCounter.localId));\n\t\tthis.#sort = Type.isInteger(options.sort) ? options.sort : (++justCounter.localSorting);\n\t\tthis.#active = Type.isBoolean(options.active) ? options.active : false;\n\n\t\tthis.#restricted = options.restricted === true;\n\t\tthis.#bannerCode = Type.isStringFilled(options.bannerCode) ? options.bannerCode : null;\n\t\tthis.#helpDeskCode = Type.isStringFilled(options.helpDeskCode) ? options.helpDeskCode : null;\n\n\t\tthis.#initHead(options.head);\n\t\tthis.#initBody(options.body);\n\t}\n\n\tgetId(): string\n\t{\n\t\treturn this.#id;\n\t}\n\n\tgetSort()\n\t{\n\t\treturn this.#sort;\n\t}\n\n\tsetParent(parentElement: ?Tabs): this\n\t{\n\t\tif (parentElement instanceof Tabs)\n\t\t{\n\t\t\tthis.#parentElement = parentElement;\n\t\t}\n\t}\n\n\t#initHead(headOptions: TabHeadOptionsType | HTMLElement | string): HTMLElement\n\t{\n\t\tconst options = Type.isPlainObject(headOptions) ? headOptions : (Type.isStringFilled(headOptions) ?\n\t\t\t{title: headOptions} : {})\n\t\t;\n\t\tlet innerHeader;\n\t\tif (Type.isDomNode(headOptions))\n\t\t{\n\t\t\tinnerHeader = headOptions;\n\t\t}\n\t\telse if (this.#restricted !== true)\n\t\t{\n\t\t\tinnerHeader = Tag.render`<div title=\"${Text.encode(options.description ?? '')}\">${Text.encode(options.title) ?? ' '}</div>`;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinnerHeader = Tag.render`<div class=\"ui-tabs__tab-header-container-inner\" title=\"${Text.encode(options.description ?? '')}\">\n\t\t\t\t<div class=\"ui-tabs__tab-header-container-inner-title\">${Text.encode(options.title)}</div>\n\t\t\t\t<div class=\"ui-tabs__tab-header-container-inner-lockbox\"><span class=\"ui-icon-set --lock field-has-lock\"></span></div>\n\t\t\t</div>`;\n\t\t\tEvent.bind(innerHeader, 'click', this.showBanner.bind(this));\n\t\t}\n\n\t\tthis.#head = Tag.render`<span class=\"ui-tabs__tab-header-container ${Text.encode(options.className ?? '')}\" data-bx-role=\"tab-header\" data-bx-name=\"${Text.encode(this.#id)}\">${innerHeader}</span>`;\n\n\t\tEvent.bind(\n\t\t\tthis.#head,\n\t\t\t'click',\n\t\t\t() => {\n\t\t\t\tthis.emit('changeTab');\n\t\t\t},\n\t\t);\n\t}\n\n\t#initBody(body: Function | Promise | string | HTMLElement)\n\t{\n\t\tthis.#dataContainer = Tag.render`<div class=\"ui-tabs__tab-body_data\"></div>`;\n\t\tthis.#body = Tag.render`<div class=\"ui-tabs__tab-body_inner\"></div>`;\n\t\tthis.#body.dataset.id = this.#id;\n\t\tthis.#body.dataset.role = 'body';\n\t\tthis.#body.appendChild(this.#dataContainer);\n\n\t\tif (body)\n\t\t{\n\t\t\tthis.subscribe('onActive', () => {\n\t\t\t\tthis.#loadBody(body);\n\t\t\t});\n\t\t}\n\t}\n\n\t#loadBody(body)\n\t{\n\t\tlet resultBody = body;\n\t\tif (Type.isFunction(body))\n\t\t{\n\t\t\tresultBody = body(this);\n\t\t}\n\n\t\tlet promiseBody;\n\t\tif (!resultBody || (\n\t\t\tObject.prototype.toString.call(resultBody) === \"[object Promise]\" ||\n\t\t\tresultBody.toString() === \"[object BX.Promise]\"\n\t\t))\n\t\t{\n\t\t\tpromiseBody = resultBody;\n\t\t\tthis.#showLoader();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpromiseBody = Promise.resolve(resultBody);\n\t\t}\n\n\t\tpromiseBody.then(\n\t\t\t(result) =>\n\t\t\t{\n\t\t\t\tthis.#removeLoader();\n\t\t\t\tif (Type.isDomNode(result))\n\t\t\t\t{\n\t\t\t\t\tthis.#dataContainer.appendChild(result);\n\t\t\t\t}\n\t\t\t\telse if (Type.isString(result))\n\t\t\t\t{\n\t\t\t\t\tthis.#dataContainer.innerHTML = result; //HTML! Not Text.encoded\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthrow new Error('Tab body has to be a text or a dom-element.');\n\t\t\t\t}\n\t\t\t\tthis.emit('onLoad');\n\t\t\t},\n\t\t\t(reason) =>\n\t\t\t{\n\t\t\t\tconsole.log('reason: ', reason);\n\t\t\t\tthis.#removeLoader();\n\t\t\t\tthis.#dataContainer.innerHTML = reason;\n\t\t\t\tthis.emit('onLoadErrored');\n\t\t\t}\n\t\t);\n\t}\n\n\t#showLoader()\n\t{\n\t\tthis.#loader = new Loader({\n\t\t\ttarget: this.#dataContainer,\n\t\t\tcolor: 'rgba(82, 92, 105, 0.9)',\n\t\t\tmode: 'inline'\n\t\t});\n\t\tthis\n\t\t\t.#loader\n\t\t\t.show()\n\t\t\t.then(() => {\n\t\t\t\tconsole.log('The loader is shown')\n\t\t\t})\n\t\t;\n\t}\n\n\t#removeLoader()\n\t{\n\t\tif (this.#loader)\n\t\t{\n\t\t\tthis.#loader.destroy();\n\t\t\tthis.#loader = null;\n\t\t}\n\t}\n\n\tisRestricted(): boolean\n\t{\n\t\treturn this.#restricted;\n\t}\n\n\tgetBannerCode(): ?string\n\t{\n\t\treturn this.#bannerCode;\n\t}\n\n\tshowBanner(event): void\n\t{\n\t\tif (this.getBannerCode())\n\t\t{\n\t\t\tBX.UI.InfoHelper.show(this.getBannerCode());\n\t\t}\n\t\tif (event)\n\t\t{\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tgetHeader(): HTMLElement\n\t{\n\t\treturn this.#head;\n\t}\n\n\tgetBody(): HTMLElement\n\t{\n\t\treturn this.#body;\n\t}\n\n\t// Here just in case\n\tgetBodyDataContainer(): HTMLElement\n\t{\n\t\treturn this.#dataContainer;\n\t}\n\n\tinactivate(withAnimation: boolean = true): Tab\n\t{\n\t\tDom.removeClass(this.#body, 'ui-tabs__tab-active-animation');\n\t\tif (withAnimation !== false)\n\t\t{\n\t\t\tDom.addClass(this.#body, 'ui-tabs__tab-active-animation');\n\t\t}\n\n\t\tif (this.#active === true)\n\t\t{\n\t\t\tDom.removeClass(this.#head, '--header-active');\n\t\t\tDom.removeClass(this.#body, '--body-active');\n\n\t\t\tthis.#active = false;\n\t\t\tthis.emit('onInactive');\n\t\t}\n\t\treturn this;\n\t}\n\n\tactivate(withAnimation: boolean = true): Tab\n\t{\n\t\tDom.removeClass(this.#body, 'ui-tabs__tab-active-animation');\n\t\tif (withAnimation !== false)\n\t\t{\n\t\t\tDom.addClass(this.#body, 'ui-tabs__tab-active-animation');\n\t\t}\n\n\t\tif (this.#active !== true)\n\t\t{\n\t\t\tDom.addClass(this.#head, '--header-active');\n\t\t\tDom.addClass(this.#body, '--body-active');\n\n\t\t\tthis.#active = true;\n\t\t\tthis.emit('onActive');\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tisActive(): boolean\n\t{\n\t\treturn this.#active;\n\t}\n\n\tshowError({message, code})\n\t{\n\t\tconst errorContainer = this.getBody().querySelector('[data-bx-role=\"error-container\"]');\n\t\tif (errorContainer)\n\t\t{\n\t\t\terrorContainer.innerText = message || code;\n\t\t}\n\t\tDom.addClass(this.getBodyContainer(), 'ui-avatar-editor--error');\n\t}\n}\n","import { Tag, Dom, Event, Type, Runtime } from 'main.core';\nimport { OrderedArray } from 'main.core.collections';\nimport { TabsOptionsType, TabOptionsType } from './types';\nimport { EventEmitter } from 'main.core.events';\nimport { Tab } from './tab';\n\nconst justCounter = {\n\tlocalId: 0,\n};\n\nexport class Tabs extends EventEmitter\n{\n\t#index: number;\n\t#id: string;\n\t#items: OrderedArray<string, Tab>;\n\t#activeItem: ?Tab = null;\n\t#body: ?HTMLElement;\n\n\ttitle: string;\n\ttitleIconClasses: string;\n\n\tcontent: ?HTMLElement;\n\n\tconstructor(options: ?TabsOptionsType)\n\t{\n\t\tsuper();\n\n\t\toptions = Type.isObjectLike(options) ? options : {};\n\t\tthis.#index = (++justCounter.localId);\n\t\tthis.#id = Type.isStringFilled(options.id) ? options.id : ('TabsId' + this.#index);\n\t\tthis.setEventNamespace('UI:Tabs:' + options.id);\n\n\t\tthis.#items = new OrderedArray((tabA: Tab, tabB: Tab) => {\n\t\t\treturn tabA.getSort() > tabB.getSort() ? 1 : -1;\n\t\t});\n\n\t\tArray.from(options.items ?? []).forEach(\n\t\t\t(TabOptionsType: TabOptionsType) => this.addItem(new Tab(TabOptionsType))\n\t\t);\n\n\t\tthis.activateItemDebounced = Runtime.debounce(this.activateItemDebounced, 100, this);\n\n\t\tif (this.#items.count() > 0 && !(this.#activeItem instanceof Tab))\n\t\t{\n\t\t\tthis.activateItem(this.#items.getFirst());\n\t\t}\n\t}\n\n\tgetIndex(): string\n\t{\n\t\treturn this.#index;\n\t}\n\n\tgetId(): string\n\t{\n\t\treturn this.#id;\n\t}\n\n\taddItem(tab: Tab)\n\t{\n\t\tthis.#items.add(tab);\n\t\ttab.setParent(this);\n\t\tif (tab.isActive())\n\t\t{\n\t\t\tthis.activateItem(tab);\n\t\t}\n\t\ttab.subscribe('changeTab', () => {\n\t\t\tthis.activateItem(tab);\n\t\t});\n\t}\n\n\tactivateItem(tab: Tab, withAnimation: boolean = true)\n\t{\n\t\tif (this.#items.has(tab) && this.#activeItem !== tab)\n\t\t{\n\t\t\tlet inactiveTab = null;\n\t\t\tif (this.#activeItem instanceof Tab)\n\t\t\t{\n\t\t\t\tinactiveTab = this.#activeItem;\n\t\t\t}\n\t\t\tthis.#activeItem = tab;\n\t\t\tthis.activateItemDebounced(tab, inactiveTab, withAnimation);\n\t\t}\n\t}\n\n\tactivateItemDebounced(activeTab: Tab, inactiveTab: ?Tab = null, withAnimation: boolean = true)\n\t{\n\t\tif (inactiveTab)\n\t\t{\n\t\t\tinactiveTab.inactivate(withAnimation);\n\t\t}\n\n\t\tactiveTab.activate(withAnimation);\n\t}\n\n\tgetBodyContainer(): HTMLElement\n\t{\n\t\tif (!this.#body)\n\t\t{\n\t\t\tthis.#body = Tag.render`\n\t\t\t\t<div class=\"ui-tabs__tabs-body-container\" data-bx-role=\"bodies\"></div>\n\t\t\t`;\n\t\t}\n\n\t\treturn this.#body;\n\t}\n\n\tgetContainer(): HTMLElement\n\t{\n\t\tif (this.content)\n\t\t{\n\t\t\treturn this.content;\n\t\t}\n\n\t\tthis.content = Tag.render`\n\t\t\t<div class=\"ui-tabs__tabs-container\">\n\t\t\t\t<div class=\"ui-tabs__tabs-header-container\" data-bx-role=\"headers\"></div>\n\t\t\t\t${this.getBodyContainer()}\n\t\t\t</div>`;\n\n\t\tconst headers = this.content.querySelector('[data-bx-role=\"headers\"]');\n\n\t\tthis.#items.forEach(\n\t\t\t\t(tab: Tab) => {\n\t\t\t\t\tDom.append(tab.getHeader(), headers);\n\t\t\t\t\tDom.append(tab.getBody(), this.getBodyContainer());\n\t\t\t\t}\n\t\t\t)\n\t\t;\n\n\t\treturn this.content;\n\t}\n\n\tgetItems(): Array<Tab>\n\t{\n\t\treturn this.#items;\n\t}\n}\n"],"names":["justCounter","localId","localSorting","Tab","options","parentElement","setEventNamespace","setParent","Type","isStringFilled","id","isInteger","sort","isBoolean","active","restricted","bannerCode","helpDeskCode","head","body","Tabs","event","getBannerCode","BX","UI","InfoHelper","show","stopPropagation","preventDefault","withAnimation","Dom","removeClass","addClass","emit","message","code","errorContainer","getBody","querySelector","innerText","getBodyContainer","EventEmitter","headOptions","isPlainObject","title","innerHeader","isDomNode","Tag","render","Text","encode","description","Event","bind","showBanner","className","dataset","role","appendChild","subscribe","resultBody","isFunction","promiseBody","Object","prototype","toString","call","Promise","resolve","then","result","isString","innerHTML","Error","reason","console","log","Loader","target","color","mode","destroy","_classPrivateFieldInitSpec","isObjectLike","OrderedArray","tabA","tabB","getSort","Array","from","items","forEach","TabOptionsType","addItem","activateItemDebounced","Runtime","debounce","count","activateItem","getFirst","tab","add","isActive","has","inactiveTab","activeTab","inactivate","activate","content","headers","append","getHeader"],"mappings":";;;;;;;;;;AAAA,CAMA,IAAMA,WAAW,GAAG;GACnBC,OAAO,EAAE,CAAC;GACVC,YAAY,EAAE;CACf,CAAC;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEF,KAAaC,GAAG;GAAA;GAgBf,aAAYC,QAAuB,EACnC;KAAA;KAAA,IADqCC,aAAoB,uEAAG,IAAI;KAAA;KAE/D,iGAAM,EAAE;KAAE;KAAA;KAAA;KAAA;KAAA;KAAA;OAAA;OAAA;;KAAA;OAAA;OAAA;;KAAA;OAAA;OAAA,OAbK;;KAAC;OAAA;OAAA;;KAAA;OAAA;OAAA;;KAAA;OAAA;OAAA;;KAAA;OAAA;OAAA,OAIE;;KAAK;OAAA;OAAA,OACD;;KAAI;OAAA;OAAA,OACJ;;KAAI;OAAA;OAAA,OACF;;KAAI;OAAA;OAAA,OAEV;;KAMlB,MAAKC,iBAAiB,CAAC,UAAU,CAAC;KAClC,MAA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