Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/ui/buttons/dist/ |
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/ui/buttons/dist/ui.buttons.bundle.js.map |
{"version":3,"file":"ui.buttons.bundle.js","sources":["../src/button/button-tag.js","../src/base-button.js","../src/button/button-color.js","../src/button/button-size.js","../src/button/button-icon.js","../src/button/button-state.js","../src/button/button-style.js","../src/button/button.js","../src/split-button/split-button-state.js","../src/split-button/split-sub-button-type.js","../src/split-button/split-sub-button.js","../src/split-button/split-button.js","../src/button-manager.js","../src/ibutton.js","../src/button/presets/add-button.js","../src/button/presets/apply-button.js","../src/button/presets/cancel-button.js","../src/button/presets/close-button.js","../src/button/presets/create-button.js","../src/button/presets/save-button.js","../src/button/presets/send-button.js","../src/button/presets/settings-button.js","../src/split-button/presets/add-split-button.js","../src/split-button/presets/apply-split-button.js","../src/split-button/presets/cancel-split-button.js","../src/split-button/presets/close-split-button.js","../src/split-button/presets/create-split-button.js","../src/split-button/presets/save-split-button.js","../src/split-button/presets/send-split-button.js"],"sourcesContent":["/**\n * @namespace {BX.UI}\n */\nexport default class ButtonTag\n{\n\tstatic BUTTON = 0;\n\tstatic LINK = 1;\n\tstatic SUBMIT = 2;\n\tstatic INPUT = 3;\n\tstatic DIV = 4;\n\tstatic SPAN = 5;\n}","import type IButton from './ibutton';\nimport ButtonTag from './button/button-tag';\nimport { Type, Tag, Dom, Event } from 'main.core';\nimport { type BaseButtonOptions } from './base-button-options';\nimport './ui.buttons.css';\n\nexport default class BaseButton implements IButton\n{\n\tconstructor(options: BaseButtonOptions)\n\t{\n\t\toptions = Type.isPlainObject(options) ? options : {};\n\t\tthis.options = Object.assign(this.getDefaultOptions(), options);\n\n\t\t/**\n\t\t * 'buttonNode', 'textNode' and counterNode options use only in ButtonManager.createFromNode\n\t\t */\n\t\tthis.button = Type.isDomNode(this.options.buttonNode) ? this.options.buttonNode : null;\n\t\tthis.textNode = Type.isDomNode(this.options.textNode) ? this.options.textNode : null;\n\t\tthis.counterNode = Type.isDomNode(this.options.counterNode) ? this.options.counterNode : null;\n\n\t\tthis.text = '';\n\t\tthis.counter = null;\n\t\tthis.events = {};\n\t\tthis.link = '';\n\t\tthis.maxWidth = null;\n\n\t\tthis.tag = this.isEnumValue(this.options.tag, ButtonTag) ? this.options.tag : ButtonTag.BUTTON;\n\t\tif (Type.isStringFilled(this.options.link))\n\t\t{\n\t\t\tthis.tag = ButtonTag.LINK;\n\t\t}\n\n\t\tthis.baseClass = Type.isStringFilled(this.options.baseClass) ? this.options.baseClass : '';\n\t\tthis.disabled = false;\n\n\t\tthis.handleEvent = this.handleEvent.bind(this);\n\n\t\tthis.init(); // needs to initialize private properties in derived classes.\n\n\t\tif (this.options.disabled === true)\n\t\t{\n\t\t\tthis.setDisabled();\n\t\t}\n\n\t\tthis.setText(this.options.text);\n\t\tthis.setCounter(this.options.counter);\n\t\tthis.setProps(this.options.props);\n\t\tthis.setDataSet(this.options.dataset);\n\t\tthis.addClass(this.options.className);\n\t\tthis.setLink(this.options.link);\n\t\tthis.setMaxWidth(this.options.maxWidth);\n\n\t\tthis.bindEvent('click', this.options.onclick);\n\t\tthis.bindEvents(this.options.events);\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tinit(): void\n\t{\n\t\t// needs to initialize private properties in derived classes.\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tgetDefaultOptions(): Object\n\t{\n\t\treturn {};\n\t}\n\n\t/**\n\t * @public\n\t * @return {HTMLElement}\n\t */\n\trender(): HTMLElement\n\t{\n\t\treturn this.getContainer();\n\t}\n\n\t/**\n\t * @public\n\t * @param {HTMLElement} node\n\t * @return {?HTMLElement}\n\t */\n\trenderTo(node: HTMLElement): HTMLElement | null\n\t{\n\t\tif (Type.isDomNode(node))\n\t\t{\n\t\t\treturn node.appendChild(this.getContainer());\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * @public\n\t * @return {HTMLElement}\n\t */\n\tgetContainer(): HTMLElement\n\t{\n\t\tif (this.button !== null)\n\t\t{\n\t\t\treturn this.button;\n\t\t}\n\n\t\tswitch (this.getTag())\n\t\t{\n\t\t\tcase ButtonTag.BUTTON:\n\t\t\tdefault:\n\t\t\t\tthis.button = Tag.render`<button class=\"${this.getBaseClass()}\"></button>`;\n\t\t\t\tbreak;\n\t\t\tcase ButtonTag.INPUT:\n\t\t\t\tthis.button = Tag.render`<input class=\"${this.getBaseClass()}\" type=\"button\">`;\n\t\t\t\tbreak;\n\t\t\tcase ButtonTag.LINK:\n\t\t\t\tthis.button = Tag.render`<a class=\"${this.getBaseClass()}\" href=\"\"></a>`;\n\t\t\t\tbreak;\n\t\t\tcase ButtonTag.SUBMIT:\n\t\t\t\tthis.button = Tag.render`<input class=\"${this.getBaseClass()}\" type=\"submit\">`;\n\t\t\t\tbreak;\n\t\t\tcase ButtonTag.DIV:\n\t\t\t\tthis.button = Tag.render`<div class=\"${this.getBaseClass()}\"></div>`;\n\t\t\t\tbreak;\n\t\t\tcase ButtonTag.SPAN:\n\t\t\t\tthis.button = Tag.render`<span class=\"${this.getBaseClass()}\"></span>`;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn this.button;\n\t}\n\n\t/**\n\t * @protected\n\t * @return {string}\n\t */\n\tgetBaseClass(): string\n\t{\n\t\treturn this.baseClass;\n\t}\n\n\t/**\n\t * @public\n\t * @param {string} text\n\t * @return {this}\n\t */\n\tsetText(text: string): this\n\t{\n\t\tif (Type.isString(text))\n\t\t{\n\t\t\tthis.text = text;\n\n\t\t\tif (this.isInputType())\n\t\t\t{\n\t\t\t\tthis.getContainer().value = text;\n\t\t\t}\n\t\t\telse if (text.length > 0)\n\t\t\t{\n\t\t\t\tif (this.textNode === null)\n\t\t\t\t{\n\t\t\t\t\tthis.textNode = Tag.render`<span class=\"ui-btn-text\"></span>`;\n\t\t\t\t}\n\n\t\t\t\tif (!this.textNode.parentNode)\n\t\t\t\t{\n\t\t\t\t\tDom.prepend(this.textNode, this.getContainer());\n\t\t\t\t}\n\n\t\t\t\tthis.textNode.textContent = text;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (this.textNode !== null)\n\t\t\t\t{\n\t\t\t\t\tDom.remove(this.textNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {string}\n\t */\n\tgetText(): string\n\t{\n\t\treturn this.text;\n\t}\n\n\t/**\n\t *\n\t * @param {number | string} counter\n\t * @return {this}\n\t */\n\tsetCounter(counter: number | string): this\n\t{\n\t\tif ([0, '0', '', null, false].includes(counter))\n\t\t{\n\t\t\tif (this.counterNode !== null)\n\t\t\t{\n\t\t\t\tDom.remove(this.counterNode);\n\t\t\t\tthis.counterNode = null;\n\t\t\t}\n\n\t\t\tthis.counter = null;\n\t\t}\n\t\telse if ((Type.isNumber(counter) && counter > 0) || Type.isStringFilled(counter))\n\t\t{\n\t\t\tif (this.isInputType())\n\t\t\t{\n\t\t\t\tthrow new Error('BX.UI.Button: an input button cannot have a counter.');\n\t\t\t}\n\n\t\t\tif (this.counterNode === null)\n\t\t\t{\n\t\t\t\tthis.counterNode = Tag.render`<span class=\"ui-btn-counter\"></span>`;\n\t\t\t\tDom.append(this.counterNode, this.getContainer());\n\t\t\t}\n\n\t\t\tthis.counter = counter;\n\t\t\tthis.counterNode.textContent = counter;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t *\n\t * @return {number | string | null}\n\t */\n\tgetCounter(): number | string | null\n\t{\n\t\treturn this.counter;\n\t}\n\n\t/**\n\t *\n\t * @param {string} link\n\t * @return {this}\n\t */\n\tsetLink(link: string): this\n\t{\n\t\tif (Type.isString(link))\n\t\t{\n\t\t\tif (this.getTag() !== ButtonTag.LINK)\n\t\t\t{\n\t\t\t\tthrow new Error('BX.UI.Button: only an anchor button tag supports a link.');\n\t\t\t}\n\n\t\t\tthis.getContainer().href = link;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t *\n\t * @return {string}\n\t */\n\tgetLink(): string\n\t{\n\t\treturn this.getContainer().href;\n\t}\n\n\tsetMaxWidth(maxWidth: number): this\n\t{\n\t\tif (Type.isNumber(maxWidth) && maxWidth > 0)\n\t\t{\n\t\t\tthis.maxWidth = maxWidth;\n\t\t\tthis.getContainer().style.maxWidth = `${maxWidth}px`;\n\t\t}\n\t\telse if (maxWidth === null)\n\t\t{\n\t\t\tthis.getContainer().style.removeProperty('max-width');\n\t\t\tthis.maxWidth = null;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tgetMaxWidth(): number | null\n\t{\n\t\treturn this.maxWidth;\n\t}\n\n\t/**\n\t * @public\n\t * @return {ButtonTag}\n\t */\n\tgetTag(): ButtonTag\n\t{\n\t\treturn this.tag;\n\t}\n\n\t/**\n\t * @public\n\t * @param {object.<string, string>} props\n\t * @return {this}\n\t */\n\tsetProps(props: { [propertyName: string]: string }): this\n\t{\n\t\tif (!Type.isPlainObject(props))\n\t\t{\n\t\t\treturn this;\n\t\t}\n\n\t\tfor (let propName in props)\n\t\t{\n\t\t\tconst propValue = props[propName];\n\t\t\tDom.attr(this.getContainer(), propName, propValue);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {object.<string, string>}\n\t */\n\tgetProps(): { [propertyName: string]: string }\n\t{\n\t\tconst attrs = this.getContainer().attributes;\n\t\tconst result = {};\n\t\tconst reserved = this.isInputType() ? ['class', 'type'] : ['class'];\n\n\t\tfor (let i = 0; i < attrs.length; i++)\n\t\t{\n\t\t\tconst { name, value } = attrs[i];\n\t\t\tif (reserved.includes(name) || name.startsWith('data-'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tresult[name] = value;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * @public\n\t * @param {object.<string, string>} props\n\t * @return {this}\n\t */\n\tsetDataSet(props: { [propertyName: string]: string }): this\n\t{\n\t\tif (!Type.isPlainObject(props))\n\t\t{\n\t\t\treturn this;\n\t\t}\n\n\t\tfor (let propName in props)\n\t\t{\n\t\t\tconst propValue = props[propName];\n\t\t\tif (propValue === null)\n\t\t\t{\n\t\t\t\tdelete this.getDataSet()[propName];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.getDataSet()[propName] = propValue;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {DOMStringMap}\n\t */\n\tgetDataSet(): DOMStringMap\n\t{\n\t\treturn this.getContainer().dataset;\n\t}\n\n\t/**\n\t * @public\n\t * @param {string} className\n\t * @return {this}\n\t */\n\taddClass(className: string): this\n\t{\n\t\tif (Type.isStringFilled(className))\n\t\t{\n\t\t\tDom.addClass(this.getContainer(), className);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @param {string} className\n\t * @return {this}\n\t */\n\tremoveClass(className: string): this\n\t{\n\t\tif (Type.isStringFilled(className))\n\t\t{\n\t\t\tDom.removeClass(this.getContainer(), className);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetDisabled(flag?: boolean): this\n\t{\n\t\tif (flag === false)\n\t\t{\n\t\t\tthis.disabled = false;\n\t\t\tthis.setProps({ disabled: null });\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.disabled = true;\n\t\t\tthis.setProps({ disabled: true });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t *\n\t * @return {boolean}\n\t */\n\tisDisabled(): boolean\n\t{\n\t\treturn this.disabled;\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisInputType(): boolean\n\t{\n\t\treturn this.getTag() === ButtonTag.SUBMIT || this.getTag() === ButtonTag.INPUT;\n\t}\n\n\t/**\n\t * @public\n\t * @param {object.<string, function>} events\n\t * @return {this}\n\t */\n\tbindEvents(events: { [event: string]: (button: this, event: MouseEvent) => {} }): this\n\t{\n\t\tif (Type.isPlainObject(events))\n\t\t{\n\t\t\tfor (let eventName in events)\n\t\t\t{\n\t\t\t\tconst fn = events[eventName];\n\t\t\t\tthis.bindEvent(eventName, fn);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @param {string[]} events\n\t * @return {this}\n\t */\n\tunbindEvents(events: string[]): this\n\t{\n\t\tif (Type.isArray(events))\n\t\t{\n\t\t\tevents.forEach(eventName => {\n\t\t\t\tthis.unbindEvent(eventName);\n\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @param {string} eventName\n\t * @param {function} fn\n\t * @return {this}\n\t */\n\tbindEvent(eventName: string, fn: (button: this, event: MouseEvent) => {}): this\n\t{\n\t\tif (Type.isStringFilled(eventName) && Type.isFunction(fn))\n\t\t{\n\t\t\tthis.unbindEvent(eventName);\n\t\t\tthis.events[eventName] = fn;\n\t\t\tEvent.bind(this.getContainer(), eventName, this.handleEvent);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @param {string} eventName\n\t * @return {this}\n\t */\n\tunbindEvent(eventName: string): this\n\t{\n\t\tif (this.events[eventName])\n\t\t{\n\t\t\tdelete this.events[eventName];\n\t\t\tEvent.unbind(this.getContainer(), eventName, this.handleEvent);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @private\n\t * @param {MouseEvent} event\n\t */\n\thandleEvent(event)\n\t{\n\t\tconst eventName = event.type;\n\t\tif (this.events[eventName])\n\t\t{\n\t\t\tconst fn = this.events[eventName];\n\t\t\tfn.call(this, this, event);\n\t\t}\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tisEnumValue(value, enumeration): boolean\n\t{\n\t\tfor (let code in enumeration)\n\t\t{\n\t\t\tif (enumeration[code] === value)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n}","/**\n * @namespace {BX.UI}\n */\nexport default class ButtonColor\n{\n\tstatic DANGER = 'ui-btn-danger';\n\tstatic DANGER_DARK = 'ui-btn-danger-dark';\n\tstatic DANGER_LIGHT = 'ui-btn-danger-light';\n\tstatic SUCCESS = 'ui-btn-success';\n\tstatic SUCCESS_DARK = 'ui-btn-success-dark';\n\tstatic SUCCESS_LIGHT = 'ui-btn-success-light';\n\tstatic PRIMARY_DARK = 'ui-btn-primary-dark';\n\tstatic PRIMARY = 'ui-btn-primary';\n\tstatic SECONDARY = 'ui-btn-secondary';\n\tstatic SECONDARY_LIGHT = 'ui-btn-secondary-light';\n\tstatic WARNING_LIGHT = 'ui-btn-warning-light';\n\tstatic LINK = 'ui-btn-link';\n\tstatic LIGHT = 'ui-btn-light';\n\tstatic LIGHT_BORDER = 'ui-btn-light-border';\n\tstatic AI = 'ui-btn-color-ai';\n\tstatic BASE_LIGHT = 'ui-btn-base-light';\n}\n","/**\n * @namespace {BX.UI}\n */\nexport default class ButtonSize\n{\n\tstatic LARGE = 'ui-btn-lg';\n\tstatic MEDIUM = 'ui-btn-md';\n\tstatic SMALL = 'ui-btn-sm';\n\tstatic EXTRA_SMALL = 'ui-btn-xs';\n}","/**\n * @namespace {BX.UI}\n */\nexport default class ButtonIcon\n{\n\tstatic UNFOLLOW = 'ui-btn-icon-unfollow';\n\tstatic FOLLOW = 'ui-btn-icon-follow';\n\tstatic ADD = 'ui-btn-icon-add';\n\tstatic STOP = 'ui-btn-icon-stop';\n\tstatic START = 'ui-btn-icon-start';\n\tstatic PAUSE = 'ui-btn-icon-pause';\n\tstatic ADD_FOLDER = 'ui-btn-icon-add-folder';\n\tstatic SETTING = 'ui-btn-icon-setting';\n\tstatic TASK = 'ui-btn-icon-task';\n\tstatic INFO = 'ui-btn-icon-info';\n\tstatic SEARCH = 'ui-btn-icon-search';\n\tstatic PRINT = 'ui-btn-icon-print';\n\tstatic LIST = 'ui-btn-icon-list';\n\tstatic BUSINESS = 'ui-btn-icon-business';\n\tstatic BUSINESS_CONFIRM = 'ui-btn-icon-business-confirm';\n\tstatic BUSINESS_WARNING = 'ui-btn-icon-business-warning';\n\tstatic CAMERA = 'ui-btn-icon-camera';\n\tstatic PHONE_UP = 'ui-btn-icon-phone-up';\n\tstatic PHONE_DOWN = 'ui-btn-icon-phone-down';\n\tstatic PHONE_CALL = 'ui-btn-icon-phone-call';\n\tstatic BACK = 'ui-btn-icon-back';\n\tstatic REMOVE = 'ui-btn-icon-remove';\n\tstatic DOWNLOAD = 'ui-btn-icon-download';\n\tstatic DOTS = 'ui-btn-icon-ui-btn-icon-dots';\n\tstatic DONE = 'ui-btn-icon-done';\n\tstatic CANCEL = 'ui-btn-icon-cancel';\n\tstatic DISK = 'ui-btn-icon-disk';\n\tstatic LOCK = 'ui-btn-icon-lock';\n\tstatic MAIL = 'ui-btn-icon-mail';\n\tstatic CHAT = 'ui-btn-icon-chat';\n\tstatic PAGE = 'ui-btn-icon-page';\n\tstatic CLOUD = 'ui-btn-icon-cloud';\n\tstatic EDIT = 'ui-btn-icon-edit';\n\tstatic SHARE = 'ui-btn-icon-share';\n\tstatic ANGLE_UP = 'ui-btn-icon-angle-up';\n\tstatic ANGLE_DOWN = 'ui-btn-icon-angle-down';\n\tstatic EYE_OPENED = 'ui-btn-icon-eye-opened';\n\tstatic EYE_CLOSED = 'ui-btn-icon-eye-closed';\n\tstatic ALERT = 'ui-btn-icon-alert';\n\tstatic FAIL = 'ui-btn-icon-fail';\n\tstatic SUCCESS = 'ui-btn-icon-success';\n\tstatic PLAN = 'ui-btn-icon-plan';\n\tstatic TARIFF = 'ui-btn-icon-tariff';\n\tstatic BATTERY = 'ui-btn-icon-battery';\n\tstatic NO_BATTERY = 'ui-btn-icon-no-battery';\n\tstatic HALF_BATTERY = 'ui-btn-icon-half-battery';\n\tstatic LOW_BATTERY = 'ui-btn-icon-low-battery';\n\tstatic CRIT_BATTERY = 'ui-btn-icon-crit-battery';\n\tstatic DEMO = 'ui-btn-icon-demo';\n\tstatic ROBOTS = 'ui-btn-icon-robots';\n\tstatic NOTE = 'ui-btn-icon-note';\n\tstatic SCRIPT = 'ui-btn-icon-script';\n\tstatic PRINT2 = 'ui-btn-icon-print-2';\n\tstatic FUNNEL = 'ui-btn-icon-funnel';\n\tstatic FORWARD = 'ui-btn-icon-forward';\n\tstatic COPY = 'ui-btn-icon-copy';\n\tstatic AI = 'ui-btn-icon-ai ui-icon-set__scope';\n}\n","/**\n * @namespace {BX.UI}\n */\nexport default class ButtonState\n{\n\tstatic HOVER = 'ui-btn-hover';\n\tstatic ACTIVE = 'ui-btn-active';\n\tstatic DISABLED = 'ui-btn-disabled';\n\tstatic CLOCKING = 'ui-btn-clock';\n\tstatic WAITING = 'ui-btn-wait';\n\tstatic AI_WAITING = 'ui-btn-ai-waiting';\n}","/**\n * @namespace {BX.UI}\n */\nexport default class ButtonStyle\n{\n\tstatic NO_CAPS = 'ui-btn-no-caps';\n\tstatic ROUND = 'ui-btn-round';\n\tstatic DROPDOWN = 'ui-btn-dropdown';\n\tstatic COLLAPSED = 'ui-btn-collapsed';\n\tstatic DEPEND_ON_THEME = 'ui-btn-themes';\n}","import BaseButton from '../base-button';\nimport { Menu } from 'main.popup';\nimport { Type, Dom, Text, Event } from 'main.core';\nimport ButtonColor from './button-color';\nimport ButtonSize from './button-size';\nimport ButtonIcon from './button-icon';\nimport ButtonState from './button-state';\nimport ButtonStyle from './button-style';\nimport ButtonTag from './button-tag';\nimport { ButtonOptions } from './button-options';\nimport { type MenuOptions } from 'main.popup';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class Button extends BaseButton\n{\n\tstatic BASE_CLASS = 'ui-btn';\n\n\tconstructor(options: ButtonOptions)\n\t{\n\t\toptions = Type.isPlainObject(options) ? options : {};\n\t\toptions.baseClass = Type.isStringFilled(options.baseClass) ? options.baseClass : Button.BASE_CLASS;\n\n\t\tsuper(options);\n\n\t\tthis.isDependOnTheme = null;\n\t\tthis.size = null;\n\t\tthis.color = null;\n\t\tthis.icon = null;\n\t\tthis.state = null;\n\t\tthis.id = null;\n\t\tthis.context = null;\n\n\t\tthis.menuWindow = null;\n\t\tthis.handleMenuClick = this.handleMenuClick.bind(this);\n\t\tthis.handleMenuClose = this.handleMenuClose.bind(this);\n\n\t\tthis.setDependOnTheme(this.options.dependOnTheme);\n\t\tthis.setSize(this.options.size);\n\t\tthis.setColor(this.options.color);\n\t\tthis.setIcon(this.options.icon);\n\t\tthis.setState(this.options.state);\n\t\tthis.setId(this.options.id);\n\t\tthis.setMenu(this.options.menu);\n\t\tthis.setContext(this.options.context);\n\n\t\tthis.options.noCaps && this.setNoCaps();\n\t\tthis.options.round && this.setRound();\n\n\t\tif (this.options.dropdown || (this.getMenuWindow() && this.options.dropdown !== false))\n\t\t{\n\t\t\tthis.setDropdown();\n\t\t}\n\t}\n\n\tstatic Size = ButtonSize;\n\tstatic Color = ButtonColor;\n\tstatic State = ButtonState;\n\tstatic Icon = ButtonIcon;\n\tstatic Tag = ButtonTag;\n\tstatic Style = ButtonStyle;\n\n\t/**\n\t * @public\n\t * @param {ButtonSize|null} size\n\t * @return {this}\n\t */\n\tsetSize(size: ButtonSize | null): this\n\t{\n\t\treturn this.setProperty('size', size, ButtonSize);\n\t}\n\n\t/**\n\t * @public\n\t * @return {?ButtonSize}\n\t */\n\tgetSize(): ButtonSize | null\n\t{\n\t\treturn this.size;\n\t}\n\n\t/**\n\t * @public\n\t * @param {ButtonColor|null} color\n\t * @return {this}\n\t */\n\tsetColor(color: ButtonColor | null): this\n\t{\n\t\treturn this.setProperty('color', color, ButtonColor);\n\t}\n\n\t/**\n\t * @public\n\t * @return {?ButtonSize}\n\t */\n\tgetColor(): ButtonColor | null\n\t{\n\t\treturn this.color;\n\t}\n\n\t/**\n\t * @public\n\t * @param {?ButtonIcon} icon\n\t * @return {this}\n\t */\n\tsetIcon(icon: ButtonIcon | null): this\n\t{\n\t\tthis.setProperty('icon', icon, ButtonIcon);\n\n\t\tif (this.isInputType() && this.getIcon() !== null)\n\t\t{\n\t\t\tthrow new Error('BX.UI.Button: Input type button cannot have an icon.');\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {?ButtonIcon}\n\t */\n\tgetIcon(): ButtonColor | null\n\t{\n\t\treturn this.icon;\n\t}\n\n\t/**\n\t * @public\n\t * @param {ButtonState|null} state\n\t * @return {this}\n\t */\n\tsetState(state: ButtonState | null): this\n\t{\n\t\treturn this.setProperty('state', state, ButtonState);\n\t}\n\n\t/**\n\t * @public\n\t * @return {?ButtonState}\n\t */\n\tgetState(): ButtonState | null\n\t{\n\t\treturn this.state;\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetNoCaps(flag: ? boolean): this\n\t{\n\t\tif (flag === false)\n\t\t{\n\t\t\tDom.removeClass(this.getContainer(), ButtonStyle.NO_CAPS);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.addClass(this.getContainer(), ButtonStyle.NO_CAPS);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t *\n\t * @return {boolean}\n\t */\n\tisNoCaps(): boolean\n\t{\n\t\treturn Dom.hasClass(this.getContainer(), ButtonStyle.NO_CAPS);\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetRound(flag: ? boolean): this\n\t{\n\t\tif (flag === false)\n\t\t{\n\t\t\tDom.removeClass(this.getContainer(), ButtonStyle.ROUND);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.addClass(this.getContainer(), ButtonStyle.ROUND);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisRound(): boolean\n\t{\n\t\treturn Dom.hasClass(this.getContainer(), ButtonStyle.ROUND);\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetDependOnTheme(flag: boolean): this {\n\t\tif (flag === true)\n\t\t{\n\t\t\tDom.addClass(this.getContainer(), ButtonStyle.DEPEND_ON_THEME);\n\t\t}\n\t\telse if (flag === false)\n\t\t{\n\t\t\tDom.removeClass(this.getContainer(), ButtonStyle.DEPEND_ON_THEME);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t *\n\t * @return {boolean}\n\t */\n\tisDependOnTheme(): boolean {\n\t\tif (flag === false)\n\t\t{\n\t\t\tDom.removeClass(this.getContainer(), ButtonStyle.DEPEND_ON_THEME);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.addClass(this.getContainer(), ButtonStyle.DEPEND_ON_THEME);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t *\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetDropdown(flag: ? boolean): this\n\t{\n\t\tif (flag === false)\n\t\t{\n\t\t\tDom.removeClass(this.getContainer(), ButtonStyle.DROPDOWN);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.addClass(this.getContainer(), ButtonStyle.DROPDOWN);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t *\n\t * @return {boolean}\n\t */\n\tisDropdown(): boolean\n\t{\n\t\treturn Dom.hasClass(this.getContainer(), ButtonStyle.DROPDOWN);\n\t}\n\n\t/**\n\t *\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetCollapsed(flag: ? boolean): this\n\t{\n\t\tif (flag === false)\n\t\t{\n\t\t\tDom.removeClass(this.getContainer(), ButtonStyle.COLLAPSED);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.addClass(this.getContainer(), ButtonStyle.COLLAPSED);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t *\n\t * @return {boolean}\n\t */\n\tisCollapsed(): boolean\n\t{\n\t\treturn Dom.hasClass(this.getContainer(), ButtonStyle.COLLAPSED);\n\t}\n\n\t/**\n\t * @protected\n\t * @param {MenuOptions|false} options\n\t */\n\tsetMenu(options: MenuOptions): this\n\t{\n\t\tif (Type.isPlainObject(options) && Type.isArray(options.items) && options.items.length > 0)\n\t\t{\n\t\t\tthis.setMenu(false);\n\n\t\t\tthis.menuWindow = new Menu({\n\t\t\t\tid: `ui-btn-menu-${Text.getRandom().toLowerCase()}`,\n\t\t\t\tbindElement: this.getMenuBindElement(),\n\t\t\t\t...options\n\t\t\t});\n\n\t\t\tthis.menuWindow.getPopupWindow().subscribe('onClose', this.handleMenuClose);\n\t\t\tEvent.bind(this.getMenuClickElement(), 'click', this.handleMenuClick);\n\t\t}\n\t\telse if (options === false && this.menuWindow !== null)\n\t\t{\n\t\t\tthis.menuWindow.close();\n\n\t\t\tthis.menuWindow.getPopupWindow().unsubscribe('onClose', this.handleMenuClose);\n\t\t\tEvent.unbind(this.getMenuClickElement(), 'click', this.handleMenuClick);\n\n\t\t\tthis.menuWindow.destroy();\n\t\t\tthis.menuWindow = null;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {HTMLElement}\n\t */\n\tgetMenuBindElement(): HTMLElement\n\t{\n\t\treturn this.getContainer();\n\t}\n\n\t/**\n\t * @public\n\t * @return {HTMLElement}\n\t */\n\tgetMenuClickElement(): HTMLElement\n\t{\n\t\treturn this.getContainer();\n\t}\n\n\t/**\n\t * @protected\n\t * @param {MouseEvent} event\n\t */\n\thandleMenuClick(event: MouseEvent): void\n\t{\n\t\tthis.getMenuWindow().show();\n\t\tthis.setActive(this.getMenuWindow().getPopupWindow().isShown());\n\t}\n\n\t/**\n\t * @protected\n\t */\n\thandleMenuClose(): void\n\t{\n\t\tthis.setActive(false);\n\t}\n\n\t/**\n\t * @public\n\t * @return {Menu}\n\t */\n\tgetMenuWindow(): Menu\n\t{\n\t\treturn this.menuWindow;\n\t}\n\n\t/**\n\t * @public\n\t * @param {string|null} id\n\t * @return {this}\n\t */\n\tsetId(id: string | null): this\n\t{\n\t\tif (Type.isStringFilled(id) || Type.isNull(id))\n\t\t{\n\t\t\tthis.id = id;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {?string}\n\t */\n\tgetId(): ?string\n\t{\n\t\treturn this.id;\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetActive(flag?: boolean): this\n\t{\n\t\treturn this.setState(flag === false ? null : ButtonState.ACTIVE);\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisActive(): boolean\n\t{\n\t\treturn this.getState() === ButtonState.ACTIVE;\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetHovered(flag?: boolean): this\n\t{\n\t\treturn this.setState(flag === false ? null : ButtonState.HOVER);\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisHover(): boolean\n\t{\n\t\treturn this.getState() === ButtonState.HOVER;\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetDisabled(flag): this\n\t{\n\t\tthis.setState(flag === false ? null : ButtonState.DISABLED);\n\t\tsuper.setDisabled(flag);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisDisabled(): boolean\n\t{\n\t\treturn this.getState() === ButtonState.DISABLED;\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetWaiting(flag: ? boolean): this\n\t{\n\t\tif (flag === false)\n\t\t{\n\t\t\tthis.setState(null);\n\t\t\tthis.setProps({ disabled: null });\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.setState(ButtonState.WAITING);\n\t\t\tthis.setProps({ disabled: true });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisWaiting(): boolean\n\t{\n\t\treturn this.getState() === ButtonState.WAITING;\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetClocking(flag?: boolean): this\n\t{\n\t\tif (flag === false)\n\t\t{\n\t\t\tthis.setState(null);\n\t\t\tthis.setProps({ disabled: null });\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.setState(ButtonState.CLOCKING);\n\t\t\tthis.setProps({ disabled: true });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisClocking(): boolean\n\t{\n\t\treturn this.getState() === ButtonState.CLOCKING;\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tsetProperty(property: string, value?: any, enumeration: Object): this\n\t{\n\t\tif (this.isEnumValue(value, enumeration))\n\t\t{\n\t\t\tDom.removeClass(this.getContainer(), this[property]);\n\t\t\tDom.addClass(this.getContainer(), value);\n\t\t\tthis[property] = value;\n\t\t}\n\t\telse if (value === null)\n\t\t{\n\t\t\tDom.removeClass(this.getContainer(), this[property]);\n\t\t\tthis[property] = null;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @param {*} context\n\t */\n\tsetContext(context: any): this\n\t{\n\t\tif (!Type.isUndefined(context))\n\t\t{\n\t\t\tthis.context = context;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t *\n\t * @return {*}\n\t */\n\tgetContext(): any\n\t{\n\t\treturn this.context;\n\t}\n}\n","/**\n * @namespace {BX.UI}\n */\nexport default class SplitButtonState\n{\n\tstatic HOVER = 'ui-btn-hover';\n\tstatic MAIN_HOVER = 'ui-btn-main-hover';\n\tstatic MENU_HOVER = 'ui-btn-menu-hover';\n\tstatic ACTIVE = 'ui-btn-active';\n\tstatic MAIN_ACTIVE = 'ui-btn-main-active';\n\tstatic MENU_ACTIVE = 'ui-btn-menu-active';\n\tstatic DISABLED = 'ui-btn-disabled';\n\tstatic MAIN_DISABLED = 'ui-btn-main-disabled';\n\tstatic MENU_DISABLED = 'ui-btn-menu-disabled';\n\tstatic CLOCKING = 'ui-btn-clock';\n\tstatic WAITING = 'ui-btn-wait';\n}","/**\n * @namespace {BX.UI}\n */\nexport default class SplitSubButtonType\n{\n\tstatic MAIN = 'ui-btn-main';\n\tstatic MENU = 'ui-btn-menu';\n}","import BaseButton from '../base-button';\nimport SplitButtonState from './split-button-state';\nimport SplitSubButtonType from './split-sub-button-type';\nimport type SplitButton from './split-button';\nimport { Type } from 'main.core';\nimport type { SplitSubButtonOptions } from './split-sub-button-options';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class SplitSubButton extends BaseButton\n{\n\tconstructor(options: SplitSubButtonOptions)\n\t{\n\t\toptions = Type.isPlainObject(options) ? options : {};\n\t\toptions.baseClass =\n\t\t\toptions.buttonType === SplitSubButtonType.MAIN\n\t\t\t\t? SplitSubButtonType.MAIN\n\t\t\t\t: SplitSubButtonType.MENU\n\t\t;\n\n\t\tsuper(options);\n\n\t\tif (this.isInputType())\n\t\t{\n\t\t\tthrow new Error('BX.UI.SplitSubButton: Split button cannot be an input tag.');\n\t\t}\n\t}\n\n\tstatic Type = SplitSubButtonType;\n\n\tinit(): void\n\t{\n\t\tthis.buttonType = this.options.buttonType;\n\t\tthis.splitButton = this.options.splitButton;\n\n\t\tsuper.init();\n\t}\n\n\t/**\n\t * @public\n\t * @return {SplitButton}\n\t */\n\tgetSplitButton(): SplitButton\n\t{\n\t\treturn this.splitButton;\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisMainButton(): boolean\n\t{\n\t\treturn this.buttonType === SplitSubButtonType.MAIN;\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisMenuButton(): boolean\n\t{\n\t\treturn this.buttonType === SplitSubButtonType.MENU;\n\t}\n\n\tsetText(text: string): this\n\t{\n\t\tif (Type.isString(text) && this.isMenuButton())\n\t\t{\n\t\t\tthrow new Error('BX.UI.SplitButton: a menu button doesn\\'t support a text caption.');\n\t\t}\n\n\t\treturn super.setText(text);\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetActive(flag?: boolean): this\n\t{\n\t\tthis.toggleState(\n\t\t\tflag,\n\t\t\tSplitButtonState.ACTIVE,\n\t\t\tSplitButtonState.MAIN_ACTIVE,\n\t\t\tSplitButtonState.MENU_ACTIVE\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisActive(): boolean\n\t{\n\t\tconst state = this.getSplitButton().getState();\n\t\tif (state === SplitButtonState.ACTIVE)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.isMainButton())\n\t\t{\n\t\t\treturn state === SplitButtonState.MAIN_ACTIVE;\n\t\t}\n\n\t\treturn state === SplitButtonState.MENU_ACTIVE;\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetDisabled(flag?: boolean): this\n\t{\n\t\tthis.toggleState(\n\t\t\tflag,\n\t\t\tSplitButtonState.DISABLED,\n\t\t\tSplitButtonState.MAIN_DISABLED,\n\t\t\tSplitButtonState.MENU_DISABLED\n\t\t);\n\n\t\tsuper.setDisabled(flag);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} flag\n\t * @return {this}\n\t */\n\tsetHovered(flag): this\n\t{\n\t\tthis.toggleState(\n\t\t\tflag,\n\t\t\tSplitButtonState.HOVER,\n\t\t\tSplitButtonState.MAIN_HOVER,\n\t\t\tSplitButtonState.MENU_HOVER\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisHovered(): boolean\n\t{\n\t\tconst state = this.getSplitButton().getState();\n\t\tif (state === SplitButtonState.HOVER)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.isMainButton())\n\t\t{\n\t\t\treturn state === SplitButtonState.MAIN_HOVER;\n\t\t}\n\n\t\treturn state === SplitButtonState.MENU_HOVER;\n\t}\n\n\t/**\n\t * @private\n\t * @param flag\n\t * @param globalState\n\t * @param mainState\n\t * @param menuState\n\t */\n\ttoggleState(flag, globalState, mainState, menuState)\n\t{\n\t\tconst state = this.getSplitButton().getState();\n\t\tif (flag === false)\n\t\t{\n\t\t\tif (state === globalState)\n\t\t\t{\n\t\t\t\tthis.getSplitButton().setState(this.isMainButton() ? menuState : mainState);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.getSplitButton().setState(null);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (state === mainState && this.isMenuButton())\n\t\t\t{\n\t\t\t\tthis.getSplitButton().setState(globalState);\n\t\t\t}\n\t\t\telse if (state === menuState && this.isMainButton())\n\t\t\t{\n\t\t\t\tthis.getSplitButton().setState(globalState);\n\t\t\t}\n\t\t\telse if (state !== globalState)\n\t\t\t{\n\t\t\t\tthis.getSplitButton().setState(this.isMainButton() ? mainState : menuState);\n\t\t\t}\n\t\t}\n\t}\n}","import Button from '../button/button';\nimport SplitSubButton from './split-sub-button';\nimport SplitButtonState from './split-button-state';\nimport ButtonState from '../button/button-state';\nimport { Type, Tag } from 'main.core';\nimport SplitSubButtonType from './split-sub-button-type';\nimport type { SplitButtonOptions } from './split-button-options';\nimport ButtonTag from '../button/button-tag';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class SplitButton extends Button\n{\n\tstatic BASE_CLASS = 'ui-btn-split';\n\n\tconstructor(options: SplitButtonOptions)\n\t{\n\t\toptions = Type.isPlainObject(options) ? options : {};\n\t\t// delete options.round;\n\n\t\tif (Type.isStringFilled(options.link))\n\t\t{\n\t\t\toptions.mainButton = Type.isPlainObject(options.mainButton) ? options.mainButton : {};\n\t\t\toptions.mainButton.link = options.link;\n\t\t\tdelete options.link;\n\t\t}\n\n\t\toptions.tag = ButtonTag.DIV;\n\t\toptions.baseClass = SplitButton.BASE_CLASS;\n\n\t\tsuper(options);\n\t}\n\n\tinit()\n\t{\n\t\tconst mainOptions = Type.isPlainObject(this.options.mainButton) ? this.options.mainButton : {};\n\t\tconst menuOptions = Type.isPlainObject(this.options.menuButton) ? this.options.menuButton : {};\n\t\tmainOptions.buttonType = SplitSubButtonType.MAIN;\n\t\tmainOptions.splitButton = this;\n\n\t\tmenuOptions.buttonType = SplitSubButtonType.MENU;\n\t\tmenuOptions.splitButton = this;\n\n\t\tthis.mainButton = new SplitSubButton(mainOptions);\n\t\tthis.menuButton = new SplitSubButton(menuOptions);\n\t\tthis.menuTarget = SplitSubButtonType.MAIN;\n\n\t\tif (this.options.menuTarget === SplitSubButtonType.MENU)\n\t\t{\n\t\t\tthis.menuTarget = SplitSubButtonType.MENU;\n\t\t}\n\n\t\tsuper.init();\n\t}\n\n\tstatic State = SplitButtonState;\n\n\t/**\n\t * @public\n\t * @return {HTMLElement}\n\t */\n\tgetContainer(): HTMLElement\n\t{\n\t\tif (this.button === null)\n\t\t{\n\t\t\tthis.button = Tag.render`\n\t\t\t\t<div class=\"${this.getBaseClass()}\">${[\n\t\t\t\tthis.getMainButton().getContainer(),\n\t\t\t\tthis.getMenuButton().getContainer()\n\t\t\t]}</div>\n\t\t\t`;\n\t\t}\n\n\t\treturn this.button;\n\t}\n\n\t/**\n\t * @public\n\t * @return {SplitSubButton}\n\t */\n\tgetMainButton(): SplitSubButton\n\t{\n\t\treturn this.mainButton;\n\t}\n\n\t/**\n\t * @public\n\t * @return {SplitSubButton}\n\t */\n\tgetMenuButton(): SplitSubButton\n\t{\n\t\treturn this.menuButton;\n\t}\n\n\t/**\n\t * @public\n\t * @param {string} text\n\t * @return {this}\n\t */\n\tsetText(text: string): this\n\t{\n\t\tif (Type.isString(text))\n\t\t{\n\t\t\tthis.getMainButton().setText(text);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {string}\n\t */\n\tgetText(): string\n\t{\n\t\treturn this.getMainButton().getText();\n\t}\n\n\t/**\n\t *\n\t * @param {number | string} counter\n\t * @return {this}\n\t */\n\tsetCounter(counter: number | string): this\n\t{\n\t\treturn this.getMainButton().setCounter(counter);\n\t}\n\n\t/**\n\t *\n\t * @return {number | string | null}\n\t */\n\tgetCounter(): number | string | null\n\t{\n\t\treturn this.getMainButton().getCounter();\n\t}\n\n\t/**\n\t *\n\t * @param {string} link\n\t * @return {this}\n\t */\n\tsetLink(link: string): this\n\t{\n\t\treturn this.getMainButton().setLink(link);\n\t}\n\n\t/**\n\t *\n\t * @return {string}\n\t */\n\tgetLink(): string\n\t{\n\t\treturn this.getMainButton().getLink();\n\t}\n\n\t/**\n\t * @public\n\t * @param {SplitButtonState|null} state\n\t * @return {this}\n\t */\n\tsetState(state: SplitButtonState | null): this\n\t{\n\t\treturn this.setProperty('state', state, SplitButtonState);\n\t}\n\n\t/**\n\t * @public\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetDisabled(flag?: boolean): this\n\t{\n\t\tthis.setState(flag === false ? null : ButtonState.DISABLED);\n\t\tthis.getMainButton().setDisabled(flag);\n\t\tthis.getMenuButton().setDisabled(flag);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @protected\n\t * @return {HTMLElement}\n\t */\n\tgetMenuBindElement(): HTMLElement\n\t{\n\t\tif (this.getMenuTarget() === SplitSubButtonType.MENU)\n\t\t{\n\t\t\treturn this.getMenuButton().getContainer();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn this.getContainer();\n\t\t}\n\t}\n\n\t/**\n\t * @protected\n\t * @param {MouseEvent} event\n\t */\n\thandleMenuClick(event: MouseEvent): void\n\t{\n\t\tthis.getMenuWindow().show();\n\n\t\tconst isActive = this.getMenuWindow().getPopupWindow().isShown();\n\t\tthis.getMenuButton().setActive(isActive);\n\t}\n\n\t/**\n\t * @protected\n\t */\n\thandleMenuClose(): void\n\t{\n\t\tthis.getMenuButton().setActive(false);\n\t}\n\n\t/**\n\t * @protected\n\t * @return {HTMLElement}\n\t */\n\tgetMenuClickElement(): HTMLElement\n\t{\n\t\treturn this.getMenuButton().getContainer();\n\t}\n\n\t/**\n\t * @public\n\t * @return {SplitSubButtonType}\n\t */\n\tgetMenuTarget(): SplitSubButtonType\n\t{\n\t\treturn this.menuTarget;\n\t}\n\n\t/**\n\t *\n\t * @param {boolean} [flag=true]\n\t * @return {this}\n\t */\n\tsetDropdown(flag?: boolean): this\n\t{\n\t\treturn this;\n\t}\n\n\t/**\n\t * @public\n\t * @return {boolean}\n\t */\n\tisDropdown(): boolean\n\t{\n\t\treturn true;\n\t}\n}","import { Type, Reflection, Dom, Runtime, Tag } from 'main.core';\nimport { EventEmitter, BaseEvent } from 'main.core.events';\nimport { MenuItem } from 'main.popup';\n\nimport BaseButton from './base-button';\nimport Button from './button/button';\nimport SplitButton from './split-button/split-button';\nimport ButtonTag from './button/button-tag';\nimport ButtonColor from './button/button-color';\nimport ButtonSize from './button/button-size';\nimport ButtonState from './button/button-state';\nimport ButtonStyle from './button/button-style';\nimport ButtonIcon from './button/button-icon';\nimport SplitButtonState from './split-button/split-button-state';\n\nimport type { SplitButtonOptions } from './split-button/split-button-options';\nimport type { ButtonOptions } from './button/button-options';\nimport type { SplitSubButtonOptions } from './split-button/split-sub-button-options';\nimport SplitSubButtonType from './split-button/split-sub-button-type';\n\nexport default class ButtonManager\n{\n\t/**\n\t * @public\n\t * @param {HTMLButtonElement | HTMLAnchorElement | HTMLInputElement} node\n\t * @return {Button | SplitButton}\n\t */\n\tstatic createFromNode(\n\t\tnode: HTMLButtonElement | HTMLAnchorElement | HTMLInputElement | HTMLDivElement\n\t): Button | SplitButton\n\t{\n\t\tif (!Type.isDomNode(node))\n\t\t{\n\t\t\tthrow new Error('BX.UI.ButtonManager.createFromNode: \"node\" must be a DOM node.');\n\t\t}\n\n\t\tif (!Dom.hasClass(node, Button.BASE_CLASS) && !Dom.hasClass(node, SplitButton.BASE_CLASS))\n\t\t{\n\t\t\tthrow new Error('BX.UI.ButtonManager.createFromNode: \"node\" is not a button.');\n\t\t}\n\n\t\tconst isSplitButton = Dom.hasClass(node, SplitButton.BASE_CLASS);\n\t\tlet tag = null;\n\t\tlet text = null;\n\t\tlet textNode = null;\n\t\tlet counterNode = null;\n\t\tlet disabled = false;\n\t\tlet mainButtonOptions: SplitSubButtonOptions = {};\n\t\tlet menuButtonOptions: SplitSubButtonOptions = {};\n\n\t\tif (isSplitButton)\n\t\t{\n\t\t\tconst mainButton = node.querySelector(`.${SplitSubButtonType.MAIN}`);\n\t\t\tconst menuButton = node.querySelector(`.${SplitSubButtonType.MENU}`);\n\t\t\tif (!mainButton)\n\t\t\t{\n\t\t\t\tthrow new Error('BX.UI.ButtonManager.createFromNode: a split button doesn\\'t have a main button.');\n\t\t\t}\n\n\t\t\tif (!menuButton)\n\t\t\t{\n\t\t\t\tthrow new Error('BX.UI.ButtonManager.createFromNode: a split button doesn\\'t have a menu button.');\n\t\t\t}\n\n\t\t\tconst mainButtonTag = this.#getTag(mainButton);\n\t\t\tif (mainButtonTag === ButtonTag.INPUT || mainButtonTag === ButtonTag.SUBMIT)\n\t\t\t{\n\t\t\t\ttext = mainButton.value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t[textNode, counterNode] = this.#getTextNode(mainButton);\n\t\t\t\ttext = textNode.textContent;\n\t\t\t}\n\n\t\t\tdisabled = Dom.hasClass(node, SplitButtonState.DISABLED);\n\n\t\t\tmainButtonOptions = {\n\t\t\t\ttag: mainButtonTag,\n\t\t\t\ttextNode,\n\t\t\t\tcounterNode,\n\t\t\t\tbuttonNode: mainButton,\n\t\t\t\tdisabled: Dom.hasClass(node, SplitButtonState.MAIN_DISABLED)\n\t\t\t};\n\n\t\t\tmenuButtonOptions = {\n\t\t\t\ttag: this.#getTag(menuButton),\n\t\t\t\tbuttonNode: menuButton,\n\t\t\t\ttextNode: null,\n\t\t\t\tcounterNode: null,\n\t\t\t\tdisabled: Dom.hasClass(node, SplitButtonState.MENU_DISABLED)\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttag = this.#getTag(node);\n\t\t\tif (tag === null)\n\t\t\t{\n\t\t\t\tthrow new Error('BX.UI.ButtonManager.createFromNode: \"node\" must be a button, link or input.');\n\t\t\t}\n\n\t\t\tdisabled = Dom.hasClass(node, ButtonState.DISABLED);\n\n\t\t\tif (tag === ButtonTag.INPUT || tag === ButtonTag.SUBMIT)\n\t\t\t{\n\t\t\t\ttext = node.value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t[textNode, counterNode] = this.#getTextNode(node);\n\t\t\t\ttext = textNode.textContent;\n\t\t\t}\n\t\t}\n\n\t\tconst options: ButtonOptions & SplitButtonOptions = {\n\t\t\tid: node.dataset.btnUniqid,\n\t\t\tbuttonNode: node,\n\t\t\ttextNode: isSplitButton ? null : textNode,\n\t\t\tcounterNode: isSplitButton ? null : counterNode,\n\t\t\tcounter: this.#getCounter(counterNode),\n\t\t\ttag,\n\t\t\ttext,\n\t\t\tdisabled,\n\t\t\tmainButton: mainButtonOptions,\n\t\t\tmenuButton: menuButtonOptions,\n\t\t\tsize: this.#getEnumProp(node, ButtonSize),\n\t\t\tcolor: this.#getEnumProp(node, ButtonColor),\n\t\t\ticon: this.#getEnumProp(node, ButtonIcon),\n\t\t\tstate: this.#getEnumProp(node, isSplitButton ? SplitButtonState : ButtonState),\n\t\t\tnoCaps: Dom.hasClass(node, ButtonStyle.NO_CAPS),\n\t\t\tround: Dom.hasClass(node, ButtonStyle.ROUND)\n\t\t};\n\n\n\t\tconst nodeOptions = Dom.attr(node, 'data-json-options') || {};\n\n\t\tif (Dom.hasClass(node, ButtonStyle.DROPDOWN))\n\t\t{\n\t\t\toptions.dropdown = true;\n\t\t}\n\t\telse if (nodeOptions.dropdown === false)\n\t\t{\n\t\t\toptions.dropdown = false;\n\t\t}\n\n\t\tif (nodeOptions.onclick)\n\t\t{\n\t\t\toptions.onclick = this.#convertEventHandler(nodeOptions.onclick);\n\t\t}\n\n\t\tif (Type.isPlainObject(nodeOptions.events))\n\t\t{\n\t\t\toptions.events = nodeOptions.events;\n\t\t\tthis.#convertEvents(options.events);\n\t\t}\n\n\t\tif (Type.isPlainObject(nodeOptions.menu))\n\t\t{\n\t\t\toptions.menu = nodeOptions.menu;\n\t\t\tthis.#convertMenuEvents(options.menu.items);\n\t\t}\n\n\t\t['mainButton', 'menuButton'].forEach(button => {\n\n\t\t\tif (!Type.isPlainObject(nodeOptions[button]))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\toptions[button] = Runtime.merge(options[button], nodeOptions[button]);\n\t\t\tif (options[button].onclick)\n\t\t\t{\n\t\t\t\toptions[button].onclick = this.#convertEventHandler(options[button].onclick);\n\t\t\t}\n\n\t\t\tthis.#convertEvents(options[button].events);\n\n\t\t});\n\n\t\tif (Type.isStringFilled(nodeOptions.menuTarget))\n\t\t{\n\t\t\toptions.menuTarget = nodeOptions.menuTarget;\n\t\t}\n\n\t\treturn isSplitButton ? new SplitButton(options) : new Button(options);\n\t}\n\n\tstatic createByUniqId(id): Button | SplitButton | null\n\t{\n\t\tif (!Type.isStringFilled(id))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tconst node = document.querySelector(`[data-btn-uniqid=\"${id}\"]`);\n\n\t\treturn node ? this.createFromNode(node) : null;\n\t}\n\n\t/**\n\t * @private\n\t * @param {HTMLElement} node\n\t * @return {null|number}\n\t */\n\tstatic #getTag(node: HTMLElement | HTMLInputElement): ButtonTag | null\n\t{\n\t\tif (node.nodeName === 'A')\n\t\t{\n\t\t\treturn ButtonTag.LINK;\n\t\t}\n\t\telse if (node.nodeName === 'BUTTON')\n\t\t{\n\t\t\treturn ButtonTag.BUTTON;\n\t\t}\n\t\telse if (node.nodeName === 'INPUT' && node.type === 'button')\n\t\t{\n\t\t\treturn ButtonTag.INPUT;\n\t\t}\n\t\telse if (node.nodeName === 'INPUT' && node.type === 'submit')\n\t\t{\n\t\t\treturn ButtonTag.SUBMIT;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * @private\n\t * @param {HTMLElement} node\n\t */\n\tstatic #getTextNode(node: HTMLElement): [HTMLElement, HTMLElement]\n\t{\n\t\tlet textNode = node.querySelector('.ui-btn-text');\n\t\tconst counterNode = node.querySelector('.ui-btn-counter');\n\t\tif (!textNode)\n\t\t{\n\t\t\tif (counterNode)\n\t\t\t{\n\t\t\t\tDom.remove(counterNode);\n\t\t\t}\n\n\t\t\ttextNode = Tag.render`<span class=\"ui-btn-text\">${node.innerHTML.trim()}</span>`;\n\t\t\tDom.clean(node);\n\t\t\tDom.append(textNode, node);\n\n\t\t\tif (counterNode)\n\t\t\t{\n\t\t\t\tDom.append(counterNode, node);\n\t\t\t}\n\t\t}\n\n\t\treturn [textNode, counterNode];\n\t}\n\n\t/**\n\t * @private\n\t * @param counterNode\n\t * @return {null|any}\n\t */\n\tstatic #getCounter(counterNode: HTMLElement): number | string | null\n\t{\n\t\tif (Type.isDomNode(counterNode))\n\t\t{\n\t\t\tconst textContent = counterNode.textContent;\n\t\t\tconst counter = Number(textContent);\n\n\t\t\treturn Type.isNumber(counter) ? counter : textContent;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * @private\n\t * @param {HTMLElement} node\n\t * @param {object} enumeration\n\t * @return {null|*}\n\t */\n\tstatic #getEnumProp(node: HTMLElement, enumeration: Object)\n\t{\n\t\tfor (let key in enumeration)\n\t\t{\n\t\t\tif (!enumeration.hasOwnProperty(key))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (Dom.hasClass(node, enumeration[key]))\n\t\t\t{\n\t\t\t\treturn enumeration[key];\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * @private\n\t * @param handler\n\t * @return {Function}\n\t */\n\tstatic #convertEventHandler(handler): Function\n\t{\n\t\tif (Type.isFunction(handler))\n\t\t{\n\t\t\treturn handler;\n\t\t}\n\n\t\tif (!Type.isObject(handler))\n\t\t{\n\t\t\tthrow new Error('BX.UI.ButtonManager.createFromNode: Event handler must be described as object or function.');\n\t\t}\n\n\t\tif (Type.isStringFilled(handler.code))\n\t\t{\n\t\t\treturn function() { // handle code can use callback arguments\n\t\t\t\teval(handler.code);\n\t\t\t};\n\t\t}\n\t\telse if (Type.isStringFilled(handler.event))\n\t\t{\n\t\t\treturn function(...args) {\n\n\t\t\t\tlet event;\n\t\t\t\tif (args[0] instanceof BaseEvent)\n\t\t\t\t{\n\t\t\t\t\tevent = args[0];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (args[0] instanceof BaseButton)\n\t\t\t\t\t{\n\t\t\t\t\t\tevent = new BaseEvent({ data: { button: args[0], event: args[1] } });\n\t\t\t\t\t}\n\t\t\t\t\telse if (args[1] instanceof MenuItem)\n\t\t\t\t\t{\n\t\t\t\t\t\tevent = new BaseEvent({ data: { item: args[1], event: args[0] } });\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tevent = new BaseEvent({ data: args });\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tEventEmitter.emit(handler.event, event);\n\t\t\t};\n\t\t}\n\t\telse if (Type.isStringFilled(handler.handler))\n\t\t{\n\t\t\treturn function(...args) {\n\t\t\t\tconst fn = Reflection.getClass(handler.handler);\n\t\t\t\tif (Type.isFunction(fn))\n\t\t\t\t{\n\t\t\t\t\tlet context = this;\n\t\t\t\t\tif (Type.isStringFilled(handler.context))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontext = Reflection.getClass(handler.context);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn fn.apply(context, args);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`BX.UI.ButtonManager.createFromNode: be aware, the handler ${handler.handler} is not a function.`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t};\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * @private\n\t * @param events\n\t */\n\tstatic #convertEvents(events)\n\t{\n\t\tif (Type.isPlainObject(events))\n\t\t{\n\t\t\tfor (let [eventName, eventFn] of Object.entries(events))\n\t\t\t{\n\t\t\t\tevents[eventName] = this.#convertEventHandler(eventFn);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t * @param items\n\t */\n\tstatic #convertMenuEvents(items)\n\t{\n\t\tif (!Type.isArray(items))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\titems.forEach(item => {\n\t\t\tif (item.onclick)\n\t\t\t{\n\t\t\t\titem.onclick = this.#convertEventHandler(item.onclick);\n\t\t\t}\n\n\t\t\tif (item.events)\n\t\t\t{\n\t\t\t\tthis.#convertEvents(item.events);\n\t\t\t}\n\n\t\t\tif (Type.isArray(item.items))\n\t\t\t{\n\t\t\t\tthis.#convertMenuEvents(item.items);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated\n\t * @param uniqId\n\t * @return {null|*}\n\t */\n\tstatic getByUniqid(uniqId)\n\t{\n\t\tconst toolbar = BX.UI.ToolbarManager.getDefaultToolbar();\n\n\t\treturn toolbar ? toolbar.getButton(uniqId) : null;\n\t}\n}","/**\n * @namespace {BX.UI}\n */\nexport default class IButton\n{\n\trender(): HTMLElement\n\t{\n\t\tthrow new Error('BX.UI.IButton: Must be implemented by a subclass');\n\t}\n}","import Button from '../button';\nimport ButtonColor from '../button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class AddButton extends Button\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_ADD_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.SUCCESS\n\t\t};\n\t}\n}","import Button from '../button';\nimport ButtonColor from '../button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class ApplyButton extends Button\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_APPLY_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.LIGHT_BORDER\n\t\t};\n\t}\n}","import Button from '../button';\nimport ButtonColor from '../button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class CancelButton extends Button\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_CANCEL_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.LINK\n\t\t};\n\t}\n}","import Button from '../button';\nimport ButtonColor from '../button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class CloseButton extends Button\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_CLOSE_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.LINK\n\t\t};\n\t}\n}","import Button from '../button';\nimport ButtonColor from '../button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class CreateButton extends Button\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_CREATE_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.SUCCESS\n\t\t};\n\t}\n}","import Button from '../button';\nimport ButtonColor from '../button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class SaveButton extends Button\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_SAVE_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.SUCCESS\n\t\t};\n\t}\n}","import Button from '../button';\nimport ButtonColor from '../button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class SendButton extends Button\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_SEND_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.SUCCESS\n\t\t};\n\t}\n}","import Button from '../button';\nimport ButtonColor from '../button-color';\nimport ButtonIcon from '../button-icon';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class SettingsButton extends Button\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ticon: ButtonIcon.SETTING,\n\t\t\tcolor: ButtonColor.LIGHT_BORDER,\n\t\t\tdropdown: false\n\t\t};\n\t}\n}","import SplitButton from '../split-button';\nimport ButtonColor from '../../button/button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class AddSplitButton extends SplitButton\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_ADD_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.SUCCESS\n\t\t};\n\t}\n}","import SplitButton from '../split-button';\nimport ButtonColor from '../../button/button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class ApplySplitButton extends SplitButton\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_APPLY_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.LIGHT_BORDER\n\t\t};\n\t}\n}","import SplitButton from '../split-button';\nimport ButtonColor from '../../button/button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class CancelSplitButton extends SplitButton\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_CANCEL_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.LINK\n\t\t};\n\t}\n}","import SplitButton from '../split-button';\nimport ButtonColor from '../../button/button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class CloseSplitButton extends SplitButton\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_CLOSE_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.LINK\n\t\t};\n\t}\n}","import SplitButton from '../split-button';\nimport ButtonColor from '../../button/button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class CreateSplitButton extends SplitButton\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_CREATE_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.SUCCESS\n\t\t};\n\t}\n}","import SplitButton from '../split-button';\nimport ButtonColor from '../../button/button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class SaveSplitButton extends SplitButton\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_SAVE_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.SUCCESS\n\t\t};\n\t}\n}","import SplitButton from '../split-button';\nimport ButtonColor from '../../button/button-color';\nimport { Loc } from 'main.core';\n\n/**\n * @namespace {BX.UI}\n */\nexport default class SendSplitButton extends SplitButton\n{\n\tgetDefaultOptions()\n\t{\n\t\treturn {\n\t\t\ttext: Loc.getMessage('UI_BUTTONS_SEND_BTN_TEXT'),\n\t\t\tcolor: ButtonColor.SUCCESS\n\t\t};\n\t}\n}"],"names":["ButtonTag","BaseButton","options","Type","isPlainObject","Object","assign","getDefaultOptions","button","isDomNode","buttonNode","textNode","counterNode","text","counter","events","link","maxWidth","tag","isEnumValue","BUTTON","isStringFilled","LINK","baseClass","disabled","handleEvent","bind","init","setDisabled","setText","setCounter","setProps","props","setDataSet","dataset","addClass","className","setLink","setMaxWidth","bindEvent","onclick","bindEvents","getContainer","node","appendChild","getTag","Tag","render","getBaseClass","INPUT","SUBMIT","DIV","SPAN","isString","isInputType","value","length","parentNode","Dom","prepend","textContent","remove","includes","isNumber","Error","append","href","style","removeProperty","propName","propValue","attr","attrs","attributes","result","reserved","i","name","startsWith","getDataSet","removeClass","flag","eventName","fn","isArray","forEach","unbindEvent","isFunction","Event","unbind","event","type","call","enumeration","code","ButtonColor","ButtonSize","ButtonIcon","ButtonState","ButtonStyle","Button","BASE_CLASS","isDependOnTheme","size","color","icon","state","id","context","menuWindow","handleMenuClick","handleMenuClose","setDependOnTheme","dependOnTheme","setSize","setColor","setIcon","setState","setId","setMenu","menu","setContext","noCaps","setNoCaps","round","setRound","dropdown","getMenuWindow","setDropdown","setProperty","getIcon","NO_CAPS","hasClass","ROUND","DEPEND_ON_THEME","DROPDOWN","COLLAPSED","items","Menu","Text","getRandom","toLowerCase","bindElement","getMenuBindElement","getPopupWindow","subscribe","getMenuClickElement","close","unsubscribe","destroy","show","setActive","isShown","isNull","ACTIVE","getState","HOVER","DISABLED","WAITING","CLOCKING","property","isUndefined","SplitButtonState","SplitSubButtonType","SplitSubButton","buttonType","MAIN","MENU","splitButton","isMenuButton","toggleState","MAIN_ACTIVE","MENU_ACTIVE","getSplitButton","isMainButton","MAIN_DISABLED","MENU_DISABLED","MAIN_HOVER","MENU_HOVER","globalState","mainState","menuState","SplitButton","mainButton","mainOptions","menuOptions","menuButton","menuTarget","getMainButton","getMenuButton","getText","getCounter","getLink","getMenuTarget","isActive","ButtonManager","isSplitButton","mainButtonOptions","menuButtonOptions","querySelector","mainButtonTag","btnUniqid","nodeOptions","Runtime","merge","document","createFromNode","uniqId","toolbar","BX","UI","ToolbarManager","getDefaultToolbar","getButton","nodeName","innerHTML","trim","clean","Number","key","hasOwnProperty","handler","isObject","eval","args","BaseEvent","data","MenuItem","item","EventEmitter","emit","Reflection","getClass","apply","console","warn","eventFn","entries","IButton","AddButton","Loc","getMessage","SUCCESS","ApplyButton","LIGHT_BORDER","CancelButton","CloseButton","CreateButton","SaveButton","SendButton","SettingsButton","SETTING","AddSplitButton","ApplySplitButton","CancelSplitButton","CloseSplitButton","CreateSplitButton","SaveSplitButton","SendSplitButton"],"mappings":";;;;CAAA;CACA;CACA;AAFA,KAGqBA,SAAS;GAAA;CAAA;CAAA,4BAATA,SAAS,YAEb,CAAC;C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