Your IP : 3.142.171.112


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

{"version":3,"file":"ui.switcher.bundle.js","sources":["../src/ui.switcher.js"],"sourcesContent":["import {Type, Tag, Loc, Dom, bind, onCustomEvent} from 'main.core';\nimport 'ui.design-tokens';\n\nimport './css/style.css';\n\nexport const SwitcherSize = Object.freeze({\n\tmedium: 'medium',\n\tsmall: 'small',\n\textraSmall: 'extra-small',\n});\n\nexport const SwitcherColor = Object.freeze({\n\tprimary: 'primary',\n\tgreen: 'green',\n});\n\nexport type SwitcherOptions = {\n\tattributeName: string;\n\tnode: HTMLElement;\n\tid: string;\n\tchecked: boolean;\n\tinputName: string;\n\thandlers: Object;\n\tsize: string;\n\tcolor: string;\n\tdisabled: boolean;\n}\n\nexport class Switcher {\n\t#classNameSize = {\n\t\t[SwitcherSize.extraSmall]: 'ui-switcher-size-xs',\n\t\t[SwitcherSize.small]: 'ui-switcher-size-sm',\n\t\t[SwitcherSize.medium]: '',\n\t}\n\t#classNameColor = {\n\t\t[SwitcherColor.primary]: '',\n\t\t[SwitcherColor.green]: 'ui-switcher-color-green',\n\t}\n\n\tnode: HTMLElement | null = null;\n\tchecked: boolean = false;\n\tid: string = '';\n\t#disabled: boolean = false;\n\t#inputName: string = '';\n\t#loading: boolean;\n\tevents: Object;\n\t#classNameOff: string = 'ui-switcher-off';\n\t#classNameLock: string = 'ui-switcher-lock';\n\t#attributeName: string = 'data-switcher';\n\n\tstatic #attributeInitName: string = 'data-switcher-init';\n\tstatic list = [];\n\tstatic className = 'ui-switcher';\n\n\t/**\n\t * Switcher.\n\t *\n\t * @param {object} [options] - Options.\n\t * @param {string} [options.attributeName] - Name of switcher attribute.\n\t * @param {Element} [options.node] - Node.\n\t * @param {string} [options.id] - ID.\n\t * @param {123} [options.checked] - Checked.\n\t * @param {string} [options.inputName] - Input name.\n\t * @constructor\n\t */\n\tconstructor(options: SwitcherOptions)\n\t{\n\t\tthis.init(options);\n\t\tSwitcher.list.push(this);\n\t}\n\n\tstatic getById(id: string | number): Switcher | null\n\t{\n\t\treturn Switcher.list.find((item) => item.id === id) || null;\n\t}\n\n\tstatic initByClassName(): void\n\t{\n\t\tconst nodes = document.getElementsByClassName(Switcher.className);\n\t\tArray.from(nodes).forEach(function (node) {\n\t\t\tif (node.getAttribute(Switcher.#attributeInitName))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnew Switcher({node: node});\n\t\t});\n\t}\n\n\tstatic getList(): Switcher[]\n\t{\n\t\treturn Switcher.list;\n\t}\n\n\tinit(options: SwitcherOptions = {}): void\n\t{\n\t\tthis.#attributeName = Type.isString(options.attributeName) ? options.attributeName : this.#attributeName;\n\t\tthis.handlers = Type.isPlainObject(options.handlers) ? options.handlers : {};\n\t\tthis.#inputName = Type.isString(options.inputName) ? options.inputName : '';\n\t\tthis.#loading = false;\n\t\tthis.events = {\n\t\t\ttoggled: 'toggled',\n\t\t\tchecked: 'checked',\n\t\t\tunchecked: 'unchecked',\n\t\t\tlock: 'lock',\n\t\t\tunlock: 'unlock',\n\t\t};\n\n\t\tif (options.node)\n\t\t{\n\t\t\tif (!Type.isDomNode(options.node))\n\t\t\t{\n\t\t\t\tthrow new Error('Parameter `node` DOM Node expected.');\n\t\t\t}\n\n\t\t\tthis.node = options.node;\n\t\t\tlet data = this.node.getAttribute(this.#attributeName);\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdata = JSON.parse(data) || {};\n\t\t\t}\n\t\t\tcatch (e)\n\t\t\t{\n\t\t\t\tdata = {};\n\t\t\t}\n\n\t\t\tif (data.id)\n\t\t\t{\n\t\t\t\tthis.id = data.id;\n\t\t\t}\n\n\t\t\tthis.checked = Boolean(data.checked);\n\t\t\tthis.#inputName = data.inputName;\n\t\t\tif(Type.isString(data.color) && Object.values(SwitcherColor).includes(data.color))\n\t\t\t{\n\t\t\t\toptions.color = data.color;\n\t\t\t}\n\t\t\tif(Type.isString(data.size) && Object.values(SwitcherSize).includes(data.size))\n\t\t\t{\n\t\t\t\toptions.size = data.size;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.node = document.createElement('span');\n\t\t}\n\n\t\tif (this.#classNameSize[options.size])\n\t\t{\n\t\t\tDom.addClass(this.node, this.#classNameSize[options.size]);\n\t\t}\n\t\tif (this.#classNameColor[options.color])\n\t\t{\n\t\t\tDom.addClass(this.node, this.#classNameColor[options.color]);\n\t\t}\n\n\t\tif (Type.isString(options.id) || Type.isNumber(options.id))\n\t\t{\n\t\t\tthis.id = options.id;\n\t\t}\n\t\telse if (!this.id)\n\t\t{\n\t\t\tthis.id = Math.random();\n\t\t}\n\n\t\tif (Type.isString(options.inputName))\n\t\t{\n\t\t\tthis.#inputName = options.inputName;\n\t\t}\n\t\tthis.checked = Type.isBoolean(options.checked) ? options.checked : this.checked;\n\t\tthis.#disabled = Type.isBoolean(options.disabled) ? options.disabled : this.#disabled;\n\n\t\tthis.#initNode();\n\t\tthis.check(this.checked, false);\n\t\tthis.disable(this.#disabled, false);\n\t}\n\n\t#initNode(): void\n\t{\n\t\tif (this.node.getAttribute(Switcher.#attributeInitName))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tthis.node.setAttribute(Switcher.#attributeInitName, 'y');\n\n\t\tDom.addClass(this.node, Switcher.className);\n\t\tthis.node.innerHTML =\n\t\t\t'<span class=\"ui-switcher-cursor\"></span>\\n' +\n\t\t\t'<span class=\"ui-switcher-enabled\">' + Loc.getMessage('UI_SWITCHER_ON') + '</span>\\n' +\n\t\t\t'<span class=\"ui-switcher-disabled\">' + Loc.getMessage('UI_SWITCHER_OFF') + '</span>\\n';\n\n\t\tif (this.#inputName)\n\t\t{\n\t\t\tthis.inputNode = Tag.render`\n\t\t\t\t<input type=\"hidden\" name=\"${this.#inputName}\" />\n\t\t\t`;\n\n\t\t\tDom.append(this.inputNode, this.node);\n\t\t}\n\n\t\tbind(this.node, 'click', this.toggle.bind(this));\n\t}\n\n\tdisable(disabled: boolean, fireEvents: boolean): void\n\t{\n\t\tif (this.isLoading())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#disabled = disabled;\n\n\t\tfireEvents = fireEvents !== false;\n\n\t\tif (disabled)\n\t\t{\n\t\t\tDom.addClass(this.node, this.#classNameLock);\n\t\t\tfireEvents ? this.#fireEvent(this.events.lock) : null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.removeClass(this.node, this.#classNameLock);\n\t\t\tfireEvents ? this.#fireEvent(this.events.unlock) : null;\n\t\t}\n\t}\n\n\tcheck(checked: boolean, fireEvents: boolean): void\n\t{\n\t\tif (this.isLoading())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.checked = !!checked;\n\t\tif (this.inputNode)\n\t\t{\n\t\t\tthis.inputNode.value = this.checked ? 'Y' : 'N';\n\t\t}\n\n\t\tfireEvents = fireEvents !== false;\n\n\t\tif (this.checked)\n\t\t{\n\t\t\tDom.removeClass(this.node, this.#classNameOff);\n\t\t\tfireEvents ? this.#fireEvent(this.events.unchecked) : null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.addClass(this.node, this.#classNameOff);\n\t\t\tfireEvents ? this.#fireEvent(this.events.checked) : null;\n\t\t}\n\n\t\tif (fireEvents)\n\t\t{\n\t\t\tthis.#fireEvent(this.events.toggled)\n\t\t}\n\t}\n\n\tisDisabled()\n\t{\n\t\treturn this.#disabled;\n\t}\n\n\tisChecked(): boolean\n\t{\n\t\treturn this.checked;\n\t}\n\n\ttoggle(): void\n\t{\n\t\tif (this.isDisabled())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.check(!this.isChecked());\n\t}\n\n\tsetLoading(mode: boolean): void\n\t{\n\t\tthis.#loading = Boolean(mode);\n\n\t\tconst cursor = this.getNode().querySelector('.ui-switcher-cursor');\n\n\t\tif (this.#loading)\n\t\t{\n\t\t\tconst svg = Tag.render`\n\t\t\t\t<svg viewBox=\"25 25 50 50\">\n\t\t\t\t\t<circle\n\t\t\t\t\t\tclass=\"ui-sidepanel-wrapper-loader-path\"\n\t\t\t\t\t\tcx=\"50\"\n\t\t\t\t\t\tcy=\"50\"\n\t\t\t\t\t\tr=\"19\"\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke-width=\"5\"\n\t\t\t\t\t\tstroke-miterlimit=\"10\"\n\t\t\t\t\t>\n\t\t\t\t\t</circle>\n\t\t\t\t</svg>\n\t\t\t`\n\t\t\tDom.append(svg, cursor);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcursor.innerHTML = '';\n\t\t}\n\t}\n\n\tisLoading(): boolean\n\t{\n\t\treturn this.#loading;\n\t}\n\n\t#fireEvent(eventName: string): void\n\t{\n\t\tonCustomEvent(this, eventName);\n\t\tif (this.handlers[eventName])\n\t\t{\n\t\t\tthis.handlers[eventName].call(this);\n\t\t}\n\t}\n\n\trenderTo(targetNode: HTMLElement): HTMLElement\n\t{\n\t\tif (!Type.isDomNode(targetNode))\n\t\t{\n\t\t\tthrow new Error('Target node must be HTMLElement');\n\t\t}\n\n\t\treturn Dom.append(this.getNode(), targetNode);\n\t}\n\n\tgetNode(): HTMLElement\n\t{\n\t\treturn this.node;\n\t}\n\n\tgetAttributeName(): string\n\t{\n\t\treturn this.#attributeName;\n\t}\n\n\tgetInputName(): string\n\t{\n\t\treturn this.#inputName;\n\t}\n}\n"],"names":["SwitcherSize","Object","freeze","medium","small","extraSmall","SwitcherColor","primary","green","Switcher","constructor","options","node","checked","id","init","list","push","getById","find","item","initByClassName","nodes","document","getElementsByClassName","className","Array","from","forEach","getAttribute","getList","Type","isString","attributeName","handlers","isPlainObject","inputName","events","toggled","unchecked","lock","unlock","isDomNode","Error","data","JSON","parse","e","Boolean","color","values","includes","size","createElement","Dom","addClass","isNumber","Math","random","isBoolean","disabled","check","disable","fireEvents","isLoading","removeClass","inputNode","value","isDisabled","isChecked","toggle","setLoading","mode","cursor","getNode","querySelector","svg","Tag","render","append","innerHTML","renderTo","targetNode","getAttributeName","getInputName","setAttribute","Loc","getMessage","bind","eventName","onCustomEvent","call"],"mappings":";;;;;;;;AAAA,OAKaA,YAAY,GAAGC,MAAM,CAACC,MAAM,CAAC;GACzCC,MAAM,EAAE,QAAQ;GAChBC,KAAK,EAAE,OAAO;GACdC,UAAU,EAAE;CACb,CAAC,CAAC;AAEF,OAAaC,aAAa,GAAGL,MAAM,CAACC,MAAM,CAAC;GAC1CK,OAAO,EAAE,SAAS;GAClBC,KAAK,EAAE;CACR,CAAC,CAAC;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAcH,CAAO,MAAMC,QAAQ,CAAC;;CA2BtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACCC,WAAW,CAACC,OAAwB,EACpC;KAAA;OAAA;;KAAA;OAAA;;KAAA;OAAA;OAAA,OArCiB;SAChB,CAACX,YAAY,CAACK,UAAU,GAAG,qBAAqB;SAChD,CAACL,YAAY,CAACI,KAAK,GAAG,qBAAqB;SAC3C,CAACJ,YAAY,CAACG,MAAM,GAAG;;;KACvB;OAAA;OAAA,OACiB;SACjB,CAACG,aAAa,CAACC,OAAO,GAAG,EAAE;SAC3B,CAACD,aAAa,CAACE,KAAK,GAAG;;;KACvB,KAEDI,IAAI,GAAuB,IAAI;KAAA,KAC/BC,OAAO,GAAY,KAAK;KAAA,KACxBC,EAAE,GAAW,EAAE;KAAA;OAAA;OAAA,OACM;;KAAK;OAAA;OAAA,OACL;;KAAE;OAAA;OAAA;;KAAA;OAAA;OAAA,OAGC;;KAAiB;OAAA;OAAA,OAChB;;KAAkB;OAAA;OAAA,OAClB;;KAmBxB,IAAI,CAACC,IAAI,CAACJ,OAAO,CAAC;KAClBF,QAAQ,CAACO,IAAI,CAACC,IAAI,CAAC,IAAI,CAAC;;GAGzB,OAAOC,O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