@sme.up/ketchup 5.2.0-SNAPSHOT → 5.2.1-SNAPSHOT
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cell-utils-5b16c180.js → cell-utils-d96b2993.js} +2 -2
- package/dist/cjs/{f-button-3b9f32af.js → f-button-2b9b99b1.js} +2 -2
- package/dist/cjs/{f-cell-c6ad973a.js → f-cell-8351cb84.js} +8 -96
- package/dist/cjs/{f-chip-bed86c4a.js → f-chip-df59e1b0.js} +3 -3
- package/dist/cjs/{f-image-08a3d340.js → f-image-12bab3b5.js} +2 -2
- package/dist/cjs/f-text-field-e7c35b5b.js +94 -0
- package/dist/cjs/f-text-field-mdc-a67f5dfe.js +2852 -0
- package/dist/cjs/{index-8d7bb3be.js → index-eb556444.js} +2 -0
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +365 -3041
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +8 -7
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +3 -3
- package/dist/cjs/kup-drawer.cjs.entry.js +3 -3
- package/dist/cjs/kup-echart.cjs.entry.js +4 -4
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-4227f0a2.js → kup-manager-5c03da64.js} +373 -160
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
- package/dist/cjs/kup-photo-frame.cjs.entry.js +3 -3
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-b9df398c.js → utils-e99921c1.js} +1 -1
- package/dist/collection/assets/index.js +8 -0
- package/dist/collection/assets/kuptooltip.js +608 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -0
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
- package/dist/collection/components/kup-card/kup-card.css +35 -0
- package/dist/collection/components/kup-card/kup-card.js +1 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +34 -5
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.css +50 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +895 -0
- package/dist/collection/managers/kup-debug/kup-debug.js +1 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +12 -1
- package/dist/collection/managers/kup-math/kup-math.js +11 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +191 -0
- package/dist/collection/types/GenericTypes.js +1 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/esm/{cell-utils-69f75e2e.js → cell-utils-f4bdbbc8.js} +2 -2
- package/dist/esm/{f-button-7e7607d8.js → f-button-54a49fd8.js} +2 -2
- package/dist/esm/{f-cell-e4d83c27.js → f-cell-d5dac50b.js} +8 -95
- package/dist/esm/{f-chip-51dfefaf.js → f-chip-a3035b4b.js} +3 -3
- package/dist/esm/{f-image-de331954.js → f-image-d32465e3.js} +2 -2
- package/dist/esm/f-text-field-c25cc63f.js +92 -0
- package/dist/esm/f-text-field-mdc-9fbbefc3.js +2850 -0
- package/dist/esm/{index-aeec9835.js → index-baeab1ac.js} +2 -1
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +349 -3025
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +8 -7
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +3 -3
- package/dist/esm/kup-drawer.entry.js +3 -3
- package/dist/esm/kup-echart.entry.js +4 -4
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-0ab94726.js → kup-manager-9316a184.js} +373 -160
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +419 -0
- package/dist/esm/kup-photo-frame.entry.js +3 -3
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-35c7a90d.js → utils-f24319a0.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-3813281b.entry.js → p-09d708c4.entry.js} +1 -1
- package/dist/ketchup/{p-4081f5f7.entry.js → p-11e72a8c.entry.js} +1 -1
- package/dist/ketchup/p-12773ca8.js +9 -0
- package/dist/ketchup/{p-0751aaf6.entry.js → p-203d6295.entry.js} +1 -1
- package/dist/ketchup/{p-33073f4a.js → p-34748c91.js} +1 -1
- package/dist/ketchup/{p-8be1337b.js → p-34b74425.js} +1 -1
- package/dist/ketchup/{p-10c8d755.js → p-40f97429.js} +1 -1
- package/dist/ketchup/{p-3aab1f0d.entry.js → p-4173422f.entry.js} +1 -1
- package/dist/ketchup/{p-8f735633.entry.js → p-41741c28.entry.js} +1 -1
- package/dist/ketchup/{p-b5e1dbfa.entry.js → p-44192f30.entry.js} +1 -1
- package/dist/ketchup/{p-c314b1e6.js → p-44f8da2a.js} +1 -1
- package/dist/ketchup/p-4f56932b.js +1 -0
- package/dist/ketchup/p-669bde31.js +1 -0
- package/dist/ketchup/p-67842f1e.entry.js +1 -0
- package/dist/ketchup/{p-5d190cf5.js → p-7a74ad17.js} +1 -1
- package/dist/ketchup/{p-96101f09.entry.js → p-7ba8fa4a.entry.js} +1 -1
- package/dist/ketchup/p-7de0d7e1.js +1 -0
- package/dist/ketchup/{p-f9c41e20.entry.js → p-8418e8fa.entry.js} +1 -1
- package/dist/ketchup/p-96bf19aa.entry.js +1 -0
- package/dist/ketchup/{p-9bcda66f.entry.js → p-9a61d8dc.entry.js} +1 -1
- package/dist/ketchup/p-b0ddcce9.entry.js +9 -0
- package/dist/ketchup/{p-24df4f29.entry.js → p-b6c21223.entry.js} +1 -1
- package/dist/ketchup/{p-68fc1428.entry.js → p-bb8844bf.entry.js} +1 -1
- package/dist/ketchup/{p-67c64257.entry.js → p-c58a2a81.entry.js} +1 -1
- package/dist/ketchup/{p-3445be1e.entry.js → p-ca3d585b.entry.js} +1 -1
- package/dist/ketchup/{p-fea316ab.entry.js → p-e6709c26.entry.js} +1 -1
- package/dist/ketchup/{p-d7af8156.entry.js → p-e8e3c9da.entry.js} +1 -1
- package/dist/ketchup/p-ecb7069b.js +135 -0
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -0
- package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +26 -1
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +2 -0
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +4 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -0
- package/dist/types/components.d.ts +144 -1
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +10 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +2 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +2 -1
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +40 -0
- package/dist/types/types/GenericTypes.d.ts +1 -0
- package/package.json +3 -3
- package/CHANGELOG.md +0 -5
- package/dist/ketchup/p-2d4f19f4.js +0 -1
- package/dist/ketchup/p-47b57d97.js +0 -1
- package/dist/ketchup/p-5186885c.entry.js +0 -1
- package/dist/ketchup/p-78223dc0.entry.js +0 -143
- package/dist/ketchup/p-ee33cbe9.js +0 -9
|
@@ -1,2861 +1,17 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement$1, a as getAssetPath } from './index-
|
|
2
|
-
import { k as kupManagerInstance, K as KupDynamicPositionPlacement, a as KupThemeIconValues, b as KupThemeColorValues, c as KupTagNames, d as KupDatesFormats, e as KupDatesNormalize, f as KupObjects, S as SortMode, T as TotalMode, g as KupLanguagePage, h as KupLanguageRow, i as KupLanguageGeneric, j as KupDebugCategory, l as KupPointerEventTypes, m as KupDragEffect, n as kupDraggableCellAttr, o as KupDropEventTypes, p as KupLanguageSearch, q as KupCardBuiltInClockElements, r as KupCardCSSClasses, s as KupLanguageTotals, t as KupLanguageColumn, u as KupDataNewColumnTypes, v as KupCardSubEvents, w as KupCardIds, x as KupCardFamily, y as KupCardProps, z as KupDates, G as GroupLabelDisplayMode, A as SelectionMode, B as KupLanguageGrouping, C as KupLanguageCheckbox, L as LoadMoreMode, P as PaginatorPos, D as ShowGrid, E as TotalLabel, F as kupDraggableColumnAttr, H as kupDragActiveAttr, I as iconColumn, J as keyColumn, M as fieldColumn, N as FixedCellsCSSVarsBase, O as KupLanguageFontsize, Q as KupLanguageDensity, R as KupLanguageGrid, U as kupDynamicPositionAttribute, V as KupDataTableProps, W as FixedCellsClasses } from './kup-manager-
|
|
3
|
-
import { F as FTextField
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { g as getProps, s as setProps, i as isValidFormattedStringTime, f as formattedStringToCustomUnformattedStringTime, a as formattedStringToDefaultUnformattedStringTimestamp, b as isValidFormattedStringNumber, c as formattedStringToUnformattedStringNumber, u as unformattedStringNumberToNumber, d as stringToNumber, e as isNumber, h as identify, j as getMonthsAsStringByLocale, D as DateTimeFormatOptionsMonth, n as numberToFormattedStringNumber, k as unformattedStringToFormattedStringNumber, l as formatTime, m as unformattedStringToFormattedStringTime } from './utils-35c7a90d.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement$1, a as getAssetPath } from './index-baeab1ac.js';
|
|
2
|
+
import { k as kupManagerInstance, K as KupDynamicPositionPlacement, a as KupThemeIconValues, b as KupThemeColorValues, c as KupTagNames, d as KupDatesFormats, e as KupDatesNormalize, f as KupObjects, S as SortMode, T as TotalMode, g as KupLanguagePage, h as KupLanguageRow, i as KupLanguageGeneric, j as KupDebugCategory, l as KupPointerEventTypes, m as KupDragEffect, n as kupDraggableCellAttr, o as KupDropEventTypes, p as KupLanguageSearch, q as KupCardBuiltInClockElements, r as KupCardCSSClasses, s as KupLanguageTotals, t as KupLanguageColumn, u as KupDataNewColumnTypes, v as KupCardSubEvents, w as KupCardIds, x as KupCardFamily, y as KupCardProps, z as KupDates, G as GroupLabelDisplayMode, A as SelectionMode, B as KupLanguageGrouping, C as KupLanguageCheckbox, L as LoadMoreMode, P as PaginatorPos, D as ShowGrid, E as TotalLabel, F as kupDraggableColumnAttr, H as kupDragActiveAttr, I as iconColumn, J as keyColumn, M as fieldColumn, N as FixedCellsCSSVarsBase, O as KupLanguageFontsize, Q as KupLanguageDensity, R as KupLanguageGrid, U as kupDynamicPositionAttribute, V as KupDataTableProps, W as FixedCellsClasses } from './kup-manager-9316a184.js';
|
|
3
|
+
import { F as FTextField } from './f-text-field-c25cc63f.js';
|
|
4
|
+
import { F as FTextFieldMDC } from './f-text-field-mdc-9fbbefc3.js';
|
|
5
|
+
import { g as getProps, s as setProps, i as isValidFormattedStringTime, f as formattedStringToCustomUnformattedStringTime, a as formattedStringToDefaultUnformattedStringTimestamp, b as isValidFormattedStringNumber, c as formattedStringToUnformattedStringNumber, u as unformattedStringNumberToNumber, d as stringToNumber, e as isNumber, h as identify, j as getMonthsAsStringByLocale, D as DateTimeFormatOptionsMonth, n as numberToFormattedStringNumber, k as unformattedStringToFormattedStringNumber, l as formatTime, m as unformattedStringToFormattedStringTime } from './utils-f24319a0.js';
|
|
7
6
|
import { c as componentWrapperId } from './GenericVariables-665de00a.js';
|
|
8
|
-
import { F as FImage } from './f-image-
|
|
9
|
-
import { g as getValueForDisplay, a as getValueForDisplay2, b as getCellValueForDisplay, c as getColumnByName, d as compareValues, e as compareCell, f as formatToNumber } from './cell-utils-
|
|
10
|
-
import { F as FChip, a as FChipType } from './f-chip-
|
|
11
|
-
import { F as
|
|
7
|
+
import { F as FImage } from './f-image-d32465e3.js';
|
|
8
|
+
import { g as getValueForDisplay, a as getValueForDisplay2, b as getCellValueForDisplay, c as getColumnByName, d as compareValues, e as compareCell, f as formatToNumber } from './cell-utils-f4bdbbc8.js';
|
|
9
|
+
import { F as FChip, a as FChipType } from './f-chip-a3035b4b.js';
|
|
10
|
+
import { F as FCell, a as FCheckbox, b as FCellPadding } from './f-cell-d5dac50b.js';
|
|
11
|
+
import { F as FButton } from './f-button-54a49fd8.js';
|
|
12
12
|
import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @license
|
|
16
|
-
* Copyright 2016 Google Inc.
|
|
17
|
-
*
|
|
18
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
19
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
20
|
-
* in the Software without restriction, including without limitation the rights
|
|
21
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
22
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
23
|
-
* furnished to do so, subject to the following conditions:
|
|
24
|
-
*
|
|
25
|
-
* The above copyright notice and this permission notice shall be included in
|
|
26
|
-
* all copies or substantial portions of the Software.
|
|
27
|
-
*
|
|
28
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
29
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
30
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
31
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
32
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
33
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
34
|
-
* THE SOFTWARE.
|
|
35
|
-
*/
|
|
36
|
-
var MDCFoundation = /** @class */ (function () {
|
|
37
|
-
function MDCFoundation(adapter) {
|
|
38
|
-
if (adapter === void 0) { adapter = {}; }
|
|
39
|
-
this.adapter = adapter;
|
|
40
|
-
}
|
|
41
|
-
Object.defineProperty(MDCFoundation, "cssClasses", {
|
|
42
|
-
get: function () {
|
|
43
|
-
// Classes extending MDCFoundation should implement this method to return an object which exports every
|
|
44
|
-
// CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'}
|
|
45
|
-
return {};
|
|
46
|
-
},
|
|
47
|
-
enumerable: false,
|
|
48
|
-
configurable: true
|
|
49
|
-
});
|
|
50
|
-
Object.defineProperty(MDCFoundation, "strings", {
|
|
51
|
-
get: function () {
|
|
52
|
-
// Classes extending MDCFoundation should implement this method to return an object which exports all
|
|
53
|
-
// semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'}
|
|
54
|
-
return {};
|
|
55
|
-
},
|
|
56
|
-
enumerable: false,
|
|
57
|
-
configurable: true
|
|
58
|
-
});
|
|
59
|
-
Object.defineProperty(MDCFoundation, "numbers", {
|
|
60
|
-
get: function () {
|
|
61
|
-
// Classes extending MDCFoundation should implement this method to return an object which exports all
|
|
62
|
-
// of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350}
|
|
63
|
-
return {};
|
|
64
|
-
},
|
|
65
|
-
enumerable: false,
|
|
66
|
-
configurable: true
|
|
67
|
-
});
|
|
68
|
-
Object.defineProperty(MDCFoundation, "defaultAdapter", {
|
|
69
|
-
get: function () {
|
|
70
|
-
// Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient
|
|
71
|
-
// way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter
|
|
72
|
-
// validation.
|
|
73
|
-
return {};
|
|
74
|
-
},
|
|
75
|
-
enumerable: false,
|
|
76
|
-
configurable: true
|
|
77
|
-
});
|
|
78
|
-
MDCFoundation.prototype.init = function () {
|
|
79
|
-
// Subclasses should override this method to perform initialization routines (registering events, etc.)
|
|
80
|
-
};
|
|
81
|
-
MDCFoundation.prototype.destroy = function () {
|
|
82
|
-
// Subclasses should override this method to perform de-initialization routines (de-registering events, etc.)
|
|
83
|
-
};
|
|
84
|
-
return MDCFoundation;
|
|
85
|
-
}());
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @license
|
|
89
|
-
* Copyright 2016 Google Inc.
|
|
90
|
-
*
|
|
91
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
92
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
93
|
-
* in the Software without restriction, including without limitation the rights
|
|
94
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
95
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
96
|
-
* furnished to do so, subject to the following conditions:
|
|
97
|
-
*
|
|
98
|
-
* The above copyright notice and this permission notice shall be included in
|
|
99
|
-
* all copies or substantial portions of the Software.
|
|
100
|
-
*
|
|
101
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
102
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
103
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
104
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
105
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
106
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
107
|
-
* THE SOFTWARE.
|
|
108
|
-
*/
|
|
109
|
-
var MDCComponent = /** @class */ (function () {
|
|
110
|
-
function MDCComponent(root, foundation) {
|
|
111
|
-
var args = [];
|
|
112
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
113
|
-
args[_i - 2] = arguments[_i];
|
|
114
|
-
}
|
|
115
|
-
this.root = root;
|
|
116
|
-
this.initialize.apply(this, __spreadArray([], __read(args)));
|
|
117
|
-
// Note that we initialize foundation here and not within the constructor's
|
|
118
|
-
// default param so that this.root is defined and can be used within the
|
|
119
|
-
// foundation class.
|
|
120
|
-
this.foundation =
|
|
121
|
-
foundation === undefined ? this.getDefaultFoundation() : foundation;
|
|
122
|
-
this.foundation.init();
|
|
123
|
-
this.initialSyncWithDOM();
|
|
124
|
-
}
|
|
125
|
-
MDCComponent.attachTo = function (root) {
|
|
126
|
-
// Subclasses which extend MDCBase should provide an attachTo() method that takes a root element and
|
|
127
|
-
// returns an instantiated component with its root set to that element. Also note that in the cases of
|
|
128
|
-
// subclasses, an explicit foundation class will not have to be passed in; it will simply be initialized
|
|
129
|
-
// from getDefaultFoundation().
|
|
130
|
-
return new MDCComponent(root, new MDCFoundation({}));
|
|
131
|
-
};
|
|
132
|
-
/* istanbul ignore next: method param only exists for typing purposes; it does not need to be unit tested */
|
|
133
|
-
MDCComponent.prototype.initialize = function () {
|
|
134
|
-
var _args = [];
|
|
135
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
136
|
-
_args[_i] = arguments[_i];
|
|
137
|
-
}
|
|
138
|
-
// Subclasses can override this to do any additional setup work that would be considered part of a
|
|
139
|
-
// "constructor". Essentially, it is a hook into the parent constructor before the foundation is
|
|
140
|
-
// initialized. Any additional arguments besides root and foundation will be passed in here.
|
|
141
|
-
};
|
|
142
|
-
MDCComponent.prototype.getDefaultFoundation = function () {
|
|
143
|
-
// Subclasses must override this method to return a properly configured foundation class for the
|
|
144
|
-
// component.
|
|
145
|
-
throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' +
|
|
146
|
-
'foundation class');
|
|
147
|
-
};
|
|
148
|
-
MDCComponent.prototype.initialSyncWithDOM = function () {
|
|
149
|
-
// Subclasses should override this method if they need to perform work to synchronize with a host DOM
|
|
150
|
-
// object. An example of this would be a form control wrapper that needs to synchronize its internal state
|
|
151
|
-
// to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM
|
|
152
|
-
// reads/writes that would cause layout / paint, as this is called synchronously from within the constructor.
|
|
153
|
-
};
|
|
154
|
-
MDCComponent.prototype.destroy = function () {
|
|
155
|
-
// Subclasses may implement this method to release any resources / deregister any listeners they have
|
|
156
|
-
// attached. An example of this might be deregistering a resize event from the window object.
|
|
157
|
-
this.foundation.destroy();
|
|
158
|
-
};
|
|
159
|
-
MDCComponent.prototype.listen = function (evtType, handler, options) {
|
|
160
|
-
this.root.addEventListener(evtType, handler, options);
|
|
161
|
-
};
|
|
162
|
-
MDCComponent.prototype.unlisten = function (evtType, handler, options) {
|
|
163
|
-
this.root.removeEventListener(evtType, handler, options);
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* Fires a cross-browser-compatible custom event from the component root of the given type, with the given data.
|
|
167
|
-
*/
|
|
168
|
-
MDCComponent.prototype.emit = function (evtType, evtData, shouldBubble) {
|
|
169
|
-
if (shouldBubble === void 0) { shouldBubble = false; }
|
|
170
|
-
var evt;
|
|
171
|
-
if (typeof CustomEvent === 'function') {
|
|
172
|
-
evt = new CustomEvent(evtType, {
|
|
173
|
-
bubbles: shouldBubble,
|
|
174
|
-
detail: evtData,
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
evt = document.createEvent('CustomEvent');
|
|
179
|
-
evt.initCustomEvent(evtType, shouldBubble, false, evtData);
|
|
180
|
-
}
|
|
181
|
-
this.root.dispatchEvent(evt);
|
|
182
|
-
};
|
|
183
|
-
return MDCComponent;
|
|
184
|
-
}());
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* @license
|
|
188
|
-
* Copyright 2019 Google Inc.
|
|
189
|
-
*
|
|
190
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
191
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
192
|
-
* in the Software without restriction, including without limitation the rights
|
|
193
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
194
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
195
|
-
* furnished to do so, subject to the following conditions:
|
|
196
|
-
*
|
|
197
|
-
* The above copyright notice and this permission notice shall be included in
|
|
198
|
-
* all copies or substantial portions of the Software.
|
|
199
|
-
*
|
|
200
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
201
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
202
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
203
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
204
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
205
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
206
|
-
* THE SOFTWARE.
|
|
207
|
-
*/
|
|
208
|
-
/**
|
|
209
|
-
* Determine whether the current browser supports passive event listeners, and
|
|
210
|
-
* if so, use them.
|
|
211
|
-
*/
|
|
212
|
-
function applyPassive(globalObj) {
|
|
213
|
-
if (globalObj === void 0) { globalObj = window; }
|
|
214
|
-
return supportsPassiveOption(globalObj) ?
|
|
215
|
-
{ passive: true } :
|
|
216
|
-
false;
|
|
217
|
-
}
|
|
218
|
-
function supportsPassiveOption(globalObj) {
|
|
219
|
-
if (globalObj === void 0) { globalObj = window; }
|
|
220
|
-
// See
|
|
221
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
|
|
222
|
-
var passiveSupported = false;
|
|
223
|
-
try {
|
|
224
|
-
var options = {
|
|
225
|
-
// This function will be called when the browser
|
|
226
|
-
// attempts to access the passive property.
|
|
227
|
-
get passive() {
|
|
228
|
-
passiveSupported = true;
|
|
229
|
-
return false;
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
var handler = function () { };
|
|
233
|
-
globalObj.document.addEventListener('test', handler, options);
|
|
234
|
-
globalObj.document.removeEventListener('test', handler, options);
|
|
235
|
-
}
|
|
236
|
-
catch (err) {
|
|
237
|
-
passiveSupported = false;
|
|
238
|
-
}
|
|
239
|
-
return passiveSupported;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* @license
|
|
244
|
-
* Copyright 2018 Google Inc.
|
|
245
|
-
*
|
|
246
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
247
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
248
|
-
* in the Software without restriction, including without limitation the rights
|
|
249
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
250
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
251
|
-
* furnished to do so, subject to the following conditions:
|
|
252
|
-
*
|
|
253
|
-
* The above copyright notice and this permission notice shall be included in
|
|
254
|
-
* all copies or substantial portions of the Software.
|
|
255
|
-
*
|
|
256
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
257
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
258
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
259
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
260
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
261
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
262
|
-
* THE SOFTWARE.
|
|
263
|
-
*/
|
|
264
|
-
function matches(element, selector) {
|
|
265
|
-
var nativeMatches = element.matches
|
|
266
|
-
|| element.webkitMatchesSelector
|
|
267
|
-
|| element.msMatchesSelector;
|
|
268
|
-
return nativeMatches.call(element, selector);
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Used to compute the estimated scroll width of elements. When an element is
|
|
272
|
-
* hidden due to display: none; being applied to a parent element, the width is
|
|
273
|
-
* returned as 0. However, the element will have a true width once no longer
|
|
274
|
-
* inside a display: none context. This method computes an estimated width when
|
|
275
|
-
* the element is hidden or returns the true width when the element is visble.
|
|
276
|
-
* @param {Element} element the element whose width to estimate
|
|
277
|
-
*/
|
|
278
|
-
function estimateScrollWidth(element) {
|
|
279
|
-
// Check the offsetParent. If the element inherits display: none from any
|
|
280
|
-
// parent, the offsetParent property will be null (see
|
|
281
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent).
|
|
282
|
-
// This check ensures we only clone the node when necessary.
|
|
283
|
-
var htmlEl = element;
|
|
284
|
-
if (htmlEl.offsetParent !== null) {
|
|
285
|
-
return htmlEl.scrollWidth;
|
|
286
|
-
}
|
|
287
|
-
var clone = htmlEl.cloneNode(true);
|
|
288
|
-
clone.style.setProperty('position', 'absolute');
|
|
289
|
-
clone.style.setProperty('transform', 'translate(-9999px, -9999px)');
|
|
290
|
-
document.documentElement.appendChild(clone);
|
|
291
|
-
var scrollWidth = clone.scrollWidth;
|
|
292
|
-
document.documentElement.removeChild(clone);
|
|
293
|
-
return scrollWidth;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* @license
|
|
298
|
-
* Copyright 2016 Google Inc.
|
|
299
|
-
*
|
|
300
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
301
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
302
|
-
* in the Software without restriction, including without limitation the rights
|
|
303
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
304
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
305
|
-
* furnished to do so, subject to the following conditions:
|
|
306
|
-
*
|
|
307
|
-
* The above copyright notice and this permission notice shall be included in
|
|
308
|
-
* all copies or substantial portions of the Software.
|
|
309
|
-
*
|
|
310
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
311
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
312
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
313
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
314
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
315
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
316
|
-
* THE SOFTWARE.
|
|
317
|
-
*/
|
|
318
|
-
var cssClasses$7 = {
|
|
319
|
-
LABEL_FLOAT_ABOVE: 'mdc-floating-label--float-above',
|
|
320
|
-
LABEL_REQUIRED: 'mdc-floating-label--required',
|
|
321
|
-
LABEL_SHAKE: 'mdc-floating-label--shake',
|
|
322
|
-
ROOT: 'mdc-floating-label',
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* @license
|
|
327
|
-
* Copyright 2016 Google Inc.
|
|
328
|
-
*
|
|
329
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
330
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
331
|
-
* in the Software without restriction, including without limitation the rights
|
|
332
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
333
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
334
|
-
* furnished to do so, subject to the following conditions:
|
|
335
|
-
*
|
|
336
|
-
* The above copyright notice and this permission notice shall be included in
|
|
337
|
-
* all copies or substantial portions of the Software.
|
|
338
|
-
*
|
|
339
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
340
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
341
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
342
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
343
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
344
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
345
|
-
* THE SOFTWARE.
|
|
346
|
-
*/
|
|
347
|
-
var MDCFloatingLabelFoundation = /** @class */ (function (_super) {
|
|
348
|
-
__extends(MDCFloatingLabelFoundation, _super);
|
|
349
|
-
function MDCFloatingLabelFoundation(adapter) {
|
|
350
|
-
var _this = _super.call(this, __assign(__assign({}, MDCFloatingLabelFoundation.defaultAdapter), adapter)) || this;
|
|
351
|
-
_this.shakeAnimationEndHandler = function () {
|
|
352
|
-
_this.handleShakeAnimationEnd();
|
|
353
|
-
};
|
|
354
|
-
return _this;
|
|
355
|
-
}
|
|
356
|
-
Object.defineProperty(MDCFloatingLabelFoundation, "cssClasses", {
|
|
357
|
-
get: function () {
|
|
358
|
-
return cssClasses$7;
|
|
359
|
-
},
|
|
360
|
-
enumerable: false,
|
|
361
|
-
configurable: true
|
|
362
|
-
});
|
|
363
|
-
Object.defineProperty(MDCFloatingLabelFoundation, "defaultAdapter", {
|
|
364
|
-
/**
|
|
365
|
-
* See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types.
|
|
366
|
-
*/
|
|
367
|
-
get: function () {
|
|
368
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
369
|
-
return {
|
|
370
|
-
addClass: function () { return undefined; },
|
|
371
|
-
removeClass: function () { return undefined; },
|
|
372
|
-
getWidth: function () { return 0; },
|
|
373
|
-
registerInteractionHandler: function () { return undefined; },
|
|
374
|
-
deregisterInteractionHandler: function () { return undefined; },
|
|
375
|
-
};
|
|
376
|
-
// tslint:enable:object-literal-sort-keys
|
|
377
|
-
},
|
|
378
|
-
enumerable: false,
|
|
379
|
-
configurable: true
|
|
380
|
-
});
|
|
381
|
-
MDCFloatingLabelFoundation.prototype.init = function () {
|
|
382
|
-
this.adapter.registerInteractionHandler('animationend', this.shakeAnimationEndHandler);
|
|
383
|
-
};
|
|
384
|
-
MDCFloatingLabelFoundation.prototype.destroy = function () {
|
|
385
|
-
this.adapter.deregisterInteractionHandler('animationend', this.shakeAnimationEndHandler);
|
|
386
|
-
};
|
|
387
|
-
/**
|
|
388
|
-
* Returns the width of the label element.
|
|
389
|
-
*/
|
|
390
|
-
MDCFloatingLabelFoundation.prototype.getWidth = function () {
|
|
391
|
-
return this.adapter.getWidth();
|
|
392
|
-
};
|
|
393
|
-
/**
|
|
394
|
-
* Styles the label to produce a shake animation to indicate an error.
|
|
395
|
-
* @param shouldShake If true, adds the shake CSS class; otherwise, removes shake class.
|
|
396
|
-
*/
|
|
397
|
-
MDCFloatingLabelFoundation.prototype.shake = function (shouldShake) {
|
|
398
|
-
var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE;
|
|
399
|
-
if (shouldShake) {
|
|
400
|
-
this.adapter.addClass(LABEL_SHAKE);
|
|
401
|
-
}
|
|
402
|
-
else {
|
|
403
|
-
this.adapter.removeClass(LABEL_SHAKE);
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
/**
|
|
407
|
-
* Styles the label to float or dock.
|
|
408
|
-
* @param shouldFloat If true, adds the float CSS class; otherwise, removes float and shake classes to dock the label.
|
|
409
|
-
*/
|
|
410
|
-
MDCFloatingLabelFoundation.prototype.float = function (shouldFloat) {
|
|
411
|
-
var _a = MDCFloatingLabelFoundation.cssClasses, LABEL_FLOAT_ABOVE = _a.LABEL_FLOAT_ABOVE, LABEL_SHAKE = _a.LABEL_SHAKE;
|
|
412
|
-
if (shouldFloat) {
|
|
413
|
-
this.adapter.addClass(LABEL_FLOAT_ABOVE);
|
|
414
|
-
}
|
|
415
|
-
else {
|
|
416
|
-
this.adapter.removeClass(LABEL_FLOAT_ABOVE);
|
|
417
|
-
this.adapter.removeClass(LABEL_SHAKE);
|
|
418
|
-
}
|
|
419
|
-
};
|
|
420
|
-
/**
|
|
421
|
-
* Styles the label as required.
|
|
422
|
-
* @param isRequired If true, adds an asterisk to the label, indicating that it is required.
|
|
423
|
-
*/
|
|
424
|
-
MDCFloatingLabelFoundation.prototype.setRequired = function (isRequired) {
|
|
425
|
-
var LABEL_REQUIRED = MDCFloatingLabelFoundation.cssClasses.LABEL_REQUIRED;
|
|
426
|
-
if (isRequired) {
|
|
427
|
-
this.adapter.addClass(LABEL_REQUIRED);
|
|
428
|
-
}
|
|
429
|
-
else {
|
|
430
|
-
this.adapter.removeClass(LABEL_REQUIRED);
|
|
431
|
-
}
|
|
432
|
-
};
|
|
433
|
-
MDCFloatingLabelFoundation.prototype.handleShakeAnimationEnd = function () {
|
|
434
|
-
var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE;
|
|
435
|
-
this.adapter.removeClass(LABEL_SHAKE);
|
|
436
|
-
};
|
|
437
|
-
return MDCFloatingLabelFoundation;
|
|
438
|
-
}(MDCFoundation));
|
|
439
|
-
|
|
440
|
-
/**
|
|
441
|
-
* @license
|
|
442
|
-
* Copyright 2016 Google Inc.
|
|
443
|
-
*
|
|
444
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
445
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
446
|
-
* in the Software without restriction, including without limitation the rights
|
|
447
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
448
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
449
|
-
* furnished to do so, subject to the following conditions:
|
|
450
|
-
*
|
|
451
|
-
* The above copyright notice and this permission notice shall be included in
|
|
452
|
-
* all copies or substantial portions of the Software.
|
|
453
|
-
*
|
|
454
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
455
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
456
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
457
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
458
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
459
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
460
|
-
* THE SOFTWARE.
|
|
461
|
-
*/
|
|
462
|
-
var MDCFloatingLabel = /** @class */ (function (_super) {
|
|
463
|
-
__extends(MDCFloatingLabel, _super);
|
|
464
|
-
function MDCFloatingLabel() {
|
|
465
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
466
|
-
}
|
|
467
|
-
MDCFloatingLabel.attachTo = function (root) {
|
|
468
|
-
return new MDCFloatingLabel(root);
|
|
469
|
-
};
|
|
470
|
-
/**
|
|
471
|
-
* Styles the label to produce the label shake for errors.
|
|
472
|
-
* @param shouldShake If true, shakes the label by adding a CSS class; otherwise, stops shaking by removing the class.
|
|
473
|
-
*/
|
|
474
|
-
MDCFloatingLabel.prototype.shake = function (shouldShake) {
|
|
475
|
-
this.foundation.shake(shouldShake);
|
|
476
|
-
};
|
|
477
|
-
/**
|
|
478
|
-
* Styles the label to float/dock.
|
|
479
|
-
* @param shouldFloat If true, floats the label by adding a CSS class; otherwise, docks it by removing the class.
|
|
480
|
-
*/
|
|
481
|
-
MDCFloatingLabel.prototype.float = function (shouldFloat) {
|
|
482
|
-
this.foundation.float(shouldFloat);
|
|
483
|
-
};
|
|
484
|
-
/**
|
|
485
|
-
* Styles the label as required.
|
|
486
|
-
* @param isRequired If true, adds an asterisk to the label, indicating that it is required.
|
|
487
|
-
*/
|
|
488
|
-
MDCFloatingLabel.prototype.setRequired = function (isRequired) {
|
|
489
|
-
this.foundation.setRequired(isRequired);
|
|
490
|
-
};
|
|
491
|
-
MDCFloatingLabel.prototype.getWidth = function () {
|
|
492
|
-
return this.foundation.getWidth();
|
|
493
|
-
};
|
|
494
|
-
MDCFloatingLabel.prototype.getDefaultFoundation = function () {
|
|
495
|
-
var _this = this;
|
|
496
|
-
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
|
|
497
|
-
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
|
|
498
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
499
|
-
var adapter = {
|
|
500
|
-
addClass: function (className) { return _this.root.classList.add(className); },
|
|
501
|
-
removeClass: function (className) { return _this.root.classList.remove(className); },
|
|
502
|
-
getWidth: function () { return estimateScrollWidth(_this.root); },
|
|
503
|
-
registerInteractionHandler: function (evtType, handler) {
|
|
504
|
-
return _this.listen(evtType, handler);
|
|
505
|
-
},
|
|
506
|
-
deregisterInteractionHandler: function (evtType, handler) {
|
|
507
|
-
return _this.unlisten(evtType, handler);
|
|
508
|
-
},
|
|
509
|
-
};
|
|
510
|
-
// tslint:enable:object-literal-sort-keys
|
|
511
|
-
return new MDCFloatingLabelFoundation(adapter);
|
|
512
|
-
};
|
|
513
|
-
return MDCFloatingLabel;
|
|
514
|
-
}(MDCComponent));
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* @license
|
|
518
|
-
* Copyright 2018 Google Inc.
|
|
519
|
-
*
|
|
520
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
521
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
522
|
-
* in the Software without restriction, including without limitation the rights
|
|
523
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
524
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
525
|
-
* furnished to do so, subject to the following conditions:
|
|
526
|
-
*
|
|
527
|
-
* The above copyright notice and this permission notice shall be included in
|
|
528
|
-
* all copies or substantial portions of the Software.
|
|
529
|
-
*
|
|
530
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
531
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
532
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
533
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
534
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
535
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
536
|
-
* THE SOFTWARE.
|
|
537
|
-
*/
|
|
538
|
-
var cssClasses$6 = {
|
|
539
|
-
LINE_RIPPLE_ACTIVE: 'mdc-line-ripple--active',
|
|
540
|
-
LINE_RIPPLE_DEACTIVATING: 'mdc-line-ripple--deactivating',
|
|
541
|
-
};
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* @license
|
|
545
|
-
* Copyright 2018 Google Inc.
|
|
546
|
-
*
|
|
547
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
548
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
549
|
-
* in the Software without restriction, including without limitation the rights
|
|
550
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
551
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
552
|
-
* furnished to do so, subject to the following conditions:
|
|
553
|
-
*
|
|
554
|
-
* The above copyright notice and this permission notice shall be included in
|
|
555
|
-
* all copies or substantial portions of the Software.
|
|
556
|
-
*
|
|
557
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
558
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
559
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
560
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
561
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
562
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
563
|
-
* THE SOFTWARE.
|
|
564
|
-
*/
|
|
565
|
-
var MDCLineRippleFoundation = /** @class */ (function (_super) {
|
|
566
|
-
__extends(MDCLineRippleFoundation, _super);
|
|
567
|
-
function MDCLineRippleFoundation(adapter) {
|
|
568
|
-
var _this = _super.call(this, __assign(__assign({}, MDCLineRippleFoundation.defaultAdapter), adapter)) || this;
|
|
569
|
-
_this.transitionEndHandler = function (evt) {
|
|
570
|
-
_this.handleTransitionEnd(evt);
|
|
571
|
-
};
|
|
572
|
-
return _this;
|
|
573
|
-
}
|
|
574
|
-
Object.defineProperty(MDCLineRippleFoundation, "cssClasses", {
|
|
575
|
-
get: function () {
|
|
576
|
-
return cssClasses$6;
|
|
577
|
-
},
|
|
578
|
-
enumerable: false,
|
|
579
|
-
configurable: true
|
|
580
|
-
});
|
|
581
|
-
Object.defineProperty(MDCLineRippleFoundation, "defaultAdapter", {
|
|
582
|
-
/**
|
|
583
|
-
* See {@link MDCLineRippleAdapter} for typing information on parameters and return types.
|
|
584
|
-
*/
|
|
585
|
-
get: function () {
|
|
586
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
587
|
-
return {
|
|
588
|
-
addClass: function () { return undefined; },
|
|
589
|
-
removeClass: function () { return undefined; },
|
|
590
|
-
hasClass: function () { return false; },
|
|
591
|
-
setStyle: function () { return undefined; },
|
|
592
|
-
registerEventHandler: function () { return undefined; },
|
|
593
|
-
deregisterEventHandler: function () { return undefined; },
|
|
594
|
-
};
|
|
595
|
-
// tslint:enable:object-literal-sort-keys
|
|
596
|
-
},
|
|
597
|
-
enumerable: false,
|
|
598
|
-
configurable: true
|
|
599
|
-
});
|
|
600
|
-
MDCLineRippleFoundation.prototype.init = function () {
|
|
601
|
-
this.adapter.registerEventHandler('transitionend', this.transitionEndHandler);
|
|
602
|
-
};
|
|
603
|
-
MDCLineRippleFoundation.prototype.destroy = function () {
|
|
604
|
-
this.adapter.deregisterEventHandler('transitionend', this.transitionEndHandler);
|
|
605
|
-
};
|
|
606
|
-
MDCLineRippleFoundation.prototype.activate = function () {
|
|
607
|
-
this.adapter.removeClass(cssClasses$6.LINE_RIPPLE_DEACTIVATING);
|
|
608
|
-
this.adapter.addClass(cssClasses$6.LINE_RIPPLE_ACTIVE);
|
|
609
|
-
};
|
|
610
|
-
MDCLineRippleFoundation.prototype.setRippleCenter = function (xCoordinate) {
|
|
611
|
-
this.adapter.setStyle('transform-origin', xCoordinate + "px center");
|
|
612
|
-
};
|
|
613
|
-
MDCLineRippleFoundation.prototype.deactivate = function () {
|
|
614
|
-
this.adapter.addClass(cssClasses$6.LINE_RIPPLE_DEACTIVATING);
|
|
615
|
-
};
|
|
616
|
-
MDCLineRippleFoundation.prototype.handleTransitionEnd = function (evt) {
|
|
617
|
-
// Wait for the line ripple to be either transparent or opaque
|
|
618
|
-
// before emitting the animation end event
|
|
619
|
-
var isDeactivating = this.adapter.hasClass(cssClasses$6.LINE_RIPPLE_DEACTIVATING);
|
|
620
|
-
if (evt.propertyName === 'opacity') {
|
|
621
|
-
if (isDeactivating) {
|
|
622
|
-
this.adapter.removeClass(cssClasses$6.LINE_RIPPLE_ACTIVE);
|
|
623
|
-
this.adapter.removeClass(cssClasses$6.LINE_RIPPLE_DEACTIVATING);
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
};
|
|
627
|
-
return MDCLineRippleFoundation;
|
|
628
|
-
}(MDCFoundation));
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* @license
|
|
632
|
-
* Copyright 2018 Google Inc.
|
|
633
|
-
*
|
|
634
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
635
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
636
|
-
* in the Software without restriction, including without limitation the rights
|
|
637
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
638
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
639
|
-
* furnished to do so, subject to the following conditions:
|
|
640
|
-
*
|
|
641
|
-
* The above copyright notice and this permission notice shall be included in
|
|
642
|
-
* all copies or substantial portions of the Software.
|
|
643
|
-
*
|
|
644
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
645
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
646
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
647
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
648
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
649
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
650
|
-
* THE SOFTWARE.
|
|
651
|
-
*/
|
|
652
|
-
var MDCLineRipple = /** @class */ (function (_super) {
|
|
653
|
-
__extends(MDCLineRipple, _super);
|
|
654
|
-
function MDCLineRipple() {
|
|
655
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
656
|
-
}
|
|
657
|
-
MDCLineRipple.attachTo = function (root) {
|
|
658
|
-
return new MDCLineRipple(root);
|
|
659
|
-
};
|
|
660
|
-
/**
|
|
661
|
-
* Activates the line ripple
|
|
662
|
-
*/
|
|
663
|
-
MDCLineRipple.prototype.activate = function () {
|
|
664
|
-
this.foundation.activate();
|
|
665
|
-
};
|
|
666
|
-
/**
|
|
667
|
-
* Deactivates the line ripple
|
|
668
|
-
*/
|
|
669
|
-
MDCLineRipple.prototype.deactivate = function () {
|
|
670
|
-
this.foundation.deactivate();
|
|
671
|
-
};
|
|
672
|
-
/**
|
|
673
|
-
* Sets the transform origin given a user's click location.
|
|
674
|
-
* The `rippleCenter` is the x-coordinate of the middle of the ripple.
|
|
675
|
-
*/
|
|
676
|
-
MDCLineRipple.prototype.setRippleCenter = function (xCoordinate) {
|
|
677
|
-
this.foundation.setRippleCenter(xCoordinate);
|
|
678
|
-
};
|
|
679
|
-
MDCLineRipple.prototype.getDefaultFoundation = function () {
|
|
680
|
-
var _this = this;
|
|
681
|
-
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
|
|
682
|
-
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
|
|
683
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
684
|
-
var adapter = {
|
|
685
|
-
addClass: function (className) { return _this.root.classList.add(className); },
|
|
686
|
-
removeClass: function (className) { return _this.root.classList.remove(className); },
|
|
687
|
-
hasClass: function (className) { return _this.root.classList.contains(className); },
|
|
688
|
-
setStyle: function (propertyName, value) { return _this.root.style.setProperty(propertyName, value); },
|
|
689
|
-
registerEventHandler: function (evtType, handler) { return _this.listen(evtType, handler); },
|
|
690
|
-
deregisterEventHandler: function (evtType, handler) { return _this.unlisten(evtType, handler); },
|
|
691
|
-
};
|
|
692
|
-
// tslint:enable:object-literal-sort-keys
|
|
693
|
-
return new MDCLineRippleFoundation(adapter);
|
|
694
|
-
};
|
|
695
|
-
return MDCLineRipple;
|
|
696
|
-
}(MDCComponent));
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* @license
|
|
700
|
-
* Copyright 2018 Google Inc.
|
|
701
|
-
*
|
|
702
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
703
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
704
|
-
* in the Software without restriction, including without limitation the rights
|
|
705
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
706
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
707
|
-
* furnished to do so, subject to the following conditions:
|
|
708
|
-
*
|
|
709
|
-
* The above copyright notice and this permission notice shall be included in
|
|
710
|
-
* all copies or substantial portions of the Software.
|
|
711
|
-
*
|
|
712
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
713
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
714
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
715
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
716
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
717
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
718
|
-
* THE SOFTWARE.
|
|
719
|
-
*/
|
|
720
|
-
var strings$5 = {
|
|
721
|
-
NOTCH_ELEMENT_SELECTOR: '.mdc-notched-outline__notch',
|
|
722
|
-
};
|
|
723
|
-
var numbers$1 = {
|
|
724
|
-
// This should stay in sync with $mdc-notched-outline-padding * 2.
|
|
725
|
-
NOTCH_ELEMENT_PADDING: 8,
|
|
726
|
-
};
|
|
727
|
-
var cssClasses$5 = {
|
|
728
|
-
NO_LABEL: 'mdc-notched-outline--no-label',
|
|
729
|
-
OUTLINE_NOTCHED: 'mdc-notched-outline--notched',
|
|
730
|
-
OUTLINE_UPGRADED: 'mdc-notched-outline--upgraded',
|
|
731
|
-
};
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* @license
|
|
735
|
-
* Copyright 2017 Google Inc.
|
|
736
|
-
*
|
|
737
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
738
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
739
|
-
* in the Software without restriction, including without limitation the rights
|
|
740
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
741
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
742
|
-
* furnished to do so, subject to the following conditions:
|
|
743
|
-
*
|
|
744
|
-
* The above copyright notice and this permission notice shall be included in
|
|
745
|
-
* all copies or substantial portions of the Software.
|
|
746
|
-
*
|
|
747
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
748
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
749
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
750
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
751
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
752
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
753
|
-
* THE SOFTWARE.
|
|
754
|
-
*/
|
|
755
|
-
var MDCNotchedOutlineFoundation = /** @class */ (function (_super) {
|
|
756
|
-
__extends(MDCNotchedOutlineFoundation, _super);
|
|
757
|
-
function MDCNotchedOutlineFoundation(adapter) {
|
|
758
|
-
return _super.call(this, __assign(__assign({}, MDCNotchedOutlineFoundation.defaultAdapter), adapter)) || this;
|
|
759
|
-
}
|
|
760
|
-
Object.defineProperty(MDCNotchedOutlineFoundation, "strings", {
|
|
761
|
-
get: function () {
|
|
762
|
-
return strings$5;
|
|
763
|
-
},
|
|
764
|
-
enumerable: false,
|
|
765
|
-
configurable: true
|
|
766
|
-
});
|
|
767
|
-
Object.defineProperty(MDCNotchedOutlineFoundation, "cssClasses", {
|
|
768
|
-
get: function () {
|
|
769
|
-
return cssClasses$5;
|
|
770
|
-
},
|
|
771
|
-
enumerable: false,
|
|
772
|
-
configurable: true
|
|
773
|
-
});
|
|
774
|
-
Object.defineProperty(MDCNotchedOutlineFoundation, "numbers", {
|
|
775
|
-
get: function () {
|
|
776
|
-
return numbers$1;
|
|
777
|
-
},
|
|
778
|
-
enumerable: false,
|
|
779
|
-
configurable: true
|
|
780
|
-
});
|
|
781
|
-
Object.defineProperty(MDCNotchedOutlineFoundation, "defaultAdapter", {
|
|
782
|
-
/**
|
|
783
|
-
* See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types.
|
|
784
|
-
*/
|
|
785
|
-
get: function () {
|
|
786
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
787
|
-
return {
|
|
788
|
-
addClass: function () { return undefined; },
|
|
789
|
-
removeClass: function () { return undefined; },
|
|
790
|
-
setNotchWidthProperty: function () { return undefined; },
|
|
791
|
-
removeNotchWidthProperty: function () { return undefined; },
|
|
792
|
-
};
|
|
793
|
-
// tslint:enable:object-literal-sort-keys
|
|
794
|
-
},
|
|
795
|
-
enumerable: false,
|
|
796
|
-
configurable: true
|
|
797
|
-
});
|
|
798
|
-
/**
|
|
799
|
-
* Adds the outline notched selector and updates the notch width calculated based off of notchWidth.
|
|
800
|
-
*/
|
|
801
|
-
MDCNotchedOutlineFoundation.prototype.notch = function (notchWidth) {
|
|
802
|
-
var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED;
|
|
803
|
-
if (notchWidth > 0) {
|
|
804
|
-
notchWidth += numbers$1.NOTCH_ELEMENT_PADDING; // Add padding from left/right.
|
|
805
|
-
}
|
|
806
|
-
this.adapter.setNotchWidthProperty(notchWidth);
|
|
807
|
-
this.adapter.addClass(OUTLINE_NOTCHED);
|
|
808
|
-
};
|
|
809
|
-
/**
|
|
810
|
-
* Removes notched outline selector to close the notch in the outline.
|
|
811
|
-
*/
|
|
812
|
-
MDCNotchedOutlineFoundation.prototype.closeNotch = function () {
|
|
813
|
-
var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED;
|
|
814
|
-
this.adapter.removeClass(OUTLINE_NOTCHED);
|
|
815
|
-
this.adapter.removeNotchWidthProperty();
|
|
816
|
-
};
|
|
817
|
-
return MDCNotchedOutlineFoundation;
|
|
818
|
-
}(MDCFoundation));
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* @license
|
|
822
|
-
* Copyright 2017 Google Inc.
|
|
823
|
-
*
|
|
824
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
825
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
826
|
-
* in the Software without restriction, including without limitation the rights
|
|
827
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
828
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
829
|
-
* furnished to do so, subject to the following conditions:
|
|
830
|
-
*
|
|
831
|
-
* The above copyright notice and this permission notice shall be included in
|
|
832
|
-
* all copies or substantial portions of the Software.
|
|
833
|
-
*
|
|
834
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
835
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
836
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
837
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
838
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
839
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
840
|
-
* THE SOFTWARE.
|
|
841
|
-
*/
|
|
842
|
-
var MDCNotchedOutline = /** @class */ (function (_super) {
|
|
843
|
-
__extends(MDCNotchedOutline, _super);
|
|
844
|
-
function MDCNotchedOutline() {
|
|
845
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
846
|
-
}
|
|
847
|
-
MDCNotchedOutline.attachTo = function (root) {
|
|
848
|
-
return new MDCNotchedOutline(root);
|
|
849
|
-
};
|
|
850
|
-
MDCNotchedOutline.prototype.initialSyncWithDOM = function () {
|
|
851
|
-
this.notchElement =
|
|
852
|
-
this.root.querySelector(strings$5.NOTCH_ELEMENT_SELECTOR);
|
|
853
|
-
var label = this.root.querySelector('.' + MDCFloatingLabelFoundation.cssClasses.ROOT);
|
|
854
|
-
if (label) {
|
|
855
|
-
label.style.transitionDuration = '0s';
|
|
856
|
-
this.root.classList.add(cssClasses$5.OUTLINE_UPGRADED);
|
|
857
|
-
requestAnimationFrame(function () {
|
|
858
|
-
label.style.transitionDuration = '';
|
|
859
|
-
});
|
|
860
|
-
}
|
|
861
|
-
else {
|
|
862
|
-
this.root.classList.add(cssClasses$5.NO_LABEL);
|
|
863
|
-
}
|
|
864
|
-
};
|
|
865
|
-
/**
|
|
866
|
-
* Updates classes and styles to open the notch to the specified width.
|
|
867
|
-
* @param notchWidth The notch width in the outline.
|
|
868
|
-
*/
|
|
869
|
-
MDCNotchedOutline.prototype.notch = function (notchWidth) {
|
|
870
|
-
this.foundation.notch(notchWidth);
|
|
871
|
-
};
|
|
872
|
-
/**
|
|
873
|
-
* Updates classes and styles to close the notch.
|
|
874
|
-
*/
|
|
875
|
-
MDCNotchedOutline.prototype.closeNotch = function () {
|
|
876
|
-
this.foundation.closeNotch();
|
|
877
|
-
};
|
|
878
|
-
MDCNotchedOutline.prototype.getDefaultFoundation = function () {
|
|
879
|
-
var _this = this;
|
|
880
|
-
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
|
|
881
|
-
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
|
|
882
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
883
|
-
var adapter = {
|
|
884
|
-
addClass: function (className) { return _this.root.classList.add(className); },
|
|
885
|
-
removeClass: function (className) { return _this.root.classList.remove(className); },
|
|
886
|
-
setNotchWidthProperty: function (width) {
|
|
887
|
-
_this.notchElement.style.setProperty('width', width + 'px');
|
|
888
|
-
},
|
|
889
|
-
removeNotchWidthProperty: function () {
|
|
890
|
-
_this.notchElement.style.removeProperty('width');
|
|
891
|
-
},
|
|
892
|
-
};
|
|
893
|
-
// tslint:enable:object-literal-sort-keys
|
|
894
|
-
return new MDCNotchedOutlineFoundation(adapter);
|
|
895
|
-
};
|
|
896
|
-
return MDCNotchedOutline;
|
|
897
|
-
}(MDCComponent));
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* @license
|
|
901
|
-
* Copyright 2019 Google Inc.
|
|
902
|
-
*
|
|
903
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
904
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
905
|
-
* in the Software without restriction, including without limitation the rights
|
|
906
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
907
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
908
|
-
* furnished to do so, subject to the following conditions:
|
|
909
|
-
*
|
|
910
|
-
* The above copyright notice and this permission notice shall be included in
|
|
911
|
-
* all copies or substantial portions of the Software.
|
|
912
|
-
*
|
|
913
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
914
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
915
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
916
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
917
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
918
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
919
|
-
* THE SOFTWARE.
|
|
920
|
-
*/
|
|
921
|
-
var cssClasses$4 = {
|
|
922
|
-
ROOT: 'mdc-text-field-character-counter',
|
|
923
|
-
};
|
|
924
|
-
var strings$4 = {
|
|
925
|
-
ROOT_SELECTOR: "." + cssClasses$4.ROOT,
|
|
926
|
-
};
|
|
927
|
-
|
|
928
|
-
/**
|
|
929
|
-
* @license
|
|
930
|
-
* Copyright 2019 Google Inc.
|
|
931
|
-
*
|
|
932
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
933
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
934
|
-
* in the Software without restriction, including without limitation the rights
|
|
935
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
936
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
937
|
-
* furnished to do so, subject to the following conditions:
|
|
938
|
-
*
|
|
939
|
-
* The above copyright notice and this permission notice shall be included in
|
|
940
|
-
* all copies or substantial portions of the Software.
|
|
941
|
-
*
|
|
942
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
943
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
944
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
945
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
946
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
947
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
948
|
-
* THE SOFTWARE.
|
|
949
|
-
*/
|
|
950
|
-
var MDCTextFieldCharacterCounterFoundation = /** @class */ (function (_super) {
|
|
951
|
-
__extends(MDCTextFieldCharacterCounterFoundation, _super);
|
|
952
|
-
function MDCTextFieldCharacterCounterFoundation(adapter) {
|
|
953
|
-
return _super.call(this, __assign(__assign({}, MDCTextFieldCharacterCounterFoundation.defaultAdapter), adapter)) || this;
|
|
954
|
-
}
|
|
955
|
-
Object.defineProperty(MDCTextFieldCharacterCounterFoundation, "cssClasses", {
|
|
956
|
-
get: function () {
|
|
957
|
-
return cssClasses$4;
|
|
958
|
-
},
|
|
959
|
-
enumerable: false,
|
|
960
|
-
configurable: true
|
|
961
|
-
});
|
|
962
|
-
Object.defineProperty(MDCTextFieldCharacterCounterFoundation, "strings", {
|
|
963
|
-
get: function () {
|
|
964
|
-
return strings$4;
|
|
965
|
-
},
|
|
966
|
-
enumerable: false,
|
|
967
|
-
configurable: true
|
|
968
|
-
});
|
|
969
|
-
Object.defineProperty(MDCTextFieldCharacterCounterFoundation, "defaultAdapter", {
|
|
970
|
-
/**
|
|
971
|
-
* See {@link MDCTextFieldCharacterCounterAdapter} for typing information on parameters and return types.
|
|
972
|
-
*/
|
|
973
|
-
get: function () {
|
|
974
|
-
return {
|
|
975
|
-
setContent: function () { return undefined; },
|
|
976
|
-
};
|
|
977
|
-
},
|
|
978
|
-
enumerable: false,
|
|
979
|
-
configurable: true
|
|
980
|
-
});
|
|
981
|
-
MDCTextFieldCharacterCounterFoundation.prototype.setCounterValue = function (currentLength, maxLength) {
|
|
982
|
-
currentLength = Math.min(currentLength, maxLength);
|
|
983
|
-
this.adapter.setContent(currentLength + " / " + maxLength);
|
|
984
|
-
};
|
|
985
|
-
return MDCTextFieldCharacterCounterFoundation;
|
|
986
|
-
}(MDCFoundation));
|
|
987
|
-
|
|
988
|
-
/**
|
|
989
|
-
* @license
|
|
990
|
-
* Copyright 2019 Google Inc.
|
|
991
|
-
*
|
|
992
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
993
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
994
|
-
* in the Software without restriction, including without limitation the rights
|
|
995
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
996
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
997
|
-
* furnished to do so, subject to the following conditions:
|
|
998
|
-
*
|
|
999
|
-
* The above copyright notice and this permission notice shall be included in
|
|
1000
|
-
* all copies or substantial portions of the Software.
|
|
1001
|
-
*
|
|
1002
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1003
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1004
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1005
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1006
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1007
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1008
|
-
* THE SOFTWARE.
|
|
1009
|
-
*/
|
|
1010
|
-
var MDCTextFieldCharacterCounter = /** @class */ (function (_super) {
|
|
1011
|
-
__extends(MDCTextFieldCharacterCounter, _super);
|
|
1012
|
-
function MDCTextFieldCharacterCounter() {
|
|
1013
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1014
|
-
}
|
|
1015
|
-
MDCTextFieldCharacterCounter.attachTo = function (root) {
|
|
1016
|
-
return new MDCTextFieldCharacterCounter(root);
|
|
1017
|
-
};
|
|
1018
|
-
Object.defineProperty(MDCTextFieldCharacterCounter.prototype, "foundationForTextField", {
|
|
1019
|
-
// Provided for access by MDCTextField component
|
|
1020
|
-
get: function () {
|
|
1021
|
-
return this.foundation;
|
|
1022
|
-
},
|
|
1023
|
-
enumerable: false,
|
|
1024
|
-
configurable: true
|
|
1025
|
-
});
|
|
1026
|
-
MDCTextFieldCharacterCounter.prototype.getDefaultFoundation = function () {
|
|
1027
|
-
var _this = this;
|
|
1028
|
-
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
|
|
1029
|
-
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
|
|
1030
|
-
var adapter = {
|
|
1031
|
-
setContent: function (content) {
|
|
1032
|
-
_this.root.textContent = content;
|
|
1033
|
-
},
|
|
1034
|
-
};
|
|
1035
|
-
return new MDCTextFieldCharacterCounterFoundation(adapter);
|
|
1036
|
-
};
|
|
1037
|
-
return MDCTextFieldCharacterCounter;
|
|
1038
|
-
}(MDCComponent));
|
|
1039
|
-
|
|
1040
|
-
/**
|
|
1041
|
-
* @license
|
|
1042
|
-
* Copyright 2016 Google Inc.
|
|
1043
|
-
*
|
|
1044
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1045
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
1046
|
-
* in the Software without restriction, including without limitation the rights
|
|
1047
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1048
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
1049
|
-
* furnished to do so, subject to the following conditions:
|
|
1050
|
-
*
|
|
1051
|
-
* The above copyright notice and this permission notice shall be included in
|
|
1052
|
-
* all copies or substantial portions of the Software.
|
|
1053
|
-
*
|
|
1054
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1055
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1056
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1057
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1058
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1059
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1060
|
-
* THE SOFTWARE.
|
|
1061
|
-
*/
|
|
1062
|
-
var strings$3 = {
|
|
1063
|
-
ARIA_CONTROLS: 'aria-controls',
|
|
1064
|
-
ARIA_DESCRIBEDBY: 'aria-describedby',
|
|
1065
|
-
INPUT_SELECTOR: '.mdc-text-field__input',
|
|
1066
|
-
LABEL_SELECTOR: '.mdc-floating-label',
|
|
1067
|
-
LEADING_ICON_SELECTOR: '.mdc-text-field__icon--leading',
|
|
1068
|
-
LINE_RIPPLE_SELECTOR: '.mdc-line-ripple',
|
|
1069
|
-
OUTLINE_SELECTOR: '.mdc-notched-outline',
|
|
1070
|
-
PREFIX_SELECTOR: '.mdc-text-field__affix--prefix',
|
|
1071
|
-
SUFFIX_SELECTOR: '.mdc-text-field__affix--suffix',
|
|
1072
|
-
TRAILING_ICON_SELECTOR: '.mdc-text-field__icon--trailing'
|
|
1073
|
-
};
|
|
1074
|
-
var cssClasses$3 = {
|
|
1075
|
-
DISABLED: 'mdc-text-field--disabled',
|
|
1076
|
-
FOCUSED: 'mdc-text-field--focused',
|
|
1077
|
-
HELPER_LINE: 'mdc-text-field-helper-line',
|
|
1078
|
-
INVALID: 'mdc-text-field--invalid',
|
|
1079
|
-
LABEL_FLOATING: 'mdc-text-field--label-floating',
|
|
1080
|
-
NO_LABEL: 'mdc-text-field--no-label',
|
|
1081
|
-
OUTLINED: 'mdc-text-field--outlined',
|
|
1082
|
-
ROOT: 'mdc-text-field',
|
|
1083
|
-
TEXTAREA: 'mdc-text-field--textarea',
|
|
1084
|
-
WITH_LEADING_ICON: 'mdc-text-field--with-leading-icon',
|
|
1085
|
-
WITH_TRAILING_ICON: 'mdc-text-field--with-trailing-icon',
|
|
1086
|
-
WITH_INTERNAL_COUNTER: 'mdc-text-field--with-internal-counter',
|
|
1087
|
-
};
|
|
1088
|
-
var numbers = {
|
|
1089
|
-
LABEL_SCALE: 0.75,
|
|
1090
|
-
};
|
|
1091
|
-
/**
|
|
1092
|
-
* Whitelist based off of
|
|
1093
|
-
* https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation
|
|
1094
|
-
* under the "Validation-related attributes" section.
|
|
1095
|
-
*/
|
|
1096
|
-
var VALIDATION_ATTR_WHITELIST = [
|
|
1097
|
-
'pattern',
|
|
1098
|
-
'min',
|
|
1099
|
-
'max',
|
|
1100
|
-
'required',
|
|
1101
|
-
'step',
|
|
1102
|
-
'minlength',
|
|
1103
|
-
'maxlength',
|
|
1104
|
-
];
|
|
1105
|
-
/**
|
|
1106
|
-
* Label should always float for these types as they show some UI even if value
|
|
1107
|
-
* is empty.
|
|
1108
|
-
*/
|
|
1109
|
-
var ALWAYS_FLOAT_TYPES = [
|
|
1110
|
-
'color',
|
|
1111
|
-
'date',
|
|
1112
|
-
'datetime-local',
|
|
1113
|
-
'month',
|
|
1114
|
-
'range',
|
|
1115
|
-
'time',
|
|
1116
|
-
'week',
|
|
1117
|
-
];
|
|
1118
|
-
|
|
1119
|
-
/**
|
|
1120
|
-
* @license
|
|
1121
|
-
* Copyright 2016 Google Inc.
|
|
1122
|
-
*
|
|
1123
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1124
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
1125
|
-
* in the Software without restriction, including without limitation the rights
|
|
1126
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1127
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
1128
|
-
* furnished to do so, subject to the following conditions:
|
|
1129
|
-
*
|
|
1130
|
-
* The above copyright notice and this permission notice shall be included in
|
|
1131
|
-
* all copies or substantial portions of the Software.
|
|
1132
|
-
*
|
|
1133
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1134
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1135
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1136
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1137
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1138
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1139
|
-
* THE SOFTWARE.
|
|
1140
|
-
*/
|
|
1141
|
-
var POINTERDOWN_EVENTS = ['mousedown', 'touchstart'];
|
|
1142
|
-
var INTERACTION_EVENTS$1 = ['click', 'keydown'];
|
|
1143
|
-
var MDCTextFieldFoundation = /** @class */ (function (_super) {
|
|
1144
|
-
__extends(MDCTextFieldFoundation, _super);
|
|
1145
|
-
/**
|
|
1146
|
-
* @param adapter
|
|
1147
|
-
* @param foundationMap Map from subcomponent names to their subfoundations.
|
|
1148
|
-
*/
|
|
1149
|
-
function MDCTextFieldFoundation(adapter, foundationMap) {
|
|
1150
|
-
if (foundationMap === void 0) { foundationMap = {}; }
|
|
1151
|
-
var _this = _super.call(this, __assign(__assign({}, MDCTextFieldFoundation.defaultAdapter), adapter)) || this;
|
|
1152
|
-
_this.isFocused = false;
|
|
1153
|
-
_this.receivedUserInput = false;
|
|
1154
|
-
_this.valid = true;
|
|
1155
|
-
_this.useNativeValidation = true;
|
|
1156
|
-
_this.validateOnValueChange = true;
|
|
1157
|
-
_this.helperText = foundationMap.helperText;
|
|
1158
|
-
_this.characterCounter = foundationMap.characterCounter;
|
|
1159
|
-
_this.leadingIcon = foundationMap.leadingIcon;
|
|
1160
|
-
_this.trailingIcon = foundationMap.trailingIcon;
|
|
1161
|
-
_this.inputFocusHandler = function () {
|
|
1162
|
-
_this.activateFocus();
|
|
1163
|
-
};
|
|
1164
|
-
_this.inputBlurHandler = function () {
|
|
1165
|
-
_this.deactivateFocus();
|
|
1166
|
-
};
|
|
1167
|
-
_this.inputInputHandler = function () {
|
|
1168
|
-
_this.handleInput();
|
|
1169
|
-
};
|
|
1170
|
-
_this.setPointerXOffset = function (evt) {
|
|
1171
|
-
_this.setTransformOrigin(evt);
|
|
1172
|
-
};
|
|
1173
|
-
_this.textFieldInteractionHandler = function () {
|
|
1174
|
-
_this.handleTextFieldInteraction();
|
|
1175
|
-
};
|
|
1176
|
-
_this.validationAttributeChangeHandler = function (attributesList) {
|
|
1177
|
-
_this.handleValidationAttributeChange(attributesList);
|
|
1178
|
-
};
|
|
1179
|
-
return _this;
|
|
1180
|
-
}
|
|
1181
|
-
Object.defineProperty(MDCTextFieldFoundation, "cssClasses", {
|
|
1182
|
-
get: function () {
|
|
1183
|
-
return cssClasses$3;
|
|
1184
|
-
},
|
|
1185
|
-
enumerable: false,
|
|
1186
|
-
configurable: true
|
|
1187
|
-
});
|
|
1188
|
-
Object.defineProperty(MDCTextFieldFoundation, "strings", {
|
|
1189
|
-
get: function () {
|
|
1190
|
-
return strings$3;
|
|
1191
|
-
},
|
|
1192
|
-
enumerable: false,
|
|
1193
|
-
configurable: true
|
|
1194
|
-
});
|
|
1195
|
-
Object.defineProperty(MDCTextFieldFoundation, "numbers", {
|
|
1196
|
-
get: function () {
|
|
1197
|
-
return numbers;
|
|
1198
|
-
},
|
|
1199
|
-
enumerable: false,
|
|
1200
|
-
configurable: true
|
|
1201
|
-
});
|
|
1202
|
-
Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldAlwaysFloat", {
|
|
1203
|
-
get: function () {
|
|
1204
|
-
var type = this.getNativeInput().type;
|
|
1205
|
-
return ALWAYS_FLOAT_TYPES.indexOf(type) >= 0;
|
|
1206
|
-
},
|
|
1207
|
-
enumerable: false,
|
|
1208
|
-
configurable: true
|
|
1209
|
-
});
|
|
1210
|
-
Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldFloat", {
|
|
1211
|
-
get: function () {
|
|
1212
|
-
return this.shouldAlwaysFloat || this.isFocused || !!this.getValue() ||
|
|
1213
|
-
this.isBadInput();
|
|
1214
|
-
},
|
|
1215
|
-
enumerable: false,
|
|
1216
|
-
configurable: true
|
|
1217
|
-
});
|
|
1218
|
-
Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldShake", {
|
|
1219
|
-
get: function () {
|
|
1220
|
-
return !this.isFocused && !this.isValid() && !!this.getValue();
|
|
1221
|
-
},
|
|
1222
|
-
enumerable: false,
|
|
1223
|
-
configurable: true
|
|
1224
|
-
});
|
|
1225
|
-
Object.defineProperty(MDCTextFieldFoundation, "defaultAdapter", {
|
|
1226
|
-
/**
|
|
1227
|
-
* See {@link MDCTextFieldAdapter} for typing information on parameters and
|
|
1228
|
-
* return types.
|
|
1229
|
-
*/
|
|
1230
|
-
get: function () {
|
|
1231
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
1232
|
-
return {
|
|
1233
|
-
addClass: function () { return undefined; },
|
|
1234
|
-
removeClass: function () { return undefined; },
|
|
1235
|
-
hasClass: function () { return true; },
|
|
1236
|
-
setInputAttr: function () { return undefined; },
|
|
1237
|
-
removeInputAttr: function () { return undefined; },
|
|
1238
|
-
registerTextFieldInteractionHandler: function () { return undefined; },
|
|
1239
|
-
deregisterTextFieldInteractionHandler: function () { return undefined; },
|
|
1240
|
-
registerInputInteractionHandler: function () { return undefined; },
|
|
1241
|
-
deregisterInputInteractionHandler: function () { return undefined; },
|
|
1242
|
-
registerValidationAttributeChangeHandler: function () {
|
|
1243
|
-
return new MutationObserver(function () { return undefined; });
|
|
1244
|
-
},
|
|
1245
|
-
deregisterValidationAttributeChangeHandler: function () { return undefined; },
|
|
1246
|
-
getNativeInput: function () { return null; },
|
|
1247
|
-
isFocused: function () { return false; },
|
|
1248
|
-
activateLineRipple: function () { return undefined; },
|
|
1249
|
-
deactivateLineRipple: function () { return undefined; },
|
|
1250
|
-
setLineRippleTransformOrigin: function () { return undefined; },
|
|
1251
|
-
shakeLabel: function () { return undefined; },
|
|
1252
|
-
floatLabel: function () { return undefined; },
|
|
1253
|
-
setLabelRequired: function () { return undefined; },
|
|
1254
|
-
hasLabel: function () { return false; },
|
|
1255
|
-
getLabelWidth: function () { return 0; },
|
|
1256
|
-
hasOutline: function () { return false; },
|
|
1257
|
-
notchOutline: function () { return undefined; },
|
|
1258
|
-
closeOutline: function () { return undefined; },
|
|
1259
|
-
};
|
|
1260
|
-
// tslint:enable:object-literal-sort-keys
|
|
1261
|
-
},
|
|
1262
|
-
enumerable: false,
|
|
1263
|
-
configurable: true
|
|
1264
|
-
});
|
|
1265
|
-
MDCTextFieldFoundation.prototype.init = function () {
|
|
1266
|
-
var e_1, _a, e_2, _b;
|
|
1267
|
-
if (this.adapter.hasLabel() && this.getNativeInput().required) {
|
|
1268
|
-
this.adapter.setLabelRequired(true);
|
|
1269
|
-
}
|
|
1270
|
-
if (this.adapter.isFocused()) {
|
|
1271
|
-
this.inputFocusHandler();
|
|
1272
|
-
}
|
|
1273
|
-
else if (this.adapter.hasLabel() && this.shouldFloat) {
|
|
1274
|
-
this.notchOutline(true);
|
|
1275
|
-
this.adapter.floatLabel(true);
|
|
1276
|
-
this.styleFloating(true);
|
|
1277
|
-
}
|
|
1278
|
-
this.adapter.registerInputInteractionHandler('focus', this.inputFocusHandler);
|
|
1279
|
-
this.adapter.registerInputInteractionHandler('blur', this.inputBlurHandler);
|
|
1280
|
-
this.adapter.registerInputInteractionHandler('input', this.inputInputHandler);
|
|
1281
|
-
try {
|
|
1282
|
-
for (var POINTERDOWN_EVENTS_1 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next(); !POINTERDOWN_EVENTS_1_1.done; POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next()) {
|
|
1283
|
-
var evtType = POINTERDOWN_EVENTS_1_1.value;
|
|
1284
|
-
this.adapter.registerInputInteractionHandler(evtType, this.setPointerXOffset);
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1288
|
-
finally {
|
|
1289
|
-
try {
|
|
1290
|
-
if (POINTERDOWN_EVENTS_1_1 && !POINTERDOWN_EVENTS_1_1.done && (_a = POINTERDOWN_EVENTS_1.return)) _a.call(POINTERDOWN_EVENTS_1);
|
|
1291
|
-
}
|
|
1292
|
-
finally { if (e_1) throw e_1.error; }
|
|
1293
|
-
}
|
|
1294
|
-
try {
|
|
1295
|
-
for (var INTERACTION_EVENTS_1 = __values(INTERACTION_EVENTS$1), INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next(); !INTERACTION_EVENTS_1_1.done; INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next()) {
|
|
1296
|
-
var evtType = INTERACTION_EVENTS_1_1.value;
|
|
1297
|
-
this.adapter.registerTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1301
|
-
finally {
|
|
1302
|
-
try {
|
|
1303
|
-
if (INTERACTION_EVENTS_1_1 && !INTERACTION_EVENTS_1_1.done && (_b = INTERACTION_EVENTS_1.return)) _b.call(INTERACTION_EVENTS_1);
|
|
1304
|
-
}
|
|
1305
|
-
finally { if (e_2) throw e_2.error; }
|
|
1306
|
-
}
|
|
1307
|
-
this.validationObserver =
|
|
1308
|
-
this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler);
|
|
1309
|
-
this.setcharacterCounter(this.getValue().length);
|
|
1310
|
-
};
|
|
1311
|
-
MDCTextFieldFoundation.prototype.destroy = function () {
|
|
1312
|
-
var e_3, _a, e_4, _b;
|
|
1313
|
-
this.adapter.deregisterInputInteractionHandler('focus', this.inputFocusHandler);
|
|
1314
|
-
this.adapter.deregisterInputInteractionHandler('blur', this.inputBlurHandler);
|
|
1315
|
-
this.adapter.deregisterInputInteractionHandler('input', this.inputInputHandler);
|
|
1316
|
-
try {
|
|
1317
|
-
for (var POINTERDOWN_EVENTS_2 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next(); !POINTERDOWN_EVENTS_2_1.done; POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next()) {
|
|
1318
|
-
var evtType = POINTERDOWN_EVENTS_2_1.value;
|
|
1319
|
-
this.adapter.deregisterInputInteractionHandler(evtType, this.setPointerXOffset);
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
1323
|
-
finally {
|
|
1324
|
-
try {
|
|
1325
|
-
if (POINTERDOWN_EVENTS_2_1 && !POINTERDOWN_EVENTS_2_1.done && (_a = POINTERDOWN_EVENTS_2.return)) _a.call(POINTERDOWN_EVENTS_2);
|
|
1326
|
-
}
|
|
1327
|
-
finally { if (e_3) throw e_3.error; }
|
|
1328
|
-
}
|
|
1329
|
-
try {
|
|
1330
|
-
for (var INTERACTION_EVENTS_2 = __values(INTERACTION_EVENTS$1), INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next(); !INTERACTION_EVENTS_2_1.done; INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next()) {
|
|
1331
|
-
var evtType = INTERACTION_EVENTS_2_1.value;
|
|
1332
|
-
this.adapter.deregisterTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
1336
|
-
finally {
|
|
1337
|
-
try {
|
|
1338
|
-
if (INTERACTION_EVENTS_2_1 && !INTERACTION_EVENTS_2_1.done && (_b = INTERACTION_EVENTS_2.return)) _b.call(INTERACTION_EVENTS_2);
|
|
1339
|
-
}
|
|
1340
|
-
finally { if (e_4) throw e_4.error; }
|
|
1341
|
-
}
|
|
1342
|
-
this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver);
|
|
1343
|
-
};
|
|
1344
|
-
/**
|
|
1345
|
-
* Handles user interactions with the Text Field.
|
|
1346
|
-
*/
|
|
1347
|
-
MDCTextFieldFoundation.prototype.handleTextFieldInteraction = function () {
|
|
1348
|
-
var nativeInput = this.adapter.getNativeInput();
|
|
1349
|
-
if (nativeInput && nativeInput.disabled) {
|
|
1350
|
-
return;
|
|
1351
|
-
}
|
|
1352
|
-
this.receivedUserInput = true;
|
|
1353
|
-
};
|
|
1354
|
-
/**
|
|
1355
|
-
* Handles validation attribute changes
|
|
1356
|
-
*/
|
|
1357
|
-
MDCTextFieldFoundation.prototype.handleValidationAttributeChange = function (attributesList) {
|
|
1358
|
-
var _this = this;
|
|
1359
|
-
attributesList.some(function (attributeName) {
|
|
1360
|
-
if (VALIDATION_ATTR_WHITELIST.indexOf(attributeName) > -1) {
|
|
1361
|
-
_this.styleValidity(true);
|
|
1362
|
-
_this.adapter.setLabelRequired(_this.getNativeInput().required);
|
|
1363
|
-
return true;
|
|
1364
|
-
}
|
|
1365
|
-
return false;
|
|
1366
|
-
});
|
|
1367
|
-
if (attributesList.indexOf('maxlength') > -1) {
|
|
1368
|
-
this.setcharacterCounter(this.getValue().length);
|
|
1369
|
-
}
|
|
1370
|
-
};
|
|
1371
|
-
/**
|
|
1372
|
-
* Opens/closes the notched outline.
|
|
1373
|
-
*/
|
|
1374
|
-
MDCTextFieldFoundation.prototype.notchOutline = function (openNotch) {
|
|
1375
|
-
if (!this.adapter.hasOutline() || !this.adapter.hasLabel()) {
|
|
1376
|
-
return;
|
|
1377
|
-
}
|
|
1378
|
-
if (openNotch) {
|
|
1379
|
-
var labelWidth = this.adapter.getLabelWidth() * numbers.LABEL_SCALE;
|
|
1380
|
-
this.adapter.notchOutline(labelWidth);
|
|
1381
|
-
}
|
|
1382
|
-
else {
|
|
1383
|
-
this.adapter.closeOutline();
|
|
1384
|
-
}
|
|
1385
|
-
};
|
|
1386
|
-
/**
|
|
1387
|
-
* Activates the text field focus state.
|
|
1388
|
-
*/
|
|
1389
|
-
MDCTextFieldFoundation.prototype.activateFocus = function () {
|
|
1390
|
-
this.isFocused = true;
|
|
1391
|
-
this.styleFocused(this.isFocused);
|
|
1392
|
-
this.adapter.activateLineRipple();
|
|
1393
|
-
if (this.adapter.hasLabel()) {
|
|
1394
|
-
this.notchOutline(this.shouldFloat);
|
|
1395
|
-
this.adapter.floatLabel(this.shouldFloat);
|
|
1396
|
-
this.styleFloating(this.shouldFloat);
|
|
1397
|
-
this.adapter.shakeLabel(this.shouldShake);
|
|
1398
|
-
}
|
|
1399
|
-
if (this.helperText &&
|
|
1400
|
-
(this.helperText.isPersistent() || !this.helperText.isValidation() ||
|
|
1401
|
-
!this.valid)) {
|
|
1402
|
-
this.helperText.showToScreenReader();
|
|
1403
|
-
}
|
|
1404
|
-
};
|
|
1405
|
-
/**
|
|
1406
|
-
* Sets the line ripple's transform origin, so that the line ripple activate
|
|
1407
|
-
* animation will animate out from the user's click location.
|
|
1408
|
-
*/
|
|
1409
|
-
MDCTextFieldFoundation.prototype.setTransformOrigin = function (evt) {
|
|
1410
|
-
if (this.isDisabled() || this.adapter.hasOutline()) {
|
|
1411
|
-
return;
|
|
1412
|
-
}
|
|
1413
|
-
var touches = evt.touches;
|
|
1414
|
-
var targetEvent = touches ? touches[0] : evt;
|
|
1415
|
-
var targetClientRect = targetEvent.target.getBoundingClientRect();
|
|
1416
|
-
var normalizedX = targetEvent.clientX - targetClientRect.left;
|
|
1417
|
-
this.adapter.setLineRippleTransformOrigin(normalizedX);
|
|
1418
|
-
};
|
|
1419
|
-
/**
|
|
1420
|
-
* Handles input change of text input and text area.
|
|
1421
|
-
*/
|
|
1422
|
-
MDCTextFieldFoundation.prototype.handleInput = function () {
|
|
1423
|
-
this.autoCompleteFocus();
|
|
1424
|
-
this.setcharacterCounter(this.getValue().length);
|
|
1425
|
-
};
|
|
1426
|
-
/**
|
|
1427
|
-
* Activates the Text Field's focus state in cases when the input value
|
|
1428
|
-
* changes without user input (e.g. programmatically).
|
|
1429
|
-
*/
|
|
1430
|
-
MDCTextFieldFoundation.prototype.autoCompleteFocus = function () {
|
|
1431
|
-
if (!this.receivedUserInput) {
|
|
1432
|
-
this.activateFocus();
|
|
1433
|
-
}
|
|
1434
|
-
};
|
|
1435
|
-
/**
|
|
1436
|
-
* Deactivates the Text Field's focus state.
|
|
1437
|
-
*/
|
|
1438
|
-
MDCTextFieldFoundation.prototype.deactivateFocus = function () {
|
|
1439
|
-
this.isFocused = false;
|
|
1440
|
-
this.adapter.deactivateLineRipple();
|
|
1441
|
-
var isValid = this.isValid();
|
|
1442
|
-
this.styleValidity(isValid);
|
|
1443
|
-
this.styleFocused(this.isFocused);
|
|
1444
|
-
if (this.adapter.hasLabel()) {
|
|
1445
|
-
this.notchOutline(this.shouldFloat);
|
|
1446
|
-
this.adapter.floatLabel(this.shouldFloat);
|
|
1447
|
-
this.styleFloating(this.shouldFloat);
|
|
1448
|
-
this.adapter.shakeLabel(this.shouldShake);
|
|
1449
|
-
}
|
|
1450
|
-
if (!this.shouldFloat) {
|
|
1451
|
-
this.receivedUserInput = false;
|
|
1452
|
-
}
|
|
1453
|
-
};
|
|
1454
|
-
MDCTextFieldFoundation.prototype.getValue = function () {
|
|
1455
|
-
return this.getNativeInput().value;
|
|
1456
|
-
};
|
|
1457
|
-
/**
|
|
1458
|
-
* @param value The value to set on the input Element.
|
|
1459
|
-
*/
|
|
1460
|
-
MDCTextFieldFoundation.prototype.setValue = function (value) {
|
|
1461
|
-
// Prevent Safari from moving the caret to the end of the input when the
|
|
1462
|
-
// value has not changed.
|
|
1463
|
-
if (this.getValue() !== value) {
|
|
1464
|
-
this.getNativeInput().value = value;
|
|
1465
|
-
}
|
|
1466
|
-
this.setcharacterCounter(value.length);
|
|
1467
|
-
if (this.validateOnValueChange) {
|
|
1468
|
-
var isValid = this.isValid();
|
|
1469
|
-
this.styleValidity(isValid);
|
|
1470
|
-
}
|
|
1471
|
-
if (this.adapter.hasLabel()) {
|
|
1472
|
-
this.notchOutline(this.shouldFloat);
|
|
1473
|
-
this.adapter.floatLabel(this.shouldFloat);
|
|
1474
|
-
this.styleFloating(this.shouldFloat);
|
|
1475
|
-
if (this.validateOnValueChange) {
|
|
1476
|
-
this.adapter.shakeLabel(this.shouldShake);
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
};
|
|
1480
|
-
/**
|
|
1481
|
-
* @return The custom validity state, if set; otherwise, the result of a
|
|
1482
|
-
* native validity check.
|
|
1483
|
-
*/
|
|
1484
|
-
MDCTextFieldFoundation.prototype.isValid = function () {
|
|
1485
|
-
return this.useNativeValidation ? this.isNativeInputValid() : this.valid;
|
|
1486
|
-
};
|
|
1487
|
-
/**
|
|
1488
|
-
* @param isValid Sets the custom validity state of the Text Field.
|
|
1489
|
-
*/
|
|
1490
|
-
MDCTextFieldFoundation.prototype.setValid = function (isValid) {
|
|
1491
|
-
this.valid = isValid;
|
|
1492
|
-
this.styleValidity(isValid);
|
|
1493
|
-
var shouldShake = !isValid && !this.isFocused && !!this.getValue();
|
|
1494
|
-
if (this.adapter.hasLabel()) {
|
|
1495
|
-
this.adapter.shakeLabel(shouldShake);
|
|
1496
|
-
}
|
|
1497
|
-
};
|
|
1498
|
-
/**
|
|
1499
|
-
* @param shouldValidate Whether or not validity should be updated on
|
|
1500
|
-
* value change.
|
|
1501
|
-
*/
|
|
1502
|
-
MDCTextFieldFoundation.prototype.setValidateOnValueChange = function (shouldValidate) {
|
|
1503
|
-
this.validateOnValueChange = shouldValidate;
|
|
1504
|
-
};
|
|
1505
|
-
/**
|
|
1506
|
-
* @return Whether or not validity should be updated on value change. `true`
|
|
1507
|
-
* by default.
|
|
1508
|
-
*/
|
|
1509
|
-
MDCTextFieldFoundation.prototype.getValidateOnValueChange = function () {
|
|
1510
|
-
return this.validateOnValueChange;
|
|
1511
|
-
};
|
|
1512
|
-
/**
|
|
1513
|
-
* Enables or disables the use of native validation. Use this for custom
|
|
1514
|
-
* validation.
|
|
1515
|
-
* @param useNativeValidation Set this to false to ignore native input
|
|
1516
|
-
* validation.
|
|
1517
|
-
*/
|
|
1518
|
-
MDCTextFieldFoundation.prototype.setUseNativeValidation = function (useNativeValidation) {
|
|
1519
|
-
this.useNativeValidation = useNativeValidation;
|
|
1520
|
-
};
|
|
1521
|
-
MDCTextFieldFoundation.prototype.isDisabled = function () {
|
|
1522
|
-
return this.getNativeInput().disabled;
|
|
1523
|
-
};
|
|
1524
|
-
/**
|
|
1525
|
-
* @param disabled Sets the text-field disabled or enabled.
|
|
1526
|
-
*/
|
|
1527
|
-
MDCTextFieldFoundation.prototype.setDisabled = function (disabled) {
|
|
1528
|
-
this.getNativeInput().disabled = disabled;
|
|
1529
|
-
this.styleDisabled(disabled);
|
|
1530
|
-
};
|
|
1531
|
-
/**
|
|
1532
|
-
* @param content Sets the content of the helper text.
|
|
1533
|
-
*/
|
|
1534
|
-
MDCTextFieldFoundation.prototype.setHelperTextContent = function (content) {
|
|
1535
|
-
if (this.helperText) {
|
|
1536
|
-
this.helperText.setContent(content);
|
|
1537
|
-
}
|
|
1538
|
-
};
|
|
1539
|
-
/**
|
|
1540
|
-
* Sets the aria label of the leading icon.
|
|
1541
|
-
*/
|
|
1542
|
-
MDCTextFieldFoundation.prototype.setLeadingIconAriaLabel = function (label) {
|
|
1543
|
-
if (this.leadingIcon) {
|
|
1544
|
-
this.leadingIcon.setAriaLabel(label);
|
|
1545
|
-
}
|
|
1546
|
-
};
|
|
1547
|
-
/**
|
|
1548
|
-
* Sets the text content of the leading icon.
|
|
1549
|
-
*/
|
|
1550
|
-
MDCTextFieldFoundation.prototype.setLeadingIconContent = function (content) {
|
|
1551
|
-
if (this.leadingIcon) {
|
|
1552
|
-
this.leadingIcon.setContent(content);
|
|
1553
|
-
}
|
|
1554
|
-
};
|
|
1555
|
-
/**
|
|
1556
|
-
* Sets the aria label of the trailing icon.
|
|
1557
|
-
*/
|
|
1558
|
-
MDCTextFieldFoundation.prototype.setTrailingIconAriaLabel = function (label) {
|
|
1559
|
-
if (this.trailingIcon) {
|
|
1560
|
-
this.trailingIcon.setAriaLabel(label);
|
|
1561
|
-
}
|
|
1562
|
-
};
|
|
1563
|
-
/**
|
|
1564
|
-
* Sets the text content of the trailing icon.
|
|
1565
|
-
*/
|
|
1566
|
-
MDCTextFieldFoundation.prototype.setTrailingIconContent = function (content) {
|
|
1567
|
-
if (this.trailingIcon) {
|
|
1568
|
-
this.trailingIcon.setContent(content);
|
|
1569
|
-
}
|
|
1570
|
-
};
|
|
1571
|
-
/**
|
|
1572
|
-
* Sets character counter values that shows characters used and the total
|
|
1573
|
-
* character limit.
|
|
1574
|
-
*/
|
|
1575
|
-
MDCTextFieldFoundation.prototype.setcharacterCounter = function (currentLength) {
|
|
1576
|
-
if (!this.characterCounter) {
|
|
1577
|
-
return;
|
|
1578
|
-
}
|
|
1579
|
-
var maxLength = this.getNativeInput().maxLength;
|
|
1580
|
-
if (maxLength === -1) {
|
|
1581
|
-
throw new Error('MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.');
|
|
1582
|
-
}
|
|
1583
|
-
this.characterCounter.setCounterValue(currentLength, maxLength);
|
|
1584
|
-
};
|
|
1585
|
-
/**
|
|
1586
|
-
* @return True if the Text Field input fails in converting the user-supplied
|
|
1587
|
-
* value.
|
|
1588
|
-
*/
|
|
1589
|
-
MDCTextFieldFoundation.prototype.isBadInput = function () {
|
|
1590
|
-
// The badInput property is not supported in IE 11 💩.
|
|
1591
|
-
return this.getNativeInput().validity.badInput || false;
|
|
1592
|
-
};
|
|
1593
|
-
/**
|
|
1594
|
-
* @return The result of native validity checking (ValidityState.valid).
|
|
1595
|
-
*/
|
|
1596
|
-
MDCTextFieldFoundation.prototype.isNativeInputValid = function () {
|
|
1597
|
-
return this.getNativeInput().validity.valid;
|
|
1598
|
-
};
|
|
1599
|
-
/**
|
|
1600
|
-
* Styles the component based on the validity state.
|
|
1601
|
-
*/
|
|
1602
|
-
MDCTextFieldFoundation.prototype.styleValidity = function (isValid) {
|
|
1603
|
-
var INVALID = MDCTextFieldFoundation.cssClasses.INVALID;
|
|
1604
|
-
if (isValid) {
|
|
1605
|
-
this.adapter.removeClass(INVALID);
|
|
1606
|
-
}
|
|
1607
|
-
else {
|
|
1608
|
-
this.adapter.addClass(INVALID);
|
|
1609
|
-
}
|
|
1610
|
-
if (this.helperText) {
|
|
1611
|
-
this.helperText.setValidity(isValid);
|
|
1612
|
-
// We dynamically set or unset aria-describedby for validation helper text
|
|
1613
|
-
// only, based on whether the field is valid
|
|
1614
|
-
var helperTextValidation = this.helperText.isValidation();
|
|
1615
|
-
if (!helperTextValidation) {
|
|
1616
|
-
return;
|
|
1617
|
-
}
|
|
1618
|
-
var helperTextVisible = this.helperText.isVisible();
|
|
1619
|
-
var helperTextId = this.helperText.getId();
|
|
1620
|
-
if (helperTextVisible && helperTextId) {
|
|
1621
|
-
this.adapter.setInputAttr(strings$3.ARIA_DESCRIBEDBY, helperTextId);
|
|
1622
|
-
}
|
|
1623
|
-
else {
|
|
1624
|
-
this.adapter.removeInputAttr(strings$3.ARIA_DESCRIBEDBY);
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
};
|
|
1628
|
-
/**
|
|
1629
|
-
* Styles the component based on the focused state.
|
|
1630
|
-
*/
|
|
1631
|
-
MDCTextFieldFoundation.prototype.styleFocused = function (isFocused) {
|
|
1632
|
-
var FOCUSED = MDCTextFieldFoundation.cssClasses.FOCUSED;
|
|
1633
|
-
if (isFocused) {
|
|
1634
|
-
this.adapter.addClass(FOCUSED);
|
|
1635
|
-
}
|
|
1636
|
-
else {
|
|
1637
|
-
this.adapter.removeClass(FOCUSED);
|
|
1638
|
-
}
|
|
1639
|
-
};
|
|
1640
|
-
/**
|
|
1641
|
-
* Styles the component based on the disabled state.
|
|
1642
|
-
*/
|
|
1643
|
-
MDCTextFieldFoundation.prototype.styleDisabled = function (isDisabled) {
|
|
1644
|
-
var _a = MDCTextFieldFoundation.cssClasses, DISABLED = _a.DISABLED, INVALID = _a.INVALID;
|
|
1645
|
-
if (isDisabled) {
|
|
1646
|
-
this.adapter.addClass(DISABLED);
|
|
1647
|
-
this.adapter.removeClass(INVALID);
|
|
1648
|
-
}
|
|
1649
|
-
else {
|
|
1650
|
-
this.adapter.removeClass(DISABLED);
|
|
1651
|
-
}
|
|
1652
|
-
if (this.leadingIcon) {
|
|
1653
|
-
this.leadingIcon.setDisabled(isDisabled);
|
|
1654
|
-
}
|
|
1655
|
-
if (this.trailingIcon) {
|
|
1656
|
-
this.trailingIcon.setDisabled(isDisabled);
|
|
1657
|
-
}
|
|
1658
|
-
};
|
|
1659
|
-
/**
|
|
1660
|
-
* Styles the component based on the label floating state.
|
|
1661
|
-
*/
|
|
1662
|
-
MDCTextFieldFoundation.prototype.styleFloating = function (isFloating) {
|
|
1663
|
-
var LABEL_FLOATING = MDCTextFieldFoundation.cssClasses.LABEL_FLOATING;
|
|
1664
|
-
if (isFloating) {
|
|
1665
|
-
this.adapter.addClass(LABEL_FLOATING);
|
|
1666
|
-
}
|
|
1667
|
-
else {
|
|
1668
|
-
this.adapter.removeClass(LABEL_FLOATING);
|
|
1669
|
-
}
|
|
1670
|
-
};
|
|
1671
|
-
/**
|
|
1672
|
-
* @return The native text input element from the host environment, or an
|
|
1673
|
-
* object with the same shape for unit tests.
|
|
1674
|
-
*/
|
|
1675
|
-
MDCTextFieldFoundation.prototype.getNativeInput = function () {
|
|
1676
|
-
// this.adapter may be undefined in foundation unit tests. This happens when
|
|
1677
|
-
// testdouble is creating a mock object and invokes the
|
|
1678
|
-
// shouldShake/shouldFloat getters (which in turn call getValue(), which
|
|
1679
|
-
// calls this method) before init() has been called from the MDCTextField
|
|
1680
|
-
// constructor. To work around that issue, we return a dummy object.
|
|
1681
|
-
var nativeInput = this.adapter ? this.adapter.getNativeInput() : null;
|
|
1682
|
-
return nativeInput || {
|
|
1683
|
-
disabled: false,
|
|
1684
|
-
maxLength: -1,
|
|
1685
|
-
required: false,
|
|
1686
|
-
type: 'input',
|
|
1687
|
-
validity: {
|
|
1688
|
-
badInput: false,
|
|
1689
|
-
valid: true,
|
|
1690
|
-
},
|
|
1691
|
-
value: '',
|
|
1692
|
-
};
|
|
1693
|
-
};
|
|
1694
|
-
return MDCTextFieldFoundation;
|
|
1695
|
-
}(MDCFoundation));
|
|
1696
|
-
|
|
1697
|
-
/**
|
|
1698
|
-
* @license
|
|
1699
|
-
* Copyright 2016 Google Inc.
|
|
1700
|
-
*
|
|
1701
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1702
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
1703
|
-
* in the Software without restriction, including without limitation the rights
|
|
1704
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1705
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
1706
|
-
* furnished to do so, subject to the following conditions:
|
|
1707
|
-
*
|
|
1708
|
-
* The above copyright notice and this permission notice shall be included in
|
|
1709
|
-
* all copies or substantial portions of the Software.
|
|
1710
|
-
*
|
|
1711
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1712
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1713
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1714
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1715
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1716
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1717
|
-
* THE SOFTWARE.
|
|
1718
|
-
*/
|
|
1719
|
-
var cssClasses$2 = {
|
|
1720
|
-
HELPER_TEXT_PERSISTENT: 'mdc-text-field-helper-text--persistent',
|
|
1721
|
-
HELPER_TEXT_VALIDATION_MSG: 'mdc-text-field-helper-text--validation-msg',
|
|
1722
|
-
ROOT: 'mdc-text-field-helper-text',
|
|
1723
|
-
};
|
|
1724
|
-
var strings$2 = {
|
|
1725
|
-
ARIA_HIDDEN: 'aria-hidden',
|
|
1726
|
-
ROLE: 'role',
|
|
1727
|
-
ROOT_SELECTOR: "." + cssClasses$2.ROOT,
|
|
1728
|
-
};
|
|
1729
|
-
|
|
1730
|
-
/**
|
|
1731
|
-
* @license
|
|
1732
|
-
* Copyright 2017 Google Inc.
|
|
1733
|
-
*
|
|
1734
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1735
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
1736
|
-
* in the Software without restriction, including without limitation the rights
|
|
1737
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1738
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
1739
|
-
* furnished to do so, subject to the following conditions:
|
|
1740
|
-
*
|
|
1741
|
-
* The above copyright notice and this permission notice shall be included in
|
|
1742
|
-
* all copies or substantial portions of the Software.
|
|
1743
|
-
*
|
|
1744
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1745
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1746
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1747
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1748
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1749
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1750
|
-
* THE SOFTWARE.
|
|
1751
|
-
*/
|
|
1752
|
-
var MDCTextFieldHelperTextFoundation = /** @class */ (function (_super) {
|
|
1753
|
-
__extends(MDCTextFieldHelperTextFoundation, _super);
|
|
1754
|
-
function MDCTextFieldHelperTextFoundation(adapter) {
|
|
1755
|
-
return _super.call(this, __assign(__assign({}, MDCTextFieldHelperTextFoundation.defaultAdapter), adapter)) || this;
|
|
1756
|
-
}
|
|
1757
|
-
Object.defineProperty(MDCTextFieldHelperTextFoundation, "cssClasses", {
|
|
1758
|
-
get: function () {
|
|
1759
|
-
return cssClasses$2;
|
|
1760
|
-
},
|
|
1761
|
-
enumerable: false,
|
|
1762
|
-
configurable: true
|
|
1763
|
-
});
|
|
1764
|
-
Object.defineProperty(MDCTextFieldHelperTextFoundation, "strings", {
|
|
1765
|
-
get: function () {
|
|
1766
|
-
return strings$2;
|
|
1767
|
-
},
|
|
1768
|
-
enumerable: false,
|
|
1769
|
-
configurable: true
|
|
1770
|
-
});
|
|
1771
|
-
Object.defineProperty(MDCTextFieldHelperTextFoundation, "defaultAdapter", {
|
|
1772
|
-
/**
|
|
1773
|
-
* See {@link MDCTextFieldHelperTextAdapter} for typing information on parameters and return types.
|
|
1774
|
-
*/
|
|
1775
|
-
get: function () {
|
|
1776
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
1777
|
-
return {
|
|
1778
|
-
addClass: function () { return undefined; },
|
|
1779
|
-
removeClass: function () { return undefined; },
|
|
1780
|
-
hasClass: function () { return false; },
|
|
1781
|
-
getAttr: function () { return null; },
|
|
1782
|
-
setAttr: function () { return undefined; },
|
|
1783
|
-
removeAttr: function () { return undefined; },
|
|
1784
|
-
setContent: function () { return undefined; },
|
|
1785
|
-
};
|
|
1786
|
-
// tslint:enable:object-literal-sort-keys
|
|
1787
|
-
},
|
|
1788
|
-
enumerable: false,
|
|
1789
|
-
configurable: true
|
|
1790
|
-
});
|
|
1791
|
-
MDCTextFieldHelperTextFoundation.prototype.getId = function () {
|
|
1792
|
-
return this.adapter.getAttr('id');
|
|
1793
|
-
};
|
|
1794
|
-
MDCTextFieldHelperTextFoundation.prototype.isVisible = function () {
|
|
1795
|
-
return this.adapter.getAttr(strings$2.ARIA_HIDDEN) !== 'true';
|
|
1796
|
-
};
|
|
1797
|
-
/**
|
|
1798
|
-
* Sets the content of the helper text field.
|
|
1799
|
-
*/
|
|
1800
|
-
MDCTextFieldHelperTextFoundation.prototype.setContent = function (content) {
|
|
1801
|
-
this.adapter.setContent(content);
|
|
1802
|
-
};
|
|
1803
|
-
MDCTextFieldHelperTextFoundation.prototype.isPersistent = function () {
|
|
1804
|
-
return this.adapter.hasClass(cssClasses$2.HELPER_TEXT_PERSISTENT);
|
|
1805
|
-
};
|
|
1806
|
-
/**
|
|
1807
|
-
* @param isPersistent Sets the persistency of the helper text.
|
|
1808
|
-
*/
|
|
1809
|
-
MDCTextFieldHelperTextFoundation.prototype.setPersistent = function (isPersistent) {
|
|
1810
|
-
if (isPersistent) {
|
|
1811
|
-
this.adapter.addClass(cssClasses$2.HELPER_TEXT_PERSISTENT);
|
|
1812
|
-
}
|
|
1813
|
-
else {
|
|
1814
|
-
this.adapter.removeClass(cssClasses$2.HELPER_TEXT_PERSISTENT);
|
|
1815
|
-
}
|
|
1816
|
-
};
|
|
1817
|
-
/**
|
|
1818
|
-
* @return whether the helper text acts as an error validation message.
|
|
1819
|
-
*/
|
|
1820
|
-
MDCTextFieldHelperTextFoundation.prototype.isValidation = function () {
|
|
1821
|
-
return this.adapter.hasClass(cssClasses$2.HELPER_TEXT_VALIDATION_MSG);
|
|
1822
|
-
};
|
|
1823
|
-
/**
|
|
1824
|
-
* @param isValidation True to make the helper text act as an error validation message.
|
|
1825
|
-
*/
|
|
1826
|
-
MDCTextFieldHelperTextFoundation.prototype.setValidation = function (isValidation) {
|
|
1827
|
-
if (isValidation) {
|
|
1828
|
-
this.adapter.addClass(cssClasses$2.HELPER_TEXT_VALIDATION_MSG);
|
|
1829
|
-
}
|
|
1830
|
-
else {
|
|
1831
|
-
this.adapter.removeClass(cssClasses$2.HELPER_TEXT_VALIDATION_MSG);
|
|
1832
|
-
}
|
|
1833
|
-
};
|
|
1834
|
-
/**
|
|
1835
|
-
* Makes the helper text visible to the screen reader.
|
|
1836
|
-
*/
|
|
1837
|
-
MDCTextFieldHelperTextFoundation.prototype.showToScreenReader = function () {
|
|
1838
|
-
this.adapter.removeAttr(strings$2.ARIA_HIDDEN);
|
|
1839
|
-
};
|
|
1840
|
-
/**
|
|
1841
|
-
* Sets the validity of the helper text based on the input validity.
|
|
1842
|
-
*/
|
|
1843
|
-
MDCTextFieldHelperTextFoundation.prototype.setValidity = function (inputIsValid) {
|
|
1844
|
-
var helperTextIsPersistent = this.adapter.hasClass(cssClasses$2.HELPER_TEXT_PERSISTENT);
|
|
1845
|
-
var helperTextIsValidationMsg = this.adapter.hasClass(cssClasses$2.HELPER_TEXT_VALIDATION_MSG);
|
|
1846
|
-
var validationMsgNeedsDisplay = helperTextIsValidationMsg && !inputIsValid;
|
|
1847
|
-
if (validationMsgNeedsDisplay) {
|
|
1848
|
-
this.showToScreenReader();
|
|
1849
|
-
// If role is already alert, refresh it to trigger another announcement
|
|
1850
|
-
// from screenreader.
|
|
1851
|
-
if (this.adapter.getAttr(strings$2.ROLE) === 'alert') {
|
|
1852
|
-
this.refreshAlertRole();
|
|
1853
|
-
}
|
|
1854
|
-
else {
|
|
1855
|
-
this.adapter.setAttr(strings$2.ROLE, 'alert');
|
|
1856
|
-
}
|
|
1857
|
-
}
|
|
1858
|
-
else {
|
|
1859
|
-
this.adapter.removeAttr(strings$2.ROLE);
|
|
1860
|
-
}
|
|
1861
|
-
if (!helperTextIsPersistent && !validationMsgNeedsDisplay) {
|
|
1862
|
-
this.hide();
|
|
1863
|
-
}
|
|
1864
|
-
};
|
|
1865
|
-
/**
|
|
1866
|
-
* Hides the help text from screen readers.
|
|
1867
|
-
*/
|
|
1868
|
-
MDCTextFieldHelperTextFoundation.prototype.hide = function () {
|
|
1869
|
-
this.adapter.setAttr(strings$2.ARIA_HIDDEN, 'true');
|
|
1870
|
-
};
|
|
1871
|
-
MDCTextFieldHelperTextFoundation.prototype.refreshAlertRole = function () {
|
|
1872
|
-
var _this = this;
|
|
1873
|
-
this.adapter.removeAttr(strings$2.ROLE);
|
|
1874
|
-
requestAnimationFrame(function () {
|
|
1875
|
-
_this.adapter.setAttr(strings$2.ROLE, 'alert');
|
|
1876
|
-
});
|
|
1877
|
-
};
|
|
1878
|
-
return MDCTextFieldHelperTextFoundation;
|
|
1879
|
-
}(MDCFoundation));
|
|
1880
|
-
|
|
1881
|
-
/**
|
|
1882
|
-
* @license
|
|
1883
|
-
* Copyright 2017 Google Inc.
|
|
1884
|
-
*
|
|
1885
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1886
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
1887
|
-
* in the Software without restriction, including without limitation the rights
|
|
1888
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1889
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
1890
|
-
* furnished to do so, subject to the following conditions:
|
|
1891
|
-
*
|
|
1892
|
-
* The above copyright notice and this permission notice shall be included in
|
|
1893
|
-
* all copies or substantial portions of the Software.
|
|
1894
|
-
*
|
|
1895
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1896
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1897
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1898
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1899
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1900
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1901
|
-
* THE SOFTWARE.
|
|
1902
|
-
*/
|
|
1903
|
-
var MDCTextFieldHelperText = /** @class */ (function (_super) {
|
|
1904
|
-
__extends(MDCTextFieldHelperText, _super);
|
|
1905
|
-
function MDCTextFieldHelperText() {
|
|
1906
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1907
|
-
}
|
|
1908
|
-
MDCTextFieldHelperText.attachTo = function (root) {
|
|
1909
|
-
return new MDCTextFieldHelperText(root);
|
|
1910
|
-
};
|
|
1911
|
-
Object.defineProperty(MDCTextFieldHelperText.prototype, "foundationForTextField", {
|
|
1912
|
-
// Provided for access by MDCTextField component
|
|
1913
|
-
get: function () {
|
|
1914
|
-
return this.foundation;
|
|
1915
|
-
},
|
|
1916
|
-
enumerable: false,
|
|
1917
|
-
configurable: true
|
|
1918
|
-
});
|
|
1919
|
-
MDCTextFieldHelperText.prototype.getDefaultFoundation = function () {
|
|
1920
|
-
var _this = this;
|
|
1921
|
-
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
|
|
1922
|
-
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
|
|
1923
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
1924
|
-
var adapter = {
|
|
1925
|
-
addClass: function (className) { return _this.root.classList.add(className); },
|
|
1926
|
-
removeClass: function (className) { return _this.root.classList.remove(className); },
|
|
1927
|
-
hasClass: function (className) { return _this.root.classList.contains(className); },
|
|
1928
|
-
getAttr: function (attr) { return _this.root.getAttribute(attr); },
|
|
1929
|
-
setAttr: function (attr, value) { return _this.root.setAttribute(attr, value); },
|
|
1930
|
-
removeAttr: function (attr) { return _this.root.removeAttribute(attr); },
|
|
1931
|
-
setContent: function (content) {
|
|
1932
|
-
_this.root.textContent = content;
|
|
1933
|
-
},
|
|
1934
|
-
};
|
|
1935
|
-
// tslint:enable:object-literal-sort-keys
|
|
1936
|
-
return new MDCTextFieldHelperTextFoundation(adapter);
|
|
1937
|
-
};
|
|
1938
|
-
return MDCTextFieldHelperText;
|
|
1939
|
-
}(MDCComponent));
|
|
1940
|
-
|
|
1941
|
-
/**
|
|
1942
|
-
* @license
|
|
1943
|
-
* Copyright 2016 Google Inc.
|
|
1944
|
-
*
|
|
1945
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1946
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
1947
|
-
* in the Software without restriction, including without limitation the rights
|
|
1948
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1949
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
1950
|
-
* furnished to do so, subject to the following conditions:
|
|
1951
|
-
*
|
|
1952
|
-
* The above copyright notice and this permission notice shall be included in
|
|
1953
|
-
* all copies or substantial portions of the Software.
|
|
1954
|
-
*
|
|
1955
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1956
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1957
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1958
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1959
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1960
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1961
|
-
* THE SOFTWARE.
|
|
1962
|
-
*/
|
|
1963
|
-
var strings$1 = {
|
|
1964
|
-
ICON_EVENT: 'MDCTextField:icon',
|
|
1965
|
-
ICON_ROLE: 'button',
|
|
1966
|
-
};
|
|
1967
|
-
var cssClasses$1 = {
|
|
1968
|
-
ROOT: 'mdc-text-field__icon',
|
|
1969
|
-
};
|
|
1970
|
-
|
|
1971
|
-
/**
|
|
1972
|
-
* @license
|
|
1973
|
-
* Copyright 2017 Google Inc.
|
|
1974
|
-
*
|
|
1975
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1976
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
1977
|
-
* in the Software without restriction, including without limitation the rights
|
|
1978
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1979
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
1980
|
-
* furnished to do so, subject to the following conditions:
|
|
1981
|
-
*
|
|
1982
|
-
* The above copyright notice and this permission notice shall be included in
|
|
1983
|
-
* all copies or substantial portions of the Software.
|
|
1984
|
-
*
|
|
1985
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1986
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1987
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1988
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1989
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1990
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1991
|
-
* THE SOFTWARE.
|
|
1992
|
-
*/
|
|
1993
|
-
var INTERACTION_EVENTS = ['click', 'keydown'];
|
|
1994
|
-
var MDCTextFieldIconFoundation = /** @class */ (function (_super) {
|
|
1995
|
-
__extends(MDCTextFieldIconFoundation, _super);
|
|
1996
|
-
function MDCTextFieldIconFoundation(adapter) {
|
|
1997
|
-
var _this = _super.call(this, __assign(__assign({}, MDCTextFieldIconFoundation.defaultAdapter), adapter)) || this;
|
|
1998
|
-
_this.savedTabIndex = null;
|
|
1999
|
-
_this.interactionHandler = function (evt) {
|
|
2000
|
-
_this.handleInteraction(evt);
|
|
2001
|
-
};
|
|
2002
|
-
return _this;
|
|
2003
|
-
}
|
|
2004
|
-
Object.defineProperty(MDCTextFieldIconFoundation, "strings", {
|
|
2005
|
-
get: function () {
|
|
2006
|
-
return strings$1;
|
|
2007
|
-
},
|
|
2008
|
-
enumerable: false,
|
|
2009
|
-
configurable: true
|
|
2010
|
-
});
|
|
2011
|
-
Object.defineProperty(MDCTextFieldIconFoundation, "cssClasses", {
|
|
2012
|
-
get: function () {
|
|
2013
|
-
return cssClasses$1;
|
|
2014
|
-
},
|
|
2015
|
-
enumerable: false,
|
|
2016
|
-
configurable: true
|
|
2017
|
-
});
|
|
2018
|
-
Object.defineProperty(MDCTextFieldIconFoundation, "defaultAdapter", {
|
|
2019
|
-
/**
|
|
2020
|
-
* See {@link MDCTextFieldIconAdapter} for typing information on parameters and return types.
|
|
2021
|
-
*/
|
|
2022
|
-
get: function () {
|
|
2023
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
2024
|
-
return {
|
|
2025
|
-
getAttr: function () { return null; },
|
|
2026
|
-
setAttr: function () { return undefined; },
|
|
2027
|
-
removeAttr: function () { return undefined; },
|
|
2028
|
-
setContent: function () { return undefined; },
|
|
2029
|
-
registerInteractionHandler: function () { return undefined; },
|
|
2030
|
-
deregisterInteractionHandler: function () { return undefined; },
|
|
2031
|
-
notifyIconAction: function () { return undefined; },
|
|
2032
|
-
};
|
|
2033
|
-
// tslint:enable:object-literal-sort-keys
|
|
2034
|
-
},
|
|
2035
|
-
enumerable: false,
|
|
2036
|
-
configurable: true
|
|
2037
|
-
});
|
|
2038
|
-
MDCTextFieldIconFoundation.prototype.init = function () {
|
|
2039
|
-
var e_1, _a;
|
|
2040
|
-
this.savedTabIndex = this.adapter.getAttr('tabindex');
|
|
2041
|
-
try {
|
|
2042
|
-
for (var INTERACTION_EVENTS_1 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next(); !INTERACTION_EVENTS_1_1.done; INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next()) {
|
|
2043
|
-
var evtType = INTERACTION_EVENTS_1_1.value;
|
|
2044
|
-
this.adapter.registerInteractionHandler(evtType, this.interactionHandler);
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2048
|
-
finally {
|
|
2049
|
-
try {
|
|
2050
|
-
if (INTERACTION_EVENTS_1_1 && !INTERACTION_EVENTS_1_1.done && (_a = INTERACTION_EVENTS_1.return)) _a.call(INTERACTION_EVENTS_1);
|
|
2051
|
-
}
|
|
2052
|
-
finally { if (e_1) throw e_1.error; }
|
|
2053
|
-
}
|
|
2054
|
-
};
|
|
2055
|
-
MDCTextFieldIconFoundation.prototype.destroy = function () {
|
|
2056
|
-
var e_2, _a;
|
|
2057
|
-
try {
|
|
2058
|
-
for (var INTERACTION_EVENTS_2 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next(); !INTERACTION_EVENTS_2_1.done; INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next()) {
|
|
2059
|
-
var evtType = INTERACTION_EVENTS_2_1.value;
|
|
2060
|
-
this.adapter.deregisterInteractionHandler(evtType, this.interactionHandler);
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2064
|
-
finally {
|
|
2065
|
-
try {
|
|
2066
|
-
if (INTERACTION_EVENTS_2_1 && !INTERACTION_EVENTS_2_1.done && (_a = INTERACTION_EVENTS_2.return)) _a.call(INTERACTION_EVENTS_2);
|
|
2067
|
-
}
|
|
2068
|
-
finally { if (e_2) throw e_2.error; }
|
|
2069
|
-
}
|
|
2070
|
-
};
|
|
2071
|
-
MDCTextFieldIconFoundation.prototype.setDisabled = function (disabled) {
|
|
2072
|
-
if (!this.savedTabIndex) {
|
|
2073
|
-
return;
|
|
2074
|
-
}
|
|
2075
|
-
if (disabled) {
|
|
2076
|
-
this.adapter.setAttr('tabindex', '-1');
|
|
2077
|
-
this.adapter.removeAttr('role');
|
|
2078
|
-
}
|
|
2079
|
-
else {
|
|
2080
|
-
this.adapter.setAttr('tabindex', this.savedTabIndex);
|
|
2081
|
-
this.adapter.setAttr('role', strings$1.ICON_ROLE);
|
|
2082
|
-
}
|
|
2083
|
-
};
|
|
2084
|
-
MDCTextFieldIconFoundation.prototype.setAriaLabel = function (label) {
|
|
2085
|
-
this.adapter.setAttr('aria-label', label);
|
|
2086
|
-
};
|
|
2087
|
-
MDCTextFieldIconFoundation.prototype.setContent = function (content) {
|
|
2088
|
-
this.adapter.setContent(content);
|
|
2089
|
-
};
|
|
2090
|
-
MDCTextFieldIconFoundation.prototype.handleInteraction = function (evt) {
|
|
2091
|
-
var isEnterKey = evt.key === 'Enter' || evt.keyCode === 13;
|
|
2092
|
-
if (evt.type === 'click' || isEnterKey) {
|
|
2093
|
-
evt.preventDefault(); // stop click from causing host label to focus
|
|
2094
|
-
// input
|
|
2095
|
-
this.adapter.notifyIconAction();
|
|
2096
|
-
}
|
|
2097
|
-
};
|
|
2098
|
-
return MDCTextFieldIconFoundation;
|
|
2099
|
-
}(MDCFoundation));
|
|
2100
|
-
|
|
2101
|
-
/**
|
|
2102
|
-
* @license
|
|
2103
|
-
* Copyright 2017 Google Inc.
|
|
2104
|
-
*
|
|
2105
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2106
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
2107
|
-
* in the Software without restriction, including without limitation the rights
|
|
2108
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2109
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
2110
|
-
* furnished to do so, subject to the following conditions:
|
|
2111
|
-
*
|
|
2112
|
-
* The above copyright notice and this permission notice shall be included in
|
|
2113
|
-
* all copies or substantial portions of the Software.
|
|
2114
|
-
*
|
|
2115
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2116
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2117
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2118
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2119
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2120
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2121
|
-
* THE SOFTWARE.
|
|
2122
|
-
*/
|
|
2123
|
-
var MDCTextFieldIcon = /** @class */ (function (_super) {
|
|
2124
|
-
__extends(MDCTextFieldIcon, _super);
|
|
2125
|
-
function MDCTextFieldIcon() {
|
|
2126
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2127
|
-
}
|
|
2128
|
-
MDCTextFieldIcon.attachTo = function (root) {
|
|
2129
|
-
return new MDCTextFieldIcon(root);
|
|
2130
|
-
};
|
|
2131
|
-
Object.defineProperty(MDCTextFieldIcon.prototype, "foundationForTextField", {
|
|
2132
|
-
// Provided for access by MDCTextField component
|
|
2133
|
-
get: function () {
|
|
2134
|
-
return this.foundation;
|
|
2135
|
-
},
|
|
2136
|
-
enumerable: false,
|
|
2137
|
-
configurable: true
|
|
2138
|
-
});
|
|
2139
|
-
MDCTextFieldIcon.prototype.getDefaultFoundation = function () {
|
|
2140
|
-
var _this = this;
|
|
2141
|
-
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
|
|
2142
|
-
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
|
|
2143
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
2144
|
-
var adapter = {
|
|
2145
|
-
getAttr: function (attr) { return _this.root.getAttribute(attr); },
|
|
2146
|
-
setAttr: function (attr, value) { return _this.root.setAttribute(attr, value); },
|
|
2147
|
-
removeAttr: function (attr) { return _this.root.removeAttribute(attr); },
|
|
2148
|
-
setContent: function (content) {
|
|
2149
|
-
_this.root.textContent = content;
|
|
2150
|
-
},
|
|
2151
|
-
registerInteractionHandler: function (evtType, handler) { return _this.listen(evtType, handler); },
|
|
2152
|
-
deregisterInteractionHandler: function (evtType, handler) { return _this.unlisten(evtType, handler); },
|
|
2153
|
-
notifyIconAction: function () { return _this.emit(MDCTextFieldIconFoundation.strings.ICON_EVENT, {} /* evtData */, true /* shouldBubble */); },
|
|
2154
|
-
};
|
|
2155
|
-
// tslint:enable:object-literal-sort-keys
|
|
2156
|
-
return new MDCTextFieldIconFoundation(adapter);
|
|
2157
|
-
};
|
|
2158
|
-
return MDCTextFieldIcon;
|
|
2159
|
-
}(MDCComponent));
|
|
2160
|
-
|
|
2161
|
-
/**
|
|
2162
|
-
* @license
|
|
2163
|
-
* Copyright 2016 Google Inc.
|
|
2164
|
-
*
|
|
2165
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2166
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
2167
|
-
* in the Software without restriction, including without limitation the rights
|
|
2168
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2169
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
2170
|
-
* furnished to do so, subject to the following conditions:
|
|
2171
|
-
*
|
|
2172
|
-
* The above copyright notice and this permission notice shall be included in
|
|
2173
|
-
* all copies or substantial portions of the Software.
|
|
2174
|
-
*
|
|
2175
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2176
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2177
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2178
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2179
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2180
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2181
|
-
* THE SOFTWARE.
|
|
2182
|
-
*/
|
|
2183
|
-
var MDCTextField = /** @class */ (function (_super) {
|
|
2184
|
-
__extends(MDCTextField, _super);
|
|
2185
|
-
function MDCTextField() {
|
|
2186
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2187
|
-
}
|
|
2188
|
-
MDCTextField.attachTo = function (root) {
|
|
2189
|
-
return new MDCTextField(root);
|
|
2190
|
-
};
|
|
2191
|
-
MDCTextField.prototype.initialize = function (rippleFactory, lineRippleFactory, helperTextFactory, characterCounterFactory, iconFactory, labelFactory, outlineFactory) {
|
|
2192
|
-
if (rippleFactory === void 0) { rippleFactory = function (el, foundation) { return new MDCRipple(el, foundation); }; }
|
|
2193
|
-
if (lineRippleFactory === void 0) { lineRippleFactory = function (el) { return new MDCLineRipple(el); }; }
|
|
2194
|
-
if (helperTextFactory === void 0) { helperTextFactory = function (el) {
|
|
2195
|
-
return new MDCTextFieldHelperText(el);
|
|
2196
|
-
}; }
|
|
2197
|
-
if (characterCounterFactory === void 0) { characterCounterFactory = function (el) {
|
|
2198
|
-
return new MDCTextFieldCharacterCounter(el);
|
|
2199
|
-
}; }
|
|
2200
|
-
if (iconFactory === void 0) { iconFactory = function (el) { return new MDCTextFieldIcon(el); }; }
|
|
2201
|
-
if (labelFactory === void 0) { labelFactory = function (el) { return new MDCFloatingLabel(el); }; }
|
|
2202
|
-
if (outlineFactory === void 0) { outlineFactory = function (el) { return new MDCNotchedOutline(el); }; }
|
|
2203
|
-
this.input =
|
|
2204
|
-
this.root.querySelector(strings$3.INPUT_SELECTOR);
|
|
2205
|
-
var labelElement = this.root.querySelector(strings$3.LABEL_SELECTOR);
|
|
2206
|
-
this.label = labelElement ? labelFactory(labelElement) : null;
|
|
2207
|
-
var lineRippleElement = this.root.querySelector(strings$3.LINE_RIPPLE_SELECTOR);
|
|
2208
|
-
this.lineRipple =
|
|
2209
|
-
lineRippleElement ? lineRippleFactory(lineRippleElement) : null;
|
|
2210
|
-
var outlineElement = this.root.querySelector(strings$3.OUTLINE_SELECTOR);
|
|
2211
|
-
this.outline = outlineElement ? outlineFactory(outlineElement) : null;
|
|
2212
|
-
// Helper text
|
|
2213
|
-
var helperTextStrings = MDCTextFieldHelperTextFoundation.strings;
|
|
2214
|
-
var nextElementSibling = this.root.nextElementSibling;
|
|
2215
|
-
var hasHelperLine = (nextElementSibling && nextElementSibling.classList.contains(cssClasses$3.HELPER_LINE));
|
|
2216
|
-
var helperTextEl = hasHelperLine && nextElementSibling && nextElementSibling.querySelector(helperTextStrings.ROOT_SELECTOR);
|
|
2217
|
-
this.helperText = helperTextEl ? helperTextFactory(helperTextEl) : null;
|
|
2218
|
-
// Character counter
|
|
2219
|
-
var characterCounterStrings = MDCTextFieldCharacterCounterFoundation.strings;
|
|
2220
|
-
var characterCounterEl = this.root.querySelector(characterCounterStrings.ROOT_SELECTOR);
|
|
2221
|
-
// If character counter is not found in root element search in sibling element.
|
|
2222
|
-
if (!characterCounterEl && hasHelperLine && nextElementSibling) {
|
|
2223
|
-
characterCounterEl = nextElementSibling.querySelector(characterCounterStrings.ROOT_SELECTOR);
|
|
2224
|
-
}
|
|
2225
|
-
this.characterCounter =
|
|
2226
|
-
characterCounterEl ? characterCounterFactory(characterCounterEl) : null;
|
|
2227
|
-
// Leading icon
|
|
2228
|
-
var leadingIconEl = this.root.querySelector(strings$3.LEADING_ICON_SELECTOR);
|
|
2229
|
-
this.leadingIcon = leadingIconEl ? iconFactory(leadingIconEl) : null;
|
|
2230
|
-
// Trailing icon
|
|
2231
|
-
var trailingIconEl = this.root.querySelector(strings$3.TRAILING_ICON_SELECTOR);
|
|
2232
|
-
this.trailingIcon = trailingIconEl ? iconFactory(trailingIconEl) : null;
|
|
2233
|
-
// Prefix and Suffix
|
|
2234
|
-
this.prefix = this.root.querySelector(strings$3.PREFIX_SELECTOR);
|
|
2235
|
-
this.suffix = this.root.querySelector(strings$3.SUFFIX_SELECTOR);
|
|
2236
|
-
this.ripple = this.createRipple(rippleFactory);
|
|
2237
|
-
};
|
|
2238
|
-
MDCTextField.prototype.destroy = function () {
|
|
2239
|
-
if (this.ripple) {
|
|
2240
|
-
this.ripple.destroy();
|
|
2241
|
-
}
|
|
2242
|
-
if (this.lineRipple) {
|
|
2243
|
-
this.lineRipple.destroy();
|
|
2244
|
-
}
|
|
2245
|
-
if (this.helperText) {
|
|
2246
|
-
this.helperText.destroy();
|
|
2247
|
-
}
|
|
2248
|
-
if (this.characterCounter) {
|
|
2249
|
-
this.characterCounter.destroy();
|
|
2250
|
-
}
|
|
2251
|
-
if (this.leadingIcon) {
|
|
2252
|
-
this.leadingIcon.destroy();
|
|
2253
|
-
}
|
|
2254
|
-
if (this.trailingIcon) {
|
|
2255
|
-
this.trailingIcon.destroy();
|
|
2256
|
-
}
|
|
2257
|
-
if (this.label) {
|
|
2258
|
-
this.label.destroy();
|
|
2259
|
-
}
|
|
2260
|
-
if (this.outline) {
|
|
2261
|
-
this.outline.destroy();
|
|
2262
|
-
}
|
|
2263
|
-
_super.prototype.destroy.call(this);
|
|
2264
|
-
};
|
|
2265
|
-
/**
|
|
2266
|
-
* Initializes the Text Field's internal state based on the environment's
|
|
2267
|
-
* state.
|
|
2268
|
-
*/
|
|
2269
|
-
MDCTextField.prototype.initialSyncWithDOM = function () {
|
|
2270
|
-
this.disabled = this.input.disabled;
|
|
2271
|
-
};
|
|
2272
|
-
Object.defineProperty(MDCTextField.prototype, "value", {
|
|
2273
|
-
get: function () {
|
|
2274
|
-
return this.foundation.getValue();
|
|
2275
|
-
},
|
|
2276
|
-
/**
|
|
2277
|
-
* @param value The value to set on the input.
|
|
2278
|
-
*/
|
|
2279
|
-
set: function (value) {
|
|
2280
|
-
this.foundation.setValue(value);
|
|
2281
|
-
},
|
|
2282
|
-
enumerable: false,
|
|
2283
|
-
configurable: true
|
|
2284
|
-
});
|
|
2285
|
-
Object.defineProperty(MDCTextField.prototype, "disabled", {
|
|
2286
|
-
get: function () {
|
|
2287
|
-
return this.foundation.isDisabled();
|
|
2288
|
-
},
|
|
2289
|
-
/**
|
|
2290
|
-
* @param disabled Sets the Text Field disabled or enabled.
|
|
2291
|
-
*/
|
|
2292
|
-
set: function (disabled) {
|
|
2293
|
-
this.foundation.setDisabled(disabled);
|
|
2294
|
-
},
|
|
2295
|
-
enumerable: false,
|
|
2296
|
-
configurable: true
|
|
2297
|
-
});
|
|
2298
|
-
Object.defineProperty(MDCTextField.prototype, "valid", {
|
|
2299
|
-
get: function () {
|
|
2300
|
-
return this.foundation.isValid();
|
|
2301
|
-
},
|
|
2302
|
-
/**
|
|
2303
|
-
* @param valid Sets the Text Field valid or invalid.
|
|
2304
|
-
*/
|
|
2305
|
-
set: function (valid) {
|
|
2306
|
-
this.foundation.setValid(valid);
|
|
2307
|
-
},
|
|
2308
|
-
enumerable: false,
|
|
2309
|
-
configurable: true
|
|
2310
|
-
});
|
|
2311
|
-
Object.defineProperty(MDCTextField.prototype, "required", {
|
|
2312
|
-
get: function () {
|
|
2313
|
-
return this.input.required;
|
|
2314
|
-
},
|
|
2315
|
-
/**
|
|
2316
|
-
* @param required Sets the Text Field to required.
|
|
2317
|
-
*/
|
|
2318
|
-
set: function (required) {
|
|
2319
|
-
this.input.required = required;
|
|
2320
|
-
},
|
|
2321
|
-
enumerable: false,
|
|
2322
|
-
configurable: true
|
|
2323
|
-
});
|
|
2324
|
-
Object.defineProperty(MDCTextField.prototype, "pattern", {
|
|
2325
|
-
get: function () {
|
|
2326
|
-
return this.input.pattern;
|
|
2327
|
-
},
|
|
2328
|
-
/**
|
|
2329
|
-
* @param pattern Sets the input element's validation pattern.
|
|
2330
|
-
*/
|
|
2331
|
-
set: function (pattern) {
|
|
2332
|
-
this.input.pattern = pattern;
|
|
2333
|
-
},
|
|
2334
|
-
enumerable: false,
|
|
2335
|
-
configurable: true
|
|
2336
|
-
});
|
|
2337
|
-
Object.defineProperty(MDCTextField.prototype, "minLength", {
|
|
2338
|
-
get: function () {
|
|
2339
|
-
return this.input.minLength;
|
|
2340
|
-
},
|
|
2341
|
-
/**
|
|
2342
|
-
* @param minLength Sets the input element's minLength.
|
|
2343
|
-
*/
|
|
2344
|
-
set: function (minLength) {
|
|
2345
|
-
this.input.minLength = minLength;
|
|
2346
|
-
},
|
|
2347
|
-
enumerable: false,
|
|
2348
|
-
configurable: true
|
|
2349
|
-
});
|
|
2350
|
-
Object.defineProperty(MDCTextField.prototype, "maxLength", {
|
|
2351
|
-
get: function () {
|
|
2352
|
-
return this.input.maxLength;
|
|
2353
|
-
},
|
|
2354
|
-
/**
|
|
2355
|
-
* @param maxLength Sets the input element's maxLength.
|
|
2356
|
-
*/
|
|
2357
|
-
set: function (maxLength) {
|
|
2358
|
-
// Chrome throws exception if maxLength is set to a value less than zero
|
|
2359
|
-
if (maxLength < 0) {
|
|
2360
|
-
this.input.removeAttribute('maxLength');
|
|
2361
|
-
}
|
|
2362
|
-
else {
|
|
2363
|
-
this.input.maxLength = maxLength;
|
|
2364
|
-
}
|
|
2365
|
-
},
|
|
2366
|
-
enumerable: false,
|
|
2367
|
-
configurable: true
|
|
2368
|
-
});
|
|
2369
|
-
Object.defineProperty(MDCTextField.prototype, "min", {
|
|
2370
|
-
get: function () {
|
|
2371
|
-
return this.input.min;
|
|
2372
|
-
},
|
|
2373
|
-
/**
|
|
2374
|
-
* @param min Sets the input element's min.
|
|
2375
|
-
*/
|
|
2376
|
-
set: function (min) {
|
|
2377
|
-
this.input.min = min;
|
|
2378
|
-
},
|
|
2379
|
-
enumerable: false,
|
|
2380
|
-
configurable: true
|
|
2381
|
-
});
|
|
2382
|
-
Object.defineProperty(MDCTextField.prototype, "max", {
|
|
2383
|
-
get: function () {
|
|
2384
|
-
return this.input.max;
|
|
2385
|
-
},
|
|
2386
|
-
/**
|
|
2387
|
-
* @param max Sets the input element's max.
|
|
2388
|
-
*/
|
|
2389
|
-
set: function (max) {
|
|
2390
|
-
this.input.max = max;
|
|
2391
|
-
},
|
|
2392
|
-
enumerable: false,
|
|
2393
|
-
configurable: true
|
|
2394
|
-
});
|
|
2395
|
-
Object.defineProperty(MDCTextField.prototype, "step", {
|
|
2396
|
-
get: function () {
|
|
2397
|
-
return this.input.step;
|
|
2398
|
-
},
|
|
2399
|
-
/**
|
|
2400
|
-
* @param step Sets the input element's step.
|
|
2401
|
-
*/
|
|
2402
|
-
set: function (step) {
|
|
2403
|
-
this.input.step = step;
|
|
2404
|
-
},
|
|
2405
|
-
enumerable: false,
|
|
2406
|
-
configurable: true
|
|
2407
|
-
});
|
|
2408
|
-
Object.defineProperty(MDCTextField.prototype, "helperTextContent", {
|
|
2409
|
-
/**
|
|
2410
|
-
* Sets the helper text element content.
|
|
2411
|
-
*/
|
|
2412
|
-
set: function (content) {
|
|
2413
|
-
this.foundation.setHelperTextContent(content);
|
|
2414
|
-
},
|
|
2415
|
-
enumerable: false,
|
|
2416
|
-
configurable: true
|
|
2417
|
-
});
|
|
2418
|
-
Object.defineProperty(MDCTextField.prototype, "leadingIconAriaLabel", {
|
|
2419
|
-
/**
|
|
2420
|
-
* Sets the aria label of the leading icon.
|
|
2421
|
-
*/
|
|
2422
|
-
set: function (label) {
|
|
2423
|
-
this.foundation.setLeadingIconAriaLabel(label);
|
|
2424
|
-
},
|
|
2425
|
-
enumerable: false,
|
|
2426
|
-
configurable: true
|
|
2427
|
-
});
|
|
2428
|
-
Object.defineProperty(MDCTextField.prototype, "leadingIconContent", {
|
|
2429
|
-
/**
|
|
2430
|
-
* Sets the text content of the leading icon.
|
|
2431
|
-
*/
|
|
2432
|
-
set: function (content) {
|
|
2433
|
-
this.foundation.setLeadingIconContent(content);
|
|
2434
|
-
},
|
|
2435
|
-
enumerable: false,
|
|
2436
|
-
configurable: true
|
|
2437
|
-
});
|
|
2438
|
-
Object.defineProperty(MDCTextField.prototype, "trailingIconAriaLabel", {
|
|
2439
|
-
/**
|
|
2440
|
-
* Sets the aria label of the trailing icon.
|
|
2441
|
-
*/
|
|
2442
|
-
set: function (label) {
|
|
2443
|
-
this.foundation.setTrailingIconAriaLabel(label);
|
|
2444
|
-
},
|
|
2445
|
-
enumerable: false,
|
|
2446
|
-
configurable: true
|
|
2447
|
-
});
|
|
2448
|
-
Object.defineProperty(MDCTextField.prototype, "trailingIconContent", {
|
|
2449
|
-
/**
|
|
2450
|
-
* Sets the text content of the trailing icon.
|
|
2451
|
-
*/
|
|
2452
|
-
set: function (content) {
|
|
2453
|
-
this.foundation.setTrailingIconContent(content);
|
|
2454
|
-
},
|
|
2455
|
-
enumerable: false,
|
|
2456
|
-
configurable: true
|
|
2457
|
-
});
|
|
2458
|
-
Object.defineProperty(MDCTextField.prototype, "useNativeValidation", {
|
|
2459
|
-
/**
|
|
2460
|
-
* Enables or disables the use of native validation. Use this for custom validation.
|
|
2461
|
-
* @param useNativeValidation Set this to false to ignore native input validation.
|
|
2462
|
-
*/
|
|
2463
|
-
set: function (useNativeValidation) {
|
|
2464
|
-
this.foundation.setUseNativeValidation(useNativeValidation);
|
|
2465
|
-
},
|
|
2466
|
-
enumerable: false,
|
|
2467
|
-
configurable: true
|
|
2468
|
-
});
|
|
2469
|
-
Object.defineProperty(MDCTextField.prototype, "prefixText", {
|
|
2470
|
-
/**
|
|
2471
|
-
* Gets the text content of the prefix, or null if it does not exist.
|
|
2472
|
-
*/
|
|
2473
|
-
get: function () {
|
|
2474
|
-
return this.prefix ? this.prefix.textContent : null;
|
|
2475
|
-
},
|
|
2476
|
-
/**
|
|
2477
|
-
* Sets the text content of the prefix, if it exists.
|
|
2478
|
-
*/
|
|
2479
|
-
set: function (prefixText) {
|
|
2480
|
-
if (this.prefix) {
|
|
2481
|
-
this.prefix.textContent = prefixText;
|
|
2482
|
-
}
|
|
2483
|
-
},
|
|
2484
|
-
enumerable: false,
|
|
2485
|
-
configurable: true
|
|
2486
|
-
});
|
|
2487
|
-
Object.defineProperty(MDCTextField.prototype, "suffixText", {
|
|
2488
|
-
/**
|
|
2489
|
-
* Gets the text content of the suffix, or null if it does not exist.
|
|
2490
|
-
*/
|
|
2491
|
-
get: function () {
|
|
2492
|
-
return this.suffix ? this.suffix.textContent : null;
|
|
2493
|
-
},
|
|
2494
|
-
/**
|
|
2495
|
-
* Sets the text content of the suffix, if it exists.
|
|
2496
|
-
*/
|
|
2497
|
-
set: function (suffixText) {
|
|
2498
|
-
if (this.suffix) {
|
|
2499
|
-
this.suffix.textContent = suffixText;
|
|
2500
|
-
}
|
|
2501
|
-
},
|
|
2502
|
-
enumerable: false,
|
|
2503
|
-
configurable: true
|
|
2504
|
-
});
|
|
2505
|
-
/**
|
|
2506
|
-
* Focuses the input element.
|
|
2507
|
-
*/
|
|
2508
|
-
MDCTextField.prototype.focus = function () {
|
|
2509
|
-
this.input.focus();
|
|
2510
|
-
};
|
|
2511
|
-
/**
|
|
2512
|
-
* Recomputes the outline SVG path for the outline element.
|
|
2513
|
-
*/
|
|
2514
|
-
MDCTextField.prototype.layout = function () {
|
|
2515
|
-
var openNotch = this.foundation.shouldFloat;
|
|
2516
|
-
this.foundation.notchOutline(openNotch);
|
|
2517
|
-
};
|
|
2518
|
-
MDCTextField.prototype.getDefaultFoundation = function () {
|
|
2519
|
-
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
|
|
2520
|
-
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
|
|
2521
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
2522
|
-
var adapter = __assign(__assign(__assign(__assign(__assign({}, this.getRootAdapterMethods()), this.getInputAdapterMethods()), this.getLabelAdapterMethods()), this.getLineRippleAdapterMethods()), this.getOutlineAdapterMethods());
|
|
2523
|
-
// tslint:enable:object-literal-sort-keys
|
|
2524
|
-
return new MDCTextFieldFoundation(adapter, this.getFoundationMap());
|
|
2525
|
-
};
|
|
2526
|
-
MDCTextField.prototype.getRootAdapterMethods = function () {
|
|
2527
|
-
var _this = this;
|
|
2528
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
2529
|
-
return {
|
|
2530
|
-
addClass: function (className) { return _this.root.classList.add(className); },
|
|
2531
|
-
removeClass: function (className) { return _this.root.classList.remove(className); },
|
|
2532
|
-
hasClass: function (className) { return _this.root.classList.contains(className); },
|
|
2533
|
-
registerTextFieldInteractionHandler: function (evtType, handler) {
|
|
2534
|
-
_this.listen(evtType, handler);
|
|
2535
|
-
},
|
|
2536
|
-
deregisterTextFieldInteractionHandler: function (evtType, handler) {
|
|
2537
|
-
_this.unlisten(evtType, handler);
|
|
2538
|
-
},
|
|
2539
|
-
registerValidationAttributeChangeHandler: function (handler) {
|
|
2540
|
-
var getAttributesList = function (mutationsList) {
|
|
2541
|
-
return mutationsList
|
|
2542
|
-
.map(function (mutation) { return mutation.attributeName; })
|
|
2543
|
-
.filter(function (attributeName) { return attributeName; });
|
|
2544
|
-
};
|
|
2545
|
-
var observer = new MutationObserver(function (mutationsList) { return handler(getAttributesList(mutationsList)); });
|
|
2546
|
-
var config = { attributes: true };
|
|
2547
|
-
observer.observe(_this.input, config);
|
|
2548
|
-
return observer;
|
|
2549
|
-
},
|
|
2550
|
-
deregisterValidationAttributeChangeHandler: function (observer) {
|
|
2551
|
-
observer.disconnect();
|
|
2552
|
-
},
|
|
2553
|
-
};
|
|
2554
|
-
// tslint:enable:object-literal-sort-keys
|
|
2555
|
-
};
|
|
2556
|
-
MDCTextField.prototype.getInputAdapterMethods = function () {
|
|
2557
|
-
var _this = this;
|
|
2558
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
2559
|
-
return {
|
|
2560
|
-
getNativeInput: function () { return _this.input; },
|
|
2561
|
-
setInputAttr: function (attr, value) {
|
|
2562
|
-
_this.input.setAttribute(attr, value);
|
|
2563
|
-
},
|
|
2564
|
-
removeInputAttr: function (attr) {
|
|
2565
|
-
_this.input.removeAttribute(attr);
|
|
2566
|
-
},
|
|
2567
|
-
isFocused: function () { return document.activeElement === _this.input; },
|
|
2568
|
-
registerInputInteractionHandler: function (evtType, handler) {
|
|
2569
|
-
_this.input.addEventListener(evtType, handler, applyPassive());
|
|
2570
|
-
},
|
|
2571
|
-
deregisterInputInteractionHandler: function (evtType, handler) {
|
|
2572
|
-
_this.input.removeEventListener(evtType, handler, applyPassive());
|
|
2573
|
-
},
|
|
2574
|
-
};
|
|
2575
|
-
// tslint:enable:object-literal-sort-keys
|
|
2576
|
-
};
|
|
2577
|
-
MDCTextField.prototype.getLabelAdapterMethods = function () {
|
|
2578
|
-
var _this = this;
|
|
2579
|
-
return {
|
|
2580
|
-
floatLabel: function (shouldFloat) {
|
|
2581
|
-
_this.label && _this.label.float(shouldFloat);
|
|
2582
|
-
},
|
|
2583
|
-
getLabelWidth: function () { return _this.label ? _this.label.getWidth() : 0; },
|
|
2584
|
-
hasLabel: function () { return Boolean(_this.label); },
|
|
2585
|
-
shakeLabel: function (shouldShake) {
|
|
2586
|
-
_this.label && _this.label.shake(shouldShake);
|
|
2587
|
-
},
|
|
2588
|
-
setLabelRequired: function (isRequired) {
|
|
2589
|
-
_this.label && _this.label.setRequired(isRequired);
|
|
2590
|
-
},
|
|
2591
|
-
};
|
|
2592
|
-
};
|
|
2593
|
-
MDCTextField.prototype.getLineRippleAdapterMethods = function () {
|
|
2594
|
-
var _this = this;
|
|
2595
|
-
return {
|
|
2596
|
-
activateLineRipple: function () {
|
|
2597
|
-
if (_this.lineRipple) {
|
|
2598
|
-
_this.lineRipple.activate();
|
|
2599
|
-
}
|
|
2600
|
-
},
|
|
2601
|
-
deactivateLineRipple: function () {
|
|
2602
|
-
if (_this.lineRipple) {
|
|
2603
|
-
_this.lineRipple.deactivate();
|
|
2604
|
-
}
|
|
2605
|
-
},
|
|
2606
|
-
setLineRippleTransformOrigin: function (normalizedX) {
|
|
2607
|
-
if (_this.lineRipple) {
|
|
2608
|
-
_this.lineRipple.setRippleCenter(normalizedX);
|
|
2609
|
-
}
|
|
2610
|
-
},
|
|
2611
|
-
};
|
|
2612
|
-
};
|
|
2613
|
-
MDCTextField.prototype.getOutlineAdapterMethods = function () {
|
|
2614
|
-
var _this = this;
|
|
2615
|
-
return {
|
|
2616
|
-
closeOutline: function () {
|
|
2617
|
-
_this.outline && _this.outline.closeNotch();
|
|
2618
|
-
},
|
|
2619
|
-
hasOutline: function () { return Boolean(_this.outline); },
|
|
2620
|
-
notchOutline: function (labelWidth) {
|
|
2621
|
-
_this.outline && _this.outline.notch(labelWidth);
|
|
2622
|
-
},
|
|
2623
|
-
};
|
|
2624
|
-
};
|
|
2625
|
-
/**
|
|
2626
|
-
* @return A map of all subcomponents to subfoundations.
|
|
2627
|
-
*/
|
|
2628
|
-
MDCTextField.prototype.getFoundationMap = function () {
|
|
2629
|
-
return {
|
|
2630
|
-
characterCounter: this.characterCounter ?
|
|
2631
|
-
this.characterCounter.foundationForTextField :
|
|
2632
|
-
undefined,
|
|
2633
|
-
helperText: this.helperText ? this.helperText.foundationForTextField :
|
|
2634
|
-
undefined,
|
|
2635
|
-
leadingIcon: this.leadingIcon ? this.leadingIcon.foundationForTextField :
|
|
2636
|
-
undefined,
|
|
2637
|
-
trailingIcon: this.trailingIcon ?
|
|
2638
|
-
this.trailingIcon.foundationForTextField :
|
|
2639
|
-
undefined,
|
|
2640
|
-
};
|
|
2641
|
-
};
|
|
2642
|
-
MDCTextField.prototype.createRipple = function (rippleFactory) {
|
|
2643
|
-
var _this = this;
|
|
2644
|
-
var isTextArea = this.root.classList.contains(cssClasses$3.TEXTAREA);
|
|
2645
|
-
var isOutlined = this.root.classList.contains(cssClasses$3.OUTLINED);
|
|
2646
|
-
if (isTextArea || isOutlined) {
|
|
2647
|
-
return null;
|
|
2648
|
-
}
|
|
2649
|
-
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
|
|
2650
|
-
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
|
|
2651
|
-
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
|
|
2652
|
-
var adapter = __assign(__assign({}, MDCRipple.createAdapter(this)), { isSurfaceActive: function () { return matches(_this.input, ':active'); }, registerInteractionHandler: function (evtType, handler) {
|
|
2653
|
-
_this.input.addEventListener(evtType, handler, applyPassive());
|
|
2654
|
-
}, deregisterInteractionHandler: function (evtType, handler) {
|
|
2655
|
-
_this.input.removeEventListener(evtType, handler, applyPassive());
|
|
2656
|
-
} });
|
|
2657
|
-
// tslint:enable:object-literal-sort-keys
|
|
2658
|
-
return rippleFactory(this.root, new MDCRippleFoundation(adapter));
|
|
2659
|
-
};
|
|
2660
|
-
return MDCTextField;
|
|
2661
|
-
}(MDCComponent));
|
|
2662
|
-
|
|
2663
|
-
/**
|
|
2664
|
-
* @license
|
|
2665
|
-
* Copyright 2017 Google Inc.
|
|
2666
|
-
*
|
|
2667
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2668
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
2669
|
-
* in the Software without restriction, including without limitation the rights
|
|
2670
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2671
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
2672
|
-
* furnished to do so, subject to the following conditions:
|
|
2673
|
-
*
|
|
2674
|
-
* The above copyright notice and this permission notice shall be included in
|
|
2675
|
-
* all copies or substantial portions of the Software.
|
|
2676
|
-
*
|
|
2677
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2678
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2679
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2680
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2681
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2682
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2683
|
-
* THE SOFTWARE.
|
|
2684
|
-
*/
|
|
2685
|
-
var cssClasses = {
|
|
2686
|
-
ROOT: 'mdc-form-field',
|
|
2687
|
-
};
|
|
2688
|
-
var strings = {
|
|
2689
|
-
LABEL_SELECTOR: '.mdc-form-field > label',
|
|
2690
|
-
};
|
|
2691
|
-
|
|
2692
|
-
/**
|
|
2693
|
-
* @license
|
|
2694
|
-
* Copyright 2017 Google Inc.
|
|
2695
|
-
*
|
|
2696
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2697
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
2698
|
-
* in the Software without restriction, including without limitation the rights
|
|
2699
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2700
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
2701
|
-
* furnished to do so, subject to the following conditions:
|
|
2702
|
-
*
|
|
2703
|
-
* The above copyright notice and this permission notice shall be included in
|
|
2704
|
-
* all copies or substantial portions of the Software.
|
|
2705
|
-
*
|
|
2706
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2707
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2708
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2709
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2710
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2711
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2712
|
-
* THE SOFTWARE.
|
|
2713
|
-
*/
|
|
2714
|
-
var MDCFormFieldFoundation = /** @class */ (function (_super) {
|
|
2715
|
-
__extends(MDCFormFieldFoundation, _super);
|
|
2716
|
-
function MDCFormFieldFoundation(adapter) {
|
|
2717
|
-
var _this = _super.call(this, __assign(__assign({}, MDCFormFieldFoundation.defaultAdapter), adapter)) || this;
|
|
2718
|
-
_this.click = function () {
|
|
2719
|
-
_this.handleClick();
|
|
2720
|
-
};
|
|
2721
|
-
return _this;
|
|
2722
|
-
}
|
|
2723
|
-
Object.defineProperty(MDCFormFieldFoundation, "cssClasses", {
|
|
2724
|
-
get: function () {
|
|
2725
|
-
return cssClasses;
|
|
2726
|
-
},
|
|
2727
|
-
enumerable: false,
|
|
2728
|
-
configurable: true
|
|
2729
|
-
});
|
|
2730
|
-
Object.defineProperty(MDCFormFieldFoundation, "strings", {
|
|
2731
|
-
get: function () {
|
|
2732
|
-
return strings;
|
|
2733
|
-
},
|
|
2734
|
-
enumerable: false,
|
|
2735
|
-
configurable: true
|
|
2736
|
-
});
|
|
2737
|
-
Object.defineProperty(MDCFormFieldFoundation, "defaultAdapter", {
|
|
2738
|
-
get: function () {
|
|
2739
|
-
return {
|
|
2740
|
-
activateInputRipple: function () { return undefined; },
|
|
2741
|
-
deactivateInputRipple: function () { return undefined; },
|
|
2742
|
-
deregisterInteractionHandler: function () { return undefined; },
|
|
2743
|
-
registerInteractionHandler: function () { return undefined; },
|
|
2744
|
-
};
|
|
2745
|
-
},
|
|
2746
|
-
enumerable: false,
|
|
2747
|
-
configurable: true
|
|
2748
|
-
});
|
|
2749
|
-
MDCFormFieldFoundation.prototype.init = function () {
|
|
2750
|
-
this.adapter.registerInteractionHandler('click', this.click);
|
|
2751
|
-
};
|
|
2752
|
-
MDCFormFieldFoundation.prototype.destroy = function () {
|
|
2753
|
-
this.adapter.deregisterInteractionHandler('click', this.click);
|
|
2754
|
-
};
|
|
2755
|
-
MDCFormFieldFoundation.prototype.handleClick = function () {
|
|
2756
|
-
var _this = this;
|
|
2757
|
-
this.adapter.activateInputRipple();
|
|
2758
|
-
requestAnimationFrame(function () {
|
|
2759
|
-
_this.adapter.deactivateInputRipple();
|
|
2760
|
-
});
|
|
2761
|
-
};
|
|
2762
|
-
return MDCFormFieldFoundation;
|
|
2763
|
-
}(MDCFoundation));
|
|
2764
|
-
|
|
2765
|
-
/**
|
|
2766
|
-
* @license
|
|
2767
|
-
* Copyright 2017 Google Inc.
|
|
2768
|
-
*
|
|
2769
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2770
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
2771
|
-
* in the Software without restriction, including without limitation the rights
|
|
2772
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2773
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
2774
|
-
* furnished to do so, subject to the following conditions:
|
|
2775
|
-
*
|
|
2776
|
-
* The above copyright notice and this permission notice shall be included in
|
|
2777
|
-
* all copies or substantial portions of the Software.
|
|
2778
|
-
*
|
|
2779
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2780
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2781
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2782
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2783
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2784
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2785
|
-
* THE SOFTWARE.
|
|
2786
|
-
*/
|
|
2787
|
-
var MDCFormField = /** @class */ (function (_super) {
|
|
2788
|
-
__extends(MDCFormField, _super);
|
|
2789
|
-
function MDCFormField() {
|
|
2790
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2791
|
-
}
|
|
2792
|
-
MDCFormField.attachTo = function (root) {
|
|
2793
|
-
return new MDCFormField(root);
|
|
2794
|
-
};
|
|
2795
|
-
MDCFormField.prototype.labelEl = function () {
|
|
2796
|
-
var LABEL_SELECTOR = MDCFormFieldFoundation.strings.LABEL_SELECTOR;
|
|
2797
|
-
return this.root.querySelector(LABEL_SELECTOR);
|
|
2798
|
-
};
|
|
2799
|
-
MDCFormField.prototype.getDefaultFoundation = function () {
|
|
2800
|
-
var _this = this;
|
|
2801
|
-
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
|
|
2802
|
-
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
|
|
2803
|
-
var adapter = {
|
|
2804
|
-
activateInputRipple: function () {
|
|
2805
|
-
if (_this.input && _this.input.ripple) {
|
|
2806
|
-
_this.input.ripple.activate();
|
|
2807
|
-
}
|
|
2808
|
-
},
|
|
2809
|
-
deactivateInputRipple: function () {
|
|
2810
|
-
if (_this.input && _this.input.ripple) {
|
|
2811
|
-
_this.input.ripple.deactivate();
|
|
2812
|
-
}
|
|
2813
|
-
},
|
|
2814
|
-
deregisterInteractionHandler: function (evtType, handler) {
|
|
2815
|
-
var labelEl = _this.labelEl();
|
|
2816
|
-
if (labelEl) {
|
|
2817
|
-
labelEl.removeEventListener(evtType, handler);
|
|
2818
|
-
}
|
|
2819
|
-
},
|
|
2820
|
-
registerInteractionHandler: function (evtType, handler) {
|
|
2821
|
-
var labelEl = _this.labelEl();
|
|
2822
|
-
if (labelEl) {
|
|
2823
|
-
labelEl.addEventListener(evtType, handler);
|
|
2824
|
-
}
|
|
2825
|
-
},
|
|
2826
|
-
};
|
|
2827
|
-
return new MDCFormFieldFoundation(adapter);
|
|
2828
|
-
};
|
|
2829
|
-
return MDCFormField;
|
|
2830
|
-
}(MDCComponent));
|
|
2831
|
-
|
|
2832
|
-
/**
|
|
2833
|
-
* Instantiates Material Design text field component.
|
|
2834
|
-
* @param el - Must be the f-component wrapper (.f-text-field)
|
|
2835
|
-
* @see https://material-components.github.io/material-components-web-catalog/#/component/text-field
|
|
2836
|
-
*/
|
|
2837
|
-
function FTextFieldMDC(el) {
|
|
2838
|
-
const component = new MDCTextField(el.querySelector('.mdc-text-field'));
|
|
2839
|
-
const form = el.querySelector('.mdc-form-field');
|
|
2840
|
-
const helper = el.querySelector('.mdc-text-field-helper-text');
|
|
2841
|
-
const counter = el.querySelector('.mdc-text-field-character-counter');
|
|
2842
|
-
const icon = el.querySelector('.mdc-text-field-icon');
|
|
2843
|
-
if (form) {
|
|
2844
|
-
const formField = MDCFormField.attachTo(form);
|
|
2845
|
-
if (formField) {
|
|
2846
|
-
formField.input = component;
|
|
2847
|
-
}
|
|
2848
|
-
}
|
|
2849
|
-
if (helper) {
|
|
2850
|
-
new MDCTextFieldHelperText(helper);
|
|
2851
|
-
}
|
|
2852
|
-
if (counter) {
|
|
2853
|
-
new MDCTextFieldCharacterCounter(counter);
|
|
2854
|
-
}
|
|
2855
|
-
if (icon) {
|
|
2856
|
-
new MDCTextFieldIcon(icon);
|
|
2857
|
-
}
|
|
2858
|
-
}
|
|
13
|
+
import { M as MDCRipple } from './component-c4eb6153.js';
|
|
14
|
+
import './tslib.es6-8f2d44b6.js';
|
|
2859
15
|
|
|
2860
16
|
/**
|
|
2861
17
|
* Props of the kup-autocomplete component.
|
|
@@ -3594,7 +750,7 @@ var KupGlobalFilterMode;
|
|
|
3594
750
|
KupGlobalFilterMode["HIGHLIGHT"] = "highlight";
|
|
3595
751
|
})(KupGlobalFilterMode || (KupGlobalFilterMode = {}));
|
|
3596
752
|
|
|
3597
|
-
const dom$
|
|
753
|
+
const dom$9 = document.documentElement;
|
|
3598
754
|
/**
|
|
3599
755
|
* Filtering algorithms.
|
|
3600
756
|
* @module Filters
|
|
@@ -3610,16 +766,16 @@ class Filters {
|
|
|
3610
766
|
return comp.rootElement.tagName === KupTagNames.TREE;
|
|
3611
767
|
}
|
|
3612
768
|
isObjFiltrableByInterval(obj) {
|
|
3613
|
-
if (dom$
|
|
769
|
+
if (dom$9.ketchup.objects.isDate(obj)) {
|
|
3614
770
|
return true;
|
|
3615
771
|
}
|
|
3616
|
-
if (dom$
|
|
772
|
+
if (dom$9.ketchup.objects.isTime(obj)) {
|
|
3617
773
|
return true;
|
|
3618
774
|
}
|
|
3619
|
-
if (dom$
|
|
775
|
+
if (dom$9.ketchup.objects.isTimestamp(obj)) {
|
|
3620
776
|
return true;
|
|
3621
777
|
}
|
|
3622
|
-
if (dom$
|
|
778
|
+
if (dom$9.ketchup.objects.isNumber(obj)) {
|
|
3623
779
|
return true;
|
|
3624
780
|
}
|
|
3625
781
|
return false;
|
|
@@ -3629,17 +785,17 @@ class Filters {
|
|
|
3629
785
|
if (newValue == null || newValue == '' || smeupObj == null) {
|
|
3630
786
|
return newValue;
|
|
3631
787
|
}
|
|
3632
|
-
if (dom$
|
|
3633
|
-
if (dom$
|
|
788
|
+
if (dom$9.ketchup.objects.isDate(smeupObj)) {
|
|
789
|
+
if (dom$9.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
|
|
3634
790
|
return newValue;
|
|
3635
791
|
}
|
|
3636
|
-
if (dom$
|
|
3637
|
-
return dom$
|
|
792
|
+
if (dom$9.ketchup.dates.isValid(value)) {
|
|
793
|
+
return dom$9.ketchup.dates.format(dom$9.ketchup.dates.normalize(value, KupDatesNormalize.DATE), KupDatesFormats.ISO_DATE);
|
|
3638
794
|
}
|
|
3639
795
|
}
|
|
3640
|
-
else if (dom$
|
|
3641
|
-
let manageSeconds = dom$
|
|
3642
|
-
if (dom$
|
|
796
|
+
else if (dom$9.ketchup.objects.isTime(smeupObj)) {
|
|
797
|
+
let manageSeconds = dom$9.ketchup.objects.isTimeWithSeconds(smeupObj);
|
|
798
|
+
if (dom$9.ketchup.dates.isValid(value, manageSeconds
|
|
3643
799
|
? KupDatesFormats.ISO_TIME
|
|
3644
800
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS)) {
|
|
3645
801
|
return newValue;
|
|
@@ -3650,15 +806,15 @@ class Filters {
|
|
|
3650
806
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, manageSeconds);
|
|
3651
807
|
}
|
|
3652
808
|
}
|
|
3653
|
-
else if (dom$
|
|
3654
|
-
if (dom$
|
|
809
|
+
else if (dom$9.ketchup.objects.isTimestamp(smeupObj)) {
|
|
810
|
+
if (dom$9.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE_TIME)) {
|
|
3655
811
|
return newValue;
|
|
3656
812
|
}
|
|
3657
813
|
if (isValidFormattedStringTime(value, true)) {
|
|
3658
814
|
return formattedStringToDefaultUnformattedStringTimestamp(value);
|
|
3659
815
|
}
|
|
3660
816
|
}
|
|
3661
|
-
else if (dom$
|
|
817
|
+
else if (dom$9.ketchup.objects.isNumber(smeupObj)) {
|
|
3662
818
|
if (isValidFormattedStringNumber(value, smeupObj ? smeupObj.p : '')) {
|
|
3663
819
|
return formattedStringToUnformattedStringNumber(value, smeupObj ? smeupObj.p : '');
|
|
3664
820
|
}
|
|
@@ -3781,7 +937,7 @@ class Filters {
|
|
|
3781
937
|
to = interval[FilterInterval.TO];
|
|
3782
938
|
}
|
|
3783
939
|
let checkByRegularExpression = true;
|
|
3784
|
-
if (dom$
|
|
940
|
+
if (dom$9.ketchup.objects.isNumber(obj)) {
|
|
3785
941
|
value = unformattedStringNumberToNumber(value, obj ? obj.p : '');
|
|
3786
942
|
let valueNumber = stringToNumber(value);
|
|
3787
943
|
if (from != '') {
|
|
@@ -3809,30 +965,30 @@ class Filters {
|
|
|
3809
965
|
}
|
|
3810
966
|
}
|
|
3811
967
|
}
|
|
3812
|
-
if (dom$
|
|
3813
|
-
dom$
|
|
3814
|
-
dom$
|
|
968
|
+
if (dom$9.ketchup.objects.isDate(obj) ||
|
|
969
|
+
dom$9.ketchup.objects.isTime(obj) ||
|
|
970
|
+
dom$9.ketchup.objects.isTimestamp(obj)) {
|
|
3815
971
|
let valueDate = null;
|
|
3816
972
|
let defaultFormat = KupDatesFormats.ISO_DATE;
|
|
3817
|
-
if (dom$
|
|
973
|
+
if (dom$9.ketchup.objects.isDate(obj)) {
|
|
3818
974
|
defaultFormat = KupDatesFormats.ISO_DATE;
|
|
3819
975
|
}
|
|
3820
|
-
else if (dom$
|
|
3821
|
-
defaultFormat = dom$
|
|
976
|
+
else if (dom$9.ketchup.objects.isTime(obj)) {
|
|
977
|
+
defaultFormat = dom$9.ketchup.objects.isTimeWithSeconds(obj)
|
|
3822
978
|
? KupDatesFormats.ISO_TIME
|
|
3823
979
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS;
|
|
3824
980
|
}
|
|
3825
|
-
else if (dom$
|
|
981
|
+
else if (dom$9.ketchup.objects.isTimestamp(obj)) {
|
|
3826
982
|
defaultFormat = KupDatesFormats.ISO_DATE_TIME;
|
|
3827
983
|
}
|
|
3828
|
-
if (dom$
|
|
3829
|
-
valueDate = dom$
|
|
984
|
+
if (dom$9.ketchup.dates.isValid(value, defaultFormat, true)) {
|
|
985
|
+
valueDate = dom$9.ketchup.dates.toDate(value, defaultFormat);
|
|
3830
986
|
}
|
|
3831
987
|
if (from != '') {
|
|
3832
988
|
if (valueDate != null &&
|
|
3833
|
-
dom$
|
|
989
|
+
dom$9.ketchup.dates.isValid(from, defaultFormat, true)) {
|
|
3834
990
|
checkByRegularExpression = false;
|
|
3835
|
-
let fromDate = dom$
|
|
991
|
+
let fromDate = dom$9.ketchup.dates.toDate(from, defaultFormat);
|
|
3836
992
|
if (valueDate < fromDate) {
|
|
3837
993
|
return false;
|
|
3838
994
|
}
|
|
@@ -3843,9 +999,9 @@ class Filters {
|
|
|
3843
999
|
}
|
|
3844
1000
|
if (to != '') {
|
|
3845
1001
|
if (valueDate != null &&
|
|
3846
|
-
dom$
|
|
1002
|
+
dom$9.ketchup.dates.isValid(to, defaultFormat, true)) {
|
|
3847
1003
|
checkByRegularExpression = false;
|
|
3848
|
-
let toDate = dom$
|
|
1004
|
+
let toDate = dom$9.ketchup.dates.toDate(to, defaultFormat);
|
|
3849
1005
|
if (valueDate > toDate) {
|
|
3850
1006
|
return false;
|
|
3851
1007
|
}
|
|
@@ -3854,9 +1010,9 @@ class Filters {
|
|
|
3854
1010
|
filterValue = to;
|
|
3855
1011
|
}
|
|
3856
1012
|
}
|
|
3857
|
-
if (!dom$
|
|
3858
|
-
!dom$
|
|
3859
|
-
value = dom$
|
|
1013
|
+
if (!dom$9.ketchup.dates.isValid(filterValue, defaultFormat) &&
|
|
1014
|
+
!dom$9.ketchup.dates.isValid(filterValue)) {
|
|
1015
|
+
value = dom$9.ketchup.dates.format(value);
|
|
3860
1016
|
}
|
|
3861
1017
|
}
|
|
3862
1018
|
if (checkByRegularExpression) {
|
|
@@ -4288,9 +1444,9 @@ var KupTreeExpansionMode;
|
|
|
4288
1444
|
KupTreeExpansionMode["NODE"] = "node";
|
|
4289
1445
|
})(KupTreeExpansionMode || (KupTreeExpansionMode = {}));
|
|
4290
1446
|
|
|
4291
|
-
const dom$
|
|
4292
|
-
const kupObjects = dom$
|
|
4293
|
-
? dom$
|
|
1447
|
+
const dom$8 = document.documentElement;
|
|
1448
|
+
const kupObjects = dom$8.ketchup
|
|
1449
|
+
? dom$8.ketchup.objects
|
|
4294
1450
|
: new KupObjects();
|
|
4295
1451
|
/**
|
|
4296
1452
|
* Filtering algorithms related to data-table rows.
|
|
@@ -4539,7 +1695,7 @@ class FiltersRows extends Filters {
|
|
|
4539
1695
|
}
|
|
4540
1696
|
}
|
|
4541
1697
|
|
|
4542
|
-
const dom$
|
|
1698
|
+
const dom$7 = document.documentElement;
|
|
4543
1699
|
function sortRows(rows = [], sort = []) {
|
|
4544
1700
|
if (!rows || rows.length === 0) {
|
|
4545
1701
|
return [];
|
|
@@ -4770,10 +1926,10 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
4770
1926
|
return;
|
|
4771
1927
|
}
|
|
4772
1928
|
keys.forEach((key) => {
|
|
4773
|
-
const currentTotalValue = dom$
|
|
1929
|
+
const currentTotalValue = dom$7.ketchup.math.numberify(groupRow.group.totals[key] || 0);
|
|
4774
1930
|
const cell = addedRow.cells[key];
|
|
4775
1931
|
if (cell) {
|
|
4776
|
-
let _isNumber = dom$
|
|
1932
|
+
let _isNumber = dom$7.ketchup.objects.isNumber(cell.obj);
|
|
4777
1933
|
const totalMode = totals[key];
|
|
4778
1934
|
switch (totalMode) {
|
|
4779
1935
|
case TotalMode.COUNT:
|
|
@@ -4789,7 +1945,7 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
4789
1945
|
case TotalMode.DISTINCT:
|
|
4790
1946
|
let cellValue;
|
|
4791
1947
|
if (_isNumber) {
|
|
4792
|
-
cellValue = dom$
|
|
1948
|
+
cellValue = dom$7.ketchup.math.numberify(stringToNumber(cell.value));
|
|
4793
1949
|
}
|
|
4794
1950
|
else {
|
|
4795
1951
|
cellValue = cell.value;
|
|
@@ -4841,13 +1997,13 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
4841
1997
|
case TotalMode.SUM:
|
|
4842
1998
|
case TotalMode.AVERAGE:
|
|
4843
1999
|
if (_isNumber) {
|
|
4844
|
-
const cellValue = dom$
|
|
2000
|
+
const cellValue = dom$7.ketchup.math.numberify(stringToNumber(cell.value));
|
|
4845
2001
|
groupRow.group.totals[key] =
|
|
4846
2002
|
cellValue + currentTotalValue;
|
|
4847
2003
|
// updating parents
|
|
4848
2004
|
let parent = groupRow.group.parent;
|
|
4849
2005
|
while (parent != null) {
|
|
4850
|
-
const currentParentSum = dom$
|
|
2006
|
+
const currentParentSum = dom$7.ketchup.math.numberify(parent.group.totals[key] || 0);
|
|
4851
2007
|
parent.group.totals[key] =
|
|
4852
2008
|
cellValue + currentParentSum;
|
|
4853
2009
|
parent = parent.group.parent;
|
|
@@ -4858,7 +2014,7 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
4858
2014
|
case TotalMode.MIN:
|
|
4859
2015
|
if (_isNumber) {
|
|
4860
2016
|
const currentTotalValue = groupRow.group.totals[key];
|
|
4861
|
-
const cellValue = dom$
|
|
2017
|
+
const cellValue = dom$7.ketchup.math.numberify(stringToNumber(cell.value));
|
|
4862
2018
|
if (currentTotalValue) {
|
|
4863
2019
|
groupRow.group.totals[key] = Math.min(currentTotalValue, cellValue);
|
|
4864
2020
|
}
|
|
@@ -4880,19 +2036,19 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
4880
2036
|
parent = parent.group.parent;
|
|
4881
2037
|
}
|
|
4882
2038
|
}
|
|
4883
|
-
else if (dom$
|
|
2039
|
+
else if (dom$7.ketchup.objects.isDate(cell.obj)) {
|
|
4884
2040
|
const momentValue = cell.obj
|
|
4885
|
-
? dom$
|
|
4886
|
-
: dom$
|
|
4887
|
-
if (dom$
|
|
4888
|
-
const cellValue = dom$
|
|
2041
|
+
? dom$7.ketchup.objects.parseDate(cell.obj)
|
|
2042
|
+
: dom$7.ketchup.dates.toDayjs(cell.value);
|
|
2043
|
+
if (dom$7.ketchup.dates.isValid(momentValue)) {
|
|
2044
|
+
const cellValue = dom$7.ketchup.dates.toDate(momentValue);
|
|
4889
2045
|
const currentTotalValue = groupRow.group.totals[key];
|
|
4890
2046
|
if (currentTotalValue) {
|
|
4891
2047
|
let moments = [];
|
|
4892
2048
|
moments.push(cellValue);
|
|
4893
|
-
moments.push(dom$
|
|
2049
|
+
moments.push(dom$7.ketchup.dates.format(currentTotalValue));
|
|
4894
2050
|
groupRow.group.totals[key] =
|
|
4895
|
-
dom$
|
|
2051
|
+
dom$7.ketchup.dates.format(dom$7.ketchup.dates.min(moments));
|
|
4896
2052
|
}
|
|
4897
2053
|
else {
|
|
4898
2054
|
groupRow.group.totals[key] = cellValue;
|
|
@@ -4904,9 +2060,9 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
4904
2060
|
if (currentParentMin) {
|
|
4905
2061
|
let moments = [];
|
|
4906
2062
|
moments.push(cellValue);
|
|
4907
|
-
moments.push(dom$
|
|
2063
|
+
moments.push(dom$7.ketchup.dates.format(currentParentMin));
|
|
4908
2064
|
parent.group.totals[key] =
|
|
4909
|
-
dom$
|
|
2065
|
+
dom$7.ketchup.dates.format(dom$7.ketchup.dates.min(moments));
|
|
4910
2066
|
}
|
|
4911
2067
|
else {
|
|
4912
2068
|
// first round
|
|
@@ -4921,7 +2077,7 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
4921
2077
|
case TotalMode.MAX:
|
|
4922
2078
|
if (_isNumber) {
|
|
4923
2079
|
const currentTotalValue = groupRow.group.totals[key];
|
|
4924
|
-
const cellValue = dom$
|
|
2080
|
+
const cellValue = dom$7.ketchup.math.numberify(stringToNumber(cell.value));
|
|
4925
2081
|
if (currentTotalValue) {
|
|
4926
2082
|
groupRow.group.totals[key] = Math.max(currentTotalValue, cellValue);
|
|
4927
2083
|
}
|
|
@@ -4943,19 +2099,19 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
4943
2099
|
parent = parent.group.parent;
|
|
4944
2100
|
}
|
|
4945
2101
|
}
|
|
4946
|
-
else if (dom$
|
|
2102
|
+
else if (dom$7.ketchup.objects.isDate(cell.obj)) {
|
|
4947
2103
|
const momentValue = cell.obj
|
|
4948
|
-
? dom$
|
|
4949
|
-
: dom$
|
|
4950
|
-
if (dom$
|
|
4951
|
-
const cellValue = dom$
|
|
2104
|
+
? dom$7.ketchup.objects.parseDate(cell.obj)
|
|
2105
|
+
: dom$7.ketchup.dates.toDayjs(cell.value);
|
|
2106
|
+
if (dom$7.ketchup.dates.isValid(momentValue)) {
|
|
2107
|
+
const cellValue = dom$7.ketchup.dates.toDate(momentValue);
|
|
4952
2108
|
const currentTotalValue = groupRow.group.totals[key];
|
|
4953
2109
|
if (currentTotalValue) {
|
|
4954
2110
|
let moments = [];
|
|
4955
2111
|
moments.push(cellValue);
|
|
4956
|
-
moments.push(dom$
|
|
2112
|
+
moments.push(dom$7.ketchup.dates.format(currentTotalValue));
|
|
4957
2113
|
groupRow.group.totals[key] =
|
|
4958
|
-
dom$
|
|
2114
|
+
dom$7.ketchup.dates.format(dom$7.ketchup.dates.max(moments));
|
|
4959
2115
|
}
|
|
4960
2116
|
else {
|
|
4961
2117
|
groupRow.group.totals[key] = cellValue;
|
|
@@ -4967,9 +2123,9 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
4967
2123
|
if (currentParentMin) {
|
|
4968
2124
|
let moments = [];
|
|
4969
2125
|
moments.push(cellValue);
|
|
4970
|
-
moments.push(dom$
|
|
2126
|
+
moments.push(dom$7.ketchup.dates.format(currentParentMin));
|
|
4971
2127
|
parent.group.totals[key] =
|
|
4972
|
-
dom$
|
|
2128
|
+
dom$7.ketchup.dates.format(dom$7.ketchup.dates.max(moments));
|
|
4973
2129
|
}
|
|
4974
2130
|
else {
|
|
4975
2131
|
// first round
|
|
@@ -5063,12 +2219,12 @@ function adjustGroupAverageOrFormula(row, type, toAdjustKeys, totals) {
|
|
|
5063
2219
|
toAdjustKeys.forEach((key) => {
|
|
5064
2220
|
if (type == TotalMode.AVERAGE) {
|
|
5065
2221
|
row.group.totals[key] =
|
|
5066
|
-
dom$
|
|
2222
|
+
dom$7.ketchup.math.numberify(row.group.totals[key]) /
|
|
5067
2223
|
numberOfLeaf;
|
|
5068
2224
|
}
|
|
5069
2225
|
if (type == TotalMode.MATH) {
|
|
5070
2226
|
let formula = totals[key].substring(TotalMode.MATH.length);
|
|
5071
|
-
row.group.totals[key] = dom$
|
|
2227
|
+
row.group.totals[key] = dom$7.ketchup.math.formulas.custom(formula, row.group.totals);
|
|
5072
2228
|
}
|
|
5073
2229
|
});
|
|
5074
2230
|
return numberOfLeaf;
|
|
@@ -5098,8 +2254,8 @@ function normalizeRows(columns, rows) {
|
|
|
5098
2254
|
}
|
|
5099
2255
|
}
|
|
5100
2256
|
function calcTotals(rows = [], totals = {}) {
|
|
5101
|
-
if (dom$
|
|
5102
|
-
dom$
|
|
2257
|
+
if (dom$7.ketchup.objects.isEmptyJsObject(rows) ||
|
|
2258
|
+
dom$7.ketchup.objects.isEmptyJsObject(totals)) {
|
|
5103
2259
|
return {};
|
|
5104
2260
|
}
|
|
5105
2261
|
const keys = Object.keys(totals);
|
|
@@ -5120,8 +2276,8 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
5120
2276
|
if (cell) {
|
|
5121
2277
|
if (totals[key] === TotalMode.DISTINCT) {
|
|
5122
2278
|
let cellValue;
|
|
5123
|
-
if (dom$
|
|
5124
|
-
cellValue = dom$
|
|
2279
|
+
if (dom$7.ketchup.objects.isNumber(cell.obj)) {
|
|
2280
|
+
cellValue = dom$7.ketchup.math.numberify(stringToNumber(cell.value));
|
|
5125
2281
|
}
|
|
5126
2282
|
else {
|
|
5127
2283
|
cellValue = cell.value;
|
|
@@ -5137,8 +2293,8 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
5137
2293
|
distinctList.push(cellValue);
|
|
5138
2294
|
}
|
|
5139
2295
|
}
|
|
5140
|
-
else if (dom$
|
|
5141
|
-
const cellValue = dom$
|
|
2296
|
+
else if (dom$7.ketchup.objects.isNumber(cell.obj)) {
|
|
2297
|
+
const cellValue = dom$7.ketchup.math.numberify(stringToNumber(cell.value));
|
|
5142
2298
|
let currentFooterValue = footerRow[key];
|
|
5143
2299
|
switch (true) {
|
|
5144
2300
|
// TODO DRY the MIN and MAX functions
|
|
@@ -5163,25 +2319,25 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
5163
2319
|
currentFooterValue = footerRow[key] || 0;
|
|
5164
2320
|
footerRow[key] =
|
|
5165
2321
|
cellValue +
|
|
5166
|
-
dom$
|
|
2322
|
+
dom$7.ketchup.math.numberify(currentFooterValue);
|
|
5167
2323
|
}
|
|
5168
2324
|
// TODO DRY the MIN and MAX functions
|
|
5169
2325
|
}
|
|
5170
|
-
else if (dom$
|
|
2326
|
+
else if (dom$7.ketchup.objects.isDate(cell.obj)) {
|
|
5171
2327
|
const momentValue = cell.obj
|
|
5172
|
-
? dom$
|
|
5173
|
-
: dom$
|
|
5174
|
-
if (dom$
|
|
5175
|
-
const cellValue = dom$
|
|
2328
|
+
? dom$7.ketchup.objects.parseDate(cell.obj)
|
|
2329
|
+
: dom$7.ketchup.dates.toDayjs(cell.value);
|
|
2330
|
+
if (dom$7.ketchup.dates.isValid(momentValue)) {
|
|
2331
|
+
const cellValue = dom$7.ketchup.dates.toDate(momentValue);
|
|
5176
2332
|
const currentFooterValue = footerRow[key];
|
|
5177
2333
|
switch (true) {
|
|
5178
2334
|
case totals[key] === TotalMode.MIN:
|
|
5179
2335
|
if (currentFooterValue) {
|
|
5180
2336
|
let moments = [];
|
|
5181
2337
|
moments.push(cellValue);
|
|
5182
|
-
moments.push(dom$
|
|
2338
|
+
moments.push(dom$7.ketchup.dates.format(currentFooterValue));
|
|
5183
2339
|
footerRow[key] =
|
|
5184
|
-
dom$
|
|
2340
|
+
dom$7.ketchup.dates.format(dom$7.ketchup.dates.min(moments));
|
|
5185
2341
|
}
|
|
5186
2342
|
else {
|
|
5187
2343
|
footerRow[key] = cellValue;
|
|
@@ -5191,9 +2347,9 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
5191
2347
|
if (currentFooterValue) {
|
|
5192
2348
|
let moments = [];
|
|
5193
2349
|
moments.push(cellValue);
|
|
5194
|
-
moments.push(dom$
|
|
2350
|
+
moments.push(dom$7.ketchup.dates.format(currentFooterValue));
|
|
5195
2351
|
footerRow[key] =
|
|
5196
|
-
dom$
|
|
2352
|
+
dom$7.ketchup.dates.format(dom$7.ketchup.dates.max(moments));
|
|
5197
2353
|
}
|
|
5198
2354
|
else {
|
|
5199
2355
|
footerRow[key] = cellValue;
|
|
@@ -5224,7 +2380,7 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
5224
2380
|
footerRow[key] = rows.length;
|
|
5225
2381
|
break;
|
|
5226
2382
|
case totals[key].indexOf(TotalMode.MATH) == 0:
|
|
5227
|
-
footerRow[key] = dom$
|
|
2383
|
+
footerRow[key] = dom$7.ketchup.math.formulas.custom(totals[key].substring(TotalMode.MATH.length), footerRow);
|
|
5228
2384
|
break;
|
|
5229
2385
|
}
|
|
5230
2386
|
if (footerRow[key]) {
|
|
@@ -5388,7 +2544,7 @@ var FPaginatorMode;
|
|
|
5388
2544
|
FPaginatorMode["FULL"] = "full";
|
|
5389
2545
|
})(FPaginatorMode || (FPaginatorMode = {}));
|
|
5390
2546
|
|
|
5391
|
-
const dom$
|
|
2547
|
+
const dom$6 = document.documentElement;
|
|
5392
2548
|
/*-------------------------------------------------*/
|
|
5393
2549
|
/* C o m p o n e n t */
|
|
5394
2550
|
/*-------------------------------------------------*/
|
|
@@ -5401,8 +2557,8 @@ const FPaginator = (props) => {
|
|
|
5401
2557
|
data: pageItems,
|
|
5402
2558
|
},
|
|
5403
2559
|
'kup-text-field': {
|
|
5404
|
-
label: dom$
|
|
5405
|
-
helper: dom$
|
|
2560
|
+
label: dom$6.ketchup.language.translate(KupLanguagePage.PAGE),
|
|
2561
|
+
helper: dom$6.ketchup.language.translate(KupLanguagePage.TOTAL) +
|
|
5406
2562
|
`: ${maxNumberOfPage}`,
|
|
5407
2563
|
helperWhenFocused: true,
|
|
5408
2564
|
inputType: 'number',
|
|
@@ -5415,10 +2571,10 @@ const FPaginator = (props) => {
|
|
|
5415
2571
|
data: rowsPerPageItems,
|
|
5416
2572
|
},
|
|
5417
2573
|
'kup-text-field': {
|
|
5418
|
-
label: dom$
|
|
2574
|
+
label: dom$6.ketchup.language.translate(KupLanguageRow.ROWS) +
|
|
5419
2575
|
' / ' +
|
|
5420
|
-
dom$
|
|
5421
|
-
helper: dom$
|
|
2576
|
+
dom$6.ketchup.language.translate(KupLanguagePage.PAGE),
|
|
2577
|
+
helper: dom$6.ketchup.language.translate(KupLanguageRow.TOTAL) +
|
|
5422
2578
|
`: ${props.max}`,
|
|
5423
2579
|
helperWhenFocused: true,
|
|
5424
2580
|
inputType: 'number',
|
|
@@ -5431,7 +2587,7 @@ const FPaginator = (props) => {
|
|
|
5431
2587
|
h("kup-combobox", { class: "page-selector", data: dataPageSelector, initialValue: props.currentPage.toString(), "onkup-combobox-change": props.onPageChange }),
|
|
5432
2588
|
props.mode !== FPaginatorMode.SIMPLE ? (h(FButton, { icon: "chevron_right", disabled: isNextPageDisabled(props), onClick: props.onNextPage, wrapperClass: "next-page" })) : null,
|
|
5433
2589
|
h("kup-combobox", { class: "rows-selector", data: dataRowsSelector, initialValue: props.perPage.toString(), "onkup-combobox-change": props.onRowsChange }),
|
|
5434
|
-
props.onLoadMore ? (h(FButton, { icon: "plus", onClick: props.onLoadMore, label: dom$
|
|
2590
|
+
props.onLoadMore ? (h(FButton, { icon: "plus", onClick: props.onLoadMore, label: dom$6.ketchup.language.translate(KupLanguageGeneric.LOAD_MORE), styling: FButtonStyling.FLAT, wrapperClass: "load-more-button" })) : null));
|
|
5435
2591
|
};
|
|
5436
2592
|
function getPageItems(props, maxNumberOfPage) {
|
|
5437
2593
|
const pageItems = [];
|
|
@@ -7319,7 +4475,7 @@ var SourceEvent;
|
|
|
7319
4475
|
SourceEvent["YEAR"] = "year";
|
|
7320
4476
|
})(SourceEvent || (SourceEvent = {}));
|
|
7321
4477
|
|
|
7322
|
-
const dom$
|
|
4478
|
+
const dom$5 = document.documentElement;
|
|
7323
4479
|
function prepareCalendar(component) {
|
|
7324
4480
|
const el = component.rootElement;
|
|
7325
4481
|
if (!el.kupData)
|
|
@@ -7331,9 +4487,9 @@ function prepareCalendar(component) {
|
|
|
7331
4487
|
const obj = opts.initialValue;
|
|
7332
4488
|
if (opts.initialValue) {
|
|
7333
4489
|
if (obj && obj.k)
|
|
7334
|
-
setValue$
|
|
4490
|
+
setValue$2(component, new Date(obj.k));
|
|
7335
4491
|
else
|
|
7336
|
-
setValue$
|
|
4492
|
+
setValue$2(component, new Date(opts.initialValue));
|
|
7337
4493
|
}
|
|
7338
4494
|
if (opts.firstDayIndex)
|
|
7339
4495
|
el.kupData.firstDayIndex = opts.firstDayIndex;
|
|
@@ -7341,7 +4497,7 @@ function prepareCalendar(component) {
|
|
|
7341
4497
|
}
|
|
7342
4498
|
}
|
|
7343
4499
|
if (!el.kupData.value)
|
|
7344
|
-
setValue$
|
|
4500
|
+
setValue$2(component, new Date());
|
|
7345
4501
|
const months = getMonthsAsStringByLocale();
|
|
7346
4502
|
const curYear = getYear(component);
|
|
7347
4503
|
const curMonth = getMonth(component);
|
|
@@ -7393,7 +4549,7 @@ function prepareCalendar(component) {
|
|
|
7393
4549
|
nextButtonComp)),
|
|
7394
4550
|
h("div", { class: "section-2" }, createCalendar(component))));
|
|
7395
4551
|
}
|
|
7396
|
-
function setValue$
|
|
4552
|
+
function setValue$2(component, value) {
|
|
7397
4553
|
const el = component.rootElement;
|
|
7398
4554
|
el.kupData.value = value;
|
|
7399
4555
|
el.kupData.day = el.kupData.value.getDate();
|
|
@@ -7403,7 +4559,7 @@ function setValue$1(component, value) {
|
|
|
7403
4559
|
function getValue$1(component) {
|
|
7404
4560
|
const el = component.rootElement;
|
|
7405
4561
|
if (el.kupData.value == null)
|
|
7406
|
-
setValue$
|
|
4562
|
+
setValue$2(component, new Date());
|
|
7407
4563
|
return el.kupData.value;
|
|
7408
4564
|
}
|
|
7409
4565
|
function getDay(component) {
|
|
@@ -7647,7 +4803,7 @@ function getDayAsStringByLocale(date) {
|
|
|
7647
4803
|
weekday: 'narrow',
|
|
7648
4804
|
/** weekday: 'narrow' 'short' 'long' */
|
|
7649
4805
|
};
|
|
7650
|
-
const dateTimeFormat = new Intl.DateTimeFormat(dom$
|
|
4806
|
+
const dateTimeFormat = new Intl.DateTimeFormat(dom$5.ketchup.dates.getLocale(), options);
|
|
7651
4807
|
return dateTimeFormat.format(date);
|
|
7652
4808
|
}
|
|
7653
4809
|
function fillString(stringIn, stringForFill, finalLen, addBefore) {
|
|
@@ -7739,7 +4895,7 @@ function refresh(component) {
|
|
|
7739
4895
|
}
|
|
7740
4896
|
function onCalendarMonthYearItemClick(component, value) {
|
|
7741
4897
|
let d;
|
|
7742
|
-
if (dom$
|
|
4898
|
+
if (dom$5.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
|
|
7743
4899
|
d = new Date(value);
|
|
7744
4900
|
}
|
|
7745
4901
|
else {
|
|
@@ -7761,18 +4917,18 @@ function onCalendarMonthYearItemClick(component, value) {
|
|
|
7761
4917
|
}
|
|
7762
4918
|
function onCalendarItemClick(component, value) {
|
|
7763
4919
|
let d;
|
|
7764
|
-
if (dom$
|
|
4920
|
+
if (dom$5.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
|
|
7765
4921
|
d = new Date(value);
|
|
7766
4922
|
}
|
|
7767
4923
|
else {
|
|
7768
4924
|
d = new Date();
|
|
7769
4925
|
}
|
|
7770
|
-
setValue$
|
|
4926
|
+
setValue$2(component, d);
|
|
7771
4927
|
component.onKupClick(component.rootElement.id, value);
|
|
7772
4928
|
refresh(component);
|
|
7773
4929
|
}
|
|
7774
4930
|
|
|
7775
|
-
const dom$
|
|
4931
|
+
const dom$4 = document.documentElement;
|
|
7776
4932
|
function prepareClock(component) {
|
|
7777
4933
|
const el = component.rootElement;
|
|
7778
4934
|
el.kupData = {};
|
|
@@ -7811,7 +4967,7 @@ function getValue(component) {
|
|
|
7811
4967
|
return el.kupData.value;
|
|
7812
4968
|
return '';
|
|
7813
4969
|
}
|
|
7814
|
-
function setValue(component, value) {
|
|
4970
|
+
function setValue$1(component, value) {
|
|
7815
4971
|
const el = component.rootElement;
|
|
7816
4972
|
el.kupData.value = value;
|
|
7817
4973
|
}
|
|
@@ -7865,7 +5021,7 @@ function setClockValueSelected(component, newValue) {
|
|
|
7865
5021
|
if (newValue == null) {
|
|
7866
5022
|
return;
|
|
7867
5023
|
}
|
|
7868
|
-
setValue(component, newValue);
|
|
5024
|
+
setValue$1(component, newValue);
|
|
7869
5025
|
}
|
|
7870
5026
|
function isRelatedTargetInThisComponent(e, component) {
|
|
7871
5027
|
if (!e.relatedTarget) {
|
|
@@ -7887,7 +5043,7 @@ function onKupBlur(component) {
|
|
|
7887
5043
|
function createClock(component) {
|
|
7888
5044
|
let selectedTime;
|
|
7889
5045
|
if (getValue(component)) {
|
|
7890
|
-
selectedTime = dom$
|
|
5046
|
+
selectedTime = dom$4.ketchup.dates.toDate(getValue(component), isManageSeconds(component)
|
|
7891
5047
|
? KupDatesFormats.ISO_TIME
|
|
7892
5048
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS);
|
|
7893
5049
|
}
|
|
@@ -8089,7 +5245,7 @@ function setClockTime(e, component) {
|
|
|
8089
5245
|
e.target.classList.add('selected');
|
|
8090
5246
|
}
|
|
8091
5247
|
|
|
8092
|
-
const dom$
|
|
5248
|
+
const dom$3 = document.documentElement;
|
|
8093
5249
|
const premadeFormulas = [
|
|
8094
5250
|
KupLanguageTotals.AVERAGE,
|
|
8095
5251
|
KupLanguageTotals.DIFFERENCE,
|
|
@@ -8104,7 +5260,7 @@ function prepareColumnDropMenu(component) {
|
|
|
8104
5260
|
const column = options.data.columns[index];
|
|
8105
5261
|
if (column.visible !== false &&
|
|
8106
5262
|
column.obj &&
|
|
8107
|
-
dom$
|
|
5263
|
+
dom$3.ketchup.objects.isNumber(column.obj)) {
|
|
8108
5264
|
chipData.push({
|
|
8109
5265
|
obj: column.obj,
|
|
8110
5266
|
value: column.name,
|
|
@@ -8120,7 +5276,7 @@ function prepareColumnDropMenu(component) {
|
|
|
8120
5276
|
if (options.enableFormula) {
|
|
8121
5277
|
combobox = prepareCombobox(options, numericalColumnsExist);
|
|
8122
5278
|
if (numericalColumnsExist) {
|
|
8123
|
-
button = (h("kup-button", { "onKup-button-click": () => applyFormula(component), label: dom$
|
|
5279
|
+
button = (h("kup-button", { "onKup-button-click": () => applyFormula(component), label: dom$3.ketchup.language.translate(KupLanguageTotals.CALCULATE), styling: FButtonStyling.OUTLINED }));
|
|
8124
5280
|
chipSet = (h("div", { class: "sub-chip" },
|
|
8125
5281
|
h("kup-chip", { data: chipData, "onKup-chip-click": (e) => typeColumn(e, component) })));
|
|
8126
5282
|
}
|
|
@@ -8133,35 +5289,35 @@ function prepareList(options) {
|
|
|
8133
5289
|
listData.push({
|
|
8134
5290
|
icon: 'library_add',
|
|
8135
5291
|
id: KupLanguageGeneric.MERGE,
|
|
8136
|
-
value: dom$
|
|
5292
|
+
value: dom$3.ketchup.language.translate(KupLanguageGeneric.MERGE),
|
|
8137
5293
|
});
|
|
8138
5294
|
}
|
|
8139
5295
|
if (options.enableMove) {
|
|
8140
5296
|
listData.push({
|
|
8141
5297
|
icon: 'swap_horiz',
|
|
8142
5298
|
id: KupLanguageGeneric.MOVE,
|
|
8143
|
-
value: dom$
|
|
5299
|
+
value: dom$3.ketchup.language.translate(KupLanguageGeneric.MOVE),
|
|
8144
5300
|
});
|
|
8145
5301
|
}
|
|
8146
5302
|
return listData.length > 0 ? (h("kup-list", { data: listData, showIcons: true, "onkup-list-click": (e) => listClick(e, options) })) : null;
|
|
8147
5303
|
}
|
|
8148
5304
|
function prepareCombobox(options, numericalColumnsExist) {
|
|
8149
5305
|
const comboListData = [];
|
|
8150
|
-
const numeric = dom$
|
|
8151
|
-
dom$
|
|
5306
|
+
const numeric = dom$3.ketchup.objects.isNumber(options.receivingColumn.obj) &&
|
|
5307
|
+
dom$3.ketchup.objects.isNumber(options.starterColumn.obj);
|
|
8152
5308
|
if (numeric) {
|
|
8153
5309
|
comboListData.push({
|
|
8154
5310
|
id: KupLanguageTotals.AVERAGE,
|
|
8155
|
-
value: dom$
|
|
5311
|
+
value: dom$3.ketchup.language.translate(KupLanguageTotals.AVERAGE),
|
|
8156
5312
|
}, {
|
|
8157
5313
|
id: KupLanguageTotals.DIFFERENCE,
|
|
8158
|
-
value: dom$
|
|
5314
|
+
value: dom$3.ketchup.language.translate(KupLanguageTotals.DIFFERENCE),
|
|
8159
5315
|
}, {
|
|
8160
5316
|
id: KupLanguageTotals.PRODUCT,
|
|
8161
|
-
value: dom$
|
|
5317
|
+
value: dom$3.ketchup.language.translate(KupLanguageTotals.PRODUCT),
|
|
8162
5318
|
}, {
|
|
8163
5319
|
id: KupLanguageTotals.SUM,
|
|
8164
|
-
value: dom$
|
|
5320
|
+
value: dom$3.ketchup.language.translate(KupLanguageTotals.SUM),
|
|
8165
5321
|
}, {
|
|
8166
5322
|
id: `([${options.starterColumn.name}]/[${options.receivingColumn.name}])*100`,
|
|
8167
5323
|
value: `[${options.starterColumn.name}] / [${options.receivingColumn.name}] * 100`,
|
|
@@ -8173,7 +5329,7 @@ function prepareCombobox(options, numericalColumnsExist) {
|
|
|
8173
5329
|
else {
|
|
8174
5330
|
comboListData.push({
|
|
8175
5331
|
id: KupLanguageColumn.NO_FORMULA,
|
|
8176
|
-
value: dom$
|
|
5332
|
+
value: dom$3.ketchup.language.translate(KupLanguageColumn.NO_FORMULA),
|
|
8177
5333
|
});
|
|
8178
5334
|
}
|
|
8179
5335
|
const comboData = {
|
|
@@ -8183,11 +5339,11 @@ function prepareCombobox(options, numericalColumnsExist) {
|
|
|
8183
5339
|
},
|
|
8184
5340
|
'kup-text-field': {
|
|
8185
5341
|
helper: !numericalColumnsExist
|
|
8186
|
-
? dom$
|
|
5342
|
+
? dom$3.ketchup.language.translate(KupLanguageColumn.NON_NUMERICAL_IN_TABLE)
|
|
8187
5343
|
: numeric
|
|
8188
5344
|
? `i.e.: [${options.receivingColumn.name}] - [${options.starterColumn.name}] + 1`
|
|
8189
|
-
: dom$
|
|
8190
|
-
label: dom$
|
|
5345
|
+
: dom$3.ketchup.language.translate(KupLanguageColumn.NON_NUMERICAL),
|
|
5346
|
+
label: dom$3.ketchup.language.translate(KupLanguageTotals.FORMULA),
|
|
8191
5347
|
outlined: true,
|
|
8192
5348
|
},
|
|
8193
5349
|
};
|
|
@@ -8226,7 +5382,7 @@ async function applyFormula(component) {
|
|
|
8226
5382
|
if (combobox) {
|
|
8227
5383
|
const value = (await combobox.getValue());
|
|
8228
5384
|
if (premadeFormulas.includes(value)) {
|
|
8229
|
-
dom$
|
|
5385
|
+
dom$3.ketchup.data.column.new(options.data, KupDataNewColumnTypes.MATH, {
|
|
8230
5386
|
columns: [
|
|
8231
5387
|
options.receivingColumn.name,
|
|
8232
5388
|
options.starterColumn.name,
|
|
@@ -8238,7 +5394,7 @@ async function applyFormula(component) {
|
|
|
8238
5394
|
}
|
|
8239
5395
|
}
|
|
8240
5396
|
else {
|
|
8241
|
-
const result = dom$
|
|
5397
|
+
const result = dom$3.ketchup.data.column.new(options.data, KupDataNewColumnTypes.MATH, {
|
|
8242
5398
|
operation: value,
|
|
8243
5399
|
});
|
|
8244
5400
|
if (typeof result === 'string' || result instanceof String) {
|
|
@@ -8253,6 +5409,157 @@ async function applyFormula(component) {
|
|
|
8253
5409
|
}
|
|
8254
5410
|
}
|
|
8255
5411
|
|
|
5412
|
+
const dom$2 = document.documentElement;
|
|
5413
|
+
function prepareNumeric(component) {
|
|
5414
|
+
const el = component.rootElement;
|
|
5415
|
+
if (!el.kupData)
|
|
5416
|
+
el.kupData = {
|
|
5417
|
+
value: null,
|
|
5418
|
+
localeValue: '',
|
|
5419
|
+
};
|
|
5420
|
+
let decimals = false;
|
|
5421
|
+
let negative = false;
|
|
5422
|
+
const options = getOptions(component);
|
|
5423
|
+
if (options.resetStatus) {
|
|
5424
|
+
el.kupData = {
|
|
5425
|
+
value: null,
|
|
5426
|
+
localeValue: '',
|
|
5427
|
+
};
|
|
5428
|
+
const obj = options.initialValue;
|
|
5429
|
+
if (options.initialValue) {
|
|
5430
|
+
if (obj && obj.k)
|
|
5431
|
+
el.kupData.value = obj.k;
|
|
5432
|
+
else
|
|
5433
|
+
el.kupData.value = options.initialValue.toString();
|
|
5434
|
+
el.kupData.localeValue = dom$2.ketchup.math.numbers.toLocaleString(el.kupData.value);
|
|
5435
|
+
}
|
|
5436
|
+
options.resetStatus = false;
|
|
5437
|
+
}
|
|
5438
|
+
if (options.negative)
|
|
5439
|
+
negative = true;
|
|
5440
|
+
if (options.decimals)
|
|
5441
|
+
decimals = true;
|
|
5442
|
+
const clearButtonProp = {
|
|
5443
|
+
icon: 'cancel',
|
|
5444
|
+
onClick: () => clearValue(component),
|
|
5445
|
+
};
|
|
5446
|
+
const saveButtonProp = {
|
|
5447
|
+
icon: 'save',
|
|
5448
|
+
onClick: () => saveValue(component),
|
|
5449
|
+
};
|
|
5450
|
+
const decChar = getDecimalChar();
|
|
5451
|
+
return (h("table", null,
|
|
5452
|
+
h("tr", null,
|
|
5453
|
+
h("td", { colSpan: 3 },
|
|
5454
|
+
h("div", { class: "value" }, el.kupData.localeValue))),
|
|
5455
|
+
h("tr", null,
|
|
5456
|
+
h("td", null,
|
|
5457
|
+
h("div", { class: "number", onClick: () => setValue(component, '1') }, "1")),
|
|
5458
|
+
h("td", null,
|
|
5459
|
+
h("div", { class: "number", onClick: () => setValue(component, '2') }, "2")),
|
|
5460
|
+
h("td", null,
|
|
5461
|
+
h("div", { class: "number", onClick: () => setValue(component, '3') }, "3"))),
|
|
5462
|
+
h("tr", null,
|
|
5463
|
+
h("td", null,
|
|
5464
|
+
h("div", { class: "number", onClick: () => setValue(component, '4') }, "4")),
|
|
5465
|
+
h("td", null,
|
|
5466
|
+
h("div", { class: "number", onClick: () => setValue(component, '5') }, "5")),
|
|
5467
|
+
h("td", null,
|
|
5468
|
+
h("div", { class: "number", onClick: () => setValue(component, '6') }, "6"))),
|
|
5469
|
+
h("tr", null,
|
|
5470
|
+
h("td", null,
|
|
5471
|
+
h("div", { class: "number", onClick: () => setValue(component, '7') }, "7")),
|
|
5472
|
+
h("td", null,
|
|
5473
|
+
h("div", { class: "number", onClick: () => setValue(component, '8') }, "8")),
|
|
5474
|
+
h("td", null,
|
|
5475
|
+
h("div", { class: "number", onClick: () => setValue(component, '9') }, "9"))),
|
|
5476
|
+
h("tr", null,
|
|
5477
|
+
h("td", null, negative
|
|
5478
|
+
? [
|
|
5479
|
+
h("div", { class: "number", onClick: () => setSign(component) }, "-"),
|
|
5480
|
+
]
|
|
5481
|
+
: []),
|
|
5482
|
+
h("td", null,
|
|
5483
|
+
h("div", { class: "number", onClick: () => setValue(component, '0') }, "0")),
|
|
5484
|
+
h("td", null, decimals
|
|
5485
|
+
? [
|
|
5486
|
+
h("div", { class: "number", onClick: () => setValue(component, '.') }, decChar),
|
|
5487
|
+
]
|
|
5488
|
+
: [])),
|
|
5489
|
+
h("tr", null,
|
|
5490
|
+
h("td", null),
|
|
5491
|
+
h("td", null,
|
|
5492
|
+
h(FButton, Object.assign({}, clearButtonProp))),
|
|
5493
|
+
h("td", null,
|
|
5494
|
+
h(FButton, Object.assign({}, saveButtonProp))))));
|
|
5495
|
+
}
|
|
5496
|
+
function getOptions(component) {
|
|
5497
|
+
if (component.data.options)
|
|
5498
|
+
return component.data.options;
|
|
5499
|
+
else
|
|
5500
|
+
return { resetStatus: false };
|
|
5501
|
+
}
|
|
5502
|
+
function setSign(component) {
|
|
5503
|
+
const el = component.rootElement;
|
|
5504
|
+
let strVal = el.kupData.value ? el.kupData.value : '0';
|
|
5505
|
+
if (strVal.startsWith('-'))
|
|
5506
|
+
return;
|
|
5507
|
+
strVal = '-' + strVal;
|
|
5508
|
+
el.kupData.value = strVal;
|
|
5509
|
+
el.kupData.localeValue = dom$2.ketchup.math.numbers.toLocaleString(strVal);
|
|
5510
|
+
component.refresh();
|
|
5511
|
+
}
|
|
5512
|
+
function setValue(component, value) {
|
|
5513
|
+
const options = getOptions(component);
|
|
5514
|
+
const el = component.rootElement;
|
|
5515
|
+
const decChar = '.';
|
|
5516
|
+
let strVal = el.kupData.value ? el.kupData.value.toString() : '0';
|
|
5517
|
+
// if the first value is 0 and the character you want to insert is not a comma, I clear the field.
|
|
5518
|
+
if (strVal == '0' && value != decChar) {
|
|
5519
|
+
strVal = '';
|
|
5520
|
+
}
|
|
5521
|
+
// if I have already entered a decimal sign I stop.
|
|
5522
|
+
if (value == decChar && strVal.includes(decChar))
|
|
5523
|
+
return;
|
|
5524
|
+
// if the text field contains the maximum number entered, excluding the comma, I stop.
|
|
5525
|
+
if (options.maxLength &&
|
|
5526
|
+
strVal.replace(decChar, '').length == options.maxLength)
|
|
5527
|
+
return;
|
|
5528
|
+
// if a maximum number of integers is required, and I don't have the comma, I check to be right with the values.
|
|
5529
|
+
if (options.maxIntegers &&
|
|
5530
|
+
value != decChar &&
|
|
5531
|
+
!strVal.includes(decChar) &&
|
|
5532
|
+
strVal.length == options.maxIntegers)
|
|
5533
|
+
return;
|
|
5534
|
+
// if a maximum number of decimals has been requested, check where we are.
|
|
5535
|
+
if (options.maxDecimals &&
|
|
5536
|
+
strVal.includes(decChar) &&
|
|
5537
|
+
strVal.substring(strVal.indexOf(decChar) + 1).length ==
|
|
5538
|
+
options.maxDecimals)
|
|
5539
|
+
return;
|
|
5540
|
+
// if the maximum number of decimals in JS has been reached, I stop.
|
|
5541
|
+
if (strVal.includes(decChar) &&
|
|
5542
|
+
strVal.substring(strVal.indexOf(decChar) + 1).length == 14)
|
|
5543
|
+
return;
|
|
5544
|
+
strVal += value;
|
|
5545
|
+
el.kupData.value = strVal;
|
|
5546
|
+
el.kupData.localeValue = dom$2.ketchup.math.numbers.toLocaleString(strVal);
|
|
5547
|
+
component.refresh();
|
|
5548
|
+
}
|
|
5549
|
+
function clearValue(component) {
|
|
5550
|
+
const el = component.rootElement;
|
|
5551
|
+
el.kupData.value = null;
|
|
5552
|
+
el.kupData.localeValue = '';
|
|
5553
|
+
component.refresh();
|
|
5554
|
+
}
|
|
5555
|
+
function getDecimalChar() {
|
|
5556
|
+
return (0.1).toLocaleString(dom$2.ketchup.math.locale).substring(1, 2);
|
|
5557
|
+
}
|
|
5558
|
+
function saveValue(component) {
|
|
5559
|
+
const el = component.rootElement;
|
|
5560
|
+
component.onKupClick(component.rootElement.id, el.kupData.value ? Number(el.kupData.value).toString() : '');
|
|
5561
|
+
}
|
|
5562
|
+
|
|
8256
5563
|
/**
|
|
8257
5564
|
* 1st built-in layout, calendar view.
|
|
8258
5565
|
* @param {KupCard} component - Card component.
|
|
@@ -8285,14 +5592,24 @@ function create3$3(component) {
|
|
|
8285
5592
|
*/
|
|
8286
5593
|
function create4$3(component) {
|
|
8287
5594
|
return (h("div", { class: `built-in-layout-${component.layoutNumber} ${KupCardCSSClasses.BUILT_IN_CARD}` }));
|
|
5595
|
+
}
|
|
5596
|
+
/**
|
|
5597
|
+
* 5th built-in layout, numeric picker.
|
|
5598
|
+
* This layout is rendered after the render cycle completes.
|
|
5599
|
+
* @param {KupCard} component - Card component.
|
|
5600
|
+
* @returns {VNode} 4th built-in layout virtual node.
|
|
5601
|
+
*/
|
|
5602
|
+
function create5$3(component) {
|
|
5603
|
+
return (h("div", { class: `built-in-layout-${component.layoutNumber} ${KupCardCSSClasses.BUILT_IN_CARD}` }, prepareNumeric(component)));
|
|
8288
5604
|
}
|
|
8289
5605
|
|
|
8290
5606
|
const builtInLayouts = /*#__PURE__*/Object.freeze({
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8295
|
-
|
|
5607
|
+
__proto__: null,
|
|
5608
|
+
create1: create1$5,
|
|
5609
|
+
create2: create2$5,
|
|
5610
|
+
create3: create3$3,
|
|
5611
|
+
create4: create4$3,
|
|
5612
|
+
create5: create5$3
|
|
8296
5613
|
});
|
|
8297
5614
|
|
|
8298
5615
|
/**
|
|
@@ -8592,9 +5909,9 @@ function create2$4(component) {
|
|
|
8592
5909
|
}
|
|
8593
5910
|
|
|
8594
5911
|
const collapsibleLayouts = /*#__PURE__*/Object.freeze({
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
5912
|
+
__proto__: null,
|
|
5913
|
+
create1: create1$4,
|
|
5914
|
+
create2: create2$4
|
|
8598
5915
|
});
|
|
8599
5916
|
|
|
8600
5917
|
const dom$1 = document.documentElement;
|
|
@@ -8826,13 +6143,13 @@ function getVisibleColumn(data) {
|
|
|
8826
6143
|
}
|
|
8827
6144
|
|
|
8828
6145
|
const dialogLayouts = /*#__PURE__*/Object.freeze({
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
6146
|
+
__proto__: null,
|
|
6147
|
+
create1: create1$3,
|
|
6148
|
+
create2: create2$3,
|
|
6149
|
+
create3: create3$2,
|
|
6150
|
+
create4: create4$2,
|
|
6151
|
+
create5: create5$2,
|
|
6152
|
+
create6: create6$2
|
|
8836
6153
|
});
|
|
8837
6154
|
|
|
8838
6155
|
/**
|
|
@@ -8857,9 +6174,9 @@ function create2$2(component) {
|
|
|
8857
6174
|
}
|
|
8858
6175
|
|
|
8859
6176
|
const freeLayouts = /*#__PURE__*/Object.freeze({
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
6177
|
+
__proto__: null,
|
|
6178
|
+
create1: create1$2,
|
|
6179
|
+
create2: create2$2
|
|
8863
6180
|
});
|
|
8864
6181
|
|
|
8865
6182
|
/**
|
|
@@ -9124,15 +6441,15 @@ function create8$1(component) {
|
|
|
9124
6441
|
}
|
|
9125
6442
|
|
|
9126
6443
|
const scalableLayouts = /*#__PURE__*/Object.freeze({
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
6444
|
+
__proto__: null,
|
|
6445
|
+
create1: create1$1,
|
|
6446
|
+
create2: create2$1,
|
|
6447
|
+
create3: create3$1,
|
|
6448
|
+
create4: create4$1,
|
|
6449
|
+
create5: create5$1,
|
|
6450
|
+
create6: create6$1,
|
|
6451
|
+
create7: create7$1,
|
|
6452
|
+
create8: create8$1
|
|
9136
6453
|
});
|
|
9137
6454
|
|
|
9138
6455
|
/**
|
|
@@ -9894,22 +7211,22 @@ function create15(component) {
|
|
|
9894
7211
|
}
|
|
9895
7212
|
|
|
9896
7213
|
const standardLayouts = /*#__PURE__*/Object.freeze({
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9911
|
-
|
|
9912
|
-
|
|
7214
|
+
__proto__: null,
|
|
7215
|
+
create1: create1,
|
|
7216
|
+
create2: create2,
|
|
7217
|
+
create3: create3,
|
|
7218
|
+
create4: create4,
|
|
7219
|
+
create5: create5,
|
|
7220
|
+
create6: create6,
|
|
7221
|
+
create7: create7,
|
|
7222
|
+
create8: create8,
|
|
7223
|
+
create9: create9,
|
|
7224
|
+
create10: create10,
|
|
7225
|
+
create11: create11,
|
|
7226
|
+
create12: create12,
|
|
7227
|
+
create13: create13,
|
|
7228
|
+
create14: create14,
|
|
7229
|
+
create15: create15
|
|
9913
7230
|
});
|
|
9914
7231
|
|
|
9915
7232
|
/*!
|
|
@@ -10912,7 +8229,7 @@ var Picker = function () {
|
|
|
10912
8229
|
Picker.StyleElement = style;
|
|
10913
8230
|
}
|
|
10914
8231
|
|
|
10915
|
-
const kupCardCss = ".built-in-layout-1{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto;padding:0.5em}.built-in-layout-1 .section-1{box-sizing:border-box;height:5em;overflow:auto;padding-bottom:1em;width:100%}.built-in-layout-1 .section-1 .sub-1{display:flex;flex-direction:row;justify-content:center}.built-in-layout-1 .section-2{height:calc(100% - 60px);overflow:auto;width:100%}.built-in-layout-1 .prev-page{margin-left:auto}.built-in-layout-1 .change-view-button{margin:auto;width:12em;text-align:center}.built-in-layout-1 #change-view-button button{text-transform:capitalize}.built-in-layout-1 .next-page{margin-right:auto}.built-in-layout-1 .calendar{border-collapse:collapse;width:100%}.built-in-layout-1 thead{border-bottom:1px solid var(--kup-border-color)}.built-in-layout-1 .item-text{color:rgba(var(--kup-text-color-rgb), 0.5)}.built-in-layout-1 .item{text-align:center}.built-in-layout-1 .item:not(.selected) .item-number:hover{background-color:var(--kup-hover-background-color)}.built-in-layout-1 .item.selected .item-number,.built-in-layout-1 .item.selected .item-number:hover{background-color:rgba(var(--kup-primary-color-rgb), 0.175)}.built-in-layout-1 .item-number{border-radius:50%;cursor:pointer;display:flex;justify-content:center;line-height:2.5em;margin:auto;width:2.5em;transition:background-color 0.25s;text-transform:capitalize}.built-in-layout-2{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto}.built-in-layout-2 .clock{box-shadow:var(--kup-box-shadow);width:300px;height:450px;background-color:var(--kup-background-color);position:relative;font-family:var(--kup-font-family)}.built-in-layout-2 .top{background-color:var(--kup-primary-color);color:var(--kup-text-on-primary-color);height:100px;line-height:100px;font-size:50px;text-align:center}.built-in-layout-2 .top span{cursor:pointer;opacity:0.75;transition:0.25s ease-in-out}.built-in-layout-2 .top .visible{opacity:1}.built-in-layout-2 .circle{user-select:none;background-color:rgba(var(--kup-text-color-rgb), 0.1);width:250px;height:250px;border-radius:1000px;position:relative;top:25px;left:25px;box-sizing:border-box;display:none}.built-in-layout-2 .circle.visible{display:block}.built-in-layout-2 .mid{position:absolute;left:calc(50% - 0px);top:calc(50% - 0px);width:2px;height:2px;border-radius:10px;background-color:var(--kup-text-color)}.built-in-layout-2 .hour{position:absolute;height:40px;line-height:40px;width:40px;border-radius:40px;text-align:center}.built-in-layout-2 .hour.selected{z-index:2}.built-in-layout-2 .hour.selected::after{content:\"\";z-index:-1;background-color:rgba(var(--kup-primary-color-rgb), 0.5);height:1px;width:100%;position:absolute;transform:rotate(-90deg);transform-origin:100% 0%;top:50%;width:101px;right:50%}.built-in-layout-2 .hour2{z-index:2;position:absolute;height:30px;line-height:30px;width:30px;border-radius:40px;text-align:center;font-size:14px}.built-in-layout-2 .hour2.selected::after{content:\"\";background-color:rgba(var(--kup-primary-color-rgb), 0.5);height:1px;width:100%;position:absolute;transform:rotate(-90deg);transform-origin:100% 0%;top:50%;width:64px;right:50%;z-index:-1}.built-in-layout-2 .unit{position:absolute;height:20px;line-height:20px;width:20px;border-radius:40px;text-align:center;font-size:12px}.built-in-layout-2 .unit.selected::after{content:\"\";background-color:rgba(var(--kup-primary-color-rgb), 0.5);height:1px;width:100%;position:absolute;transform:rotate(-90deg);transform-origin:100% 0%;top:50%;width:101px;right:50%}.built-in-layout-2 .hour,.built-in-layout-2 .hour2,.built-in-layout-2 .unit{cursor:pointer;transition:background-color 0.25s}.built-in-layout-2 .hour:hover,.built-in-layout-2 .hour2:hover,.built-in-layout-2 .unit:hover{background-color:rgba(var(--kup-primary-color-rgb), 0.275)}.built-in-layout-2 .hour.selected,.built-in-layout-2 .hour2.selected,.built-in-layout-2 .unit.selected{background-color:var(--kup-primary-color);color:var(--kup-text-on-primary-color)}.built-in-layout-2 .actions{color:var(--kup-primary-color);font-weight:bold;font-size:20px;display:flex;justify-content:flex-end;position:absolute;width:100%;box-sizing:border-box;bottom:10px}.built-in-layout-2 .action{display:inline-block;width:100px;text-align:center;height:37.5px;line-height:37.5px;margin-right:10px;cursor:pointer;border-radius:2px}.built-in-layout-2 .clock .actions .action:hover{background-color:rgba(0, 0, 0, 0.1)}.built-in-layout-2 .clock .actions .action:visible{background-color:rgba(0, 0, 0, 0.3)}.built-in-layout-2 .hour:nth-child(12):after{transform:rotate(330deg)}.built-in-layout-2 .hour:nth-child(11):after{transform:rotate(300deg)}.built-in-layout-2 .hour:nth-child(10):after{transform:rotate(270deg)}.built-in-layout-2 .hour:nth-child(9):after{transform:rotate(240deg)}.built-in-layout-2 .hour:nth-child(8):after{transform:rotate(210deg)}.built-in-layout-2 .hour:nth-child(7):after{transform:rotate(180deg)}.built-in-layout-2 .hour:nth-child(6):after{transform:rotate(150deg)}.built-in-layout-2 .hour:nth-child(5):after{transform:rotate(120deg)}.built-in-layout-2 .hour:nth-child(4):after{transform:rotate(90deg)}.built-in-layout-2 .hour:nth-child(3):after{transform:rotate(60deg)}.built-in-layout-2 .hour:nth-child(2):after{transform:rotate(30deg)}.built-in-layout-2 .hour:nth-child(1):after{transform:rotate(0deg)}.built-in-layout-2 .hour2:nth-child(24):after{transform:rotate(690deg)}.built-in-layout-2 .hour2:nth-child(23):after{transform:rotate(660deg)}.built-in-layout-2 .hour2:nth-child(22):after{transform:rotate(630deg)}.built-in-layout-2 .hour2:nth-child(21):after{transform:rotate(600deg)}.built-in-layout-2 .hour2:nth-child(20):after{transform:rotate(570deg)}.built-in-layout-2 .hour2:nth-child(19):after{transform:rotate(540deg)}.built-in-layout-2 .hour2:nth-child(18):after{transform:rotate(510deg)}.built-in-layout-2 .hour2:nth-child(17):after{transform:rotate(480deg)}.built-in-layout-2 .hour2:nth-child(16):after{transform:rotate(450deg)}.built-in-layout-2 .hour2:nth-child(15):after{transform:rotate(420deg)}.built-in-layout-2 .hour2:nth-child(14):after{transform:rotate(390deg)}.built-in-layout-2 .hour2:nth-child(13):after{transform:rotate(360deg)}.built-in-layout-2 .unit:nth-child(60):after{transform:rotate(354deg)}.built-in-layout-2 .unit:nth-child(59):after{transform:rotate(348deg)}.built-in-layout-2 .unit:nth-child(58):after{transform:rotate(342deg)}.built-in-layout-2 .unit:nth-child(57):after{transform:rotate(336deg)}.built-in-layout-2 .unit:nth-child(56):after{transform:rotate(330deg)}.built-in-layout-2 .unit:nth-child(55):after{transform:rotate(324deg)}.built-in-layout-2 .unit:nth-child(54):after{transform:rotate(318deg)}.built-in-layout-2 .unit:nth-child(53):after{transform:rotate(312deg)}.built-in-layout-2 .unit:nth-child(52):after{transform:rotate(306deg)}.built-in-layout-2 .unit:nth-child(51):after{transform:rotate(300deg)}.built-in-layout-2 .unit:nth-child(50):after{transform:rotate(294deg)}.built-in-layout-2 .unit:nth-child(49):after{transform:rotate(288deg)}.built-in-layout-2 .unit:nth-child(48):after{transform:rotate(282deg)}.built-in-layout-2 .unit:nth-child(47):after{transform:rotate(276deg)}.built-in-layout-2 .unit:nth-child(46):after{transform:rotate(270deg)}.built-in-layout-2 .unit:nth-child(45):after{transform:rotate(264deg)}.built-in-layout-2 .unit:nth-child(44):after{transform:rotate(258deg)}.built-in-layout-2 .unit:nth-child(43):after{transform:rotate(252deg)}.built-in-layout-2 .unit:nth-child(42):after{transform:rotate(246deg)}.built-in-layout-2 .unit:nth-child(41):after{transform:rotate(240deg)}.built-in-layout-2 .unit:nth-child(40):after{transform:rotate(234deg)}.built-in-layout-2 .unit:nth-child(39):after{transform:rotate(228deg)}.built-in-layout-2 .unit:nth-child(38):after{transform:rotate(222deg)}.built-in-layout-2 .unit:nth-child(37):after{transform:rotate(216deg)}.built-in-layout-2 .unit:nth-child(36):after{transform:rotate(210deg)}.built-in-layout-2 .unit:nth-child(35):after{transform:rotate(204deg)}.built-in-layout-2 .unit:nth-child(34):after{transform:rotate(198deg)}.built-in-layout-2 .unit:nth-child(33):after{transform:rotate(192deg)}.built-in-layout-2 .unit:nth-child(32):after{transform:rotate(186deg)}.built-in-layout-2 .unit:nth-child(31):after{transform:rotate(180deg)}.built-in-layout-2 .unit:nth-child(30):after{transform:rotate(174deg)}.built-in-layout-2 .unit:nth-child(29):after{transform:rotate(168deg)}.built-in-layout-2 .unit:nth-child(28):after{transform:rotate(162deg)}.built-in-layout-2 .unit:nth-child(27):after{transform:rotate(156deg)}.built-in-layout-2 .unit:nth-child(26):after{transform:rotate(150deg)}.built-in-layout-2 .unit:nth-child(25):after{transform:rotate(144deg)}.built-in-layout-2 .unit:nth-child(24):after{transform:rotate(138deg)}.built-in-layout-2 .unit:nth-child(23):after{transform:rotate(132deg)}.built-in-layout-2 .unit:nth-child(22):after{transform:rotate(126deg)}.built-in-layout-2 .unit:nth-child(21):after{transform:rotate(120deg)}.built-in-layout-2 .unit:nth-child(20):after{transform:rotate(114deg)}.built-in-layout-2 .unit:nth-child(19):after{transform:rotate(108deg)}.built-in-layout-2 .unit:nth-child(18):after{transform:rotate(102deg)}.built-in-layout-2 .unit:nth-child(17):after{transform:rotate(96deg)}.built-in-layout-2 .unit:nth-child(16):after{transform:rotate(90deg)}.built-in-layout-2 .unit:nth-child(15):after{transform:rotate(84deg)}.built-in-layout-2 .unit:nth-child(14):after{transform:rotate(78deg)}.built-in-layout-2 .unit:nth-child(13):after{transform:rotate(72deg)}.built-in-layout-2 .unit:nth-child(12):after{transform:rotate(66deg)}.built-in-layout-2 .unit:nth-child(11):after{transform:rotate(60deg)}.built-in-layout-2 .unit:nth-child(10):after{transform:rotate(54deg)}.built-in-layout-2 .unit:nth-child(9):after{transform:rotate(48deg)}.built-in-layout-2 .unit:nth-child(8):after{transform:rotate(42deg)}.built-in-layout-2 .unit:nth-child(7):after{transform:rotate(36deg)}.built-in-layout-2 .unit:nth-child(6):after{transform:rotate(30deg)}.built-in-layout-2 .unit:nth-child(5):after{transform:rotate(24deg)}.built-in-layout-2 .unit:nth-child(4):after{transform:rotate(18deg)}.built-in-layout-2 .unit:nth-child(3):after{transform:rotate(12deg)}.built-in-layout-2 .unit:nth-child(2):after{transform:rotate(6deg)}.built-in-layout-2 .unit:nth-child(1):after{transform:rotate(0deg)}.built-in-layout-3{background:var(--kup-background-color);box-shadow:rgba(128, 128, 128, 0.1) 0px 2px 1px -1px, rgba(128, 128, 128, 0.1) 0px 1px 1px 0px, rgba(128, 128, 128, 0.6) 0px 1px 3px 0px;box-sizing:border-box;overflow:auto}.built-in-layout-3 kup-button,.built-in-layout-3 kup-combobox{margin:0 auto 0.75em auto}.built-in-layout-3 kup-combobox{width:95%}.built-in-layout-3 .sub-chip{border-top:1px solid var(--kup-border-color);max-height:33vh;overflow:auto;width:100%}.built-in-layout-4{background:var(--kup-background-color);box-shadow:rgba(128, 128, 128, 0.1) 0px 2px 1px -1px, rgba(128, 128, 128, 0.1) 0px 1px 1px 0px, rgba(128, 128, 128, 0.6) 0px 1px 3px 0px;box-sizing:border-box}.built-in-layout-4 .picker_arrow{position:absolute;z-index:-1}.built-in-layout-4 .picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.built-in-layout-4 .picker_wrapper.popup,.built-in-layout-4 .picker_wrapper.popup .picker_arrow::before,.built-in-layout-4 .picker_wrapper.popup .picker_arrow::after{background:var(--kup-background-color);box-shadow:0 0 10px 1px rgba(0, 0, 0, 0.4)}.built-in-layout-4 .picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.built-in-layout-4 .picker_wrapper.popup .picker_arrow::before,.built-in-layout-4 .picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.built-in-layout-4 .picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;transform:skew(45deg);transform-origin:0 100%}.built-in-layout-4 .picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.built-in-layout-4 .popup.popup_top{bottom:100%;left:0}.built-in-layout-4 .popup.popup_top .picker_arrow{bottom:0;left:0;transform:rotate(-90deg)}.built-in-layout-4 .popup.popup_bottom{top:100%;left:0}.built-in-layout-4 .popup.popup_bottom .picker_arrow{top:0;left:0;transform:rotate(90deg) scale(1, -1)}.built-in-layout-4 .popup.popup_left{top:0;right:100%}.built-in-layout-4 .popup.popup_left .picker_arrow{top:0;right:0;transform:scale(-1, 1)}.built-in-layout-4 .popup.popup_right{top:0;left:100%}.built-in-layout-4 .popup.popup_right .picker_arrow{top:0;left:0}.built-in-layout-4 .picker_wrapper.no_alpha .picker_alpha{display:none}.built-in-layout-4 .picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.built-in-layout-4 .picker_wrapper.no_cancel .picker_cancel{display:none}.built-in-layout-4 .layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:0.5em}.built-in-layout-4 .layout_default.picker_wrapper input,.built-in-layout-4 .layout_default.picker_wrapper button{font-size:1em}.built-in-layout-4 .layout_default.picker_wrapper>*{margin:0.5em}.built-in-layout-4 .layout_default.picker_wrapper::before{content:\"\";display:block;width:100%;height:0;order:1}.built-in-layout-4 .layout_default .picker_slider,.built-in-layout-4 .layout_default .picker_selector{padding:1em}.built-in-layout-4 .layout_default .picker_hue{width:100%}.built-in-layout-4 .layout_default .picker_sl{flex:1 1 auto}.built-in-layout-4 .layout_default .picker_sl::before{content:\"\";display:block;padding-bottom:100%}.built-in-layout-4 .layout_default .picker_editor{order:1;width:6.5em}.built-in-layout-4 .layout_default .picker_editor input{width:100%;height:100%}.built-in-layout-4 .layout_default .picker_sample{order:1;flex:1 1 auto}.built-in-layout-4 .layout_default .picker_done,.built-in-layout-4 .layout_default .picker_cancel{order:1}.built-in-layout-4 .picker_wrapper{box-sizing:border-box;background:var(--kup-background-color);box-shadow:0 0 0 1px var(--kup-border-color);cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.built-in-layout-4 .picker_wrapper:focus{outline:none}.built-in-layout-4 .picker_wrapper button,.built-in-layout-4 .picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px var(--kup-border-color);outline:none}.built-in-layout-4 .picker_wrapper button:focus,.built-in-layout-4 .picker_wrapper button:active,.built-in-layout-4 .picker_wrapper input:focus,.built-in-layout-4 .picker_wrapper input:active{box-shadow:0 0 2px 1px var(--kup-border-color)}.built-in-layout-4 .picker_wrapper button{padding:0.4em 0.6em;cursor:pointer;background-color:whitesmoke;background-image:linear-gradient(0deg, gainsboro, transparent)}.built-in-layout-4 .picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.built-in-layout-4 .picker_selector{position:absolute;z-index:1;display:block;transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.built-in-layout-4 .picker_slider .picker_selector{border-radius:2px}.built-in-layout-4 .picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px var(--kup-border-color)}.built-in-layout-4 .picker_sl{position:relative;box-shadow:0 0 0 1px var(--kup-border-color);background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%), linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%), linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.built-in-layout-4 .picker_alpha,.built-in-layout-4 .picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;box-shadow:0 0 0 1px var(--kup-border-color)}.built-in-layout-4 .picker_alpha .picker_selector,.built-in-layout-4 .picker_sample .picker_selector{background:none}.built-in-layout-4 .picker_editor input{font-family:monospace;padding:0.2em 0.4em}.built-in-layout-4 .picker_sample::before{content:\"\";position:absolute;display:block;width:100%;height:100%;background:currentColor}.built-in-layout-4 .picker_done,.built-in-layout-4 .picker_arrow{display:none}.built-in-layout-4 .layout_default.picker_wrapper{bottom:unset;font-size:var(--kup-font-size);left:unset;padding:0.25em;right:unset;top:unset;width:100%}.built-in-layout-4 .layout_default .picker_editor input{background:none;color:var(--kup-text-color);font-family:var(--kup-font-family);font-size:var(--kup-font-size)}.built-in-layout-4 .picker_wrapper.popup{box-shadow:var(--kup-box-shadow);margin:0;outline:none}.collapsible-layout-1{color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.collapsible-layout-1 .section-1{background-color:var(--color-0);display:flex;flex:0 0 10%;max-width:10%}.collapsible-layout-1 .section-2{box-sizing:border-box;height:100%;display:flex;flex:0 0 90%;flex-direction:column;max-width:90%}.collapsible-layout-1 .section-2 .sub-1{min-height:1.5em;display:flex;padding:0.6rem 0.8em 0;font-weight:bold;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.collapsible-layout-1 .section-2 .sub-1 div{font-size:1em}.collapsible-layout-1 .section-2 .sub-1 .left{text-align:left;width:80%}.collapsible-layout-1 .section-2 .sub-1 .right{text-align:right;width:20%}.collapsible-layout-1 .section-2 .sub-2{text-align:left;padding:0.6em 0.8em;font-size:0.875em}.collapsible-layout-2{color:var(--kup-text-color);box-shadow:rgba(0, 0, 0, 0.2) 0px 2px 1px -1px, rgba(0, 0, 0, 0.14) 0px 1px 1px 0px, rgba(0, 0, 0, 0.12) 0px 1px 3px 0px;border-radius:4px;display:flex;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.collapsible-layout-2 .section-1{box-sizing:border-box;height:100%;display:flex;flex-direction:column;max-width:100%;width:100%}.collapsible-layout-2 .section-1 .sub-1{text-align:left;padding:0.6em 0.8em 0;font-size:1em;font-weight:bold;max-width:75%}.collapsible-layout-2 .section-1 .sub-2{text-align:left;padding:0.6em 0.8em;max-width:75%}.collapsible-layout-2 .section-1 .sub-2 div{font-size:0.875em}.collapsible-layout-2 .section-1 .sub-3{color:var(--color-0);text-align:center;position:absolute;top:1em;right:1em;max-width:25%;text-overflow:ellipsis;overflow:hidden;max-height:calc(24px + 2.25em);padding:0 1em}.collapsible-layout-2 .section-1 .sub-3 kup-image{margin:auto}.collapsible-layout-2 .section-1 .sub-3 div{font-size:1.25em}.collapsible-card .collapsible-trigger{display:none;position:absolute;bottom:0;left:0;height:50px;width:100%}.collapsible-card .collapsible-trigger kup-button{margin:auto;width:48px}.collapsible-card .collapsible-wrapper{overflow:auto}.collapsible-card.collapsible-active{padding-bottom:50px}.collapsible-card.collapsible-active .collapsible-trigger{display:block}.dialog-layout-1{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);color:var(--kup-text-color);display:flex;flex-direction:column;height:100%;width:100%;overflow:auto}.dialog-layout-1 .section-1{display:grid;grid-gap:0.5em;grid-template-columns:repeat(2, auto);grid-template-rows:repeat(auto-fill, 1.25em);height:100%;padding:0.5em;overflow:auto;touch-action:none}.dialog-layout-1 .section-1 .text{min-width:max-content}.dialog-layout-1 .section-1 .text:not(.label){font-weight:bold}.dialog-layout-2{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;height:100%;width:100%}.dialog-layout-2 .section-1{text-align:center;touch-action:none;padding-bottom:1em}.dialog-layout-2 .section-1 .text{padding-top:0.75em}.dialog-layout-2 .section-1 .text:not(.label){font-weight:bold}.dialog-layout-2 .section-2{border-top:1px solid var(--kup-border-color);display:grid;grid-gap:0.5em;grid-template-columns:repeat(2, auto);grid-template-rows:repeat(auto-fill, 1.25em);height:100%;padding:0.5em;overflow:auto;touch-action:none}.dialog-layout-2 .section-2 .text{min-width:max-content}.dialog-layout-2 .section-2 .text:not(.label){font-weight:bold}.dialog-layout-3{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;overflow:visible;flex-direction:column;height:100%;position:relative;width:100%}.dialog-layout-3 kup-button{margin-left:0}.dialog-layout-3 .section-1{background-color:var(--kup-background-color);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;box-shadow:0px 1px 3px 0px var(--kup-text-color);height:52px;width:100%;text-align:right;touch-action:none}.dialog-layout-3 .section-1 kup-button{margin-right:0.25em}.dialog-layout-3 .section-2{height:100%;width:100%;overflow:auto;max-height:50vh}.dialog-layout-3 ::slotted(.text){color:var(--kup-text-color);font-family:var(--kup-font-family-monospace);white-space:nowrap;border-bottom:1px solid var(--kup-border-color);line-height:1.75em}.dialog-layout-4{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;height:100%;width:100%}.dialog-layout-4 .section-1{display:flex;justify-content:space-evenly}.dialog-layout-4 .section-2{height:100%;overflow:auto;padding:0.25em;touch-action:none}.dialog-layout-5{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;height:100%;width:100%}.dialog-layout-5 .section-1{display:flex;justify-content:space-evenly}.dialog-layout-5 .section-2{height:100%;overflow:auto}.dialog-layout-6{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;height:100%;max-height:95vh;max-width:95vw;width:100%}.dialog-layout-6 .section-1{display:flex;height:100%;justify-content:space-evenly;overflow:auto}.dialog-layout-6 kup-data-table{width:100%}#drag-handle{-ms-touch-action:none;touch-action:none}#drag-handle:not(.header-bar){display:flex;height:100%}#drag-handle:not(.header-bar) .f-image{margin:auto}#drag-handle.header-bar{background-color:var(--kup-title-background-color);color:var(--kup-title-color);display:flex;flex-direction:row;height:2em;position:relative;width:100%}#drag-handle.header-bar .dialog-title{font-weight:bold;line-height:2em;padding-left:0.5em;padding-right:2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#drag-handle.header-bar #dialog-close{cursor:pointer;margin-right:0;transition:opacity 0.25s;position:absolute;right:0;background:var(--kup-title-background-color)}#drag-handle.header-bar #dialog-close:hover{opacity:0.5}.free-layout-1{background:var(--kup-background-color);box-shadow:var(--kup-box-shadow);box-sizing:border-box;overflow:auto;padding:1em}.free-layout-2{background:var(--kup-background-color);box-shadow:var(--kup-box-shadow);box-sizing:border-box;overflow:auto}.scalable-layout-1 .descr{font-size:70%;width:100%}.scalable-layout-1 .value{font-size:220%}.scalable-layout-2 #image1 img{object-fit:contain}.scalable-layout-2 .scalable-element{display:grid;grid-template-columns:1fr 1fr 0.5fr 0.5fr}.scalable-layout-2 .icon{margin:auto;font-size:150%;margin-right:5%}.scalable-layout-2 .value-int{font-size:250%}.scalable-layout-2 .value-dec,.scalable-layout-2 .unit{font-size:130%;margin-top:auto;margin-bottom:10%}.scalable-layout-2 .value-dec{margin-left:2%}.scalable-layout-2 .unit{margin-left:4%}.scalable-layout-3 .descr{font-size:70%;width:100%}.scalable-layout-3 .value{font-size:220%}.scalable-layout-4 #image1 img{object-fit:contain}.scalable-layout-4 .scalable-element{display:grid;grid-template-columns:1fr 5fr}.scalable-layout-4 .icon{font-size:150%;margin:auto 5% auto auto}.scalable-layout-4 .value-and-unit{display:flex;color:var(--color-0)}.scalable-layout-4 .value-and-unit .value-int{font-size:250%}.scalable-layout-4 .value-and-unit .value-dec,.scalable-layout-4 .value-and-unit .unit{font-size:130%;margin-top:auto;margin-bottom:10%}.scalable-layout-4 .value-and-unit .value-dec{margin-left:2%}.scalable-layout-4 .value-and-unit .unit{margin-left:4%}.scalable-layout-4 .descr{margin-left:4%;text-align:left;font-size:80%;width:100%;min-width:max-content}.scalable-layout-5 #image1 img{object-fit:contain}.scalable-layout-5 .scalable-element{display:flex}.scalable-layout-5 .text-wrapper{margin-right:10px}.scalable-layout-5 .icon{font-size:150%;margin:auto;margin-bottom:0.35em}.scalable-layout-5 .value{font-size:200%}.scalable-layout-5 .descr{text-align:right;font-size:65%;width:100%;min-width:max-content;position:relative;bottom:-10%}.scalable-layout-6 #image1 img{object-fit:contain}.scalable-layout-6 .scalable-element{display:flex;justify-content:space-between}.scalable-layout-6 .text-wrapper{margin-left:1em}.scalable-layout-6 .icon{font-size:150%;margin:auto}.scalable-layout-6 .value{font-size:220%;text-align:right}.scalable-layout-6 .descr{font-size:80%;text-align:right;width:100%;min-width:max-content}.scalable-layout-7 #image1 img{object-fit:contain}.scalable-layout-7 .scalable-element{display:flex}.scalable-layout-7 .text-wrapper{margin-right:0.5em}.scalable-layout-7 .icon{font-size:150%;margin:auto;margin-top:0.35em}.scalable-layout-7 .value{font-size:200%}.scalable-layout-7 .descr{text-align:right;font-size:65%;width:100%;min-width:max-content;position:relative;bottom:10%}.scalable-layout-8 #image1 img{object-fit:contain}.scalable-layout-8 .scalable-element{align-items:center;display:grid;grid-template-columns:0.25fr 1.25fr 0.25fr}.scalable-layout-8 .icon{margin-right:4%;font-size:75%}.scalable-layout-8 .value{margin:0 10%;font-size:250%}.scalable-layout-8 .descr{font-size:60%;text-align:left}.scalable-card{align-items:center;box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);border-radius:4px;display:flex;font-size:calc(var(--kup-font-size) * var(--kup_card_multiplier));height:100%;justify-content:center;position:relative;text-align:center;word-break:normal;width:100%}.standard-layout-1{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto}.standard-layout-1 kup-button{margin-right:0}.standard-layout-1 #image1 img{object-fit:cover}.standard-layout-1.has-actions{padding-bottom:52px}.standard-layout-1.has-actions .section-2 .sub-2.description{padding-bottom:0}.standard-layout-1 .section-1{height:60%;width:100%}.standard-layout-1 .section-2{height:40%;width:100%;overflow:auto}.standard-layout-1 .section-2 .sub-2.title{color:var(--kup-text-color);padding:0 1em;padding-top:1em;text-align:left}.standard-layout-1 .section-2 .sub-2.title div{font-size:1.25em;font-weight:500;letter-spacing:0.0125em}.standard-layout-1 .section-2 .sub-2.subtitle{opacity:0.6;padding:0 1em;padding-bottom:1em;text-align:left}.standard-layout-1 .section-2 .sub-2.subtitle div{font-size:0.875em;font-weight:500;letter-spacing:0.0071428571em;line-height:1.375em}.standard-layout-1 .section-2 .sub-2.description{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;opacity:0.6;padding:0 1em;padding-bottom:1em;text-align:left}.standard-layout-1 .section-2 .sub-2.description div{font-size:0.875em;font-weight:400;letter-spacing:0.0178571429em;line-height:1.25em}.standard-layout-1 .section-3{display:flex;justify-content:flex-end;align-items:center;box-sizing:border-box;position:absolute;left:0;bottom:0;padding:2px 1em;height:52px;width:100%;text-align:right}.standard-layout-1 .section-3 kup-button{margin-left:0.25em}.standard-layout-2{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto}.standard-layout-2 kup-button{margin-right:0}.standard-layout-2 #image1 img{object-fit:cover}.standard-layout-2.has-actions{padding-bottom:52px}.standard-layout-2.has-actions .section-3 .sub-3.description{padding-bottom:0}.standard-layout-2 .section-1{width:100%}.standard-layout-2 .section-1 .sub-1.title{color:var(--kup-text-color);padding:0 1em;padding-top:1em;text-align:left}.standard-layout-2 .section-1 .sub-1.title div{font-size:1.25em;font-weight:500;letter-spacing:0.0125em}.standard-layout-2 .section-1 .sub-1.subtitle{opacity:0.6;padding:0 1em;padding-bottom:1em;text-align:left}.standard-layout-2 .section-1 .sub-1.subtitle div{font-size:0.875em;font-weight:500;letter-spacing:0.0071428571em;line-height:1.375em}.standard-layout-2 .section-2{height:75%;width:100%}.standard-layout-2 .section-3{width:100%;overflow:auto}.standard-layout-2 .section-3 .sub-3.description{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;opacity:0.6;padding:0 1em 8px;padding-top:1em;text-align:left}.standard-layout-2 .section-3 .sub-3.description div{font-size:0.875em;font-weight:400;letter-spacing:0.0178571429em;line-height:1.25em}.standard-layout-2 .section-4{display:flex;justify-content:flex-end;align-items:center;box-sizing:border-box;position:absolute;left:0;bottom:0;padding:2px 1em;height:52px;width:100%;text-align:right}.standard-layout-2 .section-4 kup-button{margin-left:0.25em}.standard-layout-3{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto}.standard-layout-3 kup-button{margin-right:0}.standard-layout-3 #image1 img{object-fit:cover}.standard-layout-3.has-actions{padding-bottom:52px}.standard-layout-3.has-actions .section-2 .sub-2.description{padding-bottom:0}.standard-layout-3 .section-1{height:75%;width:100%}.standard-layout-3 .section-1 .media{position:relative;height:100%;width:100%}.standard-layout-3 .section-1 .text-on-media{position:absolute;bottom:0;left:0}.standard-layout-3 .section-1 .sub-1.title{color:white;padding:0 1em;padding-top:1em;text-align:left}.standard-layout-3 .section-1 .sub-1.title div{font-size:1.25em;font-weight:500;letter-spacing:0.0125em}.standard-layout-3 .section-1 .sub-1.subtitle{color:white;opacity:0.6;padding:0 1em;padding-bottom:1em;text-align:left}.standard-layout-3 .section-1 .sub-1.subtitle div{font-size:0.875em;font-weight:500;letter-spacing:0.0071428571em;line-height:1.375em}.standard-layout-3 .section-2{width:100%;overflow:auto}.standard-layout-3 .section-2 .sub-2.description{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;opacity:0.6;padding:0 1em 8px;padding-top:1em;text-align:left}.standard-layout-3 .section-2 .sub-2.description div{font-size:0.875em;font-weight:400;letter-spacing:0.0178571429em;line-height:1.25em}.standard-layout-3 .section-3{display:flex;justify-content:flex-end;align-items:center;box-sizing:border-box;position:absolute;left:0;bottom:0;padding:2px 1em;height:52px;width:100%;text-align:right}.standard-layout-3 .section-3 kup-button{margin-left:0.25em}.standard-layout-4{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto}.standard-layout-4 kup-button{margin-right:0}.standard-layout-4 #image1 img{object-fit:cover}.standard-layout-4.has-actions{padding-bottom:52px}.standard-layout-4.has-actions .section-3 .sub-3.description{padding-bottom:0}.standard-layout-4 .section-1{display:flex;height:100%;width:100%}.standard-layout-4 .section-1 .sub-1.image{width:33%}.standard-layout-4 .section-1 .sub-1.text{width:77%}.standard-layout-4 .section-1 .sub-1.title{color:var(--kup-text-color);padding:0 1em;padding-top:1em;text-align:left}.standard-layout-4 .section-1 .sub-1.title div{font-size:1.25em;font-weight:500;letter-spacing:0.0125em}.standard-layout-4 .section-1 .sub-1.subtitle{opacity:0.6;padding:0 1em;padding-bottom:1em;text-align:left}.standard-layout-4 .section-1 .sub-1.subtitle div{font-size:0.875em;font-weight:500;letter-spacing:0.0071428571em;line-height:1.375em}.standard-layout-4 .section-2{display:flex;justify-content:flex-end;align-items:center;box-sizing:border-box;position:absolute;left:0;bottom:0;padding:2px 1em;height:52px;width:100%;text-align:right}.standard-layout-4 .section-2 kup-button{margin-left:0.25em}.standard-layout-5{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);height:100%;overflow:hidden;width:100%}.standard-layout-5 .section-1{background-color:var(--color-0);height:3%}.standard-layout-5 .section-2{display:flex;height:53%}.standard-layout-5 .section-3{display:flex;height:24%}.standard-layout-5 .section-4{display:flex;height:20%;background-color:var(--color-1)}.standard-layout-5 .sub-2{box-sizing:border-box;display:flex;flex-direction:column;flex-wrap:wrap;justify-content:center}.standard-layout-5 .sub-2.icon{min-height:20px;flex:0 0 10%;max-width:10%}.standard-layout-5 .sub-2.icon #image1{box-sizing:border-box;margin:auto;padding:0 20%}.standard-layout-5 .sub-2.icon #image1 img{object-fit:contain}.standard-layout-5 .sub-2.text{flex:0 0 70%;max-width:70%;margin:auto;height:100%;flex-wrap:nowrap;padding:1em;text-align:left}.standard-layout-5 .sub-2.image{box-sizing:border-box;flex:0 0 20%;padding:1.5vh 0;max-width:20%}.standard-layout-5 .sub-2.image #image2{box-sizing:border-box;margin:auto;padding:0 10%}.standard-layout-5 .sub-2.image #image2 img{object-fit:contain}.standard-layout-5 .sub-2 .desc-text{overflow:auto}.standard-layout-5 .sub-2 .alt-text{color:var(--kup-primary-color)}.standard-layout-5 .sub-3{box-sizing:border-box}.standard-layout-5 .sub-3.progress-bar{margin:auto;padding:0 5%;vertical-align:2px;width:80%}.standard-layout-5 .sub-3.button{margin:auto;text-align:center;width:20%}.standard-layout-5 .sub-3 kup-button{margin:auto}.standard-layout-5 .sub-4{box-sizing:border-box;margin:auto}.standard-layout-5 .sub-4.text{width:50%;font-size:0.875em}.standard-layout-5 .sub-4 div{padding:0 5%}.standard-layout-5 .sub-4 .alt-text{color:var(--color-0);font-size:1em}.standard-layout-5 .alt-text{font-weight:bold}@media screen and (max-width: 767px){.standard-layout-5 .sub-2.image{display:none}.standard-layout-5 .sub-2.icon{flex-basis:30%;max-width:30%}}.standard-layout-6{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;height:100%;overflow:hidden;width:100%}.standard-layout-6 .section-1{background-color:var(--color-0);display:flex;flex:0 0 10%;max-width:10%}.standard-layout-6 .section-1 .alt-text{color:var(--kup_card_dynamic_color_0);height:100%;text-align:center;writing-mode:vertical-lr;margin:auto;font-size:1.25em}.standard-layout-6 .section-2{box-sizing:border-box;height:100%;display:flex;flex:0 0 90%;flex-direction:column;max-width:90%}.standard-layout-6 .section-2 .sub-2{margin:auto;text-align:center}.standard-layout-6 .section-2 .sub-2 kup-progress-bar{margin-bottom:1em}.standard-layout-6 kup-button{position:absolute;bottom:2%;right:2%}.standard-layout-7{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%}.standard-layout-7 #image1 img{margin:auto;object-fit:contain}.standard-layout-7 .section-1{background-color:var(--color-0);height:5%;width:100%}.standard-layout-7 .section-2{height:80%;width:100%;text-align:center;padding:25px 25%;box-sizing:border-box}.standard-layout-7 .section-2 .sub-2{margin:auto}.standard-layout-7 .section-2 .sub-2.image{box-sizing:border-box;height:65%}.standard-layout-7 .section-2 .sub-2.text{font-size:1.4em;letter-spacing:1.2px;padding-top:1em;height:35%}.standard-layout-7 .section-3{display:flex;height:15%;width:100%}.standard-layout-7 .section-3 .alt-text{margin:auto;opacity:0.75;width:50%}.standard-layout-7 .section-3 .alt-text:nth-child(1){margin-left:1em;text-align:left}.standard-layout-7 .section-3 .alt-text:nth-child(2){margin-right:1em;text-align:right}.standard-layout-8{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.standard-layout-8 .background{background-color:var(--color-0);content:\"\";height:100%;width:100%;opacity:0.1;pointer-events:none;position:absolute;top:0;left:0;z-index:1}.standard-layout-8 .section-1{box-sizing:border-box;display:flex;flex-direction:column;max-width:100%;overflow:auto;height:auto}.standard-layout-8 .section-1 .sub-1{text-align:left;padding:0.6em 0.8em 0;font-size:1em;font-weight:bold;max-width:75%}.standard-layout-8 .section-1 .sub-2{text-align:left;padding:0.6em 0.8em;font-size:0.875em;max-width:75%}.standard-layout-8 .section-1 .sub-3{color:var(--color-0);font-weight:bold;text-align:center;font-size:1.2em;position:absolute;top:1em;right:1em;max-width:25%;text-overflow:ellipsis;max-height:calc(24px + 2.25em);padding:0 1em;overflow:hidden}.standard-layout-8 .section-1 .sub-3 kup-image{margin:auto}.standard-layout-8 .section-2{display:flex;height:auto;overflow:auto}.standard-layout-9{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.standard-layout-9 #image1 img{object-fit:contain}.standard-layout-9 .section-1{margin-top:auto;margin-right:18px;margin-bottom:auto;white-space:nowrap}.standard-layout-9 .section-2{display:flex;height:100%;margin-top:auto;margin-bottom:auto;width:100%;overflow:hidden}.standard-layout-9 .sub-2{display:flex;flex-direction:row}.standard-layout-9 .text{text-align:left}.standard-layout-9 .text-wrapper{display:flex;flex-direction:column}.standard-layout-9 .icon{margin:auto;padding:0 1.25em}.standard-layout-9 .description{font-size:1.5em;letter-spacing:1px;padding-left:1.25em;padding-top:0.25em}.standard-layout-9 .title{font-size:2.75em;font-weight:bold}.standard-layout-9 .subtitle{font-size:1.5em;opacity:0.75}.standard-layout-10{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.standard-layout-10 #image1 img{object-fit:contain}.standard-layout-10 .section-1{display:flex;height:100%;margin-top:auto;margin-bottom:auto;width:100%;overflow:hidden}.standard-layout-10 .section-2{margin-top:auto;margin-left:18px;margin-bottom:auto;white-space:nowrap}.standard-layout-10 .sub-2{display:flex;flex-direction:row-reverse}.standard-layout-10 .text{text-align:right}.standard-layout-10 .text-wrapper{display:flex;flex-direction:column}.standard-layout-10 .icon{margin:auto;padding:0 1.25em}.standard-layout-10 .description{font-size:1.5em;letter-spacing:1px;padding-right:1.25em;padding-top:0.25em}.standard-layout-10 .title{font-size:2.75em;font-weight:bold}.standard-layout-10 .subtitle{font-size:1.5em;opacity:0.75}.standard-layout-11{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.standard-layout-11 #image1 img{object-fit:contain}.standard-layout-11 .section-1{display:flex;height:100%;margin-top:auto;margin-bottom:auto;min-width:6em;max-width:6em;overflow:hidden;transition:0.25s ease-in}.standard-layout-11 .section-2{display:flex;height:100%;margin-top:auto;margin-bottom:auto;width:100%;overflow:hidden}.standard-layout-11 .sub-1{background-color:var(--color-0);height:100%;text-align:center;writing-mode:vertical-lr;min-width:6em;display:flex;transition:width 0.25s ease-in}.standard-layout-11 .sub-1 div{font-size:1.25em}.standard-layout-11 .sub-2{display:flex;flex-direction:row}.standard-layout-11 .text:not(.description){text-align:left}.standard-layout-11 .text-wrapper{display:flex;flex-direction:column}.standard-layout-11 .icon{margin:auto;padding:0 1.25em}.standard-layout-11 .description{font-size:1.5em;letter-spacing:1px;margin:auto;color:var(--kup_card_dynamic_color_0)}.standard-layout-11 .title{font-size:2.75em;font-weight:bold;margin-top:auto}.standard-layout-11 .subtitle{font-size:1.5em;opacity:0.75;margin-bottom:auto}.standard-layout-12{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);color:var(--kup-text-color);min-width:200px;min-width:-moz-max-content;min-width:-webkit-max-content;}.standard-layout-12 .section-1{display:inline-flex;border-bottom:1px solid var(--kup-border-color);width:100%}.standard-layout-12 .section-1 kup-button{margin:0}.standard-layout-12 .section-2{display:flex;flex-direction:column}.standard-layout-12 .section-2.has-content{border-bottom:1px solid var(--kup-border-color);padding:0.5em 0.5em}.standard-layout-12 .section-2 kup-date-picker:first-of-type,.standard-layout-12 .section-2 kup-time-picker:first-of-type{margin-bottom:0.5em}.standard-layout-12 .section-3{backface-visibility:hidden;display:flex;flex-direction:column;max-height:20vh;overflow:auto}.standard-layout-12 .section-3 kup-checkbox{margin-left:0;margin-right:auto}.standard-layout-13{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;height:100%;position:relative;width:100%}.standard-layout-13 kup-button{margin-left:0}.standard-layout-13 .section-1{background-color:var(--kup-background-color);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;box-shadow:0px 1px 3px 0px var(--kup-text-color);height:52px;width:100%;text-align:right}.standard-layout-13 .section-1 kup-button{margin-right:0.25em}.standard-layout-13 .section-2{height:100%;width:100%;overflow:auto;max-height:50vh}.standard-layout-13 .text{color:var(--kup-text-color);font-family:var(--kup-font-family-monospace);white-space:nowrap;border-bottom:1px solid var(--kup-border-color);line-height:1.75em}.standard-layout-14{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);color:var(--kup-text-color);min-width:200px;min-width:-moz-max-content;min-width:-webkit-max-content;}.standard-layout-14 .section-1{display:flex;padding:1em}.standard-layout-14 .section-1 .sub-1{width:100%}.standard-layout-14 .section-1 .sub-spinner{height:88px;width:88px;margin:0 10px}.standard-layout-14 .section-1 .f-image{margin:0 0.5em 0 0}.standard-layout-14 .section-1 .title{font-size:1.25em;margin-top:-0.5em;padding:0 0.25em 0.25em}.standard-layout-14 .section-1 .title .label{cursor:pointer;padding-right:0.25em}.standard-layout-14 .section-1 .title .label:hover{text-decoration:underline}.standard-layout-14 .section-1 .info{display:flex;padding:0 0.25em 0.25em;width:100%}.standard-layout-14 .section-1 .info .label{color:rgba(var(--kup-text-color-rgb), 0.75);margin-right:0.75em;min-width:max-content;width:auto}.standard-layout-14 .section-1 .info .value{width:100%}.standard-layout-14 .sub-button{display:inline-flex;width:100%}.standard-layout-14 .sub-button kup-button{margin:0}.standard-layout-14 .sub-checkbox{backface-visibility:hidden;display:flex;flex-direction:column;max-height:20vh;overflow:auto}.standard-layout-14 .sub-checkbox kup-checkbox{margin-left:0;margin-right:auto}.standard-layout-14 .sub-formula{padding:0.5em}.standard-layout-14 .sub-chip{max-width:25vw;overflow:auto;box-shadow:0 3px 2px -2px var(--kup-border-color)}.standard-layout-14 .sub-field{display:flex;flex-direction:column}.standard-layout-14 .sub-field.has-content{border-bottom:1px solid var(--kup-border-color);padding:0.5em 0.5em}.standard-layout-14 .sub-field kup-date-picker:first-of-type,.standard-layout-14 .sub-field kup-time-picker:first-of-type{margin-bottom:0.5em}.standard-layout-14 .sub-spinner{height:100px}.standard-layout-14 .sub-autocomplete{padding-top:1em}.standard-layout-14 .sub-autocomplete kup-autocomplete{margin:auto;padding:0.5em 0;width:max-content}.standard-layout-14 .sub-switch{display:flex;justify-content:space-evenly;padding:2em}.standard-layout-14 .sub-tree{max-height:25vh;overflow:auto}.standard-layout-14 #apply{display:none;margin:auto}.standard-layout-14 #apply.visible{display:block}.standard-layout-14 #open-in-new,.standard-layout-14 #search,.standard-layout-14 #new{margin:0;display:inline-flex}.standard-layout-15{outline:none;display:block;font-size:var(--kup-font-size);background:var(--kup-background-color);color:var(--kup-text-color);box-shadow:var(--kup-box-shadow);border-radius:3px}.standard-layout-15 .section-1{box-sizing:border-box;display:flex;padding:1em}.standard-layout-15 .section-1 .sub-1{width:100%}.standard-layout-15 .section-1 .sub-spinner{height:88px;width:88px;margin:0 10px}.standard-layout-15 .section-1 .f-image{margin:0 0.5em 0 0}.standard-layout-15 .section-1 .title{font-size:1.25em;padding:0 0.25em 0.25em;text-align:left}.standard-layout-15 .section-1 .title .label{cursor:pointer;padding-right:0.25em}.standard-layout-15 .section-1 .title .label:hover{text-decoration:underline}.standard-layout-15 .section-1 .info{display:flex;padding:0 0.25em 0.25em;width:100%}.standard-layout-15 .section-1 .info .label{color:rgba(var(--kup-text-color-rgb), 0.75);margin-right:0.75em;min-width:max-content;width:auto}.standard-layout-15 .section-1 .info .value{width:100%}.standard-layout-15 .section-2{border-top:1px solid var(--kup-border-color);box-sizing:border-box;height:180px;opacity:1;overflow:auto;transition:height 250ms ease-out, opacity 250ms ease-out}.standard-layout-15 .section-2 .info{box-sizing:border-box;height:100%;padding:1.25em}.standard-layout-15 .section-2 .detail-row{display:flex;justify-content:space-between}.standard-layout-15 .section-2 .detail-row:not(:last-child){margin-bottom:6px}.standard-layout-15 .section-2 .detail-row__label{color:rgba(var(--kup-text-color-rgb), 0.5);margin-top:0.175em;max-width:320px}.standard-layout-15 .section-2 .detail-row__value{color:var(--kup-text-color);font-size:120%;max-width:320px}.standard-layout-15 .section-2 kup-tree{text-align:left}.standard-layout-15 .section-3{border-top:1px solid var(--kup-border-color);display:flex;justify-content:flex-end;padding:6px;padding-top:2px;padding-bottom:2px}.standard-layout-15 .section-3 kup-button{margin:auto 0}.standard-layout-15 #open-in-new,.standard-layout-15 #search,.standard-layout-15 #new{margin:0;display:inline-flex}:host{--kup_card_ripple_color:var(\n --kup-card-ripple-color,\n var(--kup-primary-color)\n );display:block;font-size:var(--kup-font-size);height:var(--kup_card_height);min-height:var(--kup_card_height);min-width:var(--kup_card_width);outline:none;position:relative;width:var(--kup_card_width)}:host([is-menu]){display:none;animation:fade-in 0.25s ease-out}:host([menu-visible]){box-shadow:var(--kup-box-shadow);display:block}#kup-component{height:100%;width:100%}.mdc-ripple-surface{cursor:pointer;flex-direction:column;display:flex;height:100%;position:relative}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_card_ripple_color)}.card-view{animation:fade-in 0.25s ease-out;display:none;height:100%;width:100%}.card-view.visible{display:block}";
|
|
8232
|
+
const kupCardCss = ".built-in-layout-1{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto;padding:0.5em}.built-in-layout-1 .section-1{box-sizing:border-box;height:5em;overflow:auto;padding-bottom:1em;width:100%}.built-in-layout-1 .section-1 .sub-1{display:flex;flex-direction:row;justify-content:center}.built-in-layout-1 .section-2{height:calc(100% - 60px);overflow:auto;width:100%}.built-in-layout-1 .prev-page{margin-left:auto}.built-in-layout-1 .change-view-button{margin:auto;width:12em;text-align:center}.built-in-layout-1 #change-view-button button{text-transform:capitalize}.built-in-layout-1 .next-page{margin-right:auto}.built-in-layout-1 .calendar{border-collapse:collapse;width:100%}.built-in-layout-1 thead{border-bottom:1px solid var(--kup-border-color)}.built-in-layout-1 .item-text{color:rgba(var(--kup-text-color-rgb), 0.5)}.built-in-layout-1 .item{text-align:center}.built-in-layout-1 .item:not(.selected) .item-number:hover{background-color:var(--kup-hover-background-color)}.built-in-layout-1 .item.selected .item-number,.built-in-layout-1 .item.selected .item-number:hover{background-color:rgba(var(--kup-primary-color-rgb), 0.175)}.built-in-layout-1 .item-number{border-radius:50%;cursor:pointer;display:flex;justify-content:center;line-height:2.5em;margin:auto;width:2.5em;transition:background-color 0.25s;text-transform:capitalize}.built-in-layout-2{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto}.built-in-layout-2 .clock{box-shadow:var(--kup-box-shadow);width:300px;height:450px;background-color:var(--kup-background-color);position:relative;font-family:var(--kup-font-family)}.built-in-layout-2 .top{background-color:var(--kup-primary-color);color:var(--kup-text-on-primary-color);height:100px;line-height:100px;font-size:50px;text-align:center}.built-in-layout-2 .top span{cursor:pointer;opacity:0.75;transition:0.25s ease-in-out}.built-in-layout-2 .top .visible{opacity:1}.built-in-layout-2 .circle{user-select:none;background-color:rgba(var(--kup-text-color-rgb), 0.1);width:250px;height:250px;border-radius:1000px;position:relative;top:25px;left:25px;box-sizing:border-box;display:none}.built-in-layout-2 .circle.visible{display:block}.built-in-layout-2 .mid{position:absolute;left:calc(50% - 0px);top:calc(50% - 0px);width:2px;height:2px;border-radius:10px;background-color:var(--kup-text-color)}.built-in-layout-2 .hour{position:absolute;height:40px;line-height:40px;width:40px;border-radius:40px;text-align:center}.built-in-layout-2 .hour.selected{z-index:2}.built-in-layout-2 .hour.selected::after{content:\"\";z-index:-1;background-color:rgba(var(--kup-primary-color-rgb), 0.5);height:1px;width:100%;position:absolute;transform:rotate(-90deg);transform-origin:100% 0%;top:50%;width:101px;right:50%}.built-in-layout-2 .hour2{z-index:2;position:absolute;height:30px;line-height:30px;width:30px;border-radius:40px;text-align:center;font-size:14px}.built-in-layout-2 .hour2.selected::after{content:\"\";background-color:rgba(var(--kup-primary-color-rgb), 0.5);height:1px;width:100%;position:absolute;transform:rotate(-90deg);transform-origin:100% 0%;top:50%;width:64px;right:50%;z-index:-1}.built-in-layout-2 .unit{position:absolute;height:20px;line-height:20px;width:20px;border-radius:40px;text-align:center;font-size:12px}.built-in-layout-2 .unit.selected::after{content:\"\";background-color:rgba(var(--kup-primary-color-rgb), 0.5);height:1px;width:100%;position:absolute;transform:rotate(-90deg);transform-origin:100% 0%;top:50%;width:101px;right:50%}.built-in-layout-2 .hour,.built-in-layout-2 .hour2,.built-in-layout-2 .unit{cursor:pointer;transition:background-color 0.25s}.built-in-layout-2 .hour:hover,.built-in-layout-2 .hour2:hover,.built-in-layout-2 .unit:hover{background-color:rgba(var(--kup-primary-color-rgb), 0.275)}.built-in-layout-2 .hour.selected,.built-in-layout-2 .hour2.selected,.built-in-layout-2 .unit.selected{background-color:var(--kup-primary-color);color:var(--kup-text-on-primary-color)}.built-in-layout-2 .actions{color:var(--kup-primary-color);font-weight:bold;font-size:20px;display:flex;justify-content:flex-end;position:absolute;width:100%;box-sizing:border-box;bottom:10px}.built-in-layout-2 .action{display:inline-block;width:100px;text-align:center;height:37.5px;line-height:37.5px;margin-right:10px;cursor:pointer;border-radius:2px}.built-in-layout-2 .clock .actions .action:hover{background-color:rgba(0, 0, 0, 0.1)}.built-in-layout-2 .clock .actions .action:visible{background-color:rgba(0, 0, 0, 0.3)}.built-in-layout-2 .hour:nth-child(12):after{transform:rotate(330deg)}.built-in-layout-2 .hour:nth-child(11):after{transform:rotate(300deg)}.built-in-layout-2 .hour:nth-child(10):after{transform:rotate(270deg)}.built-in-layout-2 .hour:nth-child(9):after{transform:rotate(240deg)}.built-in-layout-2 .hour:nth-child(8):after{transform:rotate(210deg)}.built-in-layout-2 .hour:nth-child(7):after{transform:rotate(180deg)}.built-in-layout-2 .hour:nth-child(6):after{transform:rotate(150deg)}.built-in-layout-2 .hour:nth-child(5):after{transform:rotate(120deg)}.built-in-layout-2 .hour:nth-child(4):after{transform:rotate(90deg)}.built-in-layout-2 .hour:nth-child(3):after{transform:rotate(60deg)}.built-in-layout-2 .hour:nth-child(2):after{transform:rotate(30deg)}.built-in-layout-2 .hour:nth-child(1):after{transform:rotate(0deg)}.built-in-layout-2 .hour2:nth-child(24):after{transform:rotate(690deg)}.built-in-layout-2 .hour2:nth-child(23):after{transform:rotate(660deg)}.built-in-layout-2 .hour2:nth-child(22):after{transform:rotate(630deg)}.built-in-layout-2 .hour2:nth-child(21):after{transform:rotate(600deg)}.built-in-layout-2 .hour2:nth-child(20):after{transform:rotate(570deg)}.built-in-layout-2 .hour2:nth-child(19):after{transform:rotate(540deg)}.built-in-layout-2 .hour2:nth-child(18):after{transform:rotate(510deg)}.built-in-layout-2 .hour2:nth-child(17):after{transform:rotate(480deg)}.built-in-layout-2 .hour2:nth-child(16):after{transform:rotate(450deg)}.built-in-layout-2 .hour2:nth-child(15):after{transform:rotate(420deg)}.built-in-layout-2 .hour2:nth-child(14):after{transform:rotate(390deg)}.built-in-layout-2 .hour2:nth-child(13):after{transform:rotate(360deg)}.built-in-layout-2 .unit:nth-child(60):after{transform:rotate(354deg)}.built-in-layout-2 .unit:nth-child(59):after{transform:rotate(348deg)}.built-in-layout-2 .unit:nth-child(58):after{transform:rotate(342deg)}.built-in-layout-2 .unit:nth-child(57):after{transform:rotate(336deg)}.built-in-layout-2 .unit:nth-child(56):after{transform:rotate(330deg)}.built-in-layout-2 .unit:nth-child(55):after{transform:rotate(324deg)}.built-in-layout-2 .unit:nth-child(54):after{transform:rotate(318deg)}.built-in-layout-2 .unit:nth-child(53):after{transform:rotate(312deg)}.built-in-layout-2 .unit:nth-child(52):after{transform:rotate(306deg)}.built-in-layout-2 .unit:nth-child(51):after{transform:rotate(300deg)}.built-in-layout-2 .unit:nth-child(50):after{transform:rotate(294deg)}.built-in-layout-2 .unit:nth-child(49):after{transform:rotate(288deg)}.built-in-layout-2 .unit:nth-child(48):after{transform:rotate(282deg)}.built-in-layout-2 .unit:nth-child(47):after{transform:rotate(276deg)}.built-in-layout-2 .unit:nth-child(46):after{transform:rotate(270deg)}.built-in-layout-2 .unit:nth-child(45):after{transform:rotate(264deg)}.built-in-layout-2 .unit:nth-child(44):after{transform:rotate(258deg)}.built-in-layout-2 .unit:nth-child(43):after{transform:rotate(252deg)}.built-in-layout-2 .unit:nth-child(42):after{transform:rotate(246deg)}.built-in-layout-2 .unit:nth-child(41):after{transform:rotate(240deg)}.built-in-layout-2 .unit:nth-child(40):after{transform:rotate(234deg)}.built-in-layout-2 .unit:nth-child(39):after{transform:rotate(228deg)}.built-in-layout-2 .unit:nth-child(38):after{transform:rotate(222deg)}.built-in-layout-2 .unit:nth-child(37):after{transform:rotate(216deg)}.built-in-layout-2 .unit:nth-child(36):after{transform:rotate(210deg)}.built-in-layout-2 .unit:nth-child(35):after{transform:rotate(204deg)}.built-in-layout-2 .unit:nth-child(34):after{transform:rotate(198deg)}.built-in-layout-2 .unit:nth-child(33):after{transform:rotate(192deg)}.built-in-layout-2 .unit:nth-child(32):after{transform:rotate(186deg)}.built-in-layout-2 .unit:nth-child(31):after{transform:rotate(180deg)}.built-in-layout-2 .unit:nth-child(30):after{transform:rotate(174deg)}.built-in-layout-2 .unit:nth-child(29):after{transform:rotate(168deg)}.built-in-layout-2 .unit:nth-child(28):after{transform:rotate(162deg)}.built-in-layout-2 .unit:nth-child(27):after{transform:rotate(156deg)}.built-in-layout-2 .unit:nth-child(26):after{transform:rotate(150deg)}.built-in-layout-2 .unit:nth-child(25):after{transform:rotate(144deg)}.built-in-layout-2 .unit:nth-child(24):after{transform:rotate(138deg)}.built-in-layout-2 .unit:nth-child(23):after{transform:rotate(132deg)}.built-in-layout-2 .unit:nth-child(22):after{transform:rotate(126deg)}.built-in-layout-2 .unit:nth-child(21):after{transform:rotate(120deg)}.built-in-layout-2 .unit:nth-child(20):after{transform:rotate(114deg)}.built-in-layout-2 .unit:nth-child(19):after{transform:rotate(108deg)}.built-in-layout-2 .unit:nth-child(18):after{transform:rotate(102deg)}.built-in-layout-2 .unit:nth-child(17):after{transform:rotate(96deg)}.built-in-layout-2 .unit:nth-child(16):after{transform:rotate(90deg)}.built-in-layout-2 .unit:nth-child(15):after{transform:rotate(84deg)}.built-in-layout-2 .unit:nth-child(14):after{transform:rotate(78deg)}.built-in-layout-2 .unit:nth-child(13):after{transform:rotate(72deg)}.built-in-layout-2 .unit:nth-child(12):after{transform:rotate(66deg)}.built-in-layout-2 .unit:nth-child(11):after{transform:rotate(60deg)}.built-in-layout-2 .unit:nth-child(10):after{transform:rotate(54deg)}.built-in-layout-2 .unit:nth-child(9):after{transform:rotate(48deg)}.built-in-layout-2 .unit:nth-child(8):after{transform:rotate(42deg)}.built-in-layout-2 .unit:nth-child(7):after{transform:rotate(36deg)}.built-in-layout-2 .unit:nth-child(6):after{transform:rotate(30deg)}.built-in-layout-2 .unit:nth-child(5):after{transform:rotate(24deg)}.built-in-layout-2 .unit:nth-child(4):after{transform:rotate(18deg)}.built-in-layout-2 .unit:nth-child(3):after{transform:rotate(12deg)}.built-in-layout-2 .unit:nth-child(2):after{transform:rotate(6deg)}.built-in-layout-2 .unit:nth-child(1):after{transform:rotate(0deg)}.built-in-layout-3{background:var(--kup-background-color);box-shadow:rgba(128, 128, 128, 0.1) 0px 2px 1px -1px, rgba(128, 128, 128, 0.1) 0px 1px 1px 0px, rgba(128, 128, 128, 0.6) 0px 1px 3px 0px;box-sizing:border-box;overflow:auto}.built-in-layout-3 kup-button,.built-in-layout-3 kup-combobox{margin:0 auto 0.75em auto}.built-in-layout-3 kup-combobox{width:95%}.built-in-layout-3 .sub-chip{border-top:1px solid var(--kup-border-color);max-height:33vh;overflow:auto;width:100%}.built-in-layout-4{background:var(--kup-background-color);box-shadow:rgba(128, 128, 128, 0.1) 0px 2px 1px -1px, rgba(128, 128, 128, 0.1) 0px 1px 1px 0px, rgba(128, 128, 128, 0.6) 0px 1px 3px 0px;box-sizing:border-box}.built-in-layout-4 .picker_arrow{position:absolute;z-index:-1}.built-in-layout-4 .picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.built-in-layout-4 .picker_wrapper.popup,.built-in-layout-4 .picker_wrapper.popup .picker_arrow::before,.built-in-layout-4 .picker_wrapper.popup .picker_arrow::after{background:var(--kup-background-color);box-shadow:0 0 10px 1px rgba(0, 0, 0, 0.4)}.built-in-layout-4 .picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.built-in-layout-4 .picker_wrapper.popup .picker_arrow::before,.built-in-layout-4 .picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.built-in-layout-4 .picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;transform:skew(45deg);transform-origin:0 100%}.built-in-layout-4 .picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.built-in-layout-4 .popup.popup_top{bottom:100%;left:0}.built-in-layout-4 .popup.popup_top .picker_arrow{bottom:0;left:0;transform:rotate(-90deg)}.built-in-layout-4 .popup.popup_bottom{top:100%;left:0}.built-in-layout-4 .popup.popup_bottom .picker_arrow{top:0;left:0;transform:rotate(90deg) scale(1, -1)}.built-in-layout-4 .popup.popup_left{top:0;right:100%}.built-in-layout-4 .popup.popup_left .picker_arrow{top:0;right:0;transform:scale(-1, 1)}.built-in-layout-4 .popup.popup_right{top:0;left:100%}.built-in-layout-4 .popup.popup_right .picker_arrow{top:0;left:0}.built-in-layout-4 .picker_wrapper.no_alpha .picker_alpha{display:none}.built-in-layout-4 .picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.built-in-layout-4 .picker_wrapper.no_cancel .picker_cancel{display:none}.built-in-layout-4 .layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:0.5em}.built-in-layout-4 .layout_default.picker_wrapper input,.built-in-layout-4 .layout_default.picker_wrapper button{font-size:1em}.built-in-layout-4 .layout_default.picker_wrapper>*{margin:0.5em}.built-in-layout-4 .layout_default.picker_wrapper::before{content:\"\";display:block;width:100%;height:0;order:1}.built-in-layout-4 .layout_default .picker_slider,.built-in-layout-4 .layout_default .picker_selector{padding:1em}.built-in-layout-4 .layout_default .picker_hue{width:100%}.built-in-layout-4 .layout_default .picker_sl{flex:1 1 auto}.built-in-layout-4 .layout_default .picker_sl::before{content:\"\";display:block;padding-bottom:100%}.built-in-layout-4 .layout_default .picker_editor{order:1;width:6.5em}.built-in-layout-4 .layout_default .picker_editor input{width:100%;height:100%}.built-in-layout-4 .layout_default .picker_sample{order:1;flex:1 1 auto}.built-in-layout-4 .layout_default .picker_done,.built-in-layout-4 .layout_default .picker_cancel{order:1}.built-in-layout-4 .picker_wrapper{box-sizing:border-box;background:var(--kup-background-color);box-shadow:0 0 0 1px var(--kup-border-color);cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.built-in-layout-4 .picker_wrapper:focus{outline:none}.built-in-layout-4 .picker_wrapper button,.built-in-layout-4 .picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px var(--kup-border-color);outline:none}.built-in-layout-4 .picker_wrapper button:focus,.built-in-layout-4 .picker_wrapper button:active,.built-in-layout-4 .picker_wrapper input:focus,.built-in-layout-4 .picker_wrapper input:active{box-shadow:0 0 2px 1px var(--kup-border-color)}.built-in-layout-4 .picker_wrapper button{padding:0.4em 0.6em;cursor:pointer;background-color:whitesmoke;background-image:linear-gradient(0deg, gainsboro, transparent)}.built-in-layout-4 .picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.built-in-layout-4 .picker_selector{position:absolute;z-index:1;display:block;transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.built-in-layout-4 .picker_slider .picker_selector{border-radius:2px}.built-in-layout-4 .picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px var(--kup-border-color)}.built-in-layout-4 .picker_sl{position:relative;box-shadow:0 0 0 1px var(--kup-border-color);background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%), linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%), linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.built-in-layout-4 .picker_alpha,.built-in-layout-4 .picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;box-shadow:0 0 0 1px var(--kup-border-color)}.built-in-layout-4 .picker_alpha .picker_selector,.built-in-layout-4 .picker_sample .picker_selector{background:none}.built-in-layout-4 .picker_editor input{font-family:monospace;padding:0.2em 0.4em}.built-in-layout-4 .picker_sample::before{content:\"\";position:absolute;display:block;width:100%;height:100%;background:currentColor}.built-in-layout-4 .picker_done,.built-in-layout-4 .picker_arrow{display:none}.built-in-layout-4 .layout_default.picker_wrapper{bottom:unset;font-size:var(--kup-font-size);left:unset;padding:0.25em;right:unset;top:unset;width:100%}.built-in-layout-4 .layout_default .picker_editor input{background:none;color:var(--kup-text-color);font-family:var(--kup-font-family);font-size:var(--kup-font-size)}.built-in-layout-4 .picker_wrapper.popup{box-shadow:var(--kup-box-shadow);margin:0;outline:none}.built-in-layout-5{background:var(--kup-background-color);box-shadow:var(--kup-box-shadow);box-sizing:border-box;overflow:auto;padding:0.5em}.built-in-layout-5>table{width:100%}.built-in-layout-5>table>tr>td>div.value{text-align:right;color:var(--kup-primary-color);border-bottom:1px solid var(--kup-border-color);min-height:1.5em}.built-in-layout-5>table>tr>td>.f-button{display:flex;justify-content:center}.built-in-layout-5>table>tr>td>div.number{border-radius:50%;cursor:pointer;display:flex;justify-content:center;line-height:2.5em;margin:auto;width:2.5em;transition:background-color 0.25s;text-transform:capitalize}.built-in-layout-5>table>tr>td>div.number:hover{background-color:var(--kup-hover-background-color)}.collapsible-layout-1{color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.collapsible-layout-1 .section-1{background-color:var(--color-0);display:flex;flex:0 0 10%;max-width:10%}.collapsible-layout-1 .section-2{box-sizing:border-box;height:100%;display:flex;flex:0 0 90%;flex-direction:column;max-width:90%}.collapsible-layout-1 .section-2 .sub-1{min-height:1.5em;display:flex;padding:0.6rem 0.8em 0;font-weight:bold;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.collapsible-layout-1 .section-2 .sub-1 div{font-size:1em}.collapsible-layout-1 .section-2 .sub-1 .left{text-align:left;width:80%}.collapsible-layout-1 .section-2 .sub-1 .right{text-align:right;width:20%}.collapsible-layout-1 .section-2 .sub-2{text-align:left;padding:0.6em 0.8em;font-size:0.875em}.collapsible-layout-2{color:var(--kup-text-color);box-shadow:rgba(0, 0, 0, 0.2) 0px 2px 1px -1px, rgba(0, 0, 0, 0.14) 0px 1px 1px 0px, rgba(0, 0, 0, 0.12) 0px 1px 3px 0px;border-radius:4px;display:flex;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.collapsible-layout-2 .section-1{box-sizing:border-box;height:100%;display:flex;flex-direction:column;max-width:100%;width:100%}.collapsible-layout-2 .section-1 .sub-1{text-align:left;padding:0.6em 0.8em 0;font-size:1em;font-weight:bold;max-width:75%}.collapsible-layout-2 .section-1 .sub-2{text-align:left;padding:0.6em 0.8em;max-width:75%}.collapsible-layout-2 .section-1 .sub-2 div{font-size:0.875em}.collapsible-layout-2 .section-1 .sub-3{color:var(--color-0);text-align:center;position:absolute;top:1em;right:1em;max-width:25%;text-overflow:ellipsis;overflow:hidden;max-height:calc(24px + 2.25em);padding:0 1em}.collapsible-layout-2 .section-1 .sub-3 kup-image{margin:auto}.collapsible-layout-2 .section-1 .sub-3 div{font-size:1.25em}.collapsible-card .collapsible-trigger{display:none;position:absolute;bottom:0;left:0;height:50px;width:100%}.collapsible-card .collapsible-trigger kup-button{margin:auto;width:48px}.collapsible-card .collapsible-wrapper{overflow:auto}.collapsible-card.collapsible-active{padding-bottom:50px}.collapsible-card.collapsible-active .collapsible-trigger{display:block}.dialog-layout-1{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);color:var(--kup-text-color);display:flex;flex-direction:column;height:100%;width:100%;overflow:auto}.dialog-layout-1 .section-1{display:grid;grid-gap:0.5em;grid-template-columns:repeat(2, auto);grid-template-rows:repeat(auto-fill, 1.25em);height:100%;padding:0.5em;overflow:auto;touch-action:none}.dialog-layout-1 .section-1 .text{min-width:max-content}.dialog-layout-1 .section-1 .text:not(.label){font-weight:bold}.dialog-layout-2{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;height:100%;width:100%}.dialog-layout-2 .section-1{text-align:center;touch-action:none;padding-bottom:1em}.dialog-layout-2 .section-1 .text{padding-top:0.75em}.dialog-layout-2 .section-1 .text:not(.label){font-weight:bold}.dialog-layout-2 .section-2{border-top:1px solid var(--kup-border-color);display:grid;grid-gap:0.5em;grid-template-columns:repeat(2, auto);grid-template-rows:repeat(auto-fill, 1.25em);height:100%;padding:0.5em;overflow:auto;touch-action:none}.dialog-layout-2 .section-2 .text{min-width:max-content}.dialog-layout-2 .section-2 .text:not(.label){font-weight:bold}.dialog-layout-3{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;overflow:visible;flex-direction:column;height:100%;position:relative;width:100%}.dialog-layout-3 kup-button{margin-left:0}.dialog-layout-3 .section-1{background-color:var(--kup-background-color);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;box-shadow:0px 1px 3px 0px var(--kup-text-color);height:52px;width:100%;text-align:right;touch-action:none}.dialog-layout-3 .section-1 kup-button{margin-right:0.25em}.dialog-layout-3 .section-2{height:100%;width:100%;overflow:auto;max-height:50vh}.dialog-layout-3 ::slotted(.text){color:var(--kup-text-color);font-family:var(--kup-font-family-monospace);white-space:nowrap;border-bottom:1px solid var(--kup-border-color);line-height:1.75em}.dialog-layout-4{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;height:100%;width:100%}.dialog-layout-4 .section-1{display:flex;justify-content:space-evenly}.dialog-layout-4 .section-2{height:100%;overflow:auto;padding:0.25em;touch-action:none}.dialog-layout-5{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;height:100%;width:100%}.dialog-layout-5 .section-1{display:flex;justify-content:space-evenly}.dialog-layout-5 .section-2{height:100%;overflow:auto}.dialog-layout-6{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;height:100%;max-height:95vh;max-width:95vw;width:100%}.dialog-layout-6 .section-1{display:flex;height:100%;justify-content:space-evenly;overflow:auto}.dialog-layout-6 kup-data-table{width:100%}#drag-handle{-ms-touch-action:none;touch-action:none}#drag-handle:not(.header-bar){display:flex;height:100%}#drag-handle:not(.header-bar) .f-image{margin:auto}#drag-handle.header-bar{background-color:var(--kup-title-background-color);color:var(--kup-title-color);display:flex;flex-direction:row;height:2em;position:relative;width:100%}#drag-handle.header-bar .dialog-title{font-weight:bold;line-height:2em;padding-left:0.5em;padding-right:2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#drag-handle.header-bar #dialog-close{cursor:pointer;margin-right:0;transition:opacity 0.25s;position:absolute;right:0;background:var(--kup-title-background-color)}#drag-handle.header-bar #dialog-close:hover{opacity:0.5}.free-layout-1{background:var(--kup-background-color);box-shadow:var(--kup-box-shadow);box-sizing:border-box;overflow:auto;padding:1em}.free-layout-2{background:var(--kup-background-color);box-shadow:var(--kup-box-shadow);box-sizing:border-box;overflow:auto}.scalable-layout-1 .descr{font-size:70%;width:100%}.scalable-layout-1 .value{font-size:220%}.scalable-layout-2 #image1 img{object-fit:contain}.scalable-layout-2 .scalable-element{display:grid;grid-template-columns:1fr 1fr 0.5fr 0.5fr}.scalable-layout-2 .icon{margin:auto;font-size:150%;margin-right:5%}.scalable-layout-2 .value-int{font-size:250%}.scalable-layout-2 .value-dec,.scalable-layout-2 .unit{font-size:130%;margin-top:auto;margin-bottom:10%}.scalable-layout-2 .value-dec{margin-left:2%}.scalable-layout-2 .unit{margin-left:4%}.scalable-layout-3 .descr{font-size:70%;width:100%}.scalable-layout-3 .value{font-size:220%}.scalable-layout-4 #image1 img{object-fit:contain}.scalable-layout-4 .scalable-element{display:grid;grid-template-columns:1fr 5fr}.scalable-layout-4 .icon{font-size:150%;margin:auto 5% auto auto}.scalable-layout-4 .value-and-unit{display:flex;color:var(--color-0)}.scalable-layout-4 .value-and-unit .value-int{font-size:250%}.scalable-layout-4 .value-and-unit .value-dec,.scalable-layout-4 .value-and-unit .unit{font-size:130%;margin-top:auto;margin-bottom:10%}.scalable-layout-4 .value-and-unit .value-dec{margin-left:2%}.scalable-layout-4 .value-and-unit .unit{margin-left:4%}.scalable-layout-4 .descr{margin-left:4%;text-align:left;font-size:80%;width:100%;min-width:max-content}.scalable-layout-5 #image1 img{object-fit:contain}.scalable-layout-5 .scalable-element{display:flex}.scalable-layout-5 .text-wrapper{margin-right:10px}.scalable-layout-5 .icon{font-size:150%;margin:auto;margin-bottom:0.35em}.scalable-layout-5 .value{font-size:200%}.scalable-layout-5 .descr{text-align:right;font-size:65%;width:100%;min-width:max-content;position:relative;bottom:-10%}.scalable-layout-6 #image1 img{object-fit:contain}.scalable-layout-6 .scalable-element{display:flex;justify-content:space-between}.scalable-layout-6 .text-wrapper{margin-left:1em}.scalable-layout-6 .icon{font-size:150%;margin:auto}.scalable-layout-6 .value{font-size:220%;text-align:right}.scalable-layout-6 .descr{font-size:80%;text-align:right;width:100%;min-width:max-content}.scalable-layout-7 #image1 img{object-fit:contain}.scalable-layout-7 .scalable-element{display:flex}.scalable-layout-7 .text-wrapper{margin-right:0.5em}.scalable-layout-7 .icon{font-size:150%;margin:auto;margin-top:0.35em}.scalable-layout-7 .value{font-size:200%}.scalable-layout-7 .descr{text-align:right;font-size:65%;width:100%;min-width:max-content;position:relative;bottom:10%}.scalable-layout-8 #image1 img{object-fit:contain}.scalable-layout-8 .scalable-element{align-items:center;display:grid;grid-template-columns:0.25fr 1.25fr 0.25fr}.scalable-layout-8 .icon{margin-right:4%;font-size:75%}.scalable-layout-8 .value{margin:0 10%;font-size:250%}.scalable-layout-8 .descr{font-size:60%;text-align:left}.scalable-card{align-items:center;box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);border-radius:4px;display:flex;font-size:calc(var(--kup-font-size) * var(--kup_card_multiplier));height:100%;justify-content:center;position:relative;text-align:center;word-break:normal;width:100%}.standard-layout-1{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto}.standard-layout-1 kup-button{margin-right:0}.standard-layout-1 #image1 img{object-fit:cover}.standard-layout-1.has-actions{padding-bottom:52px}.standard-layout-1.has-actions .section-2 .sub-2.description{padding-bottom:0}.standard-layout-1 .section-1{height:60%;width:100%}.standard-layout-1 .section-2{height:40%;width:100%;overflow:auto}.standard-layout-1 .section-2 .sub-2.title{color:var(--kup-text-color);padding:0 1em;padding-top:1em;text-align:left}.standard-layout-1 .section-2 .sub-2.title div{font-size:1.25em;font-weight:500;letter-spacing:0.0125em}.standard-layout-1 .section-2 .sub-2.subtitle{opacity:0.6;padding:0 1em;padding-bottom:1em;text-align:left}.standard-layout-1 .section-2 .sub-2.subtitle div{font-size:0.875em;font-weight:500;letter-spacing:0.0071428571em;line-height:1.375em}.standard-layout-1 .section-2 .sub-2.description{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;opacity:0.6;padding:0 1em;padding-bottom:1em;text-align:left}.standard-layout-1 .section-2 .sub-2.description div{font-size:0.875em;font-weight:400;letter-spacing:0.0178571429em;line-height:1.25em}.standard-layout-1 .section-3{display:flex;justify-content:flex-end;align-items:center;box-sizing:border-box;position:absolute;left:0;bottom:0;padding:2px 1em;height:52px;width:100%;text-align:right}.standard-layout-1 .section-3 kup-button{margin-left:0.25em}.standard-layout-2{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto}.standard-layout-2 kup-button{margin-right:0}.standard-layout-2 #image1 img{object-fit:cover}.standard-layout-2.has-actions{padding-bottom:52px}.standard-layout-2.has-actions .section-3 .sub-3.description{padding-bottom:0}.standard-layout-2 .section-1{width:100%}.standard-layout-2 .section-1 .sub-1.title{color:var(--kup-text-color);padding:0 1em;padding-top:1em;text-align:left}.standard-layout-2 .section-1 .sub-1.title div{font-size:1.25em;font-weight:500;letter-spacing:0.0125em}.standard-layout-2 .section-1 .sub-1.subtitle{opacity:0.6;padding:0 1em;padding-bottom:1em;text-align:left}.standard-layout-2 .section-1 .sub-1.subtitle div{font-size:0.875em;font-weight:500;letter-spacing:0.0071428571em;line-height:1.375em}.standard-layout-2 .section-2{height:75%;width:100%}.standard-layout-2 .section-3{width:100%;overflow:auto}.standard-layout-2 .section-3 .sub-3.description{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;opacity:0.6;padding:0 1em 8px;padding-top:1em;text-align:left}.standard-layout-2 .section-3 .sub-3.description div{font-size:0.875em;font-weight:400;letter-spacing:0.0178571429em;line-height:1.25em}.standard-layout-2 .section-4{display:flex;justify-content:flex-end;align-items:center;box-sizing:border-box;position:absolute;left:0;bottom:0;padding:2px 1em;height:52px;width:100%;text-align:right}.standard-layout-2 .section-4 kup-button{margin-left:0.25em}.standard-layout-3{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto}.standard-layout-3 kup-button{margin-right:0}.standard-layout-3 #image1 img{object-fit:cover}.standard-layout-3.has-actions{padding-bottom:52px}.standard-layout-3.has-actions .section-2 .sub-2.description{padding-bottom:0}.standard-layout-3 .section-1{height:75%;width:100%}.standard-layout-3 .section-1 .media{position:relative;height:100%;width:100%}.standard-layout-3 .section-1 .text-on-media{position:absolute;bottom:0;left:0}.standard-layout-3 .section-1 .sub-1.title{color:white;padding:0 1em;padding-top:1em;text-align:left}.standard-layout-3 .section-1 .sub-1.title div{font-size:1.25em;font-weight:500;letter-spacing:0.0125em}.standard-layout-3 .section-1 .sub-1.subtitle{color:white;opacity:0.6;padding:0 1em;padding-bottom:1em;text-align:left}.standard-layout-3 .section-1 .sub-1.subtitle div{font-size:0.875em;font-weight:500;letter-spacing:0.0071428571em;line-height:1.375em}.standard-layout-3 .section-2{width:100%;overflow:auto}.standard-layout-3 .section-2 .sub-2.description{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;opacity:0.6;padding:0 1em 8px;padding-top:1em;text-align:left}.standard-layout-3 .section-2 .sub-2.description div{font-size:0.875em;font-weight:400;letter-spacing:0.0178571429em;line-height:1.25em}.standard-layout-3 .section-3{display:flex;justify-content:flex-end;align-items:center;box-sizing:border-box;position:absolute;left:0;bottom:0;padding:2px 1em;height:52px;width:100%;text-align:right}.standard-layout-3 .section-3 kup-button{margin-left:0.25em}.standard-layout-4{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);display:flex;flex-direction:column;height:100%;position:relative;width:100%;overflow:auto}.standard-layout-4 kup-button{margin-right:0}.standard-layout-4 #image1 img{object-fit:cover}.standard-layout-4.has-actions{padding-bottom:52px}.standard-layout-4.has-actions .section-3 .sub-3.description{padding-bottom:0}.standard-layout-4 .section-1{display:flex;height:100%;width:100%}.standard-layout-4 .section-1 .sub-1.image{width:33%}.standard-layout-4 .section-1 .sub-1.text{width:77%}.standard-layout-4 .section-1 .sub-1.title{color:var(--kup-text-color);padding:0 1em;padding-top:1em;text-align:left}.standard-layout-4 .section-1 .sub-1.title div{font-size:1.25em;font-weight:500;letter-spacing:0.0125em}.standard-layout-4 .section-1 .sub-1.subtitle{opacity:0.6;padding:0 1em;padding-bottom:1em;text-align:left}.standard-layout-4 .section-1 .sub-1.subtitle div{font-size:0.875em;font-weight:500;letter-spacing:0.0071428571em;line-height:1.375em}.standard-layout-4 .section-2{display:flex;justify-content:flex-end;align-items:center;box-sizing:border-box;position:absolute;left:0;bottom:0;padding:2px 1em;height:52px;width:100%;text-align:right}.standard-layout-4 .section-2 kup-button{margin-left:0.25em}.standard-layout-5{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);height:100%;overflow:hidden;width:100%}.standard-layout-5 .section-1{background-color:var(--color-0);height:3%}.standard-layout-5 .section-2{display:flex;height:53%}.standard-layout-5 .section-3{display:flex;height:24%}.standard-layout-5 .section-4{display:flex;height:20%;background-color:var(--color-1)}.standard-layout-5 .sub-2{box-sizing:border-box;display:flex;flex-direction:column;flex-wrap:wrap;justify-content:center}.standard-layout-5 .sub-2.icon{min-height:20px;flex:0 0 10%;max-width:10%}.standard-layout-5 .sub-2.icon #image1{box-sizing:border-box;margin:auto;padding:0 20%}.standard-layout-5 .sub-2.icon #image1 img{object-fit:contain}.standard-layout-5 .sub-2.text{flex:0 0 70%;max-width:70%;margin:auto;height:100%;flex-wrap:nowrap;padding:1em;text-align:left}.standard-layout-5 .sub-2.image{box-sizing:border-box;flex:0 0 20%;padding:1.5vh 0;max-width:20%}.standard-layout-5 .sub-2.image #image2{box-sizing:border-box;margin:auto;padding:0 10%}.standard-layout-5 .sub-2.image #image2 img{object-fit:contain}.standard-layout-5 .sub-2 .desc-text{overflow:auto}.standard-layout-5 .sub-2 .alt-text{color:var(--kup-primary-color)}.standard-layout-5 .sub-3{box-sizing:border-box}.standard-layout-5 .sub-3.progress-bar{margin:auto;padding:0 5%;vertical-align:2px;width:80%}.standard-layout-5 .sub-3.button{margin:auto;text-align:center;width:20%}.standard-layout-5 .sub-3 kup-button{margin:auto}.standard-layout-5 .sub-4{box-sizing:border-box;margin:auto}.standard-layout-5 .sub-4.text{width:50%;font-size:0.875em}.standard-layout-5 .sub-4 div{padding:0 5%}.standard-layout-5 .sub-4 .alt-text{color:var(--color-0);font-size:1em}.standard-layout-5 .alt-text{font-weight:bold}@media screen and (max-width: 767px){.standard-layout-5 .sub-2.image{display:none}.standard-layout-5 .sub-2.icon{flex-basis:30%;max-width:30%}}.standard-layout-6{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;height:100%;overflow:hidden;width:100%}.standard-layout-6 .section-1{background-color:var(--color-0);display:flex;flex:0 0 10%;max-width:10%}.standard-layout-6 .section-1 .alt-text{color:var(--kup_card_dynamic_color_0);height:100%;text-align:center;writing-mode:vertical-lr;margin:auto;font-size:1.25em}.standard-layout-6 .section-2{box-sizing:border-box;height:100%;display:flex;flex:0 0 90%;flex-direction:column;max-width:90%}.standard-layout-6 .section-2 .sub-2{margin:auto;text-align:center}.standard-layout-6 .section-2 .sub-2 kup-progress-bar{margin-bottom:1em}.standard-layout-6 kup-button{position:absolute;bottom:2%;right:2%}.standard-layout-7{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%}.standard-layout-7 #image1 img{margin:auto;object-fit:contain}.standard-layout-7 .section-1{background-color:var(--color-0);height:5%;width:100%}.standard-layout-7 .section-2{height:80%;width:100%;text-align:center;padding:25px 25%;box-sizing:border-box}.standard-layout-7 .section-2 .sub-2{margin:auto}.standard-layout-7 .section-2 .sub-2.image{box-sizing:border-box;height:65%}.standard-layout-7 .section-2 .sub-2.text{font-size:1.4em;letter-spacing:1.2px;padding-top:1em;height:35%}.standard-layout-7 .section-3{display:flex;height:15%;width:100%}.standard-layout-7 .section-3 .alt-text{margin:auto;opacity:0.75;width:50%}.standard-layout-7 .section-3 .alt-text:nth-child(1){margin-left:1em;text-align:left}.standard-layout-7 .section-3 .alt-text:nth-child(2){margin-right:1em;text-align:right}.standard-layout-8{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.standard-layout-8 .background{background-color:var(--color-0);content:\"\";height:100%;width:100%;opacity:0.1;pointer-events:none;position:absolute;top:0;left:0;z-index:1}.standard-layout-8 .section-1{box-sizing:border-box;display:flex;flex-direction:column;max-width:100%;overflow:auto;height:auto}.standard-layout-8 .section-1 .sub-1{text-align:left;padding:0.6em 0.8em 0;font-size:1em;font-weight:bold;max-width:75%}.standard-layout-8 .section-1 .sub-2{text-align:left;padding:0.6em 0.8em;font-size:0.875em;max-width:75%}.standard-layout-8 .section-1 .sub-3{color:var(--color-0);font-weight:bold;text-align:center;font-size:1.2em;position:absolute;top:1em;right:1em;max-width:25%;text-overflow:ellipsis;max-height:calc(24px + 2.25em);padding:0 1em;overflow:hidden}.standard-layout-8 .section-1 .sub-3 kup-image{margin:auto}.standard-layout-8 .section-2{display:flex;height:auto;overflow:auto}.standard-layout-9{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.standard-layout-9 #image1 img{object-fit:contain}.standard-layout-9 .section-1{margin-top:auto;margin-right:18px;margin-bottom:auto;white-space:nowrap}.standard-layout-9 .section-2{display:flex;height:100%;margin-top:auto;margin-bottom:auto;width:100%;overflow:hidden}.standard-layout-9 .sub-2{display:flex;flex-direction:row}.standard-layout-9 .text{text-align:left}.standard-layout-9 .text-wrapper{display:flex;flex-direction:column}.standard-layout-9 .icon{margin:auto;padding:0 1.25em}.standard-layout-9 .description{font-size:1.5em;letter-spacing:1px;padding-left:1.25em;padding-top:0.25em}.standard-layout-9 .title{font-size:2.75em;font-weight:bold}.standard-layout-9 .subtitle{font-size:1.5em;opacity:0.75}.standard-layout-10{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.standard-layout-10 #image1 img{object-fit:contain}.standard-layout-10 .section-1{display:flex;height:100%;margin-top:auto;margin-bottom:auto;width:100%;overflow:hidden}.standard-layout-10 .section-2{margin-top:auto;margin-left:18px;margin-bottom:auto;white-space:nowrap}.standard-layout-10 .sub-2{display:flex;flex-direction:row-reverse}.standard-layout-10 .text{text-align:right}.standard-layout-10 .text-wrapper{display:flex;flex-direction:column}.standard-layout-10 .icon{margin:auto;padding:0 1.25em}.standard-layout-10 .description{font-size:1.5em;letter-spacing:1px;padding-right:1.25em;padding-top:0.25em}.standard-layout-10 .title{font-size:2.75em;font-weight:bold}.standard-layout-10 .subtitle{font-size:1.5em;opacity:0.75}.standard-layout-11{background-color:var(--kup-background-color);color:var(--kup-text-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%;box-sizing:border-box;position:relative}.standard-layout-11 #image1 img{object-fit:contain}.standard-layout-11 .section-1{display:flex;height:100%;margin-top:auto;margin-bottom:auto;min-width:6em;max-width:6em;overflow:hidden;transition:0.25s ease-in}.standard-layout-11 .section-2{display:flex;height:100%;margin-top:auto;margin-bottom:auto;width:100%;overflow:hidden}.standard-layout-11 .sub-1{background-color:var(--color-0);height:100%;text-align:center;writing-mode:vertical-lr;min-width:6em;display:flex;transition:width 0.25s ease-in}.standard-layout-11 .sub-1 div{font-size:1.25em}.standard-layout-11 .sub-2{display:flex;flex-direction:row}.standard-layout-11 .text:not(.description){text-align:left}.standard-layout-11 .text-wrapper{display:flex;flex-direction:column}.standard-layout-11 .icon{margin:auto;padding:0 1.25em}.standard-layout-11 .description{font-size:1.5em;letter-spacing:1px;margin:auto;color:var(--kup_card_dynamic_color_0)}.standard-layout-11 .title{font-size:2.75em;font-weight:bold;margin-top:auto}.standard-layout-11 .subtitle{font-size:1.5em;opacity:0.75;margin-bottom:auto}.standard-layout-12{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);color:var(--kup-text-color);min-width:200px;min-width:-moz-max-content;min-width:-webkit-max-content;}.standard-layout-12 .section-1{display:inline-flex;border-bottom:1px solid var(--kup-border-color);width:100%}.standard-layout-12 .section-1 kup-button{margin:0}.standard-layout-12 .section-2{display:flex;flex-direction:column}.standard-layout-12 .section-2.has-content{border-bottom:1px solid var(--kup-border-color);padding:0.5em 0.5em}.standard-layout-12 .section-2 kup-date-picker:first-of-type,.standard-layout-12 .section-2 kup-time-picker:first-of-type{margin-bottom:0.5em}.standard-layout-12 .section-3{backface-visibility:hidden;display:flex;flex-direction:column;max-height:20vh;overflow:auto}.standard-layout-12 .section-3 kup-checkbox{margin-left:0;margin-right:auto}.standard-layout-13{background-color:var(--kup-background-color);border-radius:4px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;height:100%;position:relative;width:100%}.standard-layout-13 kup-button{margin-left:0}.standard-layout-13 .section-1{background-color:var(--kup-background-color);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;box-shadow:0px 1px 3px 0px var(--kup-text-color);height:52px;width:100%;text-align:right}.standard-layout-13 .section-1 kup-button{margin-right:0.25em}.standard-layout-13 .section-2{height:100%;width:100%;overflow:auto;max-height:50vh}.standard-layout-13 .text{color:var(--kup-text-color);font-family:var(--kup-font-family-monospace);white-space:nowrap;border-bottom:1px solid var(--kup-border-color);line-height:1.75em}.standard-layout-14{background-color:var(--kup-background-color);box-shadow:0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);color:var(--kup-text-color);min-width:200px;min-width:-moz-max-content;min-width:-webkit-max-content;}.standard-layout-14 .section-1{display:flex;padding:1em}.standard-layout-14 .section-1 .sub-1{width:100%}.standard-layout-14 .section-1 .sub-spinner{height:88px;width:88px;margin:0 10px}.standard-layout-14 .section-1 .f-image{margin:0 0.5em 0 0}.standard-layout-14 .section-1 .title{font-size:1.25em;margin-top:-0.5em;padding:0 0.25em 0.25em}.standard-layout-14 .section-1 .title .label{cursor:pointer;padding-right:0.25em}.standard-layout-14 .section-1 .title .label:hover{text-decoration:underline}.standard-layout-14 .section-1 .info{display:flex;padding:0 0.25em 0.25em;width:100%}.standard-layout-14 .section-1 .info .label{color:rgba(var(--kup-text-color-rgb), 0.75);margin-right:0.75em;min-width:max-content;width:auto}.standard-layout-14 .section-1 .info .value{width:100%}.standard-layout-14 .sub-button{display:inline-flex;width:100%}.standard-layout-14 .sub-button kup-button{margin:0}.standard-layout-14 .sub-checkbox{backface-visibility:hidden;display:flex;flex-direction:column;max-height:20vh;overflow:auto}.standard-layout-14 .sub-checkbox kup-checkbox{margin-left:0;margin-right:auto}.standard-layout-14 .sub-formula{padding:0.5em}.standard-layout-14 .sub-chip{max-width:25vw;overflow:auto;box-shadow:0 3px 2px -2px var(--kup-border-color)}.standard-layout-14 .sub-field{display:flex;flex-direction:column}.standard-layout-14 .sub-field.has-content{border-bottom:1px solid var(--kup-border-color);padding:0.5em 0.5em}.standard-layout-14 .sub-field kup-date-picker:first-of-type,.standard-layout-14 .sub-field kup-time-picker:first-of-type{margin-bottom:0.5em}.standard-layout-14 .sub-spinner{height:100px}.standard-layout-14 .sub-autocomplete{padding-top:1em}.standard-layout-14 .sub-autocomplete kup-autocomplete{margin:auto;padding:0.5em 0;width:max-content}.standard-layout-14 .sub-switch{display:flex;justify-content:space-evenly;padding:2em}.standard-layout-14 .sub-tree{max-height:25vh;overflow:auto}.standard-layout-14 #apply{display:none;margin:auto}.standard-layout-14 #apply.visible{display:block}.standard-layout-14 #open-in-new,.standard-layout-14 #search,.standard-layout-14 #new{margin:0;display:inline-flex}.standard-layout-15{outline:none;display:block;font-size:var(--kup-font-size);background:var(--kup-background-color);color:var(--kup-text-color);box-shadow:var(--kup-box-shadow);border-radius:3px}.standard-layout-15 .section-1{box-sizing:border-box;display:flex;padding:1em}.standard-layout-15 .section-1 .sub-1{width:100%}.standard-layout-15 .section-1 .sub-spinner{height:88px;width:88px;margin:0 10px}.standard-layout-15 .section-1 .f-image{margin:0 0.5em 0 0}.standard-layout-15 .section-1 .title{font-size:1.25em;padding:0 0.25em 0.25em;text-align:left}.standard-layout-15 .section-1 .title .label{cursor:pointer;padding-right:0.25em}.standard-layout-15 .section-1 .title .label:hover{text-decoration:underline}.standard-layout-15 .section-1 .info{display:flex;padding:0 0.25em 0.25em;width:100%}.standard-layout-15 .section-1 .info .label{color:rgba(var(--kup-text-color-rgb), 0.75);margin-right:0.75em;min-width:max-content;width:auto}.standard-layout-15 .section-1 .info .value{width:100%}.standard-layout-15 .section-2{border-top:1px solid var(--kup-border-color);box-sizing:border-box;height:180px;opacity:1;overflow:auto;transition:height 250ms ease-out, opacity 250ms ease-out}.standard-layout-15 .section-2 .info{box-sizing:border-box;height:100%;padding:1.25em}.standard-layout-15 .section-2 .detail-row{display:flex;justify-content:space-between}.standard-layout-15 .section-2 .detail-row:not(:last-child){margin-bottom:6px}.standard-layout-15 .section-2 .detail-row__label{color:rgba(var(--kup-text-color-rgb), 0.5);margin-top:0.175em;max-width:320px}.standard-layout-15 .section-2 .detail-row__value{color:var(--kup-text-color);font-size:120%;max-width:320px}.standard-layout-15 .section-2 kup-tree{text-align:left}.standard-layout-15 .section-3{border-top:1px solid var(--kup-border-color);display:flex;justify-content:flex-end;padding:6px;padding-top:2px;padding-bottom:2px}.standard-layout-15 .section-3 kup-button{margin:auto 0}.standard-layout-15 #open-in-new,.standard-layout-15 #search,.standard-layout-15 #new{margin:0;display:inline-flex}:host{--kup_card_ripple_color:var(\n --kup-card-ripple-color,\n var(--kup-primary-color)\n );display:block;font-size:var(--kup-font-size);height:var(--kup_card_height);min-height:var(--kup_card_height);min-width:var(--kup_card_width);outline:none;position:relative;width:var(--kup_card_width)}:host([is-menu]){display:none;animation:fade-in 0.25s ease-out}:host([menu-visible]){box-shadow:var(--kup-box-shadow);display:block}#kup-component{height:100%;width:100%}.mdc-ripple-surface{cursor:pointer;flex-direction:column;display:flex;height:100%;position:relative}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_card_ripple_color)}.card-view{animation:fade-in 0.25s ease-out;display:none;height:100%;width:100%}.card-view.visible{display:block}";
|
|
10916
8233
|
|
|
10917
8234
|
const KupCard = class {
|
|
10918
8235
|
constructor(hostRef) {
|
|
@@ -11253,6 +8570,7 @@ const KupCard = class {
|
|
|
11253
8570
|
root.addEventListener('kup-timepicker-textfieldsubmit', this.cardEvent);
|
|
11254
8571
|
root.addEventListener('kup-tree-dynamicmassexpansion', this.cardEvent);
|
|
11255
8572
|
root.addEventListener('kup-tree-buttonclick', this.cardEvent);
|
|
8573
|
+
root.addEventListener('kup-tree-didunload', this.cardEvent);
|
|
11256
8574
|
root.addEventListener('kup-tree-nodecollapse', this.cardEvent);
|
|
11257
8575
|
root.addEventListener('kup-tree-nodedblclick', this.cardEvent);
|
|
11258
8576
|
root.addEventListener('kup-tree-nodeexpand', this.cardEvent);
|
|
@@ -13465,7 +10783,7 @@ class KupColumnMenu {
|
|
|
13465
10783
|
let props = [];
|
|
13466
10784
|
if (comp.showFilters) {
|
|
13467
10785
|
if (this.filtersColumnMenuInstance.isColumnFiltrableByInterval(column)) {
|
|
13468
|
-
props.concat(this.prepIntervalTextfield(comp, column));
|
|
10786
|
+
props = props.concat(this.prepIntervalTextfield(comp, column));
|
|
13469
10787
|
}
|
|
13470
10788
|
else if (dom.ketchup.objects.isStringObject(column.obj)) {
|
|
13471
10789
|
let filterInitialValue = this.filtersColumnMenuInstance.getTextFilterValue(comp.filters, column.name);
|
|
@@ -14484,6 +11802,12 @@ const KupDataTable = class {
|
|
|
14484
11802
|
async getProps(descriptions) {
|
|
14485
11803
|
return getProps(this, KupDataTableProps, descriptions);
|
|
14486
11804
|
}
|
|
11805
|
+
/**
|
|
11806
|
+
* This method will get the selected rows of the component.
|
|
11807
|
+
*/
|
|
11808
|
+
async getSelectedRows() {
|
|
11809
|
+
return this.selectedRows;
|
|
11810
|
+
}
|
|
14487
11811
|
/**
|
|
14488
11812
|
* Hides the given column.
|
|
14489
11813
|
* @param {KupDataColumn} column - Column to hide.
|
|
@@ -14779,7 +12103,6 @@ const KupDataTable = class {
|
|
|
14779
12103
|
this.groups = [];
|
|
14780
12104
|
// update data
|
|
14781
12105
|
this.data = Object.assign({}, totalsMatrixData);
|
|
14782
|
-
// console.log(this.data);
|
|
14783
12106
|
// calc totals
|
|
14784
12107
|
// distinct becomes count
|
|
14785
12108
|
// count becomes sum
|
|
@@ -15513,7 +12836,7 @@ const KupDataTable = class {
|
|
|
15513
12836
|
this.detailCard.style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
|
15514
12837
|
this.rootElement.shadowRoot.append(this.detailCard);
|
|
15515
12838
|
}
|
|
15516
|
-
getEventDetails(path) {
|
|
12839
|
+
getEventDetails(path, e) {
|
|
15517
12840
|
let isHeader, isBody, isFooter, td, textfield, th, tr, filterRemove;
|
|
15518
12841
|
if (path) {
|
|
15519
12842
|
for (let i = path.length - 1; i >= 0; i--) {
|
|
@@ -15597,6 +12920,7 @@ const KupDataTable = class {
|
|
|
15597
12920
|
column: column ? column : null,
|
|
15598
12921
|
filterRemove: filterRemove ? filterRemove : null,
|
|
15599
12922
|
isGroupRow: isGroupRow,
|
|
12923
|
+
originalEvent: e,
|
|
15600
12924
|
row: row ? row : null,
|
|
15601
12925
|
td: td ? td : null,
|
|
15602
12926
|
textfield: textfield ? textfield : null,
|
|
@@ -15605,7 +12929,7 @@ const KupDataTable = class {
|
|
|
15605
12929
|
};
|
|
15606
12930
|
}
|
|
15607
12931
|
clickHandler(e) {
|
|
15608
|
-
const details = this.getEventDetails(this.getEventPath(e));
|
|
12932
|
+
const details = this.getEventDetails(this.getEventPath(e), e);
|
|
15609
12933
|
if (details.area === 'header') {
|
|
15610
12934
|
if (details.th && details.column) {
|
|
15611
12935
|
if (details.filterRemove) {
|
|
@@ -15644,7 +12968,7 @@ const KupDataTable = class {
|
|
|
15644
12968
|
return details;
|
|
15645
12969
|
}
|
|
15646
12970
|
contextMenuHandler(e) {
|
|
15647
|
-
const details = this.getEventDetails(this.getEventPath(e));
|
|
12971
|
+
const details = this.getEventDetails(this.getEventPath(e), e);
|
|
15648
12972
|
if (details.area === 'header') {
|
|
15649
12973
|
if (details.th && details.column) {
|
|
15650
12974
|
this.openColumnMenu(details.column.name);
|
|
@@ -15674,7 +12998,7 @@ const KupDataTable = class {
|
|
|
15674
12998
|
return details;
|
|
15675
12999
|
}
|
|
15676
13000
|
dblClickHandler(e) {
|
|
15677
|
-
const details = this.getEventDetails(this.getEventPath(e));
|
|
13001
|
+
const details = this.getEventDetails(this.getEventPath(e), e);
|
|
15678
13002
|
if (details.area === 'body') {
|
|
15679
13003
|
if (this.selection == SelectionMode.MULTIPLE) {
|
|
15680
13004
|
this.resetSelectedRows();
|
|
@@ -17677,7 +15001,7 @@ const KupDatePicker = class {
|
|
|
17677
15001
|
resetStatus: true,
|
|
17678
15002
|
},
|
|
17679
15003
|
};
|
|
17680
|
-
return (h("kup-card", { ref: (el) => (this.pickerContainerEl = el), data: data, layoutFamily: KupCardFamily.BUILT_IN, sizeX: "300px", sizeY: "
|
|
15004
|
+
return (h("kup-card", { ref: (el) => (this.pickerContainerEl = el), data: data, layoutFamily: KupCardFamily.BUILT_IN, sizeX: "300px", sizeY: "auto", isMenu: true, "onkup-card-click": (ev) => {
|
|
17681
15005
|
if (ev.detail.value != null && ev.detail.value != '')
|
|
17682
15006
|
this.onKupDatePickerItemClick(ev.detail.value);
|
|
17683
15007
|
} }));
|