igniteui-react-inputs
Version:
Ignite UI React input components.
1,345 lines (1,332 loc) • 1.55 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 { __extends, __values } from 'tslib';
import { createElement, Component, Children, cloneElement } from 'react';
import { markEnum, markType, Base, StringBuilder, List$1, Delegate_$type, fromEnum, runOn, NativeUI, ScaleTransform, KeyFrameAnimationFactory, AnimationKeyFrameEffect, LinkedList$1, IKeyFrameAnimation_$type, PropertyChangedEventArgs, AnimationKeyFrameProperty, AnimationKeyFrameEffectTiming, AppearanceHelper, INotifyPropertyChanged_$type, BrushUtil, 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, Brush, DomWrapper_$type, Tuple$2, SVGNode, FastIterationDictionary$2, typeCast, PrimitiveVisualData, Ellipse, EllipseVisualData, Rectangle, RectangleVisualData, Line, LineVisualData, Path, PathVisualData, DoubleCollection, LegendItemHelper, stringStartsWith, trimStart, IIcon_$type, dateMinValue, dateGetMonth, parseBool, truncate, dateNow, dateMaxValue, dateAddYears, ObservableCollection$1, dateFromValues, delegateRemove, SRProvider, dateGetDate, stringIsNullOrWhiteSpace, delegateCombine, dateAddDays, Number_$type, dateAddMonths, timeSpanTotalDays, intDivide, NamePatcher, ReactRenderer, getModifiedProps, isValidProp, ensureEnum, brushToString, stringToBrush, ensureBool, FontInfo, toSpinal, initializePropertiesFromCss, TypeRegistrar, PortalManager, IgrFocusEventArgs, IgrChildContentModule, fromBrushCollection, toBrushCollection, Localization, HashSet$1, stringReplace, TransformGroup, TranslateTransform, MouseButtonEventArgs, Point_$type, KeyEventArgs, toNullable, fromEn, DeviceUtils, Rect, stringContains, stringSplit, Popup, IgrKeyEventArgs, SyncableObservableCollection$2, IgCollection, ContentChildrenManager, CollectionAdapter, NotifyCollectionChangedAction, 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, RenderingContext, CanvasViewRenderer, CanvasGestureDOMEventProxy, Size, 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, IgrPropertyUpdatedEventArgs, SyncableObservableCollection$1, fromRect, toRect } from 'igniteui-react-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.
*/
/**
* Indicates some simple date formats to be used.
*/
var DayOfWeek = /*@__PURE__*/ (function (DayOfWeek) {
/**
* First Day of Week is Sunday
*/
DayOfWeek[DayOfWeek["Sunday"] = 0] = "Sunday";
/**
* First Day of Week is Monday
*/
DayOfWeek[DayOfWeek["Monday"] = 1] = "Monday";
/**
* First Day of Week is Tuesday
*/
DayOfWeek[DayOfWeek["Tuesday"] = 2] = "Tuesday";
/**
* First Day of Week is Wednesday
*/
DayOfWeek[DayOfWeek["Wednesday"] = 3] = "Wednesday";
/**
* First Day of Week is Thursday
*/
DayOfWeek[DayOfWeek["Thursday"] = 4] = "Thursday";
/**
* First Day of Week is Friday
*/
DayOfWeek[DayOfWeek["Friday"] = 5] = "Friday";
/**
* First Day of Week is Saturday
*/
DayOfWeek[DayOfWeek["Saturday"] = 6] = "Saturday";
return DayOfWeek;
})({});
/**
* @hidden
*/
var DayOfWeek_$type = /*@__PURE__*/ markEnum('DayOfWeek', 'Sunday,0|Monday,1|Tuesday,2|Wednesday,3|Thursday,4|Friday,5|Saturday,6');
/*
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
*/
var DayInfo = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DayInfo, _super);
function DayInfo() {
var _this = _super.call(this) || this;
_this.b = 0;
_this.c = 0;
_this.d = 0;
_this.a = 0;
return _this;
}
DayInfo.$t = markType(DayInfo, 'DayInfo');
return DayInfo;
}(Base));
/*
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
*/
var RippleVisualModelExport = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(RippleVisualModelExport, _super);
function RippleVisualModelExport() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.a = null;
_this.b = null;
_this.f = 0;
_this.d = false;
_this.c = false;
_this.e = false;
return _this;
}
RippleVisualModelExport.prototype.g = function () {
var 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 = markType(RippleVisualModelExport, 'RippleVisualModelExport');
return RippleVisualModelExport;
}(Base));
/*
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
*/
var RippleView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(RippleView, _super);
function RippleView() {
var _this = _super.call(this) || this;
_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;
return _this;
}
RippleView.prototype.w = function () {
};
RippleView.prototype.e = function () {
return true;
};
RippleView.prototype.t = function (a) {
var e_1, _a;
if (a == null) {
try {
for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
b();
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
this.f.clear();
}
this.g = a;
this.b.ai();
};
RippleView.prototype.v = function () {
var e_2, _a;
if (this.b.q == null) {
this.l = null;
try {
for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
var a = _c.value;
a();
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_2)
throw e_2.error;
}
}
this.f.clear();
}
else {
var b = this.b.q;
var 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)));
}
};
RippleView.prototype.r = function (a) {
this.b.ag();
};
RippleView.prototype.q = function (a) {
this.b.af();
};
RippleView.prototype.p = function (a) {
if (this.l == null) {
return;
}
var b = this.g.rootWrapper.getOffset();
var c = a.pageX - b.left;
var d = a.pageY - b.top;
this.b.al(c, d, this.g.rootWrapper.outerWidth(), this.g.rootWrapper.outerHeight());
};
RippleView.prototype.aa = function () {
if (this.b.j) {
this.g.rootWrapper.setStyleProperty("background-color", this.b.as._fill);
}
};
RippleView.prototype.x = function () {
this.g.rootWrapper.setStyleProperty("background-color", "transparent");
};
RippleView.prototype.z = function () {
this.g.rootWrapper.setStyleProperty("background-color", this.b.as._fill);
};
RippleView.prototype.m = function (a, b, c) {
var 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, ((function () {
var $ret = new ScaleTransform();
$ret.l = 0.3;
$ret.m = 0.3;
return $ret;
})()));
this.g.append(d);
return d;
};
RippleView.prototype.y = function (a) {
var b = a;
b.remove();
};
RippleView.prototype.n = function () {
if (KeyFrameAnimationFactory.h == null) {
KeyFrameAnimationFactory.h = this.g;
}
};
RippleView.prototype.a = function (a, b) {
return new AnimationKeyFrameEffect(0, a, 0, null, b);
};
RippleView.prototype.o = function (a) {
};
RippleView.prototype.s = function () {
this.d = true;
this.v();
};
RippleView.prototype.u = function () {
var e_3, _a;
this.d = false;
try {
for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
var a = _c.value;
a();
}
}
catch (e_3_1) {
e_3 = { error: e_3_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_3)
throw e_3.error;
}
}
this.f.clear();
};
RippleView.$t = markType(RippleView, 'RippleView');
return RippleView;
}(Base));
/**
* @hidden
*/
var XRipple = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(XRipple, _super);
function XRipple() {
var _this = _super.call(this) || this;
_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;
var a = new RippleView();
a.b = _this;
_this.c = a;
_this.c.w();
return _this;
}
XRipple.prototype.destroy = function () {
this.provideContainer(null);
};
XRipple.prototype.ah = function (a, b, c) {
if (this.propertyChanged != null) {
this.propertyChanged(this, new PropertyChangedEventArgs(a));
}
this.aj(a, b, c);
};
XRipple.prototype.aj = function (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;
}
};
XRipple.prototype.am = function () {
if (this.i) {
this.c.x();
return;
}
this.c.aa();
};
XRipple.prototype.an = function () {
};
XRipple.prototype.af = function () {
this.j = true;
if (this.i) {
this.c.x();
return;
}
if (this.k) {
this.c.z();
}
};
XRipple.prototype.ag = function () {
this.j = false;
if (this.k || this.i) {
this.c.x();
}
};
Object.defineProperty(XRipple.prototype, "q", {
get: function () {
return this.p;
},
set: function (a) {
var b = this.p;
this.p = a;
if (b != this.p) {
this.ah("EventSource", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XRipple.prototype, "ax", {
get: function () {
return this.ar;
},
set: function (a) {
var b = this.ar;
this.ar = a;
if (b != this.ar) {
this.ah("RippleColor", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XRipple.prototype, "aw", {
get: function () {
return this.aq;
},
set: function (a) {
var b = this.aq;
this.aq = a;
if (b != this.aq) {
this.ah("HoverColor", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XRipple.prototype, "as", {
get: function () {
return this.ao;
},
set: function (a) {
var b = this.ao;
this.ao = a;
if (b != this.ao) {
this.ah("ActualHoverColor", b, a);
}
},
enumerable: false,
configurable: true
});
XRipple.prototype.al = function (a, b, c, d) {
var _this = this;
if (this.i) {
return;
}
var e = Math.max(c, d);
var f = e / 2;
var g = a - f;
var h = b - f;
if (this.h) {
g = 0;
h = 0;
}
var i = this.c.m(g, h, f);
var j = this.d(i);
this.m.f(j);
var k = this.m.d;
j.play();
j.finished.f(function (l) {
j.commitStyles();
_this.m.h(k);
_this.c.y(i);
});
};
XRipple.prototype.d = function (a) {
var b = this.a;
var c = KeyFrameAnimationFactory.f.c(this.c.a(a, b).m(new AnimationKeyFrameProperty(1, 0.5), new AnimationKeyFrameProperty(14, ((function () {
var $ret = new ScaleTransform();
$ret.l = 0.3;
$ret.m = 0.3;
return $ret;
})()))).m(new AnimationKeyFrameProperty(1, 0), new AnimationKeyFrameProperty(14, ((function () {
var $ret = new ScaleTransform();
$ret.l = 2;
$ret.m = 2;
return $ret;
})()))));
return c;
};
Object.defineProperty(XRipple.prototype, "at", {
get: function () {
return this.ap;
},
set: function (a) {
var b = this.ap;
this.ap = a;
if (b != this.ap) {
this.ah("ActualRippleColor", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XRipple.prototype, "o", {
get: function () {
return this.n;
},
set: function (a) {
var b = this.n;
this.n = a;
if (b != this.n) {
this.ah("RippleDuration", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XRipple.prototype, "i", {
get: function () {
return this.f;
},
set: function (a) {
var b = this.f;
this.f = a;
if (b != this.f) {
this.ah("IsDisabled", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XRipple.prototype, "h", {
get: function () {
return this.e;
},
set: function (a) {
var b = this.e;
this.e = a;
if (b != this.e) {
this.ah("IsCentered", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XRipple.prototype, "k", {
get: function () {
return this.g;
},
set: function (a) {
var b = this.g;
this.g = a;
if (b != this.g) {
this.ah("IsHoverEnabled", b, a);
}
},
enumerable: false,
configurable: true
});
XRipple.prototype.ai = function () {
this.c.v();
};
Object.defineProperty(XRipple.prototype, "a", {
get: function () {
var a = new AnimationKeyFrameEffectTiming();
a.g = this.o;
a.b = 0;
return a;
},
enumerable: false,
configurable: true
});
XRipple.prototype.onDetachedFromUI = function () {
this.c.u();
};
XRipple.prototype.onAttachedToUI = function () {
this.c.s();
};
XRipple.prototype.l = function () {
return this.c.e();
};
XRipple.prototype.r = function () {
return this.b();
};
XRipple.prototype.v = function () {
var a = this.b();
return a.g();
};
XRipple.prototype.b = function () {
var 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;
};
XRipple.prototype.provideContainer = function (a) {
this.c.t(a);
};
XRipple.$t = markType(XRipple, 'XRipple', Base.$, [INotifyPropertyChanged_$type]);
XRipple.au = BrushUtil.j(40, 0, 0, 0);
XRipple.av = BrushUtil.j(189, 0, 0, 0);
return XRipple;
}(Base));
/*
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.
*/
/*
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
*/
var ElevationHelper = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ElevationHelper, _super);
function ElevationHelper() {
return _super !== null && _super.apply(this, arguments) || this;
}
ElevationHelper.g = function (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;
};
ElevationHelper.f = function (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;
};
ElevationHelper.d = function (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;
};
ElevationHelper.e = function (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 = markType(ElevationHelper, 'ElevationHelper');
ElevationHelper.c = null;
ElevationHelper.b = null;
ElevationHelper.a = null;
return ElevationHelper;
}(Base));
/*
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
*/
var 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.
*/
/**
* @hidden
*/
var Theme = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(Theme, _super);
function Theme(a) {
var _rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
_rest[_i - 1] = arguments[_i];
}
var _this = _super.call(this) || this;
_this.b = null;
_this.a = null;
a = (a == void 0) ? 0 : a;
switch (a) {
case 0:
{
var c = _rest[0];
_this.b = c;
}
break;
case 1:
{
var c = _rest[0];
var d = _rest[1];
var e = [c];
{
var g = e[0];
_this.b = g;
}
_this.a = d;
}
break;
}
return _this;
}
Object.defineProperty(Theme.prototype, "c", {
get: function () {
return this.a;
},
enumerable: false,
configurable: true
});
Theme.prototype.item = function (a) {
return this.b.item(a);
};
Theme.$t = markType(Theme, 'Theme');
return Theme;
}(Base));
/*
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
*/
var ThemeResolver = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ThemeResolver, _super);
function ThemeResolver(a) {
var _rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
_rest[_i - 1] = arguments[_i];
}
var _this = _super.call(this) || this;
_this.b = 0;
_this.h = null;
a = (a == void 0) ? 0 : a;
switch (a) {
case 0: break;
case 1:
{
var c = _rest[0];
var d = _rest[1];
_this.h = c;
_this.b = d;
}
break;
}
return _this;
}
ThemeResolver.ah = function (a, b, c) {
if (a == 1) {
return c;
}
return b;
};
ThemeResolver.r = function (a, b, c) {
if (a == 1) {
return c;
}
return b;
};
ThemeResolver.m = function (a, b, c) {
if (a == 1) {
return c;
}
return b;
};
ThemeResolver.ac = function (a, b, c) {
if (a == 1) {
return c;
}
return b;
};
ThemeResolver.am = function (a, b, c) {
if (a == 1) {
return c;
}
return b;
};
ThemeResolver.g = function (a, b, c) {
if (a == 1) {
return c;
}
return b;
};
ThemeResolver.a = function (a) {
return new Theme(0, a);
};
ThemeResolver.ag = function (a, b, c) {
return b.ae(a, c);
};
ThemeResolver.af = function (a, b, c, d) {
return b.ad(a, c, d);
};
ThemeResolver.q = function (a, b, c) {
return b.o(a, c);
};
ThemeResolver.p = function (a, b, c, d) {
return b.n(a, c, d);
};
ThemeResolver.l = function (a, b, c) {
return b.j(a, c);
};
ThemeResolver.k = function (a, b, c, d) {
return b.i(a, c, d);
};
ThemeResolver.x = function (a, b, c) {
return b.v(a, c);
};
ThemeResolver.w = function (a, b, c, d) {
return b.u(a, c, d);
};
ThemeResolver.f = function (a, b, c) {
return b.d(a, c);
};
ThemeResolver.e = function (a, b, c, d) {
return b.c(a, c, d);
};
ThemeResolver.ab = function (a, b, c) {
return b.z(a, c);
};
ThemeResolver.aa = function (a, b, c, d) {
return b.y(a, c, d);
};
ThemeResolver.al = function (a, b, c) {
return b.aj(a, c);
};
ThemeResolver.ak = function (a, b, c, d) {
return b.ai(a, c, d);
};
ThemeResolver.prototype.t = function (a, b) {
if (this.h.containsKey(a)) {
return this.h.item(a).item(b);
}
else {
return this.h.item(this.b).item(b);
}
};
ThemeResolver.prototype.s = function (a, b, c) {
if (this.h.containsKey(a)) {
var d = this.h.item(a).c;
return d.item(b).item(c);
}
else {
var e = this.h.item(this.b).c;
return e.item(b).item(c);
}
};
ThemeResolver.prototype.ae = function (a, b) {
return this.t(a, b);
};
ThemeResolver.prototype.ad = function (a, b, c) {
return this.s(a, b, c);
};
ThemeResolver.prototype.o = function (a, b) {
return typeGetValue(this.t(a, b));
};
ThemeResolver.prototype.n = function (a, b, c) {
return typeGetValue(this.s(a, b, c));
};
ThemeResolver.prototype.j = function (a, b) {
return this.t(a, b);
};
ThemeResolver.prototype.i = function (a, b, c) {
return this.s(a, b, c);
};
ThemeResolver.prototype.v = function (a, b) {
return this.t(a, b);
};
ThemeResolver.prototype.u = function (a, b, c) {
return this.s(a, b, c);
};
ThemeResolver.prototype.d = function (a, b) {
return EnumUtil.getEnumValue(ElevationMode_$type, this.t(a, b));
};
ThemeResolver.prototype.c = function (a, b, c) {
return EnumUtil.getEnumValue(ElevationMode_$type, this.s(a, b, c));
};
ThemeResolver.prototype.z = function (a, b) {
return this.t(a, b);
};
ThemeResolver.prototype.y = function (a, b, c) {
return this.s(a, b, c);
};
ThemeResolver.prototype.aj = function (a, b) {
return this.t(a, b);
};
ThemeResolver.prototype.ai = function (a, b, c) {
return this.s(a, b, c);
};
ThemeResolver.$t = markType(ThemeResolver, 'ThemeResolver');
return ThemeResolver;
}(Base));
/*
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
*/
var ButtonClickEventArgs = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ButtonClickEventArgs, _super);
function ButtonClickEventArgs() {
return _super !== null && _super.apply(this, arguments) || this;
}
ButtonClickEventArgs.$t = markType(ButtonClickEventArgs, 'ButtonClickEventArgs', EventArgs.$);
return ButtonClickEventArgs;
}(EventArgs));
/*
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
*/
var ButtonVisualModelExport = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ButtonVisualModelExport, _super);
function ButtonVisualModelExport() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_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;
return _this;
}
ButtonVisualModelExport.prototype.serialize = function () {
var 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 = markType(ButtonVisualModelExport, 'ButtonVisualModelExport', Base.$, [IVisualData_$type]);
return ButtonVisualModelExport;
}(Base));
/*
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
*/
var ButtonView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ButtonView, _super);
function ButtonView() {
var _this = _super.call(this) || this;
_this.b = null;
_this.k = null;
_this.d = null;
_this.h = new List$1(Delegate_$type, 0);
_this.e = true;
_this.n = null;
_this.j = NaN;
_this.i = NaN;
_this.l = null;
_this.c = null;
_this.m = null;
_this.p = null;
_this.o = null;
return _this;
}
ButtonView.prototype.aq = function () {
};
ButtonView.prototype.g = function () {
return true;
};
Object.defineProperty(ButtonView.prototype, "q", {
get: function () {
return this.n;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ButtonView.prototype, "s", {
get: function () {
return this.m;
},
enumerable: false,
configurable: true
});
ButtonView.prototype.ak = function (a) {
var e_1, _a;
var _this = this;
if (a == null) {
try {
for (var _b = __values(fromEnum(this.h)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
b();
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
this.h.clear();
return;
}
this.k = a;
this.k.rootWrapper.setStyleProperty("display", "flex");
this.k.rootWrapper.setStyleProperty("flex-direction", "row");
this.k.rootWrapper.setStyleProperty("flex-wrap", "no-wrap");
this.k.rootWrapper.setStyleProperty("align-items", "center");
var c = this.k.createElement("button");
this.n = c;
this.n.setStyleProperty("position", "relative");
this.n.setStyleProperty("display", "inline-flex");
this.n.setStyleProperty("align-items", "center");
this.n.setStyleProperty("justify-content", "center");
this.a0();
this.n.setStyleProperty("border", "none");
this.n.setStyleProperty("cursor", "pointer");
this.n.setStyleProperty("user-select", "none");
this.n.setStyleProperty("outline-style", "none");
this.n.setStyleProperty("-webkit-tap-highlight-color", "transparent");
this.n.setStyleProperty("overflow", "hidden");
this.n.setStyleProperty("white-space", "no-wrap");
this.n.setStyleProperty("color", "#000");
this.n.setStyleProperty("background", this.b.no._fill);
NativeUI.o(this.n, this.b.kz);
this.n.setAttribute("id", this.b.hy);
this.ax();
this.h.add(c.listen("change", runOn(this, this.z)));
this.h.add(c.listen("click", runOn(this, this.aa)));
this.h.add(c.listen("focus", runOn(this, this.ab)));
this.h.add(c.listen("blur", runOn(this, this.y)));
this.h.add(this.k.rootWrapper.listen("mouseenter", runOn(this, this.v)));
this.h.add(this.k.rootWrapper.listen("mouseleave", runOn(this, this.w)));
this.h.add(this.k.rootWrapper.listen("mousedown", runOn(this, this.u)));
this.h.add(this.k.rootWrapper.listen("mouseup", runOn(this, this.x)));
this.h.add(this.k.rootWrapper.listen("focusin", runOn(this, this.ac)));
this.h.add(this.k.rootWrapper.listen("focusout", runOn(this, this.ad)));
this.k.append(c);
var d = this.k.createElement("div");
var e = this.k.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");
var f = new XRipple();
f.provideContainer(e);
f.q = c;
var g = this.k.getExternal(f, this.k.rootWrapper, this.k.getExternal(this.b, null, null));
f.h = false;
f.k = true;
this.c = f;
this.n.append(d);
var h = this.k.createElement("div");
h.addClass("ig-button-content");
h.setStyleProperty("font-family", "Verdana");
h.setStyleProperty("font-weight", "400");
h.setStyleProperty("font-size", ".875rem");
this.m = h;
this.h.add(h.listen("click", runOn(this, this.t)));
this.n.append(h);
this.o = h;
this.k.getPortal(h, "ChildContent", function (i) {
var comp_ = i.componentRef;
_this.p = comp_;
{
_this.o.setStyleProperty("flex-direction", _this.b.g4);
_this.o.setStyleProperty("align-items", _this.b.fb);
var direction_ = _this.b.g4;
var display_ = _this.b.fj != null ? _this.b.fj : _this.b.f0;
var alignItems_ = _this.b.fb;
comp_.display = display_;
comp_.flexDirection = direction_;
comp_.alignItems = alignItems_;
}
}, true);
this.b.kl();
};
ButtonView.prototype.am = function () {
this.c.i = this.b.as;
};
ButtonView.prototype.a0 = function () {
var a = "2.25rem";
var b = "2.25rem";
var c = "2.25rem";
var d = "2.25rem";
var e = "3.5rem";
var f = "3.5rem";
var g = "3.5rem";
var h = "3.5rem";
var i = "5.5rem";
var j = "2.25rem";
var k = "0px";
var l = ".9375rem";
var m = ".5625rem 1rem";
switch (this.b.q) {
case 2:
m = ".375rem .75rem";
j = "1.875rem";
e = "3rem";
f = "3rem";
g = "3rem";
h = "3rem";
l = ".6875rem";
break;
case 3:
m = ".1875rem 1rem";
j = "1.5rem";
f = "2.5rem";
e = "2.5rem";
h = "2.5rem";
g = "2.5rem";
l = ".4375rem";
break;
case 4:
m = "0.09375rem 0.5rem";
j = "0.5rem";
f = "1.5rem";
e = "1.5rem";
h = "1.5rem";
g = "1.5rem";
l = "0.21875rem";
b = "1rem";
a = "1rem";
d = "1rem";
c = "1rem";
break;
}
if (!isNaN_(this.b.bm) && !isNaN_(this.b.bo) && !isNaN_(this.b.bn) && !isNaN_(this.b.bl)) {
m = this.b.bo + "px " + this.b.bn + "px " + this.b.bl + "px " + this.b.bm + "px";
}
if (this.b.e == 4) {
this.n.setStyleProperty("min-width", a);
this.n.setStyleProperty("min-height", b);
this.n.setStyleProperty("padding", k);
this.n.setStyleProperty("width", c);
this.n.setStyleProperty("height", d);
}
else if (this.b.e == 3) {
this.n.setStyleProperty("min-width", e);
this.n.setStyleProperty("min-height", f);
this.n.setStyleProperty("padding", l);
this.n.setStyleProperty("width", g);
this.n.setStyleProperty("height", h);
}
else {
this.n.setStyleProperty("width", "auto");
this.n.setStyleProperty("height", "auto");
this.n.setStyleProperty("min-width", i);
this.n.setStyleProperty("min-height", j);
this.n.setStyleProperty("padding", m);
}
this.k.rootWrapper.setStyleProperty("height", "auto");
if (!isNaN_(this.b.bj) && this.b.bj > 0) {
this.n.setStyleProperty("border-style", "solid");
}
else {
this.n.setStyleProperty("border-style", "none");
}
if (!isNaN_(this.j)) {
this.n.setStyleProperty("min-width", this.j.toString() + "px");
}
if (!isNaN_(this.i)) {
this.n.setStyleProperty("min-height", this.i.toString() + "px");
}
if (this.b.ay) {
this.n.setStyleProperty("width", "100%");
this.n.setStyleProperty("height", "100%");
this.k.rootWrapper.setStyleProperty("height", "100%");
}
};
ButtonView.prototype.au = function () {
switch (this.b.le) {
case 1:
this.n.setStyleProperty("justify-content", "center");
this.o.setStyleProperty("flex-grow", "unset");
break;
case 3:
this.n.setStyleProperty("justify-content", "stretch");
this.o.setStyleProperty("flex-grow", "1");
break;
case 0:
this.n.setStyleProperty("justify-content", "left");
this.o.setStyleProperty("flex-grow", "unset");
break;
case 2:
this.n.setStyleProperty("justify-content", "right");
this.o.setStyleProperty("flex-grow", "unset");
break;
}
};
ButtonView.prototype.aw = function (a) {
this.j = a;
};
ButtonView.prototype.av = function (a) {
this.i = a;
};
ButtonView.prototype.as = function () {
this.n.setAttribute("disabled", this.b.disabled ? "true" : "false");
this.n.setProperty("disabled", this.b.disabled);
};
ButtonView.prototype.an = function () {
if (this.k != null) {
this.k.rootWrapper.setStyleProperty("display", this.b.f0);
var comp_ = this.p;
if (this.p != null) {
this.o.setStyleProperty("display", this.b.f0);
var display_ = this.b.fj != null ? this.b.f0 : this.b.fj;
comp_.display = display_;
}
var ext_ = this.k.getExternal(this.b, null, null);
if (ext_ && ext_._onDisplayChanged) {
ext_._onDisplayChanged();
}
;
}
};
ButtonView.prototype.aj = function () {
if (this.k != null) {
var comp_ = this.p;
if (this.p != null) {
var display_ = this.b.fj != null ? this.b.fj : this.b.f0;
comp_.display = display_;
}
}
};
ButtonView.prototype.ah = function () {
if (this.k != null) {
this.k.rootWrapper.setStyleProperty("align-items", this.b.fb);
this.n.setStyleProperty("align-items", this.b.fb);
var comp_ = this.p;
if (this.p != null) {
this.o.setStyleProperty("align-items", this.b.fb);
var alignItems_ = this.b.fb;
comp_.alignItems = alignItems_;
}
var ext_ = this.k.getExternal