{"version":3,"file":"ej2-buttons.min.js","sources":["../../src/common/common.js","../../src/button/button.js","../../src/check-box/check-box.js","../../src/radio-button/radio-button.js","../../src/switch/switch.js","../../src/chips/chip-list.js","../../src/chips/chip.js","../../src/floating-action-button/floating-action-button.js","../../src/speed-dial/speed-dial.js"],"sourcesContent":["import { detach, getUniqueID, rippleEffect, setValue, attributes } from '@syncfusion/ej2-base';\nimport { getValue, addClass, deleteObject } from '@syncfusion/ej2-base';\n/**\n * Initialize wrapper element for angular.\n *\n * @private\n *\n * @param {CreateElementArgs} createElement - Specifies created element args\n * @param {string} tag - Specifies tag name\n * @param {string} type - Specifies type name\n * @param {HTMLInputElement} element - Specifies input element\n * @param {string} WRAPPER - Specifies wrapper element\n * @param {string} role - Specifies role\n * @returns {HTMLInputElement} - Input Element\n */\nexport function wrapperInitialize(createElement, tag, type, element, WRAPPER, role) {\n var input = element;\n if (element.tagName === tag) {\n var ejInstance = getValue('ej2_instances', element);\n input = createElement('input', { attrs: { 'type': type } });\n var props = ['change', 'cssClass', 'label', 'labelPosition', 'id'];\n for (var index = 0, len = element.attributes.length; index < len; index++) {\n if (props.indexOf(element.attributes[index].nodeName) === -1) {\n input.setAttribute(element.attributes[index].nodeName, element.attributes[index].nodeValue);\n }\n }\n attributes(element, { 'class': WRAPPER });\n element.appendChild(input);\n element.classList.add(role);\n element.classList.remove(role);\n setValue('ej2_instances', ejInstance, input);\n deleteObject(element, 'ej2_instances');\n }\n return input;\n}\n/**\n * Get the text node.\n *\n * @param {HTMLElement} element - Specifies html element\n * @private\n * @returns {Node} - Text node.\n */\nexport function getTextNode(element) {\n var node;\n var childnode = element.childNodes;\n for (var i = 0; i < childnode.length; i++) {\n node = childnode[i];\n if (node.nodeType === 3) {\n return node;\n }\n }\n return null;\n}\n/**\n * Destroy the button components.\n *\n * @private\n * @param {Switch | CheckBox} ejInst - Specifies eJ2 Instance\n * @param {Element} wrapper - Specifies wrapper element\n * @param {string} tagName - Specifies tag name\n * @returns {void}\n */\nexport function destroy(ejInst, wrapper, tagName) {\n if (tagName === 'INPUT') {\n wrapper.parentNode.insertBefore(ejInst.element, wrapper);\n detach(wrapper);\n ejInst.element.checked = false;\n ['name', 'value', 'disabled'].forEach(function (key) {\n ejInst.element.removeAttribute(key);\n });\n }\n else {\n ['role', 'aria-checked', 'class'].forEach(function (key) {\n wrapper.removeAttribute(key);\n });\n wrapper.innerHTML = '';\n ejInst.element = wrapper;\n }\n}\n/**\n * Initialize control pre rendering.\n *\n * @private\n * @param {Switch | CheckBox} proxy - Specifies proxy\n * @param {string} control - Specifies control\n * @param {string} wrapper - Specifies wrapper element\n * @param {HTMLInputElement} element - Specifies input element\n * @param {string} moduleName - Specifies module name\n * @returns {void}\n */\nexport function preRender(proxy, control, wrapper, element, moduleName) {\n element = wrapperInitialize(proxy.createElement, control, 'checkbox', element, wrapper, moduleName);\n proxy.element = element;\n if (proxy.element.getAttribute('type') !== 'checkbox') {\n proxy.element.setAttribute('type', 'checkbox');\n }\n if (!proxy.element.id) {\n proxy.element.id = getUniqueID('e-' + moduleName);\n }\n}\n/**\n * Creates CheckBox component UI with theming and ripple support.\n *\n * @private\n * @param {CreateElementArgs} createElement - Specifies Created Element args\n * @param {boolean} enableRipple - Specifies ripple effect\n * @param {CheckBoxUtilModel} options - Specifies Checkbox util Model\n * @returns {Element} - Checkbox Element\n */\nexport function createCheckBox(createElement, enableRipple, options) {\n if (enableRipple === void 0) { enableRipple = false; }\n if (options === void 0) { options = {}; }\n var wrapper = createElement('div', { className: 'e-checkbox-wrapper e-css' });\n if (options.cssClass) {\n addClass([wrapper], options.cssClass.split(' '));\n }\n if (options.enableRtl) {\n wrapper.classList.add('e-rtl');\n }\n if (enableRipple) {\n var rippleSpan = createElement('span', { className: 'e-ripple-container' });\n rippleEffect(rippleSpan, { isCenterRipple: true, duration: 400 });\n wrapper.appendChild(rippleSpan);\n }\n var frameSpan = createElement('span', { className: 'e-frame e-icons' });\n if (options.checked) {\n frameSpan.classList.add('e-check');\n }\n wrapper.appendChild(frameSpan);\n if (options.label) {\n var labelSpan = createElement('span', { className: 'e-label' });\n if (options.disableHtmlEncode) {\n labelSpan.textContent = options.label;\n }\n else {\n labelSpan.innerHTML = options.label;\n }\n wrapper.appendChild(labelSpan);\n }\n return wrapper;\n}\n/**\n * Handles ripple mouse.\n *\n * @private\n * @param {MouseEvent} e - Specifies mouse event\n * @param {Element} rippleSpan - Specifies Ripple span element\n * @returns {void}\n */\nexport function rippleMouseHandler(e, rippleSpan) {\n if (rippleSpan) {\n var event_1 = document.createEvent('MouseEvents');\n event_1.initEvent(e.type, false, true);\n rippleSpan.dispatchEvent(event_1);\n }\n}\n/**\n * Append hidden input to given element\n *\n * @private\n * @param {Switch | CheckBox} proxy - Specifies Proxy\n * @param {Element} wrap - Specifies Wrapper ELement\n * @returns {void}\n */\nexport function setHiddenInput(proxy, wrap) {\n if (proxy.element.getAttribute('ejs-for')) {\n wrap.appendChild(proxy.createElement('input', {\n attrs: { 'name': proxy.name || proxy.element.name, 'value': 'false', 'type': 'hidden' }\n }));\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Property, NotifyPropertyChanges, Component, isBlazor, isRippleEnabled } from '@syncfusion/ej2-base';\nimport { addClass, Event, detach, removeClass } from '@syncfusion/ej2-base';\nimport { rippleEffect, EventHandler, Observer, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { getTextNode } from '../common/common';\n/**\n * Defines the icon position of button.\n */\nexport var IconPosition;\n(function (IconPosition) {\n /**\n * Positions the Icon at the left of the text content in the Button.\n */\n IconPosition[\"Left\"] = \"Left\";\n /**\n * Positions the Icon at the right of the text content in the Button.\n */\n IconPosition[\"Right\"] = \"Right\";\n /**\n * Positions the Icon at the top of the text content in the Button.\n */\n IconPosition[\"Top\"] = \"Top\";\n /**\n * Positions the Icon at the bottom of the text content in the Button.\n */\n IconPosition[\"Bottom\"] = \"Bottom\";\n})(IconPosition || (IconPosition = {}));\nexport var buttonObserver = new Observer();\nvar cssClassName = {\n RTL: 'e-rtl',\n BUTTON: 'e-btn',\n PRIMARY: 'e-primary',\n ICONBTN: 'e-icon-btn'\n};\n/**\n * The Button is a graphical user interface element that triggers an event on its click action. It can contain a text, an image, or both.\n * ```html\n * \n * ```\n * ```typescript\n * \n * ```\n */\nvar Button = /** @class */ (function (_super) {\n __extends(Button, _super);\n /**\n * Constructor for creating the widget\n *\n * @param {ButtonModel} options - Specifies the button model\n * @param {string|HTMLButtonElement} element - Specifies the target element\n */\n function Button(options, element) {\n return _super.call(this, options, element) || this;\n }\n Button.prototype.preRender = function () {\n // pre render code snippets\n };\n /**\n * Initialize the control rendering\n *\n * @returns {void}\n * @private\n */\n Button.prototype.render = function () {\n this.initialize();\n this.removeRippleEffect = rippleEffect(this.element, { selector: '.' + cssClassName.BUTTON });\n this.renderComplete();\n };\n Button.prototype.initialize = function () {\n if (this.cssClass) {\n addClass([this.element], this.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n if (this.isPrimary) {\n this.element.classList.add(cssClassName.PRIMARY);\n }\n if (!isBlazor() || (isBlazor() && this.getModuleName() !== 'progress-btn')) {\n if (this.content) {\n var tempContent = (this.enableHtmlSanitizer) ? SanitizeHtmlHelper.sanitize(this.content) : this.content;\n this.element.innerHTML = tempContent;\n }\n this.setIconCss();\n }\n if (this.enableRtl) {\n this.element.classList.add(cssClassName.RTL);\n }\n if (this.disabled) {\n this.controlStatus(this.disabled);\n }\n else {\n this.wireEvents();\n }\n };\n Button.prototype.controlStatus = function (disabled) {\n this.element.disabled = disabled;\n };\n Button.prototype.setIconCss = function () {\n if (this.iconCss) {\n var span = this.createElement('span', { className: 'e-btn-icon ' + this.iconCss });\n if (!this.element.textContent.trim()) {\n this.element.classList.add(cssClassName.ICONBTN);\n }\n else {\n span.classList.add('e-icon-' + this.iconPosition.toLowerCase());\n if (this.iconPosition === 'Top' || this.iconPosition === 'Bottom') {\n this.element.classList.add('e-' + this.iconPosition.toLowerCase() + '-icon-btn');\n }\n }\n var node = this.element.childNodes[0];\n if (node && (this.iconPosition === 'Left' || this.iconPosition === 'Top')) {\n this.element.insertBefore(span, node);\n }\n else {\n this.element.appendChild(span);\n }\n }\n };\n Button.prototype.wireEvents = function () {\n if (this.isToggle) {\n EventHandler.add(this.element, 'click', this.btnClickHandler, this);\n }\n };\n Button.prototype.unWireEvents = function () {\n if (this.isToggle) {\n EventHandler.remove(this.element, 'click', this.btnClickHandler);\n }\n };\n Button.prototype.btnClickHandler = function () {\n if (this.element.classList.contains('e-active')) {\n this.element.classList.remove('e-active');\n }\n else {\n this.element.classList.add('e-active');\n }\n };\n /**\n * Destroys the widget.\n *\n * @returns {void}\n */\n Button.prototype.destroy = function () {\n var classList = [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success', 'e-info', 'e-danger',\n 'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round',\n 'e-top-icon-btn', 'e-bottom-icon-btn'];\n if (this.cssClass) {\n classList = classList.concat(this.cssClass.split(' '));\n }\n _super.prototype.destroy.call(this);\n removeClass([this.element], classList);\n if (!this.element.getAttribute('class')) {\n this.element.removeAttribute('class');\n }\n if (this.disabled) {\n this.element.removeAttribute('disabled');\n }\n if (this.content) {\n this.element.innerHTML = this.element.innerHTML.replace(this.content, '');\n }\n var span = this.element.querySelector('span.e-btn-icon');\n if (span) {\n detach(span);\n }\n this.unWireEvents();\n if (isRippleEnabled) {\n this.removeRippleEffect();\n }\n };\n /**\n * Get component name.\n *\n * @returns {string} - Module name\n * @private\n */\n Button.prototype.getModuleName = function () {\n return 'btn';\n };\n /**\n * Get the properties to be maintained in the persisted state.\n *\n * @returns {string} - Persist Data\n * @private\n */\n Button.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n /**\n * Dynamically injects the required modules to the component.\n *\n * @private\n * @returns {void}\n */\n Button.Inject = function () {\n // Inject code snippets\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @param {ButtonModel} newProp - Specifies new properties\n * @param {ButtonModel} oldProp - Specifies old properties\n * @returns {void}\n * @private\n */\n Button.prototype.onPropertyChanged = function (newProp, oldProp) {\n var span = this.element.querySelector('span.e-btn-icon');\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'isPrimary':\n if (newProp.isPrimary) {\n this.element.classList.add(cssClassName.PRIMARY);\n }\n else {\n this.element.classList.remove(cssClassName.PRIMARY);\n }\n break;\n case 'disabled':\n this.controlStatus(newProp.disabled);\n break;\n case 'iconCss': {\n span = this.element.querySelector('span.e-btn-icon');\n if (span) {\n if (newProp.iconCss) {\n span.className = 'e-btn-icon ' + newProp.iconCss;\n if (this.element.textContent.trim()) {\n if (this.iconPosition === 'Left') {\n span.classList.add('e-icon-left');\n }\n else {\n span.classList.add('e-icon-right');\n }\n }\n }\n else {\n detach(span);\n }\n }\n else {\n this.setIconCss();\n }\n break;\n }\n case 'iconPosition':\n removeClass([this.element], ['e-top-icon-btn', 'e-bottom-icon-btn']);\n span = this.element.querySelector('span.e-btn-icon');\n if (span) {\n detach(span);\n }\n this.setIconCss();\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([this.element], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([this.element], newProp.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n this.element.classList.add(cssClassName.RTL);\n }\n else {\n this.element.classList.remove(cssClassName.RTL);\n }\n break;\n case 'content': {\n var node = getTextNode(this.element);\n if (!node) {\n this.element.classList.remove(cssClassName.ICONBTN);\n }\n if (!isBlazor() || (isBlazor() && !this.isServerRendered && this.getModuleName() !== 'progress-btn')) {\n if (this.enableHtmlSanitizer) {\n newProp.content = SanitizeHtmlHelper.sanitize(newProp.content);\n }\n this.element.innerHTML = newProp.content;\n this.setIconCss();\n }\n break;\n }\n case 'isToggle':\n if (newProp.isToggle) {\n EventHandler.add(this.element, 'click', this.btnClickHandler, this);\n }\n else {\n EventHandler.remove(this.element, 'click', this.btnClickHandler);\n removeClass([this.element], ['e-active']);\n }\n break;\n }\n }\n };\n /**\n * Click the button element\n * its native method\n *\n * @public\n * @returns {void}\n */\n Button.prototype.click = function () {\n this.element.click();\n };\n /**\n * Sets the focus to Button\n * its native method\n *\n * @public\n * @returns {void}\n */\n Button.prototype.focusIn = function () {\n this.element.focus();\n };\n __decorate([\n Property('Left')\n ], Button.prototype, \"iconPosition\", void 0);\n __decorate([\n Property('')\n ], Button.prototype, \"iconCss\", void 0);\n __decorate([\n Property(false)\n ], Button.prototype, \"disabled\", void 0);\n __decorate([\n Property(false)\n ], Button.prototype, \"isPrimary\", void 0);\n __decorate([\n Property('')\n ], Button.prototype, \"cssClass\", void 0);\n __decorate([\n Property('')\n ], Button.prototype, \"content\", void 0);\n __decorate([\n Property(false)\n ], Button.prototype, \"isToggle\", void 0);\n __decorate([\n Property()\n ], Button.prototype, \"locale\", void 0);\n __decorate([\n Property(true)\n ], Button.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Event()\n ], Button.prototype, \"created\", void 0);\n Button = __decorate([\n NotifyPropertyChanges\n ], Button);\n return Button;\n}(Component));\nexport { Button };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, NotifyPropertyChanges, Property, setValue } from '@syncfusion/ej2-base';\nimport { Event, EventHandler, isNullOrUndefined, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { addClass, detach, getUniqueID, isRippleEnabled, removeClass, rippleEffect, closest } from '@syncfusion/ej2-base';\nimport { wrapperInitialize, rippleMouseHandler, setHiddenInput } from './../common/common';\nvar CHECK = 'e-check';\nvar DISABLED = 'e-checkbox-disabled';\nvar FRAME = 'e-frame';\nvar INDETERMINATE = 'e-stop';\nvar LABEL = 'e-label';\nvar RIPPLE = 'e-ripple-container';\nvar RIPPLECHECK = 'e-ripple-check';\nvar RIPPLEINDETERMINATE = 'e-ripple-stop';\nvar RTL = 'e-rtl';\nvar WRAPPER = 'e-checkbox-wrapper';\nvar containerAttr = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'id', 'tabindex'];\n/**\n * The CheckBox is a graphical user interface element that allows you to select one or more options from the choices.\n * It contains checked, unchecked, and indeterminate states.\n * ```html\n * \n * \n * ```\n */\nvar CheckBox = /** @class */ (function (_super) {\n __extends(CheckBox, _super);\n /**\n * Constructor for creating the widget\n *\n * @private\n * @param {CheckBoxModel} options - Specifies checkbox model\n * @param {string | HTMLInputElement} element - Specifies target element\n */\n function CheckBox(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.isFocused = false;\n _this.isMouseClick = false;\n _this.clickTriggered = false;\n _this.validCheck = true;\n return _this;\n }\n CheckBox.prototype.changeState = function (state, isInitialize) {\n var wrapper = this.getWrapper();\n var rippleSpan = null;\n var frameSpan = null;\n if (wrapper) {\n frameSpan = wrapper.getElementsByClassName(FRAME)[0];\n if (isRippleEnabled) {\n rippleSpan = wrapper.getElementsByClassName(RIPPLE)[0];\n }\n }\n if (state === 'check') {\n if (frameSpan) {\n frameSpan.classList.remove(INDETERMINATE);\n frameSpan.classList.add(CHECK);\n }\n if (rippleSpan) {\n rippleSpan.classList.remove(RIPPLEINDETERMINATE);\n rippleSpan.classList.add(RIPPLECHECK);\n }\n this.element.checked = true;\n if ((this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) && this.validCheck && !isInitialize) {\n this.element.checked = false;\n this.validCheck = false;\n }\n else if (this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) {\n this.validCheck = true;\n }\n }\n else if (state === 'uncheck') {\n if (frameSpan) {\n removeClass([frameSpan], [CHECK, INDETERMINATE]);\n }\n if (rippleSpan) {\n removeClass([rippleSpan], [RIPPLECHECK, RIPPLEINDETERMINATE]);\n }\n this.element.checked = false;\n if ((this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) && this.validCheck && !isInitialize) {\n this.element.checked = true;\n this.validCheck = false;\n }\n else if (this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) {\n this.validCheck = true;\n }\n }\n else {\n if (frameSpan) {\n frameSpan.classList.remove(CHECK);\n frameSpan.classList.add(INDETERMINATE);\n }\n if (rippleSpan) {\n rippleSpan.classList.remove(RIPPLECHECK);\n rippleSpan.classList.add(RIPPLEINDETERMINATE);\n }\n this.element.indeterminate = true;\n this.indeterminate = true;\n }\n };\n CheckBox.prototype.clickHandler = function (event) {\n if (event.target.tagName === 'INPUT' && this.clickTriggered) {\n if (this.isVue) {\n this.changeState(this.checked ? 'check' : 'uncheck');\n }\n this.clickTriggered = false;\n return;\n }\n if (event.target.tagName === 'SPAN' || event.target.tagName === 'LABEL') {\n this.clickTriggered = true;\n }\n if (this.isMouseClick) {\n this.focusOutHandler();\n this.isMouseClick = false;\n }\n if (this.indeterminate) {\n this.changeState(this.checked ? 'check' : 'uncheck');\n this.indeterminate = false;\n this.element.indeterminate = false;\n }\n else if (this.checked) {\n this.changeState('uncheck');\n this.checked = false;\n }\n else {\n this.changeState('check');\n this.checked = true;\n }\n var changeEventArgs = { checked: this.updateVueArrayModel(false), event: event };\n this.trigger('change', changeEventArgs);\n event.stopPropagation();\n };\n /**\n * Destroys the widget.\n *\n * @returns {void}\n */\n CheckBox.prototype.destroy = function () {\n var _this = this;\n var wrapper = this.getWrapper();\n _super.prototype.destroy.call(this);\n if (this.wrapper) {\n wrapper = this.wrapper;\n if (!this.disabled) {\n this.unWireEvents();\n }\n if (this.tagName === 'INPUT') {\n if (this.getWrapper() && wrapper.parentNode) {\n wrapper.parentNode.insertBefore(this.element, wrapper);\n }\n detach(wrapper);\n this.element.checked = false;\n if (this.indeterminate) {\n this.element.indeterminate = false;\n }\n ['name', 'value', 'disabled'].forEach(function (key) {\n _this.element.removeAttribute(key);\n });\n }\n else {\n ['class'].forEach(function (key) {\n wrapper.removeAttribute(key);\n });\n wrapper.innerHTML = '';\n this.element = wrapper;\n if (this.refreshing) {\n ['e-control', 'e-checkbox', 'e-lib'].forEach(function (key) {\n _this.element.classList.add(key);\n });\n setValue('ej2_instances', [this], this.element);\n }\n }\n }\n };\n CheckBox.prototype.focusHandler = function () {\n this.isFocused = true;\n };\n CheckBox.prototype.focusOutHandler = function () {\n var wrapper = this.getWrapper();\n if (wrapper) {\n wrapper.classList.remove('e-focus');\n }\n this.isFocused = false;\n };\n /**\n * Gets the module name.\n *\n * @private\n * @returns {string} - Module Name\n */\n CheckBox.prototype.getModuleName = function () {\n return 'checkbox';\n };\n /**\n * Gets the properties to be maintained in the persistence state.\n *\n * @private\n * @returns {string} - Persist Data\n */\n CheckBox.prototype.getPersistData = function () {\n return this.addOnPersist(['checked', 'indeterminate']);\n };\n CheckBox.prototype.getWrapper = function () {\n if (this.element && this.element.parentElement) {\n return this.element.parentElement.parentElement;\n }\n else {\n return null;\n }\n };\n CheckBox.prototype.getLabel = function () {\n if (this.element) {\n return this.element.parentElement;\n }\n else {\n return null;\n }\n };\n CheckBox.prototype.initialize = function () {\n if (isNullOrUndefined(this.initialCheckedValue)) {\n this.initialCheckedValue = this.checked;\n }\n if (this.name) {\n this.element.setAttribute('name', this.name);\n }\n if (this.value) {\n this.element.setAttribute('value', this.value);\n if (this.isVue && typeof this.value === 'boolean' && this.value === true) {\n this.setProperties({ 'checked': true }, true);\n }\n }\n if (this.checked) {\n this.changeState('check', true);\n }\n if (this.indeterminate) {\n this.changeState();\n }\n if (this.disabled) {\n this.setDisabled();\n }\n };\n CheckBox.prototype.initWrapper = function () {\n var wrapper = this.element.parentElement;\n if (!wrapper.classList.contains(WRAPPER)) {\n wrapper = this.createElement('div', {\n className: WRAPPER\n });\n if (this.element.parentNode) {\n this.element.parentNode.insertBefore(wrapper, this.element);\n }\n }\n var label = this.createElement('label', { attrs: { for: this.element.id } });\n var frameSpan = this.createElement('span', { className: 'e-icons ' + FRAME });\n wrapper.classList.add('e-wrapper');\n if (this.enableRtl) {\n wrapper.classList.add(RTL);\n }\n if (this.cssClass) {\n addClass([wrapper], this.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n wrapper.appendChild(label);\n label.appendChild(this.element);\n setHiddenInput(this, label);\n label.appendChild(frameSpan);\n if (isRippleEnabled) {\n var rippleSpan = this.createElement('span', { className: RIPPLE });\n if (this.labelPosition === 'Before') {\n label.appendChild(rippleSpan);\n }\n else {\n label.insertBefore(rippleSpan, frameSpan);\n }\n rippleEffect(rippleSpan, { duration: 400, isCenterRipple: true });\n }\n if (this.label) {\n this.setText(this.label);\n }\n };\n CheckBox.prototype.keyUpHandler = function () {\n if (this.isFocused) {\n this.getWrapper().classList.add('e-focus');\n }\n };\n CheckBox.prototype.labelMouseDownHandler = function (e) {\n this.isMouseClick = true;\n var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];\n rippleMouseHandler(e, rippleSpan);\n };\n CheckBox.prototype.labelMouseLeaveHandler = function (e) {\n var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE)[0];\n if (rippleSpan) {\n var rippleElem = rippleSpan.querySelectorAll('.e-ripple-element');\n for (var i = rippleElem.length - 1; i > 0; i--) {\n rippleSpan.removeChild(rippleSpan.childNodes[i]);\n }\n rippleMouseHandler(e, rippleSpan);\n }\n };\n CheckBox.prototype.labelMouseUpHandler = function (e) {\n this.isMouseClick = true;\n var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];\n if (rippleSpan) {\n var rippleElem = rippleSpan.querySelectorAll('.e-ripple-element');\n for (var i = 0; i < rippleElem.length - 1; i++) {\n rippleSpan.removeChild(rippleSpan.childNodes[i]);\n }\n rippleMouseHandler(e, rippleSpan);\n }\n };\n /**\n * Called internally if any of the property value changes.\n *\n * @private\n * @param {CheckBoxModel} newProp - Specifies new Properties\n * @param {CheckBoxModel} oldProp - Specifies old Properties\n *\n * @returns {void}\n */\n CheckBox.prototype.onPropertyChanged = function (newProp, oldProp) {\n var wrapper = this.getWrapper();\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'checked':\n this.indeterminate = false;\n this.element.indeterminate = false;\n this.changeState(newProp.checked ? 'check' : 'uncheck');\n break;\n case 'indeterminate':\n if (newProp.indeterminate) {\n this.changeState();\n }\n else {\n this.element.indeterminate = false;\n this.changeState(this.checked ? 'check' : 'uncheck');\n }\n break;\n case 'disabled':\n if (newProp.disabled) {\n this.setDisabled();\n this.wrapper = this.getWrapper();\n this.unWireEvents();\n }\n else {\n this.element.disabled = false;\n wrapper.classList.remove(DISABLED);\n wrapper.setAttribute('aria-disabled', 'false');\n this.wireEvents();\n }\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([wrapper], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([wrapper], newProp.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n wrapper.classList.add(RTL);\n }\n else {\n wrapper.classList.remove(RTL);\n }\n break;\n case 'label':\n this.setText(newProp.label);\n break;\n case 'labelPosition': {\n var label = wrapper.getElementsByClassName(LABEL)[0];\n var labelWrap = wrapper.getElementsByTagName('label')[0];\n detach(label);\n if (newProp.labelPosition === 'After') {\n labelWrap.appendChild(label);\n }\n else {\n labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME)[0]);\n }\n break;\n }\n case 'name':\n this.element.setAttribute('name', newProp.name);\n break;\n case 'value':\n if (this.isVue && typeof newProp.value === 'object') {\n break;\n }\n this.element.setAttribute('value', newProp.value);\n break;\n case 'htmlAttributes':\n this.updateHtmlAttributeToWrapper();\n break;\n }\n }\n };\n /**\n * Initialize Angular, React and Unique ID support.\n *\n * @private\n * @returns {void}\n */\n CheckBox.prototype.preRender = function () {\n var element = this.element;\n this.tagName = this.element.tagName;\n element = wrapperInitialize(this.createElement, 'EJS-CHECKBOX', 'checkbox', element, WRAPPER, 'checkbox');\n this.element = element;\n if (this.element.getAttribute('type') !== 'checkbox') {\n this.element.setAttribute('type', 'checkbox');\n }\n if (!this.element.id) {\n this.element.id = getUniqueID('e-' + this.getModuleName());\n }\n };\n /**\n * Initialize the control rendering.\n *\n * @private\n * @returns {void}\n */\n CheckBox.prototype.render = function () {\n this.initWrapper();\n this.initialize();\n if (!this.disabled) {\n this.wireEvents();\n }\n this.updateHtmlAttributeToWrapper();\n this.updateVueArrayModel(true);\n this.renderComplete();\n this.wrapper = this.getWrapper();\n };\n CheckBox.prototype.setDisabled = function () {\n var wrapper = this.getWrapper();\n this.element.disabled = true;\n wrapper.classList.add(DISABLED);\n wrapper.setAttribute('aria-disabled', 'true');\n };\n CheckBox.prototype.setText = function (text) {\n var wrapper = this.getWrapper();\n if (!wrapper) {\n return;\n }\n var label = wrapper.getElementsByClassName(LABEL)[0];\n if (label) {\n label.textContent = text;\n }\n else {\n text = (this.enableHtmlSanitizer) ? SanitizeHtmlHelper.sanitize(text) : text;\n label = this.createElement('span', { className: LABEL, innerHTML: text });\n var labelWrap = wrapper.getElementsByTagName('label')[0];\n if (this.labelPosition === 'Before') {\n labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME)[0]);\n }\n else {\n labelWrap.appendChild(label);\n }\n }\n };\n CheckBox.prototype.changeHandler = function (e) {\n e.stopPropagation();\n };\n CheckBox.prototype.formResetHandler = function () {\n this.checked = this.initialCheckedValue;\n this.element.checked = this.initialCheckedValue;\n };\n CheckBox.prototype.unWireEvents = function () {\n var wrapper = this.wrapper;\n EventHandler.remove(wrapper, 'click', this.clickHandler);\n EventHandler.remove(this.element, 'keyup', this.keyUpHandler);\n EventHandler.remove(this.element, 'focus', this.focusHandler);\n EventHandler.remove(this.element, 'focusout', this.focusOutHandler);\n var label = wrapper.getElementsByTagName('label')[0];\n if (label) {\n EventHandler.remove(label, 'mousedown', this.labelMouseDownHandler);\n EventHandler.remove(label, 'mouseup', this.labelMouseUpHandler);\n EventHandler.remove(label, 'mouseleave', this.labelMouseLeaveHandler);\n }\n var formElem = closest(this.element, 'form');\n if (formElem) {\n EventHandler.remove(formElem, 'reset', this.formResetHandler);\n }\n if (this.tagName === 'EJS-CHECKBOX') {\n EventHandler.remove(this.element, 'change', this.changeHandler);\n }\n };\n CheckBox.prototype.wireEvents = function () {\n var wrapper = this.getWrapper();\n EventHandler.add(wrapper, 'click', this.clickHandler, this);\n EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);\n EventHandler.add(this.element, 'focus', this.focusHandler, this);\n EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);\n var label = wrapper.getElementsByTagName('label')[0];\n EventHandler.add(label, 'mousedown', this.labelMouseDownHandler, this);\n EventHandler.add(label, 'mouseup', this.labelMouseUpHandler, this);\n EventHandler.add(label, 'mouseleave', this.labelMouseLeaveHandler, this);\n var formElem = closest(this.element, 'form');\n if (formElem) {\n EventHandler.add(formElem, 'reset', this.formResetHandler, this);\n }\n if (this.tagName === 'EJS-CHECKBOX') {\n EventHandler.add(this.element, 'change', this.changeHandler, this);\n }\n };\n CheckBox.prototype.updateVueArrayModel = function (init) {\n if (this.isVue && typeof this.value === 'object') {\n var value = this.element.value;\n if (value && this.value) {\n if (init) {\n for (var i = 0; i < this.value.length; i++) {\n if (value === this.value[i]) {\n this.changeState('check');\n this.setProperties({ 'checked': true }, true);\n }\n }\n }\n else {\n var index = this.value.indexOf(value);\n if (this.checked) {\n if (index < 0) {\n this.value.push(value);\n }\n }\n else {\n if (index > -1) {\n this.value.splice(index, 1);\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return this.value;\n }\n }\n }\n return this.validCheck ? this.element.checked : !this.element.checked;\n };\n CheckBox.prototype.updateHtmlAttributeToWrapper = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n var wrapper = this.getWrapper();\n if (containerAttr.indexOf(key) > -1) {\n if (key === 'class') {\n addClass([wrapper], this.htmlAttributes[\"\" + key].split(' '));\n }\n else if (key === 'title') {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else if (key === 'style') {\n var frameSpan = this.getWrapper().getElementsByClassName(FRAME)[0];\n frameSpan.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else if (key === 'disabled') {\n if (this.htmlAttributes[\"\" + key] === 'true') {\n this.setDisabled();\n }\n this.element.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else {\n this.element.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n else {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n };\n /**\n * Click the CheckBox element\n * its native method\n *\n * @public\n * @returns {void}\n */\n CheckBox.prototype.click = function () {\n this.element.click();\n };\n /**\n * Sets the focus to CheckBox\n * its native method\n *\n * @public\n * @returns {void}\n */\n CheckBox.prototype.focusIn = function () {\n this.element.focus();\n };\n __decorate([\n Event()\n ], CheckBox.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], CheckBox.prototype, \"created\", void 0);\n __decorate([\n Property(false)\n ], CheckBox.prototype, \"checked\", void 0);\n __decorate([\n Property('')\n ], CheckBox.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], CheckBox.prototype, \"disabled\", void 0);\n __decorate([\n Property(false)\n ], CheckBox.prototype, \"indeterminate\", void 0);\n __decorate([\n Property('')\n ], CheckBox.prototype, \"label\", void 0);\n __decorate([\n Property('After')\n ], CheckBox.prototype, \"labelPosition\", void 0);\n __decorate([\n Property('')\n ], CheckBox.prototype, \"name\", void 0);\n __decorate([\n Property('')\n ], CheckBox.prototype, \"value\", void 0);\n __decorate([\n Property(true)\n ], CheckBox.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property({})\n ], CheckBox.prototype, \"htmlAttributes\", void 0);\n CheckBox = __decorate([\n NotifyPropertyChanges\n ], CheckBox);\n return CheckBox;\n}(Component));\nexport { CheckBox };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, rippleEffect, NotifyPropertyChanges, Property, closest, setValue } from '@syncfusion/ej2-base';\nimport { addClass, getInstance, getUniqueID, isRippleEnabled, removeClass, attributes, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { detach, Event, EventHandler, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { wrapperInitialize, rippleMouseHandler } from './../common/common';\nvar LABEL = 'e-label';\nvar RIPPLE = 'e-ripple-container';\nvar RTL = 'e-rtl';\nvar WRAPPER = 'e-radio-wrapper';\nvar ATTRIBUTES = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'id'];\n/**\n * The RadioButton is a graphical user interface element that allows you to select one option from the choices.\n * It contains checked and unchecked states.\n * ```html\n * \n * \n * ```\n */\nvar RadioButton = /** @class */ (function (_super) {\n __extends(RadioButton, _super);\n /**\n * Constructor for creating the widget\n *\n * @private\n * @param {RadioButtonModel} options - Specifies Radio button model\n * @param {string | HTMLInputElement} element - Specifies target element\n */\n function RadioButton(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.isFocused = false;\n return _this;\n }\n RadioButton_1 = RadioButton;\n RadioButton.prototype.changeHandler = function (event) {\n this.checked = true;\n this.dataBind();\n var value = this.element.getAttribute('value');\n value = this.isVue && value ? this.element.value : this.value;\n var type = typeof this.value;\n if (this.isVue && type === 'boolean') {\n value = value === 'true' ? true : false;\n }\n this.trigger('change', { value: value, event: event });\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (this.isAngular) {\n event.stopPropagation();\n }\n };\n RadioButton.prototype.updateChange = function () {\n var input;\n var instance;\n var radioGrp = this.getRadioGroup();\n for (var i = 0; i < radioGrp.length; i++) {\n input = radioGrp[i];\n if (input !== this.element) {\n instance = getInstance(input, RadioButton_1);\n instance.checked = false;\n if (this.tagName === 'EJS-RADIOBUTTON') {\n instance.angularValue = this.value;\n }\n }\n }\n };\n /**\n * Destroys the widget.\n *\n * @returns {void}\n */\n RadioButton.prototype.destroy = function () {\n var _this = this;\n var radioWrap = this.wrapper;\n _super.prototype.destroy.call(this);\n if (radioWrap) {\n if (!this.disabled) {\n this.unWireEvents();\n }\n if (this.tagName === 'INPUT') {\n if (radioWrap.parentNode) {\n radioWrap.parentNode.insertBefore(this.element, radioWrap);\n }\n detach(radioWrap);\n this.element.checked = false;\n ['name', 'value', 'disabled'].forEach(function (key) {\n _this.element.removeAttribute(key);\n });\n }\n else {\n ['role', 'aria-checked', 'class'].forEach(function (key) {\n radioWrap.removeAttribute(key);\n });\n radioWrap.innerHTML = '';\n this.element = this.wrapper;\n if (this.refreshing) {\n ['e-control', 'e-radio', 'e-lib'].forEach(function (key) {\n _this.element.classList.add(key);\n });\n setValue('ej2_instances', [this], this.element);\n }\n }\n }\n };\n RadioButton.prototype.focusHandler = function () {\n this.isFocused = true;\n };\n RadioButton.prototype.focusOutHandler = function () {\n var label = this.getLabel();\n if (label) {\n label.classList.remove('e-focus');\n }\n };\n RadioButton.prototype.getModuleName = function () {\n return 'radio';\n };\n /**\n * To get the value of selected radio button in a group.\n *\n * @method getSelectedValue\n * @returns {string} - Selected Value\n */\n RadioButton.prototype.getSelectedValue = function () {\n var input;\n var radioGrp = this.getRadioGroup();\n for (var i = 0, len = radioGrp.length; i < len; i++) {\n input = radioGrp[i];\n if (input.checked) {\n return input.value;\n }\n }\n return '';\n };\n RadioButton.prototype.getRadioGroup = function () {\n return document.querySelectorAll('input.e-radio[name=\"' + this.element.getAttribute('name') + '\"]');\n };\n /**\n * Gets the properties to be maintained in the persistence state.\n *\n * @private\n * @returns {string} - Persist Data\n */\n RadioButton.prototype.getPersistData = function () {\n return this.addOnPersist(['checked']);\n };\n RadioButton.prototype.getWrapper = function () {\n if (this.element.parentElement) {\n return this.element.parentElement;\n }\n else {\n return null;\n }\n };\n RadioButton.prototype.getLabel = function () {\n if (this.element.nextElementSibling) {\n return this.element.nextElementSibling;\n }\n else {\n return null;\n }\n };\n RadioButton.prototype.initialize = function () {\n if (isNullOrUndefined(this.initialCheckedValue)) {\n this.initialCheckedValue = this.checked;\n }\n this.initWrapper();\n this.updateHtmlAttribute();\n if (this.name) {\n this.element.setAttribute('name', this.name);\n }\n var value = this.element.getAttribute('value');\n var type = typeof this.value;\n if (this.isVue && type === 'boolean') {\n value = value === 'true' ? true : false;\n }\n if (this.isVue ? this.value && type !== 'boolean' && !value : this.value) {\n this.element.setAttribute('value', this.value);\n }\n if (this.checked) {\n this.element.checked = true;\n }\n if (this.disabled) {\n this.setDisabled();\n }\n };\n RadioButton.prototype.initWrapper = function () {\n var rippleSpan;\n var wrapper = this.element.parentElement;\n if (!wrapper.classList.contains(WRAPPER)) {\n wrapper = this.createElement('div', { className: WRAPPER });\n if (this.element.parentNode) {\n this.element.parentNode.insertBefore(wrapper, this.element);\n }\n }\n var label = this.createElement('label', { attrs: { for: this.element.id } });\n wrapper.appendChild(this.element);\n wrapper.appendChild(label);\n if (isRippleEnabled) {\n rippleSpan = this.createElement('span', { className: (RIPPLE) });\n label.appendChild(rippleSpan);\n rippleEffect(rippleSpan, {\n duration: 400,\n isCenterRipple: true\n });\n }\n wrapper.classList.add('e-wrapper');\n if (this.enableRtl) {\n label.classList.add(RTL);\n }\n if (this.cssClass) {\n addClass([wrapper], this.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n if (this.label) {\n this.setText(this.label);\n }\n };\n RadioButton.prototype.keyUpHandler = function () {\n if (this.isFocused) {\n this.getLabel().classList.add('e-focus');\n }\n };\n RadioButton.prototype.labelMouseDownHandler = function (e) {\n var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE)[0];\n rippleMouseHandler(e, rippleSpan);\n };\n RadioButton.prototype.labelMouseLeaveHandler = function (e) {\n var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE)[0];\n if (rippleSpan) {\n var rippleElem = rippleSpan.querySelectorAll('.e-ripple-element');\n for (var i = rippleElem.length - 1; i > 0; i--) {\n rippleSpan.removeChild(rippleSpan.childNodes[i]);\n }\n rippleMouseHandler(e, rippleSpan);\n }\n };\n RadioButton.prototype.labelMouseUpHandler = function (e) {\n var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE)[0];\n if (rippleSpan) {\n var rippleElem = rippleSpan.querySelectorAll('.e-ripple-element');\n for (var i = rippleElem.length - 1; i > 0; i--) {\n rippleSpan.removeChild(rippleSpan.childNodes[i]);\n }\n rippleMouseHandler(e, rippleSpan);\n }\n };\n RadioButton.prototype.formResetHandler = function () {\n this.checked = this.initialCheckedValue;\n if (this.initialCheckedValue) {\n attributes(this.element, { 'checked': 'true' });\n }\n };\n /**\n * Called internally if any of the property value changes.\n *\n * @private\n * @param {RadioButtonModel} newProp - Specifies New Properties\n * @param {RadioButtonModel} oldProp - Specifies Old Properties\n * @returns {void}\n */\n RadioButton.prototype.onPropertyChanged = function (newProp, oldProp) {\n var wrap = this.getWrapper();\n var label = this.getLabel();\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'checked':\n if (newProp.checked) {\n this.updateChange();\n }\n this.element.checked = newProp.checked;\n break;\n case 'disabled':\n if (newProp.disabled) {\n this.setDisabled();\n this.unWireEvents();\n }\n else {\n this.element.disabled = false;\n this.wireEvents();\n }\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([wrap], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([wrap], newProp.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n label.classList.add(RTL);\n }\n else {\n label.classList.remove(RTL);\n }\n break;\n case 'label':\n this.setText(newProp.label);\n break;\n case 'labelPosition':\n if (newProp.labelPosition === 'Before') {\n label.classList.add('e-right');\n }\n else {\n label.classList.remove('e-right');\n }\n break;\n case 'name':\n this.element.setAttribute('name', newProp.name);\n break;\n case 'value':\n // eslint-disable-next-line no-case-declarations\n var type = typeof this.htmlAttributes.value;\n if (!isNullOrUndefined(this.htmlAttributes) && (this.htmlAttributes.value || type === 'boolean' && !this.htmlAttributes.value)) {\n break;\n }\n this.element.setAttribute('value', newProp.value);\n break;\n case 'htmlAttributes':\n this.updateHtmlAttribute();\n break;\n }\n }\n };\n /**\n * Initialize checked Property, Angular and React and Unique ID support.\n *\n * @private\n * @returns {void}\n */\n RadioButton.prototype.preRender = function () {\n var element = this.element;\n this.formElement = closest(this.element, 'form');\n this.tagName = this.element.tagName;\n element = wrapperInitialize(this.createElement, 'EJS-RADIOBUTTON', 'radio', element, WRAPPER, 'radio');\n this.element = element;\n if (this.element.getAttribute('type') !== 'radio') {\n this.element.setAttribute('type', 'radio');\n }\n if (!this.element.id) {\n this.element.id = getUniqueID('e-' + this.getModuleName());\n }\n if (this.tagName === 'EJS-RADIOBUTTON') {\n var formControlName = this.element.getAttribute('formcontrolname');\n if (formControlName) {\n this.setProperties({ 'name': formControlName }, true);\n this.element.setAttribute('name', formControlName);\n }\n }\n };\n /**\n * Initialize the control rendering\n *\n * @private\n * @returns {void}\n */\n RadioButton.prototype.render = function () {\n this.initialize();\n if (!this.disabled) {\n this.wireEvents();\n }\n this.renderComplete();\n this.wrapper = this.getWrapper();\n };\n RadioButton.prototype.setDisabled = function () {\n this.element.disabled = true;\n };\n RadioButton.prototype.setText = function (text) {\n var label = this.getLabel();\n var textLabel = label.getElementsByClassName(LABEL)[0];\n if (textLabel) {\n textLabel.textContent = text;\n }\n else {\n text = (this.enableHtmlSanitizer) ? SanitizeHtmlHelper.sanitize(text) : text;\n textLabel = this.createElement('span', { className: LABEL, innerHTML: text });\n label.appendChild(textLabel);\n }\n if (this.labelPosition === 'Before') {\n this.getLabel().classList.add('e-right');\n }\n else {\n this.getLabel().classList.remove('e-right');\n }\n };\n RadioButton.prototype.updateHtmlAttribute = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n var wrapper = this.element.parentElement;\n if (ATTRIBUTES.indexOf(key) > -1) {\n if (key === 'class') {\n addClass([wrapper], this.htmlAttributes[\"\" + key].replace(/\\s+/g, ' ').trim().split(' '));\n }\n else if (key === 'title' || key === 'style') {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else {\n this.element.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n else {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n };\n RadioButton.prototype.unWireEvents = function () {\n var label = this.wrapper;\n EventHandler.remove(this.element, 'change', this.changeHandler);\n EventHandler.remove(this.element, 'focus', this.focusHandler);\n EventHandler.remove(this.element, 'focusout', this.focusOutHandler);\n EventHandler.remove(this.element, 'keyup', this.keyUpHandler);\n var rippleLabel = label.getElementsByTagName('label')[0];\n if (rippleLabel) {\n EventHandler.remove(rippleLabel, 'mousedown', this.labelMouseDownHandler);\n EventHandler.remove(rippleLabel, 'mouseup', this.labelMouseUpHandler);\n EventHandler.remove(rippleLabel, 'mouseleave', this.labelMouseLeaveHandler);\n }\n if (this.formElement) {\n EventHandler.remove(this.formElement, 'reset', this.formResetHandler);\n }\n };\n RadioButton.prototype.wireEvents = function () {\n var label = this.getLabel();\n EventHandler.add(this.element, 'change', this.changeHandler, this);\n EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);\n EventHandler.add(this.element, 'focus', this.focusHandler, this);\n EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);\n var rippleLabel = label.getElementsByClassName(LABEL)[0];\n if (rippleLabel) {\n EventHandler.add(rippleLabel, 'mousedown', this.labelMouseDownHandler, this);\n EventHandler.add(rippleLabel, 'mouseup', this.labelMouseUpHandler, this);\n EventHandler.add(rippleLabel, 'mouseleave', this.labelMouseLeaveHandler, this);\n }\n if (this.formElement) {\n EventHandler.add(this.formElement, 'reset', this.formResetHandler, this);\n }\n };\n /**\n * Click the RadioButton element\n * its native method\n *\n * @public\n * @returns {void}\n */\n RadioButton.prototype.click = function () {\n this.element.click();\n };\n /**\n * Sets the focus to RadioButton\n * its native method\n *\n * @public\n * @returns {void}\n */\n RadioButton.prototype.focusIn = function () {\n this.element.focus();\n };\n var RadioButton_1;\n __decorate([\n Event()\n ], RadioButton.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], RadioButton.prototype, \"created\", void 0);\n __decorate([\n Property(false)\n ], RadioButton.prototype, \"checked\", void 0);\n __decorate([\n Property('')\n ], RadioButton.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], RadioButton.prototype, \"disabled\", void 0);\n __decorate([\n Property('')\n ], RadioButton.prototype, \"label\", void 0);\n __decorate([\n Property('After')\n ], RadioButton.prototype, \"labelPosition\", void 0);\n __decorate([\n Property('')\n ], RadioButton.prototype, \"name\", void 0);\n __decorate([\n Property('')\n ], RadioButton.prototype, \"value\", void 0);\n __decorate([\n Property(true)\n ], RadioButton.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property({})\n ], RadioButton.prototype, \"htmlAttributes\", void 0);\n RadioButton = RadioButton_1 = __decorate([\n NotifyPropertyChanges\n ], RadioButton);\n return RadioButton;\n}(Component));\nexport { RadioButton };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, NotifyPropertyChanges, Property, closest, setValue } from '@syncfusion/ej2-base';\nimport { Event, EventHandler } from '@syncfusion/ej2-base';\nimport { addClass, isRippleEnabled, removeClass, rippleEffect, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { rippleMouseHandler, destroy, preRender, setHiddenInput } from './../common/common';\nvar DISABLED = 'e-switch-disabled';\nvar RIPPLE = 'e-ripple-container';\nvar RIPPLE_CHECK = 'e-ripple-check';\nvar RTL = 'e-rtl';\nvar WRAPPER = 'e-switch-wrapper';\nvar ACTIVE = 'e-switch-active';\nvar ATTRIBUTES = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'aria-label', 'id', 'role', 'tabindex'];\n/**\n * The Switch is a graphical user interface element that allows you to toggle between checked and unchecked states.\n * ```html\n * \n * \n * ```\n */\nvar Switch = /** @class */ (function (_super) {\n __extends(Switch, _super);\n /**\n * Constructor for creating the widget.\n *\n * @private\n *\n * @param {SwitchModel} options switch model\n * @param {string | HTMLInputElement} element target element\n *\n */\n function Switch(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.isFocused = false;\n _this.isDrag = false;\n _this.isWireEvents = false;\n return _this;\n }\n Switch.prototype.changeState = function (state) {\n var rippleSpan = null;\n var wrapper = this.getWrapper();\n var bar = wrapper.querySelector('.e-switch-inner');\n var handle = wrapper.querySelector('.e-switch-handle');\n if (isRippleEnabled) {\n rippleSpan = wrapper.getElementsByClassName(RIPPLE)[0];\n }\n if (state) {\n addClass([bar, handle], ACTIVE);\n this.element.checked = true;\n this.checked = true;\n if (rippleSpan) {\n addClass([rippleSpan], [RIPPLE_CHECK]);\n }\n }\n else {\n removeClass([bar, handle], ACTIVE);\n this.element.checked = false;\n this.checked = false;\n if (rippleSpan) {\n removeClass([rippleSpan], [RIPPLE_CHECK]);\n }\n }\n };\n Switch.prototype.clickHandler = function (evt) {\n this.isDrag = false;\n this.focusOutHandler();\n this.changeState(!this.checked);\n this.element.focus();\n var changeEventArgs = { checked: this.element.checked, event: evt };\n this.trigger('change', changeEventArgs);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (this.isAngular && evt) {\n evt.stopPropagation();\n evt.preventDefault();\n }\n };\n /**\n * Destroys the Switch widget.\n *\n * @returns {void}\n */\n Switch.prototype.destroy = function () {\n var _this = this;\n _super.prototype.destroy.call(this);\n if (!this.disabled) {\n this.unWireEvents();\n }\n destroy(this, this.getWrapper(), this.tagName);\n if (this.refreshing) {\n ['e-control', 'e-switch', 'e-lib'].forEach(function (key) {\n _this.element.classList.add(key);\n });\n setValue('ej2_instances', [this], this.element);\n }\n };\n Switch.prototype.focusHandler = function () {\n this.isFocused = true;\n };\n Switch.prototype.focusOutHandler = function () {\n this.getWrapper().classList.remove('e-focus');\n };\n /**\n * Gets the module name.\n *\n * @private\n * @returns {string} - Module Name\n */\n Switch.prototype.getModuleName = function () {\n return 'switch';\n };\n /**\n * Gets the properties to be maintained in the persistence state.\n *\n * @private\n * @returns {string} - Persist data\n */\n Switch.prototype.getPersistData = function () {\n return this.addOnPersist(['checked']);\n };\n Switch.prototype.getWrapper = function () {\n if (this.element.parentElement) {\n return this.element.parentElement;\n }\n else {\n return null;\n }\n };\n Switch.prototype.initialize = function () {\n this.element.setAttribute('role', 'switch');\n if (isNullOrUndefined(this.initialSwitchCheckedValue)) {\n this.initialSwitchCheckedValue = this.checked;\n }\n if (this.name) {\n this.element.setAttribute('name', this.name);\n }\n if (this.value) {\n this.element.setAttribute('value', this.value);\n }\n if (this.checked) {\n this.changeState(true);\n }\n if (this.disabled) {\n this.setDisabled();\n }\n if (this.onLabel || this.offLabel) {\n this.setLabel(this.onLabel, this.offLabel);\n }\n };\n Switch.prototype.initWrapper = function () {\n var wrapper = this.element.parentElement;\n if (!wrapper.classList.contains(WRAPPER)) {\n wrapper = this.createElement('div', {\n className: WRAPPER\n });\n this.element.parentNode.insertBefore(wrapper, this.element);\n }\n var switchInner = this.createElement('span', { className: 'e-switch-inner' });\n var onLabel = this.createElement('span', { className: 'e-switch-on' });\n var offLabel = this.createElement('span', { className: 'e-switch-off' });\n var handle = this.createElement('span', { className: 'e-switch-handle' });\n wrapper.appendChild(this.element);\n setHiddenInput(this, wrapper);\n switchInner.appendChild(onLabel);\n switchInner.appendChild(offLabel);\n wrapper.appendChild(switchInner);\n wrapper.appendChild(handle);\n if (isRippleEnabled) {\n var rippleSpan = this.createElement('span', { className: RIPPLE });\n handle.appendChild(rippleSpan);\n rippleEffect(rippleSpan, { duration: 400, isCenterRipple: true });\n }\n wrapper.classList.add('e-wrapper');\n if (this.enableRtl) {\n wrapper.classList.add(RTL);\n }\n if (this.cssClass) {\n addClass([wrapper], this.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n };\n /**\n * Called internally if any of the property value changes.\n *\n * @private\n * @param {SwitchModel} newProp - Specifies New Properties\n * @param {SwitchModel} oldProp - Specifies Old Properties\n * @returns {void}\n */\n Switch.prototype.onPropertyChanged = function (newProp, oldProp) {\n var wrapper = this.getWrapper();\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'checked':\n this.changeState(newProp.checked);\n break;\n case 'disabled':\n if (newProp.disabled) {\n this.setDisabled();\n this.unWireEvents();\n this.isWireEvents = false;\n }\n else {\n this.element.disabled = false;\n wrapper.classList.remove(DISABLED);\n wrapper.setAttribute('aria-disabled', 'false');\n if (!this.isWireEvents) {\n this.wireEvents();\n this.isWireEvents = true;\n }\n }\n break;\n case 'value':\n this.element.setAttribute('value', newProp.value);\n break;\n case 'name':\n this.element.setAttribute('name', newProp.name);\n break;\n case 'onLabel':\n case 'offLabel':\n this.setLabel(newProp.onLabel, newProp.offLabel);\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n wrapper.classList.add(RTL);\n }\n else {\n wrapper.classList.remove(RTL);\n }\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([wrapper], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([wrapper], newProp.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n break;\n case 'htmlAttributes':\n this.updateHtmlAttribute();\n break;\n }\n }\n };\n /**\n * Initialize Angular, React and Unique ID support.\n *\n * @private\n * @returns {void}\n */\n Switch.prototype.preRender = function () {\n var element = this.element;\n this.formElement = closest(this.element, 'form');\n this.tagName = this.element.tagName;\n preRender(this, 'EJS-SWITCH', WRAPPER, element, this.getModuleName());\n };\n /**\n * Initialize control rendering.\n *\n * @private\n * @returns {void}\n */\n Switch.prototype.render = function () {\n this.initWrapper();\n this.initialize();\n if (!this.disabled) {\n this.wireEvents();\n }\n this.renderComplete();\n this.updateHtmlAttribute();\n };\n Switch.prototype.rippleHandler = function (e) {\n var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];\n rippleMouseHandler(e, rippleSpan);\n if (e.type === 'mousedown' && e.currentTarget.classList.contains('e-switch-wrapper') && e.which === 1) {\n this.isDrag = true;\n this.isFocused = false;\n }\n };\n Switch.prototype.mouseLeaveHandler = function (e) {\n var rippleSpan = this.element.parentElement.getElementsByClassName(RIPPLE)[0];\n if (rippleSpan) {\n var rippleElem = rippleSpan.querySelectorAll('.e-ripple-element');\n for (var i = rippleElem.length - 1; i > 0; i--) {\n rippleSpan.removeChild(rippleSpan.childNodes[i]);\n }\n rippleMouseHandler(e, rippleSpan);\n }\n };\n Switch.prototype.rippleTouchHandler = function (eventType) {\n var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];\n if (rippleSpan) {\n var event_1 = document.createEvent('MouseEvents');\n event_1.initEvent(eventType, false, true);\n rippleSpan.dispatchEvent(event_1);\n }\n };\n Switch.prototype.setDisabled = function () {\n var wrapper = this.getWrapper();\n this.element.disabled = true;\n wrapper.classList.add(DISABLED);\n wrapper.setAttribute('aria-disabled', 'true');\n };\n Switch.prototype.setLabel = function (onText, offText) {\n var wrapper = this.getWrapper();\n if (onText) {\n wrapper.querySelector('.e-switch-on').textContent = onText;\n }\n if (offText) {\n wrapper.querySelector('.e-switch-off').textContent = offText;\n }\n };\n Switch.prototype.updateHtmlAttribute = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n var wrapper = this.getWrapper();\n if (ATTRIBUTES.indexOf(key) > -1) {\n if (key === 'class') {\n addClass([wrapper], this.htmlAttributes[\"\" + key].split(' '));\n }\n else if (key === 'title') {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else if (key === 'style') {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else if (key === 'disabled') {\n if (this.htmlAttributes[\"\" + key] === 'true') {\n this.setDisabled();\n }\n this.element.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else {\n this.element.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n else {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n };\n Switch.prototype.switchFocusHandler = function () {\n if (this.isFocused) {\n this.getWrapper().classList.add('e-focus');\n }\n };\n Switch.prototype.switchMouseUp = function (e) {\n var aTouchY = 0;\n var yDiff = 0;\n var aTouchX = 0;\n var xDiff = 0;\n var target = e.target;\n if (e.type === 'touchmove') {\n e.preventDefault();\n aTouchX = e.changedTouches[0].clientX;\n aTouchY = e.changedTouches[0].clientY;\n xDiff = this.bTouchX - aTouchX;\n yDiff = this.bTouchY - aTouchY;\n if (Math.abs(xDiff) < Math.abs(yDiff)) {\n this.isDrag = false;\n this.rippleTouchHandler('mouseup');\n }\n else {\n this.isDrag = true;\n }\n }\n if (e.type === 'touchstart') {\n this.bTouchX = e.changedTouches[0].clientX;\n this.bTouchY = e.changedTouches[0].clientY;\n this.isDrag = true;\n this.rippleTouchHandler('mousedown');\n }\n if (this.isDrag) {\n if ((e.type === 'mouseup' && target.className.indexOf('e-switch') < 0) || e.type === 'touchend') {\n xDiff = this.bTouchX - e.changedTouches[0].clientX;\n yDiff = this.bTouchY - e.changedTouches[0].clientY;\n if (Math.abs(xDiff) >= Math.abs(yDiff)) {\n this.clickHandler(e);\n this.rippleTouchHandler('mouseup');\n e.preventDefault();\n }\n }\n }\n };\n Switch.prototype.formResetHandler = function () {\n this.checked = this.initialSwitchCheckedValue;\n this.element.checked = this.initialSwitchCheckedValue;\n };\n /**\n * Toggle the Switch component state into checked/unchecked.\n *\n * @returns {void}\n */\n Switch.prototype.toggle = function () {\n this.clickHandler();\n };\n Switch.prototype.wireEvents = function () {\n var wrapper = this.getWrapper();\n this.delegateMouseUpHandler = this.switchMouseUp.bind(this);\n this.delegateKeyUpHandler = this.switchFocusHandler.bind(this);\n EventHandler.add(wrapper, 'click', this.clickHandler, this);\n EventHandler.add(this.element, 'focus', this.focusHandler, this);\n EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);\n EventHandler.add(this.element, 'mouseup', this.delegateMouseUpHandler, this);\n EventHandler.add(this.element, 'keyup', this.delegateKeyUpHandler, this);\n EventHandler.add(wrapper, 'mousedown mouseup', this.rippleHandler, this);\n EventHandler.add(wrapper, 'mouseleave', this.mouseLeaveHandler, this);\n EventHandler.add(wrapper, 'touchstart touchmove touchend', this.switchMouseUp, this);\n if (this.formElement) {\n EventHandler.add(this.formElement, 'reset', this.formResetHandler, this);\n }\n };\n Switch.prototype.unWireEvents = function () {\n var wrapper = this.getWrapper();\n EventHandler.remove(wrapper, 'click', this.clickHandler);\n EventHandler.remove(this.element, 'focus', this.focusHandler);\n EventHandler.remove(this.element, 'focusout', this.focusOutHandler);\n EventHandler.remove(this.element, 'mouseup', this.delegateMouseUpHandler);\n EventHandler.remove(this.element, 'keyup', this.delegateKeyUpHandler);\n EventHandler.remove(wrapper, 'mousedown mouseup', this.rippleHandler);\n EventHandler.remove(wrapper, 'mouseleave', this.mouseLeaveHandler);\n EventHandler.remove(wrapper, 'touchstart touchmove touchend', this.switchMouseUp);\n if (this.formElement) {\n EventHandler.remove(this.formElement, 'reset', this.formResetHandler);\n }\n };\n /**\n * Click the switch element\n * its native method\n *\n * @public\n * @returns {void}\n */\n Switch.prototype.click = function () {\n this.element.click();\n };\n /**\n * Sets the focus to Switch\n * its native method\n *\n * @public\n */\n Switch.prototype.focusIn = function () {\n this.element.focus();\n };\n __decorate([\n Event()\n ], Switch.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], Switch.prototype, \"created\", void 0);\n __decorate([\n Property(false)\n ], Switch.prototype, \"checked\", void 0);\n __decorate([\n Property('')\n ], Switch.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], Switch.prototype, \"disabled\", void 0);\n __decorate([\n Property('')\n ], Switch.prototype, \"name\", void 0);\n __decorate([\n Property('')\n ], Switch.prototype, \"onLabel\", void 0);\n __decorate([\n Property('')\n ], Switch.prototype, \"offLabel\", void 0);\n __decorate([\n Property('')\n ], Switch.prototype, \"value\", void 0);\n __decorate([\n Property({})\n ], Switch.prototype, \"htmlAttributes\", void 0);\n Switch = __decorate([\n NotifyPropertyChanges\n ], Switch);\n return Switch;\n}(Component));\nexport { Switch };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, NotifyPropertyChanges, Property, append, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { removeClass, rippleEffect, closest } from '@syncfusion/ej2-base';\nimport { EventHandler, detach, Event, addClass } from '@syncfusion/ej2-base';\nexport var classNames = {\n chipSet: 'e-chip-set',\n chip: 'e-chip',\n avatar: 'e-chip-avatar',\n text: 'e-chip-text',\n icon: 'e-chip-icon',\n delete: 'e-chip-delete',\n deleteIcon: 'e-dlt-btn',\n multiSelection: 'e-multi-selection',\n singleSelection: 'e-selection',\n active: 'e-active',\n chipWrapper: 'e-chip-avatar-wrap',\n iconWrapper: 'e-chip-icon-wrap',\n focused: 'e-focused',\n disabled: 'e-disabled',\n rtl: 'e-rtl'\n};\n/**\n * A chip component is a small block of essential information, mostly used on contacts or filter tags.\n * ```html\n *
\n * ```\n * ```typescript\n * \n * ```\n */\nvar ChipList = /** @class */ (function (_super) {\n __extends(ChipList, _super);\n function ChipList(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.multiSelectedChip = [];\n return _this;\n }\n /**\n * Initialize the event handler\n *\n * @private\n */\n ChipList.prototype.preRender = function () {\n //prerender\n };\n /**\n * To find the chips length.\n *\n * @returns boolean\n * @private\n */\n ChipList.prototype.chipType = function () {\n return (this.chips && this.chips.length && this.chips.length > 0);\n };\n /**\n * To Initialize the control rendering.\n *\n * @returns void\n * @private\n */\n ChipList.prototype.render = function () {\n this.type = (!isNullOrUndefined(this.chips) && this.chips.length) ? 'chipset' : (this.text || this.element.innerText ? 'chip' : 'chipset');\n this.setAttributes();\n this.createChip();\n this.setRtl();\n this.select(this.selectedChips);\n this.wireEvent(false);\n this.rippleFunction = rippleEffect(this.element, {\n selector: '.e-chip'\n });\n this.renderComplete();\n };\n ChipList.prototype.createChip = function () {\n this.innerText = (this.element.innerText && this.element.innerText.length !== 0)\n ? this.element.innerText.trim() : this.element.innerText;\n this.element.innerHTML = '';\n this.chipCreation(this.type === 'chip' ? [this.innerText ? this.innerText : this.text] : this.chips);\n };\n ChipList.prototype.setAttributes = function () {\n if (this.type === 'chip') {\n if (this.enabled) {\n this.element.tabIndex = 0;\n }\n this.element.setAttribute('role', 'button');\n }\n else {\n this.element.classList.add(classNames.chipSet);\n this.element.setAttribute('role', 'listbox');\n if (this.selection === 'Multiple') {\n this.element.classList.add(classNames.multiSelection);\n this.element.setAttribute('aria-multiselectable', 'true');\n }\n else if (this.selection === 'Single') {\n this.element.classList.add(classNames.singleSelection);\n this.element.setAttribute('aria-multiselectable', 'false');\n }\n else {\n this.element.setAttribute('aria-multiselectable', 'false');\n }\n }\n };\n ChipList.prototype.setRtl = function () {\n this.element.classList[this.enableRtl ? 'add' : 'remove'](classNames.rtl);\n };\n ChipList.prototype.chipCreation = function (data) {\n if (isNullOrUndefined(data)) {\n return;\n }\n var chipListArray = [];\n var attributeArray = [];\n for (var i = 0; i < data.length; i++) {\n var fieldsData = this.getFieldValues(data[i]);\n var attributesValue = fieldsData.htmlAttributes;\n attributeArray.push(attributesValue);\n var chipArray = this.elementCreation(fieldsData);\n var className = (classNames.chip + ' ' + (fieldsData.enabled ? ' ' : classNames.disabled) + ' ' +\n (fieldsData.avatarIconCss || fieldsData.avatarText ? classNames.chipWrapper : (fieldsData.leadingIconCss ?\n classNames.iconWrapper : ' ')) + ' ' + fieldsData.cssClass).split(' ').filter(function (css) { return css; });\n if (!this.chipType() || this.type === 'chip') {\n chipListArray = chipArray;\n addClass([this.element], className);\n this.element.setAttribute('aria-label', fieldsData.text);\n if (fieldsData.value) {\n this.element.setAttribute('data-value', fieldsData.value.toString());\n }\n }\n else {\n var wrapper = this.createElement('DIV', {\n className: className.join(' '), attrs: {\n tabIndex: '0', role: 'option',\n 'aria-label': fieldsData.text, 'aria-selected': 'false'\n }\n });\n if (this.enableDelete) {\n wrapper.setAttribute('aria-keyshortcuts', 'Enter to delete');\n }\n if (fieldsData.value) {\n wrapper.setAttribute('data-value', fieldsData.value.toString());\n }\n if (fieldsData.enabled) {\n wrapper.setAttribute('aria-disabled', 'false');\n }\n else {\n wrapper.removeAttribute('tabindex');\n wrapper.setAttribute('aria-disabled', 'true');\n }\n if (!isNullOrUndefined(attributeArray[i])) {\n if (attributeArray.length > i && Object.keys(attributeArray[i]).length) {\n var htmlAttr = [];\n htmlAttr = (Object.keys(attributeArray[i]));\n for (var j = 0; j < htmlAttr.length; j++) {\n wrapper.setAttribute(htmlAttr[j], attributeArray[i][htmlAttr[j]]);\n }\n }\n }\n append(chipArray, wrapper);\n chipListArray.push(wrapper);\n }\n }\n append(chipListArray, this.element);\n };\n ChipList.prototype.getFieldValues = function (data) {\n var chipEnabled = !(this.enabled.toString() === 'false');\n var fields = {\n text: typeof data === 'object' ? (data.text ? data.text.toString() : this.text.toString()) :\n (!this.chipType() ? (this.innerText ? this.innerText : this.text.toString()) : data.toString()),\n cssClass: typeof data === 'object' ? (data.cssClass ? data.cssClass.toString() : this.cssClass.toString()) :\n (this.cssClass.toString()),\n leadingIconCss: typeof data === 'object' ? (data.leadingIconCss ? data.leadingIconCss.toString() :\n this.leadingIconCss.toString()) : (this.leadingIconCss.toString()),\n avatarIconCss: typeof data === 'object' ? (data.avatarIconCss ? data.avatarIconCss.toString() :\n this.avatarIconCss.toString()) : (this.avatarIconCss.toString()),\n avatarText: typeof data === 'object' ? (data.avatarText ? data.avatarText.toString() : this.avatarText.toString()) :\n (this.avatarText.toString()),\n trailingIconCss: typeof data === 'object' ? (data.trailingIconCss ? data.trailingIconCss.toString() :\n this.trailingIconCss.toString()) : (this.trailingIconCss.toString()),\n enabled: typeof data === 'object' ? (data.enabled !== undefined ? (data.enabled.toString() === 'false' ? false : true) :\n chipEnabled) : (chipEnabled),\n value: typeof data === 'object' ? ((data.value ? data.value.toString() : null)) : null,\n leadingIconUrl: typeof data === 'object' ? (data.leadingIconUrl ? data.leadingIconUrl.toString() : this.leadingIconUrl) :\n this.leadingIconUrl,\n trailingIconUrl: typeof data === 'object' ? (data.trailingIconUrl ? data.trailingIconUrl.toString() : this.trailingIconUrl) :\n this.trailingIconUrl,\n htmlAttributes: typeof data === 'object' ? (data.htmlAttributes ? data.htmlAttributes : this.htmlAttributes) : this.htmlAttributes\n };\n return fields;\n };\n ChipList.prototype.elementCreation = function (fields) {\n var chipArray = [];\n if (fields.avatarText || fields.avatarIconCss) {\n var className = (classNames.avatar + ' ' + fields.avatarIconCss).trim();\n var chipAvatarElement = this.createElement('span', { className: className });\n chipAvatarElement.innerText = fields.avatarText;\n chipArray.push(chipAvatarElement);\n }\n else if (fields.leadingIconCss) {\n var className = (classNames.icon + ' ' + fields.leadingIconCss).trim();\n var chipIconElement = this.createElement('span', { className: className });\n chipArray.push(chipIconElement);\n }\n else if (fields.leadingIconUrl) {\n var className = (classNames.avatar + ' ' + 'image-url').trim();\n var chipIconElement = this.createElement('span', { className: className });\n chipIconElement.style.backgroundImage = 'url(' + fields.leadingIconUrl + ')';\n chipArray.push(chipIconElement);\n }\n var chipTextElement = this.createElement('span', { className: classNames.text });\n chipTextElement.innerText = fields.text;\n chipArray.push(chipTextElement);\n if (fields.trailingIconCss || (this.chipType() && this.enableDelete)) {\n var className = (classNames.delete + ' ' +\n (fields.trailingIconCss ? fields.trailingIconCss : classNames.deleteIcon)).trim();\n var chipdeleteElement = this.createElement('span', { className: className });\n chipArray.push(chipdeleteElement);\n }\n else if (fields.trailingIconUrl) {\n var className = ('trailing-icon-url').trim();\n var chipIconsElement = this.createElement('span', { className: className });\n chipIconsElement.style.backgroundImage = 'url(' + fields.trailingIconUrl + ')';\n chipArray.push(chipIconsElement);\n }\n return chipArray;\n };\n /**\n * A function that finds chip based on given input.\n *\n * @param {number | HTMLElement } fields - We can pass index number or element of chip.\n * {% codeBlock src='chips/find/index.md' %}{% endcodeBlock %}\n *\n * @returns {void}\n */\n ChipList.prototype.find = function (fields) {\n var chipData = { text: '', index: -1, element: this.element, data: '' };\n var chipElement = fields instanceof HTMLElement ?\n fields : this.element.querySelectorAll('.' + classNames.chip)[fields];\n if (chipElement && this.chipType()) {\n chipData.index = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.chip)).indexOf(chipElement);\n var chip = this.chips[chipData.index];\n if (typeof chip === 'object' && chip !== null) {\n var chipModel = chip;\n if (chipModel.text !== undefined) {\n chipData.text = chipModel.text.toString();\n }\n }\n else if (chip !== undefined) {\n chipData.text = chip.toString();\n }\n chipData.data = chip;\n chipData.element = chipElement;\n }\n return chipData;\n };\n /**\n * Allows adding the chip item(s) by passing a single or array of string, number, or ChipModel values.\n *\n * @param {string[] | number[] | ChipModel[] | string | number | ChipModel} chipsData - We can pass array of string or\n * array of number or array of chip model or string data or number data or chip model.\n * {% codeBlock src='chips/add/index.md' %}{% endcodeBlock %}\n *\n * @returns {void}\n * @deprecated\n */\n ChipList.prototype.add = function (chipsData) {\n var _a;\n if (this.type !== 'chip') {\n var fieldData = chipsData instanceof Array ?\n chipsData : [chipsData];\n this.chips = (_a = [].slice.call(this.chips)).concat.apply(_a, fieldData);\n this.chipCreation(fieldData);\n }\n };\n /**\n * Allows selecting the chip item(s) by passing a single or array of string, number, or ChipModel values.\n *\n * @param {number | number[] | HTMLElement | HTMLElement[]} fields - We can pass number or array of number\n * or chip element or array of chip element.\n * {% codeBlock src='chips/select/index.md' %}{% endcodeBlock %}\n *\n * @returns {void}\n */\n ChipList.prototype.select = function (fields, selectionType) {\n this.onSelect(fields, false, selectionType);\n };\n ChipList.prototype.multiSelection = function (newProp) {\n var items = this.element.querySelectorAll('.' + 'e-chip');\n for (var j = 0; j < newProp.length; j++) {\n if (typeof newProp[j] === 'string') {\n for (var k = 0; k < items.length; k++) {\n if (newProp[j] !== k) {\n if (newProp[j] === items[k].attributes[5].value) {\n this.multiSelectedChip.push(k);\n break;\n }\n }\n }\n }\n else {\n this.multiSelectedChip.push(newProp[j]);\n }\n }\n };\n ChipList.prototype.onSelect = function (fields, callFromProperty, selectionType) {\n var index;\n var chipNodes;\n var chipValue = null;\n if (this.chipType() && this.selection !== 'None') {\n if (callFromProperty) {\n var chipElements = this.element.querySelectorAll('.' + classNames.chip);\n for (var i = 0; i < chipElements.length; i++) {\n chipElements[i].setAttribute('aria-selected', 'false');\n chipElements[i].classList.remove(classNames.active);\n }\n }\n var fieldData = fields instanceof Array ? fields : [fields];\n for (var i = 0; i < fieldData.length; i++) {\n var chipElement = fieldData[i] instanceof HTMLElement ? fieldData[i]\n : this.element.querySelectorAll('.' + classNames.chip)[fieldData[i]];\n if (selectionType !== 'index') {\n for (var j = 0; j < this.chips.length; j++) {\n chipNodes = this.element.querySelectorAll('.' + classNames.chip)[j];\n var fieldsData = this.getFieldValues(this.chips[j]);\n if (selectionType === 'value') {\n if (fieldsData.value !== null) {\n chipValue = chipNodes.dataset.value;\n }\n }\n else if (selectionType === 'text') {\n chipValue = chipNodes.innerText;\n }\n if (chipValue === fieldData[i].toString()) {\n index = j;\n chipElement = this.element.querySelectorAll('.' + classNames.chip)[index];\n }\n }\n }\n if (chipElement instanceof HTMLElement) {\n this.selectionHandler(chipElement);\n }\n }\n }\n };\n /**\n * Allows removing the chip item(s) by passing a single or array of string, number, or ChipModel values.\n *\n * @param {number | number[] | HTMLElement | HTMLElement[]} fields - We can pass number or array of number\n * or chip element or array of chip element.\n * {% codeBlock src='chips/remove/index.md' %}{% endcodeBlock %}\n *\n * @returns {void}\n */\n ChipList.prototype.remove = function (fields) {\n var _this = this;\n if (this.chipType()) {\n var fieldData = fields instanceof Array ? fields : [fields];\n var chipElements_1 = [];\n var chipCollection_1 = this.element.querySelectorAll('.' + classNames.chip);\n fieldData.forEach(function (data) {\n var chipElement = data instanceof HTMLElement ? data\n : chipCollection_1[data];\n if (chipElement instanceof HTMLElement) {\n chipElements_1.push(chipElement);\n }\n });\n chipElements_1.forEach(function (element) {\n var chips = _this.element.querySelectorAll('.' + classNames.chip);\n var index = Array.prototype.slice.call(chips).indexOf(element);\n _this.deleteHandler(element, index);\n });\n }\n };\n /**\n * Returns the selected chip(s) data.\n * {% codeBlock src='chips/getSelectedChips/index.md' %}{% endcodeBlock %}\n *\n * @returns {void}\n */\n ChipList.prototype.getSelectedChips = function () {\n var selectedChips;\n if (this.chipType() && this.selection !== 'None') {\n var selectedItems = { texts: [], Indexes: [], data: [], elements: [] };\n var items = this.element.querySelectorAll('.' + classNames.active);\n for (var i = 0; i < items.length; i++) {\n var chip = items[i];\n selectedItems.elements.push(chip);\n var index = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.chip)).indexOf(chip);\n selectedItems.Indexes.push(index);\n selectedItems.data.push(this.chips[index]);\n var text = typeof this.chips[index] === 'object' ?\n this.chips[index].text ? this.chips[index].text\n : null : this.chips[index].toString();\n selectedItems.texts.push(text);\n }\n var selectedItem = {\n text: selectedItems.texts[0], index: selectedItems.Indexes[0],\n data: selectedItems.data[0], element: selectedItems.elements[0]\n };\n selectedChips = !isNullOrUndefined(selectedItem.index) ?\n (this.selection === 'Multiple' ? selectedItems : selectedItem) : undefined;\n }\n return selectedChips;\n };\n ChipList.prototype.wireEvent = function (unWireEvent) {\n if (!unWireEvent) {\n EventHandler.add(this.element, 'click', this.clickHandler, this);\n EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);\n EventHandler.add(this.element, 'keydown', this.keyHandler, this);\n EventHandler.add(this.element, 'keyup', this.keyHandler, this);\n }\n else {\n EventHandler.remove(this.element, 'click', this.clickHandler);\n EventHandler.remove(this.element, 'focusout', this.focusOutHandler);\n EventHandler.remove(this.element, 'keydown', this.keyHandler);\n EventHandler.remove(this.element, 'keyup', this.keyHandler);\n }\n };\n ChipList.prototype.keyHandler = function (e) {\n if (e.target.classList.contains(classNames.chip)) {\n if (e.type === 'keydown') {\n if (e.keyCode === 13 || e.keyCode === 32) {\n this.clickHandler(e);\n }\n else if ((e.keyCode === 46 || e.keyCode === 8) && this.enableDelete) {\n this.clickHandler(e, true);\n }\n }\n else if (e.keyCode === 9) {\n this.focusInHandler(e.target);\n }\n }\n };\n ChipList.prototype.focusInHandler = function (chipWrapper) {\n if (!chipWrapper.classList.contains(classNames.focused)) {\n chipWrapper.classList.add(classNames.focused);\n }\n };\n ChipList.prototype.focusOutHandler = function (e) {\n var chipWrapper = closest(e.target, '.' + classNames.chip);\n var focusedElement = !this.chipType() ? (this.element.classList.contains(classNames.focused) ?\n this.element : null) : this.element.querySelector('.' + classNames.focused);\n if (chipWrapper && focusedElement) {\n focusedElement.classList.remove(classNames.focused);\n }\n };\n ChipList.prototype.clickHandler = function (e, del) {\n var _this = this;\n if (del === void 0) { del = false; }\n var chipWrapper = closest(e.target, '.' + classNames.chip);\n if (chipWrapper) {\n var chipDataArgs = void 0;\n if (this.chipType()) {\n chipDataArgs = this.find(chipWrapper);\n }\n else {\n var index = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.chip)).indexOf(chipWrapper);\n chipDataArgs = {\n text: this.innerText ? this.innerText : this.text,\n element: chipWrapper, data: this.text, index: index\n };\n }\n chipDataArgs.event = e;\n chipDataArgs.cancel = false;\n this.trigger('beforeClick', chipDataArgs, function (observedArgs) {\n if (!observedArgs.cancel) {\n _this.clickEventHandler(observedArgs.element, e, del);\n }\n });\n }\n };\n ChipList.prototype.clickEventHandler = function (chipWrapper, e, del) {\n var _this = this;\n if (this.chipType()) {\n var chipData_1 = this.find(chipWrapper);\n chipData_1.event = e;\n var deleteElement = e.target.classList.contains(classNames.deleteIcon) ?\n e.target : (del ? chipWrapper.querySelector('.' + classNames.deleteIcon) : undefined);\n if (deleteElement && this.enableDelete) {\n chipData_1.cancel = false;\n var deletedItemArgs = chipData_1;\n this.trigger('delete', deletedItemArgs, function (observedArgs) {\n if (!observedArgs.cancel) {\n _this.deleteHandler(observedArgs.element, observedArgs.index);\n _this.selectionHandler(chipWrapper);\n chipData_1.selected = observedArgs.element.classList.contains(classNames.active);\n var selectedItemArgs = chipData_1;\n _this.trigger('click', selectedItemArgs);\n var chipElement = _this.element.querySelectorAll('.' + classNames.chip)[observedArgs.index];\n if (chipElement) {\n chipElement.focus();\n _this.focusInHandler(chipElement);\n }\n }\n });\n }\n else if (this.selection !== 'None') {\n this.selectionHandler(chipWrapper);\n chipData_1.selected = chipWrapper.classList.contains(classNames.active);\n var selectedItemArgs = chipData_1;\n this.trigger('click', selectedItemArgs);\n }\n else {\n this.focusInHandler(chipWrapper);\n var clickedItemArgs = chipData_1;\n this.trigger('click', clickedItemArgs);\n }\n }\n else {\n this.focusInHandler(chipWrapper);\n var clickedItemArgs = {\n text: this.innerText ? this.innerText : this.text,\n element: chipWrapper, data: this.text, event: e\n };\n this.trigger('click', clickedItemArgs);\n }\n };\n ChipList.prototype.selectionHandler = function (chipWrapper) {\n if (this.selection === 'Single') {\n var activeElement = this.element.querySelector('.' + classNames.active);\n if (activeElement && activeElement !== chipWrapper) {\n activeElement.classList.remove(classNames.active);\n activeElement.setAttribute('aria-selected', 'false');\n }\n this.setProperties({ selectedChips: null }, true);\n }\n else {\n this.setProperties({ selectedChips: [] }, true);\n }\n if (chipWrapper.classList.contains(classNames.active)) {\n chipWrapper.classList.remove(classNames.active);\n chipWrapper.setAttribute('aria-selected', 'false');\n }\n else {\n chipWrapper.classList.add(classNames.active);\n chipWrapper.setAttribute('aria-selected', 'true');\n }\n this.updateSelectedChips();\n };\n ChipList.prototype.updateSelectedChips = function () {\n var chipListEle = this.element.querySelectorAll('.e-chip');\n var chipCollIndex = [];\n var chipCollValue = [];\n var chip = null;\n var value = null;\n for (var i = 0; i < chipListEle.length; i++) {\n var selectedEle = this.element.querySelectorAll('.e-chip')[i];\n if (selectedEle.getAttribute('aria-selected') === 'true') {\n value = selectedEle.getAttribute('data-value');\n if (this.selection === 'Single' && selectedEle.classList.contains('e-active')) {\n chip = value ? value : i;\n break;\n }\n else {\n chip = value ? chipCollValue.push(value) : chipCollIndex.push(i);\n }\n }\n }\n this.setProperties({ selectedChips: this.selection === 'Single' ? chip : value ? chipCollValue : chipCollIndex }, true);\n };\n ChipList.prototype.deleteHandler = function (chipWrapper, index) {\n // Used to store the deleted chip item details.\n var deletedChipData = this.find(chipWrapper);\n this.chips.splice(index, 1);\n this.setProperties({ chips: this.chips }, true);\n detach(chipWrapper);\n this.trigger('deleted', deletedChipData);\n };\n /**\n * Removes the component from the DOM and detaches all its related event handlers. Also, it removes the attributes and classes.\n * {% codeBlock src='chips/destroy/index.md' %}{% endcodeBlock %}\n *\n * @returns {void}\n */\n ChipList.prototype.destroy = function () {\n removeClass([this.element], [classNames.chipSet, classNames.chip, classNames.rtl,\n classNames.multiSelection, classNames.singleSelection, classNames.disabled, classNames.chipWrapper, classNames.iconWrapper,\n classNames.active, classNames.focused].concat(this.cssClass ? this.cssClass.toString().split(' ').filter(function (css) { return css; }) : []));\n this.removeMultipleAttributes(['tabindex', 'role', 'aria-label', 'aria-multiselectable'], this.element);\n this.wireEvent(true);\n this.rippleFunction();\n _super.prototype.destroy.call(this);\n this.element.innerHTML = '';\n this.element.innerText = this.innerText;\n };\n ChipList.prototype.removeMultipleAttributes = function (attributes, element) {\n attributes.forEach(function (attr) {\n element.removeAttribute(attr);\n });\n };\n ChipList.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n ChipList.prototype.getModuleName = function () {\n return 'chip-list';\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @returns void\n * @private\n */\n ChipList.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'chips':\n case 'text':\n case 'avatarText':\n case 'avatarIconCss':\n case 'leadingIconCss':\n case 'trailingIconCss':\n case 'selection':\n case 'enableDelete':\n case 'enabled':\n this.refresh();\n break;\n case 'cssClass':\n if (!this.chipType()) {\n removeClass([this.element], oldProp.cssClass.toString().split(' ').filter(function (css) { return css; }));\n addClass([this.element], newProp.cssClass.toString().split(' ').filter(function (css) { return css; }));\n }\n else {\n this.refresh();\n }\n break;\n case 'selectedChips':\n removeClass(this.element.querySelectorAll('.e-active'), 'e-active');\n if (this.selection === 'Multiple') {\n this.multiSelectedChip = [];\n this.multiSelection(newProp.selectedChips);\n this.onSelect(this.multiSelectedChip, true);\n this.updateSelectedChips();\n }\n else {\n this.onSelect(newProp.selectedChips, true);\n }\n break;\n case 'enableRtl':\n this.setRtl();\n break;\n }\n }\n };\n __decorate([\n Property([])\n ], ChipList.prototype, \"chips\", void 0);\n __decorate([\n Property('')\n ], ChipList.prototype, \"text\", void 0);\n __decorate([\n Property('')\n ], ChipList.prototype, \"avatarText\", void 0);\n __decorate([\n Property('')\n ], ChipList.prototype, \"avatarIconCss\", void 0);\n __decorate([\n Property('')\n ], ChipList.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property('')\n ], ChipList.prototype, \"leadingIconCss\", void 0);\n __decorate([\n Property('')\n ], ChipList.prototype, \"trailingIconCss\", void 0);\n __decorate([\n Property('')\n ], ChipList.prototype, \"leadingIconUrl\", void 0);\n __decorate([\n Property('')\n ], ChipList.prototype, \"trailingIconUrl\", void 0);\n __decorate([\n Property('')\n ], ChipList.prototype, \"cssClass\", void 0);\n __decorate([\n Property(true)\n ], ChipList.prototype, \"enabled\", void 0);\n __decorate([\n Property([])\n ], ChipList.prototype, \"selectedChips\", void 0);\n __decorate([\n Property('None')\n ], ChipList.prototype, \"selection\", void 0);\n __decorate([\n Property(false)\n ], ChipList.prototype, \"enableDelete\", void 0);\n __decorate([\n Event()\n ], ChipList.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], ChipList.prototype, \"click\", void 0);\n __decorate([\n Event()\n ], ChipList.prototype, \"beforeClick\", void 0);\n __decorate([\n Event()\n ], ChipList.prototype, \"delete\", void 0);\n __decorate([\n Event()\n ], ChipList.prototype, \"deleted\", void 0);\n ChipList = __decorate([\n NotifyPropertyChanges\n ], ChipList);\n return ChipList;\n}(Component));\nexport { ChipList };\n","/**\n * Represents ChipList `Chip` model class.\n */\nvar Chip = /** @class */ (function () {\n function Chip() {\n }\n return Chip;\n}());\nexport { Chip };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n///\nimport { getUniqueID, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';\nimport { select } from '@syncfusion/ej2-base';\nimport { Button } from '../button/button';\nvar FABHIDDEN = 'e-fab-hidden';\nvar FIXEDFAB = 'e-fab-fixed';\nvar FABTOP = 'e-fab-top';\nvar FABBOTTOM = 'e-fab-bottom';\nvar FABRIGHT = 'e-fab-right';\nvar FABLEFT = 'e-fab-left';\nvar FABMIDDLE = 'e-fab-middle';\nvar FABCENTER = 'e-fab-center';\n/**\n * Defines the position of FAB (Floating Action Button) in target.\n */\nexport var FabPosition;\n(function (FabPosition) {\n /**\n * Positions the FAB at the target's top left corner.\n */\n FabPosition[\"TopLeft\"] = \"TopLeft\";\n /**\n * Places the FAB on the top-center position of the target.\n */\n FabPosition[\"TopCenter\"] = \"TopCenter\";\n /**\n * Positions the FAB at the target's top right corner.\n */\n FabPosition[\"TopRight\"] = \"TopRight\";\n /**\n * Positions the FAB in the middle of target's left side.\n */\n FabPosition[\"MiddleLeft\"] = \"MiddleLeft\";\n /**\n * Positions the FAB in the center of target.\n */\n FabPosition[\"MiddleCenter\"] = \"MiddleCenter\";\n /**\n * Positions the FAB in the middle of target's right side.\n */\n FabPosition[\"MiddleRight\"] = \"MiddleRight\";\n /**\n * Positions the FAB at the target's bottom left corner.\n */\n FabPosition[\"BottomLeft\"] = \"BottomLeft\";\n /**\n * Places the FAB on the bottom-center position of the target.\n */\n FabPosition[\"BottomCenter\"] = \"BottomCenter\";\n /**\n * Positions the FAB at the target's bottom right corner.\n */\n FabPosition[\"BottomRight\"] = \"BottomRight\";\n})(FabPosition || (FabPosition = {}));\n/**\n * The FAB Component (Floating Action Button) is an extension of Button Component that appears in front of all the contents of the page and performs the primary action.\n */\nvar Fab = /** @class */ (function (_super) {\n __extends(Fab, _super);\n /**\n * Constructor for creating the widget\n *\n * @param {FabModel} options - Specifies the floating action button model\n * @param {string|HTMLButtonElement} element - Specifies the target element\n */\n function Fab(options, element) {\n return _super.call(this, options, element) || this;\n }\n /**\n * Initialize the control rendering\n *\n * @returns {void}\n * @private\n */\n Fab.prototype.render = function () {\n _super.prototype.render.call(this);\n this.initializeFab();\n };\n Fab.prototype.preRender = function () {\n _super.prototype.preRender.call(this);\n if (!this.element.id) {\n this.element.id = getUniqueID('e-' + this.getModuleName());\n }\n };\n /**\n * Get the properties to be maintained in the persisted state.\n *\n * @returns {string} - Persist data\n */\n Fab.prototype.getPersistData = function () {\n _super.prototype.getPersistData.call(this);\n return this.addOnPersist([]);\n };\n /**\n * Get component name.\n *\n * @returns {string} - Module name\n * @private\n */\n Fab.prototype.getModuleName = function () {\n return 'fab';\n };\n Fab.prototype.initializeFab = function () {\n // To add 'e-btn' class\n this.element.classList.add('e-' + _super.prototype.getModuleName.call(this));\n this.checkTarget();\n this.setPosition();\n this.setVisibility();\n };\n Fab.prototype.checkTarget = function () {\n this.isFixed = true;\n if (this.target) {\n this.targetEle = (typeof this.target === 'string') ? select(this.target) : this.target;\n if (this.targetEle) {\n this.isFixed = false;\n this.targetEle.appendChild(this.element);\n }\n }\n this.element.classList[this.isFixed ? 'add' : 'remove'](FIXEDFAB);\n };\n Fab.prototype.setVisibility = function () {\n this.element.classList[this.visible ? 'remove' : 'add'](FABHIDDEN);\n };\n Fab.prototype.setPosition = function () {\n // Check for the bottom position; if true, add the bottom class; otherwise, add the top class.\n this.element.classList.add((['BottomLeft', 'BottomCenter', 'BottomRight'].indexOf(this.position) !== -1) ? FABBOTTOM : FABTOP);\n var isRight = ['TopRight', 'MiddleRight', 'BottomRight'].indexOf(this.position) !== -1;\n // Reverse the left and right direction for RTL mode.\n this.element.classList.add((!(this.enableRtl || isRight) || (this.enableRtl && isRight)) ? FABLEFT : FABRIGHT);\n if (['MiddleLeft', 'MiddleRight', 'MiddleCenter'].indexOf(this.position) !== -1) {\n this.element.classList.add(FABMIDDLE);\n }\n if (['TopCenter', 'BottomCenter', 'MiddleCenter'].indexOf(this.position) !== -1) {\n this.element.classList.add(FABCENTER);\n }\n };\n Fab.prototype.clearPosition = function () {\n this.element.classList.remove(FABTOP, FABBOTTOM, FABMIDDLE);\n this.element.classList.remove(FABRIGHT, FABLEFT, FABCENTER);\n };\n /* eslint-disable */\n /**\n * Refreshes the FAB position. You can call this method to re-position FAB when target is resized.\n *\n * @returns {void}\n * @deprecated\n */\n Fab.prototype.refreshPosition = function () {\n };\n /* eslint-enable */\n /**\n * Destroys the FAB instance.\n *\n * @returns {void}\n *\n */\n Fab.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n // To remove 'e-btn' class\n this.element.classList.remove('e-' + _super.prototype.getModuleName.call(this), FIXEDFAB);\n this.clearPosition();\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @param {FabModel} newProp - Specifies new properties\n * @param {FabModel} oldProp - Specifies old properties\n * @returns {void}\n * @private\n */\n Fab.prototype.onPropertyChanged = function (newProp, oldProp) {\n _super.prototype.onPropertyChanged.call(this, newProp, oldProp);\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'enableRtl':\n case 'position':\n this.clearPosition();\n this.setPosition();\n break;\n case 'visible':\n this.setVisibility();\n break;\n case 'target':\n this.checkTarget();\n this.setPosition();\n break;\n /* REF - 861739 */\n case 'currencyCode':\n this.refresh();\n break;\n }\n }\n };\n __decorate([\n Property('BottomRight')\n ], Fab.prototype, \"position\", void 0);\n __decorate([\n Property('')\n ], Fab.prototype, \"target\", void 0);\n __decorate([\n Property(true)\n ], Fab.prototype, \"visible\", void 0);\n __decorate([\n Property(true)\n ], Fab.prototype, \"isPrimary\", void 0);\n Fab = __decorate([\n NotifyPropertyChanges\n ], Fab);\n return Fab;\n}(Button));\nexport { Fab };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Event, ChildProperty, Collection, Complex, Component, NotifyPropertyChanges, Property, getUniqueID, EventHandler, isRippleEnabled, removeClass, addClass, attributes, animationMode } from '@syncfusion/ej2-base';\nimport { select, extend, deleteObject, KeyboardEvents, append, rippleEffect, remove, closest, selectAll, isNullOrUndefined, compile, formatUnit, Animation } from '@syncfusion/ej2-base';\nimport { Fab } from './../floating-action-button/index';\nvar topPosition = ['TopLeft', 'TopCenter', 'TopRight'];\nvar bottomPosition = ['BottomLeft', 'BottomCenter', 'BottomRight'];\nvar leftPosition = ['TopLeft', 'MiddleLeft', 'BottomLeft'];\nvar rightPosition = ['TopRight', 'MiddleRight', 'BottomRight'];\nvar SDHIDDEN = 'e-speeddial-hidden';\nvar FIXEDSD = 'e-speeddial-fixed';\nvar SPEEDDIAL = 'e-speeddial';\nvar RTLCLASS = 'e-rtl';\nvar HOVERSD = 'e-speeddial-hover-open';\nvar RADIALSD = 'e-speeddial-radial';\nvar LINEARSD = 'e-speeddial-linear';\nvar TEMPLATESD = 'e-speeddial-template';\nvar SDTEMPLATECONTAINER = 'e-speeddial-template-container';\nvar SDOVERLAY = 'e-speeddial-overlay';\nvar SDPOPUP = 'e-speeddial-popup';\nvar SDUL = 'e-speeddial-ul';\nvar SDLI = 'e-speeddial-li';\nvar SDACTIVELI = 'e-speeddial-li-active';\nvar SDLIICON = 'e-speeddial-li-icon';\nvar SDLITEXT = 'e-speeddial-li-text';\nvar SDLITEXTONLY = 'e-speeddial-text-li';\nvar DISABLED = 'e-disabled';\nvar SDVERTICALBOTTOM = 'e-speeddial-vert-bottom';\nvar SDVERTICALRIGHT = 'e-speeddial-vert-right';\nvar SDHORIZONTALTOP = 'e-speeddial-horz-top';\nvar SDHORIZONTALLEFT = 'e-speeddial-horz-left';\nvar SDHORIZONTALRIGHT = 'e-speeddial-horz-right';\nvar SDOVERFLOW = 'e-speeddial-overflow';\nvar SDVERTOVERFLOW = 'e-speeddial-vert-overflow';\nvar SDHORZOVERFLOW = 'e-speeddial-horz-overflow';\nvar SDTOP = 'e-speeddial-top';\nvar SDBOTTOM = 'e-speeddial-bottom';\nvar SDRIGHT = 'e-speeddial-right';\nvar SDLEFT = 'e-speeddial-left';\nvar SDMIDDLE = 'e-speeddial-middle';\nvar SDCENTER = 'e-speeddial-center';\nvar SDTOPLEFT = 'e-speeddial-top-left';\nvar SDBOTTOMRIGHT = 'e-speeddial-bottom-right';\nvar SDTOPRIGHT = 'e-speeddial-top-right';\nvar SDBOTTOMLEFT = 'e-speeddial-bottom-left';\nvar SDVERTDIST = '--speeddialVertDist';\nvar SDHORZDIST = '--speeddialHorzDist';\nvar SDRADICALANGLE = '--speeddialRadialAngle';\nvar SDRADICALOFFSET = '--speeddialRadialOffset';\nvar SDRADICALMINHEIGHT = '--speeddialRadialMinHeight';\nvar SDRADICALMINWIDTH = '--speeddialRadialMinWidth';\nvar SDOVERFLOWLIMIT = '--speeddialOverflowLimit';\nvar SDRADICALHORZDIST = '--speeddialRadialHorzDist';\n/**\n * Defines the display mode of speed dial action items in SpeedDial\n */\nexport var SpeedDialMode;\n(function (SpeedDialMode) {\n /**\n * SpeedDial items are displayed in linear order like list.\n */\n SpeedDialMode[\"Linear\"] = \"Linear\";\n /**\n * SpeedDial items are displayed like radial menu in radial direction (circular direction).\n */\n SpeedDialMode[\"Radial\"] = \"Radial\";\n})(SpeedDialMode || (SpeedDialMode = {}));\n/**\n * Defines the speed dial action items display direction when mode is Linear.\n */\nexport var LinearDirection;\n(function (LinearDirection) {\n /**\n * Speed dial action items are displayed vertically above the button of Speed Dial.\n */\n LinearDirection[\"Up\"] = \"Up\";\n /**\n * Speed dial action items are displayed vertically below the button of Speed Dial.\n */\n LinearDirection[\"Down\"] = \"Down\";\n /**\n * Speed dial action items are displayed horizontally on the button's right side.\n */\n LinearDirection[\"Right\"] = \"Right\";\n /**\n * Speed dial action items are displayed horizontally on the button's left side.\n */\n LinearDirection[\"Left\"] = \"Left\";\n /**\n * Speed dial action items are displayed vertically above or below the button of Speed Dial based on the position.\n * If Position is TopRight, TopLeft, TopCenter, the items are displayed vertically below the button else above the button.\n */\n LinearDirection[\"Auto\"] = \"Auto\";\n})(LinearDirection || (LinearDirection = {}));\n/**\n * Defines the speed dial action items order, when mode is Radial.\n */\nexport var RadialDirection;\n(function (RadialDirection) {\n /**\n * SpeedDial items are arranged in clockwise direction.\n */\n RadialDirection[\"Clockwise\"] = \"Clockwise\";\n /**\n * SpeedDial items are shown in anti-clockwise direction.\n */\n RadialDirection[\"AntiClockwise\"] = \"AntiClockwise\";\n /**\n * SpeedDial items are shown clockwise or anti-clockwise based on the position.\n */\n RadialDirection[\"Auto\"] = \"Auto\";\n})(RadialDirection || (RadialDirection = {}));\n/**\n * Defines the animation effect applied when open and close the speed dial items.\n */\nexport var SpeedDialAnimationEffect;\n(function (SpeedDialAnimationEffect) {\n /**\n * SpeedDial open/close actions occur with the Fade animation effect.\n */\n SpeedDialAnimationEffect[\"Fade\"] = \"Fade\";\n /**\n * SpeedDial open/close actions occur with the FadeZoom animation effect.\n */\n SpeedDialAnimationEffect[\"FadeZoom\"] = \"FadeZoom\";\n /**\n * SpeedDial open/close actions occur with the FlipLeftDown animation effect.\n */\n SpeedDialAnimationEffect[\"FlipLeftDown\"] = \"FlipLeftDown\";\n /**\n * SpeedDial open/close actions occur with the FlipLeftUp animation effect.\n */\n SpeedDialAnimationEffect[\"FlipLeftUp\"] = \"FlipLeftUp\";\n /**\n * SpeedDial open/close actions occur with the FlipRightDown animation effect.\n */\n SpeedDialAnimationEffect[\"FlipRightDown\"] = \"FlipRightDown\";\n /**\n * SpeedDial open/close actions occur with the FlipRightUp animation effect.\n */\n SpeedDialAnimationEffect[\"FlipRightUp\"] = \"FlipRightUp\";\n /**\n * SpeedDial open/close actions occur with the FlipXDown animation effect.\n */\n SpeedDialAnimationEffect[\"FlipXDown\"] = \"FlipXDown\";\n /**\n * SpeedDial open/close actions occur with the FlipXUp animation effect.\n */\n SpeedDialAnimationEffect[\"FlipXUp\"] = \"FlipXUp\";\n /**\n * SpeedDial open/close actions occur with the FlipYLeft animation effect.\n */\n SpeedDialAnimationEffect[\"FlipYLeft\"] = \"FlipYLeft\";\n /**\n * SpeedDial open/close actions occur with the FlipYRight animation effect.\n */\n SpeedDialAnimationEffect[\"FlipYRight\"] = \"FlipYRight\";\n /**\n * SpeedDial open/close actions occur with the SlideBottom animation effect.\n */\n SpeedDialAnimationEffect[\"SlideBottom\"] = \"SlideBottom\";\n /**\n * SpeedDial open/close actions occur with the SlideLeft animation effect.\n */\n SpeedDialAnimationEffect[\"SlideLeft\"] = \"SlideLeft\";\n /**\n * SpeedDial open/close actions occur with the SlideRight animation effect.\n */\n SpeedDialAnimationEffect[\"SlideRight\"] = \"SlideRight\";\n /**\n * SpeedDial open/close actions occur with the SlideTop animation effect.\n */\n SpeedDialAnimationEffect[\"SlideTop\"] = \"SlideTop\";\n /**\n * SpeedDial open/close actions occur with the Zoom animation effect.\n */\n SpeedDialAnimationEffect[\"Zoom\"] = \"Zoom\";\n /**\n * SpeedDial open/close actions occur without any animation effect.\n */\n SpeedDialAnimationEffect[\"None\"] = \"None\";\n})(SpeedDialAnimationEffect || (SpeedDialAnimationEffect = {}));\n/**\n * AProvides options to customize the animation applied while opening and closing the popup of SpeedDial.\n */\nvar SpeedDialAnimationSettings = /** @class */ (function (_super) {\n __extends(SpeedDialAnimationSettings, _super);\n function SpeedDialAnimationSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Fade')\n ], SpeedDialAnimationSettings.prototype, \"effect\", void 0);\n __decorate([\n Property(400)\n ], SpeedDialAnimationSettings.prototype, \"duration\", void 0);\n __decorate([\n Property(0)\n ], SpeedDialAnimationSettings.prototype, \"delay\", void 0);\n return SpeedDialAnimationSettings;\n}(ChildProperty));\nexport { SpeedDialAnimationSettings };\n/**\n * Provides the options to customize the speed dial action buttons when mode of SpeedDial is Radial.\n */\nvar RadialSettings = /** @class */ (function (_super) {\n __extends(RadialSettings, _super);\n function RadialSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Auto')\n ], RadialSettings.prototype, \"direction\", void 0);\n __decorate([\n Property(-1)\n ], RadialSettings.prototype, \"endAngle\", void 0);\n __decorate([\n Property('100px')\n ], RadialSettings.prototype, \"offset\", void 0);\n __decorate([\n Property(-1)\n ], RadialSettings.prototype, \"startAngle\", void 0);\n return RadialSettings;\n}(ChildProperty));\nexport { RadialSettings };\n/**\n * Defines the items of Floating Action Button.\n */\nvar SpeedDialItem = /** @class */ (function (_super) {\n __extends(SpeedDialItem, _super);\n function SpeedDialItem() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('')\n ], SpeedDialItem.prototype, \"iconCss\", void 0);\n __decorate([\n Property('')\n ], SpeedDialItem.prototype, \"id\", void 0);\n __decorate([\n Property('')\n ], SpeedDialItem.prototype, \"text\", void 0);\n __decorate([\n Property('')\n ], SpeedDialItem.prototype, \"title\", void 0);\n __decorate([\n Property(false)\n ], SpeedDialItem.prototype, \"disabled\", void 0);\n return SpeedDialItem;\n}(ChildProperty));\nexport { SpeedDialItem };\n/**\n * The SpeedDial component that appears in front of all the contents of the page and displays list of action buttons on click which is an extended version of FAB.\n * The button of speed dial is positioned in relative to a view port of browser or the .\n * It can display a menu of related actions or a custom content popupTemplate>.\n *\n */\nvar SpeedDial = /** @class */ (function (_super) {\n __extends(SpeedDial, _super);\n /**\n * Constructor for creating the widget\n *\n * @param {SpeedDialModel} options - Specifies the floating action button model\n * @param {string|HTMLButtonElement} element - Specifies the target element\n */\n function SpeedDial(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.isMenuOpen = false;\n _this.isClock = true;\n _this.isVertical = true;\n _this.isControl = false;\n _this.focusedIndex = -1;\n return _this;\n }\n /**\n * Initialize the control rendering\n *\n * @returns {void}\n * @private\n */\n SpeedDial.prototype.render = function () {\n this.initialize();\n };\n SpeedDial.prototype.preRender = function () {\n this.keyConfigs = {\n space: 'space',\n enter: 'enter',\n end: 'end',\n home: 'home',\n moveDown: 'downarrow',\n moveLeft: 'leftarrow',\n moveRight: 'rightarrow',\n moveUp: 'uparrow',\n esc: 'escape'\n };\n this.validateDirection();\n };\n /**\n * Get the properties to be maintained in the persisted state.\n *\n * @returns {string} - Persist data\n */\n SpeedDial.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n /**\n * Get component name.\n *\n * @returns {string} - Module name\n * @private\n */\n SpeedDial.prototype.getModuleName = function () {\n return 'speed-dial';\n };\n SpeedDial.prototype.initialize = function () {\n if (!this.element.id) {\n this.element.id = getUniqueID('e-' + this.getModuleName());\n }\n this.fab = new Fab({\n content: this.content,\n cssClass: this.cssClass ? (SPEEDDIAL + ' ' + this.cssClass) : SPEEDDIAL,\n disabled: this.disabled,\n enablePersistence: this.enablePersistence,\n enableRtl: this.enableRtl,\n iconCss: this.openIconCss,\n iconPosition: this.iconPosition,\n position: this.position,\n target: this.target,\n visible: this.visible,\n isPrimary: this.isPrimary\n });\n this.fab.appendTo(this.element);\n if ((this.items.length > 0) || this.popupTemplate) {\n this.createPopup();\n }\n this.wireEvents();\n };\n SpeedDial.prototype.wireEvents = function () {\n EventHandler.add(window, 'resize', this.resizeHandler, this);\n EventHandler.add(document.body, 'click', this.bodyClickHandler, this);\n if (this.opensOnHover) {\n this.wireFabHover();\n }\n else {\n this.wireFabClick();\n }\n };\n SpeedDial.prototype.wirePopupEvents = function () {\n this.removeRippleEffect = rippleEffect(this.popupEle, { selector: '.' + SDLIICON });\n this.keyboardModule = new KeyboardEvents(this.element, {\n keyAction: this.keyActionHandler.bind(this),\n keyConfigs: this.keyConfigs,\n eventName: 'keydown'\n });\n this.popupKeyboardModule = new KeyboardEvents(this.popupEle, {\n keyAction: this.popupKeyActionHandler.bind(this),\n keyConfigs: { esc: 'escape' },\n eventName: 'keydown'\n });\n this.documentKeyboardModule = new KeyboardEvents(document.body, {\n keyAction: this.popupKeyActionHandler.bind(this),\n keyConfigs: { enter: 'enter', space: 'space' },\n eventName: 'keydown'\n });\n EventHandler.add(this.popupEle, 'click', this.popupClick, this);\n EventHandler.add(this.popupEle, 'mouseleave', this.popupMouseLeaveHandle, this);\n };\n SpeedDial.prototype.wireFabClick = function () {\n EventHandler.add(this.fab.element, 'click', this.fabClick, this);\n };\n SpeedDial.prototype.wireFabHover = function () {\n this.popupEle.classList.add(HOVERSD);\n EventHandler.add(this.fab.element, 'mouseover', this.mouseOverHandle, this);\n EventHandler.add(this.element, 'mouseleave', this.mouseLeaveHandle, this);\n };\n SpeedDial.prototype.createPopup = function () {\n var className = SDPOPUP + ' ' + SDHIDDEN;\n className = this.enableRtl ? className + ' ' + RTLCLASS : className;\n className = this.cssClass ? className + ' ' + this.cssClass : className;\n this.popupEle = this.createElement('div', {\n className: className,\n id: this.element.id + '_popup'\n });\n this.element.insertAdjacentElement('afterend', this.popupEle);\n attributes(this.element, { 'aria-expanded': 'false', 'aria-haspopup': 'true', 'aria-controls': this.popupEle.id });\n this.setPopupContent();\n if (this.modal) {\n this.createOverlay();\n }\n this.checkTarget();\n this.setPositionProps();\n this.wirePopupEvents();\n };\n SpeedDial.prototype.createOverlay = function () {\n this.overlayEle = this.createElement('div', {\n id: this.element.id + '_overlay',\n className: (SDOVERLAY + (this.isMenuOpen ? '' : ' ' + SDHIDDEN) + ' ' + this.cssClass).trim()\n });\n this.element.insertAdjacentElement('beforebegin', this.overlayEle);\n };\n SpeedDial.prototype.popupClick = function () {\n this.isControl = true;\n };\n //Checks and closes the speed dial if the click happened outside this speed dial.\n SpeedDial.prototype.bodyClickHandler = function (e) {\n if (this.isControl) {\n this.isControl = false;\n return;\n }\n if (this.isMenuOpen) {\n this.hidePopupEle(e);\n }\n };\n SpeedDial.prototype.fabClick = function (e) {\n this.isControl = true;\n if (this.isMenuOpen) {\n this.hidePopupEle(e);\n }\n else {\n this.showPopupEle(e);\n }\n };\n SpeedDial.prototype.setPopupContent = function () {\n this.popupEle.classList.remove(RADIALSD, LINEARSD, TEMPLATESD);\n if (!this.popupTemplate) {\n this.popupEle.classList.add((this.mode === 'Radial') ? RADIALSD : LINEARSD);\n this.createUl();\n this.createItems();\n }\n else {\n this.popupEle.classList.add(TEMPLATESD);\n this.appendTemplate();\n }\n this.renderReactTemplates();\n };\n SpeedDial.prototype.appendTemplate = function () {\n var templateContainer = this.createElement('div', { className: SDTEMPLATECONTAINER });\n append([templateContainer], this.popupEle);\n var templateFunction = this.getTemplateString(this.popupTemplate);\n append(templateFunction({}, this, 'fabPopupTemplate', (this.element.id + 'popupTemplate'), this.isStringTemplate), templateContainer);\n };\n SpeedDial.prototype.getTemplateString = function (template) {\n var stringContent = '';\n try {\n var tempEle = select(template);\n if (typeof template !== 'function' && tempEle) {\n //Return innerHTML incase of jsrenderer script else outerHTML\n stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;\n }\n else {\n stringContent = template;\n }\n }\n catch (e) {\n stringContent = template;\n }\n return compile(stringContent);\n };\n SpeedDial.prototype.updatePopupTemplate = function () {\n if (this.popupEle) {\n if (this.popupEle.querySelector('.' + SDLI)) {\n this.clearItems();\n this.popupEle.classList.remove(RADIALSD, LINEARSD);\n this.popupEle.classList.add(TEMPLATESD);\n }\n while (this.popupEle.firstElementChild) {\n remove(this.popupEle.firstElementChild);\n }\n this.setPopupContent();\n this.updatePositionProperties();\n }\n else {\n this.createPopup();\n }\n };\n SpeedDial.prototype.createUl = function () {\n var popupUlEle = this.createElement('ul', {\n className: SDUL,\n id: this.element.id + '_ul',\n attrs: { 'role': 'menu' }\n });\n this.popupEle.appendChild(popupUlEle);\n };\n SpeedDial.prototype.createItems = function () {\n var _this = this;\n this.focusedIndex = -1;\n var ul = this.popupEle.querySelector('.' + SDUL);\n var _loop_1 = function (index) {\n var item = this_1.items[parseInt(index.toString(), 10)];\n var li = this_1.createElement('li', {\n className: SDLI + ' ' + SDHIDDEN,\n id: item.id ? item.id : (this_1.element.id + '_li_' + index),\n attrs: { 'role': 'menuitem' }\n });\n if (item.text) {\n li.setAttribute('aria-label', item.text);\n }\n if (this_1.itemTemplate) {\n var templateFunction = this_1.getTemplateString(this_1.itemTemplate);\n append(templateFunction(item, this_1, 'fabItemTemplate', (this_1.element.id + 'itemTemplate'), this_1.isStringTemplate), li);\n }\n else {\n if (item.iconCss) {\n var iconSpan = this_1.createElement('span', {\n className: SDLIICON + ' ' + item.iconCss\n });\n li.appendChild(iconSpan);\n }\n if (item.text) {\n var textSpan = this_1.createElement('span', {\n className: SDLITEXT\n });\n textSpan.innerText = item.text;\n li.appendChild(textSpan);\n if (!item.iconCss) {\n li.classList.add(SDLITEXTONLY);\n }\n }\n }\n if (item.disabled) {\n li.classList.add(DISABLED);\n li.setAttribute('aria-disabled', 'true');\n }\n else {\n EventHandler.add(li, 'click', function (e) { return _this.triggerItemClick(e, item); }, this_1);\n }\n if (item.title) {\n li.setAttribute('title', item.title);\n }\n var eventArgs = { element: li, item: item };\n this_1.trigger('beforeItemRender', eventArgs, function (args) {\n ul.appendChild(args.element);\n });\n };\n var this_1 = this;\n for (var index = 0; index < this.items.length; index++) {\n _loop_1(index);\n }\n };\n SpeedDial.prototype.setRTL = function () {\n this.popupEle.classList[this.enableRtl ? 'add' : 'remove'](RTLCLASS);\n this.clearHorizontalPosition();\n if (!(this.popupTemplate || (this.mode === 'Radial'))) {\n this.setLinearHorizontalPosition();\n }\n else {\n if (!this.popupTemplate && this.mode === 'Radial') {\n this.setRadialPosition();\n }\n this.setHorizontalPosition();\n }\n };\n SpeedDial.prototype.checkTarget = function () {\n this.isFixed = true;\n if (this.target) {\n this.targetEle = (typeof this.target === 'string') ? select(this.target) : this.target;\n if (this.targetEle) {\n this.targetEle.appendChild(this.element);\n this.isFixed = false;\n }\n }\n if (this.isFixed) {\n if (this.popupEle) {\n this.popupEle.classList.add(FIXEDSD);\n }\n if (this.overlayEle) {\n this.overlayEle.classList.add(FIXEDSD);\n }\n }\n else {\n if (this.popupEle) {\n this.popupEle.classList.remove(FIXEDSD);\n }\n if (this.overlayEle) {\n this.overlayEle.classList.remove(FIXEDSD);\n }\n }\n };\n SpeedDial.prototype.setVisibility = function (val) {\n this.setProperties({ visible: val }, true);\n this.fab.setProperties({ visible: val });\n };\n SpeedDial.prototype.popupMouseLeaveHandle = function (e) {\n var target = e.relatedTarget;\n if (this.opensOnHover && !(target.classList.contains(SPEEDDIAL) || closest(target, '.' + SPEEDDIAL))) {\n this.hidePopupEle(e);\n }\n };\n SpeedDial.prototype.mouseOverHandle = function (e) {\n this.showPopupEle(e);\n };\n SpeedDial.prototype.mouseLeaveHandle = function (e) {\n var target = e.relatedTarget;\n if (!(target.classList.contains(SDPOPUP) || closest(target, '.' + SDPOPUP))) {\n this.hidePopupEle(e);\n }\n };\n SpeedDial.prototype.popupKeyActionHandler = function (e) {\n switch (e.action) {\n case 'esc':\n this.hidePopupEle(e);\n break;\n case 'enter':\n case 'space':\n if (this.isMenuOpen && e.target !== this.element) {\n this.hidePopupEle(e);\n }\n break;\n }\n };\n SpeedDial.prototype.keyActionHandler = function (e) {\n e.preventDefault();\n switch (e.action) {\n case 'enter':\n case 'space':\n if (this.isMenuOpen) {\n if (this.focusedIndex !== -1) {\n this.triggerItemClick(e, this.items[this.focusedIndex]);\n }\n else {\n this.hidePopupEle(e);\n }\n }\n else {\n this.showPopupEle(e);\n }\n break;\n case 'esc':\n this.hidePopupEle(e);\n break;\n default:\n if (this.popupTemplate || !this.isMenuOpen) {\n break;\n }\n switch (e.action) {\n case 'end':\n this.focusLastElement();\n break;\n case 'home':\n this.focusFirstElement();\n break;\n case 'moveRight':\n if (this.mode === 'Radial') {\n this.focusLeftRightElement(false);\n }\n else {\n this.focusLinearElement(false);\n }\n break;\n case 'moveDown':\n if (this.mode === 'Radial') {\n this.focusUpDownElement(false);\n }\n else {\n this.focusLinearElement(false);\n }\n break;\n case 'moveLeft':\n if (this.mode === 'Radial') {\n this.focusLeftRightElement(true);\n }\n else {\n this.focusLinearElement(true);\n }\n break;\n case 'moveUp':\n if (this.mode === 'Radial') {\n this.focusUpDownElement(true);\n }\n else {\n this.focusLinearElement(true);\n }\n break;\n }\n break;\n }\n };\n SpeedDial.prototype.focusFirstElement = function () {\n var ele = selectAll('.' + SDLI, this.popupEle);\n var index = 0;\n while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED)) {\n index++;\n if (index > (ele.length - 1)) {\n return;\n }\n }\n this.setFocus(index, ele[parseInt(index.toString(), 10)]);\n };\n SpeedDial.prototype.focusLastElement = function () {\n var ele = selectAll('.' + SDLI, this.popupEle);\n var index = ele.length - 1;\n while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED)) {\n index--;\n if (index < 0) {\n return;\n }\n }\n this.setFocus(index, ele[parseInt(index.toString(), 10)]);\n };\n /*Linear*/\n SpeedDial.prototype.focusLinearElement = function (isLeftUp) {\n var isReversed = this.popupEle.classList.contains(SDVERTICALBOTTOM) ||\n this.popupEle.classList.contains(SDHORIZONTALRIGHT);\n /* Elements will be in reverse (RTL) order for these classes are present.\n Reversed and Down or right is previous.\n Not reversed and Up or left is previous.\n ((isReversed && !isLeftUp)||(!isReversed && isLeftUp)) ==> isReversed!==isLeftUp */\n if (isReversed !== isLeftUp) {\n this.focusPrevElement();\n }\n else {\n this.focusNextElement();\n }\n };\n /*Radial*/\n SpeedDial.prototype.focusLeftRightElement = function (isLeft) {\n /*radialTop position and left + anticlock or right + clock is previous\n other positions and right + anticlock or left + clock is previous\n ((isLeft && !this.isClock)||(!isLeft && this.isClock)) ==> isLeft!==this.isClock */\n var isradialTop = ['TopLeft', 'TopCenter', 'TopRight', 'MiddleLeft'].indexOf(this.position) !== -1;\n if ((isradialTop && (isLeft !== this.isClock)) || (!isradialTop && (isLeft === this.isClock))) {\n this.focusPrevElement();\n }\n else {\n this.focusNextElement();\n }\n };\n /*Radial*/\n SpeedDial.prototype.focusUpDownElement = function (isUp) {\n /*radialRight position and up + anticlock or down + clock is previous\n other positions and down + anticlock or up + clock is previous\n ((isUp && !this.isClock)||(!isUp && this.isClock)) ==> isUp!==this.isClock */\n var isradialRight = ['TopRight', 'MiddleRight', 'BottomRight', 'BottomCenter'].indexOf(this.position) !== -1;\n if ((isradialRight && (isUp !== this.isClock)) || (!isradialRight && (isUp === this.isClock))) {\n this.focusPrevElement();\n }\n else {\n this.focusNextElement();\n }\n };\n SpeedDial.prototype.focusPrevElement = function () {\n var ele = selectAll('.' + SDLI, this.popupEle);\n var index = this.focusedIndex;\n do {\n index--;\n if (index < 0) {\n this.setFocus(-1);\n return;\n }\n } while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED));\n this.setFocus(index, ele[parseInt(index.toString(), 10)]);\n };\n SpeedDial.prototype.focusNextElement = function () {\n var ele = selectAll('.' + SDLI, this.popupEle);\n var index = this.focusedIndex;\n do {\n index++;\n if (index > (ele.length - 1)) {\n return;\n }\n } while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED));\n this.setFocus(index, ele[parseInt(index.toString(), 10)]);\n };\n SpeedDial.prototype.setFocus = function (index, ele) {\n this.removeFocus();\n if (ele) {\n ele.classList.add(SDACTIVELI);\n }\n this.focusedIndex = index;\n };\n SpeedDial.prototype.removeFocus = function () {\n var preEle = select('.' + SDACTIVELI, this.popupEle);\n if (preEle) {\n preEle.classList.remove(SDACTIVELI);\n }\n };\n SpeedDial.prototype.updatePositionProperties = function () {\n this.hidePopupEle();\n this.clearPosition();\n this.validateDirection();\n this.setPositionProps();\n };\n SpeedDial.prototype.setPositionProps = function () {\n if (this.popupTemplate) {\n this.setPosition();\n }\n else if ((this.mode === 'Radial')) {\n this.setRadialPosition();\n this.setPosition();\n }\n else {\n this.setLinearPosition();\n this.setMaxSize();\n }\n };\n SpeedDial.prototype.validateDirection = function () {\n switch (this.direction) {\n case 'Up':\n this.actualLinDirection = (topPosition.indexOf(this.position) !== -1) ? 'Auto' : 'Up';\n break;\n case 'Down':\n this.actualLinDirection = (bottomPosition.indexOf(this.position) !== -1) ? 'Auto' : 'Down';\n break;\n case 'Right':\n this.actualLinDirection = (rightPosition.indexOf(this.position) !== -1) ? 'Auto' : 'Right';\n break;\n case 'Left':\n this.actualLinDirection = (leftPosition.indexOf(this.position) !== -1) ? 'Auto' : 'Left';\n break;\n case 'Auto':\n default:\n this.actualLinDirection = 'Auto';\n break;\n }\n this.isVertical = !((this.actualLinDirection === 'Left') || (this.actualLinDirection === 'Right'));\n };\n SpeedDial.prototype.setMaxSize = function () {\n var top = this.element.offsetTop;\n var left = this.element.offsetLeft;\n var bottom = (this.isFixed ? window.innerHeight : this.targetEle.clientHeight) -\n this.element.offsetTop - this.element.offsetHeight;\n var right = (this.isFixed ? window.innerWidth : this.targetEle.clientWidth) -\n this.element.offsetLeft - this.element.offsetWidth;\n var limit = 0;\n var popupUlEle = this.popupEle.querySelector('.' + SDUL);\n if (this.isVertical) {\n limit = ((this.actualLinDirection === 'Up') || ((this.actualLinDirection === 'Auto') && (topPosition.indexOf(this.position) === -1))) ? top : bottom;\n if (limit < popupUlEle.offsetHeight) {\n this.popupEle.classList.add(SDOVERFLOW, SDVERTOVERFLOW);\n popupUlEle.style.setProperty(SDOVERFLOWLIMIT, limit + 'px');\n }\n }\n else {\n limit = this.enableRtl ? (this.direction === 'Right' ? left : right) : (this.direction === 'Right' ? right : left);\n if (limit < popupUlEle.offsetWidth) {\n this.popupEle.classList.add(SDOVERFLOW, SDHORZOVERFLOW);\n popupUlEle.style.setProperty(SDOVERFLOWLIMIT, limit + 'px');\n }\n }\n };\n SpeedDial.prototype.setLinearPosition = function () {\n var vertDist = 0;\n //Check whether the position value should be in top\n var isTop = (this.actualLinDirection === 'Down') || ((this.actualLinDirection === 'Auto') && (topPosition.indexOf(this.position) !== -1)) ||\n (!this.isVertical && (bottomPosition.indexOf(this.position) === -1));\n var elementOffSetHeight = this.element.offsetHeight / 2;\n var isMiddle = ['MiddleRight', 'MiddleCenter', 'MiddleLeft'].indexOf(this.position) !== -1;\n if (isTop) {\n vertDist = this.element.offsetTop + (this.isVertical ? this.element.offsetHeight : 0);\n if (isMiddle) {\n if (this.actualLinDirection === 'Right' || this.actualLinDirection === 'Left') {\n vertDist = this.element.offsetTop - elementOffSetHeight;\n }\n if (this.actualLinDirection === 'Down') {\n vertDist = vertDist - elementOffSetHeight;\n }\n }\n if (!this.isVertical) {\n this.popupEle.classList.add(SDHORIZONTALTOP);\n }\n }\n else {\n vertDist = this.isFixed ? window.document.documentElement.clientHeight : this.targetEle.clientHeight;\n vertDist = (vertDist - this.element.offsetTop - (this.isVertical ? 0 : this.element.offsetHeight));\n if (isMiddle) {\n if (this.actualLinDirection === 'Auto' || this.actualLinDirection === 'Up') {\n vertDist = vertDist + elementOffSetHeight;\n }\n }\n if (this.isVertical) {\n this.popupEle.classList.add(SDVERTICALBOTTOM);\n }\n }\n this.popupEle.classList.add(isTop ? SDTOP : SDBOTTOM);\n this.popupEle.style.setProperty(SDVERTDIST, vertDist + 'px');\n this.setLinearHorizontalPosition();\n };\n SpeedDial.prototype.setLinearHorizontalPosition = function () {\n //Check whether the position value should be in left\n if ((this.actualLinDirection === 'Right') || (this.isVertical && (rightPosition.indexOf(this.position) === -1))) {\n if (this.enableRtl) {\n this.setRight();\n }\n else {\n this.setLeft();\n } //reverse the direction when RTL enabled\n if (!this.isVertical) {\n this.popupEle.classList.add(SDHORIZONTALLEFT);\n }\n }\n else {\n if (this.enableRtl) {\n this.setLeft();\n }\n else {\n this.setRight();\n } //reverse the direction when RTL enabled\n this.popupEle.classList.add(this.isVertical ? SDVERTICALRIGHT : SDHORIZONTALRIGHT);\n }\n };\n SpeedDial.prototype.setLeft = function () {\n var elementOffSetWidth = this.element.offsetWidth / 2;\n var isCenter = ['TopCenter', 'MiddleCenter', 'BottomCenter'].indexOf(this.position) !== -1;\n var horzDist = this.element.offsetLeft + (this.isVertical ? 0 : this.element.offsetWidth);\n if (isCenter) {\n if (this.actualLinDirection === 'Auto' || this.actualLinDirection === 'Down' || this.actualLinDirection === 'Up') {\n horzDist = this.element.offsetLeft - elementOffSetWidth;\n }\n else {\n horzDist = this.actualLinDirection === 'Right' ? this.element.offsetLeft + elementOffSetWidth : horzDist + elementOffSetWidth;\n }\n }\n this.popupEle.style.setProperty(SDHORZDIST, horzDist + 'px');\n this.popupEle.classList.add(SDLEFT);\n };\n SpeedDial.prototype.setRight = function () {\n var elementOffSetWidth = this.element.offsetWidth / 2;\n var isCenter = ['TopCenter', 'MiddleCenter', 'BottomCenter'].indexOf(this.position) !== -1;\n var horzDist = this.isFixed ? window.document.documentElement.clientWidth : this.targetEle.clientWidth;\n horzDist = (horzDist - this.element.offsetLeft - (this.isVertical ? this.element.offsetWidth : 0));\n if (isCenter && this.actualLinDirection === 'Left') {\n horzDist = horzDist + elementOffSetWidth;\n }\n if (this.popupEle.classList.contains('e-rtl') && isCenter) {\n horzDist = horzDist - elementOffSetWidth;\n }\n this.popupEle.style.setProperty(SDHORZDIST, horzDist + 'px');\n this.popupEle.classList.add(SDRIGHT);\n };\n SpeedDial.prototype.setPosition = function () {\n //Check for middle Position\n if (['MiddleLeft', 'MiddleRight', 'MiddleCenter'].indexOf(this.position) !== -1) {\n this.popupEle.classList.add(SDMIDDLE);\n var yoffset = ((this.isFixed ? window.innerHeight : this.targetEle.clientHeight) - this.popupEle.offsetHeight) / 2;\n this.popupEle.style.setProperty(SDVERTDIST, yoffset + 'px');\n }\n this.popupEle.classList.add((bottomPosition.indexOf(this.position) === -1) ? SDTOP : SDBOTTOM);\n this.setHorizontalPosition();\n };\n SpeedDial.prototype.setHorizontalPosition = function () {\n //Check for Center Position\n if (['TopCenter', 'BottomCenter', 'MiddleCenter'].indexOf(this.position) !== -1) {\n this.popupEle.classList.add(SDCENTER);\n var xoffset = ((this.isFixed ? window.innerWidth : this.targetEle.clientWidth) - this.popupEle.offsetWidth) / 2;\n this.popupEle.style.setProperty(SDHORZDIST, xoffset + 'px');\n }\n var isRight = rightPosition.indexOf(this.position) !== -1;\n this.popupEle.classList.add((!(this.enableRtl || isRight) || (this.enableRtl && isRight)) ? SDLEFT : SDRIGHT);\n };\n SpeedDial.prototype.setCustomRadialPosition = function () {\n var viewportWidth = document.documentElement.clientWidth;\n var viewportHeight = document.documentElement.clientHeight;\n if (['TopLeft', 'BottomLeft', 'MiddleLeft'].indexOf(this.position) !== -1) {\n var horzDist = void 0;\n if (this.enableRtl) {\n if (this.isFixed) {\n horzDist = viewportWidth - (this.element.offsetLeft + this.element.offsetWidth);\n }\n else {\n horzDist = this.targetEle.clientWidth - (this.element.offsetLeft + this.element.offsetWidth);\n }\n }\n else {\n horzDist = this.element.offsetLeft;\n }\n this.popupEle.style.setProperty(SDRADICALHORZDIST, horzDist + 'px');\n }\n if (['TopLeft', 'TopCenter', 'TopRight'].indexOf(this.position) !== -1) {\n this.popupEle.style.top = this.element.offsetTop + 'px';\n }\n if (['TopRight', 'BottomRight', 'MiddleRight'].indexOf(this.position) !== -1) {\n var horzDist = void 0;\n if (this.enableRtl) {\n horzDist = this.element.offsetLeft;\n }\n else {\n if (this.isFixed) {\n horzDist = viewportWidth - (this.element.offsetLeft + this.element.offsetWidth);\n }\n else {\n horzDist = this.targetEle.clientWidth - (this.element.offsetLeft + this.element.offsetWidth);\n }\n }\n this.popupEle.style.setProperty(SDRADICALHORZDIST, horzDist + 'px');\n }\n if (['BottomLeft', 'BottomCenter', 'BottomRight'].indexOf(this.position) !== -1) {\n if (this.isFixed) {\n this.popupEle.style.bottom = viewportHeight - (this.element.offsetTop + this.element.offsetHeight) + 'px';\n }\n else {\n this.popupEle.style.bottom = this.targetEle.clientHeight - (this.element.offsetTop + this.element.offsetHeight) + 'px';\n }\n }\n if (['TopCenter', 'MiddleCenter', 'BottomCenter'].indexOf(this.position) !== -1) {\n var horzDist = void 0;\n if (this.enableRtl) {\n if (this.isFixed) {\n horzDist = viewportWidth - (this.element.offsetLeft + this.element.offsetWidth) - this.popupEle.offsetWidth / 2;\n }\n else {\n var targetEleWidth = this.targetEle.clientWidth;\n var popupEleWidth = this.popupEle.offsetWidth;\n horzDist = targetEleWidth - (this.element.offsetLeft + this.element.offsetWidth) - popupEleWidth / 2;\n }\n }\n else {\n horzDist = ((this.element.offsetLeft) - this.popupEle.offsetWidth / 2);\n }\n this.popupEle.style.setProperty(SDRADICALHORZDIST, horzDist + 'px');\n }\n if (['MiddleLeft', 'MiddleCenter', 'MiddleRight'].indexOf(this.position) !== -1) {\n this.popupEle.style.top = ((this.element.offsetTop) - this.popupEle.offsetHeight / 2) + 'px';\n }\n };\n SpeedDial.prototype.setRadialPosition = function () {\n this.setRadialCorner();\n var range = this.getActualRange();\n this.isClock = range.direction === 'Clockwise';\n var offset = formatUnit(range.offset);\n var li = selectAll('.' + SDLI, this.popupEle);\n this.popupEle.style.setProperty(SDRADICALOFFSET, offset);\n this.popupEle.style.setProperty(SDRADICALMINHEIGHT, li[0].offsetHeight + 'px');\n this.popupEle.style.setProperty(SDRADICALMINWIDTH, li[0].offsetWidth + 'px');\n var availableAngle = Math.abs(range.endAngle - range.startAngle);\n //Start and end will be same for Middle Center position, hence available angle will 0 or 360.\n var gaps = ((availableAngle === 360) || (availableAngle === 0)) ? li.length : li.length - 1;\n var perAngle = availableAngle / gaps;\n for (var i = 0; i < li.length; i++) {\n var ele = li[parseInt(i.toString(), 10)];\n var startAngle = range.startAngle;\n var angle = this.isClock ? ((startAngle) + (perAngle * i)) : ((startAngle) - (perAngle * i));\n angle = angle % 360; // removing the Zerp crossing changes.\n ele.style.setProperty(SDRADICALANGLE, angle + 'deg');\n }\n };\n SpeedDial.prototype.setRadialCorner = function () {\n //topLeftPosition\n if (['TopLeft', 'TopCenter', 'MiddleLeft', 'MiddleCenter'].indexOf(this.position) !== -1) {\n this.popupEle.classList.add(this.enableRtl ? SDTOPRIGHT : SDTOPLEFT);\n }\n //topRightPosition\n if (['TopRight', 'TopCenter', 'MiddleRight', 'MiddleCenter'].indexOf(this.position) !== -1) {\n this.popupEle.classList.add(this.enableRtl ? SDTOPLEFT : SDTOPRIGHT);\n }\n //bottpmLeftPosition\n if (['BottomLeft', 'BottomCenter', 'MiddleLeft', 'MiddleCenter'].indexOf(this.position) !== -1) {\n this.popupEle.classList.add(this.enableRtl ? SDBOTTOMRIGHT : SDBOTTOMLEFT);\n }\n //bottomRightPosition\n if (['BottomRight', 'BottomCenter', 'MiddleRight', 'MiddleCenter'].indexOf(this.position) !== -1) {\n this.popupEle.classList.add(this.enableRtl ? SDBOTTOMLEFT : SDBOTTOMRIGHT);\n }\n };\n // 0,360 is at right, 90 is at Bottom, 180 is at left, 270 is at top\n SpeedDial.prototype.getActualRange = function () {\n var range = { offset: this.radialSettings.offset };\n var start = this.radialSettings.startAngle;\n var end = this.radialSettings.endAngle;\n var isClockwise = false;\n switch (this.position) {\n case 'TopLeft':\n case 'TopRight':\n // Switch Left and Right for RTL mode.\n if (('TopLeft' === this.position) !== this.enableRtl) {\n //TopLeft\n isClockwise = this.radialSettings.direction === 'Clockwise';\n this.checkAngleRange(start, end, range, isClockwise, 0, 90, false);\n }\n else {\n //TopRight\n isClockwise = this.radialSettings.direction !== 'AntiClockwise';\n this.checkAngleRange(start, end, range, isClockwise, 90, 180, false);\n }\n break;\n case 'TopCenter':\n isClockwise = this.radialSettings.direction === 'Clockwise';\n this.checkAngleRange(start, end, range, isClockwise, 0, 180, false);\n break;\n case 'MiddleLeft':\n case 'MiddleRight':\n // Switch Left and Right for RTL mode.\n if (('MiddleLeft' === this.position) !== this.enableRtl) {\n //MiddleLeft\n isClockwise = this.radialSettings.direction === 'Clockwise';\n /**Replace the value if not defined or greater than 360 or less than 0 or between 91 and 269*/\n start = (isNullOrUndefined(start) || (start < 0) || (start > 360) || ((start > 90) && (start < 270))) ?\n (isClockwise ? 270 : 90) : start;\n end = (isNullOrUndefined(end) || (end < 0) || (end > 360) || ((end > 90) && (end < 270))) ?\n (isClockwise ? 90 : 270) : end;\n /**update for Zero Crossing */\n start = start < 91 ? start + 360 : start;\n end = end < 91 ? end + 360 : end;\n var switchVal = (isClockwise && (end < start)) || (!isClockwise && (end > start));\n range.startAngle = switchVal ? end : start;\n range.endAngle = switchVal ? start : end;\n }\n else {\n //MiddleRight\n isClockwise = this.radialSettings.direction !== 'AntiClockwise';\n this.checkAngleRange(start, end, range, isClockwise, 90, 270, false);\n }\n break;\n case 'MiddleCenter':\n isClockwise = this.radialSettings.direction !== 'AntiClockwise';\n /**Replace the value if not defined or greater than 360 or less than 0 */\n start = (isNullOrUndefined(start) || (start < 0) || (start > 360)) ? (isClockwise ? 0 : 360) : start;\n end = (isNullOrUndefined(end) || (end < 0) || (end > 360)) ? (isClockwise ? 360 : 0) : end;\n /**update for Zero Crossing */\n range.startAngle = (!isClockwise && (start <= end)) ? (start + 360) : start;\n range.endAngle = (isClockwise && (end <= start)) ? (end + 360) : end;\n break;\n case 'BottomLeft':\n case 'BottomRight':\n // Switch Left and Right for RTL mode.\n if (('BottomLeft' === this.position) !== this.enableRtl) {\n //BottomLeft\n isClockwise = this.radialSettings.direction === 'Clockwise';\n this.checkAngleRange(start, end, range, isClockwise, 270, 360, true);\n }\n else {\n //BottomRight\n isClockwise = this.radialSettings.direction !== 'AntiClockwise';\n this.checkAngleRange(start, end, range, isClockwise, 180, 270, true);\n }\n break;\n case 'BottomCenter':\n isClockwise = this.radialSettings.direction !== 'AntiClockwise';\n this.checkAngleRange(start, end, range, isClockwise, 180, 360, true);\n break;\n }\n range.direction = isClockwise ? 'Clockwise' : 'AntiClockwise';\n return range;\n };\n SpeedDial.prototype.checkAngleRange = function (start, end, range, isClockwise, min, max, check0) {\n start = this.checkAngle(start, isClockwise, min, max, check0);\n end = this.checkAngle(end, !isClockwise, min, max, check0);\n /**Switch the values if both are values are in the range but not as per direction*/\n var switchVal = (isClockwise && (end < start)) || (!isClockwise && (end > start));\n range.startAngle = switchVal ? end : start;\n range.endAngle = switchVal ? start : end;\n };\n SpeedDial.prototype.checkAngle = function (val, isStart, min, max, check0) {\n if (isNullOrUndefined(val) || (val < 0) || (val > 360)) {\n return isStart ? min : max;\n }\n else {\n val = check0 ? ((val === 0) ? 360 : val) : ((val === 360) ? 0 : val);\n /**check whether the value is in the range if not replace them */\n return ((val >= min) && (val <= max)) ? val : isStart ? min : max;\n }\n };\n SpeedDial.prototype.clearPosition = function () {\n this.popupEle.style.removeProperty(SDRADICALOFFSET);\n this.popupEle.style.removeProperty(SDRADICALMINHEIGHT);\n this.popupEle.style.removeProperty(SDRADICALMINWIDTH);\n this.popupEle.classList.remove(SDTOPLEFT, SDTOPRIGHT, SDBOTTOMLEFT, SDBOTTOMRIGHT);\n this.popupEle.classList.remove(SDTOP, SDBOTTOM, SDMIDDLE);\n this.popupEle.classList.remove(SDHORIZONTALTOP, SDVERTICALBOTTOM);\n this.popupEle.style.removeProperty(SDVERTDIST);\n this.clearHorizontalPosition();\n this.clearOverflow();\n };\n SpeedDial.prototype.clearHorizontalPosition = function () {\n this.popupEle.style.removeProperty(SDHORZDIST);\n this.popupEle.style.removeProperty(SDRADICALHORZDIST);\n this.popupEle.style.removeProperty('top');\n this.popupEle.style.removeProperty('bottom');\n this.popupEle.classList.remove(SDRIGHT, SDLEFT, SDCENTER);\n this.popupEle.classList.remove(SDVERTICALRIGHT, SDHORIZONTALLEFT, SDHORIZONTALRIGHT);\n };\n SpeedDial.prototype.clearOverflow = function () {\n this.popupEle.classList.remove(SDOVERFLOW, SDVERTOVERFLOW, SDHORZOVERFLOW);\n this.popupEle.style.removeProperty(SDOVERFLOWLIMIT);\n };\n SpeedDial.prototype.hidePopupEle = function (e) {\n var _this = this;\n if (!this.popupEle || !this.isMenuOpen) {\n return;\n }\n var eventArgs = { element: this.popupEle, event: e, cancel: false };\n this.trigger('beforeClose', eventArgs, function (args) {\n if (args.cancel) {\n return;\n }\n if (_this.animation.effect !== 'None') {\n var closeAnimation_1 = {\n name: (_this.animation.effect + 'Out'),\n timingFunction: 'easeOut'\n };\n var eleArray_1 = _this.popupTemplate ? [_this.popupEle.firstElementChild] : selectAll('.' + SDLI, _this.popupEle);\n var timeOutInterval_1 = _this.animation.duration / (eleArray_1.length + 1);\n closeAnimation_1.duration = 2 * timeOutInterval_1;\n /* To keep the animation smooth, start the animation of the second element when animation first element is half completed */\n var animateElement_1 = function (curIndex) {\n var ele = eleArray_1[parseInt(curIndex.toString(), 10)];\n closeAnimation_1.delay = (curIndex === eleArray_1.length - 1) ? _this.animation.delay : 0;\n closeAnimation_1.begin = function () { if (curIndex === eleArray_1.length - 1) {\n _this.startHide();\n } };\n closeAnimation_1.end = function () {\n ele.classList.add(SDHIDDEN);\n if (curIndex === 0) {\n _this.endHide();\n }\n };\n new Animation(closeAnimation_1).animate(ele);\n if (curIndex !== 0) {\n var index_1 = curIndex - 1;\n setTimeout(function () {\n animateElement_1(index_1);\n }, timeOutInterval_1);\n }\n };\n animateElement_1(eleArray_1.length - 1);\n }\n else {\n _this.startHide();\n if (!_this.popupTemplate) {\n var ele = selectAll('.' + SDLI, _this.popupEle);\n ele.forEach(function (element) { element.classList.add(SDHIDDEN); });\n }\n _this.endHide();\n }\n });\n };\n SpeedDial.prototype.startHide = function () {\n this.element.setAttribute('aria-expanded', 'false');\n this.removeFocus();\n this.isMenuOpen = false;\n };\n SpeedDial.prototype.endHide = function () {\n this.fab.setProperties({ iconCss: this.openIconCss });\n this.popupEle.classList.add(SDHIDDEN);\n if (this.popupTemplate) {\n this.setVisibility(true);\n }\n this.toggleOverlay();\n if (this.popupTemplate) {\n this.popupEle.removeAttribute('tabindex');\n }\n this.trigger('onClose', { element: this.popupEle });\n };\n SpeedDial.prototype.showPopupEle = function (e) {\n var _this = this;\n if (!this.popupEle || this.isMenuOpen) {\n return;\n }\n if (this.popupTemplate || (this.mode === 'Radial')) {\n this.setCustomRadialPosition();\n }\n else {\n this.setLinearPosition();\n }\n var eventArgs = { element: this.popupEle, event: e, cancel: false };\n this.trigger('beforeOpen', eventArgs, function (args) {\n if (args.cancel) {\n return;\n }\n if (_this.animation.effect !== 'None' || (animationMode === 'Enable' && _this.animation.effect === 'None')) {\n if (animationMode === 'Enable' && _this.animation.effect === 'None') {\n _this.animation.effect = 'Fade';\n }\n if (animationMode === 'Enable' && _this.animation.duration === 0) {\n _this.animation.duration = 400;\n }\n var openAnimation_1 = {\n name: (_this.animation.effect + 'In'),\n timingFunction: 'easeIn'\n };\n var eleArray_2 = _this.popupTemplate ? [_this.popupEle.firstElementChild] : selectAll('.' + SDLI, _this.popupEle);\n var timeOutInterval_2 = _this.animation.duration / (eleArray_2.length + 1);\n openAnimation_1.duration = 2 * timeOutInterval_2;\n /* To keep the animation smooth, start the animation of the second element when animation first element is half completed */\n var animateElement_2 = function (curIndex) {\n var ele = eleArray_2[parseInt(curIndex.toString(), 10)];\n openAnimation_1.delay = (curIndex === 0) ? _this.animation.delay : 0;\n openAnimation_1.begin = function () {\n if (curIndex === 0) {\n _this.startShow();\n }\n ele.classList.remove(SDHIDDEN);\n };\n openAnimation_1.end = function () { if (curIndex === eleArray_2.length - 1) {\n _this.endShow();\n } };\n new Animation(openAnimation_1).animate(ele);\n if (curIndex !== eleArray_2.length - 1) {\n var index_2 = curIndex + 1;\n setTimeout(function () {\n animateElement_2(index_2);\n }, timeOutInterval_2);\n }\n };\n animateElement_2(0);\n }\n else {\n _this.startShow();\n if (!_this.popupTemplate) {\n var ele = selectAll('.' + SDLI, _this.popupEle);\n ele.forEach(function (element) { element.classList.remove(SDHIDDEN); });\n }\n _this.endShow();\n }\n });\n };\n SpeedDial.prototype.startShow = function () {\n this.element.setAttribute('aria-expanded', 'true');\n this.isMenuOpen = true;\n this.toggleOverlay();\n this.popupEle.classList.remove(SDHIDDEN);\n if (this.popupTemplate) {\n this.setVisibility(false);\n }\n };\n SpeedDial.prototype.endShow = function () {\n if (this.closeIconCss) {\n this.fab.setProperties({ iconCss: this.closeIconCss });\n }\n if (this.popupTemplate) {\n this.popupEle.setAttribute('tabindex', '1');\n this.popupEle.focus();\n }\n this.trigger('onOpen', { element: this.popupEle });\n };\n SpeedDial.prototype.toggleOverlay = function () {\n if (!this.overlayEle) {\n return;\n }\n this.overlayEle.classList[this.isMenuOpen ? 'remove' : 'add'](SDHIDDEN);\n };\n SpeedDial.prototype.removeOverlayEle = function () {\n if (!this.overlayEle) {\n return;\n }\n remove(this.overlayEle);\n this.overlayEle = undefined;\n };\n SpeedDial.prototype.updatePopupItems = function () {\n if (this.popupEle) {\n this.hidePopupEle();\n this.clearItems();\n this.createItems();\n this.updatePositionProperties();\n }\n else {\n this.createPopup();\n }\n };\n SpeedDial.prototype.handleResize = function (e) {\n if (!this.popupEle) {\n return;\n }\n this.hidePopupEle(e);\n this.clearOverflow();\n this.setPositionProps();\n };\n SpeedDial.prototype.triggerItemClick = function (e, item) {\n var target = e.target;\n target = target.classList.contains(SDLI) ? target : closest(target, '.' + SDLI);\n var eventArgs = { element: target, item: item, event: e };\n this.trigger('clicked', eventArgs);\n this.hidePopupEle(e);\n };\n /**\n * Opens the SpeedDial popup to display to display the speed dial items or the popupTemplate.\n *\n * @returns {void}\n */\n SpeedDial.prototype.show = function () {\n this.showPopupEle();\n };\n /**\n * Closes the SpeedDial popup.\n *\n *@returns {void}\n */\n SpeedDial.prototype.hide = function () {\n this.hidePopupEle();\n };\n /**\n * Refreshes the button position of speed dial. You can call this method to re-position button when the target is resized.\n *\n *@returns {void}\n */\n SpeedDial.prototype.refreshPosition = function () {\n this.resizeHandler();\n };\n SpeedDial.prototype.resizeHandler = function (e) {\n this.handleResize(e);\n };\n SpeedDial.prototype.clearItems = function () {\n var liList = selectAll('.' + SDLI, this.popupEle);\n liList.forEach(function (element) {\n remove(element);\n });\n };\n SpeedDial.prototype.unwireEvents = function () {\n EventHandler.remove(window, 'resize', this.resizeHandler);\n EventHandler.remove(document.body, 'click', this.bodyClickHandler);\n if (this.opensOnHover) {\n this.unwireFabHover();\n }\n else {\n this.unwireFabClick();\n }\n };\n SpeedDial.prototype.unwireFabClick = function () {\n EventHandler.remove(this.fab.element, 'click', this.fabClick);\n };\n SpeedDial.prototype.unwireFabHover = function () {\n this.popupEle.classList.remove(HOVERSD);\n EventHandler.remove(this.fab.element, 'mouseover', this.mouseOverHandle);\n EventHandler.remove(this.element, 'mouseleave', this.mouseLeaveHandle);\n };\n SpeedDial.prototype.unwirePopupEvents = function () {\n if (isRippleEnabled) {\n this.removeRippleEffect();\n }\n this.removeRippleEffect = null;\n this.keyboardModule.destroy();\n this.popupKeyboardModule.destroy();\n this.documentKeyboardModule.destroy();\n this.keyboardModule = null;\n this.popupKeyboardModule = null;\n this.documentKeyboardModule = null;\n EventHandler.remove(this.popupEle, 'click', this.popupClick);\n EventHandler.remove(this.popupEle, 'mouseleave', this.popupMouseLeaveHandle);\n };\n SpeedDial.prototype.destroy = function () {\n var _this = this;\n _super.prototype.destroy.call(this);\n this.unwireEvents();\n ['aria-expanded', 'aria-haspopup', 'aria-controls'].forEach(function (attr) {\n _this.element.removeAttribute(attr);\n });\n if (this.popupEle) {\n this.unwirePopupEvents();\n remove(this.popupEle);\n this.popupEle = undefined;\n }\n this.removeOverlayEle();\n this.fab.destroy();\n this.fab = undefined;\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @param {SpeedDialModel} newProp - Specifies new properties\n * @param {SpeedDialModel} oldProp - Specifies old properties\n * @returns {void}\n * @private\n */\n SpeedDial.prototype.onPropertyChanged = function (newProp, oldProp) {\n var fabProplist = ['content', 'cssClass', 'disabled', 'enablePersistence', 'enableRtl', 'iconPosition', 'position', 'target', 'template', 'title', 'visible', 'isPrimary'];\n var fabModel = extend({}, newProp);\n for (var _i = 0, _a = Object.keys(fabModel); _i < _a.length; _i++) {\n var prop = _a[_i];\n if ((fabProplist).indexOf(prop) < 0) {\n deleteObject(fabModel, prop);\n }\n }\n this.fab.setProperties(fabModel);\n for (var _b = 0, _c = Object.keys(newProp); _b < _c.length; _b++) {\n var prop = _c[_b];\n switch (prop) {\n case 'cssClass':\n if (!this.popupEle) {\n break;\n }\n if (oldProp.cssClass) {\n removeClass(this.overlayEle ? [this.popupEle, this.overlayEle] : [this.popupEle], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass(this.overlayEle ? [this.popupEle, this.overlayEle] : [this.popupEle], newProp.cssClass.split(' '));\n }\n break;\n case 'visible':\n case 'disabled':\n this.hide();\n break;\n case 'enableRtl':\n if (!this.popupEle) {\n break;\n }\n this.setRTL();\n break;\n case 'openIconCss':\n if (!this.isMenuOpen) {\n this.fab.setProperties({ iconCss: this.openIconCss });\n }\n break;\n case 'closeIconCss':\n if (this.isMenuOpen) {\n this.fab.setProperties({ iconCss: this.closeIconCss });\n }\n break;\n case 'position':\n if (!this.popupEle) {\n break;\n }\n this.updatePositionProperties();\n break;\n case 'direction':\n if (!this.popupEle || this.popupTemplate) {\n break;\n }\n this.updatePositionProperties();\n break;\n case 'popupTemplate':\n this.updatePopupTemplate();\n break;\n case 'target':\n this.hidePopupEle();\n this.checkTarget();\n if (this.overlayEle) {\n this.element.insertAdjacentElement('beforebegin', this.overlayEle);\n }\n if (!this.popupEle) {\n break;\n }\n this.element.insertAdjacentElement('afterend', this.popupEle);\n this.updatePositionProperties();\n break;\n case 'items':\n case 'itemTemplate':\n if (this.popupTemplate) {\n break;\n }\n this.updatePopupItems();\n break;\n case 'modal':\n if (newProp.modal) {\n this.createOverlay();\n }\n else {\n this.removeOverlayEle();\n }\n break;\n case 'mode':\n if (!this.popupEle || this.popupTemplate) {\n break;\n }\n this.popupEle.classList.remove(RADIALSD, LINEARSD);\n this.popupEle.classList.add((this.mode === 'Radial') ? RADIALSD : LINEARSD);\n this.updatePositionProperties();\n break;\n case 'radialSettings':\n if (this.popupEle && (this.mode === 'Radial') && !this.popupTemplate) {\n this.setRadialPosition();\n }\n break;\n case 'opensOnHover':\n if (this.opensOnHover) {\n this.unwireFabClick();\n this.wireFabHover();\n }\n else {\n this.unwireFabHover();\n this.wireFabClick();\n }\n break;\n }\n }\n };\n __decorate([\n Complex({}, SpeedDialAnimationSettings)\n ], SpeedDial.prototype, \"animation\", void 0);\n __decorate([\n Property('')\n ], SpeedDial.prototype, \"content\", void 0);\n __decorate([\n Property('')\n ], SpeedDial.prototype, \"closeIconCss\", void 0);\n __decorate([\n Property('')\n ], SpeedDial.prototype, \"cssClass\", void 0);\n __decorate([\n Property('Auto')\n ], SpeedDial.prototype, \"direction\", void 0);\n __decorate([\n Property(false)\n ], SpeedDial.prototype, \"disabled\", void 0);\n __decorate([\n Property('Left')\n ], SpeedDial.prototype, \"iconPosition\", void 0);\n __decorate([\n Collection([], SpeedDialItem)\n ], SpeedDial.prototype, \"items\", void 0);\n __decorate([\n Property('')\n ], SpeedDial.prototype, \"itemTemplate\", void 0);\n __decorate([\n Property('Linear')\n ], SpeedDial.prototype, \"mode\", void 0);\n __decorate([\n Property('')\n ], SpeedDial.prototype, \"openIconCss\", void 0);\n __decorate([\n Property(false)\n ], SpeedDial.prototype, \"opensOnHover\", void 0);\n __decorate([\n Property('BottomRight')\n ], SpeedDial.prototype, \"position\", void 0);\n __decorate([\n Property(false)\n ], SpeedDial.prototype, \"modal\", void 0);\n __decorate([\n Property('')\n ], SpeedDial.prototype, \"popupTemplate\", void 0);\n __decorate([\n Complex({}, RadialSettings)\n ], SpeedDial.prototype, \"radialSettings\", void 0);\n __decorate([\n Property('')\n ], SpeedDial.prototype, \"target\", void 0);\n __decorate([\n Property(true)\n ], SpeedDial.prototype, \"visible\", void 0);\n __decorate([\n Property(true)\n ], SpeedDial.prototype, \"isPrimary\", void 0);\n __decorate([\n Event()\n ], SpeedDial.prototype, \"beforeClose\", void 0);\n __decorate([\n Event()\n ], SpeedDial.prototype, \"beforeItemRender\", void 0);\n __decorate([\n Event()\n ], SpeedDial.prototype, \"beforeOpen\", void 0);\n __decorate([\n Event()\n ], SpeedDial.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], SpeedDial.prototype, \"clicked\", void 0);\n __decorate([\n Event()\n ], SpeedDial.prototype, \"onClose\", void 0);\n __decorate([\n Event()\n ], SpeedDial.prototype, \"onOpen\", void 0);\n SpeedDial = __decorate([\n NotifyPropertyChanges\n ], SpeedDial);\n return SpeedDial;\n}(Component));\nexport { SpeedDial };\n"],"names":["wrapperInitialize","createElement","tag","type","element","WRAPPER","role","input","tagName","ejInstance","getValue","attrs","props","index","len","attributes","length","indexOf","nodeName","setAttribute","nodeValue","class","appendChild","classList","add","remove","setValue","deleteObject","getTextNode","node","childnode","childNodes","i","nodeType","destroy","ejInst","wrapper","parentNode","insertBefore","detach","checked","forEach","key","removeAttribute","innerHTML","preRender","proxy","control","moduleName","getAttribute","id","getUniqueID","createCheckBox","enableRipple","options","className","cssClass","addClass","split","enableRtl","rippleSpan","rippleEffect","isCenterRipple","duration","frameSpan","label","labelSpan","disableHtmlEncode","textContent","rippleMouseHandler","e","event_1","document","createEvent","initEvent","dispatchEvent","setHiddenInput","wrap","name","value","__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__","this","constructor","prototype","create","__decorate","decorators","target","desc","c","arguments","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","IconPosition","buttonObserver","Observer","cssClassName","RTL","BUTTON","PRIMARY","ICONBTN","Button","_super","call","render","initialize","removeRippleEffect","selector","renderComplete","replace","trim","isPrimary","isBlazor","getModuleName","content","tempContent","SanitizeHtmlHelper","sanitize","setIconCss","disabled","controlStatus","wireEvents","iconCss","span","iconPosition","toLowerCase","isToggle","EventHandler","btnClickHandler","unWireEvents","contains","concat","removeClass","querySelector","isRippleEnabled","getPersistData","addOnPersist","Inject","onPropertyChanged","newProp","oldProp","_i","_a","keys","isServerRendered","enableHtmlSanitizer","click","focusIn","focus","Property","Event","NotifyPropertyChanges","Component","FRAME","RIPPLE","containerAttr","CheckBox","_this","isFocused","isMouseClick","clickTriggered","validCheck","changeState","state","isInitialize","getWrapper","getElementsByClassName","required","closest","indeterminate","clickHandler","event","isVue","focusOutHandler","changeEventArgs","updateVueArrayModel","trigger","stopPropagation","refreshing","focusHandler","parentElement","getLabel","isNullOrUndefined","initialCheckedValue","setProperties","setDisabled","initWrapper","for","labelPosition","setText","keyUpHandler","labelMouseDownHandler","labelMouseLeaveHandler","querySelectorAll","removeChild","labelMouseUpHandler","rippleElem","labelWrap","getElementsByTagName","updateHtmlAttributeToWrapper","text","changeHandler","formResetHandler","formElem","init","push","splice","htmlAttributes","ATTRIBUTES","RadioButton","RadioButton_1","dataBind","isAngular","updateChange","instance","radioGrp","getRadioGroup","getInstance","angularValue","radioWrap","getSelectedValue","nextElementSibling","updateHtmlAttribute","formElement","formControlName","textLabel","rippleLabel","Switch","isDrag","isWireEvents","bar","handle","evt","preventDefault","initialSwitchCheckedValue","onLabel","offLabel","setLabel","switchInner","rippleHandler","currentTarget","which","mouseLeaveHandler","rippleTouchHandler","eventType","onText","offText","switchFocusHandler","switchMouseUp","aTouchY","yDiff","aTouchX","xDiff","changedTouches","clientX","clientY","bTouchX","bTouchY","Math","abs","toggle","delegateMouseUpHandler","bind","delegateKeyUpHandler","classNames","chipSet","chip","avatar","icon","delete","deleteIcon","multiSelection","singleSelection","active","chipWrapper","iconWrapper","focused","rtl","ChipList","multiSelectedChip","chipType","chips","innerText","setAttributes","createChip","setRtl","select","selectedChips","wireEvent","rippleFunction","chipCreation","enabled","tabIndex","selection","data","chipListArray","attributeArray","fieldsData","getFieldValues","attributesValue","chipArray","elementCreation","avatarIconCss","avatarText","leadingIconCss","filter","css","join","aria-label","aria-selected","enableDelete","toString","htmlAttr","j","append","chipEnabled","trailingIconCss","undefined","leadingIconUrl","trailingIconUrl","fields","chipAvatarElement","chipIconElement","style","backgroundImage","chipTextElement","chipdeleteElement","chipIconsElement","find","chipData","chipElement","HTMLElement","slice","chipModel","chipsData","fieldData","apply","selectionType","onSelect","items","k","callFromProperty","chipNodes","chipValue","chipElements","dataset","selectionHandler","chipElements_1","chipCollection_1","deleteHandler","getSelectedChips","selectedItems","texts","Indexes","elements","selectedItem","unWireEvent","keyHandler","keyCode","focusInHandler","focusedElement","del","chipDataArgs","cancel","observedArgs","clickEventHandler","chipData_1","deletedItemArgs","selected","selectedItemArgs","clickedItemArgs","activeElement","updateSelectedChips","chipListEle","chipCollIndex","chipCollValue","selectedEle","deletedChipData","removeMultipleAttributes","attr","refresh","Chip","FabPosition","Fab","initializeFab","checkTarget","setPosition","setVisibility","isFixed","targetEle","visible","position","isRight","clearPosition","refreshPosition","topPosition","bottomPosition","leftPosition","rightPosition","SDHIDDEN","FIXEDSD","HOVERSD","RADIALSD","LINEARSD","TEMPLATESD","SDPOPUP","SDUL","SDLI","SDACTIVELI","SDOVERFLOW","SDTOP","SDBOTTOM","SDRIGHT","SDLEFT","SDTOPLEFT","SDTOPRIGHT","SDHORZDIST","SpeedDialMode","LinearDirection","RadialDirection","SpeedDialAnimationEffect","SpeedDialAnimationSettings","ChildProperty","RadialSettings","SpeedDialItem","SpeedDial","isMenuOpen","isClock","isVertical","isControl","focusedIndex","keyConfigs","space","enter","end","home","moveDown","moveLeft","moveRight","moveUp","esc","validateDirection","fab","SPEEDDIAL","enablePersistence","openIconCss","appendTo","popupTemplate","createPopup","window","resizeHandler","body","bodyClickHandler","opensOnHover","wireFabHover","wireFabClick","wirePopupEvents","popupEle","keyboardModule","KeyboardEvents","keyAction","keyActionHandler","eventName","popupKeyboardModule","popupKeyActionHandler","documentKeyboardModule","popupClick","popupMouseLeaveHandle","fabClick","mouseOverHandle","mouseLeaveHandle","insertAdjacentElement","aria-expanded","aria-haspopup","aria-controls","setPopupContent","modal","createOverlay","setPositionProps","overlayEle","hidePopupEle","showPopupEle","appendTemplate","mode","createUl","createItems","renderReactTemplates","templateContainer","templateFunction","getTemplateString","isStringTemplate","template","stringContent","tempEle","outerHTML","compile","updatePopupTemplate","clearItems","firstElementChild","updatePositionProperties","popupUlEle","ul","this_1","item","parseInt","li","itemTemplate","iconSpan","SDLIICON","textSpan","triggerItemClick","title","eventArgs","args","setRTL","clearHorizontalPosition","setRadialPosition","setHorizontalPosition","setLinearHorizontalPosition","val","relatedTarget","action","focusLastElement","focusFirstElement","focusLeftRightElement","focusLinearElement","focusUpDownElement","ele","selectAll","setFocus","isLeftUp","focusPrevElement","focusNextElement","isLeft","isradialTop","isUp","isradialRight","removeFocus","preEle","setLinearPosition","setMaxSize","direction","actualLinDirection","top","offsetTop","left","offsetLeft","bottom","innerHeight","clientHeight","offsetHeight","right","innerWidth","clientWidth","offsetWidth","limit","setProperty","vertDist","isTop","elementOffSetHeight","isMiddle","documentElement","setRight","setLeft","elementOffSetWidth","isCenter","horzDist","yoffset","xoffset","setCustomRadialPosition","viewportWidth","viewportHeight","targetEleWidth","popupEleWidth","setRadialCorner","range","getActualRange","offset","formatUnit","availableAngle","endAngle","startAngle","perAngle","angle","radialSettings","start","isClockwise","checkAngleRange","switchVal","min","max","check0","checkAngle","isStart","removeProperty","clearOverflow","animation","effect","closeAnimation_1","timingFunction","eleArray_1","timeOutInterval_1","animateElement_1","curIndex","delay","begin","startHide","endHide","Animation","animate","index_1","setTimeout","toggleOverlay","animationMode","openAnimation_1","eleArray_2","timeOutInterval_2","animateElement_2","startShow","endShow","index_2","closeIconCss","removeOverlayEle","updatePopupItems","handleResize","show","hide","unwireEvents","unwireFabHover","unwireFabClick","unwirePopupEvents","fabProplist","fabModel","extend","prop","_b","_c","Complex","Collection"],"mappings":"8DAeO,SAASA,GAAkBC,EAAeC,EAAKC,EAAMC,EAASC,EAASC,GAC1E,GAAIC,GAAQH,CACZ,IAAIA,EAAQI,UAAYN,EAAK,CACzB,GAAIO,GAAaC,WAAS,gBAAiBN,EAC3CG,GAAQN,EAAc,SAAWU,OAASR,KAAQA,IAElD,KAAK,GADDS,IAAS,SAAU,WAAY,QAAS,gBAAiB,MACpDC,EAAQ,EAAGC,EAAMV,EAAQW,WAAWC,OAAQ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J,KAAK,gBACD9K,cAAYtD,KAAKvF,QAAQ0M,iBAAiB,aAAc,YACjC,aAAnBnH,KAAKuN,WACLvN,KAAKyM,qBACLzM,KAAKiM,eAAepI,EAAQoJ,eAC5BjN,KAAKoQ,SAASpQ,KAAKyM,mBAAmB,GACtCzM,KAAKsS,uBAGLtS,KAAKoQ,SAASvM,EAAQoJ,eAAe,EAEzC,MACJ,KAAK,YACDjN,KAAK+M,WAKrB3M,GACImE,gBACDiI,EAAStM,UAAW,YAAS,IAChCE,GACImE,WAAS,KACViI,EAAStM,UAAW,WAAQ,IAC/BE,GACImE,WAAS,KACViI,EAAStM,UAAW,iBAAc,IACrCE,GACImE,WAAS,KACViI,EAAStM,UAAW,oBAAiB,IACxCE,GACImE,WAAS,KACViI,EAAStM,UAAW,qBAAkB,IACzCE,GACImE,WAAS,KACViI,EAAStM,UAAW,qBAAkB,IACzCE,GACImE,WAAS,KACViI,EAAStM,UAAW,sBAAmB,IAC1CE,GACImE,WAAS,KACViI,EAAStM,UAAW,qBAAkB,IACzCE,GACImE,WAAS,KACViI,EAAStM,UAAW,sBAAmB,IAC1CE,GACImE,WAAS,KACViI,EAAStM,UAAW,eAAY,IACnCE,GACImE,YAAS,IACViI,EAAStM,UAAW,cAAW,IAClCE,GACImE,gBACDiI,EAAStM,UAAW,oBAAiB,IACxCE,GACImE,WAAS,SACViI,EAAStM,UAAW,gBAAa,IACpCE,GACImE,YAAS,IACViI,EAAStM,UAAW,mBAAgB,IACvCE,GACIoE,WACDgI,EAAStM,UAAW,cAAW,IAClCE,GACIoE,WACDgI,EAAStM,UAAW,YAAS,IAChCE,GACIoE,WACDgI,EAAStM,UAAW,kBAAe,IACtCE,GACIoE,WACDgI,EAAStM,UAAW,aAAU,IACjCE,GACIoE,WACDgI,EAAStM,UAAW,cAAW,IAClCsM,EAAWpM,GACPqE,yBACD+H,IAEL9H,aChtBEqO,EAAsB,WACtB,QAASA,MAET,MAAOA,MCNP1T,EAAwC,WACxC,GAAIC,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