@sme.up/ketchup 6.1.0-SNAPSHOT → 6.2.0-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-a78d6fac.js → cell-utils-d894e802.js} +2 -2
- package/dist/cjs/{f-button-ac179257.js → f-button-414b3bc3.js} +4 -4
- package/dist/cjs/f-cell-c8983ec7.js +418 -0
- package/dist/cjs/f-checkbox-57443ca3.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-ef81bf51.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-0618c795.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-c9dd5173.js} +5 -5
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-7d31190f.js} +3 -3
- package/dist/cjs/{index-eb556444.js → index-06b131ea.js} +6 -4
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +200 -187
- package/dist/cjs/kup-box_2.cjs.entry.js +23 -12
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +10 -9
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +4 -7
- package/dist/cjs/{kup-form-editor.cjs.entry.js → kup-dashboard.cjs.entry.js} +123 -148
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-form.cjs.entry.js +469 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +11 -10
- 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-7a941909.js → kup-manager-2fee8cf3.js} +324 -6
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +7 -9
- 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-6287d878.js → utils-8470184d.js} +1 -1
- package/dist/collection/assets/dashboard.js +113 -0
- package/dist/collection/assets/data-table.js +15 -0
- package/dist/collection/assets/form.js +179 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +10 -6
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
- package/dist/collection/components/kup-box/kup-box.js +13 -2
- package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +7 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +148 -149
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-form/kup-form-declarations.js +19 -0
- package/dist/collection/components/kup-form/kup-form.css +86 -0
- package/dist/collection/components/kup-form/kup-form.js +668 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +10 -7
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +3 -5
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +10 -4
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
- package/dist/collection/managers/kup-data/kup-data.js +94 -0
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +18 -3
- package/dist/collection/types/GenericTypes.js +2 -1
- package/dist/esm/{cell-utils-964da6b5.js → cell-utils-7fc84d4e.js} +2 -2
- package/dist/esm/{f-button-871a544b.js → f-button-2f6cc296.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-4428481c.js} +48 -283
- package/dist/esm/f-checkbox-c51c4a75.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-b39eb49a.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-b08ebeb2.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-4fda6086.js} +5 -5
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-184a5fb3.js} +3 -3
- package/dist/esm/{index-baeab1ac.js → index-ad6ab214.js} +6 -4
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_25.entry.js +190 -177
- package/dist/esm/kup-box_2.entry.js +23 -12
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +4 -7
- package/dist/esm/{kup-form-editor.entry.js → kup-dashboard.entry.js} +123 -148
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-form.entry.js +465 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +10 -9
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-3325b2d8.js} +321 -7
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +7 -9
- 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-d7e4b3c2.js → utils-6373a07e.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-006bc4d0.entry.js +1 -0
- package/dist/ketchup/{p-8cdf61a4.js → p-0741da57.js} +1 -1
- package/dist/ketchup/{p-44ec4f03.js → p-13e08580.js} +1 -1
- package/dist/ketchup/p-153697fb.entry.js +1 -0
- package/dist/ketchup/{p-a615a92b.entry.js → p-175edb62.entry.js} +1 -1
- package/dist/ketchup/{p-fac1a08b.entry.js → p-1db1d42b.entry.js} +1 -1
- package/dist/ketchup/{p-f09f2f98.entry.js → p-30820f8f.entry.js} +1 -1
- package/dist/ketchup/p-35325834.entry.js +9 -0
- package/dist/ketchup/{p-65b46587.entry.js → p-359e8bec.entry.js} +4 -4
- package/dist/ketchup/{p-6dff70f8.entry.js → p-3c7c92c0.entry.js} +1 -1
- package/dist/ketchup/{p-954cc340.entry.js → p-41cf8703.entry.js} +1 -1
- package/dist/ketchup/{p-3c11e615.entry.js → p-6127fccf.entry.js} +1 -1
- package/dist/ketchup/{p-f71a1675.entry.js → p-6b82e4e2.entry.js} +1 -1
- package/dist/ketchup/p-704e60eb.js +30 -0
- package/dist/ketchup/p-70660fe2.js +1 -0
- package/dist/ketchup/{p-ea10176c.entry.js → p-762c0382.entry.js} +1 -1
- package/dist/ketchup/{p-c5ce8951.entry.js → p-76947316.entry.js} +1 -1
- package/dist/ketchup/{p-d2ee56dd.entry.js → p-8103b80a.entry.js} +1 -1
- package/dist/ketchup/{p-99e0d768.entry.js → p-9fa457d4.entry.js} +1 -1
- package/dist/ketchup/{p-65974e48.entry.js → p-a0ce8075.entry.js} +1 -1
- package/dist/ketchup/p-a804fe83.entry.js +27 -0
- package/dist/ketchup/{p-7454cb92.js → p-ca9fd099.js} +1 -1
- package/dist/ketchup/p-caabb9ab.entry.js +1 -0
- package/dist/ketchup/p-cc3abf84.entry.js +1 -0
- package/dist/ketchup/p-cd5cfa7c.js +1 -0
- package/dist/ketchup/p-d2e76960.entry.js +1 -0
- package/dist/ketchup/p-d3b542b3.js +2 -0
- package/dist/ketchup/p-d7004ae4.js +1 -0
- package/dist/ketchup/{p-e0035c58.js → p-d95c904b.js} +1 -1
- package/dist/ketchup/{p-7eff4eee.js → p-ddce3430.js} +1 -1
- package/dist/ketchup/p-ee580b3a.entry.js +1 -0
- package/dist/ketchup/p-f49cb68e.js +1 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
- package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
- package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +12 -9
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +48 -0
- package/dist/types/components/kup-form/kup-form.d.ts +68 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components.d.ts +412 -159
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data.d.ts +2 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/types/GenericTypes.d.ts +2 -1
- package/package.json +2 -2
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-976244f9.entry.js +0 -9
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const fTextField = require('./f-text-field-
|
|
5
|
+
const index = require('./index-06b131ea.js');
|
|
6
|
+
const kupManager = require('./kup-manager-2fee8cf3.js');
|
|
7
|
+
const fTextField = require('./f-text-field-7d31190f.js');
|
|
8
8
|
const fTextFieldMdc = require('./f-text-field-mdc-85997738.js');
|
|
9
|
-
const utils = require('./utils-
|
|
9
|
+
const utils = require('./utils-8470184d.js');
|
|
10
10
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
11
|
-
const fImage = require('./f-image-
|
|
12
|
-
const fButton = require('./f-button-
|
|
11
|
+
const fImage = require('./f-image-0618c795.js');
|
|
12
|
+
const fButton = require('./f-button-414b3bc3.js');
|
|
13
13
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
14
|
-
const fChip = require('./f-chip-
|
|
14
|
+
const fChip = require('./f-chip-ef81bf51.js');
|
|
15
15
|
const component = require('./component-72a5b626.js');
|
|
16
|
-
const cellUtils = require('./cell-utils-
|
|
17
|
-
const
|
|
18
|
-
const fPaginatorUtils = require('./f-paginator-utils-
|
|
16
|
+
const cellUtils = require('./cell-utils-d894e802.js');
|
|
17
|
+
const fCheckbox = require('./f-checkbox-57443ca3.js');
|
|
18
|
+
const fPaginatorUtils = require('./f-paginator-utils-c9dd5173.js');
|
|
19
|
+
const fCell = require('./f-cell-c8983ec7.js');
|
|
19
20
|
require('./tslib.es6-0ee02c67.js');
|
|
20
21
|
|
|
21
22
|
/**
|
|
@@ -108,15 +109,21 @@ function consistencyCheck(idIn, listData, listEl, selectMode, displayMode, e) {
|
|
|
108
109
|
if (selected == null && idIn == null && listData) {
|
|
109
110
|
selected = getFirstItemSelected(listData);
|
|
110
111
|
}
|
|
112
|
+
let trueValue = null;
|
|
111
113
|
if (selected == null) {
|
|
112
114
|
selected = {
|
|
113
115
|
id: idIn == null ? '' : idIn,
|
|
114
116
|
value: idIn == null ? '' : idIn,
|
|
115
117
|
};
|
|
118
|
+
id = selected.id;
|
|
119
|
+
displayedValue = selected.id;
|
|
120
|
+
trueValue = selected.id;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
id = getIdOfItemByDisplayMode(selected, selectMode, ' - ');
|
|
124
|
+
displayedValue = getIdOfItemByDisplayMode(selected, displayMode, ' - ');
|
|
125
|
+
trueValue = getIdOfItemByDisplayMode(selected, ItemsDisplayMode.CODE, ' - ');
|
|
116
126
|
}
|
|
117
|
-
id = getIdOfItemByDisplayMode(selected, selectMode, ' - ');
|
|
118
|
-
displayedValue = getIdOfItemByDisplayMode(selected, displayMode, ' - ');
|
|
119
|
-
const trueValue = getIdOfItemByDisplayMode(selected, ItemsDisplayMode.CODE, ' - ');
|
|
120
127
|
return {
|
|
121
128
|
value: id,
|
|
122
129
|
displayedValue: displayedValue,
|
|
@@ -196,6 +203,23 @@ function getItemByDisplayMode(listData, id, displayMode, setSelected) {
|
|
|
196
203
|
|
|
197
204
|
const kupAutocompleteCss = ":host{display:block;width:max-content}.kup-icon{transition:transform 0.15s}.toggled .kup-icon.kup-dropdown-icon{transform:rotate(-180deg)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
198
205
|
|
|
206
|
+
var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
207
|
+
if (kind === "a" && !f)
|
|
208
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
209
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
210
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
211
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
212
|
+
};
|
|
213
|
+
var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
214
|
+
if (kind === "m")
|
|
215
|
+
throw new TypeError("Private method is not writable");
|
|
216
|
+
if (kind === "a" && !f)
|
|
217
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
218
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
219
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
220
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
221
|
+
};
|
|
222
|
+
var _KupAutocomplete_instances, _KupAutocomplete_doConsistencyCheck, _KupAutocomplete_elStyle, _KupAutocomplete_listEl, _KupAutocomplete_kupManager, _KupAutocomplete_textfieldWrapper, _KupAutocomplete_textfieldEl, _KupAutocomplete_clickCb, _KupAutocomplete_inputTimeout, _KupAutocomplete_openList, _KupAutocomplete_closeList, _KupAutocomplete_isListOpened, _KupAutocomplete_consistencyCheck, _KupAutocomplete_prepList;
|
|
199
223
|
const KupAutocomplete = class {
|
|
200
224
|
constructor(hostRef) {
|
|
201
225
|
index.registerInstance(this, hostRef);
|
|
@@ -206,6 +230,7 @@ const KupAutocomplete = class {
|
|
|
206
230
|
this.kupInput = index.createEvent(this, "kup-autocomplete-input", 6);
|
|
207
231
|
this.kupIconClick = index.createEvent(this, "kup-autocomplete-iconclick", 6);
|
|
208
232
|
this.kupItemClick = index.createEvent(this, "kup-autocomplete-itemclick", 6);
|
|
233
|
+
_KupAutocomplete_instances.add(this);
|
|
209
234
|
/*-------------------------------------------------*/
|
|
210
235
|
/* S t a t e s */
|
|
211
236
|
/*-------------------------------------------------*/
|
|
@@ -273,34 +298,35 @@ const KupAutocomplete = class {
|
|
|
273
298
|
/*-------------------------------------------------*/
|
|
274
299
|
/* I n t e r n a l V a r i a b l e s */
|
|
275
300
|
/*-------------------------------------------------*/
|
|
276
|
-
this
|
|
277
|
-
this
|
|
278
|
-
this
|
|
301
|
+
_KupAutocomplete_doConsistencyCheck.set(this, true);
|
|
302
|
+
_KupAutocomplete_elStyle.set(this, undefined);
|
|
303
|
+
_KupAutocomplete_listEl.set(this, null);
|
|
279
304
|
/**
|
|
280
305
|
* Instance of the KupManager class.
|
|
281
306
|
*/
|
|
282
|
-
this
|
|
283
|
-
this
|
|
284
|
-
this
|
|
285
|
-
this
|
|
307
|
+
_KupAutocomplete_kupManager.set(this, kupManager.kupManagerInstance());
|
|
308
|
+
_KupAutocomplete_textfieldWrapper.set(this, undefined);
|
|
309
|
+
_KupAutocomplete_textfieldEl.set(this, undefined);
|
|
310
|
+
_KupAutocomplete_clickCb.set(this, null);
|
|
311
|
+
_KupAutocomplete_inputTimeout.set(this, void 0);
|
|
286
312
|
}
|
|
287
313
|
onKupBlur() {
|
|
288
314
|
this.kupBlur.emit({
|
|
289
315
|
comp: this,
|
|
290
316
|
id: this.rootElement.id,
|
|
291
317
|
value: this.value,
|
|
292
|
-
inputValue: this.
|
|
318
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
293
319
|
});
|
|
294
320
|
}
|
|
295
321
|
onKupChange(value) {
|
|
296
|
-
this
|
|
297
|
-
const ret = this.
|
|
322
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
323
|
+
const ret = __classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
298
324
|
if (ret.exists || this.allowInconsistentValues) {
|
|
299
325
|
this.kupChange.emit({
|
|
300
326
|
comp: this,
|
|
301
327
|
id: this.rootElement.id,
|
|
302
328
|
value: this.value,
|
|
303
|
-
inputValue: this.
|
|
329
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
304
330
|
});
|
|
305
331
|
}
|
|
306
332
|
}
|
|
@@ -309,7 +335,7 @@ const KupAutocomplete = class {
|
|
|
309
335
|
comp: this,
|
|
310
336
|
id: this.rootElement.id,
|
|
311
337
|
value: this.value,
|
|
312
|
-
inputValue: this.
|
|
338
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
313
339
|
});
|
|
314
340
|
}
|
|
315
341
|
onKupFocus() {
|
|
@@ -317,82 +343,78 @@ const KupAutocomplete = class {
|
|
|
317
343
|
comp: this,
|
|
318
344
|
id: this.rootElement.id,
|
|
319
345
|
value: this.value,
|
|
320
|
-
inputValue: this.
|
|
346
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
321
347
|
});
|
|
322
348
|
}
|
|
323
349
|
onKupInput() {
|
|
324
|
-
this
|
|
325
|
-
this.
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
this.listEl.filter = this.displayedValue;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
if (this.textfieldEl.value.length >= this.minimumChars) {
|
|
350
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
351
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value, false);
|
|
352
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
353
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value.length >= this.minimumChars) {
|
|
332
354
|
this.kupInput.emit({
|
|
333
355
|
comp: this,
|
|
334
356
|
id: this.rootElement.id,
|
|
335
357
|
value: this.value,
|
|
336
|
-
inputValue: this.
|
|
358
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
337
359
|
});
|
|
338
360
|
}
|
|
339
361
|
}
|
|
340
362
|
onKupIconClick() {
|
|
341
|
-
if (this.
|
|
342
|
-
this.
|
|
363
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
364
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
343
365
|
}
|
|
344
366
|
else {
|
|
345
|
-
this.
|
|
367
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, true);
|
|
346
368
|
}
|
|
347
369
|
this.kupIconClick.emit({
|
|
348
370
|
comp: this,
|
|
349
371
|
id: this.rootElement.id,
|
|
350
372
|
value: this.value,
|
|
351
|
-
inputValue: this.
|
|
352
|
-
open: this.
|
|
373
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
374
|
+
open: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled'),
|
|
353
375
|
});
|
|
354
376
|
}
|
|
355
377
|
onKupItemClick(e) {
|
|
356
378
|
this.onKupChange(e.detail.selected.id);
|
|
357
|
-
this.
|
|
358
|
-
if (this
|
|
359
|
-
this.
|
|
379
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
380
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f")) {
|
|
381
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
360
382
|
}
|
|
361
383
|
this.kupItemClick.emit({
|
|
362
384
|
comp: this,
|
|
363
385
|
id: this.rootElement.id,
|
|
364
386
|
value: this.value,
|
|
365
|
-
inputValue: this.
|
|
387
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
366
388
|
});
|
|
367
389
|
}
|
|
368
390
|
/*-------------------------------------------------*/
|
|
369
391
|
/* L i s t e n e r s */
|
|
370
392
|
/*-------------------------------------------------*/
|
|
371
393
|
listenKeydown(e) {
|
|
372
|
-
if (this.
|
|
394
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_isListOpened).call(this)) {
|
|
373
395
|
switch (e.key) {
|
|
374
396
|
case 'ArrowDown':
|
|
375
397
|
e.preventDefault();
|
|
376
398
|
e.stopPropagation();
|
|
377
|
-
this.
|
|
399
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
378
400
|
break;
|
|
379
401
|
case 'ArrowUp':
|
|
380
402
|
e.preventDefault();
|
|
381
403
|
e.stopPropagation();
|
|
382
|
-
this.
|
|
404
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
383
405
|
break;
|
|
384
406
|
case 'Enter':
|
|
385
407
|
e.preventDefault();
|
|
386
408
|
e.stopPropagation();
|
|
387
|
-
this.
|
|
388
|
-
this.
|
|
389
|
-
this.
|
|
409
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").select().then(() => {
|
|
410
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
411
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
390
412
|
});
|
|
391
413
|
break;
|
|
392
414
|
case 'Escape':
|
|
393
415
|
e.preventDefault();
|
|
394
416
|
e.stopPropagation();
|
|
395
|
-
this.
|
|
417
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
396
418
|
break;
|
|
397
419
|
}
|
|
398
420
|
}
|
|
@@ -401,14 +423,14 @@ const KupAutocomplete = class {
|
|
|
401
423
|
case 'ArrowDown':
|
|
402
424
|
e.preventDefault();
|
|
403
425
|
e.stopPropagation();
|
|
404
|
-
this.
|
|
405
|
-
this.
|
|
426
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
427
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
406
428
|
break;
|
|
407
429
|
case 'ArrowUp':
|
|
408
430
|
e.preventDefault();
|
|
409
431
|
e.stopPropagation();
|
|
410
|
-
this.
|
|
411
|
-
this.
|
|
432
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
433
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
412
434
|
break;
|
|
413
435
|
}
|
|
414
436
|
}
|
|
@@ -441,7 +463,7 @@ const KupAutocomplete = class {
|
|
|
441
463
|
* Sets the focus to the component.
|
|
442
464
|
*/
|
|
443
465
|
async setFocus() {
|
|
444
|
-
this.
|
|
466
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
445
467
|
}
|
|
446
468
|
/**
|
|
447
469
|
* Sets the props to the component.
|
|
@@ -455,81 +477,16 @@ const KupAutocomplete = class {
|
|
|
455
477
|
* @param {string} value - Value of the component.
|
|
456
478
|
*/
|
|
457
479
|
async setValue(value) {
|
|
458
|
-
this
|
|
459
|
-
this.
|
|
460
|
-
}
|
|
461
|
-
/*-------------------------------------------------*/
|
|
462
|
-
/* P r i v a t e M e t h o d s */
|
|
463
|
-
/*-------------------------------------------------*/
|
|
464
|
-
openList(forceOpen) {
|
|
465
|
-
if (forceOpen != true &&
|
|
466
|
-
this.textfieldEl.value.length < this.minimumChars) {
|
|
467
|
-
this.closeList();
|
|
468
|
-
return false;
|
|
469
|
-
}
|
|
470
|
-
this.textfieldWrapper.classList.add('toggled');
|
|
471
|
-
this.listEl.menuVisible = true;
|
|
472
|
-
const elStyle = this.listEl.style;
|
|
473
|
-
elStyle.height = 'auto';
|
|
474
|
-
elStyle.minWidth = this.textfieldWrapper.clientWidth + 'px';
|
|
475
|
-
if (this.kupManager.dynamicPosition.isRegistered(this.listEl)) {
|
|
476
|
-
this.kupManager.dynamicPosition.changeAnchor(this.listEl, this.textfieldWrapper);
|
|
477
|
-
}
|
|
478
|
-
else {
|
|
479
|
-
this.kupManager.dynamicPosition.register(this.listEl, this.textfieldWrapper, 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
480
|
-
}
|
|
481
|
-
this.kupManager.dynamicPosition.start(this.listEl);
|
|
482
|
-
if (!this.clickCb) {
|
|
483
|
-
this.clickCb = {
|
|
484
|
-
cb: () => {
|
|
485
|
-
this.closeList();
|
|
486
|
-
},
|
|
487
|
-
el: this.listEl,
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
this.kupManager.addClickCallback(this.clickCb, true);
|
|
491
|
-
return true;
|
|
492
|
-
}
|
|
493
|
-
closeList() {
|
|
494
|
-
this.textfieldWrapper.classList.remove('toggled');
|
|
495
|
-
this.listEl.menuVisible = false;
|
|
496
|
-
this.kupManager.dynamicPosition.stop(this.listEl);
|
|
497
|
-
this.kupManager.removeClickCallback(this.clickCb);
|
|
498
|
-
}
|
|
499
|
-
isListOpened() {
|
|
500
|
-
return this.listEl.menuVisible == true;
|
|
501
|
-
}
|
|
502
|
-
consistencyCheck(e, idIn) {
|
|
503
|
-
if (!this.doConsistencyCheck) {
|
|
504
|
-
return;
|
|
505
|
-
}
|
|
506
|
-
this.doConsistencyCheck = false;
|
|
507
|
-
const ret = consistencyCheck(idIn, this.data['kup-list'], this.listEl, this.selectMode, this.displayMode, e);
|
|
508
|
-
if (ret.exists || this.allowInconsistentValues) {
|
|
509
|
-
this.value = ret.value;
|
|
510
|
-
this.displayedValue = ret.displayedValue;
|
|
511
|
-
if (this.listEl != null && !this.serverHandledFilter) {
|
|
512
|
-
this.listEl.filter = this.displayedValue;
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
else {
|
|
516
|
-
this.displayedValue = idIn;
|
|
517
|
-
if (this.listEl != null && !this.serverHandledFilter) {
|
|
518
|
-
this.listEl.filter = idIn;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
return ret;
|
|
522
|
-
}
|
|
523
|
-
prepList() {
|
|
524
|
-
return (index.h("kup-list", Object.assign({ displayMode: this.displayMode }, this.data['kup-list'], { isMenu: true, "onkup-list-click": (e) => this.onKupItemClick(e), ref: (el) => (this.listEl = el) })));
|
|
480
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
481
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
525
482
|
}
|
|
526
483
|
/*-------------------------------------------------*/
|
|
527
484
|
/* L i f e c y c l e H o o k s */
|
|
528
485
|
/*-------------------------------------------------*/
|
|
529
486
|
componentWillLoad() {
|
|
530
|
-
this.
|
|
531
|
-
this.
|
|
532
|
-
this
|
|
487
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, false);
|
|
488
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").theme.register(this);
|
|
489
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
533
490
|
this.value = this.initialValue;
|
|
534
491
|
if (!this.data) {
|
|
535
492
|
this.data = {
|
|
@@ -539,43 +496,103 @@ const KupAutocomplete = class {
|
|
|
539
496
|
}
|
|
540
497
|
}
|
|
541
498
|
componentDidLoad() {
|
|
542
|
-
this.
|
|
543
|
-
this.
|
|
499
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, this.value, true);
|
|
500
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, true);
|
|
544
501
|
}
|
|
545
502
|
componentWillRender() {
|
|
546
|
-
this.
|
|
503
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, false);
|
|
547
504
|
}
|
|
548
505
|
componentDidRender() {
|
|
549
506
|
const root = this.rootElement.shadowRoot;
|
|
550
507
|
if (root) {
|
|
551
508
|
const f = root.querySelector('.f-text-field');
|
|
552
509
|
if (f) {
|
|
553
|
-
this
|
|
554
|
-
this
|
|
510
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_textfieldWrapper, f, "f");
|
|
511
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_textfieldEl, f.querySelector('input'), "f");
|
|
555
512
|
fTextFieldMdc.FTextFieldMDC(f);
|
|
556
513
|
}
|
|
557
514
|
}
|
|
558
|
-
this.
|
|
515
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, true);
|
|
559
516
|
}
|
|
560
517
|
render() {
|
|
561
518
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
562
519
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
563
|
-
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: this
|
|
520
|
+
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$2(this, _KupAutocomplete_elStyle, "f") }, index.h("style", null, __classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$2(this, _KupAutocomplete_elStyle, "f") }, index.h(fTextField.FTextField, Object.assign({}, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, icon: this.showDropDownIcon
|
|
564
521
|
? kupManager.KupThemeIconValues.DROPDOWN
|
|
565
522
|
: null, trailingIcon: true, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => {
|
|
566
|
-
window.clearTimeout(this
|
|
567
|
-
this
|
|
568
|
-
}, onIconClick: () => this.onKupIconClick() }), this.
|
|
523
|
+
window.clearTimeout(__classPrivateFieldGet$2(this, _KupAutocomplete_inputTimeout, "f"));
|
|
524
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_inputTimeout, window.setTimeout(() => this.onKupInput(), this.inputDelay), "f");
|
|
525
|
+
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_prepList).call(this)));
|
|
569
526
|
}
|
|
570
527
|
disconnectedCallback() {
|
|
571
|
-
if (this
|
|
572
|
-
this.
|
|
573
|
-
this.
|
|
528
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f")) {
|
|
529
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f")]);
|
|
530
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").remove();
|
|
574
531
|
}
|
|
575
|
-
this.
|
|
532
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").theme.unregister(this);
|
|
576
533
|
}
|
|
577
534
|
get rootElement() { return index.getElement(this); }
|
|
578
535
|
};
|
|
536
|
+
_KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle = new WeakMap(), _KupAutocomplete_listEl = new WeakMap(), _KupAutocomplete_kupManager = new WeakMap(), _KupAutocomplete_textfieldWrapper = new WeakMap(), _KupAutocomplete_textfieldEl = new WeakMap(), _KupAutocomplete_clickCb = new WeakMap(), _KupAutocomplete_inputTimeout = new WeakMap(), _KupAutocomplete_instances = new WeakSet(), _KupAutocomplete_openList = function _KupAutocomplete_openList(forceOpen) {
|
|
537
|
+
if (forceOpen != true &&
|
|
538
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value.length < this.minimumChars) {
|
|
539
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
540
|
+
return false;
|
|
541
|
+
}
|
|
542
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.add('toggled');
|
|
543
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").menuVisible = true;
|
|
544
|
+
const elStyle = __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").style;
|
|
545
|
+
elStyle.height = 'auto';
|
|
546
|
+
elStyle.minWidth = __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").clientWidth + 'px';
|
|
547
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"))) {
|
|
548
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f"));
|
|
549
|
+
}
|
|
550
|
+
else {
|
|
551
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f"), 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
552
|
+
}
|
|
553
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"));
|
|
554
|
+
if (!__classPrivateFieldGet$2(this, _KupAutocomplete_clickCb, "f")) {
|
|
555
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_clickCb, {
|
|
556
|
+
cb: () => {
|
|
557
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
558
|
+
},
|
|
559
|
+
el: __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"),
|
|
560
|
+
}, "f");
|
|
561
|
+
}
|
|
562
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").addClickCallback(__classPrivateFieldGet$2(this, _KupAutocomplete_clickCb, "f"), true);
|
|
563
|
+
return true;
|
|
564
|
+
}, _KupAutocomplete_closeList = function _KupAutocomplete_closeList() {
|
|
565
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.remove('toggled');
|
|
566
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").menuVisible = false;
|
|
567
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"));
|
|
568
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet$2(this, _KupAutocomplete_clickCb, "f"));
|
|
569
|
+
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
570
|
+
return __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
571
|
+
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, setValue) {
|
|
572
|
+
if (!__classPrivateFieldGet$2(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
576
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
577
|
+
if (ret.exists || this.allowInconsistentValues) {
|
|
578
|
+
if (setValue) {
|
|
579
|
+
this.value = ret.value;
|
|
580
|
+
this.displayedValue = ret.displayedValue;
|
|
581
|
+
}
|
|
582
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
583
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
else {
|
|
587
|
+
this.displayedValue = idIn;
|
|
588
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
589
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
return ret;
|
|
593
|
+
}, _KupAutocomplete_prepList = function _KupAutocomplete_prepList() {
|
|
594
|
+
return (index.h("kup-list", Object.assign({ displayMode: this.displayMode }, this.data['kup-list'], { isMenu: true, "onkup-list-click": (e) => this.onKupItemClick(e), ref: (el) => (__classPrivateFieldSet$2(this, _KupAutocomplete_listEl, el, "f")) })));
|
|
595
|
+
};
|
|
579
596
|
KupAutocomplete.style = kupAutocompleteCss;
|
|
580
597
|
|
|
581
598
|
/**
|
|
@@ -6314,7 +6331,7 @@ const KupCheckbox = class {
|
|
|
6314
6331
|
onChange: () => this.onKupChange(),
|
|
6315
6332
|
onFocus: () => this.onKupFocus(),
|
|
6316
6333
|
};
|
|
6317
|
-
return (index.h(index.Host, null, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, index.h(
|
|
6334
|
+
return (index.h(index.Host, null, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, index.h(fCheckbox.FCheckbox, Object.assign({}, props)))));
|
|
6318
6335
|
}
|
|
6319
6336
|
disconnectedCallback() {
|
|
6320
6337
|
this.kupManager.theme.unregister(this);
|
|
@@ -6934,7 +6951,7 @@ const KupCombobox = class {
|
|
|
6934
6951
|
});
|
|
6935
6952
|
}
|
|
6936
6953
|
onKupChange(value) {
|
|
6937
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
6954
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
6938
6955
|
this.kupChange.emit({
|
|
6939
6956
|
comp: this,
|
|
6940
6957
|
id: this.rootElement.id,
|
|
@@ -6967,14 +6984,14 @@ const KupCombobox = class {
|
|
|
6967
6984
|
});
|
|
6968
6985
|
}
|
|
6969
6986
|
onKupInput() {
|
|
6970
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
6987
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, __classPrivateFieldGet$1(this, _KupCombobox_textfieldEl, "f").value, false);
|
|
6988
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
6971
6989
|
this.kupInput.emit({
|
|
6972
6990
|
comp: this,
|
|
6973
6991
|
id: this.rootElement.id,
|
|
6974
6992
|
value: this.value,
|
|
6975
6993
|
inputValue: __classPrivateFieldGet$1(this, _KupCombobox_textfieldEl, "f").value,
|
|
6976
6994
|
});
|
|
6977
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
6978
6995
|
}
|
|
6979
6996
|
onKupIconClick() {
|
|
6980
6997
|
if (__classPrivateFieldGet$1(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
@@ -7100,7 +7117,7 @@ const KupCombobox = class {
|
|
|
7100
7117
|
* @param {string} value - Value to be set.
|
|
7101
7118
|
*/
|
|
7102
7119
|
async setValue(value) {
|
|
7103
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
7120
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7104
7121
|
}
|
|
7105
7122
|
/*-------------------------------------------------*/
|
|
7106
7123
|
/* L i f e c y c l e H o o k s */
|
|
@@ -7117,7 +7134,7 @@ const KupCombobox = class {
|
|
|
7117
7134
|
}
|
|
7118
7135
|
}
|
|
7119
7136
|
componentDidLoad() {
|
|
7120
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
7137
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, this.value, true);
|
|
7121
7138
|
__classPrivateFieldGet$1(this, _KupCombobox_kupManager, "f").debug.logLoad(this, true);
|
|
7122
7139
|
}
|
|
7123
7140
|
componentWillRender() {
|
|
@@ -7140,7 +7157,7 @@ const KupCombobox = class {
|
|
|
7140
7157
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
7141
7158
|
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$1(this, _KupCombobox_elStyle, "f") }, index.h("style", null, __classPrivateFieldGet$1(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$1(this, _KupCombobox_elStyle, "f") }, index.h(fTextField.FTextField, Object.assign({}, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, icon: this.showDropDownIcon
|
|
7142
7159
|
? kupManager.KupThemeIconValues.DROPDOWN
|
|
7143
|
-
: null, readOnly: this.isSelect, trailingIcon: true, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }), __classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)))
|
|
7160
|
+
: null, readOnly: this.isSelect, trailingIcon: true, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
7144
7161
|
}
|
|
7145
7162
|
disconnectedCallback() {
|
|
7146
7163
|
if (__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f")) {
|
|
@@ -7187,20 +7204,22 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
7187
7204
|
__classPrivateFieldGet$1(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$1(this, _KupCombobox_clickCb, "f"));
|
|
7188
7205
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
7189
7206
|
return __classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
7190
|
-
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(
|
|
7191
|
-
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$1(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode
|
|
7192
|
-
if (ret.exists
|
|
7193
|
-
|
|
7194
|
-
|
|
7207
|
+
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, setValue) {
|
|
7208
|
+
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$1(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
7209
|
+
if (ret.exists) {
|
|
7210
|
+
if (setValue) {
|
|
7211
|
+
this.value = ret.value;
|
|
7212
|
+
this.displayedValue = ret.displayedValue;
|
|
7213
|
+
}
|
|
7195
7214
|
if (__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f") != null) {
|
|
7196
|
-
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter =
|
|
7215
|
+
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7197
7216
|
}
|
|
7198
7217
|
}
|
|
7199
7218
|
else {
|
|
7200
7219
|
this.value = idIn;
|
|
7201
7220
|
this.displayedValue = idIn;
|
|
7202
7221
|
if (__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f") != null) {
|
|
7203
|
-
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter =
|
|
7222
|
+
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7204
7223
|
}
|
|
7205
7224
|
}
|
|
7206
7225
|
return ret;
|
|
@@ -8033,7 +8052,7 @@ const KupDataTable = class {
|
|
|
8033
8052
|
/**
|
|
8034
8053
|
* The density of the rows, defaults at 'medium' and can be also set to 'large' or 'small'.
|
|
8035
8054
|
*/
|
|
8036
|
-
this.density =
|
|
8055
|
+
this.density = kupManager.FCellPadding.DENSE;
|
|
8037
8056
|
/**
|
|
8038
8057
|
* Enables drag.
|
|
8039
8058
|
*/
|
|
@@ -10817,7 +10836,7 @@ const KupDataTable = class {
|
|
|
10817
10836
|
? selectionStyleAndClass.fixedCellClasses
|
|
10818
10837
|
: null, style: selectionStyleAndClass
|
|
10819
10838
|
? selectionStyleAndClass.fixedCellStyle
|
|
10820
|
-
: null }, index.h(
|
|
10839
|
+
: null }, index.h(fCheckbox.FCheckbox, Object.assign({}, props))));
|
|
10821
10840
|
}
|
|
10822
10841
|
// Renders action cell
|
|
10823
10842
|
// If active, this can be either the first or second cell
|
|
@@ -11146,10 +11165,10 @@ const KupDataTable = class {
|
|
|
11146
11165
|
} })));
|
|
11147
11166
|
}
|
|
11148
11167
|
getDensityCodeFromDecode(decode) {
|
|
11149
|
-
return this.transcodeItem(decode, this.DENSITY_DECODES, Object.values(
|
|
11168
|
+
return this.transcodeItem(decode, this.DENSITY_DECODES, Object.values(kupManager.FCellPadding));
|
|
11150
11169
|
}
|
|
11151
11170
|
renderDensityPanel() {
|
|
11152
|
-
const listItems = this.createListData(Object.values(
|
|
11171
|
+
const listItems = this.createListData(Object.values(kupManager.FCellPadding), this.DENSITY_ICONS, this.density);
|
|
11153
11172
|
const listData = { data: listItems, showIcons: true };
|
|
11154
11173
|
const textfieldData = {
|
|
11155
11174
|
trailingIcon: true,
|
|
@@ -14015,7 +14034,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14015
14034
|
display: 'none',
|
|
14016
14035
|
};
|
|
14017
14036
|
innerSpanTag = [
|
|
14018
|
-
index.h("span", { class: "list-item__graphic" }, index.h("input", { type: "checkbox", style: trickForMDC }), index.h(
|
|
14037
|
+
index.h("span", { class: "list-item__graphic" }, index.h("input", { type: "checkbox", style: trickForMDC }), index.h(fCheckbox.FCheckbox, { checked: checkedAttr })),
|
|
14019
14038
|
imageTag,
|
|
14020
14039
|
index.h("label", { class: "list-item__text", htmlFor: this.rootElement.id + '_' + index$1 }, primaryTextTag, secTextTag),
|
|
14021
14040
|
];
|
|
@@ -14834,20 +14853,6 @@ const KupSpinner = class {
|
|
|
14834
14853
|
};
|
|
14835
14854
|
KupSpinner.style = kupSpinnerCss;
|
|
14836
14855
|
|
|
14837
|
-
/*-------------------------------------------------*/
|
|
14838
|
-
/* C o m p o n e n t */
|
|
14839
|
-
/*-------------------------------------------------*/
|
|
14840
|
-
const FSwitch = (props) => {
|
|
14841
|
-
return (index.h("div", Object.assign({ class: `f-switch ${props.danger ? 'kup-danger' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }),
|
|
14842
|
-
index.h("div", { class: `form-field ${props.leadingLabel ? 'form-field--align-end' : ''}` },
|
|
14843
|
-
index.h("div", { class: `switch ${props.checked ? 'switch--checked' : ''} ${props.disabled ? 'switch--disabled' : ''}` },
|
|
14844
|
-
index.h("div", { class: "switch__track" }),
|
|
14845
|
-
index.h("div", { class: "switch__thumb-underlay" },
|
|
14846
|
-
index.h("div", { class: "switch__thumb" },
|
|
14847
|
-
index.h("input", { type: "checkbox", class: "switch__native-control", role: "switch", checked: props.checked, disabled: props.disabled, value: props.checked ? 'on' : 'off', onBlur: props.onBlur, onChange: props.onChange, onFocus: props.onFocus })))),
|
|
14848
|
-
index.h("label", { onClick: props.onChange }, props.label))));
|
|
14849
|
-
};
|
|
14850
|
-
|
|
14851
14856
|
/**
|
|
14852
14857
|
* Props of the kup-switch component.
|
|
14853
14858
|
* Used to export every prop in an object.
|
|
@@ -15014,7 +15019,7 @@ const KupSwitch = class {
|
|
|
15014
15019
|
onChange: () => this.onKupChange(),
|
|
15015
15020
|
onFocus: () => this.onKupFocus(),
|
|
15016
15021
|
};
|
|
15017
|
-
return (index.h(index.Host, null, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, index.h(FSwitch, Object.assign({}, props)))));
|
|
15022
|
+
return (index.h(index.Host, null, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, index.h(fCell.FSwitch, Object.assign({}, props)))));
|
|
15018
15023
|
}
|
|
15019
15024
|
disconnectedCallback() {
|
|
15020
15025
|
this.kupManager.theme.unregister(this);
|
|
@@ -15240,7 +15245,10 @@ var KupTextFieldProps;
|
|
|
15240
15245
|
KupTextFieldProps["isClearable"] = "Enables a clear trailing icon.";
|
|
15241
15246
|
KupTextFieldProps["label"] = "When set, its content will be shown as a label.";
|
|
15242
15247
|
KupTextFieldProps["leadingLabel"] = "When set to true, the label will be on the left of the component.";
|
|
15248
|
+
KupTextFieldProps["max"] = "The HTML max attribute specifies the maximum value for the input element. Works with the following input types: number, range, date, datetime-local, month, time and week.";
|
|
15243
15249
|
KupTextFieldProps["maxLength"] = "When set, the helper will display a character counter.";
|
|
15250
|
+
KupTextFieldProps["min"] = "The HTML min attribute specifies the minimum value for the input element. Works with the following input types: number, range, date, datetime-local, month, time and week.";
|
|
15251
|
+
KupTextFieldProps["name"] = "The HTML name attribute used for form autocomplete.";
|
|
15244
15252
|
KupTextFieldProps["outlined"] = "When set to true, the component will be rendered as an outlined field.";
|
|
15245
15253
|
KupTextFieldProps["readOnly"] = "Sets the component to read only state, making it not editable, but interactable. Used in combobox component when it behaves as a select.";
|
|
15246
15254
|
KupTextFieldProps["step"] = "The HTML step of the input element. It has effect only with number input type.";
|
|
@@ -15356,6 +15364,11 @@ const KupTextField = class {
|
|
|
15356
15364
|
* @default null
|
|
15357
15365
|
*/
|
|
15358
15366
|
this.min = null;
|
|
15367
|
+
/**
|
|
15368
|
+
* The HTML name attribute used for form autocomplete.
|
|
15369
|
+
* @default null
|
|
15370
|
+
*/
|
|
15371
|
+
this.name = null;
|
|
15359
15372
|
/**
|
|
15360
15373
|
* When set to true, the component will be rendered as an outlined field.
|
|
15361
15374
|
* @default false
|
|
@@ -15559,6 +15572,7 @@ const KupTextField = class {
|
|
|
15559
15572
|
max: this.max,
|
|
15560
15573
|
maxLength: this.maxLength,
|
|
15561
15574
|
min: this.min,
|
|
15575
|
+
name: this.name,
|
|
15562
15576
|
outlined: this.outlined,
|
|
15563
15577
|
readOnly: this.readOnly,
|
|
15564
15578
|
secondary: this.rootElement.classList.contains('kup-secondary')
|
|
@@ -15675,12 +15689,6 @@ const KupTimePicker = class {
|
|
|
15675
15689
|
* Instance of the KupManager class.
|
|
15676
15690
|
*/
|
|
15677
15691
|
this.kupManager = kupManager.kupManagerInstance();
|
|
15678
|
-
this.hoursEl = undefined;
|
|
15679
|
-
this.minutesEl = undefined;
|
|
15680
|
-
this.secondsEl = undefined;
|
|
15681
|
-
this.hoursCircleEl = undefined;
|
|
15682
|
-
this.minutesCircleEl = undefined;
|
|
15683
|
-
this.secondsCircleEl = undefined;
|
|
15684
15692
|
this.hoursActive = true;
|
|
15685
15693
|
this.minutesActive = false;
|
|
15686
15694
|
this.secondsActive = false;
|
|
@@ -16258,7 +16266,7 @@ const KupTree = class {
|
|
|
16258
16266
|
/**
|
|
16259
16267
|
* The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.
|
|
16260
16268
|
*/
|
|
16261
|
-
this.density =
|
|
16269
|
+
this.density = kupManager.FCellPadding.MEDIUM;
|
|
16262
16270
|
/**
|
|
16263
16271
|
* Function that gets invoked when a new set of nodes must be loaded as children of a node.
|
|
16264
16272
|
*
|
|
@@ -16389,7 +16397,6 @@ const KupTree = class {
|
|
|
16389
16397
|
if (this.store && this.stateId) {
|
|
16390
16398
|
const state = this.store.getState(this.stateId);
|
|
16391
16399
|
if (state != null) {
|
|
16392
|
-
console.log('Initialize with state for stateId ' + this.stateId, state);
|
|
16393
16400
|
this.density = state.density;
|
|
16394
16401
|
this.showFilters = state.showFilters;
|
|
16395
16402
|
this.showFooter = state.showFooter;
|
|
@@ -16436,7 +16443,6 @@ const KupTree = class {
|
|
|
16436
16443
|
return;
|
|
16437
16444
|
}
|
|
16438
16445
|
if (somethingChanged) {
|
|
16439
|
-
console.log('Persisting state for stateId ' + this.stateId + ': ', this.state);
|
|
16440
16446
|
this.store.persistState(this.stateId, this.state);
|
|
16441
16447
|
}
|
|
16442
16448
|
}
|
|
@@ -16745,7 +16751,7 @@ const KupTree = class {
|
|
|
16745
16751
|
this.closeTotalMenu();
|
|
16746
16752
|
this.openTotalMenu(column);
|
|
16747
16753
|
}
|
|
16748
|
-
getEventDetails(path) {
|
|
16754
|
+
getEventDetails(path, e) {
|
|
16749
16755
|
let isHeader, isBody, isFooter, td, th, tr, filterRemove;
|
|
16750
16756
|
if (path) {
|
|
16751
16757
|
for (let i = path.length - 1; i >= 0; i--) {
|
|
@@ -16817,6 +16823,7 @@ const KupTree = class {
|
|
|
16817
16823
|
cell: cell ? cell : null,
|
|
16818
16824
|
column: column ? column : null,
|
|
16819
16825
|
filterRemove: filterRemove ? filterRemove : null,
|
|
16826
|
+
originalEvent: e,
|
|
16820
16827
|
row: row ? row : null,
|
|
16821
16828
|
td: td ? td : null,
|
|
16822
16829
|
th: th ? th : null,
|
|
@@ -16825,7 +16832,7 @@ const KupTree = class {
|
|
|
16825
16832
|
}
|
|
16826
16833
|
contextMenuHandler(e) {
|
|
16827
16834
|
e.preventDefault();
|
|
16828
|
-
const details = this.getEventDetails(this.getEventPath(e.target));
|
|
16835
|
+
const details = this.getEventDetails(this.getEventPath(e.target), e);
|
|
16829
16836
|
if (details.area === 'header') {
|
|
16830
16837
|
if (details.th && details.column) {
|
|
16831
16838
|
this.openColumnMenu(details.column.name);
|
|
@@ -17560,6 +17567,12 @@ const KupTree = class {
|
|
|
17560
17567
|
}
|
|
17561
17568
|
}
|
|
17562
17569
|
}
|
|
17570
|
+
if (root) {
|
|
17571
|
+
const fs = root.querySelectorAll('.f-text-field');
|
|
17572
|
+
for (let index = 0; index < fs.length; index++) {
|
|
17573
|
+
fTextFieldMdc.FTextFieldMDC(fs[index]);
|
|
17574
|
+
}
|
|
17575
|
+
}
|
|
17563
17576
|
if (this.preventXScroll) {
|
|
17564
17577
|
this.setEllipsis();
|
|
17565
17578
|
}
|
|
@@ -17577,10 +17590,10 @@ const KupTree = class {
|
|
|
17577
17590
|
this.sizedColumns = this.getSizedColumns();
|
|
17578
17591
|
let wrapperClass = 'density-medium';
|
|
17579
17592
|
switch (this.density) {
|
|
17580
|
-
case
|
|
17593
|
+
case kupManager.FCellPadding.DENSE:
|
|
17581
17594
|
wrapperClass = 'density-dense';
|
|
17582
17595
|
break;
|
|
17583
|
-
case
|
|
17596
|
+
case kupManager.FCellPadding.WIDE:
|
|
17584
17597
|
wrapperClass = 'density-wide';
|
|
17585
17598
|
break;
|
|
17586
17599
|
}
|