igniteui-webcomponents-inputs
Version:
Ignite UI Web Components inputs components.
1,420 lines (1,419 loc) • 101 kB
JavaScript
import { __extends, __values } from "tslib";
import { XButton } from "./XButton";
import { ensureEnum, brushToString, stringToBrush, ensureBool, initializePropertiesFromCss, NamePatcher, toSpinal, enumToString, getAllPropertyNames, fromSpinal } from "igniteui-webcomponents-core";
import { FontInfo } 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 { CornerRadius } from "igniteui-webcomponents-core";
import { ButtonDisplayStyle_$type } from './ButtonDisplayStyle';
import { IgcButtonClickEventArgs } from './igc-button-click-event-args';
import { ControlDisplayDensity_$type } from "igniteui-webcomponents-core";
import { BaseControlTheme_$type } from "igniteui-webcomponents-core";
import { ElevationMode_$type } from "igniteui-webcomponents-core";
import { IgcHTMLElement } from "igniteui-webcomponents-core";
import { HorizontalAlignment_$type } from "igniteui-webcomponents-core";
import { VerticalAlignment_$type } from "igniteui-webcomponents-core";
import { IgcFocusEventArgs } from "igniteui-webcomponents-core";
var IgcXButtonComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcXButtonComponent, _super);
function IgcXButtonComponent() {
var _this = _super.call(this) || this;
_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._clicked = null;
_this._clicked_wrapped = null;
_this._gotFocus = null;
_this._gotFocus_wrapped = null;
_this._lostFocus = null;
_this._lostFocus_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 button = _this.i;
_this._button = button;
button.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();
}
}
}
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();
//});
}
IgcXButtonComponent.prototype._onDisplayChanged = function () {
this.style.display = this.display;
};
IgcXButtonComponent.prototype._onFlexDirectionChanged = function () {
this.style.flexDirection = this.flexDirection;
};
IgcXButtonComponent.prototype._onFlexGrowChanged = function () {
this.style.flexGrow = this.flexGrow;
};
IgcXButtonComponent.prototype._onAlignItemsChanged = function () {
this.style.alignItems = this.alignItems;
};
IgcXButtonComponent.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);
};
// supports angular themes or custom properties set in CSS
IgcXButtonComponent.prototype.updateStyle = function () {
this._styling(this, this);
};
IgcXButtonComponent.prototype.destroy = function () {
this._button.destroy();
this._wrapper.destroy();
};
IgcXButtonComponent.prototype.createImplementation = function () {
return new XButton();
};
IgcXButtonComponent.prototype.disconnectedCallback = function () {
this._disconnected = true;
if (this.i) {
this.i.onDetachedFromUI();
}
};
IgcXButtonComponent.prototype.connectedCallback = function () {
if (this._disconnected) {
this._disconnected = false;
if (this.i) {
this.i.onAttachedToUI();
}
return;
}
this.classList.add("ig-x-button");
this.classList.add("igc-x-button");
this.appendChild(this._container.getNativeElement());
this._attached = true;
this.style.display = this.display;
//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();
};
IgcXButtonComponent.prototype.afterContentInit = function () {
//this.i.notifySizeChanged();
};
Object.defineProperty(IgcXButtonComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
} /**
* @hidden
*/,
enumerable: false,
configurable: true
});
IgcXButtonComponent._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);
};
IgcXButtonComponent.prototype._enqueueSetAttribute = function (attrName, attrValue) {
this._queuedSetAttributes.push({ attrName: attrName, attrValue: attrValue });
};
IgcXButtonComponent.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;
};
IgcXButtonComponent.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(IgcXButtonComponent, "observedAttributes", {
get: function () {
if (IgcXButtonComponent._observedAttributesIgcXButtonComponent == null) {
var names = getAllPropertyNames(IgcXButtonComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcXButtonComponent._observedAttributesIgcXButtonComponent = names;
}
return IgcXButtonComponent._observedAttributesIgcXButtonComponent;
},
enumerable: false,
configurable: true
});
IgcXButtonComponent.prototype.attributeChangedCallback = function (name, oldValue, newValue) {
if (this._settingAttributes) {
return;
}
var setName = fromSpinal(name);
this._updatingFromAttribute = true;
this[setName] = newValue;
this._updatingFromAttribute = false;
};
IgcXButtonComponent.register = function () {
if (!IgcXButtonComponent._isElementRegistered) {
IgcXButtonComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcXButtonComponent.htmlTagName, IgcXButtonComponent);
}
};
Object.defineProperty(IgcXButtonComponent.prototype, "minWidth", {
/**
* Gets or sets the min width to use for the button.
*/
get: function () {
return this.i.by;
},
set: function (v) {
this.i.by = +v;
this._a("minWidth", this.i.by);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "minHeight", {
/**
* Gets or sets the min height to use for the button.
*/
get: function () {
return this.i.bx;
},
set: function (v) {
this.i.bx = +v;
this._a("minHeight", this.i.bx);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "displayType", {
/**
* Gets or sets the display style to use for the button.
*/
get: function () {
return this.i.e;
},
set: function (v) {
this.i.e = ensureEnum(ButtonDisplayStyle_$type, v);
this._a("displayType", enumToString(ButtonDisplayStyle_$type, this.i.e));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "density", {
/**
* Gets or sets the display density to use for the button.
*/
get: function () {
return this.i.r;
},
set: function (v) {
this.i.r = ensureEnum(ControlDisplayDensity_$type, v);
this._a("density", enumToString(ControlDisplayDensity_$type, this.i.r));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "baseTheme", {
/**
* Gets or sets the base built in theme to use for the button.
*/
get: function () {
return this.i.n;
},
set: function (v) {
this.i.n = ensureEnum(BaseControlTheme_$type, v);
this._a("baseTheme", enumToString(BaseControlTheme_$type, this.i.n));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualDensity", {
/**
* Gets the actual display density to use for the label.
*/
get: function () {
return this.i.q;
},
set: function (v) {
this.i.q = ensureEnum(ControlDisplayDensity_$type, v);
this._a("actualDensity", enumToString(ControlDisplayDensity_$type, this.i.q));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualBorderColor", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return brushToString(this.i.np);
},
set: function (v) {
this.i.np = stringToBrush(v);
this._a("actualBorderColor", brushToString(this.i.np));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualUmbraShadowColor", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return brushToString(this.i.n0);
},
set: function (v) {
this.i.n0 = stringToBrush(v);
this._a("actualUmbraShadowColor", brushToString(this.i.n0));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualPenumbraShadowColor", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return brushToString(this.i.nx);
},
set: function (v) {
this.i.nx = stringToBrush(v);
this._a("actualPenumbraShadowColor", brushToString(this.i.nx));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualAmbientShadowColor", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return brushToString(this.i.nn);
},
set: function (v) {
this.i.nn = stringToBrush(v);
this._a("actualAmbientShadowColor", brushToString(this.i.nn));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualRestingElevation", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return this.i.cx;
},
set: function (v) {
this.i.cx = +v;
this._a("actualRestingElevation", this.i.cx);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualFocusElevation", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return this.i.cv;
},
set: function (v) {
this.i.cv = +v;
this._a("actualFocusElevation", this.i.cv);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualHoverElevation", {
/**
* Gets or sets the color to use for the check mark when the checkbox is checked.
*/
get: function () {
return this.i.cw;
},
set: function (v) {
this.i.cw = +v;
this._a("actualHoverElevation", this.i.cw);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualRippleColor", {
/**
* Gets or sets the color to use for the ripple when the button is pressed.
*/
get: function () {
return brushToString(this.i.ny);
},
set: function (v) {
this.i.ny = stringToBrush(v);
this._a("actualRippleColor", brushToString(this.i.ny));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualCornerRadiusBottomRight", {
get: function () {
return this.i.kz ? this.i.kz.c : NaN;
},
set: function (v) {
this.ensureActualCornerRadius();
this.i.kz.c = +v;
this._a("actualCornerRadiusBottomRight", this.i.kz.c);
this.i.kz = this.i.kz;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualCornerRadiusBottomLeft", {
get: function () {
return this.i.kz ? this.i.kz.b : NaN;
},
set: function (v) {
this.ensureActualCornerRadius();
this.i.kz.b = +v;
this._a("actualCornerRadiusBottomLeft", this.i.kz.b);
this.i.kz = this.i.kz;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualCornerRadiusTopLeft", {
get: function () {
return this.i.kz ? this.i.kz.d : NaN;
},
set: function (v) {
this.ensureActualCornerRadius();
this.i.kz.d = +v;
this._a("actualCornerRadiusTopLeft", this.i.kz.d);
this.i.kz = this.i.kz;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualCornerRadiusTopRight", {
get: function () {
return this.i.kz ? this.i.kz.e : NaN;
},
set: function (v) {
this.ensureActualCornerRadius();
this.i.kz.e = +v;
this._a("actualCornerRadiusTopRight", this.i.kz.e);
this.i.kz = this.i.kz;
},
enumerable: false,
configurable: true
});
IgcXButtonComponent.prototype.ensureActualCornerRadius = function () {
if (this.i.kz) {
return;
}
this.i.kz = new CornerRadius(2);
};
Object.defineProperty(IgcXButtonComponent.prototype, "actualBackgroundColor", {
/**
* Gets the color to use for the actual background.
*/
get: function () {
return brushToString(this.i.no);
},
set: function (v) {
this.i.no = stringToBrush(v);
this._a("actualBackgroundColor", brushToString(this.i.no));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualDisabledBackgroundColor", {
/**
* Gets the actual color to use for the disabled background of the button.
*/
get: function () {
return brushToString(this.i.nq);
},
set: function (v) {
this.i.nq = stringToBrush(v);
this._a("actualDisabledBackgroundColor", brushToString(this.i.nq));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualDisabledBorderColor", {
/**
* Gets the actual color to use for the disabled border of the button.
*/
get: function () {
return brushToString(this.i.nr);
},
set: function (v) {
this.i.nr = stringToBrush(v);
this._a("actualDisabledBorderColor", brushToString(this.i.nr));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualDisabledTextColor", {
/**
* Gets the actual color to use for the disabled text of the button.
*/
get: function () {
return brushToString(this.i.ns);
},
set: function (v) {
this.i.ns = stringToBrush(v);
this._a("actualDisabledTextColor", brushToString(this.i.ns));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualDisabledElevation", {
/**
* Gets the actual disabled elevation to use for the button.
*/
get: function () {
return this.i.cu;
},
set: function (v) {
this.i.cu = +v;
this._a("actualDisabledElevation", this.i.cu);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualElevationMode", {
/**
* Gets the actual disabled elevation to use for the button.
*/
get: function () {
return this.i.u;
},
set: function (v) {
this.i.u = ensureEnum(ElevationMode_$type, v);
this._a("actualElevationMode", enumToString(ElevationMode_$type, this.i.u));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualTextColor", {
/**
* Gets the color to use for the actual background.
*/
get: function () {
return brushToString(this.i.nz);
},
set: function (v) {
this.i.nz = stringToBrush(v);
this._a("actualTextColor", brushToString(this.i.nz));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualHoverTextColor", {
/**
* Gets the color to use for the actual background.
*/
get: function () {
return brushToString(this.i.nw);
},
set: function (v) {
this.i.nw = stringToBrush(v);
this._a("actualHoverTextColor", brushToString(this.i.nw));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualFocusBackgroundColor", {
/**
* Gets the color to use for the actual background.
*/
get: function () {
return brushToString(this.i.nt);
},
set: function (v) {
this.i.nt = stringToBrush(v);
this._a("actualFocusBackgroundColor", brushToString(this.i.nt));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualFocusTextColor", {
/**
* Gets the actual color to use for the focused text.
*/
get: function () {
return brushToString(this.i.nu);
},
set: function (v) {
this.i.nu = stringToBrush(v);
this._a("actualFocusTextColor", brushToString(this.i.nu));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualHoverBackgroundColor", {
/**
* Gets the hover color to use for the actual background.
*/
get: function () {
return brushToString(this.i.nv);
},
set: function (v) {
this.i.nv = stringToBrush(v);
this._a("actualHoverBackgroundColor", brushToString(this.i.nv));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "actualBorderWidth", {
/**
* Gets or sets the Width to use for the check mark when the checkbox is checked.
*/
get: function () {
return this.i.bj;
},
set: function (v) {
this.i.bj = +v;
this._a("actualBorderWidth", this.i.bj);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedBackgroundColor", {
/**
* Gets or sets the color to use for the background of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.q4);
},
set: function (v) {
this.i.q4 = stringToBrush(v);
this._a("raisedBackgroundColor", brushToString(this.i.q4));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedDisabledBackgroundColor", {
/**
* Gets or sets the color to use for the disabled background of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.q6);
},
set: function (v) {
this.i.q6 = stringToBrush(v);
this._a("raisedDisabledBackgroundColor", brushToString(this.i.q6));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedDisabledBorderColor", {
/**
* Gets or sets the color to use for the disabled border of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.q7);
},
set: function (v) {
this.i.q7 = stringToBrush(v);
this._a("raisedDisabledBorderColor", brushToString(this.i.q7));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedDisabledTextColor", {
/**
* Gets or sets the color to use for the disabled text of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.q8);
},
set: function (v) {
this.i.q8 = stringToBrush(v);
this._a("raisedDisabledTextColor", brushToString(this.i.q8));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedDisabledElevation", {
/**
* Gets or sets the disabled elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.d2;
},
set: function (v) {
this.i.d2 = +v;
this._a("raisedDisabledElevation", this.i.d2);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedHoverBackgroundColor", {
/**
* Gets or sets the hover color to use for the background of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.rb);
},
set: function (v) {
this.i.rb = stringToBrush(v);
this._a("raisedHoverBackgroundColor", brushToString(this.i.rb));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedBorderColor", {
/**
* Gets or sets the border color to use for the button when the type is raised.
*/
get: function () {
return brushToString(this.i.q5);
},
set: function (v) {
this.i.q5 = stringToBrush(v);
this._a("raisedBorderColor", brushToString(this.i.q5));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedRestingElevation", {
/**
* Gets or sets the elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.d5;
},
set: function (v) {
this.i.d5 = +v;
this._a("raisedRestingElevation", this.i.d5);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedHoverElevation", {
/**
* Gets or sets the hover elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.d4;
},
set: function (v) {
this.i.d4 = +v;
this._a("raisedHoverElevation", this.i.d4);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedFocusElevation", {
/**
* Gets or sets the focus elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.d3;
},
set: function (v) {
this.i.d3 = +v;
this._a("raisedFocusElevation", this.i.d3);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedBorderWidth", {
/**
* Gets or sets the width to use for the button border when the type is raised.
*/
get: function () {
return this.i.b0;
},
set: function (v) {
this.i.b0 = +v;
this._a("raisedBorderWidth", this.i.b0);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedCornerRadiusBottomRight", {
get: function () {
return this.i.lc ? this.i.lc.c : NaN;
},
set: function (v) {
this.ensureRaisedCornerRadius();
this.i.lc.c = +v;
this._a("raisedCornerRadiusBottomRight", this.i.lc.c);
this.i.lc = this.i.lc;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedCornerRadiusBottomLeft", {
get: function () {
return this.i.lc ? this.i.lc.b : NaN;
},
set: function (v) {
this.ensureRaisedCornerRadius();
this.i.lc.b = +v;
this._a("raisedCornerRadiusBottomLeft", this.i.lc.b);
this.i.lc = this.i.lc;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedCornerRadiusTopLeft", {
get: function () {
return this.i.lc ? this.i.lc.d : NaN;
},
set: function (v) {
this.ensureRaisedCornerRadius();
this.i.lc.d = +v;
this._a("raisedCornerRadiusTopLeft", this.i.lc.d);
this.i.lc = this.i.lc;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedCornerRadiusTopRight", {
get: function () {
return this.i.lc ? this.i.lc.e : NaN;
},
set: function (v) {
this.ensureRaisedCornerRadius();
this.i.lc.e = +v;
this._a("raisedCornerRadiusTopRight", this.i.lc.e);
this.i.lc = this.i.lc;
},
enumerable: false,
configurable: true
});
IgcXButtonComponent.prototype.ensureRaisedCornerRadius = function () {
if (this.i.lc) {
return;
}
this.i.lc = new CornerRadius(2);
};
Object.defineProperty(IgcXButtonComponent.prototype, "raisedRippleColor", {
/**
* Gets or sets the color to use for the background when the button is pressed and the type is floating action button.
*/
get: function () {
return brushToString(this.i.rd);
},
set: function (v) {
this.i.rd = stringToBrush(v);
this._a("raisedRippleColor", brushToString(this.i.rd));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatBackgroundColor", {
/**
* Gets or sets the color to use for the background of the button when the type is flat.
*/
get: function () {
return brushToString(this.i.p3);
},
set: function (v) {
this.i.p3 = stringToBrush(v);
this._a("flatBackgroundColor", brushToString(this.i.p3));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatDisabledBackgroundColor", {
/**
* Gets or sets the color to use for the disabled background of the button when the type is flat.
*/
get: function () {
return brushToString(this.i.p5);
},
set: function (v) {
this.i.p5 = stringToBrush(v);
this._a("flatDisabledBackgroundColor", brushToString(this.i.p5));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatDisabledBorderColor", {
/**
* Gets or sets the color to use for the disabled border of the button when the type is flat.
*/
get: function () {
return brushToString(this.i.p6);
},
set: function (v) {
this.i.p6 = stringToBrush(v);
this._a("flatDisabledBorderColor", brushToString(this.i.p6));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatDisabledTextColor", {
/**
* Gets or sets the color to use for the disabled text of the button when the type is flat.
*/
get: function () {
return brushToString(this.i.p7);
},
set: function (v) {
this.i.p7 = stringToBrush(v);
this._a("flatDisabledTextColor", brushToString(this.i.p7));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatDisabledElevation", {
/**
* Gets or sets the disabled elevation to use for the button when the type is flat.
*/
get: function () {
return this.i.dn;
},
set: function (v) {
this.i.dn = +v;
this._a("flatDisabledElevation", this.i.dn);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatHoverBackgroundColor", {
/**
* Gets or sets the hover color to use for the background of the button when the type is flat.
*/
get: function () {
return brushToString(this.i.qa);
},
set: function (v) {
this.i.qa = stringToBrush(v);
this._a("flatHoverBackgroundColor", brushToString(this.i.qa));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatBorderColor", {
/**
* Gets or sets the border color to use for the button when the type is flat.
*/
get: function () {
return brushToString(this.i.p4);
},
set: function (v) {
this.i.p4 = stringToBrush(v);
this._a("flatBorderColor", brushToString(this.i.p4));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatRestingElevation", {
/**
* Gets or sets the elevation to use for the button when the type is flat.
*/
get: function () {
return this.i.dr;
},
set: function (v) {
this.i.dr = +v;
this._a("flatRestingElevation", this.i.dr);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatHoverElevation", {
/**
* Gets or sets the hover elevation to use for the button when the type is flat.
*/
get: function () {
return this.i.dq;
},
set: function (v) {
this.i.dq = +v;
this._a("flatHoverElevation", this.i.dq);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatFocusElevation", {
/**
* Gets or sets the focus elevation to use for the button when the type is flat.
*/
get: function () {
return this.i.dp;
},
set: function (v) {
this.i.dp = +v;
this._a("flatFocusElevation", this.i.dp);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatRippleColor", {
/**
* Gets or sets the color to use for the background when the button is pressed and the type is floating action button.
*/
get: function () {
return brushToString(this.i.qc);
},
set: function (v) {
this.i.qc = stringToBrush(v);
this._a("flatRippleColor", brushToString(this.i.qc));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatTextColor", {
/**
* Gets or sets the color to use for the text of the button when type is flat.
*/
get: function () {
return brushToString(this.i.qd);
},
set: function (v) {
this.i.qd = stringToBrush(v);
this._a("flatTextColor", brushToString(this.i.qd));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatHoverTextColor", {
/**
* Gets or sets the color to use for the hovered text of the button when type is flat.
*/
get: function () {
return brushToString(this.i.qb);
},
set: function (v) {
this.i.qb = stringToBrush(v);
this._a("flatHoverTextColor", brushToString(this.i.qb));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatFocusBackgroundColor", {
/**
* Gets or sets the color to use for the backround the button when it is focused and flat.
*/
get: function () {
return brushToString(this.i.p8);
},
set: function (v) {
this.i.p8 = stringToBrush(v);
this._a("flatFocusBackgroundColor", brushToString(this.i.p8));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatFocusTextColor", {
/**
* Gets or sets the color to use for the text the button when it is focused and flat.
*/
get: function () {
return brushToString(this.i.p9);
},
set: function (v) {
this.i.p9 = stringToBrush(v);
this._a("flatFocusTextColor", brushToString(this.i.p9));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatBorderWidth", {
/**
* Gets or sets the width to use for the button border when the type is flat.
*/
get: function () {
return this.i.bv;
},
set: function (v) {
this.i.bv = +v;
this._a("flatBorderWidth", this.i.bv);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatCornerRadiusBottomRight", {
get: function () {
return this.i.k8 ? this.i.k8.c : NaN;
},
set: function (v) {
this.ensureFlatCornerRadius();
this.i.k8.c = +v;
this._a("flatCornerRadiusBottomRight", this.i.k8.c);
this.i.k8 = this.i.k8;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatCornerRadiusBottomLeft", {
get: function () {
return this.i.k8 ? this.i.k8.b : NaN;
},
set: function (v) {
this.ensureFlatCornerRadius();
this.i.k8.b = +v;
this._a("flatCornerRadiusBottomLeft", this.i.k8.b);
this.i.k8 = this.i.k8;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatCornerRadiusTopLeft", {
get: function () {
return this.i.k8 ? this.i.k8.d : NaN;
},
set: function (v) {
this.ensureFlatCornerRadius();
this.i.k8.d = +v;
this._a("flatCornerRadiusTopLeft", this.i.k8.d);
this.i.k8 = this.i.k8;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "flatCornerRadiusTopRight", {
get: function () {
return this.i.k8 ? this.i.k8.e : NaN;
},
set: function (v) {
this.ensureFlatCornerRadius();
this.i.k8.e = +v;
this._a("flatCornerRadiusTopRight", this.i.k8.e);
this.i.k8 = this.i.k8;
},
enumerable: false,
configurable: true
});
IgcXButtonComponent.prototype.ensureFlatCornerRadius = function () {
if (this.i.k8) {
return;
}
this.i.k8 = new CornerRadius(2);
};
Object.defineProperty(IgcXButtonComponent.prototype, "backgroundColor", {
/**
* Gets or sets the color to use for the background when the button regardless of type.
*/
get: function () {
return brushToString(this.i.n1);
},
set: function (v) {
this.i.n1 = stringToBrush(v);
this._a("backgroundColor", brushToString(this.i.n1));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "disabledBackgroundColor", {
/**
* Gets or sets the color to use for the disabled background of the button when the type is disabled.
*/
get: function () {
return brushToString(this.i.pp);
},
set: function (v) {
this.i.pp = stringToBrush(v);
this._a("disabledBackgroundColor", brushToString(this.i.pp));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "disabledBorderColor", {
/**
* Gets or sets the color to use for the disabled border of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.pq);
},
set: function (v) {
this.i.pq = stringToBrush(v);
this._a("disabledBorderColor", brushToString(this.i.pq));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "disabledTextColor", {
/**
* Gets or sets the color to use for the disabled text of the button when the type is raised.
*/
get: function () {
return brushToString(this.i.pr);
},
set: function (v) {
this.i.pr = stringToBrush(v);
this._a("disabledTextColor", brushToString(this.i.pr));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "disabledElevation", {
/**
* Gets or sets the disabled elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.di;
},
set: function (v) {
this.i.di = +v;
this._a("disabledElevation", this.i.di);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "elevationMode", {
/**
* Gets or sets the disabled elevation to use for the button when the type is raised.
*/
get: function () {
return this.i.w;
},
set: function (v) {
this.i.w = ensureEnum(ElevationMode_$type, v);
this._a("elevationMode", enumToString(ElevationMode_$type, this.i.w));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "hoverBackgroundColor", {
/**
* Gets or sets the hover color to use for the background of the button when the type is hovered.
*/
get: function () {
return brushToString(this.i.qg);
},
set: function (v) {
this.i.qg = stringToBrush(v);
this._a("hoverBackgroundColor", brushToString(this.i.qg));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "borderColor", {
/**
* Gets or sets the border color to use for the button regardless of type.
*/
get: function () {
return brushToString(this.i.n2);
},
set: function (v) {
this.i.n2 = stringToBrush(v);
this._a("borderColor", brushToString(this.i.n2));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "restingElevation", {
/**
* Gets or sets the elevation to use for the button regardless of type.
*/
get: function () {
return this.i.d6;
},
set: function (v) {
this.i.d6 = +v;
this._a("restingElevation", this.i.d6);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "hoverElevation", {
/**
* Gets or sets the hover elevation to use for the button regardless of type.
*/
get: function () {
return this.i.dt;
},
set: function (v) {
this.i.dt = +v;
this._a("hoverElevation", this.i.dt);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "focusElevation", {
/**
* Gets or sets the focus elevation to use for the button regardless of type.
*/
get: function () {
return this.i.ds;
},
set: function (v) {
this.i.ds = +v;
this._a("focusElevation", this.i.ds);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "textStyle", {
/**
* Gets or sets the use for the button.
*/
get: function () {
if (this.i.aa == null) {
return null;
}
return this.i.aa.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.aa = fi;
this._a("textStyle", this.i.aa != null ? this.i.aa.fontString : "");
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "textColor", {
/**
* Gets or sets the color to use for the text of the button regardless of type.
*/
get: function () {
return brushToString(this.i.rg);
},
set: function (v) {
this.i.rg = stringToBrush(v);
this._a("textColor", brushToString(this.i.rg));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "hoverTextColor", {
/**
* Gets or sets the color to use for the hovered text of the button regardless of type.
*/
get: function () {
return brushToString(this.i.qh);
},
set: function (v) {
this.i.qh = stringToBrush(v);
this._a("hoverTextColor", brushToString(this.i.qh));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "rippleColor", {
/**
* Gets or sets the color to use for the background of the button regardless of type.
*/
get: function () {
return brushToString(this.i.rf);
},
set: function (v) {
this.i.rf = stringToBrush(v);
this._a("rippleColor", brushToString(this.i.rf));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedTextColor", {
/**
* Gets or sets the color to use for the text of the button when type is raised.
*/
get: function () {
return brushToString(this.i.re);
},
set: function (v) {
this.i.re = stringToBrush(v);
this._a("raisedTextColor", brushToString(this.i.re));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedHoverTextColor", {
/**
* Gets or sets the color to use for the hovered text of the button when type is raised.
*/
get: function () {
return brushToString(this.i.rc);
},
set: function (v) {
this.i.rc = stringToBrush(v);
this._a("raisedHoverTextColor", brushToString(this.i.rc));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcXButtonComponent.prototype, "raisedFocusBackgroundColor", {
/**
* Gets or sets the color to use for the backround the button when it is focused and raised.
*/
get: function () {
return brushToString(this.i.q9);
},
set: function (v) {
this.i.q9 = stringToBrush(v);