igniteui-webcomponents-inputs
Version:
Ignite UI Web Components inputs components.
1,320 lines (1,305 loc) • 1.4 MB
JavaScript
/*!
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Base, StringBuilder, markType, List$1, Delegate_$type, fromEnum, runOn, NativeUI, ScaleTransform, KeyFrameAnimationFactory, AnimationKeyFrameEffect, LinkedList$1, IKeyFrameAnimation_$type, PropertyChangedEventArgs, AnimationKeyFrameProperty, AnimationKeyFrameEffectTiming, AppearanceHelper, INotifyPropertyChanged_$type, BrushUtil, IgcHTMLElement, NamePatcher, WebComponentRenderer, TypeRegistrar, toSpinal, getAllPropertyNames, fromSpinal, RegisterElementHelper, brushToString, stringToBrush, ensureBool, initializePropertiesFromCss, markEnum, typeGetValue, EnumUtil, ElevationMode_$type, EventArgs, stringIsNullOrEmpty, isNaN_, IVisualData_$type, enumGetBox, CornerRadius, MouseEventArgs, FocusEventArgs, Thickness, ControlDisplayDensity_$type, BaseControlTheme_$type, HorizontalAlignment_$type, VerticalAlignment_$type, FontUtil, Dictionary$2, String_$type, PortalManager, ensureEnum, enumToString, FontInfo, delegateRemove, delegateCombine, IgcFocusEventArgs, IgcChildContentModule, Brush, DomWrapper_$type, Tuple$2, SVGNode, FastIterationDictionary$2, typeCast, Size, PrimitiveVisualData, Ellipse, EllipseVisualData, Rectangle, RectangleVisualData, Line, LineVisualData, Path, PathVisualData, DoubleCollection, LegendItemHelper, stringStartsWith, trimStart, IIcon_$type, fromBrushCollection, toBrushCollection, brushCollectionToString, dateMinValue, dateGetMonth, parseBool, truncate, dateNow, dateMaxValue, dateAddYears, ObservableCollection$1, dateFromValues, SRProvider, dateGetDate, stringIsNullOrWhiteSpace, dateAddDays, Number_$type, dateAddMonths, timeSpanTotalDays, intDivide, Localization, HashSet$1, stringReplace, TransformGroup, TranslateTransform, MouseButtonEventArgs, Point_$type, KeyEventArgs, toNullable, fromEn, DeviceUtils, IgcKeyEventArgs, IgCollection, SyncableObservableCollection$2, NotifyCollectionChangedAction, CollectionAdapter, Rect, stringContains, stringSplit, Popup, NativeUIElementBridge, NativeUIMouseEventArgs, NativeUIKeyEventArgs, NativeUIInputChangingEventArgs, NativeUIFocusEventArgs, NativeUIClickedEventArgs, NativeUIComponentHorizontalAlignment_$type, NativeUIInputType_$type, NativeUIInputDisplayType_$type, NativeUIDisplayDensity_$type, INativeUIInputBridge_$type, NativeUIButtonClickedEventArgs, NativeUIButtonDisplayType_$type, NativeUIComponent, Type, Color, PathGeometry, PathFigure, PolyLineSegment, LineSegment, EllipseGeometry, PropertyUpdatedEventArgs, TextBlock, CanvasScalingHelpers, RenderingContext, CanvasViewRenderer, CanvasGestureDOMEventProxy, NotImplementedException, NativeUISliderValueChangedEventArgs, NativeUISliderOrientation_$type, NativeUIButton, NativeUIButtonGroupSelectionChangedEventArgs, NativeUIButtonGroupDisplayType_$type, INativeUIButtonGroupBridge_$type, RotateTransform, NativeUICheckboxChangeEventArgs, SvgIconRegistry, NativeUIPopupMeasuringContentEventArgs, NativeUIPopupOpenedEventArgs, NativeUIPopupClosedEventArgs, NativeUIPopupPointerPosition_$type, NativeUIPopupAnimationType_$type, INativeUIPopupBridge_$type, NativeUIInput, NativeUISlider, NativeUIButtonGroup, NativeUIColorEditor, NativeUICheckbox, NativeUIIcon, NativeUIPopup, INativeUIElementFactory_$type, NativeUIColorEditorValueChangedEventArgs, DOMExecutionContext, NativeUIInputsFactory, NativeUIWindow, NativeUIContent, ColorUtil, IgcPropertyUpdatedEventArgs, SyncableObservableCollection$1, fromRect, toRect, rectToString } from 'igniteui-webcomponents-core';
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
let RippleVisualModelExport = /*@__PURE__*/ (() => {
class RippleVisualModelExport extends Base {
constructor() {
super(...arguments);
this.a = null;
this.b = null;
this.f = 0;
this.d = false;
this.c = false;
this.e = false;
}
g() {
let a = new StringBuilder(0);
a.l("{");
a.l("ActualHoverColor : " + this.a.serialize() + ", ");
a.l("ActualRippleColor : " + this.b.serialize() + ", ");
a.l("RippleDuration : " + this.f + ", ");
a.l("IsDisabled : " + this.d + ", ");
a.l("IsCentered : " + this.c + ", ");
a.l("IsHoverEnabled : " + this.e + ", ");
a.l("}");
return a.toString();
}
}
RippleVisualModelExport.$t = /*@__PURE__*/ markType(RippleVisualModelExport, 'RippleVisualModelExport');
return RippleVisualModelExport;
})();
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
let RippleView = /*@__PURE__*/ (() => {
class RippleView extends Base {
constructor() {
super();
this.b = null;
this.g = null;
this.c = null;
this.f = new List$1(Delegate_$type, 0);
this.l = null;
this.d = true;
this.k = null;
this.h = null;
this.j = null;
this.i = null;
}
w() {
}
e() {
return true;
}
t(a) {
if (a == null) {
for (let b of fromEnum(this.f)) {
b();
}
this.f.clear();
}
this.g = a;
this.b.ai();
}
v() {
if (this.b.q == null) {
this.l = null;
for (let a of fromEnum(this.f)) {
a();
}
this.f.clear();
}
else {
let b = this.b.q;
let c = this.g.getWrapper(b);
this.l = c;
this.f.add(c.listen("click", runOn(this, this.p)));
this.f.add(c.listen("mouseenter", runOn(this, this.q)));
this.f.add(c.listen("mouseleave", runOn(this, this.r)));
}
}
r(a) {
this.b.ag();
}
q(a) {
this.b.af();
}
p(a) {
if (this.l == null) {
return;
}
let b = this.g.rootWrapper.getOffset();
let c = a.pageX - b.left;
let d = a.pageY - b.top;
this.b.al(c, d, this.g.rootWrapper.outerWidth(), this.g.rootWrapper.outerHeight());
}
aa() {
if (this.b.j) {
this.g.rootWrapper.setStyleProperty("background-color", this.b.as._fill);
}
}
x() {
this.g.rootWrapper.setStyleProperty("background-color", "transparent");
}
z() {
this.g.rootWrapper.setStyleProperty("background-color", this.b.as._fill);
}
m(a, b, c) {
let d = this.g.createElement("span");
d.setStyleProperty("width", c * 2 + "px");
d.setStyleProperty("height", c * 2 + "px");
d.setStyleProperty("top", b + "px");
d.setStyleProperty("left", a + "px");
d.setStyleProperty("background-color", this.b.at._fill);
d.setStyleProperty("position", "absolute");
d.setStyleProperty("pointer-events", "none");
d.setStyleProperty("border-radius", c + "px");
d.setStyleProperty("opacity", ".5");
NativeUI.af(d, ((() => {
let $ret = new ScaleTransform();
$ret.l = 0.3;
$ret.m = 0.3;
return $ret;
})()));
this.g.append(d);
return d;
}
y(a) {
let b = a;
b.remove();
}
n() {
if (KeyFrameAnimationFactory.h == null) {
KeyFrameAnimationFactory.h = this.g;
}
}
a(a, b) {
return new AnimationKeyFrameEffect(0, a, 0, null, b);
}
o(a) {
}
s() {
this.d = true;
this.v();
}
u() {
this.d = false;
for (let a of fromEnum(this.f)) {
a();
}
this.f.clear();
}
}
RippleView.$t = /*@__PURE__*/ markType(RippleView, 'RippleView');
return RippleView;
})();
let XRipple = /*@__PURE__*/ (() => {
class XRipple extends Base {
constructor() {
super();
this.c = null;
this.j = false;
this.p = null;
this.ar = null;
this.aq = null;
this.ao = XRipple.au;
this.m = new LinkedList$1(IKeyFrameAnimation_$type);
this.ap = XRipple.av;
this.n = 600;
this.f = false;
this.e = false;
this.g = false;
this.propertyChanged = null;
let a = new RippleView();
a.b = this;
this.c = a;
this.c.w();
}
destroy() {
this.provideContainer(null);
}
ah(a, b, c) {
if (this.propertyChanged != null) {
this.propertyChanged(this, new PropertyChangedEventArgs(a));
}
this.aj(a, b, c);
}
aj(a, b, c) {
switch (a) {
case "RippleColor":
this.at = this.ax != null ? this.ax : XRipple.av;
break;
case "HoverColor":
this.as = this.aw != null ? this.aw : XRipple.au;
break;
case "EventSource":
if (this.c.e()) {
this.c.v();
}
break;
case "ActualRippleColor":
this.an();
break;
case "ActualHoverColor":
this.am();
break;
}
}
am() {
if (this.i) {
this.c.x();
return;
}
this.c.aa();
}
an() {
}
af() {
this.j = true;
if (this.i) {
this.c.x();
return;
}
if (this.k) {
this.c.z();
}
}
ag() {
this.j = false;
if (this.k || this.i) {
this.c.x();
}
}
get q() {
return this.p;
}
set q(a) {
let b = this.p;
this.p = a;
if (b != this.p) {
this.ah("EventSource", b, a);
}
}
get ax() {
return this.ar;
}
set ax(a) {
let b = this.ar;
this.ar = a;
if (b != this.ar) {
this.ah("RippleColor", b, a);
}
}
get aw() {
return this.aq;
}
set aw(a) {
let b = this.aq;
this.aq = a;
if (b != this.aq) {
this.ah("HoverColor", b, a);
}
}
get as() {
return this.ao;
}
set as(a) {
let b = this.ao;
this.ao = a;
if (b != this.ao) {
this.ah("ActualHoverColor", b, a);
}
}
al(a, b, c, d) {
if (this.i) {
return;
}
let e = Math.max(c, d);
let f = e / 2;
let g = a - f;
let h = b - f;
if (this.h) {
g = 0;
h = 0;
}
let i = this.c.m(g, h, f);
let j = this.d(i);
this.m.f(j);
let k = this.m.d;
j.play();
j.finished.f((l) => {
j.commitStyles();
this.m.h(k);
this.c.y(i);
});
}
d(a) {
let b = this.a;
let c = KeyFrameAnimationFactory.f.c(this.c.a(a, b).m(new AnimationKeyFrameProperty(1, 0.5), new AnimationKeyFrameProperty(14, ((() => {
let $ret = new ScaleTransform();
$ret.l = 0.3;
$ret.m = 0.3;
return $ret;
})()))).m(new AnimationKeyFrameProperty(1, 0), new AnimationKeyFrameProperty(14, ((() => {
let $ret = new ScaleTransform();
$ret.l = 2;
$ret.m = 2;
return $ret;
})()))));
return c;
}
get at() {
return this.ap;
}
set at(a) {
let b = this.ap;
this.ap = a;
if (b != this.ap) {
this.ah("ActualRippleColor", b, a);
}
}
get o() {
return this.n;
}
set o(a) {
let b = this.n;
this.n = a;
if (b != this.n) {
this.ah("RippleDuration", b, a);
}
}
get i() {
return this.f;
}
set i(a) {
let b = this.f;
this.f = a;
if (b != this.f) {
this.ah("IsDisabled", b, a);
}
}
get h() {
return this.e;
}
set h(a) {
let b = this.e;
this.e = a;
if (b != this.e) {
this.ah("IsCentered", b, a);
}
}
get k() {
return this.g;
}
set k(a) {
let b = this.g;
this.g = a;
if (b != this.g) {
this.ah("IsHoverEnabled", b, a);
}
}
ai() {
this.c.v();
}
get a() {
let a = new AnimationKeyFrameEffectTiming();
a.g = this.o;
a.b = 0;
return a;
}
onDetachedFromUI() {
this.c.u();
}
onAttachedToUI() {
this.c.s();
}
l() {
return this.c.e();
}
r() {
return this.b();
}
v() {
let a = this.b();
return a.g();
}
b() {
let a = new RippleVisualModelExport();
a.a = AppearanceHelper.a(this.as);
a.b = AppearanceHelper.a(this.at);
a.f = this.o;
a.d = this.i;
a.c = this.h;
a.e = this.k;
return a;
}
provideContainer(a) {
this.c.t(a);
}
}
XRipple.$t = /*@__PURE__*/ markType(XRipple, 'XRipple', Base.$, [INotifyPropertyChanged_$type]);
XRipple.au = /*@__PURE__*/ BrushUtil.j(40, 0, 0, 0);
XRipple.av = /*@__PURE__*/ BrushUtil.j(189, 0, 0, 0);
return XRipple;
})();
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
let IgcXRippleComponent = /*@__PURE__*/ (() => {
class IgcXRippleComponent extends IgcHTMLElement {
set height(value) {
this._height = value;
this.style.height = value;
}
get height() {
return this._height;
}
set width(value) {
this._width = value;
this.style.width = value;
}
get width() {
return this._width;
}
set top(value) {
this._top = value;
this.style.top = value;
}
get top() {
return this._top;
}
set left(value) {
this._left = value;
this.style.left = value;
}
get left() {
return this._left;
}
set position(value) {
this._position = value;
this.style.position = value;
}
get position() {
return this._position;
}
constructor() {
super();
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;
if (this._styling) {
NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this));
}
this._renderer = new WebComponentRenderer(this, document, true, {});
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this._container = this._renderer.createElement("div");
this._renderer.updateRoot(this._container);
//this._renderer.rootWrapper.append(this._container);
this._container.setStyleProperty("display", "inline-block");
//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 Ripple = this.i;
this._ripple = Ripple;
Ripple.provideContainer(this._renderer);
//Ripple.notifySizeChanged();
//let mut = new MutationObserver((list) => {
// for (var mutation of list) {
// if (mutation.type == 'childList') {
// this.updateContentStyleMappings();
// }
// }
//});
//mut.observe(this, {
// childList: true
//});
//this._renderer.addSizeWatcher(() => {
// this._ripple.notifySizeChanged();
//});
}
// supports angular themes or custom properties set in CSS
updateStyle() {
this._styling(this, this);
}
destroy() {
this._ripple.destroy();
this._wrapper.destroy();
}
createImplementation() {
return new XRipple();
}
disconnectedCallback() {
this._disconnected = true;
if (this.i) {
this.i.onDetachedFromUI();
}
}
connectedCallback() {
if (this._disconnected) {
this._disconnected = false;
if (this.i) {
this.i.onAttachedToUI();
}
return;
}
this.classList.add("ig-x-ripple");
this.classList.add("igc-x-ripple");
this.appendChild(this._renderer.rootWrapper.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();
}
afterContentInit() {
//this.i.notifySizeChanged();
}
/**
* @hidden
*/
get i() {
return this._implementation;
} /**
* @hidden
*/
static _createFromInternal(internal) {
if (!internal) {
return null;
}
if (!internal.$type) {
return null;
}
let name = internal.$type.name;
let externalName = "Igc" + name + "Component";
if (!TypeRegistrar.isRegistered(externalName)) {
return null;
}
return TypeRegistrar.create(externalName);
}
_enqueueSetAttribute(attrName, attrValue) {
this._queuedSetAttributes.push({ attrName: attrName, attrValue: attrValue });
}
_flushQueuedAttributes() {
this._settingAttributes = true;
for (let i = 0; i < this._queuedSetAttributes.length; i++) {
this.setAttribute(this._queuedSetAttributes[i].attrName, this._queuedSetAttributes[i].attrValue);
}
this._settingAttributes = false;
this._queuedSetAttributes.length = 0;
}
_a(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;
}
static get observedAttributes() {
if (IgcXRippleComponent._observedAttributesIgcXRippleComponent == null) {
let names = getAllPropertyNames(IgcXRippleComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcXRippleComponent._observedAttributesIgcXRippleComponent = names;
}
return IgcXRippleComponent._observedAttributesIgcXRippleComponent;
}
attributeChangedCallback(name, oldValue, newValue) {
if (this._settingAttributes) {
return;
}
let setName = fromSpinal(name);
this._updatingFromAttribute = true;
this[setName] = newValue;
this._updatingFromAttribute = false;
}
static register() {
if (!IgcXRippleComponent._isElementRegistered) {
IgcXRippleComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcXRippleComponent.htmlTagName, IgcXRippleComponent);
}
}
/**
* Gets or sets the target element to inject ripples into.
*/
get eventSource() {
return this.i.q;
}
set eventSource(v) {
this.i.q = v;
}
/**
* Gets or sets the color to use for the background when the checkbox is unchecked.
*/
get rippleColor() {
return brushToString(this.i.ax);
}
set rippleColor(v) {
this.i.ax = stringToBrush(v);
this._a("rippleColor", brushToString(this.i.ax));
}
/**
* Gets or sets the color to use for the background when the ripple is hovered.
*/
get hoverColor() {
return brushToString(this.i.aw);
}
set hoverColor(v) {
this.i.aw = stringToBrush(v);
this._a("hoverColor", brushToString(this.i.aw));
}
/**
* Gets or sets the actual color to use for the background when the ripple is hovered.
*/
get actualHoverColor() {
return brushToString(this.i.as);
}
set actualHoverColor(v) {
this.i.as = stringToBrush(v);
this._a("actualHoverColor", brushToString(this.i.as));
}
/**
* Gets or sets the color to use for the actual background when the checkbox is unchecked.
*/
get actualRippleColor() {
return brushToString(this.i.at);
}
set actualRippleColor(v) {
this.i.at = stringToBrush(v);
this._a("actualRippleColor", brushToString(this.i.at));
}
/**
* Gets or sets the duration to use for the ripple animation.
*/
get rippleDuration() {
return this.i.o;
}
set rippleDuration(v) {
this.i.o = +v;
this._a("rippleDuration", this.i.o);
}
/**
* Gets or sets if the ripple is disabled.
*/
get isDisabled() {
return this.i.i;
}
set isDisabled(v) {
this.i.i = ensureBool(v);
this._a("isDisabled", this.i.i);
}
/**
* Gets or sets if the ripple is centered.
*/
get isCentered() {
return this.i.h;
}
set isCentered(v) {
this.i.h = ensureBool(v);
this._a("isCentered", this.i.h);
}
/**
* Gets or sets if the ripple is centered.
*/
get isHoverEnabled() {
return this.i.k;
}
set isHoverEnabled(v) {
this.i.k = ensureBool(v);
this._a("isHoverEnabled", this.i.k);
}
findByName(name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
}
get hasUserValues() {
return this._hasUserValues;
}
__m(propertyName) {
if (!this._inStyling) {
this._hasUserValues.add(propertyName);
}
}
_styling(container, component, parent) {
if (this._inStyling) {
return;
}
this._inStyling = true;
this._stylingContainer = container;
this._stylingParent = component;
let genericPrefix = "";
let typeName = this.i.$type.name;
if (typeName.indexOf("Xam") === 0) {
typeName = typeName.substring(3);
}
genericPrefix = toSpinal("XRippleComponent");
let additionalPrefixes = [];
let prefix = toSpinal(typeName);
additionalPrefixes.push(prefix + "-");
let 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);
}
let basePrefix = toSpinal(typeName);
additionalPrefixes.push(basePrefix + "-");
b = b.baseType;
}
if (parent) {
let parentTypeName = parent.i.$type.name;
if (parentTypeName.indexOf("Xam") === 0) {
parentTypeName = parentTypeName.substring(3);
}
let 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;
}
onDetachedFromUI() {
this.i.onDetachedFromUI();
}
onAttachedToUI() {
this.i.onAttachedToUI();
}
/**
* Exports visual information about the current state of the grid.
*/
exportVisualModel() {
let iv = this.i.r();
return (iv);
}
/**
* Returns a serialized copy of the exported visual model
*/
exportSerializedVisualModel() {
let iv = this.i.v();
return (iv);
}
}
IgcXRippleComponent._observedAttributesIgcXRippleComponent = null;
IgcXRippleComponent.htmlTagName = "igc-x-ripple";
IgcXRippleComponent._isElementRegistered = false;
return IgcXRippleComponent;
})();
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
class IgcXRippleModule {
static register() {
IgcXRippleComponent.register();
TypeRegistrar.registerCons('IgcXRippleComponent', IgcXRippleComponent);
TypeRegistrar.registerCons('IgcXRippleComponent', IgcXRippleComponent);
TypeRegistrar.register('XRipple', XRipple.$type);
}
}
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
let ElevationHelper = /*@__PURE__*/ (() => {
class ElevationHelper extends Base {
static g(a, b) {
if (ElevationHelper.c == null) {
ElevationHelper.c = ["0 1px 3px 0 ", "0 1px 5px 0 ", "0 1px 8px 0 ", "0 2px 4px -1px ", "0 3px 5px -1px ", "0 3px 5px -1px ", "0 4px 5px -2px ", "0 5px 5px -3px ", "0 5px 6px -3px ", "0 6px 6px -3px ", "0 6px 7px -4px ", "0 7px 8px -4px ", "0 7px 8px -4px ", "0 7px 9px -4px ", "0 8px 9px -5px ", "0 8px 10px -5px ", "0 8px 11px -5px ", "0 9px 11px -5px ", "0 9px 12px -6px ", "0 10px 13px -6px ", "0 10px 13px -6px ", "0 10px 14px -6px ", "0 11px 14px -7px ", "0 11px 15px -7px "];
}
a--;
if (a < 0) {
return "";
}
if (a > ElevationHelper.c.length - 1) {
a = ElevationHelper.c.length - 1;
}
return ElevationHelper.c[a] + b;
}
static f(a, b) {
if (ElevationHelper.b == null) {
ElevationHelper.b = ["0 1px 1px 0 ", "0 2px 2px 0 ", "0 3px 4px 0 ", "0 4px 5px 0 ", "0 5px 8px 0 ", "0 6px 10px 0 ", "0 7px 10px 1px ", "0 8px 10px 1px ", "0 9px 12px 1px ", "0 10px 14px 1px ", "0 11px 15px 1px ", "0 12px 17px 2px ", "0 13px 19px 2px ", "0 14px 21px 2px ", "0 15px 22px 2px ", "0 16px 24px 2px ", "0 17px 26px 2px ", "0 18px 28px 2px ", "0 19px 29px 2px ", "0 20px 31px 3px ", "0 21px 33px 3px ", "0 22px 35px 3px ", "0 23px 36px 3px ", "0 24px 38px 3px "];
}
a--;
if (a < 0) {
return "";
}
if (a > ElevationHelper.b.length - 1) {
a = ElevationHelper.b.length - 1;
}
return ElevationHelper.b[a] + b;
}
static d(a, b) {
if (ElevationHelper.a == null) {
ElevationHelper.a = ["0 2px 1px -1px ", "0 3px 1px -2px ", "0 3px 3px -2px ", "0 1px 10px 0 ", "0 1px 14px 0 ", "0 1px 18px 0 ", "0 2px 16px 1px ", "0 3px 14px 2px ", "0 3px 16px 2px ", "0 4px 18px 3px ", "0 4px 20px 3px ", "0 5px 22px 4px ", "0 5px 24px 4px ", "0 5px 26px 4px ", "0 6px 28px 5px ", "0 6px 30px 5px ", "0 6px 32px 5px ", "0 7px 34px 6px ", "0 7px 36px 6px ", "0 8px 38px 7px ", "0 8px 40px 7px ", "0 8px 42px 7px ", "0 9px 44px 8px ", "0 9px 46px 8px "];
}
a--;
if (a < 0) {
return "";
}
if (a > ElevationHelper.a.length - 1) {
a = ElevationHelper.a.length - 1;
}
return ElevationHelper.a[a] + b;
}
static e(a, b, c, d, e) {
if (e == 2) {
return "0 0 " + a + "px " + (a / 20) + "rem " + b._fill;
}
if (a == 0) {
return "";
}
return ElevationHelper.g(a, b._fill) + ", " + ElevationHelper.f(a, c._fill) + ", " + ElevationHelper.d(a, d._fill);
}
}
ElevationHelper.$t = /*@__PURE__*/ markType(ElevationHelper, 'ElevationHelper');
ElevationHelper.c = null;
ElevationHelper.b = null;
ElevationHelper.a = null;
return ElevationHelper;
})();
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
/**
* @hidden
*/
let ButtonDisplayStyle_$type = /*@__PURE__*/ markEnum('ButtonDisplayStyle', 'Raised,0|Flat,1|Outlined,2|Fab,3|Icon,4');
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
let Theme = /*@__PURE__*/ (() => {
class Theme extends Base {
get c() {
return this.a;
}
constructor(a, ..._rest) {
super();
this.b = null;
this.a = null;
a = (a == void 0) ? 0 : a;
switch (a) {
case 0:
{
let c = _rest[0];
this.b = c;
}
break;
case 1:
{
let c = _rest[0];
let d = _rest[1];
let e = [c];
{
let g = e[0];
this.b = g;
}
this.a = d;
}
break;
}
}
item(a) {
return this.b.item(a);
}
}
Theme.$t = /*@__PURE__*/ markType(Theme, 'Theme');
return Theme;
})();
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
let ThemeResolver = /*@__PURE__*/ (() => {
class ThemeResolver extends Base {
static ah(a, b, c) {
if (a == 1) {
return c;
}
return b;
}
static r(a, b, c) {
if (a == 1) {
return c;
}
return b;
}
static m(a, b, c) {
if (a == 1) {
return c;
}
return b;
}
static ac(a, b, c) {
if (a == 1) {
return c;
}
return b;
}
static am(a, b, c) {
if (a == 1) {
return c;
}
return b;
}
static g(a, b, c) {
if (a == 1) {
return c;
}
return b;
}
static a(a) {
return new Theme(0, a);
}
static ag(a, b, c) {
return b.ae(a, c);
}
static af(a, b, c, d) {
return b.ad(a, c, d);
}
static q(a, b, c) {
return b.o(a, c);
}
static p(a, b, c, d) {
return b.n(a, c, d);
}
static l(a, b, c) {
return b.j(a, c);
}
static k(a, b, c, d) {
return b.i(a, c, d);
}
static x(a, b, c) {
return b.v(a, c);
}
static w(a, b, c, d) {
return b.u(a, c, d);
}
static f(a, b, c) {
return b.d(a, c);
}
static e(a, b, c, d) {
return b.c(a, c, d);
}
static ab(a, b, c) {
return b.z(a, c);
}
static aa(a, b, c, d) {
return b.y(a, c, d);
}
static al(a, b, c) {
return b.aj(a, c);
}
static ak(a, b, c, d) {
return b.ai(a, c, d);
}
constructor(a, ..._rest) {
super();
this.b = 0;
this.h = null;
a = (a == void 0) ? 0 : a;
switch (a) {
case 0: break;
case 1:
{
let c = _rest[0];
let d = _rest[1];
this.h = c;
this.b = d;
}
break;
}
}
t(a, b) {
if (this.h.containsKey(a)) {
return this.h.item(a).item(b);
}
else {
return this.h.item(this.b).item(b);
}
}
s(a, b, c) {
if (this.h.containsKey(a)) {
let d = this.h.item(a).c;
return d.item(b).item(c);
}
else {
let e = this.h.item(this.b).c;
return e.item(b).item(c);
}
}
ae(a, b) {
return this.t(a, b);
}
ad(a, b, c) {
return this.s(a, b, c);
}
o(a, b) {
return typeGetValue(this.t(a, b));
}
n(a, b, c) {
return typeGetValue(this.s(a, b, c));
}
j(a, b) {
return this.t(a, b);
}
i(a, b, c) {
return this.s(a, b, c);
}
v(a, b) {
return this.t(a, b);
}
u(a, b, c) {
return this.s(a, b, c);
}
d(a, b) {
return EnumUtil.getEnumValue(ElevationMode_$type, this.t(a, b));
}
c(a, b, c) {
return EnumUtil.getEnumValue(ElevationMode_$type, this.s(a, b, c));
}
z(a, b) {
return this.t(a, b);
}
y(a, b, c) {
return this.s(a, b, c);
}
aj(a, b) {
return this.t(a, b);
}
ai(a, b, c) {
return this.s(a, b, c);
}
}
ThemeResolver.$t = /*@__PURE__*/ markType(ThemeResolver, 'ThemeResolver');
return ThemeResolver;
})();
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
let ButtonClickEventArgs = /*@__PURE__*/ (() => {
class ButtonClickEventArgs extends EventArgs {
}
ButtonClickEventArgs.$t = /*@__PURE__*/ markType(ButtonClickEventArgs, 'ButtonClickEventArgs', EventArgs.$);
return ButtonClickEventArgs;
})();
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
let ButtonVisualModelExport = /*@__PURE__*/ (() => {
class ButtonVisualModelExport extends Base {
constructor() {
super(...arguments);
this.s = 0;
this.q = 0;
this.p = 0;
this.t = 0;
this.h = 0;
this.i = 0;
this.c = null;
this.g = null;
this.d = null;
this.a = null;
this.u = 0;
this.e = null;
this.ag = null;
this.b = null;
this.j = 0;
this.f = null;
this.o = 0;
this.ad = null;
this.ae = null;
this.af = null;
this.r = 0;
this.ab = null;
this.ac = null;
this.x = null;
this.y = null;
this.z = null;
this.w = null;
this.v = null;
this.aa = null;
this.m = false;
this.k = false;
this.n = false;
this.l = false;
}
serialize() {
let a = new StringBuilder(0);
a.l("{");
a.l("top : " + this.s + ", ");
a.l("left : " + this.q + ", ");
a.l("height : " + this.p + ", ");
a.l("width : " + this.t + ", ");
a.l("baseTheme : " + this.h + ", ");
a.l("actualDensity : " + this.i + ", ");
a.l("actualBorderColor : " + this.c.serialize() + ", ");
a.l("actualUmbraShadowColor : " + this.g.serialize() + ", ");
a.l("actualPenumbraShadowColor : " + this.d.serialize() + ", ");
a.l("actualAmbientShadowColor : " + this.a.serialize() + ", ");
a.l("actualRestingElevation : " + this.u + ", ");
if (this.e != null) {
a.l("actualRippleColor : " + this.e.serialize() + ", ");
}
a.l("actualBackgroundColor : " + this.b.serialize() + ", ");
a.l("actualElevationMode : " + this.j + ", ");
a.l("actualTextColor : " + this.f.serialize() + ", ");
a.l("actualBorderWidth : " + this.o + ", ");
if (!stringIsNullOrEmpty(this.ad)) {
a.l("textStyleFontStyle : \"" + this.ad + "\", ");
}
if (!stringIsNullOrEmpty(this.ae)) {
a.l("textStyleFontVariant : \"" + this.ae + "\", ");
}
if (!stringIsNullOrEmpty(this.af)) {
a.l("textStyleFontWeight : \"" + this.af + "\", ");
}
if (!stringIsNullOrEmpty(this.ab)) {
a.l("textStyleFontFamily : \"" + this.ab + "\", ");
}
if (!stringIsNullOrEmpty(this.ac)) {
a.l("textStyleFontStretch : \"" + this.ac + "\", ");
}
if (!isNaN_(this.r)) {
a.l("textStyleFontSize : " + this.r + ", ");
}
a.l("display : \"" + this.x + "\", ");
a.l("flexDirection : \"" + this.y + "\", ");
a.l("flexGrow : \"" + this.z + "\", ");
a.l("alignItems : \"" + this.w + "\", ");
if (this.v != null) {
a.l("value : \"" + this.v.toString() + "\", ");
}
a.l("name : \"" + this.aa + "\", ");
a.l("isFocused : " + this.m + ", ");
a.l("actualDisableRipple : " + this.k + ", ");
a.l("isHover : " + this.n + ", ");
a.l("isDisabled : " + this.l + ", ");
a.l("}");
return a.toString();
}
}
ButtonVisualModelExport.$t = /*@__PURE__*/ markType(ButtonVisualModelExport, 'ButtonVisualModelExport', Base.$, [IVisualData_$type]);
return ButtonVisualModelExport;
})();
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
let ButtonView = /*@__PURE__*/ (() => {
class ButtonView extends Base {
constructor() {
super();
this.c = null;
this.l = null;
this.e = null;
this.i = new List$1(Delegate_$type, 0);
this.f = true;
this.o = null;
this.k = NaN;
this.j = NaN;
this.m = null;
this.d = null;
this.n = null;
this.q = null;
this.p = null;
}
ar() {
}
h() {
return true;
}
get r() {
return this.o;
}
get t() {
return this.n;
}
al(a) {
if (a == null) {
for (let b of fromEnum(this.i)) {
b();
}
this.i.clear();
return;
}
this.l = a;
this.l.rootWrapper.setStyleProperty("display", "flex");
this.l.rootWrapper.setStyleProperty("flex-direction", "row");
this.l.rootWrapper.setStyleProperty("flex-wrap", "no-wrap");
this.l.rootWrapper.setStyleProperty("align-items", "center");
let c = this.l.createElement("button");
this.o = c;
this.o.setStyleProperty("position", "relative");
this.o.setStyleProperty("display", "inline-flex");
this.o.setStyleProperty("align-items", "center");
this.o.setStyleProperty("justify-content", "center");
this.a1();
this.o.setStyleProperty("border", "none");
this.o.setStyleProperty("cursor", "pointer");
this.o.setStyleProperty("user-select", "none");
this.o.setStyleProperty("outline-style", "none");
this.o.setStyleProperty("-webkit-tap-highlight-color", "transparent");
this.o.setStyleProperty("overflow", "hidden");
this.o.setStyleProperty("white-space", "no-wrap");
this.o.setStyleProperty("color", "#000");
this.o.setStyleProperty("background", this.c.no._fill);
NativeUI.o(this.o, this.c.kz);
this.o.setAttribute("id", this.c.hy);
this.ay();
this.i.add(c.listen("change", runOn(this, this.aa)));
this.i.add(c.listen("click", runOn(this, this.ab)));
this.i.add(c.listen("focus", runOn(this, this.ac)));
this.i.add(c.listen("blur", runOn(this, this.z)));
this.i.add(this.l.rootWrapper.listen("mouseenter", runOn(this, this.w)));
this.i.add(this.l.rootWrapper.listen("mouseleave", runOn(this, this.x)));
this.i.add(this.l.rootWrapper.listen("mousedown", runOn(this, this.v)));
this.i.add(this.l.rootWrapper.listen("mouseup", runOn(this, this.y)));
this.i.add(this.l.rootWrapper.listen("focusin", runOn(this, this.ad)));
this.i.add(this.l.rootWrapper.listen("focusout", runOn(this, this.ae)));
this.l.append(c);
let d = this.l.createElement("div");
let e = this.l.getSubRenderer(d);
d.setStyleProperty("position", "absolute");
d.setStyleProperty("width", "100%");
d.setStyleProperty("height", "100%");
d.setStyleProperty("left", "0px");
d.setStyleProperty("top", "0px");
d.setStyleProperty("overflow", "hidden");
let f = new XRipple();
f.provideContainer(e);
f.q = c;
let g = this.l.getExternal(f, this.l.rootWrapper, this.l.getExternal(this.c, null, null));
f.h =