UNPKG

igniteui-webcomponents-inputs

Version:

Ignite UI Web Components inputs components.

1,323 lines (1,320 loc) 49.8 kB
import { __extends, __values } from "tslib"; import { XButtonGroup } from "./XButtonGroup"; import { ensureEnum, brushToString, stringToBrush, ensureBool, initializePropertiesFromCss, NamePatcher, toSpinal, enumToString, getAllPropertyNames, fromSpinal } from "igniteui-webcomponents-core"; import { WebComponentRenderer, PortalManager } from "igniteui-webcomponents-core"; import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { TypeRegistrar } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; import { IgcXButtonComponent } from './igc-x-button-component'; import { IgcXButtonGroupButtonCollection } from './igc-x-button-group-button-collection'; import { CollectionAdapter } from "igniteui-webcomponents-core"; import { NotifyCollectionChangedAction } from "igniteui-webcomponents-core"; import { ButtonGroupOrientation_$type } from './ButtonGroupOrientation'; import { IgcButtonGroupSelectionChangedEventArgs } from './igc-button-group-selection-changed-event-args'; import { ControlDisplayDensity_$type } from "igniteui-webcomponents-core"; import { BaseControlTheme_$type } from "igniteui-webcomponents-core"; import { ButtonGroupDisplayStyle_$type } from './ButtonGroupDisplayStyle'; import { IgcHTMLElement } from "igniteui-webcomponents-core"; export var IgcXButtonGroupComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcXButtonGroupComponent, _super); function IgcXButtonGroupComponent() { var _this = _super.call(this) || this; _this.contentButtons = []; /** * The style mappings actually present in the treemap. Do not directly modify this array. * This array's contents can be modified by causing Angular to reproject the child content. * Or adding and removing style mappings from the manual style mappings collection on the buttons property. */ _this.actualButtons = []; _this._buttons = null; _this._buttonsAdapter = null; _this._disconnected = false; _this._settingAttributes = false; _this._attached = false; _this._queuedSetAttributes = []; _this._updatingFromAttribute = false; _this.__p = null; _this._hasUserValues = new Set(); _this._stylingContainer = null; _this._stylingParent = null; _this._inStyling = false; _this._selectionChanged = null; _this._selectionChanged_wrapped = null; if (_this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this)); } _this._portalManager = new PortalManager("buttonContent"); _this._renderer = new WebComponentRenderer(_this, document, true, {}, _this._portalManager); _this._container = _this._renderer.createElement("div"); _this._renderer.updateRoot(_this._container); _this._implementation = _this.createImplementation(); _this._implementation.externalObject = _this; //this._container.setStyleProperty("width", "100%"); //this._container.setStyleProperty("height", "100%"); var root; root = _this._container; if (_this._container.getNativeElement() != null) { root = _this._container.getNativeElement(); } _this._wrapper = _this._renderer; var buttonGroup = _this.i; _this._buttonGroup = buttonGroup; _this._buttonsAdapter = new CollectionAdapter(_this.contentButtons, _this.i.buttons, _this.actualButtons, function (c) { return c.i; }, function (i) { if (_this._container && _this._container.getNativeElement().parentElement) { i._styling(_this, _this, _this); } }, function (i) { }); buttonGroup.provideContainer(_this._renderer); _this._onChildrenChanged(); //Checkbox.notifySizeChanged(); var mut = new MutationObserver(function (list) { var e_1, _b; try { for (var list_1 = __values(list), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) { var mutation = list_1_1.value; if (mutation.type == 'childList') { _this._onChildrenChanged(); _this.updateButtons(); } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (list_1_1 && !list_1_1.done && (_b = list_1.return)) _b.call(list_1); } finally { if (e_1) throw e_1.error; } } }); mut.observe(_this, { childList: true }); return _this; //this._renderer.addSizeWatcher(() => { // this._checkbox.notifySizeChanged(); //}); } Object.defineProperty(IgcXButtonGroupComponent.prototype, "buttons", { /** * A collection or manually added axes for the chart. */ get: function () { var _this = this; if (this._buttons === null) { var coll = new IgcXButtonGroupButtonCollection(); var inner = coll._innerColl; inner.addListener(function (sender, e) { switch (e.action) { case NotifyCollectionChangedAction.Add: _this._buttonsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Remove: _this._buttonsAdapter.removeManualItemAt(e.oldStartingIndex); break; case NotifyCollectionChangedAction.Replace: _this._buttonsAdapter.removeManualItemAt(e.oldStartingIndex); _this._buttonsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Reset: _this._buttonsAdapter.clearManualItems(); break; } }); this._buttons = coll; } return this._buttons; }, enumerable: false, configurable: true }); IgcXButtonGroupComponent.prototype._onChildrenChanged = function () { var children = []; for (var i = 0; i < this.childNodes.length; i++) { var child = this.childNodes[i]; if (child !== this._container.getNativeElement()) { children.push(child); } } this._portalManager.onChildrenChanged(children); }; IgcXButtonGroupComponent.prototype.updateButtons = function () { this.contentButtons.length = 0; for (var i = 0; i < this.children.length; i++) { if (this.children[i] instanceof IgcXButtonComponent) { this.contentButtons.push(this.children[i]); } } var childContent = this.querySelector("igc-child-content"); if (childContent) { for (var i = 0; i < childContent.children.length; i++) { if (childContent.children[i] instanceof IgcXButtonComponent) { this.contentButtons.push(childContent.children[i]); } } } if (this._buttonsAdapter != null) { this._buttonsAdapter.notifyContentChanged(); } }; // supports angular themes or custom properties set in CSS IgcXButtonGroupComponent.prototype.updateStyle = function () { this._styling(this, this); }; IgcXButtonGroupComponent.prototype.destroy = function () { this._buttonGroup.destroy(); this._wrapper.destroy(); }; IgcXButtonGroupComponent.prototype.createImplementation = function () { return new XButtonGroup(); }; IgcXButtonGroupComponent.prototype.disconnectedCallback = function () { this._disconnected = true; if (this.i) { this.i.onDetachedFromUI(); } }; IgcXButtonGroupComponent.prototype.connectedCallback = function () { if (this._disconnected) { this._disconnected = false; if (this.i) { this.i.onAttachedToUI(); } return; } this.classList.add("ig-x-button-group"); this.classList.add("igc-x-button-group"); this.appendChild(this._container.getNativeElement()); this._attached = true; this.style.display = "inline-block"; //this.style.height = this._height; //this.style.width = this._width; this._flushQueuedAttributes(); // supports themes or custom properties set in CSS this._styling(this, this); this.afterContentInit(); }; IgcXButtonGroupComponent.prototype.afterContentInit = function () { //this.i.notifySizeChanged(); }; Object.defineProperty(IgcXButtonGroupComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; } /** * @hidden */, enumerable: false, configurable: true }); IgcXButtonGroupComponent._createFromInternal = function (internal) { if (!internal) { return null; } if (!internal.$type) { return null; } var name = internal.$type.name; var externalName = "Igc" + name + "Component"; if (!TypeRegistrar.isRegistered(externalName)) { return null; } return TypeRegistrar.create(externalName); }; IgcXButtonGroupComponent.prototype._enqueueSetAttribute = function (attrName, attrValue) { this._queuedSetAttributes.push({ attrName: attrName, attrValue: attrValue }); }; IgcXButtonGroupComponent.prototype._flushQueuedAttributes = function () { this._settingAttributes = true; for (var i = 0; i < this._queuedSetAttributes.length; i++) { this.setAttribute(this._queuedSetAttributes[i].attrName, this._queuedSetAttributes[i].attrValue); } this._settingAttributes = false; this._queuedSetAttributes.length = 0; }; IgcXButtonGroupComponent.prototype._a = function (attrName, attrValue) { if (this._updatingFromAttribute) { return; } if (attrValue) { attrValue = attrValue.toString(); } this._settingAttributes = true; attrName = toSpinal(attrName); if (this._attached) { this.setAttribute(attrName, attrValue); } else { this._enqueueSetAttribute(attrName, attrValue); } this._settingAttributes = false; }; Object.defineProperty(IgcXButtonGroupComponent, "observedAttributes", { get: function () { if (IgcXButtonGroupComponent._observedAttributesIgcXButtonGroupComponent == null) { var names = getAllPropertyNames(IgcXButtonGroupComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcXButtonGroupComponent._observedAttributesIgcXButtonGroupComponent = names; } return IgcXButtonGroupComponent._observedAttributesIgcXButtonGroupComponent; }, enumerable: false, configurable: true }); IgcXButtonGroupComponent.prototype.attributeChangedCallback = function (name, oldValue, newValue) { if (this._settingAttributes) { return; } var setName = fromSpinal(name); this._updatingFromAttribute = true; this[setName] = newValue; this._updatingFromAttribute = false; }; IgcXButtonGroupComponent.register = function () { if (!IgcXButtonGroupComponent._isElementRegistered) { IgcXButtonGroupComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcXButtonGroupComponent.htmlTagName, IgcXButtonGroupComponent); } }; Object.defineProperty(IgcXButtonGroupComponent.prototype, "displayType", { /** * Gets or sets the display style to use for the button. */ get: function () { return this.i.i; }, set: function (v) { this.i.i = ensureEnum(ButtonGroupDisplayStyle_$type, v); this._a("displayType", enumToString(ButtonGroupDisplayStyle_$type, this.i.i)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "baseTheme", { /** * Gets or sets the base built in theme to use for the button group. */ get: function () { return this.i.p; }, set: function (v) { this.i.p = ensureEnum(BaseControlTheme_$type, v); this._a("baseTheme", enumToString(BaseControlTheme_$type, this.i.p)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "density", { /** * Gets or sets the display density to use for the button group. */ get: function () { return this.i.t; }, set: function (v) { this.i.t = ensureEnum(ControlDisplayDensity_$type, v); this._a("density", enumToString(ControlDisplayDensity_$type, this.i.t)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualDensity", { /** * Gets the actual display density to use for the button group. */ get: function () { return this.i.s; }, set: function (v) { this.i.s = ensureEnum(ControlDisplayDensity_$type, v); this._a("actualDensity", enumToString(ControlDisplayDensity_$type, this.i.s)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "selectedIndices", { /** * Gets the currently selected button indices. */ get: function () { return this.i.d; }, set: function (v) { if (v && !Array.isArray(v) && typeof (v) == "string") { var re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.d = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualItemCornerRadius", { /** * Gets the actual item corner radius for the appropriate corners. */ get: function () { return this.i.al; }, set: function (v) { this.i.al = +v; this._a("actualItemCornerRadius", this.i.al); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualItemBackgroundColor", { /** * Gets the actual item background color. */ get: function () { return brushToString(this.i.ez); }, set: function (v) { this.i.ez = stringToBrush(v); this._a("actualItemBackgroundColor", brushToString(this.i.ez)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualItemDisabledBackgroundColor", { /** * Gets the actual item background color. */ get: function () { return brushToString(this.i.e1); }, set: function (v) { this.i.e1 = stringToBrush(v); this._a("actualItemDisabledBackgroundColor", brushToString(this.i.e1)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualItemTextColor", { /** * Gets the actual item text color. */ get: function () { return brushToString(this.i.e6); }, set: function (v) { this.i.e6 = stringToBrush(v); this._a("actualItemTextColor", brushToString(this.i.e6)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualItemDisabledTextColor", { /** * Gets the actual item text color. */ get: function () { return brushToString(this.i.e3); }, set: function (v) { this.i.e3 = stringToBrush(v); this._a("actualItemDisabledTextColor", brushToString(this.i.e3)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualItemBorderColor", { /** * Gets the actual item border color. */ get: function () { return brushToString(this.i.e0); }, set: function (v) { this.i.e0 = stringToBrush(v); this._a("actualItemBorderColor", brushToString(this.i.e0)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualItemDisabledBorderColor", { /** * Gets the actual item border color. */ get: function () { return brushToString(this.i.e2); }, set: function (v) { this.i.e2 = stringToBrush(v); this._a("actualItemDisabledBorderColor", brushToString(this.i.e2)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualItemBorderWidth", { /** * Gets the actual item border width. */ get: function () { return this.i.ak; }, set: function (v) { this.i.ak = +v; this._a("actualItemBorderWidth", this.i.ak); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualSelectedItemBackgroundColor", { /** * Gets the actual selected item background color. */ get: function () { return brushToString(this.i.e7); }, set: function (v) { this.i.e7 = stringToBrush(v); this._a("actualSelectedItemBackgroundColor", brushToString(this.i.e7)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualSelectedItemTextColor", { /** * Gets the stroke actual selected item text color. */ get: function () { return brushToString(this.i.fa); }, set: function (v) { this.i.fa = stringToBrush(v); this._a("actualSelectedItemTextColor", brushToString(this.i.fa)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualItemHoverBackgroundColor", { /** * Gets the actual item hovered background color. */ get: function () { return brushToString(this.i.e4); }, set: function (v) { this.i.e4 = stringToBrush(v); this._a("actualItemHoverBackgroundColor", brushToString(this.i.e4)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualItemHoverTextColor", { /** * Gets the actual item text color. */ get: function () { return brushToString(this.i.e5); }, set: function (v) { this.i.e5 = stringToBrush(v); this._a("actualItemHoverTextColor", brushToString(this.i.e5)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualSelectedItemHoverBackgroundColor", { /** * Gets the actual selected item hovered background color. */ get: function () { return brushToString(this.i.e8); }, set: function (v) { this.i.e8 = stringToBrush(v); this._a("actualSelectedItemHoverBackgroundColor", brushToString(this.i.e8)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "actualSelectedItemHoverTextColor", { /** * Gets the actual selected item hovered text color. */ get: function () { return brushToString(this.i.e9); }, set: function (v) { this.i.e9 = stringToBrush(v); this._a("actualSelectedItemHoverTextColor", brushToString(this.i.e9)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "itemCornerRadius", { /** * Gets or sets the corner radius to use for the appropriate corners for the item buttons. */ get: function () { return this.i.a1; }, set: function (v) { this.i.a1 = +v; this._a("itemCornerRadius", this.i.a1); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "itemBackgroundColor", { /** * Gets or sets the color to use the background of the buttons in the group. */ get: function () { return brushToString(this.i.hn); }, set: function (v) { this.i.hn = stringToBrush(v); this._a("itemBackgroundColor", brushToString(this.i.hn)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "itemDisabledBackgroundColor", { /** * Gets or sets the disabled color to use the background of the buttons in the group. */ get: function () { return brushToString(this.i.hp); }, set: function (v) { this.i.hp = stringToBrush(v); this._a("itemDisabledBackgroundColor", brushToString(this.i.hp)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "itemTextColor", { /** * Gets or sets the color to use the text of the buttons in the group. */ get: function () { return brushToString(this.i.hu); }, set: function (v) { this.i.hu = stringToBrush(v); this._a("itemTextColor", brushToString(this.i.hu)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "itemDisabledTextColor", { /** * Gets or sets the disabled color to use the text of the buttons in the group. */ get: function () { return brushToString(this.i.hr); }, set: function (v) { this.i.hr = stringToBrush(v); this._a("itemDisabledTextColor", brushToString(this.i.hr)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "itemHoverBackgroundColor", { /** * Gets or sets the color to use the hovered background of the buttons in the group. */ get: function () { return brushToString(this.i.hs); }, set: function (v) { this.i.hs = stringToBrush(v); this._a("itemHoverBackgroundColor", brushToString(this.i.hs)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "itemBorderColor", { /** * Gets or sets the color to use the border of the buttons in the group. */ get: function () { return brushToString(this.i.ho); }, set: function (v) { this.i.ho = stringToBrush(v); this._a("itemBorderColor", brushToString(this.i.ho)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "itemDisabledBorderColor", { /** * Gets or sets the disabled color to use the border of the buttons in the group. */ get: function () { return brushToString(this.i.hq); }, set: function (v) { this.i.hq = stringToBrush(v); this._a("itemDisabledBorderColor", brushToString(this.i.hq)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "itemBorderWidth", { /** * Gets or sets the border width to use for the buttons in the group. */ get: function () { return this.i.a0; }, set: function (v) { this.i.a0 = +v; this._a("itemBorderWidth", this.i.a0); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "itemHoverTextColor", { /** * Gets or sets the color to use the hovered text of the buttons in the group. */ get: function () { return brushToString(this.i.ht); }, set: function (v) { this.i.ht = stringToBrush(v); this._a("itemHoverTextColor", brushToString(this.i.ht)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "selectedItemBackgroundColor", { /** * Gets or sets the color to use the background of the buttons in the group that are selected. */ get: function () { return brushToString(this.i.h7); }, set: function (v) { this.i.h7 = stringToBrush(v); this._a("selectedItemBackgroundColor", brushToString(this.i.h7)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "selectedItemTextColor", { /** * Gets or sets the color to use the text of the buttons in the group that are selected. */ get: function () { return brushToString(this.i.ia); }, set: function (v) { this.i.ia = stringToBrush(v); this._a("selectedItemTextColor", brushToString(this.i.ia)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "selectedItemHoverBackgroundColor", { /** * Gets or sets the color to use the hovered background of the buttons in the group that are selected. */ get: function () { return brushToString(this.i.h8); }, set: function (v) { this.i.h8 = stringToBrush(v); this._a("selectedItemHoverBackgroundColor", brushToString(this.i.h8)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "selectedItemHoverTextColor", { /** * Gets or sets the color to use the hovered text of the buttons in the group that are selected. */ get: function () { return brushToString(this.i.h9); }, set: function (v) { this.i.h9 = stringToBrush(v); this._a("selectedItemHoverTextColor", brushToString(this.i.h9)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedItemCornerRadius", { /** * Gets or sets the corner radius to use for the appropriate corners for the outlined type item buttons. */ get: function () { return this.i.a3; }, set: function (v) { this.i.a3 = +v; this._a("outlinedItemCornerRadius", this.i.a3); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedItemBackgroundColor", { /** * Gets or sets the color to use the background of the buttons in the group when type is outlined. */ get: function () { return brushToString(this.i.hv); }, set: function (v) { this.i.hv = stringToBrush(v); this._a("outlinedItemBackgroundColor", brushToString(this.i.hv)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedItemDisabledBackgroundColor", { /** * Gets or sets the disabled color to use the background of the buttons in the group when type is outlined. */ get: function () { return brushToString(this.i.hx); }, set: function (v) { this.i.hx = stringToBrush(v); this._a("outlinedItemDisabledBackgroundColor", brushToString(this.i.hx)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedItemTextColor", { /** * Gets or sets the color to use the text of the buttons in the group when type is outlined. */ get: function () { return brushToString(this.i.h2); }, set: function (v) { this.i.h2 = stringToBrush(v); this._a("outlinedItemTextColor", brushToString(this.i.h2)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedItemDisabledTextColor", { /** * Gets or sets the disabled color to use the text of the buttons in the group when type is outlined. */ get: function () { return brushToString(this.i.hz); }, set: function (v) { this.i.hz = stringToBrush(v); this._a("outlinedItemDisabledTextColor", brushToString(this.i.hz)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedItemHoverBackgroundColor", { /** * Gets or sets the color to use the hovered background of the buttons in the group when type is outlined. */ get: function () { return brushToString(this.i.h0); }, set: function (v) { this.i.h0 = stringToBrush(v); this._a("outlinedItemHoverBackgroundColor", brushToString(this.i.h0)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedItemBorderColor", { /** * Gets or sets the color to use the border of the buttons in the group when type is outlined. */ get: function () { return brushToString(this.i.hw); }, set: function (v) { this.i.hw = stringToBrush(v); this._a("outlinedItemBorderColor", brushToString(this.i.hw)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedItemDisabledBorderColor", { /** * Gets or sets the disabled color to use the border of the buttons in the group when type is outlined. */ get: function () { return brushToString(this.i.hy); }, set: function (v) { this.i.hy = stringToBrush(v); this._a("outlinedItemDisabledBorderColor", brushToString(this.i.hy)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedItemBorderWidth", { /** * Gets or sets the border width to use for the buttons in the group when type is outlined. */ get: function () { return this.i.a2; }, set: function (v) { this.i.a2 = +v; this._a("outlinedItemBorderWidth", this.i.a2); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedItemHoverTextColor", { /** * Gets or sets the color to use the hovered text of the buttons in the group when type is outlined. */ get: function () { return brushToString(this.i.h1); }, set: function (v) { this.i.h1 = stringToBrush(v); this._a("outlinedItemHoverTextColor", brushToString(this.i.h1)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedSelectedItemBackgroundColor", { /** * Gets or sets the color to use the background of the buttons in the group that are selected when type is outlined. */ get: function () { return brushToString(this.i.h3); }, set: function (v) { this.i.h3 = stringToBrush(v); this._a("outlinedSelectedItemBackgroundColor", brushToString(this.i.h3)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedSelectedItemTextColor", { /** * Gets or sets the color to use the text of the buttons in the group that are selected when type is outlined. */ get: function () { return brushToString(this.i.h6); }, set: function (v) { this.i.h6 = stringToBrush(v); this._a("outlinedSelectedItemTextColor", brushToString(this.i.h6)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedSelectedItemHoverBackgroundColor", { /** * Gets or sets the color to use the hovered background of the buttons in the group that are selected when type is outlined. */ get: function () { return brushToString(this.i.h4); }, set: function (v) { this.i.h4 = stringToBrush(v); this._a("outlinedSelectedItemHoverBackgroundColor", brushToString(this.i.h4)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "outlinedSelectedItemHoverTextColor", { /** * Gets or sets the color to use the hovered text of the buttons in the group that are selected when type is outlined. */ get: function () { return brushToString(this.i.h5); }, set: function (v) { this.i.h5 = stringToBrush(v); this._a("outlinedSelectedItemHoverTextColor", brushToString(this.i.h5)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatItemCornerRadius", { /** * Gets or sets the corner radius to use for the appropriate corners for the flat type item buttons. */ get: function () { return this.i.az; }, set: function (v) { this.i.az = +v; this._a("flatItemCornerRadius", this.i.az); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatItemBackgroundColor", { /** * Gets or sets the color to use the background of the buttons in the group when type is flat. */ get: function () { return brushToString(this.i.hb); }, set: function (v) { this.i.hb = stringToBrush(v); this._a("flatItemBackgroundColor", brushToString(this.i.hb)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatItemDisabledBackgroundColor", { /** * Gets or sets the disabled color to use the background of the buttons in the group when type is flat. */ get: function () { return brushToString(this.i.hd); }, set: function (v) { this.i.hd = stringToBrush(v); this._a("flatItemDisabledBackgroundColor", brushToString(this.i.hd)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatItemTextColor", { /** * Gets or sets the color to use the text of the buttons in the group when type is flat. */ get: function () { return brushToString(this.i.hi); }, set: function (v) { this.i.hi = stringToBrush(v); this._a("flatItemTextColor", brushToString(this.i.hi)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatItemDisabledTextColor", { /** * Gets or sets the disabled color to use the text of the buttons in the group when type is flat. */ get: function () { return brushToString(this.i.hf); }, set: function (v) { this.i.hf = stringToBrush(v); this._a("flatItemDisabledTextColor", brushToString(this.i.hf)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatItemHoverBackgroundColor", { /** * Gets or sets the color to use the hovered background of the buttons in the group when type is flat. */ get: function () { return brushToString(this.i.hg); }, set: function (v) { this.i.hg = stringToBrush(v); this._a("flatItemHoverBackgroundColor", brushToString(this.i.hg)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatItemBorderColor", { /** * Gets or sets the color to use the border of the buttons in the group when type is flat. */ get: function () { return brushToString(this.i.hc); }, set: function (v) { this.i.hc = stringToBrush(v); this._a("flatItemBorderColor", brushToString(this.i.hc)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatItemDisabledBorderColor", { /** * Gets or sets the disabled color to use the border of the buttons in the group when type is flat. */ get: function () { return brushToString(this.i.he); }, set: function (v) { this.i.he = stringToBrush(v); this._a("flatItemDisabledBorderColor", brushToString(this.i.he)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatItemBorderWidth", { /** * Gets or sets the border width to use for the buttons in the group when type is flat. */ get: function () { return this.i.ay; }, set: function (v) { this.i.ay = +v; this._a("flatItemBorderWidth", this.i.ay); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatItemHoverTextColor", { /** * Gets or sets the color to use the hovered text of the buttons in the group when type is flat. */ get: function () { return brushToString(this.i.hh); }, set: function (v) { this.i.hh = stringToBrush(v); this._a("flatItemHoverTextColor", brushToString(this.i.hh)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatSelectedItemBackgroundColor", { /** * Gets or sets the color to use the background of the buttons in the group that are selected when type is flat. */ get: function () { return brushToString(this.i.hj); }, set: function (v) { this.i.hj = stringToBrush(v); this._a("flatSelectedItemBackgroundColor", brushToString(this.i.hj)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatSelectedItemTextColor", { /** * Gets or sets the color to use the text of the buttons in the group that are selected when type is flat. */ get: function () { return brushToString(this.i.hm); }, set: function (v) { this.i.hm = stringToBrush(v); this._a("flatSelectedItemTextColor", brushToString(this.i.hm)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatSelectedItemHoverBackgroundColor", { /** * Gets or sets the color to use the hovered background of the buttons in the group that are selected when type is flat. */ get: function () { return brushToString(this.i.hk); }, set: function (v) { this.i.hk = stringToBrush(v); this._a("flatSelectedItemHoverBackgroundColor", brushToString(this.i.hk)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "flatSelectedItemHoverTextColor", { /** * Gets or sets the color to use the hovered text of the buttons in the group that are selected when type is flat. */ get: function () { return brushToString(this.i.hl); }, set: function (v) { this.i.hl = stringToBrush(v); this._a("flatSelectedItemHoverTextColor", brushToString(this.i.hl)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "orientation", { /** * Gets or sets the oreientation to use the button group when type is outlined. */ get: function () { return this.i.k; }, set: function (v) { this.i.k = ensureEnum(ButtonGroupOrientation_$type, v); this._a("orientation", enumToString(ButtonGroupOrientation_$type, this.i.k)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "id", { /** * Gets or sets the id to use for the button group. */ get: function () { return this.i.b5; }, set: function (v) { this.i.b5 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "disabled", { /** * Gets or sets whether the checkbox is disabled. */ get: function () { return this.i.disabled; }, set: function (v) { this.i.disabled = ensureBool(v); this._a("disabled", this.i.disabled); }, enumerable: false, configurable: true }); Object.defineProperty(IgcXButtonGroupComponent.prototype, "isMultiSelect", { /** * Gets or sets whether the group supports multi-select. */ get: function () { return this.i.z; }, set: function (v) { this.i.z = ensureBool(v); this._a("isMultiSelect", this.i.z); }, enumerable: false, configurable: true }); IgcXButtonGroupComponent.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.buttons != null && this.buttons.findByName && this.buttons.findByName(name)) { return this.buttons.findByName(name); } return null; }; Object.defineProperty(IgcXButtonGroupComponent.prototype, "hasUserValues", { get: function () { return this._hasUserValues; }, enumerable: false, configurable: true }); IgcXButtonGroupComponent.prototype.__m = function (propertyName) { if (!this._inStyling) { this._hasUserValues.add(propertyName); } }; IgcXButtonGroupComponent.prototype._styling = function (container, component, parent) { if (this._inStyling) { return; } this._inStyling = true; this._stylingContainer = container; this._stylingParent = component; var genericPrefix = ""; var typeName = this.i.$type.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } genericPrefix = toSpinal("XButtonGroupComponent"); var additionalPrefixes = []; var prefix = toSpinal(typeName); additionalPrefixes.push(prefix + "-"); var b = this.i.$type.baseType; while (b && b.name != "Object" && b.name != "Base" && b.name != "Control" && b.Name != "DependencyObject" && b.Name != "FrameworkElement") { typeName = b.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } var basePrefix = toSpinal(typeName); additionalPrefixes.push(basePrefix + "-"); b = b.baseType; } if (parent) { var parentTypeName = parent.i.$type.name; if (parentTypeName.indexOf("Xam") === 0) { parentTypeName = parentTypeName.substring(3); } var parentPrefix = toSpinal(parentTypeName); additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-"); additionalPrefixes.push(parentPrefix + "-" + prefix + "-"); } initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes); if (this._otherStyling) { this._otherStyling(container, component, parent); } this._inStyling = false; }; IgcXButtonGroupComponent.prototype.onDetachedFromUI = function () { this.i.onDetachedFromUI(); }; IgcXButtonGroupComponent.prototype.onAttachedToUI = function () { this.i.onAttachedToUI(); }; /** * Exports visual information about the current state of the grid. */ IgcXButtonGroupComponent.prototype.exportVisualModel = function () { var iv = this.i.a5(); return (iv); }; /** * Returns a serialized copy of the exported visual model */ IgcXButtonGroupComponent.prototype.exportSerializedVisualModel = function () { var iv = this.i.bq(); return (iv); }; Object.defineProperty(IgcXButtonGroupComponent.prototype, "selectionChanged", { get: function () { return this._selectionChanged; }, set: function (ev) { var _this = this; if (this._selectionChanged_wrapped !== null) { this.i.selectionChanged = delegateRemove(this.i.selectionChanged, this._selectionChanged_wrapped); this._selectionChanged_wrapped = null; this._selectionChanged = null; } this._selectionChanged = ev; this._selectionChanged_wrapped = function (o, e) { var outerArgs = new IgcButtonGroupSelectionChangedEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeSelectionChanged) { _this.beforeSelectionChanged(_this, outerArgs); } if (_this._selectionChanged) { _this._selectionChanged(_this, outerArgs); } }; this.i.selectionChanged = delegateCombine(this.i.selectionChanged, this._selectionChanged_wrapped); ; }, enumerable: false, configurable: true }); IgcXButtonGroupComponent._observedAttributesIgcXButtonGroupComponent = null; IgcXButtonGroupComponent.htmlTagName = "igc-x-button-group"; IgcXButtonGroupComponent._isElementRegistered = false; return IgcXButtonGroupComponent; }(IgcHTMLElement));