@sme.up/ketchup 8.0.0 → 8.0.1
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/{f-button-49b2c37c.js → f-button-c0ede055.js} +2 -2
- package/dist/cjs/{f-cell-9a6bc55c.js → f-cell-1c17dbac.js} +17 -10
- package/dist/cjs/{f-checkbox-593f72c3.js → f-checkbox-1148e791.js} +1 -1
- package/dist/cjs/{f-chip-dee84122.js → f-chip-bace36bb.js} +3 -3
- package/dist/cjs/{f-image-27f965ff.js → f-image-22174590.js} +2 -2
- package/dist/cjs/{f-paginator-utils-4a30189d.js → f-paginator-utils-e21e1f06.js} +3 -3
- package/dist/cjs/{f-text-field-04a663b4.js → f-text-field-503f2bb0.js} +83 -9
- package/dist/cjs/{index-74433248.js → index-1f177abc.js} +0 -3
- package/dist/cjs/ketchup.cjs.js +2 -2
- package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +778 -740
- package/dist/cjs/kup-box.cjs.entry.js +10 -10
- package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
- package/dist/cjs/kup-cell.cjs.entry.js +7 -7
- package/dist/cjs/kup-dash-list.cjs.entry.js +3 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +2 -2
- package/dist/cjs/kup-dashboard.cjs.entry.js +6 -6
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +2 -2
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
- package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
- package/dist/cjs/{kup-manager-2ff5d258.js → kup-manager-b994cf71.js} +88 -16
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.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 +12 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/data-table.js +44 -0
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +1 -3
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +27 -0
- 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 +109 -10
- package/dist/collection/f-components/f-cell/f-cell.js +12 -5
- package/dist/collection/f-components/f-text-field/f-text-field.js +80 -6
- package/dist/collection/managers/kup-math/kup-math.js +85 -4
- package/dist/collection/utils/utils.js +1 -10
- package/dist/components/kup-autocomplete2.js +543 -349
- package/dist/components/kup-dash-list.js +2 -3
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +1 -1
- package/dist/components/kup-family-tree.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-planner.js +1 -1
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +8 -0
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/esm/{f-button-744cf1f6.js → f-button-c377973d.js} +2 -2
- package/dist/esm/{f-cell-b319c869.js → f-cell-e5a98bc8.js} +17 -10
- package/dist/esm/{f-checkbox-ec85b437.js → f-checkbox-9b3f5f5b.js} +1 -1
- package/dist/esm/{f-chip-7e3e4180.js → f-chip-c8a18c48.js} +3 -3
- package/dist/esm/{f-image-098c26ce.js → f-image-5cbdf39d.js} +2 -2
- package/dist/esm/{f-paginator-utils-674cb2ae.js → f-paginator-utils-a1dab059.js} +3 -3
- package/dist/esm/{f-text-field-c38ef113.js → f-text-field-dafb7c8b.js} +83 -9
- package/dist/esm/{index-b326ffc9.js → index-8bd38435.js} +1 -3
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +3 -3
- package/dist/esm/kup-autocomplete_27.entry.js +778 -740
- package/dist/esm/kup-box.entry.js +10 -10
- package/dist/esm/kup-calendar.entry.js +5 -5
- package/dist/esm/kup-cell.entry.js +7 -7
- package/dist/esm/kup-dash-list.entry.js +3 -4
- package/dist/esm/kup-dash_2.entry.js +2 -2
- package/dist/esm/kup-dashboard.entry.js +6 -6
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +2 -2
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-lazy.entry.js +2 -2
- package/dist/esm/kup-magic-box.entry.js +3 -3
- package/dist/esm/{kup-manager-b41eb2a8.js → kup-manager-3594cde8.js} +88 -16
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +2 -2
- package/dist/esm/kup-planner.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 +12 -4
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-3efe7f43.entry.js → p-017418e7.entry.js} +1 -1
- package/dist/ketchup/{p-395e1960.entry.js → p-22e72f06.entry.js} +1 -1
- package/dist/ketchup/{p-77e3d537.js → p-2d32e3cd.js} +1 -1
- package/dist/ketchup/{p-5ce2b4fc.entry.js → p-31abf4b6.entry.js} +1 -1
- package/dist/ketchup/{p-b244f5ca.entry.js → p-37ada0f0.entry.js} +1 -1
- package/dist/ketchup/{p-a877a87b.entry.js → p-38f16697.entry.js} +2 -2
- package/dist/ketchup/{p-9700eb32.js → p-4638fbff.js} +1 -1
- package/dist/ketchup/{p-af82131e.entry.js → p-473d2bea.entry.js} +1 -1
- package/dist/ketchup/{p-da891093.entry.js → p-4c56e199.entry.js} +1 -1
- package/dist/ketchup/{p-a9b7533b.entry.js → p-5205286a.entry.js} +1 -1
- package/dist/ketchup/p-61319cfa.js +1 -0
- package/dist/ketchup/{p-ef614656.js → p-6762d447.js} +1 -1
- package/dist/ketchup/p-6c726886.entry.js +1 -0
- package/dist/ketchup/{p-0b91f5f8.entry.js → p-7be5ef32.entry.js} +1 -1
- package/dist/ketchup/{p-3b41aca7.entry.js → p-7f4f5f0f.entry.js} +1 -1
- package/dist/ketchup/{p-b032f47d.entry.js → p-80815edf.entry.js} +1 -1
- package/dist/ketchup/p-8b248655.js +1 -0
- package/dist/ketchup/{p-d4ece435.js → p-9dcfbb1e.js} +2 -2
- package/dist/ketchup/{p-c26975bf.js → p-9f9b6656.js} +1 -1
- package/dist/ketchup/{p-4325d965.entry.js → p-9fc6a9a8.entry.js} +1 -1
- package/dist/ketchup/{p-940a5feb.js → p-acaa171f.js} +3 -3
- package/dist/ketchup/{p-4ae2ca6f.entry.js → p-afff7a6e.entry.js} +1 -1
- package/dist/ketchup/{p-bd42562d.entry.js → p-b718af72.entry.js} +1 -1
- package/dist/ketchup/p-bf4a881b.js +1 -0
- package/dist/ketchup/{p-d739710a.entry.js → p-ce5b6ce7.entry.js} +1 -1
- package/dist/ketchup/p-cf322853.entry.js +1 -0
- package/dist/ketchup/{p-bb17c1ba.entry.js → p-d1164680.entry.js} +1 -1
- package/dist/ketchup/p-d4eb9a76.entry.js +1 -0
- package/dist/ketchup/p-d76be079.entry.js +1 -0
- package/dist/ketchup/{p-e02b5141.entry.js → p-ed7e118e.entry.js} +1 -1
- package/dist/ketchup/{p-a7e19620.entry.js → p-ef0b4f19.entry.js} +1 -1
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +5 -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 +20 -2
- package/dist/types/components.d.ts +34 -0
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +3 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +26 -2
- package/dist/types/utils/utils.d.ts +0 -1
- package/package.json +1 -1
- package/dist/ketchup/p-0b0b61cb.entry.js +0 -1
- package/dist/ketchup/p-5d398e42.js +0 -1
- package/dist/ketchup/p-c8b7790a.entry.js +0 -1
- package/dist/ketchup/p-c968e93d.entry.js +0 -1
- package/dist/ketchup/p-d98fdb9b.js +0 -1
- package/dist/ketchup/p-df316daf.entry.js +0 -1
- package/dist/ketchup/p-e714f4dc.js +0 -1
|
@@ -2,19 +2,19 @@
|
|
|
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-1f177abc.js');
|
|
6
|
+
const kupManager = require('./kup-manager-b994cf71.js');
|
|
7
|
+
const fTextField = require('./f-text-field-503f2bb0.js');
|
|
8
8
|
const fTextFieldMdc = require('./f-text-field-mdc-0e22f3e3.js');
|
|
9
|
-
const fCell = require('./f-cell-
|
|
9
|
+
const fCell = require('./f-cell-1c17dbac.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-22174590.js');
|
|
12
|
+
const fButton = require('./f-button-c0ede055.js');
|
|
13
13
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
14
|
-
const fChip = require('./f-chip-
|
|
14
|
+
const fChip = require('./f-chip-bace36bb.js');
|
|
15
15
|
const component = require('./component-85c2bd4d.js');
|
|
16
|
-
const fCheckbox = require('./f-checkbox-
|
|
17
|
-
const fPaginatorUtils = require('./f-paginator-utils-
|
|
16
|
+
const fCheckbox = require('./f-checkbox-1148e791.js');
|
|
17
|
+
const fPaginatorUtils = require('./f-paginator-utils-e21e1f06.js');
|
|
18
18
|
require('./tslib.es6-386654de.js');
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -168,7 +168,7 @@ function getItemByDisplayMode(listData, id, displayMode, setSelected) {
|
|
|
168
168
|
|
|
169
169
|
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)}";
|
|
170
170
|
|
|
171
|
-
var __classPrivateFieldGet$
|
|
171
|
+
var __classPrivateFieldGet$7 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
172
172
|
if (kind === "a" && !f)
|
|
173
173
|
throw new TypeError("Private accessor was defined without a getter");
|
|
174
174
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -229,18 +229,18 @@ const KupAutocomplete = class {
|
|
|
229
229
|
comp: this,
|
|
230
230
|
id: this.rootElement.id,
|
|
231
231
|
value: this.value,
|
|
232
|
-
inputValue: __classPrivateFieldGet$
|
|
232
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
onKupChange(value) {
|
|
236
236
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
237
|
-
const ret = __classPrivateFieldGet$
|
|
237
|
+
const ret = __classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
238
238
|
if (ret.exists || this.allowInconsistentValues) {
|
|
239
239
|
this.kupChange.emit({
|
|
240
240
|
comp: this,
|
|
241
241
|
id: this.rootElement.id,
|
|
242
242
|
value: this.value,
|
|
243
|
-
inputValue: __classPrivateFieldGet$
|
|
243
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
244
244
|
node: ret.node,
|
|
245
245
|
});
|
|
246
246
|
}
|
|
@@ -250,7 +250,7 @@ const KupAutocomplete = class {
|
|
|
250
250
|
comp: this,
|
|
251
251
|
id: this.rootElement.id,
|
|
252
252
|
value: this.value,
|
|
253
|
-
inputValue: __classPrivateFieldGet$
|
|
253
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
onKupFocus() {
|
|
@@ -258,51 +258,51 @@ const KupAutocomplete = class {
|
|
|
258
258
|
comp: this,
|
|
259
259
|
id: this.rootElement.id,
|
|
260
260
|
value: this.value,
|
|
261
|
-
inputValue: __classPrivateFieldGet$
|
|
261
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
onKupInput() {
|
|
265
265
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
266
|
-
const ret = __classPrivateFieldGet$
|
|
267
|
-
__classPrivateFieldGet$
|
|
268
|
-
if (__classPrivateFieldGet$
|
|
266
|
+
const ret = __classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value, false);
|
|
267
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
268
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value.length >= this.minimumChars) {
|
|
269
269
|
this.kupInput.emit({
|
|
270
270
|
comp: this,
|
|
271
271
|
id: this.rootElement.id,
|
|
272
272
|
value: this.value,
|
|
273
|
-
inputValue: __classPrivateFieldGet$
|
|
273
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
274
274
|
node: ret.node,
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
onKupIconClick() {
|
|
279
|
-
if (__classPrivateFieldGet$
|
|
280
|
-
__classPrivateFieldGet$
|
|
279
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
280
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
281
281
|
}
|
|
282
282
|
else {
|
|
283
283
|
if (this.showDropDownIcon) {
|
|
284
|
-
__classPrivateFieldGet$
|
|
284
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, true);
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
this.kupIconClick.emit({
|
|
288
288
|
comp: this,
|
|
289
289
|
id: this.rootElement.id,
|
|
290
290
|
value: this.value,
|
|
291
|
-
inputValue: __classPrivateFieldGet$
|
|
292
|
-
open: __classPrivateFieldGet$
|
|
291
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
292
|
+
open: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled'),
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
295
|
onKupItemClick(e) {
|
|
296
296
|
this.onKupChange(e.detail.selected.id);
|
|
297
|
-
__classPrivateFieldGet$
|
|
298
|
-
if (__classPrivateFieldGet$
|
|
299
|
-
__classPrivateFieldGet$
|
|
297
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
298
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f")) {
|
|
299
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
300
300
|
}
|
|
301
301
|
this.kupItemClick.emit({
|
|
302
302
|
comp: this,
|
|
303
303
|
id: this.rootElement.id,
|
|
304
304
|
value: this.value,
|
|
305
|
-
inputValue: __classPrivateFieldGet$
|
|
305
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
306
306
|
node: e.detail.selected,
|
|
307
307
|
});
|
|
308
308
|
}
|
|
@@ -310,30 +310,30 @@ const KupAutocomplete = class {
|
|
|
310
310
|
/* L i s t e n e r s */
|
|
311
311
|
/*-------------------------------------------------*/
|
|
312
312
|
listenKeydown(e) {
|
|
313
|
-
if (__classPrivateFieldGet$
|
|
313
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_isListOpened).call(this)) {
|
|
314
314
|
switch (e.key) {
|
|
315
315
|
case 'ArrowDown':
|
|
316
316
|
e.preventDefault();
|
|
317
317
|
e.stopPropagation();
|
|
318
|
-
__classPrivateFieldGet$
|
|
318
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
319
319
|
break;
|
|
320
320
|
case 'ArrowUp':
|
|
321
321
|
e.preventDefault();
|
|
322
322
|
e.stopPropagation();
|
|
323
|
-
__classPrivateFieldGet$
|
|
323
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
324
324
|
break;
|
|
325
325
|
case 'Enter':
|
|
326
326
|
e.preventDefault();
|
|
327
327
|
e.stopPropagation();
|
|
328
|
-
__classPrivateFieldGet$
|
|
329
|
-
__classPrivateFieldGet$
|
|
330
|
-
__classPrivateFieldGet$
|
|
328
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").select().then(() => {
|
|
329
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
330
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
331
331
|
});
|
|
332
332
|
break;
|
|
333
333
|
case 'Escape':
|
|
334
334
|
e.preventDefault();
|
|
335
335
|
e.stopPropagation();
|
|
336
|
-
__classPrivateFieldGet$
|
|
336
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
337
337
|
break;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
@@ -342,14 +342,14 @@ const KupAutocomplete = class {
|
|
|
342
342
|
case 'ArrowDown':
|
|
343
343
|
e.preventDefault();
|
|
344
344
|
e.stopPropagation();
|
|
345
|
-
__classPrivateFieldGet$
|
|
346
|
-
__classPrivateFieldGet$
|
|
345
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
346
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
347
347
|
break;
|
|
348
348
|
case 'ArrowUp':
|
|
349
349
|
e.preventDefault();
|
|
350
350
|
e.stopPropagation();
|
|
351
|
-
__classPrivateFieldGet$
|
|
352
|
-
__classPrivateFieldGet$
|
|
351
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
352
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
353
353
|
break;
|
|
354
354
|
}
|
|
355
355
|
}
|
|
@@ -382,7 +382,7 @@ const KupAutocomplete = class {
|
|
|
382
382
|
* Sets the focus to the component.
|
|
383
383
|
*/
|
|
384
384
|
async setFocus() {
|
|
385
|
-
__classPrivateFieldGet$
|
|
385
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
386
386
|
}
|
|
387
387
|
/**
|
|
388
388
|
* Sets the props to the component.
|
|
@@ -397,14 +397,14 @@ const KupAutocomplete = class {
|
|
|
397
397
|
*/
|
|
398
398
|
async setValue(value) {
|
|
399
399
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
400
|
-
__classPrivateFieldGet$
|
|
400
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
401
401
|
}
|
|
402
402
|
/*-------------------------------------------------*/
|
|
403
403
|
/* L i f e c y c l e H o o k s */
|
|
404
404
|
/*-------------------------------------------------*/
|
|
405
405
|
componentWillLoad() {
|
|
406
|
-
__classPrivateFieldGet$
|
|
407
|
-
__classPrivateFieldGet$
|
|
406
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, false);
|
|
407
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").theme.register(this);
|
|
408
408
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
409
409
|
this.value = this.initialValue;
|
|
410
410
|
if (!this.data) {
|
|
@@ -415,11 +415,11 @@ const KupAutocomplete = class {
|
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
componentDidLoad() {
|
|
418
|
-
__classPrivateFieldGet$
|
|
419
|
-
__classPrivateFieldGet$
|
|
418
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, this.value, true);
|
|
419
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, true);
|
|
420
420
|
}
|
|
421
421
|
componentWillRender() {
|
|
422
|
-
__classPrivateFieldGet$
|
|
422
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, false);
|
|
423
423
|
}
|
|
424
424
|
componentDidRender() {
|
|
425
425
|
const root = this.rootElement.shadowRoot;
|
|
@@ -431,81 +431,81 @@ const KupAutocomplete = class {
|
|
|
431
431
|
fTextFieldMdc.FTextFieldMDC(f);
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
__classPrivateFieldGet$
|
|
434
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, true);
|
|
435
435
|
}
|
|
436
436
|
render() {
|
|
437
437
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
438
438
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
439
|
-
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$
|
|
439
|
+
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$7(this, _KupAutocomplete_elStyle, "f") }, index.h("style", null, __classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$7(this, _KupAutocomplete_elStyle, "f") }, index.h(fTextField.FTextField, Object.assign({ icon: this.showDropDownIcon
|
|
440
440
|
? kupManager.KupThemeIconValues.DROPDOWN
|
|
441
441
|
: null, trailingIcon: true }, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => {
|
|
442
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
442
|
+
window.clearTimeout(__classPrivateFieldGet$7(this, _KupAutocomplete_inputTimeout, "f"));
|
|
443
443
|
__classPrivateFieldSet$4(this, _KupAutocomplete_inputTimeout, window.setTimeout(() => this.onKupInput(), this.inputDelay), "f");
|
|
444
|
-
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$
|
|
444
|
+
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_prepList).call(this)));
|
|
445
445
|
}
|
|
446
446
|
disconnectedCallback() {
|
|
447
|
-
if (__classPrivateFieldGet$
|
|
448
|
-
__classPrivateFieldGet$
|
|
449
|
-
__classPrivateFieldGet$
|
|
447
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f")) {
|
|
448
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f")]);
|
|
449
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").remove();
|
|
450
450
|
}
|
|
451
|
-
__classPrivateFieldGet$
|
|
451
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").theme.unregister(this);
|
|
452
452
|
}
|
|
453
453
|
get rootElement() { return index.getElement(this); }
|
|
454
454
|
};
|
|
455
455
|
_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) {
|
|
456
456
|
if (forceOpen != true &&
|
|
457
|
-
__classPrivateFieldGet$
|
|
458
|
-
__classPrivateFieldGet$
|
|
457
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value.length < this.minimumChars) {
|
|
458
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
459
459
|
return false;
|
|
460
460
|
}
|
|
461
|
-
__classPrivateFieldGet$
|
|
462
|
-
__classPrivateFieldGet$
|
|
463
|
-
const elStyle = __classPrivateFieldGet$
|
|
461
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f").classList.add('toggled');
|
|
462
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").menuVisible = true;
|
|
463
|
+
const elStyle = __classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").style;
|
|
464
464
|
elStyle.height = 'auto';
|
|
465
|
-
elStyle.minWidth = __classPrivateFieldGet$
|
|
466
|
-
if (__classPrivateFieldGet$
|
|
467
|
-
__classPrivateFieldGet$
|
|
465
|
+
elStyle.minWidth = __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f").clientWidth + 'px';
|
|
466
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"))) {
|
|
467
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f"));
|
|
468
468
|
}
|
|
469
469
|
else {
|
|
470
|
-
__classPrivateFieldGet$
|
|
470
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f"), 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
471
471
|
}
|
|
472
|
-
__classPrivateFieldGet$
|
|
473
|
-
if (!__classPrivateFieldGet$
|
|
472
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"));
|
|
473
|
+
if (!__classPrivateFieldGet$7(this, _KupAutocomplete_clickCb, "f")) {
|
|
474
474
|
__classPrivateFieldSet$4(this, _KupAutocomplete_clickCb, {
|
|
475
475
|
cb: () => {
|
|
476
|
-
__classPrivateFieldGet$
|
|
476
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
477
477
|
},
|
|
478
|
-
el: __classPrivateFieldGet$
|
|
478
|
+
el: __classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"),
|
|
479
479
|
}, "f");
|
|
480
480
|
}
|
|
481
|
-
__classPrivateFieldGet$
|
|
481
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").addClickCallback(__classPrivateFieldGet$7(this, _KupAutocomplete_clickCb, "f"), true);
|
|
482
482
|
return true;
|
|
483
483
|
}, _KupAutocomplete_closeList = function _KupAutocomplete_closeList() {
|
|
484
|
-
__classPrivateFieldGet$
|
|
485
|
-
__classPrivateFieldGet$
|
|
486
|
-
__classPrivateFieldGet$
|
|
487
|
-
__classPrivateFieldGet$
|
|
484
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f").classList.remove('toggled');
|
|
485
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").menuVisible = false;
|
|
486
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"));
|
|
487
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet$7(this, _KupAutocomplete_clickCb, "f"));
|
|
488
488
|
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
489
|
-
return __classPrivateFieldGet$
|
|
489
|
+
return __classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
490
490
|
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, setValue) {
|
|
491
|
-
if (!__classPrivateFieldGet$
|
|
491
|
+
if (!__classPrivateFieldGet$7(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
492
492
|
return;
|
|
493
493
|
}
|
|
494
494
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
495
|
-
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$
|
|
495
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
496
496
|
if (ret.exists || this.allowInconsistentValues) {
|
|
497
497
|
if (setValue) {
|
|
498
498
|
this.value = ret.value;
|
|
499
499
|
this.displayedValue = ret.displayedValue;
|
|
500
500
|
}
|
|
501
|
-
if (__classPrivateFieldGet$
|
|
502
|
-
__classPrivateFieldGet$
|
|
501
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
502
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
else {
|
|
506
506
|
this.displayedValue = idIn;
|
|
507
|
-
if (__classPrivateFieldGet$
|
|
508
|
-
__classPrivateFieldGet$
|
|
507
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
508
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
return ret;
|
|
@@ -6451,7 +6451,7 @@ var KupChipProps;
|
|
|
6451
6451
|
|
|
6452
6452
|
const kupChipCss = ":host{display:block}";
|
|
6453
6453
|
|
|
6454
|
-
var __classPrivateFieldGet$
|
|
6454
|
+
var __classPrivateFieldGet$6 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
6455
6455
|
if (kind === "a" && !f)
|
|
6456
6456
|
throw new TypeError("Private accessor was defined without a getter");
|
|
6457
6457
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -6520,7 +6520,7 @@ const KupChip = class {
|
|
|
6520
6520
|
this.kupChange.emit({
|
|
6521
6521
|
comp: this,
|
|
6522
6522
|
id: this.rootElement.id,
|
|
6523
|
-
stringifiedValues: __classPrivateFieldGet$
|
|
6523
|
+
stringifiedValues: __classPrivateFieldGet$6(this, _KupChip_instances, "m", _KupChip_stringifiedValues).call(this),
|
|
6524
6524
|
});
|
|
6525
6525
|
this.refresh();
|
|
6526
6526
|
}
|
|
@@ -6637,11 +6637,11 @@ const KupChip = class {
|
|
|
6637
6637
|
props.onIconClick.push((chip) => this.onKupIconClick(chip));
|
|
6638
6638
|
}
|
|
6639
6639
|
return (index.h(index.Host, { "onKup-autocomplete-itemclick": (e) => {
|
|
6640
|
-
__classPrivateFieldGet$
|
|
6640
|
+
__classPrivateFieldGet$6(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6641
6641
|
}, "onKup-combobox-itemclick": (e) => {
|
|
6642
|
-
__classPrivateFieldGet$
|
|
6642
|
+
__classPrivateFieldGet$6(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6643
6643
|
}, "onKup-textfield-change": (e) => {
|
|
6644
|
-
__classPrivateFieldGet$
|
|
6644
|
+
__classPrivateFieldGet$6(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6645
6645
|
} }, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 ? index.h(fChip.FChip, Object.assign({}, props)) : null, index.h("slot", { name: "field" }))));
|
|
6646
6646
|
}
|
|
6647
6647
|
disconnectedCallback() {
|
|
@@ -6679,7 +6679,7 @@ _KupChip_instances = new WeakSet(), _KupChip_changeHandler =
|
|
|
6679
6679
|
this.kupChange.emit({
|
|
6680
6680
|
comp: this,
|
|
6681
6681
|
id: this.rootElement.id,
|
|
6682
|
-
stringifiedValues: __classPrivateFieldGet$
|
|
6682
|
+
stringifiedValues: __classPrivateFieldGet$6(this, _KupChip_instances, "m", _KupChip_stringifiedValues).call(this),
|
|
6683
6683
|
});
|
|
6684
6684
|
}
|
|
6685
6685
|
}
|
|
@@ -6968,7 +6968,7 @@ var KupComboboxProps;
|
|
|
6968
6968
|
|
|
6969
6969
|
const kupComboboxCss = ":host{display:block;font-size:var(--kup-font-size);width:max-content}:host([is-select]) #kup-component{transition:background-color 0.2s}:host([is-select]) #kup-component:hover{background-color:rgba(var(--kup-text-color-rgb), 0.1)}:host([is-select]) .mdc-text-field:not(.mdc-text-field--disabled) input{cursor:pointer}.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)}";
|
|
6970
6970
|
|
|
6971
|
-
var __classPrivateFieldGet$
|
|
6971
|
+
var __classPrivateFieldGet$5 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
6972
6972
|
if (kind === "a" && !f)
|
|
6973
6973
|
throw new TypeError("Private accessor was defined without a getter");
|
|
6974
6974
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -7024,33 +7024,33 @@ const KupCombobox = class {
|
|
|
7024
7024
|
comp: this,
|
|
7025
7025
|
id: this.rootElement.id,
|
|
7026
7026
|
value: this.value,
|
|
7027
|
-
inputValue: __classPrivateFieldGet$
|
|
7027
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7028
7028
|
});
|
|
7029
7029
|
}
|
|
7030
7030
|
onKupChange(value) {
|
|
7031
|
-
let ret = __classPrivateFieldGet$
|
|
7031
|
+
let ret = __classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7032
7032
|
this.kupChange.emit({
|
|
7033
7033
|
comp: this,
|
|
7034
7034
|
id: this.rootElement.id,
|
|
7035
7035
|
value: this.value,
|
|
7036
|
-
inputValue: __classPrivateFieldGet$
|
|
7036
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7037
7037
|
node: ret.node,
|
|
7038
7038
|
});
|
|
7039
7039
|
}
|
|
7040
7040
|
onKupClick() {
|
|
7041
7041
|
if (this.isSelect == true) {
|
|
7042
|
-
if (__classPrivateFieldGet$
|
|
7043
|
-
__classPrivateFieldGet$
|
|
7042
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
7043
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7044
7044
|
}
|
|
7045
7045
|
else {
|
|
7046
|
-
__classPrivateFieldGet$
|
|
7046
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7047
7047
|
}
|
|
7048
7048
|
}
|
|
7049
7049
|
this.kupClick.emit({
|
|
7050
7050
|
comp: this,
|
|
7051
7051
|
id: this.rootElement.id,
|
|
7052
7052
|
value: this.value,
|
|
7053
|
-
inputValue: __classPrivateFieldGet$
|
|
7053
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7054
7054
|
});
|
|
7055
7055
|
}
|
|
7056
7056
|
onKupFocus() {
|
|
@@ -7058,47 +7058,47 @@ const KupCombobox = class {
|
|
|
7058
7058
|
comp: this,
|
|
7059
7059
|
id: this.rootElement.id,
|
|
7060
7060
|
value: this.value,
|
|
7061
|
-
inputValue: __classPrivateFieldGet$
|
|
7061
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7062
7062
|
});
|
|
7063
7063
|
}
|
|
7064
7064
|
onKupInput() {
|
|
7065
|
-
let ret = __classPrivateFieldGet$
|
|
7066
|
-
__classPrivateFieldGet$
|
|
7065
|
+
let ret = __classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value, false);
|
|
7066
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7067
7067
|
this.kupInput.emit({
|
|
7068
7068
|
comp: this,
|
|
7069
7069
|
id: this.rootElement.id,
|
|
7070
7070
|
value: this.value,
|
|
7071
|
-
inputValue: __classPrivateFieldGet$
|
|
7071
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7072
7072
|
node: ret.node,
|
|
7073
7073
|
});
|
|
7074
7074
|
}
|
|
7075
7075
|
onKupIconClick() {
|
|
7076
|
-
if (__classPrivateFieldGet$
|
|
7077
|
-
__classPrivateFieldGet$
|
|
7076
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
7077
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7078
7078
|
}
|
|
7079
7079
|
else {
|
|
7080
|
-
__classPrivateFieldGet$
|
|
7080
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7081
7081
|
}
|
|
7082
7082
|
this.kupIconClick.emit({
|
|
7083
7083
|
comp: this,
|
|
7084
7084
|
id: this.rootElement.id,
|
|
7085
7085
|
value: this.value,
|
|
7086
|
-
inputValue: __classPrivateFieldGet$
|
|
7087
|
-
open: __classPrivateFieldGet$
|
|
7086
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7087
|
+
open: __classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled'),
|
|
7088
7088
|
});
|
|
7089
7089
|
}
|
|
7090
7090
|
onKupItemClick(e) {
|
|
7091
7091
|
this.onKupChange(e.detail.selected.id);
|
|
7092
|
-
__classPrivateFieldGet$
|
|
7093
|
-
if (__classPrivateFieldGet$
|
|
7094
|
-
__classPrivateFieldGet$
|
|
7092
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7093
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f")) {
|
|
7094
|
+
__classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7095
7095
|
}
|
|
7096
7096
|
this.kupItemClick.emit({
|
|
7097
7097
|
comp: this,
|
|
7098
7098
|
id: this.rootElement.id,
|
|
7099
7099
|
node: e.detail.selected,
|
|
7100
7100
|
value: this.value,
|
|
7101
|
-
inputValue: __classPrivateFieldGet$
|
|
7101
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7102
7102
|
});
|
|
7103
7103
|
}
|
|
7104
7104
|
/*-------------------------------------------------*/
|
|
@@ -7111,30 +7111,30 @@ const KupCombobox = class {
|
|
|
7111
7111
|
/* L i s t e n e r s */
|
|
7112
7112
|
/*-------------------------------------------------*/
|
|
7113
7113
|
listenKeydown(e) {
|
|
7114
|
-
if (__classPrivateFieldGet$
|
|
7114
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7115
7115
|
switch (e.key) {
|
|
7116
7116
|
case 'ArrowDown':
|
|
7117
7117
|
e.preventDefault();
|
|
7118
7118
|
e.stopPropagation();
|
|
7119
|
-
__classPrivateFieldGet$
|
|
7119
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").focusNext();
|
|
7120
7120
|
break;
|
|
7121
7121
|
case 'ArrowUp':
|
|
7122
7122
|
e.preventDefault();
|
|
7123
7123
|
e.stopPropagation();
|
|
7124
|
-
__classPrivateFieldGet$
|
|
7124
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").focusPrevious();
|
|
7125
7125
|
break;
|
|
7126
7126
|
case 'Enter':
|
|
7127
7127
|
e.preventDefault();
|
|
7128
7128
|
e.stopPropagation();
|
|
7129
|
-
__classPrivateFieldGet$
|
|
7130
|
-
__classPrivateFieldGet$
|
|
7131
|
-
__classPrivateFieldGet$
|
|
7129
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").select().then(() => {
|
|
7130
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7131
|
+
__classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7132
7132
|
});
|
|
7133
7133
|
break;
|
|
7134
7134
|
case 'Escape':
|
|
7135
7135
|
e.preventDefault();
|
|
7136
7136
|
e.stopPropagation();
|
|
7137
|
-
__classPrivateFieldGet$
|
|
7137
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7138
7138
|
break;
|
|
7139
7139
|
}
|
|
7140
7140
|
}
|
|
@@ -7143,14 +7143,14 @@ const KupCombobox = class {
|
|
|
7143
7143
|
case 'ArrowDown':
|
|
7144
7144
|
e.preventDefault();
|
|
7145
7145
|
e.stopPropagation();
|
|
7146
|
-
__classPrivateFieldGet$
|
|
7147
|
-
__classPrivateFieldGet$
|
|
7146
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7147
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").focusNext();
|
|
7148
7148
|
break;
|
|
7149
7149
|
case 'ArrowUp':
|
|
7150
7150
|
e.preventDefault();
|
|
7151
7151
|
e.stopPropagation();
|
|
7152
|
-
__classPrivateFieldGet$
|
|
7153
|
-
__classPrivateFieldGet$
|
|
7152
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7153
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").focusPrevious();
|
|
7154
7154
|
break;
|
|
7155
7155
|
}
|
|
7156
7156
|
}
|
|
@@ -7183,7 +7183,7 @@ const KupCombobox = class {
|
|
|
7183
7183
|
* Sets the focus to the component.
|
|
7184
7184
|
*/
|
|
7185
7185
|
async setFocus() {
|
|
7186
|
-
__classPrivateFieldGet$
|
|
7186
|
+
__classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7187
7187
|
}
|
|
7188
7188
|
/**
|
|
7189
7189
|
* Sets the props to the component.
|
|
@@ -7197,14 +7197,14 @@ const KupCombobox = class {
|
|
|
7197
7197
|
* @param {string} value - Value to be set.
|
|
7198
7198
|
*/
|
|
7199
7199
|
async setValue(value) {
|
|
7200
|
-
__classPrivateFieldGet$
|
|
7200
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7201
7201
|
}
|
|
7202
7202
|
/*-------------------------------------------------*/
|
|
7203
7203
|
/* L i f e c y c l e H o o k s */
|
|
7204
7204
|
/*-------------------------------------------------*/
|
|
7205
7205
|
componentWillLoad() {
|
|
7206
|
-
__classPrivateFieldGet$
|
|
7207
|
-
__classPrivateFieldGet$
|
|
7206
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").debug.logLoad(this, false);
|
|
7207
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").theme.register(this);
|
|
7208
7208
|
this.value = this.initialValue;
|
|
7209
7209
|
if (!this.data) {
|
|
7210
7210
|
this.data = {
|
|
@@ -7214,11 +7214,11 @@ const KupCombobox = class {
|
|
|
7214
7214
|
}
|
|
7215
7215
|
}
|
|
7216
7216
|
componentDidLoad() {
|
|
7217
|
-
__classPrivateFieldGet$
|
|
7218
|
-
__classPrivateFieldGet$
|
|
7217
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, this.value, true);
|
|
7218
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").debug.logLoad(this, true);
|
|
7219
7219
|
}
|
|
7220
7220
|
componentWillRender() {
|
|
7221
|
-
__classPrivateFieldGet$
|
|
7221
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").debug.logRender(this, false);
|
|
7222
7222
|
}
|
|
7223
7223
|
componentDidRender() {
|
|
7224
7224
|
const root = this.rootElement.shadowRoot;
|
|
@@ -7230,21 +7230,21 @@ const KupCombobox = class {
|
|
|
7230
7230
|
fTextFieldMdc.FTextFieldMDC(f);
|
|
7231
7231
|
}
|
|
7232
7232
|
}
|
|
7233
|
-
__classPrivateFieldGet$
|
|
7233
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").debug.logRender(this, true);
|
|
7234
7234
|
}
|
|
7235
7235
|
render() {
|
|
7236
7236
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
7237
7237
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
7238
|
-
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$
|
|
7238
|
+
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$5(this, _KupCombobox_elStyle, "f") }, index.h("style", null, __classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$5(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
|
|
7239
7239
|
? kupManager.KupThemeIconValues.DROPDOWN
|
|
7240
|
-
: 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$
|
|
7240
|
+
: 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$5(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
7241
7241
|
}
|
|
7242
7242
|
disconnectedCallback() {
|
|
7243
|
-
if (__classPrivateFieldGet$
|
|
7244
|
-
__classPrivateFieldGet$
|
|
7245
|
-
__classPrivateFieldGet$
|
|
7243
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f")) {
|
|
7244
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f")]);
|
|
7245
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").remove();
|
|
7246
7246
|
}
|
|
7247
|
-
__classPrivateFieldGet$
|
|
7247
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").theme.unregister(this);
|
|
7248
7248
|
}
|
|
7249
7249
|
get rootElement() { return index.getElement(this); }
|
|
7250
7250
|
static get watchers() { return {
|
|
@@ -7252,54 +7252,54 @@ const KupCombobox = class {
|
|
|
7252
7252
|
}; }
|
|
7253
7253
|
};
|
|
7254
7254
|
_KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _KupCombobox_listEl = new WeakMap(), _KupCombobox_textfieldWrapper = new WeakMap(), _KupCombobox_textfieldEl = new WeakMap(), _KupCombobox_clickCb = new WeakMap(), _KupCombobox_instances = new WeakSet(), _KupCombobox_openList = function _KupCombobox_openList() {
|
|
7255
|
-
if (__classPrivateFieldGet$
|
|
7255
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7256
7256
|
return;
|
|
7257
7257
|
}
|
|
7258
|
-
__classPrivateFieldGet$
|
|
7259
|
-
__classPrivateFieldGet$
|
|
7260
|
-
__classPrivateFieldGet$
|
|
7261
|
-
const elStyle = __classPrivateFieldGet$
|
|
7258
|
+
__classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").classList.add('toggled');
|
|
7259
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").menuVisible = true;
|
|
7260
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").filter = '';
|
|
7261
|
+
const elStyle = __classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").style;
|
|
7262
7262
|
elStyle.height = 'auto';
|
|
7263
|
-
elStyle.minWidth = __classPrivateFieldGet$
|
|
7264
|
-
if (__classPrivateFieldGet$
|
|
7265
|
-
__classPrivateFieldGet$
|
|
7263
|
+
elStyle.minWidth = __classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").clientWidth + 'px';
|
|
7264
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"))) {
|
|
7265
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"), __classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f"));
|
|
7266
7266
|
}
|
|
7267
7267
|
else {
|
|
7268
|
-
__classPrivateFieldGet$
|
|
7268
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"), __classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f"), 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
7269
7269
|
}
|
|
7270
|
-
__classPrivateFieldGet$
|
|
7271
|
-
if (!__classPrivateFieldGet$
|
|
7270
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"));
|
|
7271
|
+
if (!__classPrivateFieldGet$5(this, _KupCombobox_clickCb, "f")) {
|
|
7272
7272
|
__classPrivateFieldSet$3(this, _KupCombobox_clickCb, {
|
|
7273
7273
|
cb: () => {
|
|
7274
|
-
__classPrivateFieldGet$
|
|
7274
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7275
7275
|
},
|
|
7276
|
-
el: __classPrivateFieldGet$
|
|
7276
|
+
el: __classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"),
|
|
7277
7277
|
}, "f");
|
|
7278
7278
|
}
|
|
7279
|
-
__classPrivateFieldGet$
|
|
7279
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").addClickCallback(__classPrivateFieldGet$5(this, _KupCombobox_clickCb, "f"), true);
|
|
7280
7280
|
}, _KupCombobox_closeList = function _KupCombobox_closeList() {
|
|
7281
|
-
__classPrivateFieldGet$
|
|
7282
|
-
__classPrivateFieldGet$
|
|
7283
|
-
__classPrivateFieldGet$
|
|
7284
|
-
__classPrivateFieldGet$
|
|
7281
|
+
__classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").classList.remove('toggled');
|
|
7282
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").menuVisible = false;
|
|
7283
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"));
|
|
7284
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$5(this, _KupCombobox_clickCb, "f"));
|
|
7285
7285
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
7286
|
-
return __classPrivateFieldGet$
|
|
7286
|
+
return __classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
7287
7287
|
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, setValue) {
|
|
7288
|
-
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$
|
|
7288
|
+
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
7289
7289
|
if (ret.exists) {
|
|
7290
7290
|
if (setValue) {
|
|
7291
7291
|
this.value = ret.value;
|
|
7292
7292
|
this.displayedValue = ret.displayedValue;
|
|
7293
7293
|
}
|
|
7294
|
-
if (__classPrivateFieldGet$
|
|
7295
|
-
__classPrivateFieldGet$
|
|
7294
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f") != null) {
|
|
7295
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7296
7296
|
}
|
|
7297
7297
|
}
|
|
7298
7298
|
else {
|
|
7299
7299
|
this.value = idIn;
|
|
7300
7300
|
this.displayedValue = idIn;
|
|
7301
|
-
if (__classPrivateFieldGet$
|
|
7302
|
-
__classPrivateFieldGet$
|
|
7301
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f") != null) {
|
|
7302
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7303
7303
|
}
|
|
7304
7304
|
}
|
|
7305
7305
|
return ret;
|
|
@@ -7314,8 +7314,8 @@ class KupDataTableState {
|
|
|
7314
7314
|
this.expandGroups = false;
|
|
7315
7315
|
this.groupLabelDisplay = kupManager.GroupLabelDisplayMode.BOTH;
|
|
7316
7316
|
this.density = 'small';
|
|
7317
|
-
this.enableSortableColumns = false;
|
|
7318
7317
|
this.enableExtraColumns = true;
|
|
7318
|
+
this.enableSortableColumns = false;
|
|
7319
7319
|
this.forceOneLine = false;
|
|
7320
7320
|
this.globalFilter = false;
|
|
7321
7321
|
this.globalFilterValue = '';
|
|
@@ -8085,7 +8085,7 @@ class KupColumnMenu {
|
|
|
8085
8085
|
|
|
8086
8086
|
const kupDataTableCss = ":host{--kup_datatable_background_color:var(\n --kup-datatable-background-color,\n var(--kup-background-color)\n );--kup_datatable_border:var(\n --kup-datatable-border,\n 1px solid var(--kup-border-color)\n );--kup_datatable_color:var(--kup-datatable-color, var(--kup-text-color));--kup_datatable_font_family:var(\n --kup-datatable-font-family,\n var(--kup-font-family)\n );--kup_datatable_font_family_monospace:var(\n --kup-datatable-font-family-monospace,\n var(--kup-font-family-monospace)\n );--kup_datatable_font_size:var(\n --kup-datatable-font-size,\n var(--kup-font-size)\n );--kup_datatable_th_border:var(\n --kup-datatable-th-border,\n 1px solid var(--kup-border-color)\n );--kup_datatable_th_resize_handle_width:var(\n --kup-datatable-th-resize-handle-width,\n 3px\n );display:block;font-family:var(--kup_datatable_font_family);font-size:var(--kup_datatable_font_size);position:relative}:host([kup-toolbar]) .settings-trigger{height:12px}:host([kup-toolbar]) .customize-panel{visibility:visible}:host([force-one-line]) .f-cell__text{white-space:nowrap}table{background-color:var(--kup_datatable_background_color);border-spacing:0;border-collapse:separate;color:var(--kup_datatable_color);min-width:intrinsic;min-width:-moz-max-content;min-width:-webkit-max-content;text-align:left;width:100%}table.auto-width{min-width:auto;width:0}table>tbody>tr.focus td:first-of-type,table>tbody>tr[kup-drag-over] td:first-of-type{box-shadow:inset 4px 0px 0px 0px var(--kup-secondary-color)}table>tbody>tr>td:first-of-type,table>tbody>tr>td.placeholder~td:not(.placeholder){border-left:var(--kup_datatable_border)}table>tbody>tr>td:last-of-type{border-right:var(--kup_datatable_border)}table>tbody>tr:last-of-type>td{border-bottom:var(--kup_datatable_border)}table.border-top>tbody>tr:first-of-type>td{border-top:var(--kup_datatable_border)}table.row-separation>tbody>tr>td{border-bottom:var(--kup_datatable_border)}table.column-separation>tbody>tr>td{border-right:var(--kup_datatable_border)}table.noGrid,table.noGrid td{border:none}table tfoot td{border-bottom:var(--kup_datatable_border);border-right:var(--kup_datatable_border);box-sizing:border-box;height:36px;text-align:right;font-weight:bold;padding:0.5em 0.3125em}table tfoot td:hover{background-color:var(--kup_datatable_background_color)}table tfoot td:first-of-type{border-left:var(--kup_datatable_border)}#global-filter{margin:0.5em 0px;min-width:140px;width:100%}.kup-icon:not(.f-image){background-color:var(--kup-title-color);margin:0 0.25em;height:1.25em;width:1.25em}.kup-icon:not(.f-image).kup-ascending-icon,.kup-icon:not(.f-image).kup-descending-icon,.kup-icon:not(.f-image).kup-key-icon,.kup-icon:not(.f-image).kup-filter-remove-icon{height:auto}.kup-icon:not(.f-image).kup-collapsed-icon,.kup-icon:not(.f-image).kup-expanded-icon{float:left}.kup-icon:not(.f-image).kup-filter-remove-icon,.kup-icon:not(.f-image).kup-key-icon{margin:0 0.25em}.below-wrapper{backface-visibility:hidden;height:auto;overflow:auto}.below-wrapper.custom-size{overflow:unset}.below-wrapper:not(.custom-size){overflow-x:auto}.density-dense tbody>tr.group td{padding-top:0.25em;padding-bottom:0.25em}.density-wide tbody>tr.group>td{padding-top:0.75em;padding-bottom:0.75em}.fontsize-small{font-size:calc(var(--kup_datatable_font_size) * 0.75);transition:font-size 0.1s}.fontsize-small .group-cell-content>span:before{font-size:calc(var(--kup_datatable_font_size) * 1) !important}.fontsize-big{font-size:calc(var(--kup_datatable_font_size) * 1.25);transition:font-size 0.1s}.fontsize-big .group-cell-content>span:before{font-size:calc(var(--kup_datatable_font_size) * 1.5) !important}th{background-color:var(--kup-title-background-color);border:var(--kup_datatable_th_border);border-left:0 none;border-bottom-width:2px;box-sizing:border-box;top:0;touch-action:none;transition:background-color 0.25s ease;user-select:none}th:first-of-type{border-left:var(--kup_datatable_th_border)}.header-cell__content{color:var(--kup-title-color);display:flex;justify-content:space-between;padding:0.5em 0.3125em;text-overflow:ellipsis;white-space:nowrap}.header-cell--centered .header-cell__content{justify-content:center}.header-cell--is-number .header-cell__content{justify-content:flex-end}.header-cell__title{overflow:hidden;text-overflow:ellipsis;user-select:none}.header-cell__icons{display:flex}.header-cell__drag-handler{background:rgba(var(--kup-title-color-rgb), 0.25);height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:var(--kup_datatable_th_resize_handle_width)}.header-cell__drag-handler:hover{background:rgba(var(--kup-title-color-rgb), 0.5)}.header-cell--sortable{cursor:pointer}.header-cell--is-icon{width:30px}tbody{cursor:auto}tbody td{height:0;padding:0}tbody td>*{border:none !important}tbody tr kup-button{max-width:max-content}tbody tr[kup-draggable]{opacity:0.5}tbody tr.selected td{background-color:rgba(var(--kup-primary-color-rgb), 0.175)}tbody tr:hover:not(.group):not(.selected) td{color:var(--kup-hover-color);background-color:var(--kup-hover-background-color)}tbody tr.group{background:var(--kup-title-background-color);border-top:var(--kup_datatable_border);color:var(--kup-title-color);font-weight:bold;cursor:pointer}tbody tr.group.group-label{border-bottom:none}tbody tr.group.group-total{border-top:none;line-height:0.5em}tbody tr.group>td{padding:0.5em 0}tbody tr.group>td .group-cell-content .indent{float:left;margin-left:0.25em}tbody tr.group>td .group-cell-content>span{display:inline-flex;outline:none;margin-left:0.25em}tbody tr.group>td.total{text-align:right;padding:0.5em 0.3125em}tbody tr.group>td.total.negative-number{color:var(--kup-danger-color)}tbody tr>td{box-sizing:border-box;transition:box-shadow 0.1s}tbody tr>td .row-expander{margin-right:0.5em}tbody tr>td .row-action{margin-right:0.2em}tbody tr [row-select-cell]{min-height:40px}tbody tr td[row-action-cell]{width:calc(3em * var(--kup_datatable_row_actions))}tbody tr td[row-action-cell] .f-image{cursor:pointer;margin-left:0.75em;display:inline-block;opacity:1;transition:0.25s ease-in-out}tbody tr td[row-action-cell] .f-image:hover{opacity:0.5}.above-wrapper{display:flex;width:100%}.kup-icon.overlay-action{display:none;position:absolute;top:0.5em;left:calc(50% - 0.625em)}th:hover .kup-icon.overlay-action{display:block}thead th{position:relative}th.obj:hover span:not(.overlay-action){opacity:0.5}.hidden span{color:transparent;position:relative;text-overflow:ellipsis;transition:color 200ms}.hidden span:hover{color:var(--kup_datatable_color)}.group-wrapper{--kup-chip-margin:0 4px}.totals-value{font-weight:bold}.settings-trigger{cursor:pointer;display:block;width:32px;height:0;border-top-left-radius:25px 30px;border-top-right-radius:25px 30px;background-color:var(--kup-border-color);transition:height 0.25s}.settings-trigger.toggled{background-color:var(--kup-primary-color)}.settings-trigger.toggled .f-image__icon{background:var(--kup-text-on-primary-color) !important}.indent{display:inline-block;height:1em;width:2em}.indent~kup-image,.indent~kup-button{margin:0;vertical-align:middle}.indent~kup-image{display:inline-block}.indent~kup-button,.indent~kup-checkbox{display:inline-block}.actions-wrapper{display:flex}.insert-button,.delete-button,.save-button{padding:1em 0.5em}.kup-icon.kup-ascending-icon{-webkit-mask:var(--kup-ascending-icon);mask:var(--kup-ascending-icon)}.kup-icon.kup-collapsed-icon{-webkit-mask:var(--kup-collapsed-icon);mask:var(--kup-collapsed-icon)}.kup-icon.kup-descending-icon{-webkit-mask:var(--kup-descending-icon);mask:var(--kup-descending-icon)}.kup-icon.kup-expanded-icon{-webkit-mask:var(--kup-expanded-icon);mask:var(--kup-expanded-icon)}.kup-icon.kup-filter-remove-icon{-webkit-mask:var(--kup-filter-remove-icon);mask:var(--kup-filter-remove-icon)}.kup-icon.kup-key-icon{-webkit-mask:var(--kup-key-icon);mask:var(--kup-key-icon)}.paginator-wrapper{display:flex;flex-flow:wrap;min-width:max-content}.paginator-tabs{width:100%}.paginator-tabs kup-paginator{display:inline-flex}.paginator-tabs kup-button{position:relative;height:100%;margin-left:0.25em;float:right}.paginator-tabs .load-more-button{margin:0.5em 0px 0px}sticky-header{display:none}.persistent-header~sticky-header{background:var(--kup-title-background-color);border-bottom:2px solid var(--kup-border-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);color:var(--kup-title-color);display:block;opacity:0;overflow:hidden;pointer-events:none;position:fixed;top:0;transition:opacity 0.25s ease-in-out;z-index:10}.persistent-header~sticky-header.activated{opacity:1;pointer-events:all}.persistent-header~sticky-header[hidden]{display:none}.persistent-header~sticky-header tr-sticky{display:inline-flex}.persistent-header~sticky-header th-sticky{box-sizing:border-box;display:inline-flex;padding:0 0.3125em}.persistent-header~sticky-header th-sticky .header-cell__content{width:100%}.fixed-column,.fixed-row{background-color:var(--kup_datatable_background_color);color:var(--kup-text-color);position:sticky}thead .fixed-column,thead .fixed-row,tfoot .fixed-column,tfoot .fixed-row{z-index:10}table.custom-size th{position:sticky;top:0;z-index:10}table.custom-size th.fixed-column{z-index:11}tr:hover .fixed-row,tr:hover .fixed-column{color:var(--kup-hover-color);background-color:var(--kup-hover-background-color)}tr.selected .fixed-column,tr.selected .fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-primary-color-rgb), 0.175) 0%, rgba(var(--kup-primary-color-rgb), 0.175) 0.1%, rgba(var(--kup-primary-color-rgb), 0.175))}.fixed-row{top:0;z-index:4}.fixed-column{left:0;z-index:6}.fixed-column.fixed-row{z-index:8}thead tr .fixed-column,thead tr:hover:not(.group):not(.selected) .fixed-column{background-color:var(--kup-title-background-color);color:var(--kup-title-color)}tfoot tr:hover:not(.group):not(.selected) .fixed-row,tfoot tr:hover:not(.group):not(.selected) .fixed-column{color:var(--kup-text-color);background-color:var(--kup_datatable_background_color)}:host([drag-enabled]) tr{touch-action:none}th[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}th[kup-draggable]{cursor:grabbing !important;opacity:0.5}.droparea{animation:fade-in 0.25s ease-out;background:var(--kup_datatable_background_color);border-radius:8px;box-shadow:var(--kup-box-shadow);display:none;padding:1em 0.5em}.droparea--visible{display:flex}.droparea__groups{border:2px dashed var(--kup-text-color)}.droparea__remove{border:2px dashed var(--kup-danger-color)}.droparea__groups,.droparea__remove{background:var(--kup_datatable_background_color);box-shadow:var(--kup-box-shadow);display:block;height:50px;margin:0 0.5em;opacity:0.5;position:relative;transition:opacity 0.25s;width:50px}.droparea__groups .f-image,.droparea__remove .f-image{width:100%;position:absolute}.droparea__groups .f-image:first-of-type,.droparea__remove .f-image:first-of-type{opacity:1}.droparea__groups .f-image:last-of-type,.droparea__remove .f-image:last-of-type{opacity:0}.droparea__groups[kup-drag-over],.droparea__remove[kup-drag-over]{opacity:1}.droparea__groups[kup-drag-over] .f-image:first-of-type,.droparea__remove[kup-drag-over] .f-image:first-of-type{opacity:0}.droparea__groups[kup-drag-over] .f-image:last-of-type,.droparea__remove[kup-drag-over] .f-image:last-of-type{opacity:1}:host(.kup-cross-selection) #kup-component th.selected{box-shadow:inset 0px 4px 0px 0px var(--kup-secondary-color)}:host(.kup-cross-selection) #kup-component td.selected{background-color:rgba(var(--kup-text-color-rgb), 0.075)}:host(.kup-cross-selection) #kup-component td.selected.fixed-column,:host(.kup-cross-selection) #kup-component td.selected.fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.075) 0%, rgba(var(--kup-text-color-rgb), 0.075) 0.1%, rgba(var(--kup-text-color-rgb), 0.075))}:host(.kup-cross-selection) #kup-component tr.selected td{background-color:rgba(var(--kup-text-color-rgb), 0.075)}:host(.kup-cross-selection) #kup-component tr.selected td:first-of-type{box-shadow:inset 4px 0px 0px 0px var(--kup-secondary-color)}:host(.kup-cross-selection) #kup-component tr.selected td.selected{background-color:rgba(var(--kup-text-color-rgb), 0.15)}:host(.kup-cross-selection) #kup-component tr.selected td.fixed-column,:host(.kup-cross-selection) #kup-component tr.selected td.fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.075) 0%, rgba(var(--kup-text-color-rgb), 0.075) 0.1%, rgba(var(--kup-text-color-rgb), 0.075))}:host(.kup-cross-selection) #kup-component tr.selected td.fixed-column.selected,:host(.kup-cross-selection) #kup-component tr.selected td.fixed-row.selected{background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.15) 0%, rgba(var(--kup-text-color-rgb), 0.15) 0.1%, rgba(var(--kup-text-color-rgb), 0.15))}:host(.kup-layout-fixed) #kup-component table{table-layout:fixed;width:100%}tr.clickable{cursor:pointer}";
|
|
8087
8087
|
|
|
8088
|
-
var __classPrivateFieldGet$
|
|
8088
|
+
var __classPrivateFieldGet$4 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8089
8089
|
if (kind === "a" && !f)
|
|
8090
8090
|
throw new TypeError("Private accessor was defined without a getter");
|
|
8091
8091
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -8197,18 +8197,18 @@ const KupDataTable = class {
|
|
|
8197
8197
|
_KupDataTable_MESSAGE_WRAPPER_ID.set(this, 'messageWrapper');
|
|
8198
8198
|
_KupDataTable_INSERT_PREFIX.set(this, 'insert_');
|
|
8199
8199
|
_KupDataTable_stickyHeaderPosition.set(this, () => {
|
|
8200
|
-
if (__classPrivateFieldGet$
|
|
8201
|
-
if (__classPrivateFieldGet$
|
|
8202
|
-
if (!__classPrivateFieldGet$
|
|
8203
|
-
__classPrivateFieldGet$
|
|
8204
|
-
__classPrivateFieldGet$
|
|
8200
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f")) {
|
|
8201
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_tableIntersecting, "f")) {
|
|
8202
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_theadIntersecting, "f")) {
|
|
8203
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_updateStickyHeaderSize).call(this);
|
|
8204
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").classList.add('activated');
|
|
8205
8205
|
}
|
|
8206
8206
|
else {
|
|
8207
|
-
__classPrivateFieldGet$
|
|
8207
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").classList.remove('activated');
|
|
8208
8208
|
}
|
|
8209
8209
|
}
|
|
8210
8210
|
else {
|
|
8211
|
-
__classPrivateFieldGet$
|
|
8211
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").classList.remove('activated');
|
|
8212
8212
|
}
|
|
8213
8213
|
}
|
|
8214
8214
|
});
|
|
@@ -8302,7 +8302,7 @@ const KupDataTable = class {
|
|
|
8302
8302
|
if (this.store && this.stateId) {
|
|
8303
8303
|
const state = this.store.getState(this.stateId);
|
|
8304
8304
|
if (state != null) {
|
|
8305
|
-
__classPrivateFieldGet$
|
|
8305
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Initializing stateId ' + this.stateId);
|
|
8306
8306
|
// *** PROPS ***
|
|
8307
8307
|
this.filters = Object.assign({}, state.filters);
|
|
8308
8308
|
this.groups = [...state.groups];
|
|
@@ -8338,116 +8338,116 @@ const KupDataTable = class {
|
|
|
8338
8338
|
persistState() {
|
|
8339
8339
|
if (this.store && this.stateId) {
|
|
8340
8340
|
let somethingChanged = false;
|
|
8341
|
-
if (!__classPrivateFieldGet$
|
|
8341
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.filters, this.filters)) {
|
|
8342
8342
|
this.state.filters = Object.assign({}, this.filters);
|
|
8343
8343
|
somethingChanged = true;
|
|
8344
8344
|
}
|
|
8345
|
-
if (!__classPrivateFieldGet$
|
|
8345
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.groups, this.groups)) {
|
|
8346
8346
|
this.state.groups = [...this.groups];
|
|
8347
8347
|
somethingChanged = true;
|
|
8348
8348
|
}
|
|
8349
|
-
if (!__classPrivateFieldGet$
|
|
8349
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sort, this.sort)) {
|
|
8350
8350
|
this.state.sort = [...this.sort];
|
|
8351
8351
|
somethingChanged = true;
|
|
8352
8352
|
}
|
|
8353
|
-
if (!__classPrivateFieldGet$
|
|
8353
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.expandGroups, this.expandGroups)) {
|
|
8354
8354
|
this.state.expandGroups = this.expandGroups;
|
|
8355
8355
|
somethingChanged = true;
|
|
8356
8356
|
}
|
|
8357
|
-
if (!__classPrivateFieldGet$
|
|
8357
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.groupLabelDisplay, this.groupLabelDisplay)) {
|
|
8358
8358
|
this.state.groupLabelDisplay = this.groupLabelDisplay;
|
|
8359
8359
|
somethingChanged = true;
|
|
8360
8360
|
}
|
|
8361
|
-
if (!__classPrivateFieldGet$
|
|
8361
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.density, this.density)) {
|
|
8362
8362
|
this.state.density = this.density;
|
|
8363
8363
|
somethingChanged = true;
|
|
8364
8364
|
}
|
|
8365
|
-
if (!__classPrivateFieldGet$
|
|
8365
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.enableExtraColumns, this.enableExtraColumns)) {
|
|
8366
8366
|
this.state.enableExtraColumns = this.enableExtraColumns;
|
|
8367
8367
|
somethingChanged = true;
|
|
8368
8368
|
}
|
|
8369
|
-
if (!__classPrivateFieldGet$
|
|
8369
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.enableSortableColumns, this.enableSortableColumns)) {
|
|
8370
8370
|
this.state.enableSortableColumns = this.enableSortableColumns;
|
|
8371
8371
|
somethingChanged = true;
|
|
8372
8372
|
}
|
|
8373
|
-
if (!__classPrivateFieldGet$
|
|
8373
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.forceOneLine, this.forceOneLine)) {
|
|
8374
8374
|
this.state.forceOneLine = this.forceOneLine;
|
|
8375
8375
|
somethingChanged = true;
|
|
8376
8376
|
}
|
|
8377
|
-
if (!__classPrivateFieldGet$
|
|
8377
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.globalFilter, this.globalFilter)) {
|
|
8378
8378
|
this.state.globalFilter = this.globalFilter;
|
|
8379
8379
|
somethingChanged = true;
|
|
8380
8380
|
}
|
|
8381
|
-
if (!__classPrivateFieldGet$
|
|
8381
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
8382
8382
|
this.state.globalFilterValue = this.globalFilterValue;
|
|
8383
8383
|
somethingChanged = true;
|
|
8384
8384
|
}
|
|
8385
|
-
if (!__classPrivateFieldGet$
|
|
8385
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.headerIsPersistent, this.headerIsPersistent)) {
|
|
8386
8386
|
this.state.headerIsPersistent = this.headerIsPersistent;
|
|
8387
8387
|
somethingChanged = true;
|
|
8388
8388
|
}
|
|
8389
|
-
if (!__classPrivateFieldGet$
|
|
8389
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.lazyLoadRows, this.lazyLoadRows)) {
|
|
8390
8390
|
this.state.lazyLoadRows = this.lazyLoadRows;
|
|
8391
8391
|
somethingChanged = true;
|
|
8392
8392
|
}
|
|
8393
|
-
if (!__classPrivateFieldGet$
|
|
8393
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.loadMoreLimit, this.loadMoreLimit)) {
|
|
8394
8394
|
this.state.loadMoreLimit = this.loadMoreLimit;
|
|
8395
8395
|
somethingChanged = true;
|
|
8396
8396
|
}
|
|
8397
|
-
if (!__classPrivateFieldGet$
|
|
8397
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.selection, this.selection)) {
|
|
8398
8398
|
this.state.selection = this.selection;
|
|
8399
8399
|
somethingChanged = true;
|
|
8400
8400
|
}
|
|
8401
|
-
if (!__classPrivateFieldGet$
|
|
8401
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
|
|
8402
8402
|
this.state.rowsPerPage = this.currentRowsPerPage;
|
|
8403
8403
|
somethingChanged = true;
|
|
8404
8404
|
}
|
|
8405
|
-
if (!__classPrivateFieldGet$
|
|
8405
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showFilters, this.showFilters)) {
|
|
8406
8406
|
this.state.showFilters = this.showFilters;
|
|
8407
8407
|
somethingChanged = true;
|
|
8408
8408
|
}
|
|
8409
|
-
if (!__classPrivateFieldGet$
|
|
8409
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showGroups, this.showGroups)) {
|
|
8410
8410
|
this.state.showGroups = this.showGroups;
|
|
8411
8411
|
somethingChanged = true;
|
|
8412
8412
|
}
|
|
8413
|
-
if (!__classPrivateFieldGet$
|
|
8413
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showHeader, this.showHeader)) {
|
|
8414
8414
|
this.state.showHeader = this.showHeader;
|
|
8415
8415
|
somethingChanged = true;
|
|
8416
8416
|
}
|
|
8417
|
-
if (!__classPrivateFieldGet$
|
|
8417
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showLoadMore, this.showLoadMore)) {
|
|
8418
8418
|
this.state.showLoadMore = this.showLoadMore;
|
|
8419
8419
|
somethingChanged = true;
|
|
8420
8420
|
}
|
|
8421
|
-
if (!__classPrivateFieldGet$
|
|
8421
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sortEnabled, this.sortEnabled)) {
|
|
8422
8422
|
this.state.sortEnabled = this.sortEnabled;
|
|
8423
8423
|
somethingChanged = true;
|
|
8424
8424
|
}
|
|
8425
|
-
if (!__classPrivateFieldGet$
|
|
8425
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sortableColumnsMutateData, this.sortableColumnsMutateData)) {
|
|
8426
8426
|
this.state.sortableColumnsMutateData =
|
|
8427
8427
|
this.sortableColumnsMutateData;
|
|
8428
8428
|
somethingChanged = true;
|
|
8429
8429
|
}
|
|
8430
|
-
if (!__classPrivateFieldGet$
|
|
8430
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.pageSelected, this.currentPage)) {
|
|
8431
8431
|
this.state.pageSelected = this.currentPage;
|
|
8432
8432
|
somethingChanged = true;
|
|
8433
8433
|
}
|
|
8434
|
-
if (!__classPrivateFieldGet$
|
|
8434
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.dragEnabled, this.dragEnabled)) {
|
|
8435
8435
|
this.state.dragEnabled = this.dragEnabled;
|
|
8436
8436
|
somethingChanged = true;
|
|
8437
8437
|
}
|
|
8438
|
-
if (!__classPrivateFieldGet$
|
|
8438
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.dropEnabled, this.dropEnabled)) {
|
|
8439
8439
|
this.state.dropEnabled = this.dropEnabled;
|
|
8440
8440
|
somethingChanged = true;
|
|
8441
8441
|
}
|
|
8442
|
-
if (!__classPrivateFieldGet$
|
|
8442
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showFooter, this.showFooter)) {
|
|
8443
8443
|
this.state.showFooter = this.showFooter;
|
|
8444
8444
|
somethingChanged = true;
|
|
8445
8445
|
}
|
|
8446
|
-
if (!__classPrivateFieldGet$
|
|
8446
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.totals, this.totals)) {
|
|
8447
8447
|
this.state.totals = Object.assign({}, this.totals);
|
|
8448
8448
|
somethingChanged = true;
|
|
8449
8449
|
}
|
|
8450
|
-
if (!__classPrivateFieldGet$
|
|
8450
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.selectRowsById, this.selectedRows.reduce((accumulator, row, currentIndex) => {
|
|
8451
8451
|
const prefix = currentIndex > 0 ? ';' : '';
|
|
8452
8452
|
return accumulator + prefix + row.id;
|
|
8453
8453
|
}, ''))) {
|
|
@@ -8462,7 +8462,7 @@ const KupDataTable = class {
|
|
|
8462
8462
|
return;
|
|
8463
8463
|
}
|
|
8464
8464
|
if (somethingChanged) {
|
|
8465
|
-
__classPrivateFieldGet$
|
|
8465
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
|
|
8466
8466
|
this.store.persistState(this.stateId, this.state);
|
|
8467
8467
|
}
|
|
8468
8468
|
}
|
|
@@ -8471,33 +8471,33 @@ const KupDataTable = class {
|
|
|
8471
8471
|
this.currentRowsPerPage = newValue;
|
|
8472
8472
|
}
|
|
8473
8473
|
expandGroupsHandler() {
|
|
8474
|
-
if (!__classPrivateFieldGet$
|
|
8474
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_isRestoringState, "f")) {
|
|
8475
8475
|
this.recalculateRows();
|
|
8476
8476
|
// reset group state
|
|
8477
8477
|
this.groupState = {};
|
|
8478
|
-
__classPrivateFieldGet$
|
|
8478
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_forceGroupExpansion).call(this);
|
|
8479
8479
|
}
|
|
8480
8480
|
}
|
|
8481
8481
|
filtersChanged() {
|
|
8482
8482
|
this.expandGroupsHandler();
|
|
8483
8483
|
}
|
|
8484
8484
|
recalculateRows() {
|
|
8485
|
-
if (!__classPrivateFieldGet$
|
|
8486
|
-
__classPrivateFieldGet$
|
|
8485
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_isRestoringState, "f")) {
|
|
8486
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
8487
8487
|
}
|
|
8488
8488
|
}
|
|
8489
8489
|
identifyAndInitRows() {
|
|
8490
8490
|
kupManager.identify(this.getRows());
|
|
8491
8491
|
this.expandGroupsHandler();
|
|
8492
|
-
__classPrivateFieldGet$
|
|
8492
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8493
8493
|
}
|
|
8494
8494
|
recalculateRowsAndUndoSelections() {
|
|
8495
|
-
if (!__classPrivateFieldGet$
|
|
8495
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_isRestoringState, "f")) {
|
|
8496
8496
|
this.recalculateRows();
|
|
8497
8497
|
// reset group state
|
|
8498
8498
|
this.groupState = {};
|
|
8499
|
-
__classPrivateFieldGet$
|
|
8500
|
-
__classPrivateFieldGet$
|
|
8499
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_forceGroupExpansion).call(this);
|
|
8500
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8501
8501
|
}
|
|
8502
8502
|
}
|
|
8503
8503
|
controlFixedRowsColumns() {
|
|
@@ -8513,8 +8513,8 @@ const KupDataTable = class {
|
|
|
8513
8513
|
}
|
|
8514
8514
|
}
|
|
8515
8515
|
recalculateData() {
|
|
8516
|
-
if (__classPrivateFieldGet$
|
|
8517
|
-
__classPrivateFieldGet$
|
|
8516
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_initialized, "f")) {
|
|
8517
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_calculateData).call(this);
|
|
8518
8518
|
}
|
|
8519
8519
|
}
|
|
8520
8520
|
/**
|
|
@@ -8522,14 +8522,14 @@ const KupDataTable = class {
|
|
|
8522
8522
|
*/
|
|
8523
8523
|
async closeColumnMenu() {
|
|
8524
8524
|
this.columnMenuAnchor = null;
|
|
8525
|
-
if (__classPrivateFieldGet$
|
|
8526
|
-
__classPrivateFieldGet$
|
|
8525
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f")) {
|
|
8526
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").data = null;
|
|
8527
8527
|
}
|
|
8528
|
-
__classPrivateFieldGet$
|
|
8528
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").close(__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"));
|
|
8529
8529
|
this.kupDataTableColumnMenu.emit({
|
|
8530
8530
|
comp: this,
|
|
8531
8531
|
id: this.rootElement.id,
|
|
8532
|
-
card: __classPrivateFieldGet$
|
|
8532
|
+
card: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"),
|
|
8533
8533
|
event: null,
|
|
8534
8534
|
open: false,
|
|
8535
8535
|
});
|
|
@@ -8572,8 +8572,8 @@ const KupDataTable = class {
|
|
|
8572
8572
|
* Closes the insert new record card (called by backend, on success)
|
|
8573
8573
|
*/
|
|
8574
8574
|
async closeInsertCard() {
|
|
8575
|
-
if (__classPrivateFieldGet$
|
|
8576
|
-
__classPrivateFieldGet$
|
|
8575
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f")) {
|
|
8576
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").remove();
|
|
8577
8577
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, null, "f");
|
|
8578
8578
|
}
|
|
8579
8579
|
}
|
|
@@ -8581,8 +8581,8 @@ const KupDataTable = class {
|
|
|
8581
8581
|
* Closes the delete confirm card (called by backend, on success)
|
|
8582
8582
|
*/
|
|
8583
8583
|
async closeConfirmDeleteCard() {
|
|
8584
|
-
if (__classPrivateFieldGet$
|
|
8585
|
-
__classPrivateFieldGet$
|
|
8584
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteDialog, "f")) {
|
|
8585
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteDialog, "f").close();
|
|
8586
8586
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteCard, null, "f");
|
|
8587
8587
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteDialog, null, "f");
|
|
8588
8588
|
}
|
|
@@ -8592,23 +8592,23 @@ const KupDataTable = class {
|
|
|
8592
8592
|
*/
|
|
8593
8593
|
async getCards() {
|
|
8594
8594
|
const obj = {};
|
|
8595
|
-
if (__classPrivateFieldGet$
|
|
8595
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f")) {
|
|
8596
8596
|
obj['insertCard'] = {
|
|
8597
|
-
el: __classPrivateFieldGet$
|
|
8598
|
-
messageWrapper: __classPrivateFieldGet$
|
|
8599
|
-
message: __classPrivateFieldGet$
|
|
8600
|
-
submitButton: __classPrivateFieldGet$
|
|
8601
|
-
cancelButton: __classPrivateFieldGet$
|
|
8602
|
-
form: __classPrivateFieldGet$
|
|
8597
|
+
el: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f"),
|
|
8598
|
+
messageWrapper: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f")),
|
|
8599
|
+
message: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_ID, "f")),
|
|
8600
|
+
submitButton: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_SUBMIT_ID, "f")),
|
|
8601
|
+
cancelButton: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_CANCEL_ID, "f")),
|
|
8602
|
+
form: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_FIELDS_FORM_ID, "f")),
|
|
8603
8603
|
};
|
|
8604
8604
|
}
|
|
8605
|
-
if (__classPrivateFieldGet$
|
|
8605
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f")) {
|
|
8606
8606
|
obj['confirmDeleteCard'] = {
|
|
8607
|
-
el: __classPrivateFieldGet$
|
|
8608
|
-
messageWrapper: __classPrivateFieldGet$
|
|
8609
|
-
message: __classPrivateFieldGet$
|
|
8610
|
-
submitButton: __classPrivateFieldGet$
|
|
8611
|
-
cancelButton: __classPrivateFieldGet$
|
|
8607
|
+
el: __classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f"),
|
|
8608
|
+
messageWrapper: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f")),
|
|
8609
|
+
message: __classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_ID, "f")),
|
|
8610
|
+
submitButton: __classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_SUBMIT_ID, "f")),
|
|
8611
|
+
cancelButton: __classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_CANCEL_ID, "f")),
|
|
8612
8612
|
};
|
|
8613
8613
|
}
|
|
8614
8614
|
/*
|
|
@@ -8662,7 +8662,7 @@ const KupDataTable = class {
|
|
|
8662
8662
|
* @param {KupDataColumn} column - Column to hide.
|
|
8663
8663
|
*/
|
|
8664
8664
|
async hideColumn(column) {
|
|
8665
|
-
__classPrivateFieldGet$
|
|
8665
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").data.column.hide(this.data, [column.name]);
|
|
8666
8666
|
this.kupColumnRemove.emit({
|
|
8667
8667
|
comp: this,
|
|
8668
8668
|
id: this.rootElement.id,
|
|
@@ -8677,7 +8677,7 @@ const KupDataTable = class {
|
|
|
8677
8677
|
* @returns {string|KupDataColumn} Returns the new column created or a string containing the error message if something went wrong.
|
|
8678
8678
|
*/
|
|
8679
8679
|
async newColumn(type, options) {
|
|
8680
|
-
const result = __classPrivateFieldGet$
|
|
8680
|
+
const result = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").data.column.new(this.data, type, options);
|
|
8681
8681
|
this.refresh();
|
|
8682
8682
|
return result;
|
|
8683
8683
|
}
|
|
@@ -8687,40 +8687,40 @@ const KupDataTable = class {
|
|
|
8687
8687
|
*/
|
|
8688
8688
|
async openColumnMenu(column) {
|
|
8689
8689
|
this.columnMenuAnchor = column;
|
|
8690
|
-
if (!__classPrivateFieldGet$
|
|
8690
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f")) {
|
|
8691
8691
|
__classPrivateFieldSet$2(this, _KupDataTable_columnMenuCard, document.createElement('kup-card'), "f");
|
|
8692
|
-
__classPrivateFieldGet$
|
|
8693
|
-
__classPrivateFieldGet$
|
|
8694
|
-
__classPrivateFieldGet$
|
|
8695
|
-
__classPrivateFieldGet$
|
|
8696
|
-
__classPrivateFieldGet$
|
|
8692
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").isMenu = true;
|
|
8693
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").layoutNumber = 12;
|
|
8694
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").sizeX = 'auto';
|
|
8695
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").sizeY = 'auto';
|
|
8696
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").addEventListener('kup-card-click', (e) => {
|
|
8697
8697
|
this.kupDataTableColumnMenu.emit({
|
|
8698
8698
|
comp: this,
|
|
8699
8699
|
id: this.rootElement.id,
|
|
8700
|
-
card: __classPrivateFieldGet$
|
|
8700
|
+
card: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"),
|
|
8701
8701
|
event: e,
|
|
8702
|
-
open: __classPrivateFieldGet$
|
|
8702
|
+
open: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").menuVisible,
|
|
8703
8703
|
});
|
|
8704
8704
|
});
|
|
8705
|
-
__classPrivateFieldGet$
|
|
8706
|
-
__classPrivateFieldGet$
|
|
8705
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").addEventListener('kup-card-event', (e) => {
|
|
8706
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").eventHandlers(e, this);
|
|
8707
8707
|
this.kupDataTableColumnMenu.emit({
|
|
8708
8708
|
comp: this,
|
|
8709
8709
|
id: this.rootElement.id,
|
|
8710
|
-
card: __classPrivateFieldGet$
|
|
8710
|
+
card: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"),
|
|
8711
8711
|
event: e,
|
|
8712
|
-
open: __classPrivateFieldGet$
|
|
8712
|
+
open: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").menuVisible,
|
|
8713
8713
|
});
|
|
8714
8714
|
});
|
|
8715
8715
|
}
|
|
8716
|
-
__classPrivateFieldGet$
|
|
8717
|
-
__classPrivateFieldGet$
|
|
8718
|
-
__classPrivateFieldGet$
|
|
8719
|
-
__classPrivateFieldGet$
|
|
8716
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").setAttribute('data-column', column);
|
|
8717
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").data = __classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").prepData(this, kupManager.getColumnByName(this.getVisibleColumns(), column));
|
|
8718
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").open(this, column);
|
|
8719
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").reposition(this, __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"));
|
|
8720
8720
|
this.kupDataTableColumnMenu.emit({
|
|
8721
8721
|
comp: this,
|
|
8722
8722
|
id: this.rootElement.id,
|
|
8723
|
-
card: __classPrivateFieldGet$
|
|
8723
|
+
card: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"),
|
|
8724
8724
|
event: null,
|
|
8725
8725
|
open: true,
|
|
8726
8726
|
});
|
|
@@ -8730,7 +8730,7 @@ const KupDataTable = class {
|
|
|
8730
8730
|
*/
|
|
8731
8731
|
async refresh(recalcRows) {
|
|
8732
8732
|
if (recalcRows) {
|
|
8733
|
-
__classPrivateFieldGet$
|
|
8733
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
8734
8734
|
}
|
|
8735
8735
|
index.forceUpdate(this);
|
|
8736
8736
|
}
|
|
@@ -8739,8 +8739,8 @@ const KupDataTable = class {
|
|
|
8739
8739
|
*/
|
|
8740
8740
|
async resizeCallback() {
|
|
8741
8741
|
if (this.lazyLoadCells &&
|
|
8742
|
-
this.rootElement.clientWidth !== __classPrivateFieldGet$
|
|
8743
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
8742
|
+
this.rootElement.clientWidth !== __classPrivateFieldGet$4(this, _KupDataTable_oldWidth, "f")) {
|
|
8743
|
+
window.clearTimeout(__classPrivateFieldGet$4(this, _KupDataTable_resizeTimeout, "f"));
|
|
8744
8744
|
__classPrivateFieldSet$2(this, _KupDataTable_resizeTimeout, window.setTimeout(() => this.refresh(), 300), "f");
|
|
8745
8745
|
}
|
|
8746
8746
|
}
|
|
@@ -8755,7 +8755,7 @@ const KupDataTable = class {
|
|
|
8755
8755
|
if (!column) {
|
|
8756
8756
|
return;
|
|
8757
8757
|
}
|
|
8758
|
-
const row = __classPrivateFieldGet$
|
|
8758
|
+
const row = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, rowId);
|
|
8759
8759
|
if (!row) {
|
|
8760
8760
|
return;
|
|
8761
8761
|
}
|
|
@@ -8813,7 +8813,7 @@ const KupDataTable = class {
|
|
|
8813
8813
|
this.selectedRows = [];
|
|
8814
8814
|
for (let index = 0; index < rowsIdentifiers.length; index++) {
|
|
8815
8815
|
const id = rowsIdentifiers[index];
|
|
8816
|
-
this.selectedRows.push(__classPrivateFieldGet$
|
|
8816
|
+
this.selectedRows.push(__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, id));
|
|
8817
8817
|
}
|
|
8818
8818
|
if (emitEvent !== false) {
|
|
8819
8819
|
this.kupRowSelected.emit({
|
|
@@ -8827,12 +8827,12 @@ const KupDataTable = class {
|
|
|
8827
8827
|
}
|
|
8828
8828
|
//---- Lifecycle hooks ----
|
|
8829
8829
|
componentWillLoad() {
|
|
8830
|
-
__classPrivateFieldGet$
|
|
8831
|
-
__classPrivateFieldGet$
|
|
8832
|
-
__classPrivateFieldGet$
|
|
8833
|
-
__classPrivateFieldGet$
|
|
8830
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logLoad(this, false);
|
|
8831
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.register(this);
|
|
8832
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").theme.register(this);
|
|
8833
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").toolbar.register(this.rootElement);
|
|
8834
8834
|
if (!this.emptyDataLabel) {
|
|
8835
|
-
this.emptyDataLabel = __classPrivateFieldGet$
|
|
8835
|
+
this.emptyDataLabel = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EMPTY_DATA);
|
|
8836
8836
|
}
|
|
8837
8837
|
__classPrivateFieldSet$2(this, _KupDataTable_columnMenuInstance, new KupColumnMenu(), "f");
|
|
8838
8838
|
__classPrivateFieldSet$2(this, _KupDataTable_filtersColumnMenuInstance, new fPaginatorUtils.FiltersColumnMenu(), "f");
|
|
@@ -8856,18 +8856,18 @@ const KupDataTable = class {
|
|
|
8856
8856
|
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, 0, "f");
|
|
8857
8857
|
}
|
|
8858
8858
|
if (document.querySelector('.topbar')) {
|
|
8859
|
-
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$
|
|
8859
|
+
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$4(this, _KupDataTable_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
|
|
8860
8860
|
}
|
|
8861
|
-
__classPrivateFieldGet$
|
|
8861
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_setObserver).call(this);
|
|
8862
8862
|
//this.recalculateRows();
|
|
8863
8863
|
// Detects is the browser is Safari. If needed, this function can be moved into an external file and then imported into components
|
|
8864
8864
|
__classPrivateFieldSet$2(this, _KupDataTable_isSafariBrowser, CSS.supports('position', '-webkit-sticky') ||
|
|
8865
8865
|
!!(window && window.safari), "f");
|
|
8866
|
-
__classPrivateFieldGet$
|
|
8866
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_calculateData).call(this);
|
|
8867
8867
|
__classPrivateFieldSet$2(this, _KupDataTable_initialized, true, "f");
|
|
8868
8868
|
}
|
|
8869
8869
|
componentWillRender() {
|
|
8870
|
-
__classPrivateFieldGet$
|
|
8870
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logRender(this, false);
|
|
8871
8871
|
}
|
|
8872
8872
|
componentDidRender() {
|
|
8873
8873
|
const root = this.rootElement.shadowRoot;
|
|
@@ -8878,40 +8878,40 @@ const KupDataTable = class {
|
|
|
8878
8878
|
}
|
|
8879
8879
|
}
|
|
8880
8880
|
if (this.showCustomization) {
|
|
8881
|
-
__classPrivateFieldGet$
|
|
8882
|
-
}
|
|
8883
|
-
__classPrivateFieldGet$
|
|
8884
|
-
__classPrivateFieldGet$
|
|
8885
|
-
__classPrivateFieldGet$
|
|
8886
|
-
__classPrivateFieldGet$
|
|
8887
|
-
__classPrivateFieldGet$
|
|
8888
|
-
__classPrivateFieldGet$
|
|
8881
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_customizePanelPosition).call(this);
|
|
8882
|
+
}
|
|
8883
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_totalMenuPosition).call(this);
|
|
8884
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_checkScrollOnHover).call(this);
|
|
8885
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_didRenderObservers).call(this);
|
|
8886
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_didRenderInteractables).call(this);
|
|
8887
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
8888
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_setDynPosElements).call(this);
|
|
8889
8889
|
if (this.headerIsPersistent &&
|
|
8890
8890
|
this.tableHeight === undefined &&
|
|
8891
8891
|
this.tableWidth === undefined) {
|
|
8892
|
-
__classPrivateFieldGet$
|
|
8892
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_updateStickyHeaderSize).call(this);
|
|
8893
8893
|
}
|
|
8894
|
-
setTimeout(() => __classPrivateFieldGet$
|
|
8894
|
+
setTimeout(() => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_updateFixedRowsAndColumnsCssVariables).call(this), 50);
|
|
8895
8895
|
// *** Store
|
|
8896
8896
|
if (this.lazyLoadCells) {
|
|
8897
8897
|
this.persistState();
|
|
8898
8898
|
}
|
|
8899
8899
|
// ***
|
|
8900
8900
|
__classPrivateFieldSet$2(this, _KupDataTable_oldWidth, this.rootElement.clientWidth, "f");
|
|
8901
|
-
__classPrivateFieldGet$
|
|
8901
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logRender(this, true);
|
|
8902
8902
|
}
|
|
8903
8903
|
componentDidLoad() {
|
|
8904
|
-
__classPrivateFieldGet$
|
|
8905
|
-
__classPrivateFieldGet$
|
|
8906
|
-
__classPrivateFieldGet$
|
|
8904
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_didLoadObservers).call(this);
|
|
8905
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_didLoadEventHandling).call(this);
|
|
8906
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_didLoadInteractables).call(this);
|
|
8907
8907
|
this.lazyLoadCells = true;
|
|
8908
8908
|
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
8909
|
-
__classPrivateFieldGet$
|
|
8910
|
-
__classPrivateFieldGet$
|
|
8909
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").resize.observe(this.rootElement);
|
|
8910
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logLoad(this, true);
|
|
8911
8911
|
}
|
|
8912
8912
|
resetCurrentPage() {
|
|
8913
8913
|
this.currentPage = 1;
|
|
8914
|
-
__classPrivateFieldGet$
|
|
8914
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8915
8915
|
}
|
|
8916
8916
|
getColumns() {
|
|
8917
8917
|
return this.data && this.data.columns
|
|
@@ -8922,7 +8922,7 @@ const KupDataTable = class {
|
|
|
8922
8922
|
// TODO: change into `visible ?? true` when TS dependency has been updated
|
|
8923
8923
|
const visibleColumns = this.getColumns().filter(({ visible }) => visible !== undefined ? visible : true);
|
|
8924
8924
|
// check grouping
|
|
8925
|
-
if (__classPrivateFieldGet$
|
|
8925
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
8926
8926
|
// filtering column based on group visibility
|
|
8927
8927
|
return visibleColumns.filter((column) => {
|
|
8928
8928
|
// check if in group
|
|
@@ -8946,7 +8946,7 @@ const KupDataTable = class {
|
|
|
8946
8946
|
return visibleColumns;
|
|
8947
8947
|
}
|
|
8948
8948
|
getGroupByName(column) {
|
|
8949
|
-
if (!__classPrivateFieldGet$
|
|
8949
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
8950
8950
|
return null;
|
|
8951
8951
|
}
|
|
8952
8952
|
for (let group of this.groups) {
|
|
@@ -8957,7 +8957,7 @@ const KupDataTable = class {
|
|
|
8957
8957
|
return null;
|
|
8958
8958
|
}
|
|
8959
8959
|
getColumnValues(column) {
|
|
8960
|
-
return __classPrivateFieldGet$
|
|
8960
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_filtersRowsInstance, "f").getColumnValues(this, column, this.globalFilterValue, __classPrivateFieldGet$4(this, _KupDataTable_filtersColumnMenuInstance, "f"));
|
|
8961
8961
|
}
|
|
8962
8962
|
getRows() {
|
|
8963
8963
|
return this.data && this.data.rows ? this.data.rows : [];
|
|
@@ -8972,7 +8972,7 @@ const KupDataTable = class {
|
|
|
8972
8972
|
}
|
|
8973
8973
|
async defaultSortingFunction(columns, receivingColumnIndex, sortedColumnIndex, useNewObject = false) {
|
|
8974
8974
|
const toSort = !useNewObject ? columns : [...columns];
|
|
8975
|
-
__classPrivateFieldGet$
|
|
8975
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_moveSortedColumns).call(this, toSort, receivingColumnIndex, sortedColumnIndex);
|
|
8976
8976
|
return toSort;
|
|
8977
8977
|
}
|
|
8978
8978
|
areTotalsSelected(column) {
|
|
@@ -8980,7 +8980,7 @@ const KupDataTable = class {
|
|
|
8980
8980
|
}
|
|
8981
8981
|
onTotalsChange(event, column) {
|
|
8982
8982
|
// close menu
|
|
8983
|
-
__classPrivateFieldGet$
|
|
8983
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
8984
8984
|
if (column) {
|
|
8985
8985
|
// must do this
|
|
8986
8986
|
// otherwise does not fire the watcher
|
|
@@ -9003,14 +9003,14 @@ const KupDataTable = class {
|
|
|
9003
9003
|
let selectRowCell = null;
|
|
9004
9004
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
9005
9005
|
extraCells++;
|
|
9006
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
9006
|
+
const fixedCellStyle = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, extraCells, 0, extraCells);
|
|
9007
9007
|
selectRowCell = (index.h("td", { class: fixedCellStyle ? fixedCellStyle.fixedCellClasses : null, style: fixedCellStyle ? fixedCellStyle.fixedCellStyle : null }));
|
|
9008
9008
|
}
|
|
9009
9009
|
// Action cell
|
|
9010
9010
|
let actionsCell = null;
|
|
9011
|
-
if (__classPrivateFieldGet$
|
|
9011
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
9012
9012
|
extraCells++;
|
|
9013
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
9013
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, extraCells, 0, extraCells);
|
|
9014
9014
|
actionsCell = (index.h("td", { class: selectionStyleAndClass
|
|
9015
9015
|
? selectionStyleAndClass.fixedCellClasses
|
|
9016
9016
|
: {}, style: selectionStyleAndClass
|
|
@@ -9018,19 +9018,19 @@ const KupDataTable = class {
|
|
|
9018
9018
|
: {} }));
|
|
9019
9019
|
}
|
|
9020
9020
|
const footerCells = this.getVisibleColumns().map((column, columnIndex) => {
|
|
9021
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
9021
|
+
const fixedCellStyle = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, columnIndex + 1 + extraCells, 0, extraCells);
|
|
9022
9022
|
let totalMenu = undefined;
|
|
9023
9023
|
let menuLabel = kupManager.TotalLabel.CALC;
|
|
9024
9024
|
const translation = {
|
|
9025
|
-
[kupManager.TotalLabel.AVERAGE]: __classPrivateFieldGet$
|
|
9026
|
-
[kupManager.TotalLabel.CALC]: __classPrivateFieldGet$
|
|
9027
|
-
[kupManager.TotalLabel.CANC]: __classPrivateFieldGet$
|
|
9028
|
-
[kupManager.TotalLabel.COUNT]: __classPrivateFieldGet$
|
|
9029
|
-
[kupManager.TotalLabel.DISTINCT]: __classPrivateFieldGet$
|
|
9030
|
-
[kupManager.TotalLabel.MATH]: __classPrivateFieldGet$
|
|
9031
|
-
[kupManager.TotalLabel.MAX]: __classPrivateFieldGet$
|
|
9032
|
-
[kupManager.TotalLabel.MIN]: __classPrivateFieldGet$
|
|
9033
|
-
[kupManager.TotalLabel.SUM]: __classPrivateFieldGet$
|
|
9025
|
+
[kupManager.TotalLabel.AVERAGE]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.AVERAGE),
|
|
9026
|
+
[kupManager.TotalLabel.CALC]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.CALCULATE),
|
|
9027
|
+
[kupManager.TotalLabel.CANC]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.CANCEL),
|
|
9028
|
+
[kupManager.TotalLabel.COUNT]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.COUNT),
|
|
9029
|
+
[kupManager.TotalLabel.DISTINCT]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.DISTINCT),
|
|
9030
|
+
[kupManager.TotalLabel.MATH]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.FORMULA),
|
|
9031
|
+
[kupManager.TotalLabel.MAX]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.MAXIMUM),
|
|
9032
|
+
[kupManager.TotalLabel.MIN]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.MINIMUM),
|
|
9033
|
+
[kupManager.TotalLabel.SUM]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.SUM),
|
|
9034
9034
|
};
|
|
9035
9035
|
if (this.totals) {
|
|
9036
9036
|
const totalValue = this.totals[column.name];
|
|
@@ -9062,7 +9062,7 @@ const KupDataTable = class {
|
|
|
9062
9062
|
}
|
|
9063
9063
|
}
|
|
9064
9064
|
}
|
|
9065
|
-
if (__classPrivateFieldGet$
|
|
9065
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isOpenedTotalMenuForColumn).call(this, column.name)) {
|
|
9066
9066
|
const listData = [
|
|
9067
9067
|
{
|
|
9068
9068
|
id: kupManager.TotalMode.COUNT,
|
|
@@ -9073,7 +9073,7 @@ const KupDataTable = class {
|
|
|
9073
9073
|
value: translation[kupManager.TotalLabel.DISTINCT],
|
|
9074
9074
|
},
|
|
9075
9075
|
];
|
|
9076
|
-
if (__classPrivateFieldGet$
|
|
9076
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isNumber(column.obj)) {
|
|
9077
9077
|
// TODO Move these objects in declarations
|
|
9078
9078
|
listData.push({
|
|
9079
9079
|
id: kupManager.TotalMode.SUM,
|
|
@@ -9090,7 +9090,7 @@ const KupDataTable = class {
|
|
|
9090
9090
|
value: translation[kupManager.TotalLabel.MAX],
|
|
9091
9091
|
});
|
|
9092
9092
|
}
|
|
9093
|
-
else if (__classPrivateFieldGet$
|
|
9093
|
+
else if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
9094
9094
|
listData.push({
|
|
9095
9095
|
id: kupManager.TotalMode.MIN,
|
|
9096
9096
|
separator: true,
|
|
@@ -9115,14 +9115,14 @@ const KupDataTable = class {
|
|
|
9115
9115
|
}
|
|
9116
9116
|
// TODO please use getValueForDisplay
|
|
9117
9117
|
let value;
|
|
9118
|
-
const footerValue = __classPrivateFieldGet$
|
|
9118
|
+
const footerValue = __classPrivateFieldGet$4(this, _KupDataTable_footer, "f")[column.name];
|
|
9119
9119
|
if (menuLabel === kupManager.TotalLabel.COUNT ||
|
|
9120
9120
|
menuLabel === kupManager.TotalLabel.DISTINCT) {
|
|
9121
9121
|
value = footerValue;
|
|
9122
9122
|
}
|
|
9123
9123
|
else if ((menuLabel === kupManager.TotalLabel.MAX ||
|
|
9124
9124
|
menuLabel === kupManager.TotalLabel.MIN) &&
|
|
9125
|
-
__classPrivateFieldGet$
|
|
9125
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
9126
9126
|
if (footerValue) {
|
|
9127
9127
|
value = footerValue;
|
|
9128
9128
|
}
|
|
@@ -9146,38 +9146,38 @@ const KupDataTable = class {
|
|
|
9146
9146
|
let transpose = undefined;
|
|
9147
9147
|
let totalsMatrix = undefined;
|
|
9148
9148
|
if (this.openedCustomSettings) {
|
|
9149
|
-
density = __classPrivateFieldGet$
|
|
9150
|
-
fontsize = __classPrivateFieldGet$
|
|
9151
|
-
grid = __classPrivateFieldGet$
|
|
9152
|
-
transpose = __classPrivateFieldGet$
|
|
9149
|
+
density = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderDensityPanel).call(this);
|
|
9150
|
+
fontsize = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderFontSizePanel).call(this);
|
|
9151
|
+
grid = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderGridPanel).call(this);
|
|
9152
|
+
transpose = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderTransposeSwitch).call(this);
|
|
9153
9153
|
if (this.totals && this.groups.length > 0) {
|
|
9154
|
-
totalsMatrix = __classPrivateFieldGet$
|
|
9154
|
+
totalsMatrix = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderTotalsMatrix).call(this);
|
|
9155
9155
|
}
|
|
9156
9156
|
}
|
|
9157
9157
|
return (index.h("kup-card", { customStyle: "::slotted(kup-switch) { width: max-content !important; } ::slotted(*) { margin: auto !important; } ::slotted(.customize-element) { margin: auto !important; padding: 0 1em 1em 1em !important; width: max-content !important; } ::slotted(.customize-element):nth-child(1) { padding-top: 1em !important; }", isMenu: true, layoutFamily: kupManager.KupCardFamily.FREE, ref: (el) => {
|
|
9158
9158
|
__classPrivateFieldSet$2(this, _KupDataTable_customizeTopPanelRef, el, "f");
|
|
9159
|
-
}, sizeX: "360px", sizeY: "300px" }, density, grid, fontsize, transpose, index.h("kup-switch", { class: "customize-element", checked: this.dragEnabled, label: __classPrivateFieldGet$
|
|
9159
|
+
}, sizeX: "360px", sizeY: "300px" }, density, grid, fontsize, transpose, index.h("kup-switch", { class: "customize-element", checked: this.dragEnabled, label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.DRAG_AND_DROP), leadingLabel: true, "onkup-switch-change": () => (this.dragEnabled = !this.dragEnabled) }), index.h("kup-switch", { class: "customize-element", checked: this.editableData, label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EDITABLE), leadingLabel: true, "onkup-switch-change": () => (this.editableData = !this.editableData) }), index.h("kup-button", { title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TOGGLE) +
|
|
9160
9160
|
' Magic Box ' +
|
|
9161
9161
|
'(' +
|
|
9162
|
-
__classPrivateFieldGet$
|
|
9163
|
-
')', icon: "auto-fix", "onkup-button-click": () => __classPrivateFieldGet$
|
|
9162
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
9163
|
+
')', icon: "auto-fix", "onkup-button-click": () => __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").toggleMagicBox() }), totalsMatrix));
|
|
9164
9164
|
}
|
|
9165
9165
|
render() {
|
|
9166
9166
|
__classPrivateFieldSet$2(this, _KupDataTable_thRefs, [], "f");
|
|
9167
9167
|
__classPrivateFieldSet$2(this, _KupDataTable_rowsRefs, [], "f");
|
|
9168
9168
|
__classPrivateFieldSet$2(this, _KupDataTable_renderedRows, [], "f");
|
|
9169
9169
|
let elStyle = undefined;
|
|
9170
|
-
__classPrivateFieldSet$2(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$
|
|
9170
|
+
__classPrivateFieldSet$2(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
|
|
9171
9171
|
let rows = null;
|
|
9172
|
-
if (__classPrivateFieldGet$
|
|
9173
|
-
rows = (index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
9172
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
|
|
9173
|
+
rows = (index.h("tr", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").push(el) }, index.h("td", { colSpan: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
|
|
9174
9174
|
}
|
|
9175
9175
|
else {
|
|
9176
9176
|
rows = [];
|
|
9177
|
-
__classPrivateFieldGet$
|
|
9177
|
+
__classPrivateFieldGet$4(this, _KupDataTable_paginatedRows, "f")
|
|
9178
9178
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
9179
9179
|
// When the column has specified the parameter hideValuesRepetitions
|
|
9180
|
-
.map((row, rowIndex, currentArray) => __classPrivateFieldGet$
|
|
9180
|
+
.map((row, rowIndex, currentArray) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, 0, rowIndex + 1, rowIndex > 0 ? currentArray[rowIndex - 1] : null))
|
|
9181
9181
|
.forEach((jsxRow) => {
|
|
9182
9182
|
if (Array.isArray(jsxRow)) {
|
|
9183
9183
|
jsxRow.forEach((jr) => rows.push(jr));
|
|
@@ -9189,24 +9189,24 @@ const KupDataTable = class {
|
|
|
9189
9189
|
}
|
|
9190
9190
|
// header
|
|
9191
9191
|
// for multi selection purposes, this should be called before this.renderedRows has been evaluated
|
|
9192
|
-
const header = __classPrivateFieldGet$
|
|
9193
|
-
const stickyHeader = __classPrivateFieldGet$
|
|
9192
|
+
const header = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderHeader).call(this);
|
|
9193
|
+
const stickyHeader = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderStickyHeader).call(this);
|
|
9194
9194
|
let paginatorTop = undefined;
|
|
9195
9195
|
let paginatorBottom = undefined;
|
|
9196
|
-
if ((!this.lazyLoadRows && __classPrivateFieldGet$
|
|
9196
|
+
if ((!this.lazyLoadRows && __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f") > this.rowsPerPage) ||
|
|
9197
9197
|
this.showCustomization ||
|
|
9198
9198
|
this.showLoadMore) {
|
|
9199
9199
|
if (kupManager.PaginatorPos.TOP === this.paginatorPos ||
|
|
9200
9200
|
kupManager.PaginatorPos.BOTH === this.paginatorPos) {
|
|
9201
|
-
paginatorTop = __classPrivateFieldGet$
|
|
9201
|
+
paginatorTop = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderPaginator).call(this, true);
|
|
9202
9202
|
}
|
|
9203
9203
|
if (kupManager.PaginatorPos.BOTTOM === this.paginatorPos ||
|
|
9204
9204
|
kupManager.PaginatorPos.BOTH === this.paginatorPos) {
|
|
9205
|
-
paginatorBottom = __classPrivateFieldGet$
|
|
9205
|
+
paginatorBottom = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderPaginator).call(this, false);
|
|
9206
9206
|
}
|
|
9207
9207
|
}
|
|
9208
9208
|
let groupChips = null;
|
|
9209
|
-
if (__classPrivateFieldGet$
|
|
9209
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
9210
9210
|
const chipsData = [];
|
|
9211
9211
|
for (let index = 0; index < this.groups.length; index++) {
|
|
9212
9212
|
const group = this.groups[index];
|
|
@@ -9219,7 +9219,7 @@ const KupDataTable = class {
|
|
|
9219
9219
|
});
|
|
9220
9220
|
}
|
|
9221
9221
|
else {
|
|
9222
|
-
__classPrivateFieldGet$
|
|
9222
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Grouped for a non-existent column! (' +
|
|
9223
9223
|
group.column +
|
|
9224
9224
|
')', kupManager.KupDebugCategory.WARNING);
|
|
9225
9225
|
}
|
|
@@ -9232,7 +9232,7 @@ const KupDataTable = class {
|
|
|
9232
9232
|
onIconClick: [],
|
|
9233
9233
|
};
|
|
9234
9234
|
for (let i = 0; i < chipsData.length; i++) {
|
|
9235
|
-
props.onIconClick.push(() => __classPrivateFieldGet$
|
|
9235
|
+
props.onIconClick.push(() => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_removeGroup).call(this, i));
|
|
9236
9236
|
}
|
|
9237
9237
|
groupChips = index.h(fChip.FChip, Object.assign({}, props));
|
|
9238
9238
|
}
|
|
@@ -9240,7 +9240,7 @@ const KupDataTable = class {
|
|
|
9240
9240
|
const tableClass = {
|
|
9241
9241
|
// Class to specify whether the table should have width: auto or not.
|
|
9242
9242
|
// Mandatory to check with custom column size.
|
|
9243
|
-
'auto-width': __classPrivateFieldGet$
|
|
9243
|
+
'auto-width': __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_tableHasAutoWidth).call(this),
|
|
9244
9244
|
'column-separation': kupManager.ShowGrid.COMPLETE === this.showGrid ||
|
|
9245
9245
|
kupManager.ShowGrid.COL === this.showGrid,
|
|
9246
9246
|
// When there are columns with a specified width, we must add table-layout: fixed to force the table to respect them
|
|
@@ -9290,17 +9290,17 @@ const KupDataTable = class {
|
|
|
9290
9290
|
}
|
|
9291
9291
|
}
|
|
9292
9292
|
};
|
|
9293
|
-
const compCreated = (index.h(index.Host, { "onKup-cell-input": autoselectOnAction, "onKup-cell-update": autoselectOnAction }, index.h("style", null, __classPrivateFieldGet$
|
|
9293
|
+
const compCreated = (index.h(index.Host, { "onKup-cell-input": autoselectOnAction, "onKup-cell-update": autoselectOnAction }, index.h("style", null, __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, index.h("div", { class: "above-wrapper" }, this.globalFilter ? (index.h("div", { id: "global-filter" }, index.h(fTextField.FTextField, { fullWidth: true, icon: kupManager.KupThemeIconValues.SEARCH, label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageSearch.SEARCH), value: this.globalFilterValue, onInput: (event) => {
|
|
9294
9294
|
const t = event.target;
|
|
9295
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
9296
|
-
__classPrivateFieldSet$2(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$
|
|
9295
|
+
window.clearTimeout(__classPrivateFieldGet$4(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
9296
|
+
__classPrivateFieldSet$2(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
9297
9297
|
} }))) : null, paginatorTop), index.h("div", { class: "group-wrapper" }, groupChips), index.h("div", { class: "actions-wrapper" }, this.insertMode !== '' ? (index.h(fButton.FButton, { icon: "plus", onClick: async () => {
|
|
9298
9298
|
var _a;
|
|
9299
9299
|
if (this.insertMode === 'form') {
|
|
9300
|
-
__classPrivateFieldGet$
|
|
9300
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_rowInsertForm).call(this);
|
|
9301
9301
|
}
|
|
9302
9302
|
else {
|
|
9303
|
-
__classPrivateFieldSet$2(this, _KupDataTable_insertCount, (_a = __classPrivateFieldGet$
|
|
9303
|
+
__classPrivateFieldSet$2(this, _KupDataTable_insertCount, (_a = __classPrivateFieldGet$4(this, _KupDataTable_insertCount, "f"), _a++, _a), "f");
|
|
9304
9304
|
const cells = {};
|
|
9305
9305
|
for (let index = 0; index < this.data.columns.length; index++) {
|
|
9306
9306
|
const column = this.data.columns[index];
|
|
@@ -9314,8 +9314,8 @@ const KupDataTable = class {
|
|
|
9314
9314
|
}
|
|
9315
9315
|
const row = {
|
|
9316
9316
|
cells,
|
|
9317
|
-
id: __classPrivateFieldGet$
|
|
9318
|
-
__classPrivateFieldGet$
|
|
9317
|
+
id: __classPrivateFieldGet$4(this, _KupDataTable_INSERT_PREFIX, "f") +
|
|
9318
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCount, "f"),
|
|
9319
9319
|
};
|
|
9320
9320
|
this.data.rows.unshift(row);
|
|
9321
9321
|
await this.refresh(true);
|
|
@@ -9329,13 +9329,13 @@ const KupDataTable = class {
|
|
|
9329
9329
|
});
|
|
9330
9330
|
}, styling: fButtonDeclarations.FButtonStyling.OUTLINED, title: "Save", wrapperClass: "save-button" })) : null, this.showDeleteButton &&
|
|
9331
9331
|
this.selectedRows.length > 0 ? (index.h(fButton.FButton, { icon: "delete", onClick: () => {
|
|
9332
|
-
__classPrivateFieldGet$
|
|
9333
|
-
}, styling: fButtonDeclarations.FButtonStyling.OUTLINED, title: "Delete selected rows", wrapperClass: "delete-button" })) : null), index.h("div", { class: "droparea", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet$
|
|
9334
|
-
? __classPrivateFieldGet$
|
|
9332
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_rowsDelete).call(this);
|
|
9333
|
+
}, styling: fButtonDeclarations.FButtonStyling.OUTLINED, title: "Delete selected rows", wrapperClass: "delete-button" })) : null), index.h("div", { class: "droparea", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
|
|
9334
|
+
? __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
|
|
9335
9335
|
: null), index.h("div", { style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
|
|
9336
9336
|
? [
|
|
9337
9337
|
index.h("div", { class: "settings-trigger", onClick: () => {
|
|
9338
|
-
__classPrivateFieldGet$
|
|
9338
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
|
|
9339
9339
|
}, ref: (el) => {
|
|
9340
9340
|
__classPrivateFieldSet$2(this, _KupDataTable_customizeTopButtonRef, el, "f");
|
|
9341
9341
|
} }, index.h(fImage.FImage, { color: `var(${kupManager.KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
|
|
@@ -9345,29 +9345,29 @@ const KupDataTable = class {
|
|
|
9345
9345
|
ev.stopPropagation();
|
|
9346
9346
|
}, onContextMenu: (e) => {
|
|
9347
9347
|
e.preventDefault();
|
|
9348
|
-
} }, index.h("thead", { hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_theadRef, el, "f")) }, index.h("tr", null, header)), index.h("tbody", null, rows), this.showFooter || __classPrivateFieldGet$
|
|
9348
|
+
} }, index.h("thead", { hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_theadRef, el, "f")) }, index.h("tr", null, header)), index.h("tbody", null, rows), this.showFooter || __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)
|
|
9349
9349
|
? this.renderFooter()
|
|
9350
9350
|
: null), stickyEl), paginatorBottom)));
|
|
9351
9351
|
return compCreated;
|
|
9352
9352
|
}
|
|
9353
9353
|
disconnectedCallback() {
|
|
9354
|
-
__classPrivateFieldGet$
|
|
9355
|
-
__classPrivateFieldGet$
|
|
9356
|
-
__classPrivateFieldGet$
|
|
9354
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.unregister(__classPrivateFieldGet$4(this, _KupDataTable_interactableDrag, "f").concat(__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f"), __classPrivateFieldGet$4(this, _KupDataTable_interactableResize, "f"), __classPrivateFieldGet$4(this, _KupDataTable_interactableTouch, "f")));
|
|
9355
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.unregister(this);
|
|
9356
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").theme.unregister(this);
|
|
9357
9357
|
const dynamicPositionElements = this.rootElement.shadowRoot.querySelectorAll('[' + kupManager.kupDynamicPositionAttribute + ']');
|
|
9358
9358
|
if (dynamicPositionElements.length > 0) {
|
|
9359
|
-
__classPrivateFieldGet$
|
|
9359
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.unregister(Array.prototype.slice.call(dynamicPositionElements));
|
|
9360
9360
|
}
|
|
9361
|
-
if (__classPrivateFieldGet$
|
|
9362
|
-
__classPrivateFieldGet$
|
|
9361
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f")) {
|
|
9362
|
+
__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f").remove();
|
|
9363
9363
|
}
|
|
9364
|
-
if (__classPrivateFieldGet$
|
|
9365
|
-
__classPrivateFieldGet$
|
|
9364
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f")) {
|
|
9365
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").remove();
|
|
9366
9366
|
}
|
|
9367
9367
|
if (this.scrollOnHover) {
|
|
9368
|
-
__classPrivateFieldGet$
|
|
9368
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").scrollOnHover.unregister(__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f"));
|
|
9369
9369
|
}
|
|
9370
|
-
__classPrivateFieldGet$
|
|
9370
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").resize.unobserve(this.rootElement);
|
|
9371
9371
|
this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
|
|
9372
9372
|
}
|
|
9373
9373
|
get rootElement() { return index.getElement(this); }
|
|
@@ -9388,16 +9388,16 @@ const KupDataTable = class {
|
|
|
9388
9388
|
}; }
|
|
9389
9389
|
};
|
|
9390
9390
|
_KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _KupDataTable_rowsLength = new WeakMap(), _KupDataTable_paginatedRows = new WeakMap(), _KupDataTable_paginatedRowsLength = new WeakMap(), _KupDataTable_footer = new WeakMap(), _KupDataTable_kupManager = new WeakMap(), _KupDataTable_renderedRows = new WeakMap(), _KupDataTable_loadMoreEventCounter = new WeakMap(), _KupDataTable_loadMoreEventPreviousQuantity = new WeakMap(), _KupDataTable_theadRef = new WeakMap(), _KupDataTable_tableRef = new WeakMap(), _KupDataTable_originalData = new WeakMap(), _KupDataTable_tableAreaRef = new WeakMap(), _KupDataTable_stickyTheadRef = new WeakMap(), _KupDataTable_customizeTopButtonRef = new WeakMap(), _KupDataTable_customizeTopPanelRef = new WeakMap(), _KupDataTable_sizedColumns = new WeakMap(), _KupDataTable_intObserver = new WeakMap(), _KupDataTable_navBarHeight = new WeakMap(), _KupDataTable_theadIntersecting = new WeakMap(), _KupDataTable_tableIntersecting = new WeakMap(), _KupDataTable_isSafariBrowser = new WeakMap(), _KupDataTable_isRestoringState = new WeakMap(), _KupDataTable_globalFilterTimeout = new WeakMap(), _KupDataTable_totalMenuCoords = new WeakMap(), _KupDataTable_clickTimeout = new WeakMap(), _KupDataTable_thRefs = new WeakMap(), _KupDataTable_rowsRefs = new WeakMap(), _KupDataTable_oldWidth = new WeakMap(), _KupDataTable_hold = new WeakMap(), _KupDataTable_interactableDrag = new WeakMap(), _KupDataTable_interactableDrop = new WeakMap(), _KupDataTable_interactableResize = new WeakMap(), _KupDataTable_interactableTouch = new WeakMap(), _KupDataTable_dropareaRef = new WeakMap(), _KupDataTable_removeDropareaRef = new WeakMap(), _KupDataTable_groupsDropareaRef = new WeakMap(), _KupDataTable_clickCb = new WeakMap(), _KupDataTable_clickCbCustomPanel = new WeakMap(), _KupDataTable_clickCbDropCard = new WeakMap(), _KupDataTable_resizeTimeout = new WeakMap(), _KupDataTable_columnMenuInstance = new WeakMap(), _KupDataTable_filtersColumnMenuInstance = new WeakMap(), _KupDataTable_filtersRowsInstance = new WeakMap(), _KupDataTable_detailCard = new WeakMap(), _KupDataTable_insertCard = new WeakMap(), _KupDataTable_confirmDeleteCard = new WeakMap(), _KupDataTable_confirmDeleteDialog = new WeakMap(), _KupDataTable_columnMenuCard = new WeakMap(), _KupDataTable_columnDropCard = new WeakMap(), _KupDataTable_columnDropCardAnchor = new WeakMap(), _KupDataTable_insertCount = new WeakMap(), _KupDataTable_BUTTON_CANCEL_ID = new WeakMap(), _KupDataTable_BUTTON_SUBMIT_ID = new WeakMap(), _KupDataTable_FIELDS_FORM_ID = new WeakMap(), _KupDataTable_MESSAGE_ID = new WeakMap(), _KupDataTable_MESSAGE_WRAPPER_ID = new WeakMap(), _KupDataTable_INSERT_PREFIX = new WeakMap(), _KupDataTable_stickyHeaderPosition = new WeakMap(), _KupDataTable_FONTSIZE_CODES = new WeakMap(), _KupDataTable_FONTSIZE_DECODES = new WeakMap(), _KupDataTable_FONTSIZE_ICONS = new WeakMap(), _KupDataTable_DENSITY_DECODES = new WeakMap(), _KupDataTable_DENSITY_ICONS = new WeakMap(), _KupDataTable_GRID_CODES = new WeakMap(), _KupDataTable_GRID_DECODES = new WeakMap(), _KupDataTable_GRID_ICONS = new WeakMap(), _KupDataTable_instances = new WeakSet(), _KupDataTable_closeDropCard = function _KupDataTable_closeDropCard() {
|
|
9391
|
-
__classPrivateFieldGet$
|
|
9392
|
-
__classPrivateFieldGet$
|
|
9393
|
-
__classPrivateFieldGet$
|
|
9391
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f"));
|
|
9392
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCbDropCard, "f"));
|
|
9393
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").remove();
|
|
9394
9394
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCard, null, "f");
|
|
9395
9395
|
}, _KupDataTable_createDropCard = function _KupDataTable_createDropCard(starter, receiving) {
|
|
9396
|
-
if (__classPrivateFieldGet$
|
|
9397
|
-
__classPrivateFieldGet$
|
|
9396
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f")) {
|
|
9397
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9398
9398
|
}
|
|
9399
9399
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCard, document.createElement('kup-card'), "f");
|
|
9400
|
-
__classPrivateFieldGet$
|
|
9400
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").data = {
|
|
9401
9401
|
options: {
|
|
9402
9402
|
data: this.data,
|
|
9403
9403
|
enableFormula: this.enableColumnsFormula,
|
|
@@ -9406,46 +9406,46 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9406
9406
|
receivingColumn: receiving,
|
|
9407
9407
|
starterColumn: starter,
|
|
9408
9408
|
formulaCb: () => {
|
|
9409
|
-
__classPrivateFieldGet$
|
|
9409
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9410
9410
|
this.refresh();
|
|
9411
9411
|
},
|
|
9412
9412
|
mergeCb: () => {
|
|
9413
9413
|
this.newColumn(kupManager.KupDataNewColumnTypes.CONCATENATE, {
|
|
9414
9414
|
columns: [receiving.name, starter.name],
|
|
9415
9415
|
});
|
|
9416
|
-
__classPrivateFieldGet$
|
|
9416
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9417
9417
|
},
|
|
9418
9418
|
moveCb: () => {
|
|
9419
|
-
__classPrivateFieldGet$
|
|
9420
|
-
__classPrivateFieldGet$
|
|
9419
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnSort).call(this, receiving, starter);
|
|
9420
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9421
9421
|
},
|
|
9422
9422
|
},
|
|
9423
9423
|
};
|
|
9424
|
-
__classPrivateFieldGet$
|
|
9425
|
-
__classPrivateFieldGet$
|
|
9426
|
-
__classPrivateFieldGet$
|
|
9427
|
-
__classPrivateFieldGet$
|
|
9428
|
-
__classPrivateFieldGet$
|
|
9429
|
-
__classPrivateFieldGet$
|
|
9430
|
-
__classPrivateFieldGet$
|
|
9424
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").layoutFamily = kupManager.KupCardFamily.BUILT_IN;
|
|
9425
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").layoutNumber = 3;
|
|
9426
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").isMenu = true;
|
|
9427
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").sizeX = '280px';
|
|
9428
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").sizeY = 'auto';
|
|
9429
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f"), __classPrivateFieldGet$4(this, _KupDataTable_columnDropCardAnchor, "f"), 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
9430
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f"));
|
|
9431
9431
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCbDropCard, {
|
|
9432
9432
|
cb: () => {
|
|
9433
|
-
__classPrivateFieldGet$
|
|
9433
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9434
9434
|
},
|
|
9435
|
-
el: __classPrivateFieldGet$
|
|
9435
|
+
el: __classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f"),
|
|
9436
9436
|
}, "f");
|
|
9437
|
-
__classPrivateFieldGet$
|
|
9438
|
-
__classPrivateFieldGet$
|
|
9437
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCbDropCard, "f"), true);
|
|
9438
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").menuVisible = true;
|
|
9439
9439
|
}, _KupDataTable_calculateData = function _KupDataTable_calculateData() {
|
|
9440
9440
|
if (!this.transpose) {
|
|
9441
9441
|
// restore
|
|
9442
|
-
if (__classPrivateFieldGet$
|
|
9443
|
-
this.data = Object.assign({}, __classPrivateFieldGet$
|
|
9442
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_originalData, "f")) {
|
|
9443
|
+
this.data = Object.assign({}, __classPrivateFieldGet$4(this, _KupDataTable_originalData, "f"));
|
|
9444
9444
|
}
|
|
9445
9445
|
}
|
|
9446
9446
|
else {
|
|
9447
9447
|
// transpose
|
|
9448
|
-
__classPrivateFieldGet$
|
|
9448
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_setTransposedData).call(this);
|
|
9449
9449
|
}
|
|
9450
9450
|
}, _KupDataTable_getRow = function _KupDataTable_getRow(id) {
|
|
9451
9451
|
let row = null;
|
|
@@ -9462,26 +9462,26 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9462
9462
|
row = rows.find((row) => row.id === id);
|
|
9463
9463
|
}
|
|
9464
9464
|
};
|
|
9465
|
-
if (__classPrivateFieldGet$
|
|
9466
|
-
__classPrivateFieldGet$
|
|
9465
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) && typeof id === 'string') {
|
|
9466
|
+
__classPrivateFieldGet$4(this, _KupDataTable_paginatedRows, "f").forEach((row) => search(row.group.children));
|
|
9467
9467
|
}
|
|
9468
9468
|
else {
|
|
9469
|
-
test(__classPrivateFieldGet$
|
|
9469
|
+
test(__classPrivateFieldGet$4(this, _KupDataTable_rows, "f"));
|
|
9470
9470
|
}
|
|
9471
9471
|
return row;
|
|
9472
9472
|
}, _KupDataTable_getTransposedData = function _KupDataTable_getTransposedData(column) {
|
|
9473
9473
|
if (column) {
|
|
9474
9474
|
this.filters = {};
|
|
9475
9475
|
}
|
|
9476
|
-
return __classPrivateFieldGet$
|
|
9476
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").data.transpose(this.data, column);
|
|
9477
9477
|
}, _KupDataTable_setTransposedData = function _KupDataTable_setTransposedData() {
|
|
9478
9478
|
// transpose
|
|
9479
9479
|
__classPrivateFieldSet$2(this, _KupDataTable_originalData, Object.assign({}, this.data), "f");
|
|
9480
9480
|
if (this.data.columns.length > 0) {
|
|
9481
|
-
this.data = __classPrivateFieldGet$
|
|
9481
|
+
this.data = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getTransposedData).call(this, this.data.columns[0].name);
|
|
9482
9482
|
}
|
|
9483
9483
|
}, _KupDataTable_switchToTotalsMatrix = function _KupDataTable_switchToTotalsMatrix() {
|
|
9484
|
-
if (__classPrivateFieldGet$
|
|
9484
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_rows, "f").length === 0 || !__classPrivateFieldGet$4(this, _KupDataTable_rows, "f")[0].group)
|
|
9485
9485
|
return;
|
|
9486
9486
|
// calc totals matrix data
|
|
9487
9487
|
const totalsMatrixData = {};
|
|
@@ -9489,9 +9489,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9489
9489
|
// note that the sorting of the columns depends on the totals selection
|
|
9490
9490
|
// the first column is the one that is selected first in the totals, and so on...
|
|
9491
9491
|
const ids = [];
|
|
9492
|
-
ids.push(__classPrivateFieldGet$
|
|
9493
|
-
Object.keys(__classPrivateFieldGet$
|
|
9494
|
-
if (__classPrivateFieldGet$
|
|
9492
|
+
ids.push(__classPrivateFieldGet$4(this, _KupDataTable_rows, "f")[0].group.column);
|
|
9493
|
+
Object.keys(__classPrivateFieldGet$4(this, _KupDataTable_rows, "f")[0].group.totals).forEach((columnKey) => {
|
|
9494
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_rows, "f")[0].group.column !== columnKey)
|
|
9495
9495
|
ids.push(columnKey);
|
|
9496
9496
|
});
|
|
9497
9497
|
// calc columns
|
|
@@ -9521,7 +9521,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9521
9521
|
totalMode + ' ' + currentColumn.title;
|
|
9522
9522
|
}
|
|
9523
9523
|
}
|
|
9524
|
-
__classPrivateFieldGet$
|
|
9524
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_setObjForTotalsMatrix).call(this, currentColumn, this.totals);
|
|
9525
9525
|
}
|
|
9526
9526
|
totalsMatrixColumns.push(currentColumn);
|
|
9527
9527
|
}
|
|
@@ -9532,15 +9532,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9532
9532
|
// calc rows
|
|
9533
9533
|
const totalsMatrixRows = [];
|
|
9534
9534
|
let index = 0;
|
|
9535
|
-
__classPrivateFieldGet$
|
|
9535
|
+
__classPrivateFieldGet$4(this, _KupDataTable_rows, "f").forEach((row) => {
|
|
9536
9536
|
const cells = {};
|
|
9537
9537
|
ids.forEach((id) => {
|
|
9538
9538
|
let totalValue = row.group.totals[id];
|
|
9539
9539
|
if (!totalValue) {
|
|
9540
9540
|
totalValue = row.group.id;
|
|
9541
9541
|
}
|
|
9542
|
-
if (__classPrivateFieldGet$
|
|
9543
|
-
totalValue = __classPrivateFieldGet$
|
|
9542
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dates.isValid(totalValue, kupManager.KupDatesFormats.ISO_DATE)) {
|
|
9543
|
+
totalValue = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dates.format(totalValue);
|
|
9544
9544
|
}
|
|
9545
9545
|
cells[id] = {
|
|
9546
9546
|
value: String(totalValue),
|
|
@@ -9580,13 +9580,13 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9580
9580
|
}, _KupDataTable_setObjForTotalsMatrix = function _KupDataTable_setObjForTotalsMatrix(column, totals) {
|
|
9581
9581
|
const obj = column.obj;
|
|
9582
9582
|
const totalMode = totals[column.name];
|
|
9583
|
-
if (__classPrivateFieldGet$
|
|
9583
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isDate(obj)) {
|
|
9584
9584
|
// check if min or max totals mode
|
|
9585
9585
|
if (totalMode === kupManager.TotalMode.MAX || totalMode === kupManager.TotalMode.MIN) {
|
|
9586
9586
|
return;
|
|
9587
9587
|
}
|
|
9588
9588
|
}
|
|
9589
|
-
else if (__classPrivateFieldGet$
|
|
9589
|
+
else if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isNumber(obj)) {
|
|
9590
9590
|
// check if percentage
|
|
9591
9591
|
if (obj.p && obj.p.toUpperCase() === 'P') {
|
|
9592
9592
|
if (totalMode !== kupManager.TotalMode.COUNT &&
|
|
@@ -9614,14 +9614,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9614
9614
|
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, 0, "f");
|
|
9615
9615
|
}
|
|
9616
9616
|
if (topBar) {
|
|
9617
|
-
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$
|
|
9618
|
-
}
|
|
9619
|
-
if (__classPrivateFieldGet$
|
|
9620
|
-
__classPrivateFieldGet$
|
|
9621
|
-
const widthTable = __classPrivateFieldGet$
|
|
9622
|
-
__classPrivateFieldGet$
|
|
9623
|
-
const thCollection = __classPrivateFieldGet$
|
|
9624
|
-
const thStickyCollection = __classPrivateFieldGet$
|
|
9617
|
+
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$4(this, _KupDataTable_navBarHeight, "f") + topBar.clientHeight, "f");
|
|
9618
|
+
}
|
|
9619
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
9620
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").style.top = __classPrivateFieldGet$4(this, _KupDataTable_navBarHeight, "f") + 'px';
|
|
9621
|
+
const widthTable = __classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f").offsetWidth;
|
|
9622
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").style.maxWidth = widthTable + 'px';
|
|
9623
|
+
const thCollection = __classPrivateFieldGet$4(this, _KupDataTable_theadRef, "f").querySelectorAll('th');
|
|
9624
|
+
const thStickyCollection = __classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").querySelectorAll('th-sticky');
|
|
9625
9625
|
for (let i = 0; i < thCollection.length; i++) {
|
|
9626
9626
|
const widthTH = thCollection[i].offsetWidth;
|
|
9627
9627
|
thStickyCollection[i].style.width = widthTH + 'px';
|
|
@@ -9632,8 +9632,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9632
9632
|
entries.forEach((entry) => {
|
|
9633
9633
|
if (entry.target.tagName === 'TR') {
|
|
9634
9634
|
if (entry.isIntersecting) {
|
|
9635
|
-
__classPrivateFieldGet$
|
|
9636
|
-
const delta = __classPrivateFieldGet$
|
|
9635
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
|
|
9636
|
+
const delta = __classPrivateFieldGet$4(this, _KupDataTable_rows, "f").length - this.currentRowsPerPage;
|
|
9637
9637
|
if (delta < this.loadMoreStep) {
|
|
9638
9638
|
this.currentRowsPerPage += delta;
|
|
9639
9639
|
}
|
|
@@ -9647,7 +9647,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9647
9647
|
if (entry.isIntersecting) {
|
|
9648
9648
|
__classPrivateFieldSet$2(this, _KupDataTable_theadIntersecting, true, "f");
|
|
9649
9649
|
}
|
|
9650
|
-
else if (entry.boundingClientRect.bottom > __classPrivateFieldGet$
|
|
9650
|
+
else if (entry.boundingClientRect.bottom > __classPrivateFieldGet$4(this, _KupDataTable_navBarHeight, "f")) {
|
|
9651
9651
|
//If the thead is not intersecting but it still is inside the viewport, is to be considered intersected
|
|
9652
9652
|
__classPrivateFieldSet$2(this, _KupDataTable_theadIntersecting, true, "f");
|
|
9653
9653
|
}
|
|
@@ -9666,19 +9666,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9666
9666
|
if (this.tableHeight === undefined &&
|
|
9667
9667
|
this.tableWidth === undefined &&
|
|
9668
9668
|
this.headerIsPersistent) {
|
|
9669
|
-
__classPrivateFieldGet$
|
|
9669
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyHeaderPosition, "f").call(this);
|
|
9670
9670
|
}
|
|
9671
9671
|
});
|
|
9672
9672
|
};
|
|
9673
9673
|
const options = {
|
|
9674
9674
|
threshold: 0,
|
|
9675
|
-
rootMargin: '-' + __classPrivateFieldGet$
|
|
9675
|
+
rootMargin: '-' + __classPrivateFieldGet$4(this, _KupDataTable_navBarHeight, "f") + 'px 0px 0px 0px',
|
|
9676
9676
|
};
|
|
9677
9677
|
__classPrivateFieldSet$2(this, _KupDataTable_intObserver, new IntersectionObserver(callback, options), "f");
|
|
9678
9678
|
}, _KupDataTable_didLoadInteractables = function _KupDataTable_didLoadInteractables() {
|
|
9679
|
-
__classPrivateFieldGet$
|
|
9679
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableTouch, "f").push(__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"));
|
|
9680
9680
|
const tapCb = (e) => {
|
|
9681
|
-
if (__classPrivateFieldGet$
|
|
9681
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_hold, "f")) {
|
|
9682
9682
|
__classPrivateFieldSet$2(this, _KupDataTable_hold, false, "f");
|
|
9683
9683
|
return;
|
|
9684
9684
|
}
|
|
@@ -9691,11 +9691,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9691
9691
|
for (const key in e) {
|
|
9692
9692
|
clone[key] = e[key];
|
|
9693
9693
|
}
|
|
9694
|
-
__classPrivateFieldGet$
|
|
9694
|
+
__classPrivateFieldGet$4(this, _KupDataTable_clickTimeout, "f").push(setTimeout(() => {
|
|
9695
9695
|
this.kupDataTableClick.emit({
|
|
9696
9696
|
comp: this,
|
|
9697
9697
|
id: this.rootElement.id,
|
|
9698
|
-
details: __classPrivateFieldGet$
|
|
9698
|
+
details: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_clickHandler).call(this, clone),
|
|
9699
9699
|
});
|
|
9700
9700
|
}, 300));
|
|
9701
9701
|
break;
|
|
@@ -9704,7 +9704,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9704
9704
|
this.kupDataTableContextMenu.emit({
|
|
9705
9705
|
comp: this,
|
|
9706
9706
|
id: this.rootElement.id,
|
|
9707
|
-
details: __classPrivateFieldGet$
|
|
9707
|
+
details: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_contextMenuHandler).call(this, e),
|
|
9708
9708
|
});
|
|
9709
9709
|
break;
|
|
9710
9710
|
}
|
|
@@ -9713,17 +9713,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9713
9713
|
switch (e.button) {
|
|
9714
9714
|
// left click
|
|
9715
9715
|
case 0:
|
|
9716
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9717
|
-
clearTimeout(__classPrivateFieldGet$
|
|
9718
|
-
__classPrivateFieldGet$
|
|
9719
|
-
__classPrivateFieldGet$
|
|
9716
|
+
for (let index = 0; index < __classPrivateFieldGet$4(this, _KupDataTable_clickTimeout, "f").length; index++) {
|
|
9717
|
+
clearTimeout(__classPrivateFieldGet$4(this, _KupDataTable_clickTimeout, "f")[index]);
|
|
9718
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Cleared clickHandler timeout(' +
|
|
9719
|
+
__classPrivateFieldGet$4(this, _KupDataTable_clickTimeout, "f")[index] +
|
|
9720
9720
|
').');
|
|
9721
9721
|
}
|
|
9722
9722
|
__classPrivateFieldSet$2(this, _KupDataTable_clickTimeout, [], "f");
|
|
9723
9723
|
this.kupDataTableDblClick.emit({
|
|
9724
9724
|
comp: this,
|
|
9725
9725
|
id: this.rootElement.id,
|
|
9726
|
-
details: __classPrivateFieldGet$
|
|
9726
|
+
details: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_dblClickHandler).call(this, e),
|
|
9727
9727
|
});
|
|
9728
9728
|
break;
|
|
9729
9729
|
}
|
|
@@ -9734,40 +9734,40 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9734
9734
|
this.kupDataTableContextMenu.emit({
|
|
9735
9735
|
comp: this,
|
|
9736
9736
|
id: this.rootElement.id,
|
|
9737
|
-
details: __classPrivateFieldGet$
|
|
9737
|
+
details: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_contextMenuHandler).call(this, e),
|
|
9738
9738
|
});
|
|
9739
9739
|
}
|
|
9740
9740
|
};
|
|
9741
|
-
__classPrivateFieldGet$
|
|
9742
|
-
__classPrivateFieldGet$
|
|
9743
|
-
__classPrivateFieldGet$
|
|
9741
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"), kupManager.KupPointerEventTypes.TAP, tapCb);
|
|
9742
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"), kupManager.KupPointerEventTypes.DOUBLETAP, doubletapCb);
|
|
9743
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"), kupManager.KupPointerEventTypes.HOLD, holdCb);
|
|
9744
9744
|
}, _KupDataTable_didRenderInteractables = function _KupDataTable_didRenderInteractables() {
|
|
9745
9745
|
if (this.showGroups) {
|
|
9746
|
-
if (!__classPrivateFieldGet$
|
|
9747
|
-
__classPrivateFieldGet$
|
|
9748
|
-
__classPrivateFieldGet$
|
|
9746
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").includes(__classPrivateFieldGet$4(this, _KupDataTable_groupsDropareaRef, "f"))) {
|
|
9747
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").push(__classPrivateFieldGet$4(this, _KupDataTable_groupsDropareaRef, "f"));
|
|
9748
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.dropzone(__classPrivateFieldGet$4(this, _KupDataTable_groupsDropareaRef, "f"), {
|
|
9749
9749
|
accept: `[${kupManager.kupDraggableColumnAttr}]`,
|
|
9750
9750
|
}, null, {
|
|
9751
9751
|
drop: (e) => {
|
|
9752
9752
|
const draggedTh = e.relatedTarget;
|
|
9753
9753
|
const grouped = kupManager.getColumnByName(this.getColumns(), draggedTh.dataset.column);
|
|
9754
|
-
__classPrivateFieldGet$
|
|
9755
|
-
__classPrivateFieldGet$
|
|
9754
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnGroup).call(this, grouped);
|
|
9755
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager.kupDragActiveAttr);
|
|
9756
9756
|
},
|
|
9757
9757
|
});
|
|
9758
9758
|
}
|
|
9759
9759
|
}
|
|
9760
9760
|
if (this.removableColumns) {
|
|
9761
|
-
if (!__classPrivateFieldGet$
|
|
9762
|
-
__classPrivateFieldGet$
|
|
9763
|
-
__classPrivateFieldGet$
|
|
9761
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").includes(__classPrivateFieldGet$4(this, _KupDataTable_removeDropareaRef, "f"))) {
|
|
9762
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").push(__classPrivateFieldGet$4(this, _KupDataTable_removeDropareaRef, "f"));
|
|
9763
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.dropzone(__classPrivateFieldGet$4(this, _KupDataTable_removeDropareaRef, "f"), {
|
|
9764
9764
|
accept: `[${kupManager.kupDraggableColumnAttr}]`,
|
|
9765
9765
|
}, null, {
|
|
9766
9766
|
drop: (e) => {
|
|
9767
9767
|
const draggedTh = e.relatedTarget;
|
|
9768
9768
|
const deleted = kupManager.getColumnByName(this.getColumns(), draggedTh.dataset.column);
|
|
9769
9769
|
this.hideColumn(deleted);
|
|
9770
|
-
__classPrivateFieldGet$
|
|
9770
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager.kupDragActiveAttr);
|
|
9771
9771
|
},
|
|
9772
9772
|
});
|
|
9773
9773
|
}
|
|
@@ -9800,7 +9800,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9800
9800
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCardAnchor, e.target, "f");
|
|
9801
9801
|
if (receiving && starter) {
|
|
9802
9802
|
if (onlySort) {
|
|
9803
|
-
__classPrivateFieldGet$
|
|
9803
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnSort).call(this, receiving, starter);
|
|
9804
9804
|
}
|
|
9805
9805
|
else if (onlyMerge) {
|
|
9806
9806
|
this.newColumn(kupManager.KupDataNewColumnTypes.CONCATENATE, {
|
|
@@ -9808,17 +9808,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9808
9808
|
});
|
|
9809
9809
|
}
|
|
9810
9810
|
else {
|
|
9811
|
-
__classPrivateFieldGet$
|
|
9811
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_createDropCard).call(this, starter, receiving);
|
|
9812
9812
|
}
|
|
9813
9813
|
}
|
|
9814
|
-
__classPrivateFieldGet$
|
|
9814
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager.kupDragActiveAttr);
|
|
9815
9815
|
};
|
|
9816
9816
|
const startCb = (e) => {
|
|
9817
9817
|
const draggable = e.target;
|
|
9818
|
-
__classPrivateFieldGet$
|
|
9818
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, true, draggable);
|
|
9819
9819
|
};
|
|
9820
9820
|
const endCb = () => {
|
|
9821
|
-
__classPrivateFieldGet$
|
|
9821
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
9822
9822
|
};
|
|
9823
9823
|
const dropCallbacks = {
|
|
9824
9824
|
drop: dropCb,
|
|
@@ -9827,14 +9827,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9827
9827
|
start: startCb,
|
|
9828
9828
|
end: endCb,
|
|
9829
9829
|
};
|
|
9830
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9831
|
-
const th = __classPrivateFieldGet$
|
|
9832
|
-
if (th && !__classPrivateFieldGet$
|
|
9833
|
-
__classPrivateFieldGet$
|
|
9834
|
-
__classPrivateFieldGet$
|
|
9830
|
+
for (let index = 0; index < __classPrivateFieldGet$4(this, _KupDataTable_thRefs, "f").length; index++) {
|
|
9831
|
+
const th = __classPrivateFieldGet$4(this, _KupDataTable_thRefs, "f")[index];
|
|
9832
|
+
if (th && !__classPrivateFieldGet$4(this, _KupDataTable_interactableDrag, "f").includes(th)) {
|
|
9833
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableDrag, "f").push(th);
|
|
9834
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.dropzone(th, {
|
|
9835
9835
|
accept: `[${kupManager.kupDraggableColumnAttr}]`,
|
|
9836
9836
|
}, null, dropCallbacks);
|
|
9837
|
-
__classPrivateFieldGet$
|
|
9837
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.draggable(th, {
|
|
9838
9838
|
cursorChecker() {
|
|
9839
9839
|
return null;
|
|
9840
9840
|
},
|
|
@@ -9854,11 +9854,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9854
9854
|
const callbacks = {
|
|
9855
9855
|
move: moveCb,
|
|
9856
9856
|
};
|
|
9857
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9858
|
-
const th = __classPrivateFieldGet$
|
|
9859
|
-
if (th && !__classPrivateFieldGet$
|
|
9860
|
-
__classPrivateFieldGet$
|
|
9861
|
-
__classPrivateFieldGet$
|
|
9857
|
+
for (let index = 0; index < __classPrivateFieldGet$4(this, _KupDataTable_thRefs, "f").length; index++) {
|
|
9858
|
+
const th = __classPrivateFieldGet$4(this, _KupDataTable_thRefs, "f")[index];
|
|
9859
|
+
if (th && !__classPrivateFieldGet$4(this, _KupDataTable_interactableResize, "f").includes(th)) {
|
|
9860
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableResize, "f").push(th);
|
|
9861
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.resizable(th, {
|
|
9862
9862
|
allowFrom: '.header-cell__drag-handler',
|
|
9863
9863
|
edges: {
|
|
9864
9864
|
left: false,
|
|
@@ -9872,8 +9872,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9872
9872
|
}
|
|
9873
9873
|
}
|
|
9874
9874
|
if (this.dragEnabled) {
|
|
9875
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9876
|
-
const row = __classPrivateFieldGet$
|
|
9875
|
+
for (let index = 0; index < __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").length; index++) {
|
|
9876
|
+
const row = __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f")[index];
|
|
9877
9877
|
const dataCb = () => {
|
|
9878
9878
|
const cellEl = this.rootElement.shadowRoot.querySelector('td:hover');
|
|
9879
9879
|
return {
|
|
@@ -9886,9 +9886,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9886
9886
|
selectedRows: this.selectedRows,
|
|
9887
9887
|
};
|
|
9888
9888
|
};
|
|
9889
|
-
if (row && !__classPrivateFieldGet$
|
|
9890
|
-
__classPrivateFieldGet$
|
|
9891
|
-
__classPrivateFieldGet$
|
|
9889
|
+
if (row && !__classPrivateFieldGet$4(this, _KupDataTable_interactableDrag, "f").includes(row)) {
|
|
9890
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableDrag, "f").push(row);
|
|
9891
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.draggable(row, {
|
|
9892
9892
|
allowFrom: 'td',
|
|
9893
9893
|
cursorChecker() {
|
|
9894
9894
|
return null;
|
|
@@ -9903,11 +9903,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9903
9903
|
const dataCb = () => {
|
|
9904
9904
|
const cell = this.rootElement.shadowRoot.querySelector('td:hover');
|
|
9905
9905
|
if (!cell) {
|
|
9906
|
-
__classPrivateFieldGet$
|
|
9906
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, "Couldn't find cell hovered to retrieve dropzone informations!", kupManager.KupDebugCategory.WARNING);
|
|
9907
9907
|
return;
|
|
9908
9908
|
}
|
|
9909
|
-
const path = __classPrivateFieldGet$
|
|
9910
|
-
const receivingDetails = __classPrivateFieldGet$
|
|
9909
|
+
const path = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").getEventPath(cell, this.rootElement);
|
|
9910
|
+
const receivingDetails = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, path);
|
|
9911
9911
|
return {
|
|
9912
9912
|
cell: receivingDetails.cell,
|
|
9913
9913
|
column: receivingDetails.column,
|
|
@@ -9915,11 +9915,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9915
9915
|
row: receivingDetails.row,
|
|
9916
9916
|
};
|
|
9917
9917
|
};
|
|
9918
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9919
|
-
const row = __classPrivateFieldGet$
|
|
9920
|
-
if (row && !__classPrivateFieldGet$
|
|
9921
|
-
__classPrivateFieldGet$
|
|
9922
|
-
__classPrivateFieldGet$
|
|
9918
|
+
for (let index = 0; index < __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").length; index++) {
|
|
9919
|
+
const row = __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f")[index];
|
|
9920
|
+
if (row && !__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").includes(row)) {
|
|
9921
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").push(row);
|
|
9922
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.dropzone(row, {
|
|
9923
9923
|
accept: `[${kupManager.kupDraggableCellAttr}]`,
|
|
9924
9924
|
}, {
|
|
9925
9925
|
callback: dataCb,
|
|
@@ -9933,44 +9933,44 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9933
9933
|
if (this.headerIsPersistent &&
|
|
9934
9934
|
this.tableHeight === undefined &&
|
|
9935
9935
|
this.tableWidth === undefined) {
|
|
9936
|
-
__classPrivateFieldGet$
|
|
9937
|
-
__classPrivateFieldGet$
|
|
9936
|
+
__classPrivateFieldGet$4(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"));
|
|
9937
|
+
__classPrivateFieldGet$4(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$4(this, _KupDataTable_theadRef, "f"));
|
|
9938
9938
|
}
|
|
9939
9939
|
}, _KupDataTable_didRenderObservers = function _KupDataTable_didRenderObservers() {
|
|
9940
|
-
if (__classPrivateFieldGet$
|
|
9941
|
-
__classPrivateFieldGet$
|
|
9940
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_paginatedRowsLength, "f") < __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f") && this.lazyLoadRows) {
|
|
9941
|
+
__classPrivateFieldGet$4(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f")[__classPrivateFieldGet$4(this, _KupDataTable_paginatedRowsLength, "f") - 1]);
|
|
9942
9942
|
}
|
|
9943
9943
|
}, _KupDataTable_didLoadEventHandling = function _KupDataTable_didLoadEventHandling() {
|
|
9944
|
-
__classPrivateFieldGet$
|
|
9944
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f").addEventListener('scroll', () => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_scrollStickyHeader).call(this));
|
|
9945
9945
|
}, _KupDataTable_scrollStickyHeader = function _KupDataTable_scrollStickyHeader() {
|
|
9946
|
-
if (!__classPrivateFieldGet$
|
|
9946
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
9947
9947
|
return;
|
|
9948
9948
|
}
|
|
9949
|
-
__classPrivateFieldGet$
|
|
9949
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").scrollLeft = __classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f").scrollLeft;
|
|
9950
9950
|
}, _KupDataTable_checkScrollOnHover = function _KupDataTable_checkScrollOnHover() {
|
|
9951
|
-
if (!__classPrivateFieldGet$
|
|
9951
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").scrollOnHover.isRegistered(__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f"))) {
|
|
9952
9952
|
if (this.scrollOnHover &&
|
|
9953
9953
|
this.tableHeight === undefined &&
|
|
9954
9954
|
this.tableWidth === undefined) {
|
|
9955
|
-
__classPrivateFieldGet$
|
|
9955
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").scrollOnHover.register(__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f"));
|
|
9956
9956
|
}
|
|
9957
9957
|
}
|
|
9958
9958
|
else {
|
|
9959
9959
|
if (!this.scrollOnHover &&
|
|
9960
9960
|
(this.tableHeight !== undefined ||
|
|
9961
9961
|
this.tableWidth !== undefined)) {
|
|
9962
|
-
__classPrivateFieldGet$
|
|
9962
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").scrollOnHover.unregister(__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f"));
|
|
9963
9963
|
}
|
|
9964
9964
|
}
|
|
9965
9965
|
}, _KupDataTable_customizePanelPosition = function _KupDataTable_customizePanelPosition() {
|
|
9966
|
-
if (__classPrivateFieldGet$
|
|
9967
|
-
!__classPrivateFieldGet$
|
|
9968
|
-
__classPrivateFieldGet$
|
|
9966
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_customizeTopButtonRef, "f") &&
|
|
9967
|
+
!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f"))) {
|
|
9968
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f"), __classPrivateFieldGet$4(this, _KupDataTable_customizeTopButtonRef, "f"), 0, kupManager.KupDynamicPositionPlacement.BOTTOM, true);
|
|
9969
9969
|
}
|
|
9970
9970
|
}, _KupDataTable_rowsPointLength = function _KupDataTable_rowsPointLength() {
|
|
9971
|
-
return __classPrivateFieldGet$
|
|
9971
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, __classPrivateFieldGet$4(this, _KupDataTable_rows, "f"));
|
|
9972
9972
|
}, _KupDataTable_paginatedRowsPointLength = function _KupDataTable_paginatedRowsPointLength() {
|
|
9973
|
-
return __classPrivateFieldGet$
|
|
9973
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, __classPrivateFieldGet$4(this, _KupDataTable_paginatedRows, "f"));
|
|
9974
9974
|
}, _KupDataTable__rowsLength = function _KupDataTable__rowsLength(r) {
|
|
9975
9975
|
if (r == null) {
|
|
9976
9976
|
return 0;
|
|
@@ -9983,14 +9983,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9983
9983
|
}
|
|
9984
9984
|
count += 1;
|
|
9985
9985
|
if (row.group != null) {
|
|
9986
|
-
count += __classPrivateFieldGet$
|
|
9986
|
+
count += __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, row.group.children);
|
|
9987
9987
|
}
|
|
9988
9988
|
}
|
|
9989
9989
|
return count;
|
|
9990
9990
|
}, _KupDataTable_setDynPosElements = function _KupDataTable_setDynPosElements() {
|
|
9991
9991
|
// Column menu
|
|
9992
|
-
if (__classPrivateFieldGet$
|
|
9993
|
-
__classPrivateFieldGet$
|
|
9992
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f") && __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").data) {
|
|
9993
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").data = __classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").prepData(this, kupManager.getColumnByName(this.getVisibleColumns(), this.columnMenuAnchor), __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").data);
|
|
9994
9994
|
}
|
|
9995
9995
|
}, _KupDataTable_resetSelectedRows = function _KupDataTable_resetSelectedRows() {
|
|
9996
9996
|
if (this.getRows().length === 0)
|
|
@@ -10014,7 +10014,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10014
10014
|
return undefined;
|
|
10015
10015
|
}
|
|
10016
10016
|
}, _KupDataTable_rowDetail = function _KupDataTable_rowDetail(row, x, y) {
|
|
10017
|
-
const transposedData = __classPrivateFieldGet$
|
|
10017
|
+
const transposedData = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getTransposedData).call(this);
|
|
10018
10018
|
const cardData = {
|
|
10019
10019
|
button: [
|
|
10020
10020
|
{
|
|
@@ -10043,7 +10043,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10043
10043
|
showHeader: false,
|
|
10044
10044
|
},
|
|
10045
10045
|
],
|
|
10046
|
-
text: [__classPrivateFieldGet$
|
|
10046
|
+
text: [__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.DETAIL)],
|
|
10047
10047
|
};
|
|
10048
10048
|
const columns = cardData.datatable[0].data.columns;
|
|
10049
10049
|
const rows = cardData.datatable[0].data.rows;
|
|
@@ -10067,7 +10067,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10067
10067
|
currentColumn.visible = true;
|
|
10068
10068
|
}
|
|
10069
10069
|
else {
|
|
10070
|
-
__classPrivateFieldGet$
|
|
10070
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Invalid column name on row ID (' +
|
|
10071
10071
|
row.id +
|
|
10072
10072
|
"), couldn't set current record!", kupManager.KupDebugCategory.WARNING);
|
|
10073
10073
|
}
|
|
@@ -10076,7 +10076,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10076
10076
|
for (let index = 0; index < rows.length; index++) {
|
|
10077
10077
|
const column = this.data.columns.find((x) => x.name === rows[index].transposedColumnName);
|
|
10078
10078
|
if (!column) {
|
|
10079
|
-
__classPrivateFieldGet$
|
|
10079
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Column not found on row name (' + column + ')!', kupManager.KupDebugCategory.WARNING);
|
|
10080
10080
|
return;
|
|
10081
10081
|
}
|
|
10082
10082
|
const editable = rows[index].cells[row.id].isEditable
|
|
@@ -10100,8 +10100,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10100
10100
|
resource: editable ? 'edit-key' : 'key-variant',
|
|
10101
10101
|
},
|
|
10102
10102
|
title: editable
|
|
10103
|
-
? __classPrivateFieldGet$
|
|
10104
|
-
: __classPrivateFieldGet$
|
|
10103
|
+
? __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.EDITABLE_KEY)
|
|
10104
|
+
: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.KEY),
|
|
10105
10105
|
value: editable ? 'edit-key' : 'key-variant',
|
|
10106
10106
|
};
|
|
10107
10107
|
}
|
|
@@ -10116,7 +10116,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10116
10116
|
color: `var(${kupManager.KupThemeColorValues.TEXT})`,
|
|
10117
10117
|
resource: 'pencil',
|
|
10118
10118
|
},
|
|
10119
|
-
title: __classPrivateFieldGet$
|
|
10119
|
+
title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EDITABLE_FIELD),
|
|
10120
10120
|
value: 'pencil',
|
|
10121
10121
|
};
|
|
10122
10122
|
}
|
|
@@ -10138,35 +10138,35 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10138
10138
|
}
|
|
10139
10139
|
rows[index].cells[kupManager.iconColumn.toUpperCase()] = iconCell;
|
|
10140
10140
|
}
|
|
10141
|
-
if (!__classPrivateFieldGet$
|
|
10141
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f")) {
|
|
10142
10142
|
__classPrivateFieldSet$2(this, _KupDataTable_detailCard, document.createElement('kup-card'), "f");
|
|
10143
|
-
__classPrivateFieldGet$
|
|
10144
|
-
__classPrivateFieldGet$
|
|
10145
|
-
__classPrivateFieldGet$
|
|
10146
|
-
__classPrivateFieldGet$
|
|
10143
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").layoutFamily = kupManager.KupCardFamily.DIALOG;
|
|
10144
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").layoutNumber = 4;
|
|
10145
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").sizeX = 'auto';
|
|
10146
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").sizeY = 'auto';
|
|
10147
10147
|
}
|
|
10148
10148
|
else {
|
|
10149
|
-
const children = Array.prototype.slice.call(__classPrivateFieldGet$
|
|
10149
|
+
const children = Array.prototype.slice.call(__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").children, 0);
|
|
10150
10150
|
for (let index = 0; index < children.length; index++) {
|
|
10151
10151
|
children[index].remove();
|
|
10152
10152
|
}
|
|
10153
10153
|
}
|
|
10154
|
-
__classPrivateFieldGet$
|
|
10155
|
-
__classPrivateFieldGet$
|
|
10156
|
-
__classPrivateFieldGet$
|
|
10157
|
-
__classPrivateFieldGet$
|
|
10158
|
-
__classPrivateFieldGet$
|
|
10159
|
-
__classPrivateFieldGet$
|
|
10160
|
-
__classPrivateFieldGet$
|
|
10161
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
10154
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").data = cardData;
|
|
10155
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").style.position = 'fixed';
|
|
10156
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").style.left = '0';
|
|
10157
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").style.top = '0';
|
|
10158
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").setAttribute('data-x', x.toString());
|
|
10159
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").setAttribute('data-y', y.toString());
|
|
10160
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
|
10161
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f"));
|
|
10162
10162
|
}, _KupDataTable_rowInsertForm = function _KupDataTable_rowInsertForm() {
|
|
10163
10163
|
const CARD_WIDTH = 400;
|
|
10164
10164
|
const CARD_HEIGHT = 400;
|
|
10165
10165
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, document.createElement('kup-card'), "f");
|
|
10166
|
-
__classPrivateFieldGet$
|
|
10167
|
-
__classPrivateFieldGet$
|
|
10168
|
-
__classPrivateFieldGet$
|
|
10169
|
-
__classPrivateFieldGet$
|
|
10166
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").layoutFamily = kupManager.KupCardFamily.FREE;
|
|
10167
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").layoutNumber = 1;
|
|
10168
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").sizeX = CARD_WIDTH + 'px';
|
|
10169
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").sizeY = CARD_HEIGHT + 'px';
|
|
10170
10170
|
const style = document.createElement('style');
|
|
10171
10171
|
style.innerText =
|
|
10172
10172
|
'kup-form { max-height: 40vh; overflow: auto; } .page-wrapper { display: grid; } ' +
|
|
@@ -10174,24 +10174,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10174
10174
|
'.message-wrapper { display: none; justify-content: start; padding-top: 5px; padding-bottom: 5px; } ' +
|
|
10175
10175
|
'.errorIcon { --kup-icon-color: var(--kup-danger-color); } ' +
|
|
10176
10176
|
'.message { background-color: var(--kup-danger-color); color: white; padding: 3px; } ';
|
|
10177
|
-
__classPrivateFieldGet$
|
|
10177
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").append(style);
|
|
10178
10178
|
const pageWrapper = document.createElement('div');
|
|
10179
10179
|
pageWrapper.className = 'page-wrapper';
|
|
10180
10180
|
const buttonWrapper = document.createElement('div');
|
|
10181
10181
|
buttonWrapper.className = 'button-wrapper';
|
|
10182
10182
|
const cancel = document.createElement('kup-button');
|
|
10183
10183
|
const confirm = document.createElement('kup-button');
|
|
10184
|
-
cancel.id = __classPrivateFieldGet$
|
|
10184
|
+
cancel.id = __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_CANCEL_ID, "f");
|
|
10185
10185
|
cancel.icon = 'clear';
|
|
10186
|
-
cancel.label = __classPrivateFieldGet$
|
|
10186
|
+
cancel.label = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.ABORT);
|
|
10187
10187
|
cancel.styling = fButtonDeclarations.FButtonStyling.FLAT;
|
|
10188
10188
|
cancel.addEventListener('kup-button-click', () => {
|
|
10189
|
-
__classPrivateFieldGet$
|
|
10189
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").remove();
|
|
10190
10190
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, null, "f");
|
|
10191
10191
|
});
|
|
10192
|
-
confirm.id = __classPrivateFieldGet$
|
|
10192
|
+
confirm.id = __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_SUBMIT_ID, "f");
|
|
10193
10193
|
confirm.icon = 'check';
|
|
10194
|
-
confirm.label = __classPrivateFieldGet$
|
|
10194
|
+
confirm.label = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.CONFIRM);
|
|
10195
10195
|
let innerComp = document.createElement('kup-spinner');
|
|
10196
10196
|
innerComp.slot = 'spinner';
|
|
10197
10197
|
innerComp.dimensions = '0.6em';
|
|
@@ -10210,7 +10210,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10210
10210
|
buttonWrapper.append(cancel);
|
|
10211
10211
|
buttonWrapper.append(confirm);
|
|
10212
10212
|
const form = document.createElement('kup-form');
|
|
10213
|
-
form.id = __classPrivateFieldGet$
|
|
10213
|
+
form.id = __classPrivateFieldGet$4(this, _KupDataTable_FIELDS_FORM_ID, "f");
|
|
10214
10214
|
const row = {
|
|
10215
10215
|
cells: {},
|
|
10216
10216
|
id: '0',
|
|
@@ -10230,7 +10230,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10230
10230
|
};
|
|
10231
10231
|
const messageWrapper = document.createElement('div');
|
|
10232
10232
|
messageWrapper.className = 'message-wrapper';
|
|
10233
|
-
messageWrapper.id = __classPrivateFieldGet$
|
|
10233
|
+
messageWrapper.id = __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f");
|
|
10234
10234
|
const icon = document.createElement('kup-image');
|
|
10235
10235
|
icon.className = 'errorIcon';
|
|
10236
10236
|
icon.resource = 'cancel';
|
|
@@ -10239,43 +10239,43 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10239
10239
|
messageWrapper.append(icon);
|
|
10240
10240
|
const message = document.createElement('span');
|
|
10241
10241
|
message.className = 'message';
|
|
10242
|
-
message.id = __classPrivateFieldGet$
|
|
10242
|
+
message.id = __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_ID, "f");
|
|
10243
10243
|
let msg = '';
|
|
10244
10244
|
message.innerText = msg;
|
|
10245
10245
|
messageWrapper.append(message);
|
|
10246
10246
|
pageWrapper.append(messageWrapper);
|
|
10247
10247
|
pageWrapper.append(form);
|
|
10248
10248
|
pageWrapper.append(buttonWrapper);
|
|
10249
|
-
__classPrivateFieldGet$
|
|
10250
|
-
__classPrivateFieldGet$
|
|
10251
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
10249
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").append(pageWrapper);
|
|
10250
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").data = {};
|
|
10251
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f"));
|
|
10252
10252
|
}, _KupDataTable_rowsDelete = function _KupDataTable_rowsDelete() {
|
|
10253
10253
|
const createDeleteCard = () => {
|
|
10254
10254
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteDialog, document.createElement('kup-dialog'), "f");
|
|
10255
10255
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteCard, document.createElement('kup-card'), "f");
|
|
10256
|
-
__classPrivateFieldGet$
|
|
10257
|
-
__classPrivateFieldGet$
|
|
10258
|
-
__classPrivateFieldGet$
|
|
10259
|
-
__classPrivateFieldGet$
|
|
10256
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").layoutFamily = kupManager.KupCardFamily.FREE;
|
|
10257
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").layoutNumber = 1;
|
|
10258
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").sizeX = 'auto';
|
|
10259
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").sizeY = 'auto';
|
|
10260
10260
|
const style = document.createElement('style');
|
|
10261
10261
|
style.innerText =
|
|
10262
10262
|
'.button-wrapper, .message-wrapper { display: flex; justify-content: space-around; z-index: var(--kup-card-zindex); } .message-wrapper { padding-bottom: 20px; }';
|
|
10263
10263
|
const messageWrapper = document.createElement('div');
|
|
10264
10264
|
messageWrapper.className = 'message-wrapper';
|
|
10265
|
-
messageWrapper.id = __classPrivateFieldGet$
|
|
10265
|
+
messageWrapper.id = __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f");
|
|
10266
10266
|
const message = document.createElement('span');
|
|
10267
10267
|
message.className = 'message';
|
|
10268
|
-
message.id = __classPrivateFieldGet$
|
|
10269
|
-
let msg = __classPrivateFieldGet$
|
|
10268
|
+
message.id = __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_ID, "f");
|
|
10269
|
+
let msg = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.CONFIRM_DELETE_X_ROWS);
|
|
10270
10270
|
msg = msg.replace('{0}', this.selectedRows.length + '');
|
|
10271
10271
|
message.innerText = msg;
|
|
10272
10272
|
messageWrapper.append(message);
|
|
10273
10273
|
const buttonWrapper = document.createElement('div');
|
|
10274
10274
|
buttonWrapper.className = 'button-wrapper';
|
|
10275
10275
|
const confirm = document.createElement('kup-button');
|
|
10276
|
-
confirm.id = __classPrivateFieldGet$
|
|
10276
|
+
confirm.id = __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_SUBMIT_ID, "f");
|
|
10277
10277
|
confirm.icon = 'check';
|
|
10278
|
-
confirm.label = __classPrivateFieldGet$
|
|
10278
|
+
confirm.label = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.CONFIRM);
|
|
10279
10279
|
let innerComp = document.createElement('kup-spinner');
|
|
10280
10280
|
innerComp.slot = 'spinner';
|
|
10281
10281
|
innerComp.dimensions = '0.6em';
|
|
@@ -10290,17 +10290,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10290
10290
|
});
|
|
10291
10291
|
});
|
|
10292
10292
|
buttonWrapper.append(confirm);
|
|
10293
|
-
__classPrivateFieldGet$
|
|
10294
|
-
__classPrivateFieldGet$
|
|
10295
|
-
__classPrivateFieldGet$
|
|
10296
|
-
__classPrivateFieldGet$
|
|
10297
|
-
__classPrivateFieldGet$
|
|
10298
|
-
document.querySelector('body').append(__classPrivateFieldGet$
|
|
10293
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").append(style);
|
|
10294
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").append(messageWrapper);
|
|
10295
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").append(buttonWrapper);
|
|
10296
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").data = {};
|
|
10297
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteDialog, "f").append(__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f"));
|
|
10298
|
+
document.querySelector('body').append(__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteDialog, "f"));
|
|
10299
10299
|
};
|
|
10300
10300
|
const insertRowsIds = [];
|
|
10301
10301
|
const startingRows = [];
|
|
10302
10302
|
this.selectedRows.forEach((row) => {
|
|
10303
|
-
if (row.id.indexOf(__classPrivateFieldGet$
|
|
10303
|
+
if (row.id.indexOf(__classPrivateFieldGet$4(this, _KupDataTable_INSERT_PREFIX, "f")) > -1) {
|
|
10304
10304
|
insertRowsIds.push(row.id);
|
|
10305
10305
|
}
|
|
10306
10306
|
else {
|
|
@@ -10405,15 +10405,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10405
10405
|
tr: tr ? tr : null,
|
|
10406
10406
|
};
|
|
10407
10407
|
}, _KupDataTable_clickHandler = function _KupDataTable_clickHandler(e) {
|
|
10408
|
-
const details = __classPrivateFieldGet$
|
|
10408
|
+
const details = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10409
10409
|
if (details.area === 'header') {
|
|
10410
10410
|
if (details.th && details.column) {
|
|
10411
10411
|
if (details.filterRemove) {
|
|
10412
|
-
__classPrivateFieldGet$
|
|
10412
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onRemoveFilter).call(this, details.column);
|
|
10413
10413
|
return details;
|
|
10414
10414
|
}
|
|
10415
10415
|
else if (this.sortEnabled) {
|
|
10416
|
-
__classPrivateFieldGet$
|
|
10416
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onColumnSort).call(this, e, details.column.name);
|
|
10417
10417
|
return details;
|
|
10418
10418
|
}
|
|
10419
10419
|
}
|
|
@@ -10428,22 +10428,22 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10428
10428
|
}
|
|
10429
10429
|
details.tr.classList.add('focus');
|
|
10430
10430
|
if (e.ctrlKey || e.metaKey) {
|
|
10431
|
-
__classPrivateFieldGet$
|
|
10431
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_rowDetail).call(this, Object.assign({}, details.row), e.clientX, e.clientY);
|
|
10432
10432
|
return details;
|
|
10433
10433
|
}
|
|
10434
10434
|
}
|
|
10435
10435
|
if (details.tr && details.row && details.isGroupRow) {
|
|
10436
|
-
__classPrivateFieldGet$
|
|
10436
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onRowExpand).call(this, details.row);
|
|
10437
10437
|
return details;
|
|
10438
10438
|
}
|
|
10439
10439
|
if (details.td && details.row && !details.textfield) {
|
|
10440
|
-
__classPrivateFieldGet$
|
|
10440
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, details.row, details.td, true);
|
|
10441
10441
|
return details;
|
|
10442
10442
|
}
|
|
10443
10443
|
}
|
|
10444
10444
|
return details;
|
|
10445
10445
|
}, _KupDataTable_contextMenuHandler = function _KupDataTable_contextMenuHandler(e) {
|
|
10446
|
-
const details = __classPrivateFieldGet$
|
|
10446
|
+
const details = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10447
10447
|
if (details.area === 'header') {
|
|
10448
10448
|
if (details.th && details.column) {
|
|
10449
10449
|
this.openColumnMenu(details.column.name);
|
|
@@ -10453,34 +10453,34 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10453
10453
|
else if (details.area === 'footer') {
|
|
10454
10454
|
if (details.td && details.column) {
|
|
10455
10455
|
__classPrivateFieldSet$2(this, _KupDataTable_totalMenuCoords, { x: e.clientX, y: e.clientY }, "f");
|
|
10456
|
-
__classPrivateFieldGet$
|
|
10456
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onTotalMenuOpen).call(this, details.column);
|
|
10457
10457
|
return details;
|
|
10458
10458
|
}
|
|
10459
10459
|
}
|
|
10460
10460
|
return details;
|
|
10461
10461
|
}, _KupDataTable_dblClickHandler = function _KupDataTable_dblClickHandler(e) {
|
|
10462
|
-
const details = __classPrivateFieldGet$
|
|
10462
|
+
const details = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10463
10463
|
if (details.area === 'body') {
|
|
10464
10464
|
if (this.selection == kupManager.SelectionMode.MULTIPLE) {
|
|
10465
|
-
__classPrivateFieldGet$
|
|
10465
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
10466
10466
|
}
|
|
10467
10467
|
if (this.selection == kupManager.SelectionMode.SINGLE ||
|
|
10468
10468
|
this.selection == kupManager.SelectionMode.MULTIPLE) {
|
|
10469
|
-
__classPrivateFieldGet$
|
|
10469
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, details.row, details.td, false);
|
|
10470
10470
|
}
|
|
10471
10471
|
}
|
|
10472
10472
|
return details;
|
|
10473
10473
|
}, _KupDataTable_initRows = function _KupDataTable_initRows() {
|
|
10474
|
-
__classPrivateFieldGet$
|
|
10475
|
-
__classPrivateFieldSet$2(this, _KupDataTable_footer, fPaginatorUtils.calcTotals(fPaginatorUtils.normalizeRows(this.getColumns(), __classPrivateFieldGet$
|
|
10476
|
-
__classPrivateFieldGet$
|
|
10477
|
-
__classPrivateFieldGet$
|
|
10478
|
-
__classPrivateFieldGet$
|
|
10479
|
-
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRows, fPaginatorUtils.paginateRows(__classPrivateFieldGet$
|
|
10480
|
-
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRowsLength, __classPrivateFieldGet$
|
|
10474
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_filterRows).call(this);
|
|
10475
|
+
__classPrivateFieldSet$2(this, _KupDataTable_footer, fPaginatorUtils.calcTotals(fPaginatorUtils.normalizeRows(this.getColumns(), __classPrivateFieldGet$4(this, _KupDataTable_rows, "f")), this.totals), "f");
|
|
10476
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_groupRows).call(this);
|
|
10477
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_sortRows).call(this);
|
|
10478
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
10479
|
+
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRows, fPaginatorUtils.paginateRows(__classPrivateFieldGet$4(this, _KupDataTable_rows, "f"), this.currentPage, this.currentRowsPerPage, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)), "f");
|
|
10480
|
+
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRowsLength, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_paginatedRowsPointLength).call(this), "f");
|
|
10481
10481
|
}, _KupDataTable_filterRows = function _KupDataTable_filterRows() {
|
|
10482
10482
|
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.filterRows(this.getRows(), this.filters, this.globalFilterValue, this.getColumns()), "f");
|
|
10483
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rowsLength, __classPrivateFieldGet$
|
|
10483
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rowsLength, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_rowsPointLength).call(this), "f");
|
|
10484
10484
|
}, _KupDataTable_isGrouping = function _KupDataTable_isGrouping() {
|
|
10485
10485
|
return this.groups && this.groups.length > 0;
|
|
10486
10486
|
}, _KupDataTable_hasRowActions = function _KupDataTable_hasRowActions() {
|
|
@@ -10494,19 +10494,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10494
10494
|
}, _KupDataTable_hasTotals = function _KupDataTable_hasTotals() {
|
|
10495
10495
|
return this.totals && Object.keys(this.totals).length > 0;
|
|
10496
10496
|
}, _KupDataTable_tableHasAutoWidth = function _KupDataTable_tableHasAutoWidth() {
|
|
10497
|
-
if (!__classPrivateFieldGet$
|
|
10497
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")) {
|
|
10498
10498
|
return;
|
|
10499
10499
|
}
|
|
10500
10500
|
const visibleCols = this.getVisibleColumns();
|
|
10501
10501
|
// Before checking each column, controls that visible columns are as many as items with custom sizes.
|
|
10502
10502
|
// If there are more visible columns, it means that the width of the table will be set to auto.
|
|
10503
|
-
if (visibleCols.length <= __classPrivateFieldGet$
|
|
10503
|
+
if (visibleCols.length <= __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f").length) {
|
|
10504
10504
|
let found = false;
|
|
10505
10505
|
// Each visible column must have its own width for the table to have a auto width
|
|
10506
10506
|
for (let i = 0; i < visibleCols.length; i++) {
|
|
10507
10507
|
found = false;
|
|
10508
|
-
for (let j = 0; j < __classPrivateFieldGet$
|
|
10509
|
-
if (visibleCols[i].name === __classPrivateFieldGet$
|
|
10508
|
+
for (let j = 0; j < __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f").length; j++) {
|
|
10509
|
+
if (visibleCols[i].name === __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")[j].name) {
|
|
10510
10510
|
found = true;
|
|
10511
10511
|
break;
|
|
10512
10512
|
}
|
|
@@ -10519,8 +10519,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10519
10519
|
}
|
|
10520
10520
|
return false;
|
|
10521
10521
|
}, _KupDataTable_forceGroupExpansion = function _KupDataTable_forceGroupExpansion() {
|
|
10522
|
-
__classPrivateFieldGet$
|
|
10523
|
-
__classPrivateFieldGet$
|
|
10522
|
+
__classPrivateFieldGet$4(this, _KupDataTable_rows, "f").forEach((row) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, row));
|
|
10523
|
+
__classPrivateFieldGet$4(this, _KupDataTable_paginatedRows, "f").forEach((row) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, row));
|
|
10524
10524
|
}, _KupDataTable_forceRowGroupExpansion = function _KupDataTable_forceRowGroupExpansion(row) {
|
|
10525
10525
|
// check if row is group
|
|
10526
10526
|
if (!row.group) {
|
|
@@ -10541,10 +10541,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10541
10541
|
}
|
|
10542
10542
|
this.groupState[row.group.id] = groupState;
|
|
10543
10543
|
if (row.group.children) {
|
|
10544
|
-
row.group.children.forEach((childRow) => __classPrivateFieldGet$
|
|
10544
|
+
row.group.children.forEach((childRow) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, childRow));
|
|
10545
10545
|
}
|
|
10546
10546
|
}, _KupDataTable_adjustPaginator = function _KupDataTable_adjustPaginator() {
|
|
10547
|
-
const numberOfRows = __classPrivateFieldGet$
|
|
10547
|
+
const numberOfRows = __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f");
|
|
10548
10548
|
// check if current page is valid
|
|
10549
10549
|
const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
|
|
10550
10550
|
if (this.currentPage > numberOfPages) {
|
|
@@ -10553,7 +10553,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10553
10553
|
this.resetCurrentPage();
|
|
10554
10554
|
}
|
|
10555
10555
|
}, _KupDataTable_composeFixedCellStyleAndClass = function _KupDataTable_composeFixedCellStyleAndClass(columnCssIndex, rowCssIndex, extraCellsCount = 0) {
|
|
10556
|
-
if (__classPrivateFieldGet$
|
|
10556
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
10557
10557
|
return undefined;
|
|
10558
10558
|
}
|
|
10559
10559
|
//-- Controls if there are fixed rows or columns --
|
|
@@ -10590,20 +10590,20 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10590
10590
|
}, _KupDataTable_updateFixedRowsAndColumnsCssVariables = function _KupDataTable_updateFixedRowsAndColumnsCssVariables() {
|
|
10591
10591
|
// [ffbf] - Using getBoundingClientRect is mandatory since Firefox return a wrong value for ele.offsetHeight and witdh values
|
|
10592
10592
|
// When grouping, the fixed rows and columns are not sticky
|
|
10593
|
-
if (__classPrivateFieldGet$
|
|
10593
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) || !__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"))
|
|
10594
10594
|
return false;
|
|
10595
10595
|
let toRet = false;
|
|
10596
10596
|
if (this.fixedRows >= 1) {
|
|
10597
|
-
let currentRow = __classPrivateFieldGet$
|
|
10597
|
+
let currentRow = __classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type');
|
|
10598
10598
|
// The height must start from the height of the header. BUT not on Safari.
|
|
10599
10599
|
// Safari handles the sticky position on the tables in a different way, making it start from the tbody element
|
|
10600
10600
|
// and not on the table with a specified position of sticky. There fore in that case we must set initial height to 0.
|
|
10601
|
-
let previousHeight = !__classPrivateFieldGet$
|
|
10602
|
-
? __classPrivateFieldGet$
|
|
10601
|
+
let previousHeight = !__classPrivateFieldGet$4(this, _KupDataTable_isSafariBrowser, "f")
|
|
10602
|
+
? __classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").querySelector('thead > tr:first-of-type > th:first-of-type').getBoundingClientRect().height // [ffbf]
|
|
10603
10603
|
: 0;
|
|
10604
10604
|
// [CSSCount] - I must start from 1 since we are referencing html elements e not array (with CSS selectors starting from 1)
|
|
10605
10605
|
for (let i = 1; i <= this.fixedRows && currentRow; i++) {
|
|
10606
|
-
__classPrivateFieldGet$
|
|
10606
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f").style.setProperty(kupManager.FixedCellsCSSVarsBase.rows + i, previousHeight + 'px');
|
|
10607
10607
|
previousHeight += currentRow.children[0].getBoundingClientRect().height; // [ffbf]
|
|
10608
10608
|
currentRow =
|
|
10609
10609
|
currentRow.nextElementSibling;
|
|
@@ -10611,14 +10611,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10611
10611
|
toRet = true;
|
|
10612
10612
|
}
|
|
10613
10613
|
if (this.fixedColumns >= 1) {
|
|
10614
|
-
let currentCell = __classPrivateFieldGet$
|
|
10614
|
+
let currentCell = __classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type > td:first-of-type');
|
|
10615
10615
|
let previousWidth = 0;
|
|
10616
10616
|
const totalFixedColumns = this.fixedColumns +
|
|
10617
|
-
(__classPrivateFieldGet$
|
|
10617
|
+
(__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ? 1 : 0) +
|
|
10618
10618
|
(this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX ? 1 : 0);
|
|
10619
10619
|
// @See [CSSCount]
|
|
10620
10620
|
for (let i = 1; i <= totalFixedColumns && currentCell; i++) {
|
|
10621
|
-
__classPrivateFieldGet$
|
|
10621
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f").style.setProperty(kupManager.FixedCellsCSSVarsBase.columns + i, previousWidth + 'px');
|
|
10622
10622
|
previousWidth += currentCell.getBoundingClientRect().width; // [ffbf]
|
|
10623
10623
|
currentCell =
|
|
10624
10624
|
currentCell.nextElementSibling;
|
|
@@ -10666,10 +10666,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10666
10666
|
// resetting current page
|
|
10667
10667
|
this.resetCurrentPage();
|
|
10668
10668
|
const newFilters = Object.assign({}, this.filters);
|
|
10669
|
-
__classPrivateFieldGet$
|
|
10669
|
+
__classPrivateFieldGet$4(this, _KupDataTable_filtersColumnMenuInstance, "f").removeFilter(newFilters, column.name);
|
|
10670
10670
|
this.filters = newFilters;
|
|
10671
10671
|
}, _KupDataTable_getFilterValueForTooltip = function _KupDataTable_getFilterValueForTooltip(column) {
|
|
10672
|
-
return __classPrivateFieldGet$
|
|
10672
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_filtersColumnMenuInstance, "f").getFilterValueForTooltip(this.filters, column);
|
|
10673
10673
|
}, _KupDataTable_onGlobalFilterChange = function _KupDataTable_onGlobalFilterChange(inputEl) {
|
|
10674
10674
|
this.resetCurrentPage();
|
|
10675
10675
|
if (inputEl) {
|
|
@@ -10680,15 +10680,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10680
10680
|
this.globalFilterValue = '';
|
|
10681
10681
|
}
|
|
10682
10682
|
}, _KupDataTable_handlePageChange = function _KupDataTable_handlePageChange(pageNumber) {
|
|
10683
|
-
const newPage = fPaginatorUtils.pageChange(pageNumber, __classPrivateFieldGet$
|
|
10683
|
+
const newPage = fPaginatorUtils.pageChange(pageNumber, __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f"), this.currentRowsPerPage);
|
|
10684
10684
|
if (newPage) {
|
|
10685
10685
|
this.currentPage = newPage;
|
|
10686
10686
|
}
|
|
10687
10687
|
}, _KupDataTable_handleRowsPerPageChange = function _KupDataTable_handleRowsPerPageChange(rowsNumber) {
|
|
10688
|
-
const newRows = fPaginatorUtils.rowsPerPageChange(rowsNumber, __classPrivateFieldGet$
|
|
10688
|
+
const newRows = fPaginatorUtils.rowsPerPageChange(rowsNumber, __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f"));
|
|
10689
10689
|
if (newRows) {
|
|
10690
10690
|
this.currentRowsPerPage = newRows;
|
|
10691
|
-
__classPrivateFieldGet$
|
|
10691
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
10692
10692
|
}
|
|
10693
10693
|
}, _KupDataTable_onRowClick = function _KupDataTable_onRowClick(row, td, emitEvent) {
|
|
10694
10694
|
// selecting row
|
|
@@ -10718,9 +10718,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10718
10718
|
if (!row.unselectable &&
|
|
10719
10719
|
this.selection !== kupManager.SelectionMode.NONE &&
|
|
10720
10720
|
clickedColumn) {
|
|
10721
|
-
__classPrivateFieldGet$
|
|
10721
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_deselectColumn).call(this, this.selectedColumn);
|
|
10722
10722
|
this.selectedColumn = clickedColumn;
|
|
10723
|
-
__classPrivateFieldGet$
|
|
10723
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_selectColumn).call(this, this.selectedColumn);
|
|
10724
10724
|
if (emitEvent !== false) {
|
|
10725
10725
|
// emit event
|
|
10726
10726
|
this.kupRowSelected.emit({
|
|
@@ -10795,7 +10795,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10795
10795
|
}, _KupDataTable_onSelectAll = function _KupDataTable_onSelectAll({ target }) {
|
|
10796
10796
|
if (target.checked) {
|
|
10797
10797
|
// select all rows
|
|
10798
|
-
this.selectedRows = __classPrivateFieldGet$
|
|
10798
|
+
this.selectedRows = __classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f");
|
|
10799
10799
|
// triggering event
|
|
10800
10800
|
this.kupRowSelected.emit({
|
|
10801
10801
|
comp: this,
|
|
@@ -10807,21 +10807,21 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10807
10807
|
}
|
|
10808
10808
|
else {
|
|
10809
10809
|
// deselect all rows
|
|
10810
|
-
__classPrivateFieldGet$
|
|
10810
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
10811
10811
|
}
|
|
10812
10812
|
}, _KupDataTable_openTotalMenu = function _KupDataTable_openTotalMenu(column) {
|
|
10813
10813
|
this.openedTotalMenu = column.name;
|
|
10814
10814
|
}, _KupDataTable_closeTotalMenu = function _KupDataTable_closeTotalMenu() {
|
|
10815
10815
|
this.openedTotalMenu = null;
|
|
10816
|
-
__classPrivateFieldGet$
|
|
10816
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCb, "f"));
|
|
10817
10817
|
}, _KupDataTable_isOpenedTotalMenuForColumn = function _KupDataTable_isOpenedTotalMenuForColumn(column) {
|
|
10818
10818
|
return this.openedTotalMenu === column;
|
|
10819
10819
|
}, _KupDataTable_groupRows = function _KupDataTable_groupRows() {
|
|
10820
|
-
if (!__classPrivateFieldGet$
|
|
10820
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
10821
10821
|
return;
|
|
10822
10822
|
}
|
|
10823
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.groupRows(this.getColumns(), __classPrivateFieldGet$
|
|
10824
|
-
__classPrivateFieldGet$
|
|
10823
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.groupRows(this.getColumns(), __classPrivateFieldGet$4(this, _KupDataTable_rows, "f"), this.groups, this.totals), "f");
|
|
10824
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupState).call(this);
|
|
10825
10825
|
}, _KupDataTable_onLoadMoreClick = function _KupDataTable_onLoadMoreClick() {
|
|
10826
10826
|
var _a;
|
|
10827
10827
|
let loadItems = 0;
|
|
@@ -10831,11 +10831,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10831
10831
|
break;
|
|
10832
10832
|
case kupManager.LoadMoreMode.CONSTANT_INCREMENT:
|
|
10833
10833
|
loadItems =
|
|
10834
|
-
this.loadMoreStep * (__classPrivateFieldGet$
|
|
10834
|
+
this.loadMoreStep * (__classPrivateFieldGet$4(this, _KupDataTable_loadMoreEventCounter, "f") + 1);
|
|
10835
10835
|
break;
|
|
10836
10836
|
case kupManager.LoadMoreMode.PROGRESSIVE_THRESHOLD:
|
|
10837
10837
|
loadItems =
|
|
10838
|
-
Math.max(__classPrivateFieldGet$
|
|
10838
|
+
Math.max(__classPrivateFieldGet$4(this, _KupDataTable_loadMoreEventPreviousQuantity, "f"), this.loadMoreStep) * Math.min(__classPrivateFieldGet$4(this, _KupDataTable_loadMoreEventCounter, "f") + 1, 2);
|
|
10839
10839
|
break;
|
|
10840
10840
|
}
|
|
10841
10841
|
if (loadItems > this.loadMoreLimit) {
|
|
@@ -10847,15 +10847,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10847
10847
|
loadItems: loadItems,
|
|
10848
10848
|
});
|
|
10849
10849
|
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventPreviousQuantity, loadItems, "f");
|
|
10850
|
-
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventCounter, (_a = __classPrivateFieldGet$
|
|
10850
|
+
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventCounter, (_a = __classPrivateFieldGet$4(this, _KupDataTable_loadMoreEventCounter, "f"), _a++, _a), "f");
|
|
10851
10851
|
}, _KupDataTable_adjustGroupState = function _KupDataTable_adjustGroupState() {
|
|
10852
|
-
if (!__classPrivateFieldGet$
|
|
10853
|
-
__classPrivateFieldGet$
|
|
10854
|
-
!__classPrivateFieldGet$
|
|
10852
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_rows, "f") ||
|
|
10853
|
+
__classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f") === 0 ||
|
|
10854
|
+
!__classPrivateFieldGet$4(this, _KupDataTable_rows, "f")[0].hasOwnProperty('group')) {
|
|
10855
10855
|
// no grouping
|
|
10856
10856
|
return;
|
|
10857
10857
|
}
|
|
10858
|
-
__classPrivateFieldGet$
|
|
10858
|
+
__classPrivateFieldGet$4(this, _KupDataTable_rows, "f").forEach((r) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupStateFromRow).call(this, r));
|
|
10859
10859
|
}, _KupDataTable_adjustGroupStateFromRow = function _KupDataTable_adjustGroupStateFromRow(row) {
|
|
10860
10860
|
if (!row || !row.hasOwnProperty('group')) {
|
|
10861
10861
|
// not a groping row, nothing to do
|
|
@@ -10872,9 +10872,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10872
10872
|
// update expanded
|
|
10873
10873
|
group.expanded = groupFromState.expanded;
|
|
10874
10874
|
}
|
|
10875
|
-
group.children.forEach((child) => __classPrivateFieldGet$
|
|
10875
|
+
group.children.forEach((child) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupStateFromRow).call(this, child));
|
|
10876
10876
|
}, _KupDataTable_sortRows = function _KupDataTable_sortRows() {
|
|
10877
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.sortRows(__classPrivateFieldGet$
|
|
10877
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.sortRows(__classPrivateFieldGet$4(this, _KupDataTable_rows, "f"), this.sort), "f");
|
|
10878
10878
|
}, _KupDataTable_getSortIcon = function _KupDataTable_getSortIcon(columnName) {
|
|
10879
10879
|
// check if column in sort array
|
|
10880
10880
|
for (let sortObj of this.sort) {
|
|
@@ -10900,7 +10900,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10900
10900
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
10901
10901
|
colSpan += 1;
|
|
10902
10902
|
}
|
|
10903
|
-
if (__classPrivateFieldGet$
|
|
10903
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
10904
10904
|
colSpan += 1;
|
|
10905
10905
|
}
|
|
10906
10906
|
return colSpan;
|
|
@@ -10930,7 +10930,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10930
10930
|
sourceColumn: this.data.columns[sortedColIndex],
|
|
10931
10931
|
targetColumn: this.data.columns[receivingColIndex],
|
|
10932
10932
|
});
|
|
10933
|
-
__classPrivateFieldGet$
|
|
10933
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_moveSortedColumns).call(this, this.data.columns, receivingColIndex, sortedColIndex);
|
|
10934
10934
|
}
|
|
10935
10935
|
}, _KupDataTable_moveSortedColumns = function _KupDataTable_moveSortedColumns(columns, receivingColumnIndex, sortedColumnIndex) {
|
|
10936
10936
|
const remove = columns.splice(sortedColumnIndex, 1);
|
|
@@ -10943,25 +10943,25 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10943
10943
|
.map((chunk, index$1) => (index$1 !== 0 ? [index.h("br", null), chunk] : chunk));
|
|
10944
10944
|
}, _KupDataTable_composeHeaderCellClassAndStyle = function _KupDataTable_composeHeaderCellClassAndStyle(columnIndex, extraCells = 0, column) {
|
|
10945
10945
|
let columnClass = { ['header-cell']: true }, thStyle = column.style ? Object.assign({}, column.style) : {};
|
|
10946
|
-
if (__classPrivateFieldGet$
|
|
10947
|
-
__classPrivateFieldGet$
|
|
10948
|
-
__classPrivateFieldGet$
|
|
10949
|
-
__classPrivateFieldGet$
|
|
10950
|
-
__classPrivateFieldGet$
|
|
10951
|
-
__classPrivateFieldGet$
|
|
10952
|
-
__classPrivateFieldGet$
|
|
10953
|
-
__classPrivateFieldGet$
|
|
10954
|
-
__classPrivateFieldGet$
|
|
10946
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isBar(column.obj) ||
|
|
10947
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isButton(column.obj) ||
|
|
10948
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isChart(column.obj) ||
|
|
10949
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isCheckbox(column.obj) ||
|
|
10950
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isImage(column.obj) ||
|
|
10951
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isIcon(column.obj) ||
|
|
10952
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isProgressBar(column.obj) ||
|
|
10953
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isRadio(column.obj) ||
|
|
10954
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isVoCodver(column.obj)) {
|
|
10955
10955
|
columnClass['header-cell--centered'] = true;
|
|
10956
10956
|
}
|
|
10957
|
-
if (__classPrivateFieldGet$
|
|
10957
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isNumber(column.obj)) {
|
|
10958
10958
|
columnClass['header-cell--is-number'] = true;
|
|
10959
10959
|
}
|
|
10960
|
-
if (__classPrivateFieldGet$
|
|
10960
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isIcon(column.obj)) {
|
|
10961
10961
|
columnClass['header-cell--is-icon'] = true;
|
|
10962
10962
|
}
|
|
10963
10963
|
// For fixed cells styles and classes
|
|
10964
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
10964
|
+
const fixedCellStyle = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, columnIndex + 1 + extraCells, 0, extraCells);
|
|
10965
10965
|
if (fixedCellStyle) {
|
|
10966
10966
|
columnClass = Object.assign(Object.assign({}, columnClass), fixedCellStyle.fixedCellClasses);
|
|
10967
10967
|
thStyle = Object.assign(Object.assign({}, thStyle), fixedCellStyle.fixedCellStyle);
|
|
@@ -10976,24 +10976,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10976
10976
|
let multiSelectColumn = null;
|
|
10977
10977
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
10978
10978
|
specialExtraCellsCount++;
|
|
10979
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
10979
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
10980
10980
|
const style = Object.assign({ width: '30px', margin: '0 auto' }, (selectionStyleAndClass
|
|
10981
10981
|
? selectionStyleAndClass.fixedCellStyle
|
|
10982
10982
|
: {}));
|
|
10983
10983
|
multiSelectColumn = (index.h("th", { class: selectionStyleAndClass
|
|
10984
10984
|
? selectionStyleAndClass.fixedCellClasses
|
|
10985
|
-
: {}, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$
|
|
10985
|
+
: {}, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onSelectAll).call(this, e), title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.SELECTED) +
|
|
10986
10986
|
`: ${this.selectedRows.length},` +
|
|
10987
|
-
__classPrivateFieldGet$
|
|
10988
|
-
`: ${__classPrivateFieldGet$
|
|
10987
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.RENDERED) +
|
|
10988
|
+
`: ${__classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f").length}`, checked: this.selectedRows.length > 0 &&
|
|
10989
10989
|
this.selectedRows.length ===
|
|
10990
|
-
__classPrivateFieldGet$
|
|
10990
|
+
__classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f").length })));
|
|
10991
10991
|
}
|
|
10992
10992
|
// Renders action column
|
|
10993
10993
|
let actionsColumn = null;
|
|
10994
|
-
if (__classPrivateFieldGet$
|
|
10994
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
10995
10995
|
specialExtraCellsCount++;
|
|
10996
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
10996
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
10997
10997
|
actionsColumn = (index.h("th", { class: selectionStyleAndClass
|
|
10998
10998
|
? selectionStyleAndClass.fixedCellClasses
|
|
10999
10999
|
: {}, style: selectionStyleAndClass
|
|
@@ -11002,26 +11002,26 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11002
11002
|
}
|
|
11003
11003
|
// Renders normal cells
|
|
11004
11004
|
const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
|
|
11005
|
-
const { columnClass, thStyle } = __classPrivateFieldGet$
|
|
11005
|
+
const { columnClass, thStyle } = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeHeaderCellClassAndStyle).call(this, columnIndex, specialExtraCellsCount, column);
|
|
11006
11006
|
let filter = null;
|
|
11007
|
-
if (__classPrivateFieldGet$
|
|
11008
|
-
const svgLabel = __classPrivateFieldGet$
|
|
11007
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_filtersColumnMenuInstance, "f").hasFiltersForColumn(this.filters, column)) {
|
|
11008
|
+
const svgLabel = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.REMOVE_FILTERS) + `: '${__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getFilterValueForTooltip).call(this, column)}'`;
|
|
11009
11009
|
filter = (index.h("span", { title: svgLabel, class: `kup-icon ${kupManager.KupThemeIconValues.FILTER_REMOVE.replace('--', '')}` }));
|
|
11010
11010
|
}
|
|
11011
11011
|
let sortIcon = null;
|
|
11012
|
-
let iconClass = __classPrivateFieldGet$
|
|
11012
|
+
let iconClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getSortIcon).call(this, column.name);
|
|
11013
11013
|
if (iconClass !== '') {
|
|
11014
|
-
sortIcon = (index.h("span", { class: iconClass, title: __classPrivateFieldGet$
|
|
11014
|
+
sortIcon = (index.h("span", { class: iconClass, title: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getSortDecode).call(this, column.name) }));
|
|
11015
11015
|
}
|
|
11016
11016
|
columnClass['header-cell--sortable'] = true;
|
|
11017
11017
|
let keyIcon = null;
|
|
11018
11018
|
if (column.isKey) {
|
|
11019
|
-
keyIcon = (index.h("span", { class: `kup-icon ${kupManager.KupThemeIconValues.KEY.replace('--', '')}`, title: __classPrivateFieldGet$
|
|
11019
|
+
keyIcon = (index.h("span", { class: `kup-icon ${kupManager.KupThemeIconValues.KEY.replace('--', '')}`, title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.KEY) }));
|
|
11020
11020
|
}
|
|
11021
11021
|
// Sets custom columns width
|
|
11022
|
-
if (__classPrivateFieldGet$
|
|
11023
|
-
for (let i = 0; i < __classPrivateFieldGet$
|
|
11024
|
-
const currentCol = __classPrivateFieldGet$
|
|
11022
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")) {
|
|
11023
|
+
for (let i = 0; i < __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f").length; i++) {
|
|
11024
|
+
const currentCol = __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")[i];
|
|
11025
11025
|
if (currentCol.name === column.name) {
|
|
11026
11026
|
const width = currentCol.size + '';
|
|
11027
11027
|
if (width.indexOf('ch') < 1) {
|
|
@@ -11034,7 +11034,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11034
11034
|
}
|
|
11035
11035
|
}
|
|
11036
11036
|
}
|
|
11037
|
-
return (index.h("th", { ref: (el) => __classPrivateFieldGet$
|
|
11037
|
+
return (index.h("th", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_thRefs, "f").push(el), "data-cell": column, "data-column": column.name, class: columnClass, style: thStyle, title: column.name }, index.h("div", { class: "header-cell__content" }, index.h("span", { class: "header-cell__title" }, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_applyLineBreaks).call(this, column.title)), index.h("span", { class: "header-cell__icons" }, keyIcon, sortIcon, filter)), this.resizableColumns ? (index.h("span", { class: "header-cell__drag-handler" })) : null));
|
|
11038
11038
|
});
|
|
11039
11039
|
return [multiSelectColumn, actionsColumn, ...dataColumns];
|
|
11040
11040
|
// return [multiSelectColumn, groupColumn, actionsColumn, ...dataColumns];
|
|
@@ -11043,24 +11043,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11043
11043
|
let multiSelectColumn = null;
|
|
11044
11044
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11045
11045
|
specialExtraCellsCount++;
|
|
11046
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11046
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
11047
11047
|
const style = Object.assign({ width: '30px', margin: '0 auto' }, (selectionStyleAndClass
|
|
11048
11048
|
? selectionStyleAndClass.fixedCellStyle
|
|
11049
11049
|
: {}));
|
|
11050
11050
|
multiSelectColumn = (index.h("th-sticky", { class: selectionStyleAndClass
|
|
11051
11051
|
? selectionStyleAndClass.fixedCellClasses
|
|
11052
|
-
: null, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$
|
|
11052
|
+
: null, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onSelectAll).call(this, e), title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.SELECTED) +
|
|
11053
11053
|
`: ${this.selectedRows.length},` +
|
|
11054
|
-
__classPrivateFieldGet$
|
|
11055
|
-
`: ${__classPrivateFieldGet$
|
|
11054
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.RENDERED) +
|
|
11055
|
+
`: ${__classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f").length}`, checked: this.selectedRows.length > 0 &&
|
|
11056
11056
|
this.selectedRows.length ===
|
|
11057
|
-
__classPrivateFieldGet$
|
|
11057
|
+
__classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f").length })));
|
|
11058
11058
|
}
|
|
11059
11059
|
// Empty cell for the actions
|
|
11060
11060
|
let actionsColumn = null;
|
|
11061
|
-
if (__classPrivateFieldGet$
|
|
11061
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11062
11062
|
specialExtraCellsCount++;
|
|
11063
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11063
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
11064
11064
|
actionsColumn = (index.h("th-sticky", { class: selectionStyleAndClass
|
|
11065
11065
|
? selectionStyleAndClass.fixedCellClasses
|
|
11066
11066
|
: null, style: selectionStyleAndClass
|
|
@@ -11069,29 +11069,29 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11069
11069
|
}
|
|
11070
11070
|
// Composes normal header cells
|
|
11071
11071
|
const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
|
|
11072
|
-
const { columnClass, thStyle } = __classPrivateFieldGet$
|
|
11073
|
-
return (index.h("th-sticky", { class: columnClass, style: thStyle }, index.h("div", { class: "header-cell__content" }, index.h("span", { class: "header-cell__title" }, __classPrivateFieldGet$
|
|
11072
|
+
const { columnClass, thStyle } = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeHeaderCellClassAndStyle).call(this, columnIndex, specialExtraCellsCount, column);
|
|
11073
|
+
return (index.h("th-sticky", { class: columnClass, style: thStyle }, index.h("div", { class: "header-cell__content" }, index.h("span", { class: "header-cell__title" }, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_applyLineBreaks).call(this, column.title)))));
|
|
11074
11074
|
});
|
|
11075
11075
|
return [multiSelectColumn, actionsColumn, ...dataColumns];
|
|
11076
11076
|
}, _KupDataTable_totalMenuPosition = function _KupDataTable_totalMenuPosition() {
|
|
11077
11077
|
if (this.rootElement.shadowRoot) {
|
|
11078
11078
|
const menu = this.rootElement.shadowRoot.querySelector('#totals-menu');
|
|
11079
11079
|
if (menu) {
|
|
11080
|
-
__classPrivateFieldGet$
|
|
11080
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.register(menu, __classPrivateFieldGet$4(this, _KupDataTable_totalMenuCoords, "f"));
|
|
11081
11081
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCb, {
|
|
11082
11082
|
cb: () => {
|
|
11083
|
-
__classPrivateFieldGet$
|
|
11083
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
11084
11084
|
},
|
|
11085
11085
|
el: menu,
|
|
11086
11086
|
}, "f");
|
|
11087
|
-
__classPrivateFieldGet$
|
|
11088
|
-
__classPrivateFieldGet$
|
|
11087
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCb, "f"), true);
|
|
11088
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.start(menu);
|
|
11089
11089
|
menu.menuVisible = true;
|
|
11090
11090
|
}
|
|
11091
11091
|
}
|
|
11092
11092
|
}, _KupDataTable_onTotalMenuOpen = function _KupDataTable_onTotalMenuOpen(column) {
|
|
11093
|
-
__classPrivateFieldGet$
|
|
11094
|
-
__classPrivateFieldGet$
|
|
11093
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
11094
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_openTotalMenu).call(this, column);
|
|
11095
11095
|
}, _KupDataTable_renderRow = function _KupDataTable_renderRow(row, level = 0, rowCssIndex = 0, previousRow) {
|
|
11096
11096
|
const visibleColumns = this.getVisibleColumns();
|
|
11097
11097
|
let rowActionsCount = 0;
|
|
@@ -11123,17 +11123,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11123
11123
|
for (let i = 0; i < level; i++) {
|
|
11124
11124
|
indent.push(index.h("span", { class: "indent" }));
|
|
11125
11125
|
}
|
|
11126
|
-
if (__classPrivateFieldGet$
|
|
11126
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)) {
|
|
11127
11127
|
//const colSpan = this.multiSelection ? 2 : 1;
|
|
11128
11128
|
const cells = [];
|
|
11129
|
-
if (__classPrivateFieldGet$
|
|
11129
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11130
11130
|
cells.push(index.h("td", null));
|
|
11131
11131
|
}
|
|
11132
11132
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11133
11133
|
cells.push(index.h("td", null));
|
|
11134
11134
|
}
|
|
11135
11135
|
// adding 'grouping' cell
|
|
11136
|
-
const grouplabelcell = (index.h("td", { colSpan: __classPrivateFieldGet$
|
|
11136
|
+
const grouplabelcell = (index.h("td", { colSpan: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, index.h("span", { class: "group-cell-content" }, indent, index.h("span", { class: iconClass }), index.h("span", { class: "text" }, composedGroupLabel))));
|
|
11137
11137
|
// adding 'totals grouping' cells
|
|
11138
11138
|
for (let column of visibleColumns) {
|
|
11139
11139
|
let totalClass = 'total';
|
|
@@ -11148,11 +11148,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11148
11148
|
value = totalValue;
|
|
11149
11149
|
}
|
|
11150
11150
|
else {
|
|
11151
|
-
if (__classPrivateFieldGet$
|
|
11151
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
11152
11152
|
if (totalValue) {
|
|
11153
|
-
if (__classPrivateFieldGet$
|
|
11153
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dates.isValid(totalValue, kupManager.KupDatesFormats.ISO_DATE)) {
|
|
11154
11154
|
value =
|
|
11155
|
-
__classPrivateFieldGet$
|
|
11155
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dates.format(totalValue);
|
|
11156
11156
|
}
|
|
11157
11157
|
else {
|
|
11158
11158
|
console.warn(`invalid date: ${totalValue}`);
|
|
@@ -11165,18 +11165,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11165
11165
|
}
|
|
11166
11166
|
cells.push(index.h("td", { class: totalClass }, value));
|
|
11167
11167
|
}
|
|
11168
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11169
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11168
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group group-label" }, grouplabelcell));
|
|
11169
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group group-total" }, cells));
|
|
11170
11170
|
}
|
|
11171
11171
|
else {
|
|
11172
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11172
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group" }, index.h("td", { colSpan: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, index.h("span", { class: "group-cell-content" }, indent, index.h("span", { class: iconClass }), index.h("span", { class: "text" }, composedGroupLabel)))));
|
|
11173
11173
|
}
|
|
11174
11174
|
// if group is expanded, add children
|
|
11175
|
-
if (__classPrivateFieldGet$
|
|
11175
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGroupExpanded).call(this, row)) {
|
|
11176
11176
|
row.group.children
|
|
11177
11177
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
11178
11178
|
// When the column has specified the parameter hideValuesRepetitions
|
|
11179
|
-
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$
|
|
11179
|
+
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, level + 1, groupRowIndex, groupRowIndex > 0
|
|
11180
11180
|
? currentArray[groupRowIndex - 1]
|
|
11181
11181
|
: undefined))
|
|
11182
11182
|
.forEach((jsxRow) => {
|
|
@@ -11203,11 +11203,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11203
11203
|
let selectRowCell = null;
|
|
11204
11204
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11205
11205
|
specialExtraCellsCount++;
|
|
11206
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11206
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, rowCssIndex, specialExtraCellsCount - 1);
|
|
11207
11207
|
const props = {
|
|
11208
11208
|
checked: this.selectedRows.includes(row),
|
|
11209
11209
|
onChange: () => {
|
|
11210
|
-
__classPrivateFieldGet$
|
|
11210
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handleRowSelect).call(this, row);
|
|
11211
11211
|
},
|
|
11212
11212
|
};
|
|
11213
11213
|
selectRowCell = (index.h("td", { "row-select-cell": true, class: selectionStyleAndClass
|
|
@@ -11219,18 +11219,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11219
11219
|
// Renders action cell
|
|
11220
11220
|
// If active, this can be either the first or second cell
|
|
11221
11221
|
let rowActionsCell = null;
|
|
11222
|
-
if (__classPrivateFieldGet$
|
|
11222
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11223
11223
|
// Increments
|
|
11224
11224
|
specialExtraCellsCount++;
|
|
11225
|
-
const actionsStyleAndClass = __classPrivateFieldGet$
|
|
11225
|
+
const actionsStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, rowCssIndex, specialExtraCellsCount - 1);
|
|
11226
11226
|
rowActionsCount += this.rowActions.length;
|
|
11227
|
-
const defaultRowActions = __classPrivateFieldGet$
|
|
11227
|
+
const defaultRowActions = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderActions).call(this, this.rowActions, row, 'default');
|
|
11228
11228
|
let rowActionExpander = null;
|
|
11229
11229
|
let variableActions = null;
|
|
11230
11230
|
if (row.actions) {
|
|
11231
11231
|
rowActionsCount += row.actions.length;
|
|
11232
11232
|
// adding variable actions
|
|
11233
|
-
variableActions = __classPrivateFieldGet$
|
|
11233
|
+
variableActions = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderActions).call(this, row.actions, row, 'variable');
|
|
11234
11234
|
}
|
|
11235
11235
|
else {
|
|
11236
11236
|
// adding expander
|
|
@@ -11239,10 +11239,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11239
11239
|
resource: 'chevron-right',
|
|
11240
11240
|
sizeX: '1.5em',
|
|
11241
11241
|
sizeY: '1.5em',
|
|
11242
|
-
title: __classPrivateFieldGet$
|
|
11242
|
+
title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPAND),
|
|
11243
11243
|
wrapperClass: 'expander',
|
|
11244
11244
|
onClick: (e) => {
|
|
11245
|
-
__classPrivateFieldGet$
|
|
11245
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onRowActionExpanderClick).call(this, e, row);
|
|
11246
11246
|
},
|
|
11247
11247
|
};
|
|
11248
11248
|
rowActionsCount++;
|
|
@@ -11291,18 +11291,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11291
11291
|
let cellClass = null;
|
|
11292
11292
|
let cellStyle = Object.assign({}, cell.style);
|
|
11293
11293
|
//-- For fixed cells --
|
|
11294
|
-
const fixedStyles = __classPrivateFieldGet$
|
|
11294
|
+
const fixedStyles = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, cellIndex + 1 + specialExtraCellsCount, rowCssIndex, specialExtraCellsCount);
|
|
11295
11295
|
if (fixedStyles) {
|
|
11296
11296
|
cellStyle = Object.assign(cellStyle ? cellStyle : {}, fixedStyles.fixedCellStyle);
|
|
11297
11297
|
cellClass = Object.assign(Object.assign({}, cellClass), fixedStyles.fixedCellClasses);
|
|
11298
11298
|
}
|
|
11299
11299
|
// Controls if there are columns with a specified width
|
|
11300
|
-
if (__classPrivateFieldGet$
|
|
11300
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")) {
|
|
11301
11301
|
let colWidth = '';
|
|
11302
11302
|
// Search if this column has a specified width
|
|
11303
|
-
for (let j = 0; j < __classPrivateFieldGet$
|
|
11304
|
-
if (name === __classPrivateFieldGet$
|
|
11305
|
-
colWidth = __classPrivateFieldGet$
|
|
11303
|
+
for (let j = 0; j < __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f").length; j++) {
|
|
11304
|
+
if (name === __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")[j].name) {
|
|
11305
|
+
colWidth = __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")[j].size;
|
|
11306
11306
|
break;
|
|
11307
11307
|
}
|
|
11308
11308
|
}
|
|
@@ -11324,7 +11324,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11324
11324
|
return (index.h("td", Object.assign({ title: title, colSpan: cell.span && cell.span.col ? cell.span.col : null, rowSpan: cell.span && cell.span.row ? cell.span.row : null, "data-cell": cell, "data-column": name, "data-row": row, style: cellStyle, class: cellClass }, eventHandlers), jsxCell));
|
|
11325
11325
|
});
|
|
11326
11326
|
// adding row to rendered rows
|
|
11327
|
-
__classPrivateFieldGet$
|
|
11327
|
+
__classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f").push(row);
|
|
11328
11328
|
const rowClass = {
|
|
11329
11329
|
selected: this.selectedRows.includes(row),
|
|
11330
11330
|
};
|
|
@@ -11334,7 +11334,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11334
11334
|
const style = {
|
|
11335
11335
|
'--kup_datatable_row_actions': rowActionsCount,
|
|
11336
11336
|
};
|
|
11337
|
-
return (index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11337
|
+
return (index.h("tr", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: rowClass, style: style }, selectRowCell, rowActionsCell, cells));
|
|
11338
11338
|
}
|
|
11339
11339
|
}, _KupDataTable_renderActions = function _KupDataTable_renderActions(actions, row, type) {
|
|
11340
11340
|
return actions.map((action, index$1) => {
|
|
@@ -11345,7 +11345,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11345
11345
|
sizeY: '1.5em',
|
|
11346
11346
|
title: action.text,
|
|
11347
11347
|
wrapperClass: 'action',
|
|
11348
|
-
onClick: () => __classPrivateFieldGet$
|
|
11348
|
+
onClick: () => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onDefaultRowActionClick).call(this, {
|
|
11349
11349
|
action,
|
|
11350
11350
|
row,
|
|
11351
11351
|
index: index$1,
|
|
@@ -11356,58 +11356,58 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11356
11356
|
});
|
|
11357
11357
|
}, _KupDataTable_onCustomSettingsClick = function _KupDataTable_onCustomSettingsClick() {
|
|
11358
11358
|
if (!this.openedCustomSettings) {
|
|
11359
|
-
__classPrivateFieldGet$
|
|
11359
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_openCustomSettings).call(this);
|
|
11360
11360
|
}
|
|
11361
11361
|
else {
|
|
11362
|
-
__classPrivateFieldGet$
|
|
11362
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
11363
11363
|
}
|
|
11364
11364
|
}, _KupDataTable_openCustomSettings = function _KupDataTable_openCustomSettings() {
|
|
11365
|
-
__classPrivateFieldGet$
|
|
11366
|
-
__classPrivateFieldGet$
|
|
11367
|
-
__classPrivateFieldGet$
|
|
11365
|
+
__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f").menuVisible = true;
|
|
11366
|
+
__classPrivateFieldGet$4(this, _KupDataTable_customizeTopButtonRef, "f").classList.add('toggled');
|
|
11367
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f"));
|
|
11368
11368
|
this.openedCustomSettings = true;
|
|
11369
|
-
if (!__classPrivateFieldGet$
|
|
11369
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_clickCbCustomPanel, "f")) {
|
|
11370
11370
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCbCustomPanel, {
|
|
11371
11371
|
cb: () => {
|
|
11372
|
-
__classPrivateFieldGet$
|
|
11372
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
11373
11373
|
},
|
|
11374
|
-
el: __classPrivateFieldGet$
|
|
11374
|
+
el: __classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f"),
|
|
11375
11375
|
}, "f");
|
|
11376
11376
|
}
|
|
11377
|
-
__classPrivateFieldGet$
|
|
11377
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCbCustomPanel, "f"), true);
|
|
11378
11378
|
}, _KupDataTable_closeCustomSettings = function _KupDataTable_closeCustomSettings() {
|
|
11379
|
-
__classPrivateFieldGet$
|
|
11380
|
-
if (__classPrivateFieldGet$
|
|
11379
|
+
__classPrivateFieldGet$4(this, _KupDataTable_customizeTopButtonRef, "f").classList.remove('toggled');
|
|
11380
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f") == null) {
|
|
11381
11381
|
return;
|
|
11382
11382
|
}
|
|
11383
|
-
__classPrivateFieldGet$
|
|
11383
|
+
__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f").menuVisible = false;
|
|
11384
11384
|
this.openedCustomSettings = false;
|
|
11385
|
-
__classPrivateFieldGet$
|
|
11385
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCbCustomPanel, "f"));
|
|
11386
11386
|
}, _KupDataTable_renderPaginator = function _KupDataTable_renderPaginator(top) {
|
|
11387
11387
|
return (index.h("div", { class: "paginator-wrapper" }, index.h("div", { class: "paginator-tabs" }, this.showLoadMore ||
|
|
11388
11388
|
(!this.lazyLoadRows &&
|
|
11389
|
-
__classPrivateFieldGet$
|
|
11389
|
+
__classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f") > this.rowsPerPage) ? (index.h(fPaginatorUtils.FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f"), perPage: this.currentRowsPerPage
|
|
11390
11390
|
? this.currentRowsPerPage
|
|
11391
11391
|
: this.rowsPerPage, onLoadMore: this.showLoadMore
|
|
11392
11392
|
? () => {
|
|
11393
|
-
__classPrivateFieldGet$
|
|
11393
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onLoadMoreClick).call(this);
|
|
11394
11394
|
}
|
|
11395
|
-
: null, onNextPage: () => __classPrivateFieldGet$
|
|
11395
|
+
: null, onNextPage: () => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, this.currentPage + 1), onPrevPage: () => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, this.currentPage - 1), onPageChange: (e) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, e.detail.value), onRowsChange: (e) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handleRowsPerPageChange).call(this, e.detail.value) })) : null)));
|
|
11396
11396
|
}, _KupDataTable_columnRemoveArea = function _KupDataTable_columnRemoveArea() {
|
|
11397
11397
|
return (index.h("div", { class: "droparea__remove", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_removeDropareaRef, el, "f")) }, index.h(fImage.FImage, { resource: "delete", color: `var(${kupManager.KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" }), index.h(fImage.FImage, { resource: "delete-empty", color: `var(${kupManager.KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" })));
|
|
11398
11398
|
}, _KupDataTable_columnGroupArea = function _KupDataTable_columnGroupArea() {
|
|
11399
11399
|
return (index.h("div", { class: "droparea__groups", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_groupsDropareaRef, el, "f")) }, index.h(fImage.FImage, { resource: "bookmark", color: `var(${kupManager.KupThemeColorValues.TEXT})`, sizeX: "30px", sizeY: "50px" }), index.h(fImage.FImage, { resource: "book", color: `var(${kupManager.KupThemeColorValues.TEXT})`, sizeX: "30px", sizeY: "50px" })));
|
|
11400
11400
|
}, _KupDataTable_hideShowColumnDropArea = function _KupDataTable_hideShowColumnDropArea(show, th) {
|
|
11401
11401
|
if (show && th && (this.removableColumns || this.showGroups)) {
|
|
11402
|
-
__classPrivateFieldGet$
|
|
11403
|
-
__classPrivateFieldGet$
|
|
11404
|
-
__classPrivateFieldGet$
|
|
11405
|
-
__classPrivateFieldGet$
|
|
11406
|
-
th.clientWidth / 2 - __classPrivateFieldGet$
|
|
11402
|
+
__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f").classList.add('droparea--visible');
|
|
11403
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f"), th, 10, kupManager.KupDynamicPositionPlacement.TOP);
|
|
11404
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f"));
|
|
11405
|
+
__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f").style.marginLeft =
|
|
11406
|
+
th.clientWidth / 2 - __classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f").clientWidth / 2 + 'px';
|
|
11407
11407
|
}
|
|
11408
11408
|
else {
|
|
11409
|
-
__classPrivateFieldGet$
|
|
11410
|
-
+__classPrivateFieldGet$
|
|
11409
|
+
__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f").classList.remove('droparea--visible');
|
|
11410
|
+
+__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f"));
|
|
11411
11411
|
}
|
|
11412
11412
|
}, _KupDataTable_handleColumnGroup = function _KupDataTable_handleColumnGroup(column2group) {
|
|
11413
11413
|
// Get sorted column current position
|
|
@@ -11475,19 +11475,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11475
11475
|
icon: icons[i],
|
|
11476
11476
|
id: codes[i],
|
|
11477
11477
|
selected: selectedCode == codes[i],
|
|
11478
|
-
value: __classPrivateFieldGet$
|
|
11478
|
+
value: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(value),
|
|
11479
11479
|
};
|
|
11480
11480
|
}
|
|
11481
11481
|
}
|
|
11482
11482
|
return listItems;
|
|
11483
11483
|
}, _KupDataTable_getFontSizeCodeFromDecode = function _KupDataTable_getFontSizeCodeFromDecode(decode) {
|
|
11484
|
-
return __classPrivateFieldGet$
|
|
11484
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$4(this, _KupDataTable_FONTSIZE_DECODES, "f"), __classPrivateFieldGet$4(this, _KupDataTable_FONTSIZE_CODES, "f"));
|
|
11485
11485
|
}, _KupDataTable_renderFontSizePanel = function _KupDataTable_renderFontSizePanel() {
|
|
11486
|
-
const listItems = __classPrivateFieldGet$
|
|
11486
|
+
const listItems = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, __classPrivateFieldGet$4(this, _KupDataTable_FONTSIZE_CODES, "f"), __classPrivateFieldGet$4(this, _KupDataTable_FONTSIZE_ICONS, "f"), this.fontsize);
|
|
11487
11487
|
const listData = { data: listItems, showIcons: true };
|
|
11488
11488
|
const textfieldData = {
|
|
11489
11489
|
trailingIcon: true,
|
|
11490
|
-
label: __classPrivateFieldGet$
|
|
11490
|
+
label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageFontsize.LABEL),
|
|
11491
11491
|
icon: 'arrow_drop_down',
|
|
11492
11492
|
};
|
|
11493
11493
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11504,22 +11504,22 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11504
11504
|
text = kupManager.KupLanguageFontsize.SMALL;
|
|
11505
11505
|
break;
|
|
11506
11506
|
}
|
|
11507
|
-
return (index.h("div", { class: "customize-element fontsize-panel" }, index.h("kup-combobox", { isSelect: true, data: data, initialValue: __classPrivateFieldGet$
|
|
11507
|
+
return (index.h("div", { class: "customize-element fontsize-panel" }, index.h("kup-combobox", { isSelect: true, data: data, initialValue: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(text), "onkup-combobox-itemclick": (e) => {
|
|
11508
11508
|
e.stopPropagation();
|
|
11509
|
-
this.fontsize = __classPrivateFieldGet$
|
|
11509
|
+
this.fontsize = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getFontSizeCodeFromDecode).call(this, e.detail.node.id);
|
|
11510
11510
|
} })));
|
|
11511
11511
|
}, _KupDataTable_getDensityCodeFromDecode = function _KupDataTable_getDensityCodeFromDecode(decode) {
|
|
11512
|
-
return __classPrivateFieldGet$
|
|
11512
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$4(this, _KupDataTable_DENSITY_DECODES, "f"), [
|
|
11513
11513
|
'dense',
|
|
11514
11514
|
'medium',
|
|
11515
11515
|
'wide',
|
|
11516
11516
|
]);
|
|
11517
11517
|
}, _KupDataTable_renderDensityPanel = function _KupDataTable_renderDensityPanel() {
|
|
11518
|
-
const listItems = __classPrivateFieldGet$
|
|
11518
|
+
const listItems = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, ['dense', 'medium', 'wide'], __classPrivateFieldGet$4(this, _KupDataTable_DENSITY_ICONS, "f"), this.density);
|
|
11519
11519
|
const listData = { data: listItems, showIcons: true };
|
|
11520
11520
|
const textfieldData = {
|
|
11521
11521
|
trailingIcon: true,
|
|
11522
|
-
label: __classPrivateFieldGet$
|
|
11522
|
+
label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageDensity.LABEL),
|
|
11523
11523
|
icon: 'arrow_drop_down',
|
|
11524
11524
|
};
|
|
11525
11525
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11536,14 +11536,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11536
11536
|
text = kupManager.KupLanguageDensity.WIDE;
|
|
11537
11537
|
break;
|
|
11538
11538
|
}
|
|
11539
|
-
return (index.h("div", { class: "customize-element density-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$
|
|
11539
|
+
return (index.h("div", { class: "customize-element density-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(text), selectMode: fCell.ItemsDisplayMode.DESCRIPTION, data: data, "onkup-combobox-itemclick": (e) => {
|
|
11540
11540
|
e.stopPropagation();
|
|
11541
|
-
this.density = __classPrivateFieldGet$
|
|
11541
|
+
this.density = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getDensityCodeFromDecode).call(this, e.detail.node.id);
|
|
11542
11542
|
} })));
|
|
11543
11543
|
}, _KupDataTable_getGridCodeFromDecode = function _KupDataTable_getGridCodeFromDecode(decode) {
|
|
11544
|
-
return __classPrivateFieldGet$
|
|
11544
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$4(this, _KupDataTable_GRID_DECODES, "f"), __classPrivateFieldGet$4(this, _KupDataTable_GRID_CODES, "f"));
|
|
11545
11545
|
}, _KupDataTable_renderTransposeSwitch = function _KupDataTable_renderTransposeSwitch() {
|
|
11546
|
-
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-switch", { checked: this.transpose, label: __classPrivateFieldGet$
|
|
11546
|
+
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-switch", { checked: this.transpose, label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TRANSPOSE_DATA), leadingLabel: true, "onkup-switch-change": (e) => {
|
|
11547
11547
|
e.stopPropagation();
|
|
11548
11548
|
if (e.detail.value === 'on') {
|
|
11549
11549
|
this.transpose = true;
|
|
@@ -11553,16 +11553,16 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11553
11553
|
}
|
|
11554
11554
|
} })));
|
|
11555
11555
|
}, _KupDataTable_renderTotalsMatrix = function _KupDataTable_renderTotalsMatrix() {
|
|
11556
|
-
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-button", { title: __classPrivateFieldGet$
|
|
11556
|
+
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-button", { title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TOTALS_TABLE) +
|
|
11557
11557
|
' (' +
|
|
11558
|
-
__classPrivateFieldGet$
|
|
11559
|
-
')', label: __classPrivateFieldGet$
|
|
11558
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
11559
|
+
')', label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TOTALS_TABLE), icon: "exposure", "onkup-button-click": () => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_switchToTotalsMatrix).call(this) })));
|
|
11560
11560
|
}, _KupDataTable_renderGridPanel = function _KupDataTable_renderGridPanel() {
|
|
11561
|
-
const listItems = __classPrivateFieldGet$
|
|
11561
|
+
const listItems = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, __classPrivateFieldGet$4(this, _KupDataTable_GRID_CODES, "f"), __classPrivateFieldGet$4(this, _KupDataTable_GRID_ICONS, "f"), this.showGrid);
|
|
11562
11562
|
const listData = { data: listItems, showIcons: true };
|
|
11563
11563
|
const textfieldData = {
|
|
11564
11564
|
trailingIcon: true,
|
|
11565
|
-
label: __classPrivateFieldGet$
|
|
11565
|
+
label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGrid.LABEL),
|
|
11566
11566
|
icon: 'arrow_drop_down',
|
|
11567
11567
|
};
|
|
11568
11568
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11582,9 +11582,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11582
11582
|
text = kupManager.KupLanguageGrid.ROW;
|
|
11583
11583
|
break;
|
|
11584
11584
|
}
|
|
11585
|
-
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$
|
|
11585
|
+
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(text), data: data, "onkup-combobox-itemclick": (e) => {
|
|
11586
11586
|
e.stopPropagation();
|
|
11587
|
-
const grid = __classPrivateFieldGet$
|
|
11587
|
+
const grid = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getGridCodeFromDecode).call(this, e.detail.value);
|
|
11588
11588
|
this.showGrid = grid;
|
|
11589
11589
|
} })));
|
|
11590
11590
|
};
|
|
@@ -11988,7 +11988,7 @@ var KupDialogProps;
|
|
|
11988
11988
|
|
|
11989
11989
|
const kupDialogCss = ":host{--kup_dialog_header_height:var(--kup-dialog-header-height, 2em);box-sizing:border-box;display:block;height:var(--kup_dialog_height);left:var(--kup_dialog_left);min-height:var(--kup_dialog_height);min-width:var(--kup_dialog_width);position:absolute;top:var(--kup_dialog_top);transition:opacity 0.25s ease-in;width:var(--kup_dialog_width)}#kup-component{height:100%;width:100%}[fade-in]{opacity:0}[fade-in] ::slotted{display:none}.header{background-color:var(--kup-title-background-color);color:var(--kup-title-color);display:flex;flex-direction:row;height:var(--kup_dialog_header_height);position:relative;width:100%}.header__title{font-weight:bold;line-height:2em;padding-left:0.5em;padding-right:2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header__close.f-image{--kup-icon-color:var(--kup-title-color);cursor:pointer;margin-right:0;transition:opacity 0.25s;position:absolute;right:0;background:var(--kup-title-background-color)}.header__close.f-image:hover{opacity:0.5}.content{height:calc(100% - var(--kup_dialog_header_height));overflow:auto;user-select:text}";
|
|
11990
11990
|
|
|
11991
|
-
var __classPrivateFieldGet$
|
|
11991
|
+
var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11992
11992
|
if (kind === "a" && !f)
|
|
11993
11993
|
throw new TypeError("Private accessor was defined without a getter");
|
|
11994
11994
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -12071,12 +12071,12 @@ const KupDialog = class {
|
|
|
12071
12071
|
/* L i f e c y c l e H o o k s */
|
|
12072
12072
|
/*-------------------------------------------------*/
|
|
12073
12073
|
componentWillLoad() {
|
|
12074
|
-
__classPrivateFieldGet$
|
|
12075
|
-
__classPrivateFieldGet$
|
|
12074
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").debug.logLoad(this, false);
|
|
12075
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").theme.register(this);
|
|
12076
12076
|
}
|
|
12077
12077
|
componentDidLoad() {
|
|
12078
12078
|
var _a;
|
|
12079
|
-
__classPrivateFieldGet$
|
|
12079
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").interact.dialogify(this.rootElement, __classPrivateFieldGet$3(this, _KupDialog_header, "f") ? __classPrivateFieldGet$3(this, _KupDialog_header, "f") : null, !this.resizable);
|
|
12080
12080
|
if ((_a = this.autoCenter) === null || _a === void 0 ? void 0 : _a.onReady) {
|
|
12081
12081
|
this.recalcPosition().then(() => {
|
|
12082
12082
|
this.rootElement.removeAttribute('fade-in');
|
|
@@ -12086,7 +12086,7 @@ const KupDialog = class {
|
|
|
12086
12086
|
this.rootElement.removeAttribute('fade-in');
|
|
12087
12087
|
}
|
|
12088
12088
|
if (this.modal) {
|
|
12089
|
-
__classPrivateFieldGet$
|
|
12089
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").interact.showModalBackdrop(this.modal.closeOnBackdropClick
|
|
12090
12090
|
? () => {
|
|
12091
12091
|
this.close();
|
|
12092
12092
|
}
|
|
@@ -12096,13 +12096,13 @@ const KupDialog = class {
|
|
|
12096
12096
|
comp: this,
|
|
12097
12097
|
id: this.rootElement.id,
|
|
12098
12098
|
});
|
|
12099
|
-
__classPrivateFieldGet$
|
|
12099
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").debug.logLoad(this, true);
|
|
12100
12100
|
}
|
|
12101
12101
|
componentWillRender() {
|
|
12102
|
-
__classPrivateFieldGet$
|
|
12102
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").debug.logRender(this, false);
|
|
12103
12103
|
}
|
|
12104
12104
|
componentDidRender() {
|
|
12105
|
-
__classPrivateFieldGet$
|
|
12105
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").debug.logRender(this, true);
|
|
12106
12106
|
}
|
|
12107
12107
|
render() {
|
|
12108
12108
|
var _a;
|
|
@@ -12110,13 +12110,13 @@ const KupDialog = class {
|
|
|
12110
12110
|
'--kup_dialog_height': this.sizeY ? this.sizeY : 'auto',
|
|
12111
12111
|
'--kup_dialog_width': this.sizeX ? this.sizeX : 'auto',
|
|
12112
12112
|
};
|
|
12113
|
-
return (index.h(index.Host, { "fade-in": true, style: style }, index.h("style", null, __classPrivateFieldGet$
|
|
12113
|
+
return (index.h(index.Host, { "fade-in": true, style: style }, index.h("style", null, __classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, this.header ? (index.h("div", { class: "header", ref: (el) => (__classPrivateFieldSet$1(this, _KupDialog_header, el, "f")) }, this.header.title ? (index.h("div", { class: "header__title" }, this.header.title)) : null, ((_a = this.header.icons) === null || _a === void 0 ? void 0 : _a.close) ? (index.h(fImage.FImage, { onClick: () => this.close(), sizeX: "1.25em", sizeY: "100%", resource: "clear", wrapperClass: "header__close" })) : null)) : null, index.h("div", { class: "content" }, index.h("slot", null)))));
|
|
12114
12114
|
}
|
|
12115
12115
|
disconnectedCallback() {
|
|
12116
12116
|
if (this.modal) {
|
|
12117
|
-
__classPrivateFieldGet$
|
|
12117
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").interact.hideModalBackdrop();
|
|
12118
12118
|
}
|
|
12119
|
-
__classPrivateFieldGet$
|
|
12119
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").theme.unregister(this);
|
|
12120
12120
|
}
|
|
12121
12121
|
get rootElement() { return index.getElement(this); }
|
|
12122
12122
|
};
|
|
@@ -14242,7 +14242,7 @@ KupImage.style = kupImageCss;
|
|
|
14242
14242
|
|
|
14243
14243
|
const kupListCss = ":host{--kup_list_background:var(\n --kup-list-background,\n var(--kup-background-color)\n );--kup_list_color:var(--kup-list-color, var(--kup-text-color));--kup_list_font_family:var(--kup-list-font-family, var(--kup-font-family));--kup_list_font_size:var(--kup-list-font-size, var(--kup-font-size));--kup_list_font_weight:var(--kup-list-font-weight, 400);--kup_list_group_item_height:var(--kup-list-group-item-height, 3em);--kup_list_item_height:var(--kup-list-item-height, 2.5em);--kup_list_item_padding_left:var(--kup-list-item-padding, 0.75em);--kup_list_item_padding_right:var(--kup-list-item-padding, 0.75em);--kup_list_max_height_as_menu:var(--kup-list-max-height-as-menu, 33vh);--kup_list_primary_color:var(\n --kup-list-primary-color,\n var(--kup-primary-color)\n );--kup_list_primary_color_rgb:var(\n --kup-list-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_list_separator_color:var(\n --kup-list-separator-color,\n rgba(var(--kup-text-color-rgb), 0.25)\n );--kup_list_transition:var(--kup-list-transition, 120ms);display:block;font-family:var(--kup_list_font_family);font-size:var(--kup_list_font_size);outline:none}.list{background:var(--kup_list_background);color:var(--kup_list_color);font-weight:var(--kup_list_font_weight);letter-spacing:0.009375em;line-height:1.5em;list-style-type:none;margin:0;padding:0.5em 0;text-decoration:inherit;text-transform:inherit}.list--empty{padding:0}.list .list-item{display:-ms-flexbox;display:flex;height:var(--kup_list_item_height);position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding-left:var(--kup_list_item_padding_left);padding-right:calc(var(--kup_list_item_padding_left) + var(--kup_list_item_expand_padding, 0px));overflow:hidden;outline:none;transition:background-color var(--kup_list_transition), color var(--kup_list_transition)}.list .list-item[role=checkbox],.list .list-item[role=radio]{height:var(--kup_list_group_item_height)}.list .list-item.list-item--activated,.list .list-item.list-item--activated .list-item__graphic,.list .list-item.list-item--selected,.list .list-item.list-item--selected .list-item__graphic{background-color:rgba(var(--kup_list_primary_color_rgb), 0.175);color:var(--kup_list_primary_color)}.list .list-item .list-item__text{-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.list .list-item .list-item__primary-text{-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-top:0;line-height:normal;margin-bottom:-1.5em;display:block}.list .list-item .list-item__primary-text:before{display:inline-block;width:0;height:1.5em;content:\"\";vertical-align:0}.list .list-item .list-item__primary-text:after{display:inline-block;width:0;height:2em;content:\"\";vertical-align:-2em}.list .list-item .list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-o-text-overflow:ellipsis;-webkit-font-smoothing:antialiased;display:block;font-size:0.875em;font-weight:400;letter-spacing:0.0178571429em;line-height:1.25em;text-decoration:inherit;text-transform:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-top:0;line-height:normal;color:var(--kup_list_color);opacity:0.75}.list .list-item .kup-icon{margin:0;margin-right:0.75em}.list .list-item kup-checkbox{margin:0}.list .list-divider{background-color:var(--kup_list_separator_color);height:1px;padding:0;background-clip:content-box}.list.list--two-line .list-item{height:3.6em}.list.list--two-line .list-item__text{-ms-flex-item-align:start;align-self:flex-start}.list:not(.list--non-interactive)>:not(.list-item--disabled).list-item{cursor:pointer}.list:not(.list--non-interactive)>:not(.list-item--disabled).list-item label{cursor:pointer}.list:not(.list--non-interactive) .list-item:not(.list-item--selected):hover,.list:not(.list--non-interactive) .list-item:not(.list-item--selected).list-item--focused{background-color:var(--kup-hover-background-color);color:var(--kup-hover-color)}.list.text-hidden .list-item__text{display:none}.kup-menu{animation:fade-in 0.25s ease-out;background-color:var(--kup-background-color);box-shadow:var(--kup-box-shadow);color:var(--kup-text-color);display:none;max-height:var(--kup_list_max_height_as_menu);overflow:auto;position:relative;transform:none;transform-origin:unset;transition:height 0.2s;user-select:none;will-change:unset}.kup-menu.visible{display:block}.kup-menu .list-item__text{user-select:none}:host([nested-list]){--kup_list_item_expand_padding:1.5em;max-width:250px}:host([nested-list]) .kup-menu{max-height:unset;overflow:visible}:host([nested-list]) kup-list{display:none;left:100%;position:absolute;top:0}:host([nested-list]) .list-item{overflow:visible}:host([nested-list]) .list-item__expand-icon{position:absolute;right:0}:host([nested-list]) .list-item:hover kup-list{display:block}:host(.kup-paddingless) .list{padding:0}:host(.kup-danger){--kup-list-primary-color:var(--kup-danger-color);--kup-list-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-list-primary-color:var(--kup-info-color);--kup-list-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-list-primary-color:var(--kup-secondary-color);--kup-list-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-list-primary-color:var(--kup-success-color);--kup-list-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-list-primary-color:var(--kup-warning-color);--kup-list-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
14244
14244
|
|
|
14245
|
-
var __classPrivateFieldGet$
|
|
14245
|
+
var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14246
14246
|
if (kind === "a" && !f)
|
|
14247
14247
|
throw new TypeError("Private accessor was defined without a getter");
|
|
14248
14248
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -14303,7 +14303,7 @@ const KupList = class {
|
|
|
14303
14303
|
});
|
|
14304
14304
|
}
|
|
14305
14305
|
onKupClick(index) {
|
|
14306
|
-
__classPrivateFieldGet$
|
|
14306
|
+
__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14307
14307
|
}
|
|
14308
14308
|
/*-------------------------------------------------*/
|
|
14309
14309
|
/* L i s t e n e r s */
|
|
@@ -14324,7 +14324,7 @@ const KupList = class {
|
|
|
14324
14324
|
case 'Enter':
|
|
14325
14325
|
e.preventDefault();
|
|
14326
14326
|
e.stopPropagation();
|
|
14327
|
-
__classPrivateFieldGet$
|
|
14327
|
+
__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_handleSelection).call(this, this.focused);
|
|
14328
14328
|
break;
|
|
14329
14329
|
}
|
|
14330
14330
|
}
|
|
@@ -14350,10 +14350,10 @@ const KupList = class {
|
|
|
14350
14350
|
else {
|
|
14351
14351
|
this.focused++;
|
|
14352
14352
|
}
|
|
14353
|
-
if (this.focused > __classPrivateFieldGet$
|
|
14353
|
+
if (this.focused > __classPrivateFieldGet$2(this, _KupList_listItems, "f").length - 1) {
|
|
14354
14354
|
this.focused = 0;
|
|
14355
14355
|
}
|
|
14356
|
-
__classPrivateFieldGet$
|
|
14356
|
+
__classPrivateFieldGet$2(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14357
14357
|
}
|
|
14358
14358
|
/**
|
|
14359
14359
|
* Focuses the previous element of the list.
|
|
@@ -14374,9 +14374,9 @@ const KupList = class {
|
|
|
14374
14374
|
this.focused--;
|
|
14375
14375
|
}
|
|
14376
14376
|
if (this.focused < 0) {
|
|
14377
|
-
this.focused = __classPrivateFieldGet$
|
|
14377
|
+
this.focused = __classPrivateFieldGet$2(this, _KupList_listItems, "f").length - 1;
|
|
14378
14378
|
}
|
|
14379
|
-
__classPrivateFieldGet$
|
|
14379
|
+
__classPrivateFieldGet$2(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14380
14380
|
}
|
|
14381
14381
|
/**
|
|
14382
14382
|
* Used to retrieve component's props values.
|
|
@@ -14413,7 +14413,7 @@ const KupList = class {
|
|
|
14413
14413
|
if (index === undefined) {
|
|
14414
14414
|
index = this.focused;
|
|
14415
14415
|
}
|
|
14416
|
-
__classPrivateFieldGet$
|
|
14416
|
+
__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14417
14417
|
}
|
|
14418
14418
|
/**
|
|
14419
14419
|
* Sets the props to the component.
|
|
@@ -14426,8 +14426,8 @@ const KupList = class {
|
|
|
14426
14426
|
/* L i f e c y c l e H o o k s */
|
|
14427
14427
|
/*-------------------------------------------------*/
|
|
14428
14428
|
componentWillLoad() {
|
|
14429
|
-
__classPrivateFieldGet$
|
|
14430
|
-
__classPrivateFieldGet$
|
|
14429
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").debug.logLoad(this, false);
|
|
14430
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").theme.register(this);
|
|
14431
14431
|
for (let index = 0; index < this.data.length; index++) {
|
|
14432
14432
|
const el = this.data[index];
|
|
14433
14433
|
if (el.selected) {
|
|
@@ -14436,10 +14436,10 @@ const KupList = class {
|
|
|
14436
14436
|
}
|
|
14437
14437
|
}
|
|
14438
14438
|
componentDidLoad() {
|
|
14439
|
-
__classPrivateFieldGet$
|
|
14439
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").debug.logLoad(this, true);
|
|
14440
14440
|
}
|
|
14441
14441
|
componentWillRender() {
|
|
14442
|
-
__classPrivateFieldGet$
|
|
14442
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").debug.logRender(this, false);
|
|
14443
14443
|
}
|
|
14444
14444
|
componentDidRender() {
|
|
14445
14445
|
if (this.isMenu &&
|
|
@@ -14450,7 +14450,7 @@ const KupList = class {
|
|
|
14450
14450
|
this.rootElement.focus();
|
|
14451
14451
|
}, 0);
|
|
14452
14452
|
}
|
|
14453
|
-
__classPrivateFieldGet$
|
|
14453
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").debug.logRender(this, true);
|
|
14454
14454
|
}
|
|
14455
14455
|
render() {
|
|
14456
14456
|
__classPrivateFieldSet(this, _KupList_listItems, [], "f");
|
|
@@ -14462,7 +14462,7 @@ const KupList = class {
|
|
|
14462
14462
|
wrapperClass += ' visible';
|
|
14463
14463
|
}
|
|
14464
14464
|
}
|
|
14465
|
-
__classPrivateFieldGet$
|
|
14465
|
+
__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_checkRoleType).call(this);
|
|
14466
14466
|
if (this.selectable != true) {
|
|
14467
14467
|
componentClass += ' list--non-interactive';
|
|
14468
14468
|
}
|
|
@@ -14477,17 +14477,17 @@ const KupList = class {
|
|
|
14477
14477
|
}
|
|
14478
14478
|
let roleAttr = this.roleType;
|
|
14479
14479
|
let ariaMultiSelectable = 'false';
|
|
14480
|
-
if (__classPrivateFieldGet$
|
|
14480
|
+
if (__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isMultiSelection).call(this)) {
|
|
14481
14481
|
ariaMultiSelectable = 'true';
|
|
14482
14482
|
}
|
|
14483
14483
|
__classPrivateFieldSet(this, _KupList_radios, [], "f");
|
|
14484
14484
|
let index$1 = 0;
|
|
14485
|
-
return (index.h(index.Host, null, index.h("style", null, __classPrivateFieldGet$
|
|
14486
|
-
.filter((item) => __classPrivateFieldGet$
|
|
14487
|
-
.map((item) => __classPrivateFieldGet$
|
|
14485
|
+
return (index.h(index.Host, null, index.h("style", null, __classPrivateFieldGet$2(this, _KupList_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: "kup-component", class: wrapperClass }, index.h("ul", { class: componentClass, role: roleAttr, "aria-multiselectable": ariaMultiSelectable }, this.data
|
|
14486
|
+
.filter((item) => __classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
14487
|
+
.map((item) => __classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index$1++))))));
|
|
14488
14488
|
}
|
|
14489
14489
|
disconnectedCallback() {
|
|
14490
|
-
__classPrivateFieldGet$
|
|
14490
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").theme.unregister(this);
|
|
14491
14491
|
}
|
|
14492
14492
|
get rootElement() { return index.getElement(this); }
|
|
14493
14493
|
};
|
|
@@ -14538,7 +14538,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14538
14538
|
if (this.showIcons == true &&
|
|
14539
14539
|
item.icon != null &&
|
|
14540
14540
|
item.icon.trim() != '') {
|
|
14541
|
-
imageTag = __classPrivateFieldGet$
|
|
14541
|
+
imageTag = __classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_getIconTag).call(this, item.icon);
|
|
14542
14542
|
}
|
|
14543
14543
|
let primaryTextTag = [
|
|
14544
14544
|
getIdOfItemByDisplayMode(item, this.displayMode, ' - '),
|
|
@@ -14554,9 +14554,9 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14554
14554
|
}
|
|
14555
14555
|
let classAttr = 'list-item';
|
|
14556
14556
|
let tabIndexAttr = item.selected == true ? '0' : '-1';
|
|
14557
|
-
if (!__classPrivateFieldGet$
|
|
14557
|
+
if (!__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isNested).call(this) &&
|
|
14558
14558
|
item.selected == true &&
|
|
14559
|
-
__classPrivateFieldGet$
|
|
14559
|
+
__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isListBoxRule).call(this)) {
|
|
14560
14560
|
classAttr += ' list-item--selected';
|
|
14561
14561
|
}
|
|
14562
14562
|
if (this.focused === index$1) {
|
|
@@ -14572,7 +14572,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14572
14572
|
imageTag,
|
|
14573
14573
|
index.h("span", { class: "list-item__text" }, primaryTextTag, secTextTag),
|
|
14574
14574
|
];
|
|
14575
|
-
if (__classPrivateFieldGet$
|
|
14575
|
+
if (__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14576
14576
|
roleAttr = 'radio';
|
|
14577
14577
|
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
14578
14578
|
let dataTmp = [
|
|
@@ -14586,12 +14586,12 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14586
14586
|
display: 'none',
|
|
14587
14587
|
};
|
|
14588
14588
|
innerSpanTag = [
|
|
14589
|
-
index.h("span", { class: "list-item__graphic" }, index.h("input", { type: "radio", style: trickForMDC }), index.h("kup-radio", { data: dataTmp, id: this.rootElement.id + '_' + index$1, ref: (el) => (__classPrivateFieldGet$
|
|
14589
|
+
index.h("span", { class: "list-item__graphic" }, index.h("input", { type: "radio", style: trickForMDC }), index.h("kup-radio", { data: dataTmp, id: this.rootElement.id + '_' + index$1, ref: (el) => (__classPrivateFieldGet$2(this, _KupList_radios, "f")[index$1] = el) })),
|
|
14590
14590
|
imageTag,
|
|
14591
14591
|
index.h("label", { class: "list-item__text", htmlFor: this.rootElement.id + '_' + index$1 }, primaryTextTag, secTextTag),
|
|
14592
14592
|
];
|
|
14593
14593
|
}
|
|
14594
|
-
else if (__classPrivateFieldGet$
|
|
14594
|
+
else if (__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this)) {
|
|
14595
14595
|
roleAttr = 'checkbox';
|
|
14596
14596
|
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
14597
14597
|
let checkedAttr = item.selected == true ? true : false;
|
|
@@ -14609,14 +14609,14 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14609
14609
|
vNodes.push(index.h("li", { role: "separator", class: "list-divider" }));
|
|
14610
14610
|
}
|
|
14611
14611
|
vNodes.push(index.h("li", { ref: (el) => {
|
|
14612
|
-
__classPrivateFieldGet$
|
|
14612
|
+
__classPrivateFieldGet$2(this, _KupList_listItems, "f").push(el);
|
|
14613
14613
|
}, class: classAttr, role: roleAttr, tabindex: tabIndexAttr, "data-id": item.id, "aria-selected": ariaSelectedAttr, "aria-checked": ariaCheckedAttr, onBlur: !this.selectable
|
|
14614
14614
|
? (e) => e.stopPropagation()
|
|
14615
14615
|
: () => this.onKupBlur(), onFocus: !this.selectable
|
|
14616
14616
|
? (e) => e.stopPropagation()
|
|
14617
14617
|
: () => this.onKupFocus(), onClick: !this.selectable
|
|
14618
14618
|
? (e) => e.stopPropagation()
|
|
14619
|
-
: __classPrivateFieldGet$
|
|
14619
|
+
: __classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isNested).call(this)
|
|
14620
14620
|
? (e) => {
|
|
14621
14621
|
e.stopPropagation();
|
|
14622
14622
|
this.onKupClick(index$1);
|
|
@@ -14637,7 +14637,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14637
14637
|
};
|
|
14638
14638
|
return (index.h(fImage.FImage, Object.assign({}, propsFImage, { resource: icon, wrapperClass: `icon-button__icon kup-icon` })));
|
|
14639
14639
|
}, _KupList_isMultiSelection = function _KupList_isMultiSelection() {
|
|
14640
|
-
return __classPrivateFieldGet$
|
|
14640
|
+
return __classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this);
|
|
14641
14641
|
}, _KupList_isCheckBoxRule = function _KupList_isCheckBoxRule() {
|
|
14642
14642
|
return this.roleType == fCell.KupListRole.GROUP;
|
|
14643
14643
|
}, _KupList_isRadioButtonRule = function _KupList_isRadioButtonRule() {
|
|
@@ -14645,7 +14645,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14645
14645
|
}, _KupList_isListBoxRule = function _KupList_isListBoxRule() {
|
|
14646
14646
|
return this.roleType == fCell.KupListRole.LISTBOX;
|
|
14647
14647
|
}, _KupList_checkRoleType = function _KupList_checkRoleType() {
|
|
14648
|
-
if (!__classPrivateFieldGet$
|
|
14648
|
+
if (!__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this) && !__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14649
14649
|
this.roleType = fCell.KupListRole.LISTBOX;
|
|
14650
14650
|
}
|
|
14651
14651
|
}, _KupList_itemCompliant = function _KupList_itemCompliant(item) {
|
|
@@ -15633,11 +15633,13 @@ KupTabBar.style = kupTabBarCss;
|
|
|
15633
15633
|
*/
|
|
15634
15634
|
var KupTextFieldProps;
|
|
15635
15635
|
(function (KupTextFieldProps) {
|
|
15636
|
+
KupTextFieldProps["allowNegative"] = "When true, could be input negative numbers. It has effect only with number input type.";
|
|
15636
15637
|
KupTextFieldProps["customStyle"] = "Custom style of the component.";
|
|
15637
15638
|
KupTextFieldProps["decimals"] = "Number of decimals (should be used when inputType is number).";
|
|
15638
15639
|
KupTextFieldProps["disabled"] = "When set to true, the component is disabled.";
|
|
15639
15640
|
KupTextFieldProps["emitSubmitEventOnEnter"] = "When the text field is part of the autocomplete component and the list is opened, enter key selects the item and doesn't submit.";
|
|
15640
15641
|
KupTextFieldProps["fullWidth"] = "When set to true, the component will be rendered at full width.";
|
|
15642
|
+
KupTextFieldProps["group"] = "When true, the number will be formatted with group separator. It has effect only with number input type.";
|
|
15641
15643
|
KupTextFieldProps["helper"] = "When set, its content will be shown as a help text below the field.";
|
|
15642
15644
|
KupTextFieldProps["helperEnabled"] = "When true, the helper will be displayed.";
|
|
15643
15645
|
KupTextFieldProps["helperWhenFocused"] = "When set, the helper will be shown only when the field is focused.";
|
|
@@ -15645,6 +15647,7 @@ var KupTextFieldProps;
|
|
|
15645
15647
|
KupTextFieldProps["initialValue"] = "Sets the initial value of the component";
|
|
15646
15648
|
KupTextFieldProps["inputMode"] = "The HTML inputmode of the input element. It has no effect on text areas.";
|
|
15647
15649
|
KupTextFieldProps["inputType"] = "The HTML type of the input element. It has no effect on text areas.";
|
|
15650
|
+
KupTextFieldProps["integers"] = "Number of integers (should be used when inputType is number).";
|
|
15648
15651
|
KupTextFieldProps["isClearable"] = "Enables a clear trailing icon.";
|
|
15649
15652
|
KupTextFieldProps["label"] = "When set, its content will be shown as a label.";
|
|
15650
15653
|
KupTextFieldProps["leadingLabel"] = "When set to true, the label will be on the left of the component.";
|
|
@@ -15662,6 +15665,14 @@ var KupTextFieldProps;
|
|
|
15662
15665
|
|
|
15663
15666
|
const kupTextFieldCss = ":host{display:block;font-size:var(--kup-font-size)}:host([full-width]){width:100%}:host([full-width]) #kup-component{width:100%}: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-shaped) #kup-component .mdc-text-field.mdc-text-field--filled{border-radius:16px 16px 0 0}:host(.kup-shaped) #kup-component .mdc-text-field.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-radius:28px 0 0 28px;width:28px}:host(.kup-shaped) #kup-component .mdc-text-field.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-radius:0 28px 28px 0;width:28px}";
|
|
15664
15667
|
|
|
15668
|
+
var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
15669
|
+
if (kind === "a" && !f)
|
|
15670
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
15671
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
15672
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15673
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15674
|
+
};
|
|
15675
|
+
var _KupTextField_instances, _KupTextField_getValueForOutput, _KupTextField_setValueFromEventTaget;
|
|
15665
15676
|
const KupTextField = class {
|
|
15666
15677
|
constructor(hostRef) {
|
|
15667
15678
|
index.registerInstance(this, hostRef);
|
|
@@ -15673,16 +15684,19 @@ const KupTextField = class {
|
|
|
15673
15684
|
this.kupIconClick = index.createEvent(this, "kup-textfield-iconclick", 6);
|
|
15674
15685
|
this.kupClearIconClick = index.createEvent(this, "kup-textfield-cleariconclick", 6);
|
|
15675
15686
|
this.kupTextFieldSubmit = index.createEvent(this, "kup-textfield-submit", 6);
|
|
15687
|
+
_KupTextField_instances.add(this);
|
|
15676
15688
|
/**
|
|
15677
15689
|
* Instance of the KupManager class.
|
|
15678
15690
|
*/
|
|
15679
15691
|
this.kupManager = kupManager.kupManagerInstance();
|
|
15680
15692
|
this.value = '';
|
|
15693
|
+
this.allowNegative = false;
|
|
15681
15694
|
this.customStyle = '';
|
|
15682
15695
|
this.decimals = null;
|
|
15683
15696
|
this.disabled = false;
|
|
15684
15697
|
this.emitSubmitEventOnEnter = true;
|
|
15685
15698
|
this.fullWidth = false;
|
|
15699
|
+
this.group = false;
|
|
15686
15700
|
this.helper = null;
|
|
15687
15701
|
this.helperEnabled = true;
|
|
15688
15702
|
this.helperWhenFocused = false;
|
|
@@ -15690,6 +15704,7 @@ const KupTextField = class {
|
|
|
15690
15704
|
this.initialValue = '';
|
|
15691
15705
|
this.inputMode = null;
|
|
15692
15706
|
this.inputType = 'text';
|
|
15707
|
+
this.integers = null;
|
|
15693
15708
|
this.isClearable = false;
|
|
15694
15709
|
this.label = null;
|
|
15695
15710
|
this.leadingLabel = false;
|
|
@@ -15706,35 +15721,36 @@ const KupTextField = class {
|
|
|
15706
15721
|
}
|
|
15707
15722
|
onKupBlur(event) {
|
|
15708
15723
|
const { target } = event;
|
|
15724
|
+
__classPrivateFieldGet$1(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
15709
15725
|
this.kupBlur.emit({
|
|
15710
15726
|
comp: this,
|
|
15711
15727
|
id: this.rootElement.id,
|
|
15712
|
-
value:
|
|
15728
|
+
value: this.value,
|
|
15713
15729
|
});
|
|
15714
15730
|
}
|
|
15715
15731
|
onKupChange(event) {
|
|
15716
15732
|
const { target } = event;
|
|
15717
|
-
this.
|
|
15733
|
+
__classPrivateFieldGet$1(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
15718
15734
|
this.kupChange.emit({
|
|
15719
15735
|
comp: this,
|
|
15720
15736
|
id: this.rootElement.id,
|
|
15721
|
-
value:
|
|
15737
|
+
value: this.value,
|
|
15722
15738
|
});
|
|
15723
15739
|
}
|
|
15724
15740
|
onKupClick(event) {
|
|
15725
15741
|
const { target } = event;
|
|
15742
|
+
__classPrivateFieldGet$1(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
15726
15743
|
this.kupClick.emit({
|
|
15727
15744
|
comp: this,
|
|
15728
15745
|
id: this.rootElement.id,
|
|
15729
|
-
value:
|
|
15746
|
+
value: this.value,
|
|
15730
15747
|
});
|
|
15731
15748
|
}
|
|
15732
|
-
onKupFocus(
|
|
15733
|
-
const { target } = event;
|
|
15749
|
+
onKupFocus(_event) {
|
|
15734
15750
|
this.kupFocus.emit({
|
|
15735
15751
|
comp: this,
|
|
15736
15752
|
id: this.rootElement.id,
|
|
15737
|
-
value:
|
|
15753
|
+
value: this.value,
|
|
15738
15754
|
});
|
|
15739
15755
|
}
|
|
15740
15756
|
onKupInput(event) {
|
|
@@ -15762,12 +15778,14 @@ const KupTextField = class {
|
|
|
15762
15778
|
});
|
|
15763
15779
|
}
|
|
15764
15780
|
onKeyDown(event) {
|
|
15781
|
+
const { target } = event;
|
|
15765
15782
|
if (event.key === 'Enter') {
|
|
15766
15783
|
if (this.emitSubmitEventOnEnter == true) {
|
|
15784
|
+
__classPrivateFieldGet$1(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
15767
15785
|
this.kupTextFieldSubmit.emit({
|
|
15768
15786
|
comp: this,
|
|
15769
15787
|
id: this.rootElement.id,
|
|
15770
|
-
value: this.
|
|
15788
|
+
value: this.value,
|
|
15771
15789
|
});
|
|
15772
15790
|
}
|
|
15773
15791
|
}
|
|
@@ -15787,6 +15805,9 @@ const KupTextField = class {
|
|
|
15787
15805
|
* Returns the component's internal value.
|
|
15788
15806
|
*/
|
|
15789
15807
|
async getValue() {
|
|
15808
|
+
if (this.inputType == 'number') {
|
|
15809
|
+
return kupManager.formattedStringToUnformattedStringNumber(this.value, '');
|
|
15810
|
+
}
|
|
15790
15811
|
return this.value;
|
|
15791
15812
|
}
|
|
15792
15813
|
/**
|
|
@@ -15814,7 +15835,7 @@ const KupTextField = class {
|
|
|
15814
15835
|
async setValue(value) {
|
|
15815
15836
|
this.value = value;
|
|
15816
15837
|
try {
|
|
15817
|
-
this.inputEl.value =
|
|
15838
|
+
this.inputEl.value = __classPrivateFieldGet$1(this, _KupTextField_instances, "m", _KupTextField_getValueForOutput).call(this);
|
|
15818
15839
|
}
|
|
15819
15840
|
catch (error) {
|
|
15820
15841
|
this.kupManager.debug.logMessage(this, "Couldn't set value on input element: '" + value + "'", kupManager.KupDebugCategory.WARNING);
|
|
@@ -15850,6 +15871,7 @@ const KupTextField = class {
|
|
|
15850
15871
|
}
|
|
15851
15872
|
render() {
|
|
15852
15873
|
const props = {
|
|
15874
|
+
allowNegative: this.allowNegative,
|
|
15853
15875
|
danger: this.rootElement.classList.contains('kup-danger')
|
|
15854
15876
|
? true
|
|
15855
15877
|
: false,
|
|
@@ -15859,6 +15881,7 @@ const KupTextField = class {
|
|
|
15859
15881
|
? true
|
|
15860
15882
|
: false,
|
|
15861
15883
|
fullWidth: this.fullWidth,
|
|
15884
|
+
group: this.group,
|
|
15862
15885
|
helper: this.helper,
|
|
15863
15886
|
helperEnabled: this.helperEnabled,
|
|
15864
15887
|
helperWhenFocused: this.helperWhenFocused,
|
|
@@ -15868,6 +15891,7 @@ const KupTextField = class {
|
|
|
15868
15891
|
: false,
|
|
15869
15892
|
inputMode: this.inputMode,
|
|
15870
15893
|
inputType: this.inputType,
|
|
15894
|
+
integers: this.integers,
|
|
15871
15895
|
isClearable: this.isClearable,
|
|
15872
15896
|
label: this.label,
|
|
15873
15897
|
leadingLabel: this.leadingLabel,
|
|
@@ -15910,6 +15934,20 @@ const KupTextField = class {
|
|
|
15910
15934
|
}
|
|
15911
15935
|
get rootElement() { return index.getElement(this); }
|
|
15912
15936
|
};
|
|
15937
|
+
_KupTextField_instances = new WeakSet(), _KupTextField_getValueForOutput = function _KupTextField_getValueForOutput() {
|
|
15938
|
+
if (this.value == null || this.value.trim() == '') {
|
|
15939
|
+
return '';
|
|
15940
|
+
}
|
|
15941
|
+
let v1 = kupManager.unformattedStringToFormattedStringNumber(this.value, this.decimals, '');
|
|
15942
|
+
return v1;
|
|
15943
|
+
}, _KupTextField_setValueFromEventTaget = function _KupTextField_setValueFromEventTaget(target) {
|
|
15944
|
+
if (this.inputType == 'number') {
|
|
15945
|
+
this.value = kupManager.formattedStringToUnformattedStringNumber(target.value, '');
|
|
15946
|
+
}
|
|
15947
|
+
else {
|
|
15948
|
+
this.value = target.value;
|
|
15949
|
+
}
|
|
15950
|
+
};
|
|
15913
15951
|
KupTextField.style = kupTextFieldCss;
|
|
15914
15952
|
|
|
15915
15953
|
/**
|