@sme.up/ketchup 7.4.2 → 8.0.0
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/{component-72a5b626.js → component-85c2bd4d.js} +1 -1
- package/dist/cjs/{f-button-daddd700.js → f-button-49b2c37c.js} +1 -1
- package/dist/cjs/{f-cell-3682fad4.js → f-cell-9a6bc55c.js} +4 -4
- package/dist/cjs/{f-chip-9d540d94.js → f-chip-dee84122.js} +2 -2
- package/dist/cjs/{f-image-7b42d149.js → f-image-27f965ff.js} +4 -4
- package/dist/cjs/{f-paginator-utils-1baeba0f.js → f-paginator-utils-4a30189d.js} +2 -2
- package/dist/cjs/{f-text-field-a6ed2d22.js → f-text-field-04a663b4.js} +1 -1
- package/dist/cjs/{f-text-field-mdc-85997738.js → f-text-field-mdc-0e22f3e3.js} +2 -2
- package/dist/cjs/ketchup.cjs.js +2 -2
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +814 -819
- 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 +5 -5
- package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +7 -10
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +25 -8
- package/dist/cjs/kup-family-tree.cjs.entry.js +8 -19
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-10351449.js → kup-manager-2ff5d258.js} +80 -1
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +1127 -218
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{tslib.es6-0ee02c67.js → tslib.es6-386654de.js} +9 -5
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/kup-card/kup-card.css +4 -8
- package/dist/collection/components/kup-chip/kup-chip.js +4 -3
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +0 -3
- package/dist/collection/components/kup-data-table/kup-data-table.css +3 -6
- package/dist/collection/components/kup-data-table/kup-data-table.js +6 -20
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +2 -0
- package/dist/collection/components/kup-echart/kup-echart.js +23 -8
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +2 -2
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +4 -15
- package/dist/collection/components/kup-image/kup-image.js +28 -0
- package/dist/collection/components/kup-list/kup-list.css +1 -1
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +5 -2
- package/dist/collection/components/kup-planner/kup-planner.css +6 -3
- package/dist/collection/components/kup-planner/kup-planner.js +347 -65
- package/dist/collection/components/kup-qlik/kup-qlik.css +4 -8
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -3
- package/dist/collection/components/kup-spinner/kup-spinner.css +2 -4
- package/dist/collection/components/kup-tree/kup-tree.js +66 -67
- package/dist/collection/f-components/f-image/f-image.js +3 -3
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +1 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +18 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/types/GenericTypes.js +1 -0
- package/dist/components/kup-autocomplete2.js +228 -151
- package/dist/components/kup-dashboard.js +0 -3
- package/dist/components/kup-echart2.js +24 -7
- package/dist/components/kup-family-tree.js +5 -16
- package/dist/components/kup-planner.js +1127 -219
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.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 +1 -1
- 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/{component-b1bedf1d.js → component-120651a0.js} +1 -1
- package/dist/esm/{f-button-8d15b5a0.js → f-button-744cf1f6.js} +1 -1
- package/dist/esm/{f-cell-7b706e57.js → f-cell-b319c869.js} +4 -4
- package/dist/esm/{f-chip-c671fe90.js → f-chip-7e3e4180.js} +2 -2
- package/dist/esm/{f-image-21451b15.js → f-image-098c26ce.js} +4 -4
- package/dist/esm/{f-paginator-utils-92bbf277.js → f-paginator-utils-674cb2ae.js} +2 -2
- package/dist/esm/{f-text-field-0bb2d109.js → f-text-field-c38ef113.js} +1 -1
- package/dist/esm/{f-text-field-mdc-d42d3f9e.js → f-text-field-mdc-cee583ea.js} +2 -2
- package/dist/esm/ketchup.js +2 -2
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +814 -819
- 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 +5 -5
- package/dist/esm/kup-dash-list.entry.js +1 -1
- package/dist/esm/kup-dash_2.entry.js +1 -1
- package/dist/esm/kup-dashboard.entry.js +7 -10
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +25 -8
- package/dist/esm/kup-family-tree.entry.js +8 -19
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-6145d980.js → kup-manager-b41eb2a8.js} +80 -2
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +5 -5
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +1128 -219
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +4 -4
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{tslib.es6-3eea2234.js → tslib.es6-8c2af864.js} +9 -5
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-439ac105.entry.js → p-0b0b61cb.entry.js} +1 -1
- package/dist/ketchup/p-0b91f5f8.entry.js +1 -0
- package/dist/ketchup/{p-81605f08.js → p-10d84b1b.js} +1 -1
- package/dist/ketchup/{p-a203f78b.js → p-27a56c87.js} +1 -1
- package/dist/ketchup/{p-32517a99.entry.js → p-395e1960.entry.js} +1 -1
- package/dist/ketchup/{p-76bf53df.entry.js → p-3b41aca7.entry.js} +1 -1
- package/dist/ketchup/{p-4d039705.entry.js → p-3efe7f43.entry.js} +1 -1
- package/dist/ketchup/{p-a641780a.entry.js → p-4325d965.entry.js} +1 -1
- package/dist/ketchup/{p-2915a66a.entry.js → p-4ae2ca6f.entry.js} +1 -1
- package/dist/ketchup/{p-e4975ffa.entry.js → p-5ce2b4fc.entry.js} +1 -1
- package/dist/ketchup/p-5d398e42.js +1 -0
- package/dist/ketchup/{p-7cfdce27.js → p-77e3d537.js} +1 -1
- package/dist/ketchup/p-7f59211b.js +1 -0
- package/dist/ketchup/p-940a5feb.js +30 -0
- package/dist/ketchup/{p-826c91d7.js → p-9700eb32.js} +1 -1
- package/dist/ketchup/p-a7e19620.entry.js +39 -0
- package/dist/ketchup/p-a877a87b.entry.js +9 -0
- package/dist/ketchup/p-a9b7533b.entry.js +25 -0
- package/dist/ketchup/{p-89ac80c1.entry.js → p-af82131e.entry.js} +1 -1
- package/dist/ketchup/{p-da37c417.entry.js → p-b032f47d.entry.js} +1 -1
- package/dist/ketchup/{p-0c1cbf8b.entry.js → p-b244f5ca.entry.js} +1 -1
- package/dist/ketchup/{p-2a2dc2a8.entry.js → p-bb17c1ba.entry.js} +1 -1
- package/dist/ketchup/{p-0c9b7c80.entry.js → p-bd42562d.entry.js} +1 -1
- package/dist/ketchup/{p-849ad5d8.entry.js → p-c8b7790a.entry.js} +1 -1
- package/dist/ketchup/{p-c022824e.entry.js → p-c968e93d.entry.js} +1 -1
- package/dist/ketchup/{p-1242366a.entry.js → p-d739710a.entry.js} +1 -1
- package/dist/ketchup/{p-ae4fffe0.js → p-d98fdb9b.js} +1 -1
- package/dist/ketchup/{p-c222d070.entry.js → p-da891093.entry.js} +1 -1
- package/dist/ketchup/{p-281cff81.entry.js → p-df316daf.entry.js} +1 -1
- package/dist/ketchup/{p-d87fb5ff.entry.js → p-e02b5141.entry.js} +1 -1
- package/dist/ketchup/{p-ea16ddc0.js → p-e714f4dc.js} +1 -1
- package/dist/ketchup/{p-c4d9e3e2.js → p-ef614656.js} +1 -1
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +2 -0
- package/dist/types/components/kup-image/kup-image.d.ts +2 -0
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +18 -3
- package/dist/types/components/kup-planner/kup-planner.d.ts +36 -11
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -5
- package/dist/types/components.d.ts +39 -4
- package/dist/types/f-components/f-image/f-image-declarations.d.ts +1 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +1 -1
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +1 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +7 -0
- package/dist/types/types/GenericTypes.d.ts +1 -0
- package/package.json +8 -20
- package/dist/ketchup/p-02a26d59.entry.js +0 -9
- package/dist/ketchup/p-462475ac.entry.js +0 -10
- package/dist/ketchup/p-5292ef67.js +0 -30
- package/dist/ketchup/p-79b0730b.js +0 -15
- package/dist/ketchup/p-9f00ad0f.js +0 -1
- package/dist/ketchup/p-be61dd36.entry.js +0 -39
- package/dist/ketchup/p-e83e70e2.entry.js +0 -1
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-74433248.js');
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const fTextField = require('./f-text-field-
|
|
8
|
-
const fTextFieldMdc = require('./f-text-field-mdc-
|
|
9
|
-
const fCell = require('./f-cell-
|
|
6
|
+
const kupManager = require('./kup-manager-2ff5d258.js');
|
|
7
|
+
const fTextField = require('./f-text-field-04a663b4.js');
|
|
8
|
+
const fTextFieldMdc = require('./f-text-field-mdc-0e22f3e3.js');
|
|
9
|
+
const fCell = require('./f-cell-9a6bc55c.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-27f965ff.js');
|
|
12
|
+
const fButton = require('./f-button-49b2c37c.js');
|
|
13
13
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
14
|
-
const fChip = require('./f-chip-
|
|
15
|
-
const component = require('./component-
|
|
14
|
+
const fChip = require('./f-chip-dee84122.js');
|
|
15
|
+
const component = require('./component-85c2bd4d.js');
|
|
16
16
|
const fCheckbox = require('./f-checkbox-593f72c3.js');
|
|
17
|
-
const fPaginatorUtils = require('./f-paginator-utils-
|
|
18
|
-
require('./tslib.es6-
|
|
17
|
+
const fPaginatorUtils = require('./f-paginator-utils-4a30189d.js');
|
|
18
|
+
require('./tslib.es6-386654de.js');
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Props of the kup-autocomplete component.
|
|
@@ -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$6 = (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$6(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$6(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$6(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$6(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$6(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$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value, false);
|
|
267
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
268
|
+
if (__classPrivateFieldGet$6(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$6(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$6(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
280
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
281
281
|
}
|
|
282
282
|
else {
|
|
283
283
|
if (this.showDropDownIcon) {
|
|
284
|
-
__classPrivateFieldGet$
|
|
284
|
+
__classPrivateFieldGet$6(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$6(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
292
|
+
open: __classPrivateFieldGet$6(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$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
298
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f")) {
|
|
299
|
+
__classPrivateFieldGet$6(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$6(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$6(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$6(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
319
319
|
break;
|
|
320
320
|
case 'ArrowUp':
|
|
321
321
|
e.preventDefault();
|
|
322
322
|
e.stopPropagation();
|
|
323
|
-
__classPrivateFieldGet$
|
|
323
|
+
__classPrivateFieldGet$6(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$6(this, _KupAutocomplete_listEl, "f").select().then(() => {
|
|
329
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
330
|
+
__classPrivateFieldGet$6(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$6(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$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
346
|
+
__classPrivateFieldGet$6(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$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
352
|
+
__classPrivateFieldGet$6(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$6(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$6(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$6(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, false);
|
|
407
|
+
__classPrivateFieldGet$6(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$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, this.value, true);
|
|
419
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, true);
|
|
420
420
|
}
|
|
421
421
|
componentWillRender() {
|
|
422
|
-
__classPrivateFieldGet$
|
|
422
|
+
__classPrivateFieldGet$6(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$6(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$6(this, _KupAutocomplete_elStyle, "f") }, index.h("style", null, __classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$6(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$6(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$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_prepList).call(this)));
|
|
445
445
|
}
|
|
446
446
|
disconnectedCallback() {
|
|
447
|
-
if (__classPrivateFieldGet$
|
|
448
|
-
__classPrivateFieldGet$
|
|
449
|
-
__classPrivateFieldGet$
|
|
447
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f")) {
|
|
448
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f")]);
|
|
449
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").remove();
|
|
450
450
|
}
|
|
451
|
-
__classPrivateFieldGet$
|
|
451
|
+
__classPrivateFieldGet$6(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$6(this, _KupAutocomplete_textfieldEl, "f").value.length < this.minimumChars) {
|
|
458
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
459
459
|
return false;
|
|
460
460
|
}
|
|
461
|
-
__classPrivateFieldGet$
|
|
462
|
-
__classPrivateFieldGet$
|
|
463
|
-
const elStyle = __classPrivateFieldGet$
|
|
461
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f").classList.add('toggled');
|
|
462
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").menuVisible = true;
|
|
463
|
+
const elStyle = __classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").style;
|
|
464
464
|
elStyle.height = 'auto';
|
|
465
|
-
elStyle.minWidth = __classPrivateFieldGet$
|
|
466
|
-
if (__classPrivateFieldGet$
|
|
467
|
-
__classPrivateFieldGet$
|
|
465
|
+
elStyle.minWidth = __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f").clientWidth + 'px';
|
|
466
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"))) {
|
|
467
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f"));
|
|
468
468
|
}
|
|
469
469
|
else {
|
|
470
|
-
__classPrivateFieldGet$
|
|
470
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f"), 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
471
471
|
}
|
|
472
|
-
__classPrivateFieldGet$
|
|
473
|
-
if (!__classPrivateFieldGet$
|
|
472
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"));
|
|
473
|
+
if (!__classPrivateFieldGet$6(this, _KupAutocomplete_clickCb, "f")) {
|
|
474
474
|
__classPrivateFieldSet$4(this, _KupAutocomplete_clickCb, {
|
|
475
475
|
cb: () => {
|
|
476
|
-
__classPrivateFieldGet$
|
|
476
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
477
477
|
},
|
|
478
|
-
el: __classPrivateFieldGet$
|
|
478
|
+
el: __classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"),
|
|
479
479
|
}, "f");
|
|
480
480
|
}
|
|
481
|
-
__classPrivateFieldGet$
|
|
481
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").addClickCallback(__classPrivateFieldGet$6(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$6(this, _KupAutocomplete_textfieldWrapper, "f").classList.remove('toggled');
|
|
485
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").menuVisible = false;
|
|
486
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"));
|
|
487
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet$6(this, _KupAutocomplete_clickCb, "f"));
|
|
488
488
|
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
489
|
-
return __classPrivateFieldGet$
|
|
489
|
+
return __classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
490
490
|
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, setValue) {
|
|
491
|
-
if (!__classPrivateFieldGet$
|
|
491
|
+
if (!__classPrivateFieldGet$6(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$6(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$6(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
502
|
+
__classPrivateFieldGet$6(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$6(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
508
|
+
__classPrivateFieldGet$6(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$5 = (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$5(this, _KupChip_instances, "m", _KupChip_stringifiedValues).call(this),
|
|
6524
6524
|
});
|
|
6525
6525
|
this.refresh();
|
|
6526
6526
|
}
|
|
@@ -6636,12 +6636,12 @@ const KupChip = class {
|
|
|
6636
6636
|
props.onFocus.push((chip) => this.onKupFocus(chip));
|
|
6637
6637
|
props.onIconClick.push((chip) => this.onKupIconClick(chip));
|
|
6638
6638
|
}
|
|
6639
|
-
return (index.h(index.Host, { "onKup-autocomplete-
|
|
6640
|
-
__classPrivateFieldGet$
|
|
6641
|
-
}, "onKup-combobox-
|
|
6642
|
-
__classPrivateFieldGet$
|
|
6639
|
+
return (index.h(index.Host, { "onKup-autocomplete-itemclick": (e) => {
|
|
6640
|
+
__classPrivateFieldGet$5(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6641
|
+
}, "onKup-combobox-itemclick": (e) => {
|
|
6642
|
+
__classPrivateFieldGet$5(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6643
6643
|
}, "onKup-textfield-change": (e) => {
|
|
6644
|
-
__classPrivateFieldGet$
|
|
6644
|
+
__classPrivateFieldGet$5(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() {
|
|
@@ -6664,8 +6664,9 @@ _KupChip_instances = new WeakSet(), _KupChip_changeHandler =
|
|
|
6664
6664
|
if (value) {
|
|
6665
6665
|
const node = (_b = this.data) === null || _b === void 0 ? void 0 : _b.find((node) => node.id === value);
|
|
6666
6666
|
if (!node) {
|
|
6667
|
+
const data = this.data && this.data.length ? this.data : [];
|
|
6667
6668
|
this.data = [
|
|
6668
|
-
...
|
|
6669
|
+
...data,
|
|
6669
6670
|
{
|
|
6670
6671
|
id: listNode ? listNode.id : value,
|
|
6671
6672
|
value: listNode ? listNode.value : value,
|
|
@@ -6678,7 +6679,7 @@ _KupChip_instances = new WeakSet(), _KupChip_changeHandler =
|
|
|
6678
6679
|
this.kupChange.emit({
|
|
6679
6680
|
comp: this,
|
|
6680
6681
|
id: this.rootElement.id,
|
|
6681
|
-
stringifiedValues: __classPrivateFieldGet$
|
|
6682
|
+
stringifiedValues: __classPrivateFieldGet$5(this, _KupChip_instances, "m", _KupChip_stringifiedValues).call(this),
|
|
6682
6683
|
});
|
|
6683
6684
|
}
|
|
6684
6685
|
}
|
|
@@ -6967,7 +6968,7 @@ var KupComboboxProps;
|
|
|
6967
6968
|
|
|
6968
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)}";
|
|
6969
6970
|
|
|
6970
|
-
var __classPrivateFieldGet$
|
|
6971
|
+
var __classPrivateFieldGet$4 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
6971
6972
|
if (kind === "a" && !f)
|
|
6972
6973
|
throw new TypeError("Private accessor was defined without a getter");
|
|
6973
6974
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -7023,33 +7024,33 @@ const KupCombobox = class {
|
|
|
7023
7024
|
comp: this,
|
|
7024
7025
|
id: this.rootElement.id,
|
|
7025
7026
|
value: this.value,
|
|
7026
|
-
inputValue: __classPrivateFieldGet$
|
|
7027
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7027
7028
|
});
|
|
7028
7029
|
}
|
|
7029
7030
|
onKupChange(value) {
|
|
7030
|
-
let ret = __classPrivateFieldGet$
|
|
7031
|
+
let ret = __classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7031
7032
|
this.kupChange.emit({
|
|
7032
7033
|
comp: this,
|
|
7033
7034
|
id: this.rootElement.id,
|
|
7034
7035
|
value: this.value,
|
|
7035
|
-
inputValue: __classPrivateFieldGet$
|
|
7036
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7036
7037
|
node: ret.node,
|
|
7037
7038
|
});
|
|
7038
7039
|
}
|
|
7039
7040
|
onKupClick() {
|
|
7040
7041
|
if (this.isSelect == true) {
|
|
7041
|
-
if (__classPrivateFieldGet$
|
|
7042
|
-
__classPrivateFieldGet$
|
|
7042
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
7043
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7043
7044
|
}
|
|
7044
7045
|
else {
|
|
7045
|
-
__classPrivateFieldGet$
|
|
7046
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7046
7047
|
}
|
|
7047
7048
|
}
|
|
7048
7049
|
this.kupClick.emit({
|
|
7049
7050
|
comp: this,
|
|
7050
7051
|
id: this.rootElement.id,
|
|
7051
7052
|
value: this.value,
|
|
7052
|
-
inputValue: __classPrivateFieldGet$
|
|
7053
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7053
7054
|
});
|
|
7054
7055
|
}
|
|
7055
7056
|
onKupFocus() {
|
|
@@ -7057,47 +7058,47 @@ const KupCombobox = class {
|
|
|
7057
7058
|
comp: this,
|
|
7058
7059
|
id: this.rootElement.id,
|
|
7059
7060
|
value: this.value,
|
|
7060
|
-
inputValue: __classPrivateFieldGet$
|
|
7061
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7061
7062
|
});
|
|
7062
7063
|
}
|
|
7063
7064
|
onKupInput() {
|
|
7064
|
-
let ret = __classPrivateFieldGet$
|
|
7065
|
-
__classPrivateFieldGet$
|
|
7065
|
+
let ret = __classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value, false);
|
|
7066
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7066
7067
|
this.kupInput.emit({
|
|
7067
7068
|
comp: this,
|
|
7068
7069
|
id: this.rootElement.id,
|
|
7069
7070
|
value: this.value,
|
|
7070
|
-
inputValue: __classPrivateFieldGet$
|
|
7071
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7071
7072
|
node: ret.node,
|
|
7072
7073
|
});
|
|
7073
7074
|
}
|
|
7074
7075
|
onKupIconClick() {
|
|
7075
|
-
if (__classPrivateFieldGet$
|
|
7076
|
-
__classPrivateFieldGet$
|
|
7076
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
7077
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7077
7078
|
}
|
|
7078
7079
|
else {
|
|
7079
|
-
__classPrivateFieldGet$
|
|
7080
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7080
7081
|
}
|
|
7081
7082
|
this.kupIconClick.emit({
|
|
7082
7083
|
comp: this,
|
|
7083
7084
|
id: this.rootElement.id,
|
|
7084
7085
|
value: this.value,
|
|
7085
|
-
inputValue: __classPrivateFieldGet$
|
|
7086
|
-
open: __classPrivateFieldGet$
|
|
7086
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7087
|
+
open: __classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled'),
|
|
7087
7088
|
});
|
|
7088
7089
|
}
|
|
7089
7090
|
onKupItemClick(e) {
|
|
7090
7091
|
this.onKupChange(e.detail.selected.id);
|
|
7091
|
-
__classPrivateFieldGet$
|
|
7092
|
-
if (__classPrivateFieldGet$
|
|
7093
|
-
__classPrivateFieldGet$
|
|
7092
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7093
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f")) {
|
|
7094
|
+
__classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7094
7095
|
}
|
|
7095
7096
|
this.kupItemClick.emit({
|
|
7096
7097
|
comp: this,
|
|
7097
7098
|
id: this.rootElement.id,
|
|
7098
7099
|
node: e.detail.selected,
|
|
7099
7100
|
value: this.value,
|
|
7100
|
-
inputValue: __classPrivateFieldGet$
|
|
7101
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7101
7102
|
});
|
|
7102
7103
|
}
|
|
7103
7104
|
/*-------------------------------------------------*/
|
|
@@ -7110,30 +7111,30 @@ const KupCombobox = class {
|
|
|
7110
7111
|
/* L i s t e n e r s */
|
|
7111
7112
|
/*-------------------------------------------------*/
|
|
7112
7113
|
listenKeydown(e) {
|
|
7113
|
-
if (__classPrivateFieldGet$
|
|
7114
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7114
7115
|
switch (e.key) {
|
|
7115
7116
|
case 'ArrowDown':
|
|
7116
7117
|
e.preventDefault();
|
|
7117
7118
|
e.stopPropagation();
|
|
7118
|
-
__classPrivateFieldGet$
|
|
7119
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").focusNext();
|
|
7119
7120
|
break;
|
|
7120
7121
|
case 'ArrowUp':
|
|
7121
7122
|
e.preventDefault();
|
|
7122
7123
|
e.stopPropagation();
|
|
7123
|
-
__classPrivateFieldGet$
|
|
7124
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").focusPrevious();
|
|
7124
7125
|
break;
|
|
7125
7126
|
case 'Enter':
|
|
7126
7127
|
e.preventDefault();
|
|
7127
7128
|
e.stopPropagation();
|
|
7128
|
-
__classPrivateFieldGet$
|
|
7129
|
-
__classPrivateFieldGet$
|
|
7130
|
-
__classPrivateFieldGet$
|
|
7129
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").select().then(() => {
|
|
7130
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7131
|
+
__classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7131
7132
|
});
|
|
7132
7133
|
break;
|
|
7133
7134
|
case 'Escape':
|
|
7134
7135
|
e.preventDefault();
|
|
7135
7136
|
e.stopPropagation();
|
|
7136
|
-
__classPrivateFieldGet$
|
|
7137
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7137
7138
|
break;
|
|
7138
7139
|
}
|
|
7139
7140
|
}
|
|
@@ -7142,14 +7143,14 @@ const KupCombobox = class {
|
|
|
7142
7143
|
case 'ArrowDown':
|
|
7143
7144
|
e.preventDefault();
|
|
7144
7145
|
e.stopPropagation();
|
|
7145
|
-
__classPrivateFieldGet$
|
|
7146
|
-
__classPrivateFieldGet$
|
|
7146
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7147
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").focusNext();
|
|
7147
7148
|
break;
|
|
7148
7149
|
case 'ArrowUp':
|
|
7149
7150
|
e.preventDefault();
|
|
7150
7151
|
e.stopPropagation();
|
|
7151
|
-
__classPrivateFieldGet$
|
|
7152
|
-
__classPrivateFieldGet$
|
|
7152
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7153
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").focusPrevious();
|
|
7153
7154
|
break;
|
|
7154
7155
|
}
|
|
7155
7156
|
}
|
|
@@ -7182,7 +7183,7 @@ const KupCombobox = class {
|
|
|
7182
7183
|
* Sets the focus to the component.
|
|
7183
7184
|
*/
|
|
7184
7185
|
async setFocus() {
|
|
7185
|
-
__classPrivateFieldGet$
|
|
7186
|
+
__classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7186
7187
|
}
|
|
7187
7188
|
/**
|
|
7188
7189
|
* Sets the props to the component.
|
|
@@ -7196,14 +7197,14 @@ const KupCombobox = class {
|
|
|
7196
7197
|
* @param {string} value - Value to be set.
|
|
7197
7198
|
*/
|
|
7198
7199
|
async setValue(value) {
|
|
7199
|
-
__classPrivateFieldGet$
|
|
7200
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7200
7201
|
}
|
|
7201
7202
|
/*-------------------------------------------------*/
|
|
7202
7203
|
/* L i f e c y c l e H o o k s */
|
|
7203
7204
|
/*-------------------------------------------------*/
|
|
7204
7205
|
componentWillLoad() {
|
|
7205
|
-
__classPrivateFieldGet$
|
|
7206
|
-
__classPrivateFieldGet$
|
|
7206
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").debug.logLoad(this, false);
|
|
7207
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").theme.register(this);
|
|
7207
7208
|
this.value = this.initialValue;
|
|
7208
7209
|
if (!this.data) {
|
|
7209
7210
|
this.data = {
|
|
@@ -7213,11 +7214,11 @@ const KupCombobox = class {
|
|
|
7213
7214
|
}
|
|
7214
7215
|
}
|
|
7215
7216
|
componentDidLoad() {
|
|
7216
|
-
__classPrivateFieldGet$
|
|
7217
|
-
__classPrivateFieldGet$
|
|
7217
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, this.value, true);
|
|
7218
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").debug.logLoad(this, true);
|
|
7218
7219
|
}
|
|
7219
7220
|
componentWillRender() {
|
|
7220
|
-
__classPrivateFieldGet$
|
|
7221
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").debug.logRender(this, false);
|
|
7221
7222
|
}
|
|
7222
7223
|
componentDidRender() {
|
|
7223
7224
|
const root = this.rootElement.shadowRoot;
|
|
@@ -7229,21 +7230,21 @@ const KupCombobox = class {
|
|
|
7229
7230
|
fTextFieldMdc.FTextFieldMDC(f);
|
|
7230
7231
|
}
|
|
7231
7232
|
}
|
|
7232
|
-
__classPrivateFieldGet$
|
|
7233
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").debug.logRender(this, true);
|
|
7233
7234
|
}
|
|
7234
7235
|
render() {
|
|
7235
7236
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
7236
7237
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
7237
|
-
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$4(this, _KupCombobox_elStyle, "f") }, index.h("style", null, __classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$4(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
|
|
7238
7239
|
? kupManager.KupThemeIconValues.DROPDOWN
|
|
7239
|
-
: 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$4(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
7240
7241
|
}
|
|
7241
7242
|
disconnectedCallback() {
|
|
7242
|
-
if (__classPrivateFieldGet$
|
|
7243
|
-
__classPrivateFieldGet$
|
|
7244
|
-
__classPrivateFieldGet$
|
|
7243
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f")) {
|
|
7244
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f")]);
|
|
7245
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").remove();
|
|
7245
7246
|
}
|
|
7246
|
-
__classPrivateFieldGet$
|
|
7247
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").theme.unregister(this);
|
|
7247
7248
|
}
|
|
7248
7249
|
get rootElement() { return index.getElement(this); }
|
|
7249
7250
|
static get watchers() { return {
|
|
@@ -7251,54 +7252,54 @@ const KupCombobox = class {
|
|
|
7251
7252
|
}; }
|
|
7252
7253
|
};
|
|
7253
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() {
|
|
7254
|
-
if (__classPrivateFieldGet$
|
|
7255
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7255
7256
|
return;
|
|
7256
7257
|
}
|
|
7257
|
-
__classPrivateFieldGet$
|
|
7258
|
-
__classPrivateFieldGet$
|
|
7259
|
-
__classPrivateFieldGet$
|
|
7260
|
-
const elStyle = __classPrivateFieldGet$
|
|
7258
|
+
__classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").classList.add('toggled');
|
|
7259
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").menuVisible = true;
|
|
7260
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").filter = '';
|
|
7261
|
+
const elStyle = __classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").style;
|
|
7261
7262
|
elStyle.height = 'auto';
|
|
7262
|
-
elStyle.minWidth = __classPrivateFieldGet$
|
|
7263
|
-
if (__classPrivateFieldGet$
|
|
7264
|
-
__classPrivateFieldGet$
|
|
7263
|
+
elStyle.minWidth = __classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").clientWidth + 'px';
|
|
7264
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"))) {
|
|
7265
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"), __classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f"));
|
|
7265
7266
|
}
|
|
7266
7267
|
else {
|
|
7267
|
-
__classPrivateFieldGet$
|
|
7268
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"), __classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f"), 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
7268
7269
|
}
|
|
7269
|
-
__classPrivateFieldGet$
|
|
7270
|
-
if (!__classPrivateFieldGet$
|
|
7270
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"));
|
|
7271
|
+
if (!__classPrivateFieldGet$4(this, _KupCombobox_clickCb, "f")) {
|
|
7271
7272
|
__classPrivateFieldSet$3(this, _KupCombobox_clickCb, {
|
|
7272
7273
|
cb: () => {
|
|
7273
|
-
__classPrivateFieldGet$
|
|
7274
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7274
7275
|
},
|
|
7275
|
-
el: __classPrivateFieldGet$
|
|
7276
|
+
el: __classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"),
|
|
7276
7277
|
}, "f");
|
|
7277
7278
|
}
|
|
7278
|
-
__classPrivateFieldGet$
|
|
7279
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").addClickCallback(__classPrivateFieldGet$4(this, _KupCombobox_clickCb, "f"), true);
|
|
7279
7280
|
}, _KupCombobox_closeList = function _KupCombobox_closeList() {
|
|
7280
|
-
__classPrivateFieldGet$
|
|
7281
|
-
__classPrivateFieldGet$
|
|
7282
|
-
__classPrivateFieldGet$
|
|
7283
|
-
__classPrivateFieldGet$
|
|
7281
|
+
__classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").classList.remove('toggled');
|
|
7282
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").menuVisible = false;
|
|
7283
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"));
|
|
7284
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$4(this, _KupCombobox_clickCb, "f"));
|
|
7284
7285
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
7285
|
-
return __classPrivateFieldGet$
|
|
7286
|
+
return __classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
7286
7287
|
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, setValue) {
|
|
7287
|
-
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$
|
|
7288
|
+
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
7288
7289
|
if (ret.exists) {
|
|
7289
7290
|
if (setValue) {
|
|
7290
7291
|
this.value = ret.value;
|
|
7291
7292
|
this.displayedValue = ret.displayedValue;
|
|
7292
7293
|
}
|
|
7293
|
-
if (__classPrivateFieldGet$
|
|
7294
|
-
__classPrivateFieldGet$
|
|
7294
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f") != null) {
|
|
7295
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7295
7296
|
}
|
|
7296
7297
|
}
|
|
7297
7298
|
else {
|
|
7298
7299
|
this.value = idIn;
|
|
7299
7300
|
this.displayedValue = idIn;
|
|
7300
|
-
if (__classPrivateFieldGet$
|
|
7301
|
-
__classPrivateFieldGet$
|
|
7301
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f") != null) {
|
|
7302
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7302
7303
|
}
|
|
7303
7304
|
}
|
|
7304
7305
|
return ret;
|
|
@@ -8084,7 +8085,7 @@ class KupColumnMenu {
|
|
|
8084
8085
|
|
|
8085
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}";
|
|
8086
8087
|
|
|
8087
|
-
var __classPrivateFieldGet$
|
|
8088
|
+
var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8088
8089
|
if (kind === "a" && !f)
|
|
8089
8090
|
throw new TypeError("Private accessor was defined without a getter");
|
|
8090
8091
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -8100,7 +8101,7 @@ var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
8100
8101
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8101
8102
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
8102
8103
|
};
|
|
8103
|
-
var _KupDataTable_instances, _KupDataTable_initialized, _KupDataTable_rows, _KupDataTable_rowsLength, _KupDataTable_paginatedRows, _KupDataTable_paginatedRowsLength, _KupDataTable_footer, _KupDataTable_kupManager, _KupDataTable_renderedRows, _KupDataTable_loadMoreEventCounter, _KupDataTable_loadMoreEventPreviousQuantity, _KupDataTable_theadRef, _KupDataTable_tableRef, _KupDataTable_originalData, _KupDataTable_tableAreaRef, _KupDataTable_stickyTheadRef, _KupDataTable_customizeTopButtonRef, _KupDataTable_customizeTopPanelRef, _KupDataTable_sizedColumns, _KupDataTable_intObserver, _KupDataTable_navBarHeight, _KupDataTable_theadIntersecting, _KupDataTable_tableIntersecting, _KupDataTable_isSafariBrowser, _KupDataTable_isRestoringState, _KupDataTable_globalFilterTimeout, _KupDataTable_totalMenuCoords, _KupDataTable_clickTimeout, _KupDataTable_thRefs, _KupDataTable_rowsRefs, _KupDataTable_oldWidth, _KupDataTable_hold, _KupDataTable_interactableDrag, _KupDataTable_interactableDrop, _KupDataTable_interactableResize, _KupDataTable_interactableTouch, _KupDataTable_dropareaRef, _KupDataTable_removeDropareaRef, _KupDataTable_groupsDropareaRef, _KupDataTable_clickCb, _KupDataTable_clickCbCustomPanel, _KupDataTable_clickCbDropCard, _KupDataTable_resizeTimeout, _KupDataTable_columnMenuInstance, _KupDataTable_filtersColumnMenuInstance, _KupDataTable_filtersRowsInstance, _KupDataTable_detailCard, _KupDataTable_insertCard, _KupDataTable_confirmDeleteCard, _KupDataTable_confirmDeleteDialog, _KupDataTable_columnMenuCard, _KupDataTable_columnDropCard, _KupDataTable_columnDropCardAnchor, _KupDataTable_insertCount, _KupDataTable_BUTTON_CANCEL_ID, _KupDataTable_BUTTON_SUBMIT_ID, _KupDataTable_FIELDS_FORM_ID, _KupDataTable_MESSAGE_ID, _KupDataTable_MESSAGE_WRAPPER_ID, _KupDataTable_INSERT_PREFIX, _KupDataTable_closeDropCard, _KupDataTable_createDropCard, _KupDataTable_calculateData, _KupDataTable_getRow, _KupDataTable_getTransposedData, _KupDataTable_setTransposedData, _KupDataTable_switchToTotalsMatrix, _KupDataTable_setObjForTotalsMatrix, _KupDataTable_stickyHeaderPosition, _KupDataTable_updateStickyHeaderSize, _KupDataTable_setObserver, _KupDataTable_didLoadInteractables, _KupDataTable_didRenderInteractables, _KupDataTable_didLoadObservers, _KupDataTable_didRenderObservers, _KupDataTable_didLoadEventHandling, _KupDataTable_scrollStickyHeader, _KupDataTable_checkScrollOnHover, _KupDataTable_customizePanelPosition, _KupDataTable_rowsPointLength, _KupDataTable_paginatedRowsPointLength, _KupDataTable__rowsLength, _KupDataTable_setDynPosElements,
|
|
8104
|
+
var _KupDataTable_instances, _KupDataTable_initialized, _KupDataTable_rows, _KupDataTable_rowsLength, _KupDataTable_paginatedRows, _KupDataTable_paginatedRowsLength, _KupDataTable_footer, _KupDataTable_kupManager, _KupDataTable_renderedRows, _KupDataTable_loadMoreEventCounter, _KupDataTable_loadMoreEventPreviousQuantity, _KupDataTable_theadRef, _KupDataTable_tableRef, _KupDataTable_originalData, _KupDataTable_tableAreaRef, _KupDataTable_stickyTheadRef, _KupDataTable_customizeTopButtonRef, _KupDataTable_customizeTopPanelRef, _KupDataTable_sizedColumns, _KupDataTable_intObserver, _KupDataTable_navBarHeight, _KupDataTable_theadIntersecting, _KupDataTable_tableIntersecting, _KupDataTable_isSafariBrowser, _KupDataTable_isRestoringState, _KupDataTable_globalFilterTimeout, _KupDataTable_totalMenuCoords, _KupDataTable_clickTimeout, _KupDataTable_thRefs, _KupDataTable_rowsRefs, _KupDataTable_oldWidth, _KupDataTable_hold, _KupDataTable_interactableDrag, _KupDataTable_interactableDrop, _KupDataTable_interactableResize, _KupDataTable_interactableTouch, _KupDataTable_dropareaRef, _KupDataTable_removeDropareaRef, _KupDataTable_groupsDropareaRef, _KupDataTable_clickCb, _KupDataTable_clickCbCustomPanel, _KupDataTable_clickCbDropCard, _KupDataTable_resizeTimeout, _KupDataTable_columnMenuInstance, _KupDataTable_filtersColumnMenuInstance, _KupDataTable_filtersRowsInstance, _KupDataTable_detailCard, _KupDataTable_insertCard, _KupDataTable_confirmDeleteCard, _KupDataTable_confirmDeleteDialog, _KupDataTable_columnMenuCard, _KupDataTable_columnDropCard, _KupDataTable_columnDropCardAnchor, _KupDataTable_insertCount, _KupDataTable_BUTTON_CANCEL_ID, _KupDataTable_BUTTON_SUBMIT_ID, _KupDataTable_FIELDS_FORM_ID, _KupDataTable_MESSAGE_ID, _KupDataTable_MESSAGE_WRAPPER_ID, _KupDataTable_INSERT_PREFIX, _KupDataTable_closeDropCard, _KupDataTable_createDropCard, _KupDataTable_calculateData, _KupDataTable_getRow, _KupDataTable_getTransposedData, _KupDataTable_setTransposedData, _KupDataTable_switchToTotalsMatrix, _KupDataTable_setObjForTotalsMatrix, _KupDataTable_stickyHeaderPosition, _KupDataTable_updateStickyHeaderSize, _KupDataTable_setObserver, _KupDataTable_didLoadInteractables, _KupDataTable_didRenderInteractables, _KupDataTable_didLoadObservers, _KupDataTable_didRenderObservers, _KupDataTable_didLoadEventHandling, _KupDataTable_scrollStickyHeader, _KupDataTable_checkScrollOnHover, _KupDataTable_customizePanelPosition, _KupDataTable_rowsPointLength, _KupDataTable_paginatedRowsPointLength, _KupDataTable__rowsLength, _KupDataTable_setDynPosElements, _KupDataTable_resetSelectedRows, _KupDataTable_getSizedColumns, _KupDataTable_rowDetail, _KupDataTable_rowInsertForm, _KupDataTable_rowsDelete, _KupDataTable_getEventDetails, _KupDataTable_clickHandler, _KupDataTable_contextMenuHandler, _KupDataTable_dblClickHandler, _KupDataTable_initRows, _KupDataTable_filterRows, _KupDataTable_isGrouping, _KupDataTable_hasRowActions, _KupDataTable_removeGroup, _KupDataTable_hasTotals, _KupDataTable_tableHasAutoWidth, _KupDataTable_forceGroupExpansion, _KupDataTable_forceRowGroupExpansion, _KupDataTable_adjustPaginator, _KupDataTable_composeFixedCellStyleAndClass, _KupDataTable_updateFixedRowsAndColumnsCssVariables, _KupDataTable_onColumnSort, _KupDataTable_onRemoveFilter, _KupDataTable_getFilterValueForTooltip, _KupDataTable_onGlobalFilterChange, _KupDataTable_handlePageChange, _KupDataTable_handleRowsPerPageChange, _KupDataTable_onRowClick, _KupDataTable_selectColumn, _KupDataTable_deselectColumn, _KupDataTable_onDefaultRowActionClick, _KupDataTable_onRowActionExpanderClick, _KupDataTable_handleRowSelect, _KupDataTable_onRowExpand, _KupDataTable_onSelectAll, _KupDataTable_openTotalMenu, _KupDataTable_closeTotalMenu, _KupDataTable_isOpenedTotalMenuForColumn, _KupDataTable_groupRows, _KupDataTable_onLoadMoreClick, _KupDataTable_adjustGroupState, _KupDataTable_adjustGroupStateFromRow, _KupDataTable_sortRows, _KupDataTable_getSortIcon, _KupDataTable_getSortDecode, _KupDataTable_calculateColspan, _KupDataTable_isGroupExpanded, _KupDataTable_handleColumnSort, _KupDataTable_moveSortedColumns, _KupDataTable_applyLineBreaks, _KupDataTable_composeHeaderCellClassAndStyle, _KupDataTable_renderHeader, _KupDataTable_renderStickyHeader, _KupDataTable_totalMenuPosition, _KupDataTable_onTotalMenuOpen, _KupDataTable_renderRow, _KupDataTable_renderActions, _KupDataTable_onCustomSettingsClick, _KupDataTable_openCustomSettings, _KupDataTable_closeCustomSettings, _KupDataTable_renderPaginator, _KupDataTable_columnRemoveArea, _KupDataTable_columnGroupArea, _KupDataTable_hideShowColumnDropArea, _KupDataTable_handleColumnGroup, _KupDataTable_transcodeItem, _KupDataTable_createListData, _KupDataTable_FONTSIZE_CODES, _KupDataTable_FONTSIZE_DECODES, _KupDataTable_FONTSIZE_ICONS, _KupDataTable_getFontSizeCodeFromDecode, _KupDataTable_renderFontSizePanel, _KupDataTable_DENSITY_DECODES, _KupDataTable_DENSITY_ICONS, _KupDataTable_getDensityCodeFromDecode, _KupDataTable_renderDensityPanel, _KupDataTable_GRID_CODES, _KupDataTable_GRID_DECODES, _KupDataTable_GRID_ICONS, _KupDataTable_getGridCodeFromDecode, _KupDataTable_renderTransposeSwitch, _KupDataTable_renderTotalsMatrix, _KupDataTable_renderGridPanel;
|
|
8104
8105
|
const KupDataTable = class {
|
|
8105
8106
|
constructor(hostRef) {
|
|
8106
8107
|
index.registerInstance(this, hostRef);
|
|
@@ -8196,18 +8197,18 @@ const KupDataTable = class {
|
|
|
8196
8197
|
_KupDataTable_MESSAGE_WRAPPER_ID.set(this, 'messageWrapper');
|
|
8197
8198
|
_KupDataTable_INSERT_PREFIX.set(this, 'insert_');
|
|
8198
8199
|
_KupDataTable_stickyHeaderPosition.set(this, () => {
|
|
8199
|
-
if (__classPrivateFieldGet$
|
|
8200
|
-
if (__classPrivateFieldGet$
|
|
8201
|
-
if (!__classPrivateFieldGet$
|
|
8202
|
-
__classPrivateFieldGet$
|
|
8203
|
-
__classPrivateFieldGet$
|
|
8200
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f")) {
|
|
8201
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_tableIntersecting, "f")) {
|
|
8202
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_theadIntersecting, "f")) {
|
|
8203
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_updateStickyHeaderSize).call(this);
|
|
8204
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").classList.add('activated');
|
|
8204
8205
|
}
|
|
8205
8206
|
else {
|
|
8206
|
-
__classPrivateFieldGet$
|
|
8207
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").classList.remove('activated');
|
|
8207
8208
|
}
|
|
8208
8209
|
}
|
|
8209
8210
|
else {
|
|
8210
|
-
__classPrivateFieldGet$
|
|
8211
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").classList.remove('activated');
|
|
8211
8212
|
}
|
|
8212
8213
|
}
|
|
8213
8214
|
});
|
|
@@ -8301,7 +8302,7 @@ const KupDataTable = class {
|
|
|
8301
8302
|
if (this.store && this.stateId) {
|
|
8302
8303
|
const state = this.store.getState(this.stateId);
|
|
8303
8304
|
if (state != null) {
|
|
8304
|
-
__classPrivateFieldGet$
|
|
8305
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Initializing stateId ' + this.stateId);
|
|
8305
8306
|
// *** PROPS ***
|
|
8306
8307
|
this.filters = Object.assign({}, state.filters);
|
|
8307
8308
|
this.groups = [...state.groups];
|
|
@@ -8337,116 +8338,116 @@ const KupDataTable = class {
|
|
|
8337
8338
|
persistState() {
|
|
8338
8339
|
if (this.store && this.stateId) {
|
|
8339
8340
|
let somethingChanged = false;
|
|
8340
|
-
if (!__classPrivateFieldGet$
|
|
8341
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.filters, this.filters)) {
|
|
8341
8342
|
this.state.filters = Object.assign({}, this.filters);
|
|
8342
8343
|
somethingChanged = true;
|
|
8343
8344
|
}
|
|
8344
|
-
if (!__classPrivateFieldGet$
|
|
8345
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.groups, this.groups)) {
|
|
8345
8346
|
this.state.groups = [...this.groups];
|
|
8346
8347
|
somethingChanged = true;
|
|
8347
8348
|
}
|
|
8348
|
-
if (!__classPrivateFieldGet$
|
|
8349
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sort, this.sort)) {
|
|
8349
8350
|
this.state.sort = [...this.sort];
|
|
8350
8351
|
somethingChanged = true;
|
|
8351
8352
|
}
|
|
8352
|
-
if (!__classPrivateFieldGet$
|
|
8353
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.expandGroups, this.expandGroups)) {
|
|
8353
8354
|
this.state.expandGroups = this.expandGroups;
|
|
8354
8355
|
somethingChanged = true;
|
|
8355
8356
|
}
|
|
8356
|
-
if (!__classPrivateFieldGet$
|
|
8357
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.groupLabelDisplay, this.groupLabelDisplay)) {
|
|
8357
8358
|
this.state.groupLabelDisplay = this.groupLabelDisplay;
|
|
8358
8359
|
somethingChanged = true;
|
|
8359
8360
|
}
|
|
8360
|
-
if (!__classPrivateFieldGet$
|
|
8361
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.density, this.density)) {
|
|
8361
8362
|
this.state.density = this.density;
|
|
8362
8363
|
somethingChanged = true;
|
|
8363
8364
|
}
|
|
8364
|
-
if (!__classPrivateFieldGet$
|
|
8365
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.enableExtraColumns, this.enableExtraColumns)) {
|
|
8365
8366
|
this.state.enableExtraColumns = this.enableExtraColumns;
|
|
8366
8367
|
somethingChanged = true;
|
|
8367
8368
|
}
|
|
8368
|
-
if (!__classPrivateFieldGet$
|
|
8369
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.enableSortableColumns, this.enableSortableColumns)) {
|
|
8369
8370
|
this.state.enableSortableColumns = this.enableSortableColumns;
|
|
8370
8371
|
somethingChanged = true;
|
|
8371
8372
|
}
|
|
8372
|
-
if (!__classPrivateFieldGet$
|
|
8373
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.forceOneLine, this.forceOneLine)) {
|
|
8373
8374
|
this.state.forceOneLine = this.forceOneLine;
|
|
8374
8375
|
somethingChanged = true;
|
|
8375
8376
|
}
|
|
8376
|
-
if (!__classPrivateFieldGet$
|
|
8377
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.globalFilter, this.globalFilter)) {
|
|
8377
8378
|
this.state.globalFilter = this.globalFilter;
|
|
8378
8379
|
somethingChanged = true;
|
|
8379
8380
|
}
|
|
8380
|
-
if (!__classPrivateFieldGet$
|
|
8381
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
8381
8382
|
this.state.globalFilterValue = this.globalFilterValue;
|
|
8382
8383
|
somethingChanged = true;
|
|
8383
8384
|
}
|
|
8384
|
-
if (!__classPrivateFieldGet$
|
|
8385
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.headerIsPersistent, this.headerIsPersistent)) {
|
|
8385
8386
|
this.state.headerIsPersistent = this.headerIsPersistent;
|
|
8386
8387
|
somethingChanged = true;
|
|
8387
8388
|
}
|
|
8388
|
-
if (!__classPrivateFieldGet$
|
|
8389
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.lazyLoadRows, this.lazyLoadRows)) {
|
|
8389
8390
|
this.state.lazyLoadRows = this.lazyLoadRows;
|
|
8390
8391
|
somethingChanged = true;
|
|
8391
8392
|
}
|
|
8392
|
-
if (!__classPrivateFieldGet$
|
|
8393
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.loadMoreLimit, this.loadMoreLimit)) {
|
|
8393
8394
|
this.state.loadMoreLimit = this.loadMoreLimit;
|
|
8394
8395
|
somethingChanged = true;
|
|
8395
8396
|
}
|
|
8396
|
-
if (!__classPrivateFieldGet$
|
|
8397
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.selection, this.selection)) {
|
|
8397
8398
|
this.state.selection = this.selection;
|
|
8398
8399
|
somethingChanged = true;
|
|
8399
8400
|
}
|
|
8400
|
-
if (!__classPrivateFieldGet$
|
|
8401
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
|
|
8401
8402
|
this.state.rowsPerPage = this.currentRowsPerPage;
|
|
8402
8403
|
somethingChanged = true;
|
|
8403
8404
|
}
|
|
8404
|
-
if (!__classPrivateFieldGet$
|
|
8405
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showFilters, this.showFilters)) {
|
|
8405
8406
|
this.state.showFilters = this.showFilters;
|
|
8406
8407
|
somethingChanged = true;
|
|
8407
8408
|
}
|
|
8408
|
-
if (!__classPrivateFieldGet$
|
|
8409
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showGroups, this.showGroups)) {
|
|
8409
8410
|
this.state.showGroups = this.showGroups;
|
|
8410
8411
|
somethingChanged = true;
|
|
8411
8412
|
}
|
|
8412
|
-
if (!__classPrivateFieldGet$
|
|
8413
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showHeader, this.showHeader)) {
|
|
8413
8414
|
this.state.showHeader = this.showHeader;
|
|
8414
8415
|
somethingChanged = true;
|
|
8415
8416
|
}
|
|
8416
|
-
if (!__classPrivateFieldGet$
|
|
8417
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showLoadMore, this.showLoadMore)) {
|
|
8417
8418
|
this.state.showLoadMore = this.showLoadMore;
|
|
8418
8419
|
somethingChanged = true;
|
|
8419
8420
|
}
|
|
8420
|
-
if (!__classPrivateFieldGet$
|
|
8421
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sortEnabled, this.sortEnabled)) {
|
|
8421
8422
|
this.state.sortEnabled = this.sortEnabled;
|
|
8422
8423
|
somethingChanged = true;
|
|
8423
8424
|
}
|
|
8424
|
-
if (!__classPrivateFieldGet$
|
|
8425
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sortableColumnsMutateData, this.sortableColumnsMutateData)) {
|
|
8425
8426
|
this.state.sortableColumnsMutateData =
|
|
8426
8427
|
this.sortableColumnsMutateData;
|
|
8427
8428
|
somethingChanged = true;
|
|
8428
8429
|
}
|
|
8429
|
-
if (!__classPrivateFieldGet$
|
|
8430
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.pageSelected, this.currentPage)) {
|
|
8430
8431
|
this.state.pageSelected = this.currentPage;
|
|
8431
8432
|
somethingChanged = true;
|
|
8432
8433
|
}
|
|
8433
|
-
if (!__classPrivateFieldGet$
|
|
8434
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.dragEnabled, this.dragEnabled)) {
|
|
8434
8435
|
this.state.dragEnabled = this.dragEnabled;
|
|
8435
8436
|
somethingChanged = true;
|
|
8436
8437
|
}
|
|
8437
|
-
if (!__classPrivateFieldGet$
|
|
8438
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.dropEnabled, this.dropEnabled)) {
|
|
8438
8439
|
this.state.dropEnabled = this.dropEnabled;
|
|
8439
8440
|
somethingChanged = true;
|
|
8440
8441
|
}
|
|
8441
|
-
if (!__classPrivateFieldGet$
|
|
8442
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showFooter, this.showFooter)) {
|
|
8442
8443
|
this.state.showFooter = this.showFooter;
|
|
8443
8444
|
somethingChanged = true;
|
|
8444
8445
|
}
|
|
8445
|
-
if (!__classPrivateFieldGet$
|
|
8446
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.totals, this.totals)) {
|
|
8446
8447
|
this.state.totals = Object.assign({}, this.totals);
|
|
8447
8448
|
somethingChanged = true;
|
|
8448
8449
|
}
|
|
8449
|
-
if (!__classPrivateFieldGet$
|
|
8450
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.selectRowsById, this.selectedRows.reduce((accumulator, row, currentIndex) => {
|
|
8450
8451
|
const prefix = currentIndex > 0 ? ';' : '';
|
|
8451
8452
|
return accumulator + prefix + row.id;
|
|
8452
8453
|
}, ''))) {
|
|
@@ -8461,7 +8462,7 @@ const KupDataTable = class {
|
|
|
8461
8462
|
return;
|
|
8462
8463
|
}
|
|
8463
8464
|
if (somethingChanged) {
|
|
8464
|
-
__classPrivateFieldGet$
|
|
8465
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
|
|
8465
8466
|
this.store.persistState(this.stateId, this.state);
|
|
8466
8467
|
}
|
|
8467
8468
|
}
|
|
@@ -8470,33 +8471,33 @@ const KupDataTable = class {
|
|
|
8470
8471
|
this.currentRowsPerPage = newValue;
|
|
8471
8472
|
}
|
|
8472
8473
|
expandGroupsHandler() {
|
|
8473
|
-
if (!__classPrivateFieldGet$
|
|
8474
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_isRestoringState, "f")) {
|
|
8474
8475
|
this.recalculateRows();
|
|
8475
8476
|
// reset group state
|
|
8476
8477
|
this.groupState = {};
|
|
8477
|
-
__classPrivateFieldGet$
|
|
8478
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_forceGroupExpansion).call(this);
|
|
8478
8479
|
}
|
|
8479
8480
|
}
|
|
8480
8481
|
filtersChanged() {
|
|
8481
8482
|
this.expandGroupsHandler();
|
|
8482
8483
|
}
|
|
8483
8484
|
recalculateRows() {
|
|
8484
|
-
if (!__classPrivateFieldGet$
|
|
8485
|
-
__classPrivateFieldGet$
|
|
8485
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_isRestoringState, "f")) {
|
|
8486
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
8486
8487
|
}
|
|
8487
8488
|
}
|
|
8488
8489
|
identifyAndInitRows() {
|
|
8489
8490
|
kupManager.identify(this.getRows());
|
|
8490
8491
|
this.expandGroupsHandler();
|
|
8491
|
-
__classPrivateFieldGet$
|
|
8492
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8492
8493
|
}
|
|
8493
8494
|
recalculateRowsAndUndoSelections() {
|
|
8494
|
-
if (!__classPrivateFieldGet$
|
|
8495
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_isRestoringState, "f")) {
|
|
8495
8496
|
this.recalculateRows();
|
|
8496
8497
|
// reset group state
|
|
8497
8498
|
this.groupState = {};
|
|
8498
|
-
__classPrivateFieldGet$
|
|
8499
|
-
__classPrivateFieldGet$
|
|
8499
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_forceGroupExpansion).call(this);
|
|
8500
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8500
8501
|
}
|
|
8501
8502
|
}
|
|
8502
8503
|
controlFixedRowsColumns() {
|
|
@@ -8512,8 +8513,8 @@ const KupDataTable = class {
|
|
|
8512
8513
|
}
|
|
8513
8514
|
}
|
|
8514
8515
|
recalculateData() {
|
|
8515
|
-
if (__classPrivateFieldGet$
|
|
8516
|
-
__classPrivateFieldGet$
|
|
8516
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_initialized, "f")) {
|
|
8517
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_calculateData).call(this);
|
|
8517
8518
|
}
|
|
8518
8519
|
}
|
|
8519
8520
|
/**
|
|
@@ -8521,14 +8522,14 @@ const KupDataTable = class {
|
|
|
8521
8522
|
*/
|
|
8522
8523
|
async closeColumnMenu() {
|
|
8523
8524
|
this.columnMenuAnchor = null;
|
|
8524
|
-
if (__classPrivateFieldGet$
|
|
8525
|
-
__classPrivateFieldGet$
|
|
8525
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f")) {
|
|
8526
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").data = null;
|
|
8526
8527
|
}
|
|
8527
|
-
__classPrivateFieldGet$
|
|
8528
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").close(__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"));
|
|
8528
8529
|
this.kupDataTableColumnMenu.emit({
|
|
8529
8530
|
comp: this,
|
|
8530
8531
|
id: this.rootElement.id,
|
|
8531
|
-
card: __classPrivateFieldGet$
|
|
8532
|
+
card: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"),
|
|
8532
8533
|
event: null,
|
|
8533
8534
|
open: false,
|
|
8534
8535
|
});
|
|
@@ -8571,8 +8572,8 @@ const KupDataTable = class {
|
|
|
8571
8572
|
* Closes the insert new record card (called by backend, on success)
|
|
8572
8573
|
*/
|
|
8573
8574
|
async closeInsertCard() {
|
|
8574
|
-
if (__classPrivateFieldGet$
|
|
8575
|
-
__classPrivateFieldGet$
|
|
8575
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f")) {
|
|
8576
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").remove();
|
|
8576
8577
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, null, "f");
|
|
8577
8578
|
}
|
|
8578
8579
|
}
|
|
@@ -8580,8 +8581,8 @@ const KupDataTable = class {
|
|
|
8580
8581
|
* Closes the delete confirm card (called by backend, on success)
|
|
8581
8582
|
*/
|
|
8582
8583
|
async closeConfirmDeleteCard() {
|
|
8583
|
-
if (__classPrivateFieldGet$
|
|
8584
|
-
__classPrivateFieldGet$
|
|
8584
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteDialog, "f")) {
|
|
8585
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteDialog, "f").close();
|
|
8585
8586
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteCard, null, "f");
|
|
8586
8587
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteDialog, null, "f");
|
|
8587
8588
|
}
|
|
@@ -8591,23 +8592,23 @@ const KupDataTable = class {
|
|
|
8591
8592
|
*/
|
|
8592
8593
|
async getCards() {
|
|
8593
8594
|
const obj = {};
|
|
8594
|
-
if (__classPrivateFieldGet$
|
|
8595
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f")) {
|
|
8595
8596
|
obj['insertCard'] = {
|
|
8596
|
-
el: __classPrivateFieldGet$
|
|
8597
|
-
messageWrapper: __classPrivateFieldGet$
|
|
8598
|
-
message: __classPrivateFieldGet$
|
|
8599
|
-
submitButton: __classPrivateFieldGet$
|
|
8600
|
-
cancelButton: __classPrivateFieldGet$
|
|
8601
|
-
form: __classPrivateFieldGet$
|
|
8597
|
+
el: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f"),
|
|
8598
|
+
messageWrapper: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f")),
|
|
8599
|
+
message: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_ID, "f")),
|
|
8600
|
+
submitButton: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_SUBMIT_ID, "f")),
|
|
8601
|
+
cancelButton: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_CANCEL_ID, "f")),
|
|
8602
|
+
form: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_FIELDS_FORM_ID, "f")),
|
|
8602
8603
|
};
|
|
8603
8604
|
}
|
|
8604
|
-
if (__classPrivateFieldGet$
|
|
8605
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f")) {
|
|
8605
8606
|
obj['confirmDeleteCard'] = {
|
|
8606
|
-
el: __classPrivateFieldGet$
|
|
8607
|
-
messageWrapper: __classPrivateFieldGet$
|
|
8608
|
-
message: __classPrivateFieldGet$
|
|
8609
|
-
submitButton: __classPrivateFieldGet$
|
|
8610
|
-
cancelButton: __classPrivateFieldGet$
|
|
8607
|
+
el: __classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f"),
|
|
8608
|
+
messageWrapper: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f")),
|
|
8609
|
+
message: __classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_ID, "f")),
|
|
8610
|
+
submitButton: __classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_SUBMIT_ID, "f")),
|
|
8611
|
+
cancelButton: __classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_CANCEL_ID, "f")),
|
|
8611
8612
|
};
|
|
8612
8613
|
}
|
|
8613
8614
|
/*
|
|
@@ -8661,7 +8662,7 @@ const KupDataTable = class {
|
|
|
8661
8662
|
* @param {KupDataColumn} column - Column to hide.
|
|
8662
8663
|
*/
|
|
8663
8664
|
async hideColumn(column) {
|
|
8664
|
-
__classPrivateFieldGet$
|
|
8665
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").data.column.hide(this.data, [column.name]);
|
|
8665
8666
|
this.kupColumnRemove.emit({
|
|
8666
8667
|
comp: this,
|
|
8667
8668
|
id: this.rootElement.id,
|
|
@@ -8676,11 +8677,8 @@ const KupDataTable = class {
|
|
|
8676
8677
|
* @returns {string|KupDataColumn} Returns the new column created or a string containing the error message if something went wrong.
|
|
8677
8678
|
*/
|
|
8678
8679
|
async newColumn(type, options) {
|
|
8679
|
-
const result = __classPrivateFieldGet$
|
|
8680
|
-
|
|
8681
|
-
if (!error) {
|
|
8682
|
-
this.refresh();
|
|
8683
|
-
}
|
|
8680
|
+
const result = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").data.column.new(this.data, type, options);
|
|
8681
|
+
this.refresh();
|
|
8684
8682
|
return result;
|
|
8685
8683
|
}
|
|
8686
8684
|
/**
|
|
@@ -8689,40 +8687,40 @@ const KupDataTable = class {
|
|
|
8689
8687
|
*/
|
|
8690
8688
|
async openColumnMenu(column) {
|
|
8691
8689
|
this.columnMenuAnchor = column;
|
|
8692
|
-
if (!__classPrivateFieldGet$
|
|
8690
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f")) {
|
|
8693
8691
|
__classPrivateFieldSet$2(this, _KupDataTable_columnMenuCard, document.createElement('kup-card'), "f");
|
|
8694
|
-
__classPrivateFieldGet$
|
|
8695
|
-
__classPrivateFieldGet$
|
|
8696
|
-
__classPrivateFieldGet$
|
|
8697
|
-
__classPrivateFieldGet$
|
|
8698
|
-
__classPrivateFieldGet$
|
|
8692
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").isMenu = true;
|
|
8693
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").layoutNumber = 12;
|
|
8694
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").sizeX = 'auto';
|
|
8695
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").sizeY = 'auto';
|
|
8696
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").addEventListener('kup-card-click', (e) => {
|
|
8699
8697
|
this.kupDataTableColumnMenu.emit({
|
|
8700
8698
|
comp: this,
|
|
8701
8699
|
id: this.rootElement.id,
|
|
8702
|
-
card: __classPrivateFieldGet$
|
|
8700
|
+
card: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"),
|
|
8703
8701
|
event: e,
|
|
8704
|
-
open: __classPrivateFieldGet$
|
|
8702
|
+
open: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").menuVisible,
|
|
8705
8703
|
});
|
|
8706
8704
|
});
|
|
8707
|
-
__classPrivateFieldGet$
|
|
8708
|
-
__classPrivateFieldGet$
|
|
8705
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").addEventListener('kup-card-event', (e) => {
|
|
8706
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").eventHandlers(e, this);
|
|
8709
8707
|
this.kupDataTableColumnMenu.emit({
|
|
8710
8708
|
comp: this,
|
|
8711
8709
|
id: this.rootElement.id,
|
|
8712
|
-
card: __classPrivateFieldGet$
|
|
8710
|
+
card: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"),
|
|
8713
8711
|
event: e,
|
|
8714
|
-
open: __classPrivateFieldGet$
|
|
8712
|
+
open: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").menuVisible,
|
|
8715
8713
|
});
|
|
8716
8714
|
});
|
|
8717
8715
|
}
|
|
8718
|
-
__classPrivateFieldGet$
|
|
8719
|
-
__classPrivateFieldGet$
|
|
8720
|
-
__classPrivateFieldGet$
|
|
8721
|
-
__classPrivateFieldGet$
|
|
8716
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").setAttribute('data-column', column);
|
|
8717
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").data = __classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").prepData(this, kupManager.getColumnByName(this.getVisibleColumns(), column));
|
|
8718
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").open(this, column);
|
|
8719
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").reposition(this, __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"));
|
|
8722
8720
|
this.kupDataTableColumnMenu.emit({
|
|
8723
8721
|
comp: this,
|
|
8724
8722
|
id: this.rootElement.id,
|
|
8725
|
-
card: __classPrivateFieldGet$
|
|
8723
|
+
card: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"),
|
|
8726
8724
|
event: null,
|
|
8727
8725
|
open: true,
|
|
8728
8726
|
});
|
|
@@ -8732,7 +8730,7 @@ const KupDataTable = class {
|
|
|
8732
8730
|
*/
|
|
8733
8731
|
async refresh(recalcRows) {
|
|
8734
8732
|
if (recalcRows) {
|
|
8735
|
-
__classPrivateFieldGet$
|
|
8733
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
8736
8734
|
}
|
|
8737
8735
|
index.forceUpdate(this);
|
|
8738
8736
|
}
|
|
@@ -8741,8 +8739,8 @@ const KupDataTable = class {
|
|
|
8741
8739
|
*/
|
|
8742
8740
|
async resizeCallback() {
|
|
8743
8741
|
if (this.lazyLoadCells &&
|
|
8744
|
-
this.rootElement.clientWidth !== __classPrivateFieldGet$
|
|
8745
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
8742
|
+
this.rootElement.clientWidth !== __classPrivateFieldGet$3(this, _KupDataTable_oldWidth, "f")) {
|
|
8743
|
+
window.clearTimeout(__classPrivateFieldGet$3(this, _KupDataTable_resizeTimeout, "f"));
|
|
8746
8744
|
__classPrivateFieldSet$2(this, _KupDataTable_resizeTimeout, window.setTimeout(() => this.refresh(), 300), "f");
|
|
8747
8745
|
}
|
|
8748
8746
|
}
|
|
@@ -8757,7 +8755,7 @@ const KupDataTable = class {
|
|
|
8757
8755
|
if (!column) {
|
|
8758
8756
|
return;
|
|
8759
8757
|
}
|
|
8760
|
-
const row = __classPrivateFieldGet$
|
|
8758
|
+
const row = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, rowId);
|
|
8761
8759
|
if (!row) {
|
|
8762
8760
|
return;
|
|
8763
8761
|
}
|
|
@@ -8815,7 +8813,7 @@ const KupDataTable = class {
|
|
|
8815
8813
|
this.selectedRows = [];
|
|
8816
8814
|
for (let index = 0; index < rowsIdentifiers.length; index++) {
|
|
8817
8815
|
const id = rowsIdentifiers[index];
|
|
8818
|
-
this.selectedRows.push(__classPrivateFieldGet$
|
|
8816
|
+
this.selectedRows.push(__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, id));
|
|
8819
8817
|
}
|
|
8820
8818
|
if (emitEvent !== false) {
|
|
8821
8819
|
this.kupRowSelected.emit({
|
|
@@ -8829,12 +8827,12 @@ const KupDataTable = class {
|
|
|
8829
8827
|
}
|
|
8830
8828
|
//---- Lifecycle hooks ----
|
|
8831
8829
|
componentWillLoad() {
|
|
8832
|
-
__classPrivateFieldGet$
|
|
8833
|
-
__classPrivateFieldGet$
|
|
8834
|
-
__classPrivateFieldGet$
|
|
8835
|
-
__classPrivateFieldGet$
|
|
8830
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logLoad(this, false);
|
|
8831
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.register(this);
|
|
8832
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").theme.register(this);
|
|
8833
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").toolbar.register(this.rootElement);
|
|
8836
8834
|
if (!this.emptyDataLabel) {
|
|
8837
|
-
this.emptyDataLabel = __classPrivateFieldGet$
|
|
8835
|
+
this.emptyDataLabel = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EMPTY_DATA);
|
|
8838
8836
|
}
|
|
8839
8837
|
__classPrivateFieldSet$2(this, _KupDataTable_columnMenuInstance, new KupColumnMenu(), "f");
|
|
8840
8838
|
__classPrivateFieldSet$2(this, _KupDataTable_filtersColumnMenuInstance, new fPaginatorUtils.FiltersColumnMenu(), "f");
|
|
@@ -8858,18 +8856,18 @@ const KupDataTable = class {
|
|
|
8858
8856
|
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, 0, "f");
|
|
8859
8857
|
}
|
|
8860
8858
|
if (document.querySelector('.topbar')) {
|
|
8861
|
-
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$
|
|
8859
|
+
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$3(this, _KupDataTable_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
|
|
8862
8860
|
}
|
|
8863
|
-
__classPrivateFieldGet$
|
|
8861
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_setObserver).call(this);
|
|
8864
8862
|
//this.recalculateRows();
|
|
8865
8863
|
// Detects is the browser is Safari. If needed, this function can be moved into an external file and then imported into components
|
|
8866
8864
|
__classPrivateFieldSet$2(this, _KupDataTable_isSafariBrowser, CSS.supports('position', '-webkit-sticky') ||
|
|
8867
8865
|
!!(window && window.safari), "f");
|
|
8868
|
-
__classPrivateFieldGet$
|
|
8866
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_calculateData).call(this);
|
|
8869
8867
|
__classPrivateFieldSet$2(this, _KupDataTable_initialized, true, "f");
|
|
8870
8868
|
}
|
|
8871
8869
|
componentWillRender() {
|
|
8872
|
-
__classPrivateFieldGet$
|
|
8870
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logRender(this, false);
|
|
8873
8871
|
}
|
|
8874
8872
|
componentDidRender() {
|
|
8875
8873
|
const root = this.rootElement.shadowRoot;
|
|
@@ -8880,40 +8878,40 @@ const KupDataTable = class {
|
|
|
8880
8878
|
}
|
|
8881
8879
|
}
|
|
8882
8880
|
if (this.showCustomization) {
|
|
8883
|
-
__classPrivateFieldGet$
|
|
8884
|
-
}
|
|
8885
|
-
__classPrivateFieldGet$
|
|
8886
|
-
__classPrivateFieldGet$
|
|
8887
|
-
__classPrivateFieldGet$
|
|
8888
|
-
__classPrivateFieldGet$
|
|
8889
|
-
__classPrivateFieldGet$
|
|
8890
|
-
__classPrivateFieldGet$
|
|
8881
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_customizePanelPosition).call(this);
|
|
8882
|
+
}
|
|
8883
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_totalMenuPosition).call(this);
|
|
8884
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_checkScrollOnHover).call(this);
|
|
8885
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_didRenderObservers).call(this);
|
|
8886
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_didRenderInteractables).call(this);
|
|
8887
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
8888
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_setDynPosElements).call(this);
|
|
8891
8889
|
if (this.headerIsPersistent &&
|
|
8892
8890
|
this.tableHeight === undefined &&
|
|
8893
8891
|
this.tableWidth === undefined) {
|
|
8894
|
-
__classPrivateFieldGet$
|
|
8892
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_updateStickyHeaderSize).call(this);
|
|
8895
8893
|
}
|
|
8896
|
-
setTimeout(() => __classPrivateFieldGet$
|
|
8894
|
+
setTimeout(() => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_updateFixedRowsAndColumnsCssVariables).call(this), 50);
|
|
8897
8895
|
// *** Store
|
|
8898
8896
|
if (this.lazyLoadCells) {
|
|
8899
8897
|
this.persistState();
|
|
8900
8898
|
}
|
|
8901
8899
|
// ***
|
|
8902
8900
|
__classPrivateFieldSet$2(this, _KupDataTable_oldWidth, this.rootElement.clientWidth, "f");
|
|
8903
|
-
__classPrivateFieldGet$
|
|
8901
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logRender(this, true);
|
|
8904
8902
|
}
|
|
8905
8903
|
componentDidLoad() {
|
|
8906
|
-
__classPrivateFieldGet$
|
|
8907
|
-
__classPrivateFieldGet$
|
|
8908
|
-
__classPrivateFieldGet$
|
|
8904
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_didLoadObservers).call(this);
|
|
8905
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_didLoadEventHandling).call(this);
|
|
8906
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_didLoadInteractables).call(this);
|
|
8909
8907
|
this.lazyLoadCells = true;
|
|
8910
8908
|
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
8911
|
-
__classPrivateFieldGet$
|
|
8912
|
-
__classPrivateFieldGet$
|
|
8909
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").resize.observe(this.rootElement);
|
|
8910
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logLoad(this, true);
|
|
8913
8911
|
}
|
|
8914
8912
|
resetCurrentPage() {
|
|
8915
8913
|
this.currentPage = 1;
|
|
8916
|
-
__classPrivateFieldGet$
|
|
8914
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8917
8915
|
}
|
|
8918
8916
|
getColumns() {
|
|
8919
8917
|
return this.data && this.data.columns
|
|
@@ -8924,7 +8922,7 @@ const KupDataTable = class {
|
|
|
8924
8922
|
// TODO: change into `visible ?? true` when TS dependency has been updated
|
|
8925
8923
|
const visibleColumns = this.getColumns().filter(({ visible }) => visible !== undefined ? visible : true);
|
|
8926
8924
|
// check grouping
|
|
8927
|
-
if (__classPrivateFieldGet$
|
|
8925
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
8928
8926
|
// filtering column based on group visibility
|
|
8929
8927
|
return visibleColumns.filter((column) => {
|
|
8930
8928
|
// check if in group
|
|
@@ -8948,7 +8946,7 @@ const KupDataTable = class {
|
|
|
8948
8946
|
return visibleColumns;
|
|
8949
8947
|
}
|
|
8950
8948
|
getGroupByName(column) {
|
|
8951
|
-
if (!__classPrivateFieldGet$
|
|
8949
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
8952
8950
|
return null;
|
|
8953
8951
|
}
|
|
8954
8952
|
for (let group of this.groups) {
|
|
@@ -8959,7 +8957,7 @@ const KupDataTable = class {
|
|
|
8959
8957
|
return null;
|
|
8960
8958
|
}
|
|
8961
8959
|
getColumnValues(column) {
|
|
8962
|
-
return __classPrivateFieldGet$
|
|
8960
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_filtersRowsInstance, "f").getColumnValues(this, column, this.globalFilterValue, __classPrivateFieldGet$3(this, _KupDataTable_filtersColumnMenuInstance, "f"));
|
|
8963
8961
|
}
|
|
8964
8962
|
getRows() {
|
|
8965
8963
|
return this.data && this.data.rows ? this.data.rows : [];
|
|
@@ -8974,7 +8972,7 @@ const KupDataTable = class {
|
|
|
8974
8972
|
}
|
|
8975
8973
|
async defaultSortingFunction(columns, receivingColumnIndex, sortedColumnIndex, useNewObject = false) {
|
|
8976
8974
|
const toSort = !useNewObject ? columns : [...columns];
|
|
8977
|
-
__classPrivateFieldGet$
|
|
8975
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_moveSortedColumns).call(this, toSort, receivingColumnIndex, sortedColumnIndex);
|
|
8978
8976
|
return toSort;
|
|
8979
8977
|
}
|
|
8980
8978
|
areTotalsSelected(column) {
|
|
@@ -8982,7 +8980,7 @@ const KupDataTable = class {
|
|
|
8982
8980
|
}
|
|
8983
8981
|
onTotalsChange(event, column) {
|
|
8984
8982
|
// close menu
|
|
8985
|
-
__classPrivateFieldGet$
|
|
8983
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
8986
8984
|
if (column) {
|
|
8987
8985
|
// must do this
|
|
8988
8986
|
// otherwise does not fire the watcher
|
|
@@ -9005,14 +9003,14 @@ const KupDataTable = class {
|
|
|
9005
9003
|
let selectRowCell = null;
|
|
9006
9004
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
9007
9005
|
extraCells++;
|
|
9008
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
9006
|
+
const fixedCellStyle = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, extraCells, 0, extraCells);
|
|
9009
9007
|
selectRowCell = (index.h("td", { class: fixedCellStyle ? fixedCellStyle.fixedCellClasses : null, style: fixedCellStyle ? fixedCellStyle.fixedCellStyle : null }));
|
|
9010
9008
|
}
|
|
9011
9009
|
// Action cell
|
|
9012
9010
|
let actionsCell = null;
|
|
9013
|
-
if (__classPrivateFieldGet$
|
|
9011
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
9014
9012
|
extraCells++;
|
|
9015
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
9013
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, extraCells, 0, extraCells);
|
|
9016
9014
|
actionsCell = (index.h("td", { class: selectionStyleAndClass
|
|
9017
9015
|
? selectionStyleAndClass.fixedCellClasses
|
|
9018
9016
|
: {}, style: selectionStyleAndClass
|
|
@@ -9020,19 +9018,19 @@ const KupDataTable = class {
|
|
|
9020
9018
|
: {} }));
|
|
9021
9019
|
}
|
|
9022
9020
|
const footerCells = this.getVisibleColumns().map((column, columnIndex) => {
|
|
9023
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
9021
|
+
const fixedCellStyle = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, columnIndex + 1 + extraCells, 0, extraCells);
|
|
9024
9022
|
let totalMenu = undefined;
|
|
9025
9023
|
let menuLabel = kupManager.TotalLabel.CALC;
|
|
9026
9024
|
const translation = {
|
|
9027
|
-
[kupManager.TotalLabel.AVERAGE]: __classPrivateFieldGet$
|
|
9028
|
-
[kupManager.TotalLabel.CALC]: __classPrivateFieldGet$
|
|
9029
|
-
[kupManager.TotalLabel.CANC]: __classPrivateFieldGet$
|
|
9030
|
-
[kupManager.TotalLabel.COUNT]: __classPrivateFieldGet$
|
|
9031
|
-
[kupManager.TotalLabel.DISTINCT]: __classPrivateFieldGet$
|
|
9032
|
-
[kupManager.TotalLabel.MATH]: __classPrivateFieldGet$
|
|
9033
|
-
[kupManager.TotalLabel.MAX]: __classPrivateFieldGet$
|
|
9034
|
-
[kupManager.TotalLabel.MIN]: __classPrivateFieldGet$
|
|
9035
|
-
[kupManager.TotalLabel.SUM]: __classPrivateFieldGet$
|
|
9025
|
+
[kupManager.TotalLabel.AVERAGE]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.AVERAGE),
|
|
9026
|
+
[kupManager.TotalLabel.CALC]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.CALCULATE),
|
|
9027
|
+
[kupManager.TotalLabel.CANC]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.CANCEL),
|
|
9028
|
+
[kupManager.TotalLabel.COUNT]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.COUNT),
|
|
9029
|
+
[kupManager.TotalLabel.DISTINCT]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.DISTINCT),
|
|
9030
|
+
[kupManager.TotalLabel.MATH]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.FORMULA),
|
|
9031
|
+
[kupManager.TotalLabel.MAX]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.MAXIMUM),
|
|
9032
|
+
[kupManager.TotalLabel.MIN]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.MINIMUM),
|
|
9033
|
+
[kupManager.TotalLabel.SUM]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.SUM),
|
|
9036
9034
|
};
|
|
9037
9035
|
if (this.totals) {
|
|
9038
9036
|
const totalValue = this.totals[column.name];
|
|
@@ -9064,7 +9062,7 @@ const KupDataTable = class {
|
|
|
9064
9062
|
}
|
|
9065
9063
|
}
|
|
9066
9064
|
}
|
|
9067
|
-
if (__classPrivateFieldGet$
|
|
9065
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isOpenedTotalMenuForColumn).call(this, column.name)) {
|
|
9068
9066
|
const listData = [
|
|
9069
9067
|
{
|
|
9070
9068
|
id: kupManager.TotalMode.COUNT,
|
|
@@ -9075,7 +9073,7 @@ const KupDataTable = class {
|
|
|
9075
9073
|
value: translation[kupManager.TotalLabel.DISTINCT],
|
|
9076
9074
|
},
|
|
9077
9075
|
];
|
|
9078
|
-
if (__classPrivateFieldGet$
|
|
9076
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isNumber(column.obj)) {
|
|
9079
9077
|
// TODO Move these objects in declarations
|
|
9080
9078
|
listData.push({
|
|
9081
9079
|
id: kupManager.TotalMode.SUM,
|
|
@@ -9092,7 +9090,7 @@ const KupDataTable = class {
|
|
|
9092
9090
|
value: translation[kupManager.TotalLabel.MAX],
|
|
9093
9091
|
});
|
|
9094
9092
|
}
|
|
9095
|
-
else if (__classPrivateFieldGet$
|
|
9093
|
+
else if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
9096
9094
|
listData.push({
|
|
9097
9095
|
id: kupManager.TotalMode.MIN,
|
|
9098
9096
|
separator: true,
|
|
@@ -9117,14 +9115,14 @@ const KupDataTable = class {
|
|
|
9117
9115
|
}
|
|
9118
9116
|
// TODO please use getValueForDisplay
|
|
9119
9117
|
let value;
|
|
9120
|
-
const footerValue = __classPrivateFieldGet$
|
|
9118
|
+
const footerValue = __classPrivateFieldGet$3(this, _KupDataTable_footer, "f")[column.name];
|
|
9121
9119
|
if (menuLabel === kupManager.TotalLabel.COUNT ||
|
|
9122
9120
|
menuLabel === kupManager.TotalLabel.DISTINCT) {
|
|
9123
9121
|
value = footerValue;
|
|
9124
9122
|
}
|
|
9125
9123
|
else if ((menuLabel === kupManager.TotalLabel.MAX ||
|
|
9126
9124
|
menuLabel === kupManager.TotalLabel.MIN) &&
|
|
9127
|
-
__classPrivateFieldGet$
|
|
9125
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
9128
9126
|
if (footerValue) {
|
|
9129
9127
|
value = footerValue;
|
|
9130
9128
|
}
|
|
@@ -9148,38 +9146,38 @@ const KupDataTable = class {
|
|
|
9148
9146
|
let transpose = undefined;
|
|
9149
9147
|
let totalsMatrix = undefined;
|
|
9150
9148
|
if (this.openedCustomSettings) {
|
|
9151
|
-
density = __classPrivateFieldGet$
|
|
9152
|
-
fontsize = __classPrivateFieldGet$
|
|
9153
|
-
grid = __classPrivateFieldGet$
|
|
9154
|
-
transpose = __classPrivateFieldGet$
|
|
9149
|
+
density = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderDensityPanel).call(this);
|
|
9150
|
+
fontsize = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderFontSizePanel).call(this);
|
|
9151
|
+
grid = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderGridPanel).call(this);
|
|
9152
|
+
transpose = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderTransposeSwitch).call(this);
|
|
9155
9153
|
if (this.totals && this.groups.length > 0) {
|
|
9156
|
-
totalsMatrix = __classPrivateFieldGet$
|
|
9154
|
+
totalsMatrix = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderTotalsMatrix).call(this);
|
|
9157
9155
|
}
|
|
9158
9156
|
}
|
|
9159
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) => {
|
|
9160
9158
|
__classPrivateFieldSet$2(this, _KupDataTable_customizeTopPanelRef, el, "f");
|
|
9161
|
-
}, 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$3(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$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EDITABLE), leadingLabel: true, "onkup-switch-change": () => (this.editableData = !this.editableData) }), index.h("kup-button", { title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TOGGLE) +
|
|
9162
9160
|
' Magic Box ' +
|
|
9163
9161
|
'(' +
|
|
9164
|
-
__classPrivateFieldGet$
|
|
9165
|
-
')', icon: "auto-fix", "onkup-button-click": () => __classPrivateFieldGet$
|
|
9162
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
9163
|
+
')', icon: "auto-fix", "onkup-button-click": () => __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").toggleMagicBox() }), totalsMatrix));
|
|
9166
9164
|
}
|
|
9167
9165
|
render() {
|
|
9168
9166
|
__classPrivateFieldSet$2(this, _KupDataTable_thRefs, [], "f");
|
|
9169
9167
|
__classPrivateFieldSet$2(this, _KupDataTable_rowsRefs, [], "f");
|
|
9170
9168
|
__classPrivateFieldSet$2(this, _KupDataTable_renderedRows, [], "f");
|
|
9171
9169
|
let elStyle = undefined;
|
|
9172
|
-
__classPrivateFieldSet$2(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$
|
|
9170
|
+
__classPrivateFieldSet$2(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
|
|
9173
9171
|
let rows = null;
|
|
9174
|
-
if (__classPrivateFieldGet$
|
|
9175
|
-
rows = (index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
9172
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
|
|
9173
|
+
rows = (index.h("tr", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el) }, index.h("td", { colSpan: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
|
|
9176
9174
|
}
|
|
9177
9175
|
else {
|
|
9178
9176
|
rows = [];
|
|
9179
|
-
__classPrivateFieldGet$
|
|
9177
|
+
__classPrivateFieldGet$3(this, _KupDataTable_paginatedRows, "f")
|
|
9180
9178
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
9181
9179
|
// When the column has specified the parameter hideValuesRepetitions
|
|
9182
|
-
.map((row, rowIndex, currentArray) => __classPrivateFieldGet$
|
|
9180
|
+
.map((row, rowIndex, currentArray) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, 0, rowIndex + 1, rowIndex > 0 ? currentArray[rowIndex - 1] : null))
|
|
9183
9181
|
.forEach((jsxRow) => {
|
|
9184
9182
|
if (Array.isArray(jsxRow)) {
|
|
9185
9183
|
jsxRow.forEach((jr) => rows.push(jr));
|
|
@@ -9191,24 +9189,24 @@ const KupDataTable = class {
|
|
|
9191
9189
|
}
|
|
9192
9190
|
// header
|
|
9193
9191
|
// for multi selection purposes, this should be called before this.renderedRows has been evaluated
|
|
9194
|
-
const header = __classPrivateFieldGet$
|
|
9195
|
-
const stickyHeader = __classPrivateFieldGet$
|
|
9192
|
+
const header = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderHeader).call(this);
|
|
9193
|
+
const stickyHeader = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderStickyHeader).call(this);
|
|
9196
9194
|
let paginatorTop = undefined;
|
|
9197
9195
|
let paginatorBottom = undefined;
|
|
9198
|
-
if ((!this.lazyLoadRows && __classPrivateFieldGet$
|
|
9196
|
+
if ((!this.lazyLoadRows && __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f") > this.rowsPerPage) ||
|
|
9199
9197
|
this.showCustomization ||
|
|
9200
9198
|
this.showLoadMore) {
|
|
9201
9199
|
if (kupManager.PaginatorPos.TOP === this.paginatorPos ||
|
|
9202
9200
|
kupManager.PaginatorPos.BOTH === this.paginatorPos) {
|
|
9203
|
-
paginatorTop = __classPrivateFieldGet$
|
|
9201
|
+
paginatorTop = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderPaginator).call(this, true);
|
|
9204
9202
|
}
|
|
9205
9203
|
if (kupManager.PaginatorPos.BOTTOM === this.paginatorPos ||
|
|
9206
9204
|
kupManager.PaginatorPos.BOTH === this.paginatorPos) {
|
|
9207
|
-
paginatorBottom = __classPrivateFieldGet$
|
|
9205
|
+
paginatorBottom = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderPaginator).call(this, false);
|
|
9208
9206
|
}
|
|
9209
9207
|
}
|
|
9210
9208
|
let groupChips = null;
|
|
9211
|
-
if (__classPrivateFieldGet$
|
|
9209
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
9212
9210
|
const chipsData = [];
|
|
9213
9211
|
for (let index = 0; index < this.groups.length; index++) {
|
|
9214
9212
|
const group = this.groups[index];
|
|
@@ -9221,7 +9219,7 @@ const KupDataTable = class {
|
|
|
9221
9219
|
});
|
|
9222
9220
|
}
|
|
9223
9221
|
else {
|
|
9224
|
-
__classPrivateFieldGet$
|
|
9222
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Grouped for a non-existent column! (' +
|
|
9225
9223
|
group.column +
|
|
9226
9224
|
')', kupManager.KupDebugCategory.WARNING);
|
|
9227
9225
|
}
|
|
@@ -9234,7 +9232,7 @@ const KupDataTable = class {
|
|
|
9234
9232
|
onIconClick: [],
|
|
9235
9233
|
};
|
|
9236
9234
|
for (let i = 0; i < chipsData.length; i++) {
|
|
9237
|
-
props.onIconClick.push(() => __classPrivateFieldGet$
|
|
9235
|
+
props.onIconClick.push(() => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_removeGroup).call(this, i));
|
|
9238
9236
|
}
|
|
9239
9237
|
groupChips = index.h(fChip.FChip, Object.assign({}, props));
|
|
9240
9238
|
}
|
|
@@ -9242,7 +9240,7 @@ const KupDataTable = class {
|
|
|
9242
9240
|
const tableClass = {
|
|
9243
9241
|
// Class to specify whether the table should have width: auto or not.
|
|
9244
9242
|
// Mandatory to check with custom column size.
|
|
9245
|
-
'auto-width': __classPrivateFieldGet$
|
|
9243
|
+
'auto-width': __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_tableHasAutoWidth).call(this),
|
|
9246
9244
|
'column-separation': kupManager.ShowGrid.COMPLETE === this.showGrid ||
|
|
9247
9245
|
kupManager.ShowGrid.COL === this.showGrid,
|
|
9248
9246
|
// When there are columns with a specified width, we must add table-layout: fixed to force the table to respect them
|
|
@@ -9292,17 +9290,17 @@ const KupDataTable = class {
|
|
|
9292
9290
|
}
|
|
9293
9291
|
}
|
|
9294
9292
|
};
|
|
9295
|
-
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$3(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$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageSearch.SEARCH), value: this.globalFilterValue, onInput: (event) => {
|
|
9296
9294
|
const t = event.target;
|
|
9297
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
9298
|
-
__classPrivateFieldSet$2(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$
|
|
9295
|
+
window.clearTimeout(__classPrivateFieldGet$3(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
9296
|
+
__classPrivateFieldSet$2(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
9299
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 () => {
|
|
9300
9298
|
var _a;
|
|
9301
9299
|
if (this.insertMode === 'form') {
|
|
9302
|
-
__classPrivateFieldGet$
|
|
9300
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_rowInsertForm).call(this);
|
|
9303
9301
|
}
|
|
9304
9302
|
else {
|
|
9305
|
-
__classPrivateFieldSet$2(this, _KupDataTable_insertCount, (_a = __classPrivateFieldGet$
|
|
9303
|
+
__classPrivateFieldSet$2(this, _KupDataTable_insertCount, (_a = __classPrivateFieldGet$3(this, _KupDataTable_insertCount, "f"), _a++, _a), "f");
|
|
9306
9304
|
const cells = {};
|
|
9307
9305
|
for (let index = 0; index < this.data.columns.length; index++) {
|
|
9308
9306
|
const column = this.data.columns[index];
|
|
@@ -9316,8 +9314,8 @@ const KupDataTable = class {
|
|
|
9316
9314
|
}
|
|
9317
9315
|
const row = {
|
|
9318
9316
|
cells,
|
|
9319
|
-
id: __classPrivateFieldGet$
|
|
9320
|
-
__classPrivateFieldGet$
|
|
9317
|
+
id: __classPrivateFieldGet$3(this, _KupDataTable_INSERT_PREFIX, "f") +
|
|
9318
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCount, "f"),
|
|
9321
9319
|
};
|
|
9322
9320
|
this.data.rows.unshift(row);
|
|
9323
9321
|
await this.refresh(true);
|
|
@@ -9331,13 +9329,13 @@ const KupDataTable = class {
|
|
|
9331
9329
|
});
|
|
9332
9330
|
}, styling: fButtonDeclarations.FButtonStyling.OUTLINED, title: "Save", wrapperClass: "save-button" })) : null, this.showDeleteButton &&
|
|
9333
9331
|
this.selectedRows.length > 0 ? (index.h(fButton.FButton, { icon: "delete", onClick: () => {
|
|
9334
|
-
__classPrivateFieldGet$
|
|
9335
|
-
}, 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$
|
|
9336
|
-
? __classPrivateFieldGet$
|
|
9332
|
+
__classPrivateFieldGet$3(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$3(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
|
|
9334
|
+
? __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
|
|
9337
9335
|
: null), index.h("div", { style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
|
|
9338
9336
|
? [
|
|
9339
9337
|
index.h("div", { class: "settings-trigger", onClick: () => {
|
|
9340
|
-
__classPrivateFieldGet$
|
|
9338
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
|
|
9341
9339
|
}, ref: (el) => {
|
|
9342
9340
|
__classPrivateFieldSet$2(this, _KupDataTable_customizeTopButtonRef, el, "f");
|
|
9343
9341
|
} }, index.h(fImage.FImage, { color: `var(${kupManager.KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
|
|
@@ -9347,29 +9345,29 @@ const KupDataTable = class {
|
|
|
9347
9345
|
ev.stopPropagation();
|
|
9348
9346
|
}, onContextMenu: (e) => {
|
|
9349
9347
|
e.preventDefault();
|
|
9350
|
-
} }, 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$3(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)
|
|
9351
9349
|
? this.renderFooter()
|
|
9352
9350
|
: null), stickyEl), paginatorBottom)));
|
|
9353
9351
|
return compCreated;
|
|
9354
9352
|
}
|
|
9355
9353
|
disconnectedCallback() {
|
|
9356
|
-
__classPrivateFieldGet$
|
|
9357
|
-
__classPrivateFieldGet$
|
|
9358
|
-
__classPrivateFieldGet$
|
|
9354
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.unregister(__classPrivateFieldGet$3(this, _KupDataTable_interactableDrag, "f").concat(__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f"), __classPrivateFieldGet$3(this, _KupDataTable_interactableResize, "f"), __classPrivateFieldGet$3(this, _KupDataTable_interactableTouch, "f")));
|
|
9355
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.unregister(this);
|
|
9356
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").theme.unregister(this);
|
|
9359
9357
|
const dynamicPositionElements = this.rootElement.shadowRoot.querySelectorAll('[' + kupManager.kupDynamicPositionAttribute + ']');
|
|
9360
9358
|
if (dynamicPositionElements.length > 0) {
|
|
9361
|
-
__classPrivateFieldGet$
|
|
9359
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.unregister(Array.prototype.slice.call(dynamicPositionElements));
|
|
9362
9360
|
}
|
|
9363
|
-
if (__classPrivateFieldGet$
|
|
9364
|
-
__classPrivateFieldGet$
|
|
9361
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f")) {
|
|
9362
|
+
__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f").remove();
|
|
9365
9363
|
}
|
|
9366
|
-
if (__classPrivateFieldGet$
|
|
9367
|
-
__classPrivateFieldGet$
|
|
9364
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f")) {
|
|
9365
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").remove();
|
|
9368
9366
|
}
|
|
9369
9367
|
if (this.scrollOnHover) {
|
|
9370
|
-
__classPrivateFieldGet$
|
|
9368
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").scrollOnHover.unregister(__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f"));
|
|
9371
9369
|
}
|
|
9372
|
-
__classPrivateFieldGet$
|
|
9370
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").resize.unobserve(this.rootElement);
|
|
9373
9371
|
this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
|
|
9374
9372
|
}
|
|
9375
9373
|
get rootElement() { return index.getElement(this); }
|
|
@@ -9390,16 +9388,16 @@ const KupDataTable = class {
|
|
|
9390
9388
|
}; }
|
|
9391
9389
|
};
|
|
9392
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() {
|
|
9393
|
-
__classPrivateFieldGet$
|
|
9394
|
-
__classPrivateFieldGet$
|
|
9395
|
-
__classPrivateFieldGet$
|
|
9391
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f"));
|
|
9392
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCbDropCard, "f"));
|
|
9393
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").remove();
|
|
9396
9394
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCard, null, "f");
|
|
9397
9395
|
}, _KupDataTable_createDropCard = function _KupDataTable_createDropCard(starter, receiving) {
|
|
9398
|
-
if (__classPrivateFieldGet$
|
|
9399
|
-
__classPrivateFieldGet$
|
|
9396
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f")) {
|
|
9397
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9400
9398
|
}
|
|
9401
9399
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCard, document.createElement('kup-card'), "f");
|
|
9402
|
-
__classPrivateFieldGet$
|
|
9400
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").data = {
|
|
9403
9401
|
options: {
|
|
9404
9402
|
data: this.data,
|
|
9405
9403
|
enableFormula: this.enableColumnsFormula,
|
|
@@ -9408,46 +9406,46 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9408
9406
|
receivingColumn: receiving,
|
|
9409
9407
|
starterColumn: starter,
|
|
9410
9408
|
formulaCb: () => {
|
|
9411
|
-
__classPrivateFieldGet$
|
|
9409
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9412
9410
|
this.refresh();
|
|
9413
9411
|
},
|
|
9414
9412
|
mergeCb: () => {
|
|
9415
9413
|
this.newColumn(kupManager.KupDataNewColumnTypes.CONCATENATE, {
|
|
9416
9414
|
columns: [receiving.name, starter.name],
|
|
9417
9415
|
});
|
|
9418
|
-
__classPrivateFieldGet$
|
|
9416
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9419
9417
|
},
|
|
9420
9418
|
moveCb: () => {
|
|
9421
|
-
__classPrivateFieldGet$
|
|
9422
|
-
__classPrivateFieldGet$
|
|
9419
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnSort).call(this, receiving, starter);
|
|
9420
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9423
9421
|
},
|
|
9424
9422
|
},
|
|
9425
9423
|
};
|
|
9426
|
-
__classPrivateFieldGet$
|
|
9427
|
-
__classPrivateFieldGet$
|
|
9428
|
-
__classPrivateFieldGet$
|
|
9429
|
-
__classPrivateFieldGet$
|
|
9430
|
-
__classPrivateFieldGet$
|
|
9431
|
-
__classPrivateFieldGet$
|
|
9432
|
-
__classPrivateFieldGet$
|
|
9424
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").layoutFamily = kupManager.KupCardFamily.BUILT_IN;
|
|
9425
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").layoutNumber = 3;
|
|
9426
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").isMenu = true;
|
|
9427
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").sizeX = '280px';
|
|
9428
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").sizeY = 'auto';
|
|
9429
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f"), __classPrivateFieldGet$3(this, _KupDataTable_columnDropCardAnchor, "f"), 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
9430
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f"));
|
|
9433
9431
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCbDropCard, {
|
|
9434
9432
|
cb: () => {
|
|
9435
|
-
__classPrivateFieldGet$
|
|
9433
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9436
9434
|
},
|
|
9437
|
-
el: __classPrivateFieldGet$
|
|
9435
|
+
el: __classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f"),
|
|
9438
9436
|
}, "f");
|
|
9439
|
-
__classPrivateFieldGet$
|
|
9440
|
-
__classPrivateFieldGet$
|
|
9437
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCbDropCard, "f"), true);
|
|
9438
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").menuVisible = true;
|
|
9441
9439
|
}, _KupDataTable_calculateData = function _KupDataTable_calculateData() {
|
|
9442
9440
|
if (!this.transpose) {
|
|
9443
9441
|
// restore
|
|
9444
|
-
if (__classPrivateFieldGet$
|
|
9445
|
-
this.data = Object.assign({}, __classPrivateFieldGet$
|
|
9442
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_originalData, "f")) {
|
|
9443
|
+
this.data = Object.assign({}, __classPrivateFieldGet$3(this, _KupDataTable_originalData, "f"));
|
|
9446
9444
|
}
|
|
9447
9445
|
}
|
|
9448
9446
|
else {
|
|
9449
9447
|
// transpose
|
|
9450
|
-
__classPrivateFieldGet$
|
|
9448
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_setTransposedData).call(this);
|
|
9451
9449
|
}
|
|
9452
9450
|
}, _KupDataTable_getRow = function _KupDataTable_getRow(id) {
|
|
9453
9451
|
let row = null;
|
|
@@ -9464,26 +9462,26 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9464
9462
|
row = rows.find((row) => row.id === id);
|
|
9465
9463
|
}
|
|
9466
9464
|
};
|
|
9467
|
-
if (__classPrivateFieldGet$
|
|
9468
|
-
__classPrivateFieldGet$
|
|
9465
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) && typeof id === 'string') {
|
|
9466
|
+
__classPrivateFieldGet$3(this, _KupDataTable_paginatedRows, "f").forEach((row) => search(row.group.children));
|
|
9469
9467
|
}
|
|
9470
9468
|
else {
|
|
9471
|
-
test(__classPrivateFieldGet$
|
|
9469
|
+
test(__classPrivateFieldGet$3(this, _KupDataTable_rows, "f"));
|
|
9472
9470
|
}
|
|
9473
9471
|
return row;
|
|
9474
9472
|
}, _KupDataTable_getTransposedData = function _KupDataTable_getTransposedData(column) {
|
|
9475
9473
|
if (column) {
|
|
9476
9474
|
this.filters = {};
|
|
9477
9475
|
}
|
|
9478
|
-
return __classPrivateFieldGet$
|
|
9476
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").data.transpose(this.data, column);
|
|
9479
9477
|
}, _KupDataTable_setTransposedData = function _KupDataTable_setTransposedData() {
|
|
9480
9478
|
// transpose
|
|
9481
9479
|
__classPrivateFieldSet$2(this, _KupDataTable_originalData, Object.assign({}, this.data), "f");
|
|
9482
9480
|
if (this.data.columns.length > 0) {
|
|
9483
|
-
this.data = __classPrivateFieldGet$
|
|
9481
|
+
this.data = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getTransposedData).call(this, this.data.columns[0].name);
|
|
9484
9482
|
}
|
|
9485
9483
|
}, _KupDataTable_switchToTotalsMatrix = function _KupDataTable_switchToTotalsMatrix() {
|
|
9486
|
-
if (__classPrivateFieldGet$
|
|
9484
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_rows, "f").length === 0 || !__classPrivateFieldGet$3(this, _KupDataTable_rows, "f")[0].group)
|
|
9487
9485
|
return;
|
|
9488
9486
|
// calc totals matrix data
|
|
9489
9487
|
const totalsMatrixData = {};
|
|
@@ -9491,9 +9489,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9491
9489
|
// note that the sorting of the columns depends on the totals selection
|
|
9492
9490
|
// the first column is the one that is selected first in the totals, and so on...
|
|
9493
9491
|
const ids = [];
|
|
9494
|
-
ids.push(__classPrivateFieldGet$
|
|
9495
|
-
Object.keys(__classPrivateFieldGet$
|
|
9496
|
-
if (__classPrivateFieldGet$
|
|
9492
|
+
ids.push(__classPrivateFieldGet$3(this, _KupDataTable_rows, "f")[0].group.column);
|
|
9493
|
+
Object.keys(__classPrivateFieldGet$3(this, _KupDataTable_rows, "f")[0].group.totals).forEach((columnKey) => {
|
|
9494
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_rows, "f")[0].group.column !== columnKey)
|
|
9497
9495
|
ids.push(columnKey);
|
|
9498
9496
|
});
|
|
9499
9497
|
// calc columns
|
|
@@ -9523,7 +9521,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9523
9521
|
totalMode + ' ' + currentColumn.title;
|
|
9524
9522
|
}
|
|
9525
9523
|
}
|
|
9526
|
-
__classPrivateFieldGet$
|
|
9524
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_setObjForTotalsMatrix).call(this, currentColumn, this.totals);
|
|
9527
9525
|
}
|
|
9528
9526
|
totalsMatrixColumns.push(currentColumn);
|
|
9529
9527
|
}
|
|
@@ -9534,15 +9532,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9534
9532
|
// calc rows
|
|
9535
9533
|
const totalsMatrixRows = [];
|
|
9536
9534
|
let index = 0;
|
|
9537
|
-
__classPrivateFieldGet$
|
|
9535
|
+
__classPrivateFieldGet$3(this, _KupDataTable_rows, "f").forEach((row) => {
|
|
9538
9536
|
const cells = {};
|
|
9539
9537
|
ids.forEach((id) => {
|
|
9540
9538
|
let totalValue = row.group.totals[id];
|
|
9541
9539
|
if (!totalValue) {
|
|
9542
9540
|
totalValue = row.group.id;
|
|
9543
9541
|
}
|
|
9544
|
-
if (__classPrivateFieldGet$
|
|
9545
|
-
totalValue = __classPrivateFieldGet$
|
|
9542
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dates.isValid(totalValue, kupManager.KupDatesFormats.ISO_DATE)) {
|
|
9543
|
+
totalValue = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dates.format(totalValue);
|
|
9546
9544
|
}
|
|
9547
9545
|
cells[id] = {
|
|
9548
9546
|
value: String(totalValue),
|
|
@@ -9582,13 +9580,13 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9582
9580
|
}, _KupDataTable_setObjForTotalsMatrix = function _KupDataTable_setObjForTotalsMatrix(column, totals) {
|
|
9583
9581
|
const obj = column.obj;
|
|
9584
9582
|
const totalMode = totals[column.name];
|
|
9585
|
-
if (__classPrivateFieldGet$
|
|
9583
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isDate(obj)) {
|
|
9586
9584
|
// check if min or max totals mode
|
|
9587
9585
|
if (totalMode === kupManager.TotalMode.MAX || totalMode === kupManager.TotalMode.MIN) {
|
|
9588
9586
|
return;
|
|
9589
9587
|
}
|
|
9590
9588
|
}
|
|
9591
|
-
else if (__classPrivateFieldGet$
|
|
9589
|
+
else if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isNumber(obj)) {
|
|
9592
9590
|
// check if percentage
|
|
9593
9591
|
if (obj.p && obj.p.toUpperCase() === 'P') {
|
|
9594
9592
|
if (totalMode !== kupManager.TotalMode.COUNT &&
|
|
@@ -9616,14 +9614,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9616
9614
|
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, 0, "f");
|
|
9617
9615
|
}
|
|
9618
9616
|
if (topBar) {
|
|
9619
|
-
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$
|
|
9620
|
-
}
|
|
9621
|
-
if (__classPrivateFieldGet$
|
|
9622
|
-
__classPrivateFieldGet$
|
|
9623
|
-
const widthTable = __classPrivateFieldGet$
|
|
9624
|
-
__classPrivateFieldGet$
|
|
9625
|
-
const thCollection = __classPrivateFieldGet$
|
|
9626
|
-
const thStickyCollection = __classPrivateFieldGet$
|
|
9617
|
+
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$3(this, _KupDataTable_navBarHeight, "f") + topBar.clientHeight, "f");
|
|
9618
|
+
}
|
|
9619
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
9620
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").style.top = __classPrivateFieldGet$3(this, _KupDataTable_navBarHeight, "f") + 'px';
|
|
9621
|
+
const widthTable = __classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f").offsetWidth;
|
|
9622
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").style.maxWidth = widthTable + 'px';
|
|
9623
|
+
const thCollection = __classPrivateFieldGet$3(this, _KupDataTable_theadRef, "f").querySelectorAll('th');
|
|
9624
|
+
const thStickyCollection = __classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").querySelectorAll('th-sticky');
|
|
9627
9625
|
for (let i = 0; i < thCollection.length; i++) {
|
|
9628
9626
|
const widthTH = thCollection[i].offsetWidth;
|
|
9629
9627
|
thStickyCollection[i].style.width = widthTH + 'px';
|
|
@@ -9634,8 +9632,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9634
9632
|
entries.forEach((entry) => {
|
|
9635
9633
|
if (entry.target.tagName === 'TR') {
|
|
9636
9634
|
if (entry.isIntersecting) {
|
|
9637
|
-
__classPrivateFieldGet$
|
|
9638
|
-
const delta = __classPrivateFieldGet$
|
|
9635
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
|
|
9636
|
+
const delta = __classPrivateFieldGet$3(this, _KupDataTable_rows, "f").length - this.currentRowsPerPage;
|
|
9639
9637
|
if (delta < this.loadMoreStep) {
|
|
9640
9638
|
this.currentRowsPerPage += delta;
|
|
9641
9639
|
}
|
|
@@ -9649,7 +9647,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9649
9647
|
if (entry.isIntersecting) {
|
|
9650
9648
|
__classPrivateFieldSet$2(this, _KupDataTable_theadIntersecting, true, "f");
|
|
9651
9649
|
}
|
|
9652
|
-
else if (entry.boundingClientRect.bottom > __classPrivateFieldGet$
|
|
9650
|
+
else if (entry.boundingClientRect.bottom > __classPrivateFieldGet$3(this, _KupDataTable_navBarHeight, "f")) {
|
|
9653
9651
|
//If the thead is not intersecting but it still is inside the viewport, is to be considered intersected
|
|
9654
9652
|
__classPrivateFieldSet$2(this, _KupDataTable_theadIntersecting, true, "f");
|
|
9655
9653
|
}
|
|
@@ -9668,19 +9666,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9668
9666
|
if (this.tableHeight === undefined &&
|
|
9669
9667
|
this.tableWidth === undefined &&
|
|
9670
9668
|
this.headerIsPersistent) {
|
|
9671
|
-
__classPrivateFieldGet$
|
|
9669
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyHeaderPosition, "f").call(this);
|
|
9672
9670
|
}
|
|
9673
9671
|
});
|
|
9674
9672
|
};
|
|
9675
9673
|
const options = {
|
|
9676
9674
|
threshold: 0,
|
|
9677
|
-
rootMargin: '-' + __classPrivateFieldGet$
|
|
9675
|
+
rootMargin: '-' + __classPrivateFieldGet$3(this, _KupDataTable_navBarHeight, "f") + 'px 0px 0px 0px',
|
|
9678
9676
|
};
|
|
9679
9677
|
__classPrivateFieldSet$2(this, _KupDataTable_intObserver, new IntersectionObserver(callback, options), "f");
|
|
9680
9678
|
}, _KupDataTable_didLoadInteractables = function _KupDataTable_didLoadInteractables() {
|
|
9681
|
-
__classPrivateFieldGet$
|
|
9679
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableTouch, "f").push(__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"));
|
|
9682
9680
|
const tapCb = (e) => {
|
|
9683
|
-
if (__classPrivateFieldGet$
|
|
9681
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_hold, "f")) {
|
|
9684
9682
|
__classPrivateFieldSet$2(this, _KupDataTable_hold, false, "f");
|
|
9685
9683
|
return;
|
|
9686
9684
|
}
|
|
@@ -9693,11 +9691,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9693
9691
|
for (const key in e) {
|
|
9694
9692
|
clone[key] = e[key];
|
|
9695
9693
|
}
|
|
9696
|
-
__classPrivateFieldGet$
|
|
9694
|
+
__classPrivateFieldGet$3(this, _KupDataTable_clickTimeout, "f").push(setTimeout(() => {
|
|
9697
9695
|
this.kupDataTableClick.emit({
|
|
9698
9696
|
comp: this,
|
|
9699
9697
|
id: this.rootElement.id,
|
|
9700
|
-
details: __classPrivateFieldGet$
|
|
9698
|
+
details: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_clickHandler).call(this, clone),
|
|
9701
9699
|
});
|
|
9702
9700
|
}, 300));
|
|
9703
9701
|
break;
|
|
@@ -9706,7 +9704,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9706
9704
|
this.kupDataTableContextMenu.emit({
|
|
9707
9705
|
comp: this,
|
|
9708
9706
|
id: this.rootElement.id,
|
|
9709
|
-
details: __classPrivateFieldGet$
|
|
9707
|
+
details: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_contextMenuHandler).call(this, e),
|
|
9710
9708
|
});
|
|
9711
9709
|
break;
|
|
9712
9710
|
}
|
|
@@ -9715,17 +9713,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9715
9713
|
switch (e.button) {
|
|
9716
9714
|
// left click
|
|
9717
9715
|
case 0:
|
|
9718
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9719
|
-
clearTimeout(__classPrivateFieldGet$
|
|
9720
|
-
__classPrivateFieldGet$
|
|
9721
|
-
__classPrivateFieldGet$
|
|
9716
|
+
for (let index = 0; index < __classPrivateFieldGet$3(this, _KupDataTable_clickTimeout, "f").length; index++) {
|
|
9717
|
+
clearTimeout(__classPrivateFieldGet$3(this, _KupDataTable_clickTimeout, "f")[index]);
|
|
9718
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Cleared clickHandler timeout(' +
|
|
9719
|
+
__classPrivateFieldGet$3(this, _KupDataTable_clickTimeout, "f")[index] +
|
|
9722
9720
|
').');
|
|
9723
9721
|
}
|
|
9724
9722
|
__classPrivateFieldSet$2(this, _KupDataTable_clickTimeout, [], "f");
|
|
9725
9723
|
this.kupDataTableDblClick.emit({
|
|
9726
9724
|
comp: this,
|
|
9727
9725
|
id: this.rootElement.id,
|
|
9728
|
-
details: __classPrivateFieldGet$
|
|
9726
|
+
details: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_dblClickHandler).call(this, e),
|
|
9729
9727
|
});
|
|
9730
9728
|
break;
|
|
9731
9729
|
}
|
|
@@ -9736,40 +9734,40 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9736
9734
|
this.kupDataTableContextMenu.emit({
|
|
9737
9735
|
comp: this,
|
|
9738
9736
|
id: this.rootElement.id,
|
|
9739
|
-
details: __classPrivateFieldGet$
|
|
9737
|
+
details: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_contextMenuHandler).call(this, e),
|
|
9740
9738
|
});
|
|
9741
9739
|
}
|
|
9742
9740
|
};
|
|
9743
|
-
__classPrivateFieldGet$
|
|
9744
|
-
__classPrivateFieldGet$
|
|
9745
|
-
__classPrivateFieldGet$
|
|
9741
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"), kupManager.KupPointerEventTypes.TAP, tapCb);
|
|
9742
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"), kupManager.KupPointerEventTypes.DOUBLETAP, doubletapCb);
|
|
9743
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"), kupManager.KupPointerEventTypes.HOLD, holdCb);
|
|
9746
9744
|
}, _KupDataTable_didRenderInteractables = function _KupDataTable_didRenderInteractables() {
|
|
9747
9745
|
if (this.showGroups) {
|
|
9748
|
-
if (!__classPrivateFieldGet$
|
|
9749
|
-
__classPrivateFieldGet$
|
|
9750
|
-
__classPrivateFieldGet$
|
|
9746
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").includes(__classPrivateFieldGet$3(this, _KupDataTable_groupsDropareaRef, "f"))) {
|
|
9747
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").push(__classPrivateFieldGet$3(this, _KupDataTable_groupsDropareaRef, "f"));
|
|
9748
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.dropzone(__classPrivateFieldGet$3(this, _KupDataTable_groupsDropareaRef, "f"), {
|
|
9751
9749
|
accept: `[${kupManager.kupDraggableColumnAttr}]`,
|
|
9752
9750
|
}, null, {
|
|
9753
9751
|
drop: (e) => {
|
|
9754
9752
|
const draggedTh = e.relatedTarget;
|
|
9755
9753
|
const grouped = kupManager.getColumnByName(this.getColumns(), draggedTh.dataset.column);
|
|
9756
|
-
__classPrivateFieldGet$
|
|
9757
|
-
__classPrivateFieldGet$
|
|
9754
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnGroup).call(this, grouped);
|
|
9755
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager.kupDragActiveAttr);
|
|
9758
9756
|
},
|
|
9759
9757
|
});
|
|
9760
9758
|
}
|
|
9761
9759
|
}
|
|
9762
9760
|
if (this.removableColumns) {
|
|
9763
|
-
if (!__classPrivateFieldGet$
|
|
9764
|
-
__classPrivateFieldGet$
|
|
9765
|
-
__classPrivateFieldGet$
|
|
9761
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").includes(__classPrivateFieldGet$3(this, _KupDataTable_removeDropareaRef, "f"))) {
|
|
9762
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").push(__classPrivateFieldGet$3(this, _KupDataTable_removeDropareaRef, "f"));
|
|
9763
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.dropzone(__classPrivateFieldGet$3(this, _KupDataTable_removeDropareaRef, "f"), {
|
|
9766
9764
|
accept: `[${kupManager.kupDraggableColumnAttr}]`,
|
|
9767
9765
|
}, null, {
|
|
9768
9766
|
drop: (e) => {
|
|
9769
9767
|
const draggedTh = e.relatedTarget;
|
|
9770
9768
|
const deleted = kupManager.getColumnByName(this.getColumns(), draggedTh.dataset.column);
|
|
9771
9769
|
this.hideColumn(deleted);
|
|
9772
|
-
__classPrivateFieldGet$
|
|
9770
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager.kupDragActiveAttr);
|
|
9773
9771
|
},
|
|
9774
9772
|
});
|
|
9775
9773
|
}
|
|
@@ -9802,7 +9800,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9802
9800
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCardAnchor, e.target, "f");
|
|
9803
9801
|
if (receiving && starter) {
|
|
9804
9802
|
if (onlySort) {
|
|
9805
|
-
__classPrivateFieldGet$
|
|
9803
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnSort).call(this, receiving, starter);
|
|
9806
9804
|
}
|
|
9807
9805
|
else if (onlyMerge) {
|
|
9808
9806
|
this.newColumn(kupManager.KupDataNewColumnTypes.CONCATENATE, {
|
|
@@ -9810,17 +9808,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9810
9808
|
});
|
|
9811
9809
|
}
|
|
9812
9810
|
else {
|
|
9813
|
-
__classPrivateFieldGet$
|
|
9811
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_createDropCard).call(this, starter, receiving);
|
|
9814
9812
|
}
|
|
9815
9813
|
}
|
|
9816
|
-
__classPrivateFieldGet$
|
|
9814
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager.kupDragActiveAttr);
|
|
9817
9815
|
};
|
|
9818
9816
|
const startCb = (e) => {
|
|
9819
9817
|
const draggable = e.target;
|
|
9820
|
-
__classPrivateFieldGet$
|
|
9818
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, true, draggable);
|
|
9821
9819
|
};
|
|
9822
9820
|
const endCb = () => {
|
|
9823
|
-
__classPrivateFieldGet$
|
|
9821
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
9824
9822
|
};
|
|
9825
9823
|
const dropCallbacks = {
|
|
9826
9824
|
drop: dropCb,
|
|
@@ -9829,14 +9827,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9829
9827
|
start: startCb,
|
|
9830
9828
|
end: endCb,
|
|
9831
9829
|
};
|
|
9832
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9833
|
-
const th = __classPrivateFieldGet$
|
|
9834
|
-
if (th && !__classPrivateFieldGet$
|
|
9835
|
-
__classPrivateFieldGet$
|
|
9836
|
-
__classPrivateFieldGet$
|
|
9830
|
+
for (let index = 0; index < __classPrivateFieldGet$3(this, _KupDataTable_thRefs, "f").length; index++) {
|
|
9831
|
+
const th = __classPrivateFieldGet$3(this, _KupDataTable_thRefs, "f")[index];
|
|
9832
|
+
if (th && !__classPrivateFieldGet$3(this, _KupDataTable_interactableDrag, "f").includes(th)) {
|
|
9833
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableDrag, "f").push(th);
|
|
9834
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.dropzone(th, {
|
|
9837
9835
|
accept: `[${kupManager.kupDraggableColumnAttr}]`,
|
|
9838
9836
|
}, null, dropCallbacks);
|
|
9839
|
-
__classPrivateFieldGet$
|
|
9837
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.draggable(th, {
|
|
9840
9838
|
cursorChecker() {
|
|
9841
9839
|
return null;
|
|
9842
9840
|
},
|
|
@@ -9856,11 +9854,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9856
9854
|
const callbacks = {
|
|
9857
9855
|
move: moveCb,
|
|
9858
9856
|
};
|
|
9859
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9860
|
-
const th = __classPrivateFieldGet$
|
|
9861
|
-
if (th && !__classPrivateFieldGet$
|
|
9862
|
-
__classPrivateFieldGet$
|
|
9863
|
-
__classPrivateFieldGet$
|
|
9857
|
+
for (let index = 0; index < __classPrivateFieldGet$3(this, _KupDataTable_thRefs, "f").length; index++) {
|
|
9858
|
+
const th = __classPrivateFieldGet$3(this, _KupDataTable_thRefs, "f")[index];
|
|
9859
|
+
if (th && !__classPrivateFieldGet$3(this, _KupDataTable_interactableResize, "f").includes(th)) {
|
|
9860
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableResize, "f").push(th);
|
|
9861
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.resizable(th, {
|
|
9864
9862
|
allowFrom: '.header-cell__drag-handler',
|
|
9865
9863
|
edges: {
|
|
9866
9864
|
left: false,
|
|
@@ -9874,8 +9872,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9874
9872
|
}
|
|
9875
9873
|
}
|
|
9876
9874
|
if (this.dragEnabled) {
|
|
9877
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9878
|
-
const row = __classPrivateFieldGet$
|
|
9875
|
+
for (let index = 0; index < __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").length; index++) {
|
|
9876
|
+
const row = __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f")[index];
|
|
9879
9877
|
const dataCb = () => {
|
|
9880
9878
|
const cellEl = this.rootElement.shadowRoot.querySelector('td:hover');
|
|
9881
9879
|
return {
|
|
@@ -9888,9 +9886,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9888
9886
|
selectedRows: this.selectedRows,
|
|
9889
9887
|
};
|
|
9890
9888
|
};
|
|
9891
|
-
if (row && !__classPrivateFieldGet$
|
|
9892
|
-
__classPrivateFieldGet$
|
|
9893
|
-
__classPrivateFieldGet$
|
|
9889
|
+
if (row && !__classPrivateFieldGet$3(this, _KupDataTable_interactableDrag, "f").includes(row)) {
|
|
9890
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableDrag, "f").push(row);
|
|
9891
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.draggable(row, {
|
|
9894
9892
|
allowFrom: 'td',
|
|
9895
9893
|
cursorChecker() {
|
|
9896
9894
|
return null;
|
|
@@ -9905,11 +9903,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9905
9903
|
const dataCb = () => {
|
|
9906
9904
|
const cell = this.rootElement.shadowRoot.querySelector('td:hover');
|
|
9907
9905
|
if (!cell) {
|
|
9908
|
-
__classPrivateFieldGet$
|
|
9906
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, "Couldn't find cell hovered to retrieve dropzone informations!", kupManager.KupDebugCategory.WARNING);
|
|
9909
9907
|
return;
|
|
9910
9908
|
}
|
|
9911
|
-
const path = __classPrivateFieldGet$
|
|
9912
|
-
const receivingDetails = __classPrivateFieldGet$
|
|
9909
|
+
const path = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").getEventPath(cell, this.rootElement);
|
|
9910
|
+
const receivingDetails = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, path);
|
|
9913
9911
|
return {
|
|
9914
9912
|
cell: receivingDetails.cell,
|
|
9915
9913
|
column: receivingDetails.column,
|
|
@@ -9917,11 +9915,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9917
9915
|
row: receivingDetails.row,
|
|
9918
9916
|
};
|
|
9919
9917
|
};
|
|
9920
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9921
|
-
const row = __classPrivateFieldGet$
|
|
9922
|
-
if (row && !__classPrivateFieldGet$
|
|
9923
|
-
__classPrivateFieldGet$
|
|
9924
|
-
__classPrivateFieldGet$
|
|
9918
|
+
for (let index = 0; index < __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").length; index++) {
|
|
9919
|
+
const row = __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f")[index];
|
|
9920
|
+
if (row && !__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").includes(row)) {
|
|
9921
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").push(row);
|
|
9922
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.dropzone(row, {
|
|
9925
9923
|
accept: `[${kupManager.kupDraggableCellAttr}]`,
|
|
9926
9924
|
}, {
|
|
9927
9925
|
callback: dataCb,
|
|
@@ -9935,44 +9933,44 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9935
9933
|
if (this.headerIsPersistent &&
|
|
9936
9934
|
this.tableHeight === undefined &&
|
|
9937
9935
|
this.tableWidth === undefined) {
|
|
9938
|
-
__classPrivateFieldGet$
|
|
9939
|
-
__classPrivateFieldGet$
|
|
9936
|
+
__classPrivateFieldGet$3(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"));
|
|
9937
|
+
__classPrivateFieldGet$3(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$3(this, _KupDataTable_theadRef, "f"));
|
|
9940
9938
|
}
|
|
9941
9939
|
}, _KupDataTable_didRenderObservers = function _KupDataTable_didRenderObservers() {
|
|
9942
|
-
if (__classPrivateFieldGet$
|
|
9943
|
-
__classPrivateFieldGet$
|
|
9940
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_paginatedRowsLength, "f") < __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f") && this.lazyLoadRows) {
|
|
9941
|
+
__classPrivateFieldGet$3(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f")[__classPrivateFieldGet$3(this, _KupDataTable_paginatedRowsLength, "f") - 1]);
|
|
9944
9942
|
}
|
|
9945
9943
|
}, _KupDataTable_didLoadEventHandling = function _KupDataTable_didLoadEventHandling() {
|
|
9946
|
-
__classPrivateFieldGet$
|
|
9944
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f").addEventListener('scroll', () => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_scrollStickyHeader).call(this));
|
|
9947
9945
|
}, _KupDataTable_scrollStickyHeader = function _KupDataTable_scrollStickyHeader() {
|
|
9948
|
-
if (!__classPrivateFieldGet$
|
|
9946
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
9949
9947
|
return;
|
|
9950
9948
|
}
|
|
9951
|
-
__classPrivateFieldGet$
|
|
9949
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").scrollLeft = __classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f").scrollLeft;
|
|
9952
9950
|
}, _KupDataTable_checkScrollOnHover = function _KupDataTable_checkScrollOnHover() {
|
|
9953
|
-
if (!__classPrivateFieldGet$
|
|
9951
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").scrollOnHover.isRegistered(__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f"))) {
|
|
9954
9952
|
if (this.scrollOnHover &&
|
|
9955
9953
|
this.tableHeight === undefined &&
|
|
9956
9954
|
this.tableWidth === undefined) {
|
|
9957
|
-
__classPrivateFieldGet$
|
|
9955
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").scrollOnHover.register(__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f"));
|
|
9958
9956
|
}
|
|
9959
9957
|
}
|
|
9960
9958
|
else {
|
|
9961
9959
|
if (!this.scrollOnHover &&
|
|
9962
9960
|
(this.tableHeight !== undefined ||
|
|
9963
9961
|
this.tableWidth !== undefined)) {
|
|
9964
|
-
__classPrivateFieldGet$
|
|
9962
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").scrollOnHover.unregister(__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f"));
|
|
9965
9963
|
}
|
|
9966
9964
|
}
|
|
9967
9965
|
}, _KupDataTable_customizePanelPosition = function _KupDataTable_customizePanelPosition() {
|
|
9968
|
-
if (__classPrivateFieldGet$
|
|
9969
|
-
!__classPrivateFieldGet$
|
|
9970
|
-
__classPrivateFieldGet$
|
|
9966
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_customizeTopButtonRef, "f") &&
|
|
9967
|
+
!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f"))) {
|
|
9968
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f"), __classPrivateFieldGet$3(this, _KupDataTable_customizeTopButtonRef, "f"), 0, kupManager.KupDynamicPositionPlacement.BOTTOM, true);
|
|
9971
9969
|
}
|
|
9972
9970
|
}, _KupDataTable_rowsPointLength = function _KupDataTable_rowsPointLength() {
|
|
9973
|
-
return __classPrivateFieldGet$
|
|
9971
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, __classPrivateFieldGet$3(this, _KupDataTable_rows, "f"));
|
|
9974
9972
|
}, _KupDataTable_paginatedRowsPointLength = function _KupDataTable_paginatedRowsPointLength() {
|
|
9975
|
-
return __classPrivateFieldGet$
|
|
9973
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, __classPrivateFieldGet$3(this, _KupDataTable_paginatedRows, "f"));
|
|
9976
9974
|
}, _KupDataTable__rowsLength = function _KupDataTable__rowsLength(r) {
|
|
9977
9975
|
if (r == null) {
|
|
9978
9976
|
return 0;
|
|
@@ -9985,26 +9983,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9985
9983
|
}
|
|
9986
9984
|
count += 1;
|
|
9987
9985
|
if (row.group != null) {
|
|
9988
|
-
count += __classPrivateFieldGet$
|
|
9986
|
+
count += __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, row.group.children);
|
|
9989
9987
|
}
|
|
9990
9988
|
}
|
|
9991
9989
|
return count;
|
|
9992
9990
|
}, _KupDataTable_setDynPosElements = function _KupDataTable_setDynPosElements() {
|
|
9993
9991
|
// Column menu
|
|
9994
|
-
if (__classPrivateFieldGet$
|
|
9995
|
-
__classPrivateFieldGet$
|
|
9996
|
-
}
|
|
9997
|
-
}, _KupDataTable_getEventPath = function _KupDataTable_getEventPath(currentEl) {
|
|
9998
|
-
const path = [];
|
|
9999
|
-
while (currentEl &&
|
|
10000
|
-
currentEl !== this.rootElement &&
|
|
10001
|
-
currentEl !== document.body) {
|
|
10002
|
-
path.push(currentEl);
|
|
10003
|
-
currentEl = currentEl.parentNode
|
|
10004
|
-
? currentEl.parentNode
|
|
10005
|
-
: currentEl.host;
|
|
10006
|
-
}
|
|
10007
|
-
return path;
|
|
9992
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f") && __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").data) {
|
|
9993
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").data = __classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").prepData(this, kupManager.getColumnByName(this.getVisibleColumns(), this.columnMenuAnchor), __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").data);
|
|
9994
|
+
}
|
|
10008
9995
|
}, _KupDataTable_resetSelectedRows = function _KupDataTable_resetSelectedRows() {
|
|
10009
9996
|
if (this.getRows().length === 0)
|
|
10010
9997
|
return;
|
|
@@ -10027,7 +10014,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10027
10014
|
return undefined;
|
|
10028
10015
|
}
|
|
10029
10016
|
}, _KupDataTable_rowDetail = function _KupDataTable_rowDetail(row, x, y) {
|
|
10030
|
-
const transposedData = __classPrivateFieldGet$
|
|
10017
|
+
const transposedData = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getTransposedData).call(this);
|
|
10031
10018
|
const cardData = {
|
|
10032
10019
|
button: [
|
|
10033
10020
|
{
|
|
@@ -10056,7 +10043,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10056
10043
|
showHeader: false,
|
|
10057
10044
|
},
|
|
10058
10045
|
],
|
|
10059
|
-
text: [__classPrivateFieldGet$
|
|
10046
|
+
text: [__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.DETAIL)],
|
|
10060
10047
|
};
|
|
10061
10048
|
const columns = cardData.datatable[0].data.columns;
|
|
10062
10049
|
const rows = cardData.datatable[0].data.rows;
|
|
@@ -10080,7 +10067,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10080
10067
|
currentColumn.visible = true;
|
|
10081
10068
|
}
|
|
10082
10069
|
else {
|
|
10083
|
-
__classPrivateFieldGet$
|
|
10070
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Invalid column name on row ID (' +
|
|
10084
10071
|
row.id +
|
|
10085
10072
|
"), couldn't set current record!", kupManager.KupDebugCategory.WARNING);
|
|
10086
10073
|
}
|
|
@@ -10089,7 +10076,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10089
10076
|
for (let index = 0; index < rows.length; index++) {
|
|
10090
10077
|
const column = this.data.columns.find((x) => x.name === rows[index].transposedColumnName);
|
|
10091
10078
|
if (!column) {
|
|
10092
|
-
__classPrivateFieldGet$
|
|
10079
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Column not found on row name (' + column + ')!', kupManager.KupDebugCategory.WARNING);
|
|
10093
10080
|
return;
|
|
10094
10081
|
}
|
|
10095
10082
|
const editable = rows[index].cells[row.id].isEditable
|
|
@@ -10113,8 +10100,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10113
10100
|
resource: editable ? 'edit-key' : 'key-variant',
|
|
10114
10101
|
},
|
|
10115
10102
|
title: editable
|
|
10116
|
-
? __classPrivateFieldGet$
|
|
10117
|
-
: __classPrivateFieldGet$
|
|
10103
|
+
? __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.EDITABLE_KEY)
|
|
10104
|
+
: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.KEY),
|
|
10118
10105
|
value: editable ? 'edit-key' : 'key-variant',
|
|
10119
10106
|
};
|
|
10120
10107
|
}
|
|
@@ -10129,7 +10116,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10129
10116
|
color: `var(${kupManager.KupThemeColorValues.TEXT})`,
|
|
10130
10117
|
resource: 'pencil',
|
|
10131
10118
|
},
|
|
10132
|
-
title: __classPrivateFieldGet$
|
|
10119
|
+
title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EDITABLE_FIELD),
|
|
10133
10120
|
value: 'pencil',
|
|
10134
10121
|
};
|
|
10135
10122
|
}
|
|
@@ -10151,35 +10138,35 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10151
10138
|
}
|
|
10152
10139
|
rows[index].cells[kupManager.iconColumn.toUpperCase()] = iconCell;
|
|
10153
10140
|
}
|
|
10154
|
-
if (!__classPrivateFieldGet$
|
|
10141
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f")) {
|
|
10155
10142
|
__classPrivateFieldSet$2(this, _KupDataTable_detailCard, document.createElement('kup-card'), "f");
|
|
10156
|
-
__classPrivateFieldGet$
|
|
10157
|
-
__classPrivateFieldGet$
|
|
10158
|
-
__classPrivateFieldGet$
|
|
10159
|
-
__classPrivateFieldGet$
|
|
10143
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").layoutFamily = kupManager.KupCardFamily.DIALOG;
|
|
10144
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").layoutNumber = 4;
|
|
10145
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").sizeX = 'auto';
|
|
10146
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").sizeY = 'auto';
|
|
10160
10147
|
}
|
|
10161
10148
|
else {
|
|
10162
|
-
const children = Array.prototype.slice.call(__classPrivateFieldGet$
|
|
10149
|
+
const children = Array.prototype.slice.call(__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").children, 0);
|
|
10163
10150
|
for (let index = 0; index < children.length; index++) {
|
|
10164
10151
|
children[index].remove();
|
|
10165
10152
|
}
|
|
10166
10153
|
}
|
|
10167
|
-
__classPrivateFieldGet$
|
|
10168
|
-
__classPrivateFieldGet$
|
|
10169
|
-
__classPrivateFieldGet$
|
|
10170
|
-
__classPrivateFieldGet$
|
|
10171
|
-
__classPrivateFieldGet$
|
|
10172
|
-
__classPrivateFieldGet$
|
|
10173
|
-
__classPrivateFieldGet$
|
|
10174
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
10154
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").data = cardData;
|
|
10155
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").style.position = 'fixed';
|
|
10156
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").style.left = '0';
|
|
10157
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").style.top = '0';
|
|
10158
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").setAttribute('data-x', x.toString());
|
|
10159
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").setAttribute('data-y', y.toString());
|
|
10160
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
|
10161
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f"));
|
|
10175
10162
|
}, _KupDataTable_rowInsertForm = function _KupDataTable_rowInsertForm() {
|
|
10176
10163
|
const CARD_WIDTH = 400;
|
|
10177
10164
|
const CARD_HEIGHT = 400;
|
|
10178
10165
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, document.createElement('kup-card'), "f");
|
|
10179
|
-
__classPrivateFieldGet$
|
|
10180
|
-
__classPrivateFieldGet$
|
|
10181
|
-
__classPrivateFieldGet$
|
|
10182
|
-
__classPrivateFieldGet$
|
|
10166
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").layoutFamily = kupManager.KupCardFamily.FREE;
|
|
10167
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").layoutNumber = 1;
|
|
10168
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").sizeX = CARD_WIDTH + 'px';
|
|
10169
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").sizeY = CARD_HEIGHT + 'px';
|
|
10183
10170
|
const style = document.createElement('style');
|
|
10184
10171
|
style.innerText =
|
|
10185
10172
|
'kup-form { max-height: 40vh; overflow: auto; } .page-wrapper { display: grid; } ' +
|
|
@@ -10187,24 +10174,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10187
10174
|
'.message-wrapper { display: none; justify-content: start; padding-top: 5px; padding-bottom: 5px; } ' +
|
|
10188
10175
|
'.errorIcon { --kup-icon-color: var(--kup-danger-color); } ' +
|
|
10189
10176
|
'.message { background-color: var(--kup-danger-color); color: white; padding: 3px; } ';
|
|
10190
|
-
__classPrivateFieldGet$
|
|
10177
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").append(style);
|
|
10191
10178
|
const pageWrapper = document.createElement('div');
|
|
10192
10179
|
pageWrapper.className = 'page-wrapper';
|
|
10193
10180
|
const buttonWrapper = document.createElement('div');
|
|
10194
10181
|
buttonWrapper.className = 'button-wrapper';
|
|
10195
10182
|
const cancel = document.createElement('kup-button');
|
|
10196
10183
|
const confirm = document.createElement('kup-button');
|
|
10197
|
-
cancel.id = __classPrivateFieldGet$
|
|
10184
|
+
cancel.id = __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_CANCEL_ID, "f");
|
|
10198
10185
|
cancel.icon = 'clear';
|
|
10199
|
-
cancel.label = __classPrivateFieldGet$
|
|
10186
|
+
cancel.label = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.ABORT);
|
|
10200
10187
|
cancel.styling = fButtonDeclarations.FButtonStyling.FLAT;
|
|
10201
10188
|
cancel.addEventListener('kup-button-click', () => {
|
|
10202
|
-
__classPrivateFieldGet$
|
|
10189
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").remove();
|
|
10203
10190
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, null, "f");
|
|
10204
10191
|
});
|
|
10205
|
-
confirm.id = __classPrivateFieldGet$
|
|
10192
|
+
confirm.id = __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_SUBMIT_ID, "f");
|
|
10206
10193
|
confirm.icon = 'check';
|
|
10207
|
-
confirm.label = __classPrivateFieldGet$
|
|
10194
|
+
confirm.label = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.CONFIRM);
|
|
10208
10195
|
let innerComp = document.createElement('kup-spinner');
|
|
10209
10196
|
innerComp.slot = 'spinner';
|
|
10210
10197
|
innerComp.dimensions = '0.6em';
|
|
@@ -10223,7 +10210,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10223
10210
|
buttonWrapper.append(cancel);
|
|
10224
10211
|
buttonWrapper.append(confirm);
|
|
10225
10212
|
const form = document.createElement('kup-form');
|
|
10226
|
-
form.id = __classPrivateFieldGet$
|
|
10213
|
+
form.id = __classPrivateFieldGet$3(this, _KupDataTable_FIELDS_FORM_ID, "f");
|
|
10227
10214
|
const row = {
|
|
10228
10215
|
cells: {},
|
|
10229
10216
|
id: '0',
|
|
@@ -10243,7 +10230,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10243
10230
|
};
|
|
10244
10231
|
const messageWrapper = document.createElement('div');
|
|
10245
10232
|
messageWrapper.className = 'message-wrapper';
|
|
10246
|
-
messageWrapper.id = __classPrivateFieldGet$
|
|
10233
|
+
messageWrapper.id = __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f");
|
|
10247
10234
|
const icon = document.createElement('kup-image');
|
|
10248
10235
|
icon.className = 'errorIcon';
|
|
10249
10236
|
icon.resource = 'cancel';
|
|
@@ -10252,43 +10239,43 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10252
10239
|
messageWrapper.append(icon);
|
|
10253
10240
|
const message = document.createElement('span');
|
|
10254
10241
|
message.className = 'message';
|
|
10255
|
-
message.id = __classPrivateFieldGet$
|
|
10242
|
+
message.id = __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_ID, "f");
|
|
10256
10243
|
let msg = '';
|
|
10257
10244
|
message.innerText = msg;
|
|
10258
10245
|
messageWrapper.append(message);
|
|
10259
10246
|
pageWrapper.append(messageWrapper);
|
|
10260
10247
|
pageWrapper.append(form);
|
|
10261
10248
|
pageWrapper.append(buttonWrapper);
|
|
10262
|
-
__classPrivateFieldGet$
|
|
10263
|
-
__classPrivateFieldGet$
|
|
10264
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
10249
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").append(pageWrapper);
|
|
10250
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").data = {};
|
|
10251
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f"));
|
|
10265
10252
|
}, _KupDataTable_rowsDelete = function _KupDataTable_rowsDelete() {
|
|
10266
10253
|
const createDeleteCard = () => {
|
|
10267
10254
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteDialog, document.createElement('kup-dialog'), "f");
|
|
10268
10255
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteCard, document.createElement('kup-card'), "f");
|
|
10269
|
-
__classPrivateFieldGet$
|
|
10270
|
-
__classPrivateFieldGet$
|
|
10271
|
-
__classPrivateFieldGet$
|
|
10272
|
-
__classPrivateFieldGet$
|
|
10256
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").layoutFamily = kupManager.KupCardFamily.FREE;
|
|
10257
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").layoutNumber = 1;
|
|
10258
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").sizeX = 'auto';
|
|
10259
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").sizeY = 'auto';
|
|
10273
10260
|
const style = document.createElement('style');
|
|
10274
10261
|
style.innerText =
|
|
10275
10262
|
'.button-wrapper, .message-wrapper { display: flex; justify-content: space-around; z-index: var(--kup-card-zindex); } .message-wrapper { padding-bottom: 20px; }';
|
|
10276
10263
|
const messageWrapper = document.createElement('div');
|
|
10277
10264
|
messageWrapper.className = 'message-wrapper';
|
|
10278
|
-
messageWrapper.id = __classPrivateFieldGet$
|
|
10265
|
+
messageWrapper.id = __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f");
|
|
10279
10266
|
const message = document.createElement('span');
|
|
10280
10267
|
message.className = 'message';
|
|
10281
|
-
message.id = __classPrivateFieldGet$
|
|
10282
|
-
let msg = __classPrivateFieldGet$
|
|
10268
|
+
message.id = __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_ID, "f");
|
|
10269
|
+
let msg = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.CONFIRM_DELETE_X_ROWS);
|
|
10283
10270
|
msg = msg.replace('{0}', this.selectedRows.length + '');
|
|
10284
10271
|
message.innerText = msg;
|
|
10285
10272
|
messageWrapper.append(message);
|
|
10286
10273
|
const buttonWrapper = document.createElement('div');
|
|
10287
10274
|
buttonWrapper.className = 'button-wrapper';
|
|
10288
10275
|
const confirm = document.createElement('kup-button');
|
|
10289
|
-
confirm.id = __classPrivateFieldGet$
|
|
10276
|
+
confirm.id = __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_SUBMIT_ID, "f");
|
|
10290
10277
|
confirm.icon = 'check';
|
|
10291
|
-
confirm.label = __classPrivateFieldGet$
|
|
10278
|
+
confirm.label = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.CONFIRM);
|
|
10292
10279
|
let innerComp = document.createElement('kup-spinner');
|
|
10293
10280
|
innerComp.slot = 'spinner';
|
|
10294
10281
|
innerComp.dimensions = '0.6em';
|
|
@@ -10303,17 +10290,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10303
10290
|
});
|
|
10304
10291
|
});
|
|
10305
10292
|
buttonWrapper.append(confirm);
|
|
10306
|
-
__classPrivateFieldGet$
|
|
10307
|
-
__classPrivateFieldGet$
|
|
10308
|
-
__classPrivateFieldGet$
|
|
10309
|
-
__classPrivateFieldGet$
|
|
10310
|
-
__classPrivateFieldGet$
|
|
10311
|
-
document.querySelector('body').append(__classPrivateFieldGet$
|
|
10293
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").append(style);
|
|
10294
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").append(messageWrapper);
|
|
10295
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").append(buttonWrapper);
|
|
10296
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").data = {};
|
|
10297
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteDialog, "f").append(__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f"));
|
|
10298
|
+
document.querySelector('body').append(__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteDialog, "f"));
|
|
10312
10299
|
};
|
|
10313
10300
|
const insertRowsIds = [];
|
|
10314
10301
|
const startingRows = [];
|
|
10315
10302
|
this.selectedRows.forEach((row) => {
|
|
10316
|
-
if (row.id.indexOf(__classPrivateFieldGet$
|
|
10303
|
+
if (row.id.indexOf(__classPrivateFieldGet$3(this, _KupDataTable_INSERT_PREFIX, "f")) > -1) {
|
|
10317
10304
|
insertRowsIds.push(row.id);
|
|
10318
10305
|
}
|
|
10319
10306
|
else {
|
|
@@ -10418,15 +10405,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10418
10405
|
tr: tr ? tr : null,
|
|
10419
10406
|
};
|
|
10420
10407
|
}, _KupDataTable_clickHandler = function _KupDataTable_clickHandler(e) {
|
|
10421
|
-
const details = __classPrivateFieldGet$
|
|
10408
|
+
const details = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10422
10409
|
if (details.area === 'header') {
|
|
10423
10410
|
if (details.th && details.column) {
|
|
10424
10411
|
if (details.filterRemove) {
|
|
10425
|
-
__classPrivateFieldGet$
|
|
10412
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onRemoveFilter).call(this, details.column);
|
|
10426
10413
|
return details;
|
|
10427
10414
|
}
|
|
10428
10415
|
else if (this.sortEnabled) {
|
|
10429
|
-
__classPrivateFieldGet$
|
|
10416
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onColumnSort).call(this, e, details.column.name);
|
|
10430
10417
|
return details;
|
|
10431
10418
|
}
|
|
10432
10419
|
}
|
|
@@ -10441,22 +10428,22 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10441
10428
|
}
|
|
10442
10429
|
details.tr.classList.add('focus');
|
|
10443
10430
|
if (e.ctrlKey || e.metaKey) {
|
|
10444
|
-
__classPrivateFieldGet$
|
|
10431
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_rowDetail).call(this, Object.assign({}, details.row), e.clientX, e.clientY);
|
|
10445
10432
|
return details;
|
|
10446
10433
|
}
|
|
10447
10434
|
}
|
|
10448
10435
|
if (details.tr && details.row && details.isGroupRow) {
|
|
10449
|
-
__classPrivateFieldGet$
|
|
10436
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onRowExpand).call(this, details.row);
|
|
10450
10437
|
return details;
|
|
10451
10438
|
}
|
|
10452
10439
|
if (details.td && details.row && !details.textfield) {
|
|
10453
|
-
__classPrivateFieldGet$
|
|
10440
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, details.row, details.td, true);
|
|
10454
10441
|
return details;
|
|
10455
10442
|
}
|
|
10456
10443
|
}
|
|
10457
10444
|
return details;
|
|
10458
10445
|
}, _KupDataTable_contextMenuHandler = function _KupDataTable_contextMenuHandler(e) {
|
|
10459
|
-
const details = __classPrivateFieldGet$
|
|
10446
|
+
const details = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10460
10447
|
if (details.area === 'header') {
|
|
10461
10448
|
if (details.th && details.column) {
|
|
10462
10449
|
this.openColumnMenu(details.column.name);
|
|
@@ -10466,34 +10453,34 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10466
10453
|
else if (details.area === 'footer') {
|
|
10467
10454
|
if (details.td && details.column) {
|
|
10468
10455
|
__classPrivateFieldSet$2(this, _KupDataTable_totalMenuCoords, { x: e.clientX, y: e.clientY }, "f");
|
|
10469
|
-
__classPrivateFieldGet$
|
|
10456
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onTotalMenuOpen).call(this, details.column);
|
|
10470
10457
|
return details;
|
|
10471
10458
|
}
|
|
10472
10459
|
}
|
|
10473
10460
|
return details;
|
|
10474
10461
|
}, _KupDataTable_dblClickHandler = function _KupDataTable_dblClickHandler(e) {
|
|
10475
|
-
const details = __classPrivateFieldGet$
|
|
10462
|
+
const details = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10476
10463
|
if (details.area === 'body') {
|
|
10477
10464
|
if (this.selection == kupManager.SelectionMode.MULTIPLE) {
|
|
10478
|
-
__classPrivateFieldGet$
|
|
10465
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
10479
10466
|
}
|
|
10480
10467
|
if (this.selection == kupManager.SelectionMode.SINGLE ||
|
|
10481
10468
|
this.selection == kupManager.SelectionMode.MULTIPLE) {
|
|
10482
|
-
__classPrivateFieldGet$
|
|
10469
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, details.row, details.td, false);
|
|
10483
10470
|
}
|
|
10484
10471
|
}
|
|
10485
10472
|
return details;
|
|
10486
10473
|
}, _KupDataTable_initRows = function _KupDataTable_initRows() {
|
|
10487
|
-
__classPrivateFieldGet$
|
|
10488
|
-
__classPrivateFieldSet$2(this, _KupDataTable_footer, fPaginatorUtils.calcTotals(fPaginatorUtils.normalizeRows(this.getColumns(), __classPrivateFieldGet$
|
|
10489
|
-
__classPrivateFieldGet$
|
|
10490
|
-
__classPrivateFieldGet$
|
|
10491
|
-
__classPrivateFieldGet$
|
|
10492
|
-
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRows, fPaginatorUtils.paginateRows(__classPrivateFieldGet$
|
|
10493
|
-
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRowsLength, __classPrivateFieldGet$
|
|
10474
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_filterRows).call(this);
|
|
10475
|
+
__classPrivateFieldSet$2(this, _KupDataTable_footer, fPaginatorUtils.calcTotals(fPaginatorUtils.normalizeRows(this.getColumns(), __classPrivateFieldGet$3(this, _KupDataTable_rows, "f")), this.totals), "f");
|
|
10476
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_groupRows).call(this);
|
|
10477
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_sortRows).call(this);
|
|
10478
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
10479
|
+
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRows, fPaginatorUtils.paginateRows(__classPrivateFieldGet$3(this, _KupDataTable_rows, "f"), this.currentPage, this.currentRowsPerPage, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)), "f");
|
|
10480
|
+
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRowsLength, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_paginatedRowsPointLength).call(this), "f");
|
|
10494
10481
|
}, _KupDataTable_filterRows = function _KupDataTable_filterRows() {
|
|
10495
10482
|
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.filterRows(this.getRows(), this.filters, this.globalFilterValue, this.getColumns()), "f");
|
|
10496
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rowsLength, __classPrivateFieldGet$
|
|
10483
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rowsLength, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_rowsPointLength).call(this), "f");
|
|
10497
10484
|
}, _KupDataTable_isGrouping = function _KupDataTable_isGrouping() {
|
|
10498
10485
|
return this.groups && this.groups.length > 0;
|
|
10499
10486
|
}, _KupDataTable_hasRowActions = function _KupDataTable_hasRowActions() {
|
|
@@ -10507,19 +10494,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10507
10494
|
}, _KupDataTable_hasTotals = function _KupDataTable_hasTotals() {
|
|
10508
10495
|
return this.totals && Object.keys(this.totals).length > 0;
|
|
10509
10496
|
}, _KupDataTable_tableHasAutoWidth = function _KupDataTable_tableHasAutoWidth() {
|
|
10510
|
-
if (!__classPrivateFieldGet$
|
|
10497
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")) {
|
|
10511
10498
|
return;
|
|
10512
10499
|
}
|
|
10513
10500
|
const visibleCols = this.getVisibleColumns();
|
|
10514
10501
|
// Before checking each column, controls that visible columns are as many as items with custom sizes.
|
|
10515
10502
|
// If there are more visible columns, it means that the width of the table will be set to auto.
|
|
10516
|
-
if (visibleCols.length <= __classPrivateFieldGet$
|
|
10503
|
+
if (visibleCols.length <= __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f").length) {
|
|
10517
10504
|
let found = false;
|
|
10518
10505
|
// Each visible column must have its own width for the table to have a auto width
|
|
10519
10506
|
for (let i = 0; i < visibleCols.length; i++) {
|
|
10520
10507
|
found = false;
|
|
10521
|
-
for (let j = 0; j < __classPrivateFieldGet$
|
|
10522
|
-
if (visibleCols[i].name === __classPrivateFieldGet$
|
|
10508
|
+
for (let j = 0; j < __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f").length; j++) {
|
|
10509
|
+
if (visibleCols[i].name === __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")[j].name) {
|
|
10523
10510
|
found = true;
|
|
10524
10511
|
break;
|
|
10525
10512
|
}
|
|
@@ -10532,8 +10519,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10532
10519
|
}
|
|
10533
10520
|
return false;
|
|
10534
10521
|
}, _KupDataTable_forceGroupExpansion = function _KupDataTable_forceGroupExpansion() {
|
|
10535
|
-
__classPrivateFieldGet$
|
|
10536
|
-
__classPrivateFieldGet$
|
|
10522
|
+
__classPrivateFieldGet$3(this, _KupDataTable_rows, "f").forEach((row) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, row));
|
|
10523
|
+
__classPrivateFieldGet$3(this, _KupDataTable_paginatedRows, "f").forEach((row) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, row));
|
|
10537
10524
|
}, _KupDataTable_forceRowGroupExpansion = function _KupDataTable_forceRowGroupExpansion(row) {
|
|
10538
10525
|
// check if row is group
|
|
10539
10526
|
if (!row.group) {
|
|
@@ -10554,10 +10541,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10554
10541
|
}
|
|
10555
10542
|
this.groupState[row.group.id] = groupState;
|
|
10556
10543
|
if (row.group.children) {
|
|
10557
|
-
row.group.children.forEach((childRow) => __classPrivateFieldGet$
|
|
10544
|
+
row.group.children.forEach((childRow) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, childRow));
|
|
10558
10545
|
}
|
|
10559
10546
|
}, _KupDataTable_adjustPaginator = function _KupDataTable_adjustPaginator() {
|
|
10560
|
-
const numberOfRows = __classPrivateFieldGet$
|
|
10547
|
+
const numberOfRows = __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f");
|
|
10561
10548
|
// check if current page is valid
|
|
10562
10549
|
const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
|
|
10563
10550
|
if (this.currentPage > numberOfPages) {
|
|
@@ -10566,7 +10553,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10566
10553
|
this.resetCurrentPage();
|
|
10567
10554
|
}
|
|
10568
10555
|
}, _KupDataTable_composeFixedCellStyleAndClass = function _KupDataTable_composeFixedCellStyleAndClass(columnCssIndex, rowCssIndex, extraCellsCount = 0) {
|
|
10569
|
-
if (__classPrivateFieldGet$
|
|
10556
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
10570
10557
|
return undefined;
|
|
10571
10558
|
}
|
|
10572
10559
|
//-- Controls if there are fixed rows or columns --
|
|
@@ -10603,20 +10590,20 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10603
10590
|
}, _KupDataTable_updateFixedRowsAndColumnsCssVariables = function _KupDataTable_updateFixedRowsAndColumnsCssVariables() {
|
|
10604
10591
|
// [ffbf] - Using getBoundingClientRect is mandatory since Firefox return a wrong value for ele.offsetHeight and witdh values
|
|
10605
10592
|
// When grouping, the fixed rows and columns are not sticky
|
|
10606
|
-
if (__classPrivateFieldGet$
|
|
10593
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) || !__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"))
|
|
10607
10594
|
return false;
|
|
10608
10595
|
let toRet = false;
|
|
10609
10596
|
if (this.fixedRows >= 1) {
|
|
10610
|
-
let currentRow = __classPrivateFieldGet$
|
|
10597
|
+
let currentRow = __classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type');
|
|
10611
10598
|
// The height must start from the height of the header. BUT not on Safari.
|
|
10612
10599
|
// Safari handles the sticky position on the tables in a different way, making it start from the tbody element
|
|
10613
10600
|
// and not on the table with a specified position of sticky. There fore in that case we must set initial height to 0.
|
|
10614
|
-
let previousHeight = !__classPrivateFieldGet$
|
|
10615
|
-
? __classPrivateFieldGet$
|
|
10601
|
+
let previousHeight = !__classPrivateFieldGet$3(this, _KupDataTable_isSafariBrowser, "f")
|
|
10602
|
+
? __classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").querySelector('thead > tr:first-of-type > th:first-of-type').getBoundingClientRect().height // [ffbf]
|
|
10616
10603
|
: 0;
|
|
10617
10604
|
// [CSSCount] - I must start from 1 since we are referencing html elements e not array (with CSS selectors starting from 1)
|
|
10618
10605
|
for (let i = 1; i <= this.fixedRows && currentRow; i++) {
|
|
10619
|
-
__classPrivateFieldGet$
|
|
10606
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f").style.setProperty(kupManager.FixedCellsCSSVarsBase.rows + i, previousHeight + 'px');
|
|
10620
10607
|
previousHeight += currentRow.children[0].getBoundingClientRect().height; // [ffbf]
|
|
10621
10608
|
currentRow =
|
|
10622
10609
|
currentRow.nextElementSibling;
|
|
@@ -10624,14 +10611,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10624
10611
|
toRet = true;
|
|
10625
10612
|
}
|
|
10626
10613
|
if (this.fixedColumns >= 1) {
|
|
10627
|
-
let currentCell = __classPrivateFieldGet$
|
|
10614
|
+
let currentCell = __classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type > td:first-of-type');
|
|
10628
10615
|
let previousWidth = 0;
|
|
10629
10616
|
const totalFixedColumns = this.fixedColumns +
|
|
10630
|
-
(__classPrivateFieldGet$
|
|
10617
|
+
(__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ? 1 : 0) +
|
|
10631
10618
|
(this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX ? 1 : 0);
|
|
10632
10619
|
// @See [CSSCount]
|
|
10633
10620
|
for (let i = 1; i <= totalFixedColumns && currentCell; i++) {
|
|
10634
|
-
__classPrivateFieldGet$
|
|
10621
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f").style.setProperty(kupManager.FixedCellsCSSVarsBase.columns + i, previousWidth + 'px');
|
|
10635
10622
|
previousWidth += currentCell.getBoundingClientRect().width; // [ffbf]
|
|
10636
10623
|
currentCell =
|
|
10637
10624
|
currentCell.nextElementSibling;
|
|
@@ -10679,10 +10666,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10679
10666
|
// resetting current page
|
|
10680
10667
|
this.resetCurrentPage();
|
|
10681
10668
|
const newFilters = Object.assign({}, this.filters);
|
|
10682
|
-
__classPrivateFieldGet$
|
|
10669
|
+
__classPrivateFieldGet$3(this, _KupDataTable_filtersColumnMenuInstance, "f").removeFilter(newFilters, column.name);
|
|
10683
10670
|
this.filters = newFilters;
|
|
10684
10671
|
}, _KupDataTable_getFilterValueForTooltip = function _KupDataTable_getFilterValueForTooltip(column) {
|
|
10685
|
-
return __classPrivateFieldGet$
|
|
10672
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_filtersColumnMenuInstance, "f").getFilterValueForTooltip(this.filters, column);
|
|
10686
10673
|
}, _KupDataTable_onGlobalFilterChange = function _KupDataTable_onGlobalFilterChange(inputEl) {
|
|
10687
10674
|
this.resetCurrentPage();
|
|
10688
10675
|
if (inputEl) {
|
|
@@ -10693,15 +10680,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10693
10680
|
this.globalFilterValue = '';
|
|
10694
10681
|
}
|
|
10695
10682
|
}, _KupDataTable_handlePageChange = function _KupDataTable_handlePageChange(pageNumber) {
|
|
10696
|
-
const newPage = fPaginatorUtils.pageChange(pageNumber, __classPrivateFieldGet$
|
|
10683
|
+
const newPage = fPaginatorUtils.pageChange(pageNumber, __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f"), this.currentRowsPerPage);
|
|
10697
10684
|
if (newPage) {
|
|
10698
10685
|
this.currentPage = newPage;
|
|
10699
10686
|
}
|
|
10700
10687
|
}, _KupDataTable_handleRowsPerPageChange = function _KupDataTable_handleRowsPerPageChange(rowsNumber) {
|
|
10701
|
-
const newRows = fPaginatorUtils.rowsPerPageChange(rowsNumber, __classPrivateFieldGet$
|
|
10688
|
+
const newRows = fPaginatorUtils.rowsPerPageChange(rowsNumber, __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f"));
|
|
10702
10689
|
if (newRows) {
|
|
10703
10690
|
this.currentRowsPerPage = newRows;
|
|
10704
|
-
__classPrivateFieldGet$
|
|
10691
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
10705
10692
|
}
|
|
10706
10693
|
}, _KupDataTable_onRowClick = function _KupDataTable_onRowClick(row, td, emitEvent) {
|
|
10707
10694
|
// selecting row
|
|
@@ -10731,9 +10718,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10731
10718
|
if (!row.unselectable &&
|
|
10732
10719
|
this.selection !== kupManager.SelectionMode.NONE &&
|
|
10733
10720
|
clickedColumn) {
|
|
10734
|
-
__classPrivateFieldGet$
|
|
10721
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_deselectColumn).call(this, this.selectedColumn);
|
|
10735
10722
|
this.selectedColumn = clickedColumn;
|
|
10736
|
-
__classPrivateFieldGet$
|
|
10723
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_selectColumn).call(this, this.selectedColumn);
|
|
10737
10724
|
if (emitEvent !== false) {
|
|
10738
10725
|
// emit event
|
|
10739
10726
|
this.kupRowSelected.emit({
|
|
@@ -10808,7 +10795,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10808
10795
|
}, _KupDataTable_onSelectAll = function _KupDataTable_onSelectAll({ target }) {
|
|
10809
10796
|
if (target.checked) {
|
|
10810
10797
|
// select all rows
|
|
10811
|
-
this.selectedRows = __classPrivateFieldGet$
|
|
10798
|
+
this.selectedRows = __classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f");
|
|
10812
10799
|
// triggering event
|
|
10813
10800
|
this.kupRowSelected.emit({
|
|
10814
10801
|
comp: this,
|
|
@@ -10820,21 +10807,21 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10820
10807
|
}
|
|
10821
10808
|
else {
|
|
10822
10809
|
// deselect all rows
|
|
10823
|
-
__classPrivateFieldGet$
|
|
10810
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
10824
10811
|
}
|
|
10825
10812
|
}, _KupDataTable_openTotalMenu = function _KupDataTable_openTotalMenu(column) {
|
|
10826
10813
|
this.openedTotalMenu = column.name;
|
|
10827
10814
|
}, _KupDataTable_closeTotalMenu = function _KupDataTable_closeTotalMenu() {
|
|
10828
10815
|
this.openedTotalMenu = null;
|
|
10829
|
-
__classPrivateFieldGet$
|
|
10816
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCb, "f"));
|
|
10830
10817
|
}, _KupDataTable_isOpenedTotalMenuForColumn = function _KupDataTable_isOpenedTotalMenuForColumn(column) {
|
|
10831
10818
|
return this.openedTotalMenu === column;
|
|
10832
10819
|
}, _KupDataTable_groupRows = function _KupDataTable_groupRows() {
|
|
10833
|
-
if (!__classPrivateFieldGet$
|
|
10820
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
10834
10821
|
return;
|
|
10835
10822
|
}
|
|
10836
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.groupRows(this.getColumns(), __classPrivateFieldGet$
|
|
10837
|
-
__classPrivateFieldGet$
|
|
10823
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.groupRows(this.getColumns(), __classPrivateFieldGet$3(this, _KupDataTable_rows, "f"), this.groups, this.totals), "f");
|
|
10824
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupState).call(this);
|
|
10838
10825
|
}, _KupDataTable_onLoadMoreClick = function _KupDataTable_onLoadMoreClick() {
|
|
10839
10826
|
var _a;
|
|
10840
10827
|
let loadItems = 0;
|
|
@@ -10844,11 +10831,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10844
10831
|
break;
|
|
10845
10832
|
case kupManager.LoadMoreMode.CONSTANT_INCREMENT:
|
|
10846
10833
|
loadItems =
|
|
10847
|
-
this.loadMoreStep * (__classPrivateFieldGet$
|
|
10834
|
+
this.loadMoreStep * (__classPrivateFieldGet$3(this, _KupDataTable_loadMoreEventCounter, "f") + 1);
|
|
10848
10835
|
break;
|
|
10849
10836
|
case kupManager.LoadMoreMode.PROGRESSIVE_THRESHOLD:
|
|
10850
10837
|
loadItems =
|
|
10851
|
-
Math.max(__classPrivateFieldGet$
|
|
10838
|
+
Math.max(__classPrivateFieldGet$3(this, _KupDataTable_loadMoreEventPreviousQuantity, "f"), this.loadMoreStep) * Math.min(__classPrivateFieldGet$3(this, _KupDataTable_loadMoreEventCounter, "f") + 1, 2);
|
|
10852
10839
|
break;
|
|
10853
10840
|
}
|
|
10854
10841
|
if (loadItems > this.loadMoreLimit) {
|
|
@@ -10860,15 +10847,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10860
10847
|
loadItems: loadItems,
|
|
10861
10848
|
});
|
|
10862
10849
|
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventPreviousQuantity, loadItems, "f");
|
|
10863
|
-
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventCounter, (_a = __classPrivateFieldGet$
|
|
10850
|
+
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventCounter, (_a = __classPrivateFieldGet$3(this, _KupDataTable_loadMoreEventCounter, "f"), _a++, _a), "f");
|
|
10864
10851
|
}, _KupDataTable_adjustGroupState = function _KupDataTable_adjustGroupState() {
|
|
10865
|
-
if (!__classPrivateFieldGet$
|
|
10866
|
-
__classPrivateFieldGet$
|
|
10867
|
-
!__classPrivateFieldGet$
|
|
10852
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_rows, "f") ||
|
|
10853
|
+
__classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f") === 0 ||
|
|
10854
|
+
!__classPrivateFieldGet$3(this, _KupDataTable_rows, "f")[0].hasOwnProperty('group')) {
|
|
10868
10855
|
// no grouping
|
|
10869
10856
|
return;
|
|
10870
10857
|
}
|
|
10871
|
-
__classPrivateFieldGet$
|
|
10858
|
+
__classPrivateFieldGet$3(this, _KupDataTable_rows, "f").forEach((r) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupStateFromRow).call(this, r));
|
|
10872
10859
|
}, _KupDataTable_adjustGroupStateFromRow = function _KupDataTable_adjustGroupStateFromRow(row) {
|
|
10873
10860
|
if (!row || !row.hasOwnProperty('group')) {
|
|
10874
10861
|
// not a groping row, nothing to do
|
|
@@ -10885,9 +10872,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10885
10872
|
// update expanded
|
|
10886
10873
|
group.expanded = groupFromState.expanded;
|
|
10887
10874
|
}
|
|
10888
|
-
group.children.forEach((child) => __classPrivateFieldGet$
|
|
10875
|
+
group.children.forEach((child) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupStateFromRow).call(this, child));
|
|
10889
10876
|
}, _KupDataTable_sortRows = function _KupDataTable_sortRows() {
|
|
10890
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.sortRows(__classPrivateFieldGet$
|
|
10877
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.sortRows(__classPrivateFieldGet$3(this, _KupDataTable_rows, "f"), this.sort), "f");
|
|
10891
10878
|
}, _KupDataTable_getSortIcon = function _KupDataTable_getSortIcon(columnName) {
|
|
10892
10879
|
// check if column in sort array
|
|
10893
10880
|
for (let sortObj of this.sort) {
|
|
@@ -10913,7 +10900,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10913
10900
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
10914
10901
|
colSpan += 1;
|
|
10915
10902
|
}
|
|
10916
|
-
if (__classPrivateFieldGet$
|
|
10903
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
10917
10904
|
colSpan += 1;
|
|
10918
10905
|
}
|
|
10919
10906
|
return colSpan;
|
|
@@ -10943,7 +10930,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10943
10930
|
sourceColumn: this.data.columns[sortedColIndex],
|
|
10944
10931
|
targetColumn: this.data.columns[receivingColIndex],
|
|
10945
10932
|
});
|
|
10946
|
-
__classPrivateFieldGet$
|
|
10933
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_moveSortedColumns).call(this, this.data.columns, receivingColIndex, sortedColIndex);
|
|
10947
10934
|
}
|
|
10948
10935
|
}, _KupDataTable_moveSortedColumns = function _KupDataTable_moveSortedColumns(columns, receivingColumnIndex, sortedColumnIndex) {
|
|
10949
10936
|
const remove = columns.splice(sortedColumnIndex, 1);
|
|
@@ -10956,25 +10943,25 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10956
10943
|
.map((chunk, index$1) => (index$1 !== 0 ? [index.h("br", null), chunk] : chunk));
|
|
10957
10944
|
}, _KupDataTable_composeHeaderCellClassAndStyle = function _KupDataTable_composeHeaderCellClassAndStyle(columnIndex, extraCells = 0, column) {
|
|
10958
10945
|
let columnClass = { ['header-cell']: true }, thStyle = column.style ? Object.assign({}, column.style) : {};
|
|
10959
|
-
if (__classPrivateFieldGet$
|
|
10960
|
-
__classPrivateFieldGet$
|
|
10961
|
-
__classPrivateFieldGet$
|
|
10962
|
-
__classPrivateFieldGet$
|
|
10963
|
-
__classPrivateFieldGet$
|
|
10964
|
-
__classPrivateFieldGet$
|
|
10965
|
-
__classPrivateFieldGet$
|
|
10966
|
-
__classPrivateFieldGet$
|
|
10967
|
-
__classPrivateFieldGet$
|
|
10946
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isBar(column.obj) ||
|
|
10947
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isButton(column.obj) ||
|
|
10948
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isChart(column.obj) ||
|
|
10949
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isCheckbox(column.obj) ||
|
|
10950
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isImage(column.obj) ||
|
|
10951
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isIcon(column.obj) ||
|
|
10952
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isProgressBar(column.obj) ||
|
|
10953
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isRadio(column.obj) ||
|
|
10954
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isVoCodver(column.obj)) {
|
|
10968
10955
|
columnClass['header-cell--centered'] = true;
|
|
10969
10956
|
}
|
|
10970
|
-
if (__classPrivateFieldGet$
|
|
10957
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isNumber(column.obj)) {
|
|
10971
10958
|
columnClass['header-cell--is-number'] = true;
|
|
10972
10959
|
}
|
|
10973
|
-
if (__classPrivateFieldGet$
|
|
10960
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isIcon(column.obj)) {
|
|
10974
10961
|
columnClass['header-cell--is-icon'] = true;
|
|
10975
10962
|
}
|
|
10976
10963
|
// For fixed cells styles and classes
|
|
10977
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
10964
|
+
const fixedCellStyle = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, columnIndex + 1 + extraCells, 0, extraCells);
|
|
10978
10965
|
if (fixedCellStyle) {
|
|
10979
10966
|
columnClass = Object.assign(Object.assign({}, columnClass), fixedCellStyle.fixedCellClasses);
|
|
10980
10967
|
thStyle = Object.assign(Object.assign({}, thStyle), fixedCellStyle.fixedCellStyle);
|
|
@@ -10989,24 +10976,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10989
10976
|
let multiSelectColumn = null;
|
|
10990
10977
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
10991
10978
|
specialExtraCellsCount++;
|
|
10992
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
10979
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
10993
10980
|
const style = Object.assign({ width: '30px', margin: '0 auto' }, (selectionStyleAndClass
|
|
10994
10981
|
? selectionStyleAndClass.fixedCellStyle
|
|
10995
10982
|
: {}));
|
|
10996
10983
|
multiSelectColumn = (index.h("th", { class: selectionStyleAndClass
|
|
10997
10984
|
? selectionStyleAndClass.fixedCellClasses
|
|
10998
|
-
: {}, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$
|
|
10985
|
+
: {}, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onSelectAll).call(this, e), title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.SELECTED) +
|
|
10999
10986
|
`: ${this.selectedRows.length},` +
|
|
11000
|
-
__classPrivateFieldGet$
|
|
11001
|
-
`: ${__classPrivateFieldGet$
|
|
10987
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.RENDERED) +
|
|
10988
|
+
`: ${__classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f").length}`, checked: this.selectedRows.length > 0 &&
|
|
11002
10989
|
this.selectedRows.length ===
|
|
11003
|
-
__classPrivateFieldGet$
|
|
10990
|
+
__classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f").length })));
|
|
11004
10991
|
}
|
|
11005
10992
|
// Renders action column
|
|
11006
10993
|
let actionsColumn = null;
|
|
11007
|
-
if (__classPrivateFieldGet$
|
|
10994
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11008
10995
|
specialExtraCellsCount++;
|
|
11009
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
10996
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
11010
10997
|
actionsColumn = (index.h("th", { class: selectionStyleAndClass
|
|
11011
10998
|
? selectionStyleAndClass.fixedCellClasses
|
|
11012
10999
|
: {}, style: selectionStyleAndClass
|
|
@@ -11015,26 +11002,26 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11015
11002
|
}
|
|
11016
11003
|
// Renders normal cells
|
|
11017
11004
|
const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
|
|
11018
|
-
const { columnClass, thStyle } = __classPrivateFieldGet$
|
|
11005
|
+
const { columnClass, thStyle } = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeHeaderCellClassAndStyle).call(this, columnIndex, specialExtraCellsCount, column);
|
|
11019
11006
|
let filter = null;
|
|
11020
|
-
if (__classPrivateFieldGet$
|
|
11021
|
-
const svgLabel = __classPrivateFieldGet$
|
|
11007
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_filtersColumnMenuInstance, "f").hasFiltersForColumn(this.filters, column)) {
|
|
11008
|
+
const svgLabel = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.REMOVE_FILTERS) + `: '${__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getFilterValueForTooltip).call(this, column)}'`;
|
|
11022
11009
|
filter = (index.h("span", { title: svgLabel, class: `kup-icon ${kupManager.KupThemeIconValues.FILTER_REMOVE.replace('--', '')}` }));
|
|
11023
11010
|
}
|
|
11024
11011
|
let sortIcon = null;
|
|
11025
|
-
let iconClass = __classPrivateFieldGet$
|
|
11012
|
+
let iconClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getSortIcon).call(this, column.name);
|
|
11026
11013
|
if (iconClass !== '') {
|
|
11027
|
-
sortIcon = (index.h("span", { class: iconClass, title: __classPrivateFieldGet$
|
|
11014
|
+
sortIcon = (index.h("span", { class: iconClass, title: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getSortDecode).call(this, column.name) }));
|
|
11028
11015
|
}
|
|
11029
11016
|
columnClass['header-cell--sortable'] = true;
|
|
11030
11017
|
let keyIcon = null;
|
|
11031
11018
|
if (column.isKey) {
|
|
11032
|
-
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$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.KEY) }));
|
|
11033
11020
|
}
|
|
11034
11021
|
// Sets custom columns width
|
|
11035
|
-
if (__classPrivateFieldGet$
|
|
11036
|
-
for (let i = 0; i < __classPrivateFieldGet$
|
|
11037
|
-
const currentCol = __classPrivateFieldGet$
|
|
11022
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")) {
|
|
11023
|
+
for (let i = 0; i < __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f").length; i++) {
|
|
11024
|
+
const currentCol = __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")[i];
|
|
11038
11025
|
if (currentCol.name === column.name) {
|
|
11039
11026
|
const width = currentCol.size + '';
|
|
11040
11027
|
if (width.indexOf('ch') < 1) {
|
|
@@ -11047,7 +11034,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11047
11034
|
}
|
|
11048
11035
|
}
|
|
11049
11036
|
}
|
|
11050
|
-
return (index.h("th", { ref: (el) => __classPrivateFieldGet$
|
|
11037
|
+
return (index.h("th", { ref: (el) => __classPrivateFieldGet$3(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$3(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));
|
|
11051
11038
|
});
|
|
11052
11039
|
return [multiSelectColumn, actionsColumn, ...dataColumns];
|
|
11053
11040
|
// return [multiSelectColumn, groupColumn, actionsColumn, ...dataColumns];
|
|
@@ -11056,24 +11043,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11056
11043
|
let multiSelectColumn = null;
|
|
11057
11044
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11058
11045
|
specialExtraCellsCount++;
|
|
11059
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11046
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
11060
11047
|
const style = Object.assign({ width: '30px', margin: '0 auto' }, (selectionStyleAndClass
|
|
11061
11048
|
? selectionStyleAndClass.fixedCellStyle
|
|
11062
11049
|
: {}));
|
|
11063
11050
|
multiSelectColumn = (index.h("th-sticky", { class: selectionStyleAndClass
|
|
11064
11051
|
? selectionStyleAndClass.fixedCellClasses
|
|
11065
|
-
: 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$3(this, _KupDataTable_instances, "m", _KupDataTable_onSelectAll).call(this, e), title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.SELECTED) +
|
|
11066
11053
|
`: ${this.selectedRows.length},` +
|
|
11067
|
-
__classPrivateFieldGet$
|
|
11068
|
-
`: ${__classPrivateFieldGet$
|
|
11054
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.RENDERED) +
|
|
11055
|
+
`: ${__classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f").length}`, checked: this.selectedRows.length > 0 &&
|
|
11069
11056
|
this.selectedRows.length ===
|
|
11070
|
-
__classPrivateFieldGet$
|
|
11057
|
+
__classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f").length })));
|
|
11071
11058
|
}
|
|
11072
11059
|
// Empty cell for the actions
|
|
11073
11060
|
let actionsColumn = null;
|
|
11074
|
-
if (__classPrivateFieldGet$
|
|
11061
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11075
11062
|
specialExtraCellsCount++;
|
|
11076
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11063
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
11077
11064
|
actionsColumn = (index.h("th-sticky", { class: selectionStyleAndClass
|
|
11078
11065
|
? selectionStyleAndClass.fixedCellClasses
|
|
11079
11066
|
: null, style: selectionStyleAndClass
|
|
@@ -11082,29 +11069,29 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11082
11069
|
}
|
|
11083
11070
|
// Composes normal header cells
|
|
11084
11071
|
const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
|
|
11085
|
-
const { columnClass, thStyle } = __classPrivateFieldGet$
|
|
11086
|
-
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$3(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$3(this, _KupDataTable_instances, "m", _KupDataTable_applyLineBreaks).call(this, column.title)))));
|
|
11087
11074
|
});
|
|
11088
11075
|
return [multiSelectColumn, actionsColumn, ...dataColumns];
|
|
11089
11076
|
}, _KupDataTable_totalMenuPosition = function _KupDataTable_totalMenuPosition() {
|
|
11090
11077
|
if (this.rootElement.shadowRoot) {
|
|
11091
11078
|
const menu = this.rootElement.shadowRoot.querySelector('#totals-menu');
|
|
11092
11079
|
if (menu) {
|
|
11093
|
-
__classPrivateFieldGet$
|
|
11080
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.register(menu, __classPrivateFieldGet$3(this, _KupDataTable_totalMenuCoords, "f"));
|
|
11094
11081
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCb, {
|
|
11095
11082
|
cb: () => {
|
|
11096
|
-
__classPrivateFieldGet$
|
|
11083
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
11097
11084
|
},
|
|
11098
11085
|
el: menu,
|
|
11099
11086
|
}, "f");
|
|
11100
|
-
__classPrivateFieldGet$
|
|
11101
|
-
__classPrivateFieldGet$
|
|
11087
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCb, "f"), true);
|
|
11088
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.start(menu);
|
|
11102
11089
|
menu.menuVisible = true;
|
|
11103
11090
|
}
|
|
11104
11091
|
}
|
|
11105
11092
|
}, _KupDataTable_onTotalMenuOpen = function _KupDataTable_onTotalMenuOpen(column) {
|
|
11106
|
-
__classPrivateFieldGet$
|
|
11107
|
-
__classPrivateFieldGet$
|
|
11093
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
11094
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_openTotalMenu).call(this, column);
|
|
11108
11095
|
}, _KupDataTable_renderRow = function _KupDataTable_renderRow(row, level = 0, rowCssIndex = 0, previousRow) {
|
|
11109
11096
|
const visibleColumns = this.getVisibleColumns();
|
|
11110
11097
|
let rowActionsCount = 0;
|
|
@@ -11136,17 +11123,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11136
11123
|
for (let i = 0; i < level; i++) {
|
|
11137
11124
|
indent.push(index.h("span", { class: "indent" }));
|
|
11138
11125
|
}
|
|
11139
|
-
if (__classPrivateFieldGet$
|
|
11126
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)) {
|
|
11140
11127
|
//const colSpan = this.multiSelection ? 2 : 1;
|
|
11141
11128
|
const cells = [];
|
|
11142
|
-
if (__classPrivateFieldGet$
|
|
11129
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11143
11130
|
cells.push(index.h("td", null));
|
|
11144
11131
|
}
|
|
11145
11132
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11146
11133
|
cells.push(index.h("td", null));
|
|
11147
11134
|
}
|
|
11148
11135
|
// adding 'grouping' cell
|
|
11149
|
-
const grouplabelcell = (index.h("td", { colSpan: __classPrivateFieldGet$
|
|
11136
|
+
const grouplabelcell = (index.h("td", { colSpan: __classPrivateFieldGet$3(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))));
|
|
11150
11137
|
// adding 'totals grouping' cells
|
|
11151
11138
|
for (let column of visibleColumns) {
|
|
11152
11139
|
let totalClass = 'total';
|
|
@@ -11161,11 +11148,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11161
11148
|
value = totalValue;
|
|
11162
11149
|
}
|
|
11163
11150
|
else {
|
|
11164
|
-
if (__classPrivateFieldGet$
|
|
11151
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
11165
11152
|
if (totalValue) {
|
|
11166
|
-
if (__classPrivateFieldGet$
|
|
11153
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dates.isValid(totalValue, kupManager.KupDatesFormats.ISO_DATE)) {
|
|
11167
11154
|
value =
|
|
11168
|
-
__classPrivateFieldGet$
|
|
11155
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dates.format(totalValue);
|
|
11169
11156
|
}
|
|
11170
11157
|
else {
|
|
11171
11158
|
console.warn(`invalid date: ${totalValue}`);
|
|
@@ -11178,18 +11165,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11178
11165
|
}
|
|
11179
11166
|
cells.push(index.h("td", { class: totalClass }, value));
|
|
11180
11167
|
}
|
|
11181
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11182
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11168
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group group-label" }, grouplabelcell));
|
|
11169
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group group-total" }, cells));
|
|
11183
11170
|
}
|
|
11184
11171
|
else {
|
|
11185
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11172
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group" }, index.h("td", { colSpan: __classPrivateFieldGet$3(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)))));
|
|
11186
11173
|
}
|
|
11187
11174
|
// if group is expanded, add children
|
|
11188
|
-
if (__classPrivateFieldGet$
|
|
11175
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGroupExpanded).call(this, row)) {
|
|
11189
11176
|
row.group.children
|
|
11190
11177
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
11191
11178
|
// When the column has specified the parameter hideValuesRepetitions
|
|
11192
|
-
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$
|
|
11179
|
+
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, level + 1, groupRowIndex, groupRowIndex > 0
|
|
11193
11180
|
? currentArray[groupRowIndex - 1]
|
|
11194
11181
|
: undefined))
|
|
11195
11182
|
.forEach((jsxRow) => {
|
|
@@ -11216,11 +11203,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11216
11203
|
let selectRowCell = null;
|
|
11217
11204
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11218
11205
|
specialExtraCellsCount++;
|
|
11219
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11206
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, rowCssIndex, specialExtraCellsCount - 1);
|
|
11220
11207
|
const props = {
|
|
11221
11208
|
checked: this.selectedRows.includes(row),
|
|
11222
11209
|
onChange: () => {
|
|
11223
|
-
__classPrivateFieldGet$
|
|
11210
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleRowSelect).call(this, row);
|
|
11224
11211
|
},
|
|
11225
11212
|
};
|
|
11226
11213
|
selectRowCell = (index.h("td", { "row-select-cell": true, class: selectionStyleAndClass
|
|
@@ -11232,18 +11219,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11232
11219
|
// Renders action cell
|
|
11233
11220
|
// If active, this can be either the first or second cell
|
|
11234
11221
|
let rowActionsCell = null;
|
|
11235
|
-
if (__classPrivateFieldGet$
|
|
11222
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11236
11223
|
// Increments
|
|
11237
11224
|
specialExtraCellsCount++;
|
|
11238
|
-
const actionsStyleAndClass = __classPrivateFieldGet$
|
|
11225
|
+
const actionsStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, rowCssIndex, specialExtraCellsCount - 1);
|
|
11239
11226
|
rowActionsCount += this.rowActions.length;
|
|
11240
|
-
const defaultRowActions = __classPrivateFieldGet$
|
|
11227
|
+
const defaultRowActions = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderActions).call(this, this.rowActions, row, 'default');
|
|
11241
11228
|
let rowActionExpander = null;
|
|
11242
11229
|
let variableActions = null;
|
|
11243
11230
|
if (row.actions) {
|
|
11244
11231
|
rowActionsCount += row.actions.length;
|
|
11245
11232
|
// adding variable actions
|
|
11246
|
-
variableActions = __classPrivateFieldGet$
|
|
11233
|
+
variableActions = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderActions).call(this, row.actions, row, 'variable');
|
|
11247
11234
|
}
|
|
11248
11235
|
else {
|
|
11249
11236
|
// adding expander
|
|
@@ -11252,10 +11239,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11252
11239
|
resource: 'chevron-right',
|
|
11253
11240
|
sizeX: '1.5em',
|
|
11254
11241
|
sizeY: '1.5em',
|
|
11255
|
-
title: __classPrivateFieldGet$
|
|
11242
|
+
title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPAND),
|
|
11256
11243
|
wrapperClass: 'expander',
|
|
11257
11244
|
onClick: (e) => {
|
|
11258
|
-
__classPrivateFieldGet$
|
|
11245
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onRowActionExpanderClick).call(this, e, row);
|
|
11259
11246
|
},
|
|
11260
11247
|
};
|
|
11261
11248
|
rowActionsCount++;
|
|
@@ -11304,18 +11291,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11304
11291
|
let cellClass = null;
|
|
11305
11292
|
let cellStyle = Object.assign({}, cell.style);
|
|
11306
11293
|
//-- For fixed cells --
|
|
11307
|
-
const fixedStyles = __classPrivateFieldGet$
|
|
11294
|
+
const fixedStyles = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, cellIndex + 1 + specialExtraCellsCount, rowCssIndex, specialExtraCellsCount);
|
|
11308
11295
|
if (fixedStyles) {
|
|
11309
11296
|
cellStyle = Object.assign(cellStyle ? cellStyle : {}, fixedStyles.fixedCellStyle);
|
|
11310
11297
|
cellClass = Object.assign(Object.assign({}, cellClass), fixedStyles.fixedCellClasses);
|
|
11311
11298
|
}
|
|
11312
11299
|
// Controls if there are columns with a specified width
|
|
11313
|
-
if (__classPrivateFieldGet$
|
|
11300
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")) {
|
|
11314
11301
|
let colWidth = '';
|
|
11315
11302
|
// Search if this column has a specified width
|
|
11316
|
-
for (let j = 0; j < __classPrivateFieldGet$
|
|
11317
|
-
if (name === __classPrivateFieldGet$
|
|
11318
|
-
colWidth = __classPrivateFieldGet$
|
|
11303
|
+
for (let j = 0; j < __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f").length; j++) {
|
|
11304
|
+
if (name === __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")[j].name) {
|
|
11305
|
+
colWidth = __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")[j].size;
|
|
11319
11306
|
break;
|
|
11320
11307
|
}
|
|
11321
11308
|
}
|
|
@@ -11337,7 +11324,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11337
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));
|
|
11338
11325
|
});
|
|
11339
11326
|
// adding row to rendered rows
|
|
11340
|
-
__classPrivateFieldGet$
|
|
11327
|
+
__classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f").push(row);
|
|
11341
11328
|
const rowClass = {
|
|
11342
11329
|
selected: this.selectedRows.includes(row),
|
|
11343
11330
|
};
|
|
@@ -11347,7 +11334,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11347
11334
|
const style = {
|
|
11348
11335
|
'--kup_datatable_row_actions': rowActionsCount,
|
|
11349
11336
|
};
|
|
11350
|
-
return (index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11337
|
+
return (index.h("tr", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: rowClass, style: style }, selectRowCell, rowActionsCell, cells));
|
|
11351
11338
|
}
|
|
11352
11339
|
}, _KupDataTable_renderActions = function _KupDataTable_renderActions(actions, row, type) {
|
|
11353
11340
|
return actions.map((action, index$1) => {
|
|
@@ -11358,7 +11345,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11358
11345
|
sizeY: '1.5em',
|
|
11359
11346
|
title: action.text,
|
|
11360
11347
|
wrapperClass: 'action',
|
|
11361
|
-
onClick: () => __classPrivateFieldGet$
|
|
11348
|
+
onClick: () => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onDefaultRowActionClick).call(this, {
|
|
11362
11349
|
action,
|
|
11363
11350
|
row,
|
|
11364
11351
|
index: index$1,
|
|
@@ -11369,58 +11356,58 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11369
11356
|
});
|
|
11370
11357
|
}, _KupDataTable_onCustomSettingsClick = function _KupDataTable_onCustomSettingsClick() {
|
|
11371
11358
|
if (!this.openedCustomSettings) {
|
|
11372
|
-
__classPrivateFieldGet$
|
|
11359
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_openCustomSettings).call(this);
|
|
11373
11360
|
}
|
|
11374
11361
|
else {
|
|
11375
|
-
__classPrivateFieldGet$
|
|
11362
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
11376
11363
|
}
|
|
11377
11364
|
}, _KupDataTable_openCustomSettings = function _KupDataTable_openCustomSettings() {
|
|
11378
|
-
__classPrivateFieldGet$
|
|
11379
|
-
__classPrivateFieldGet$
|
|
11380
|
-
__classPrivateFieldGet$
|
|
11365
|
+
__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f").menuVisible = true;
|
|
11366
|
+
__classPrivateFieldGet$3(this, _KupDataTable_customizeTopButtonRef, "f").classList.add('toggled');
|
|
11367
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f"));
|
|
11381
11368
|
this.openedCustomSettings = true;
|
|
11382
|
-
if (!__classPrivateFieldGet$
|
|
11369
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_clickCbCustomPanel, "f")) {
|
|
11383
11370
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCbCustomPanel, {
|
|
11384
11371
|
cb: () => {
|
|
11385
|
-
__classPrivateFieldGet$
|
|
11372
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
11386
11373
|
},
|
|
11387
|
-
el: __classPrivateFieldGet$
|
|
11374
|
+
el: __classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f"),
|
|
11388
11375
|
}, "f");
|
|
11389
11376
|
}
|
|
11390
|
-
__classPrivateFieldGet$
|
|
11377
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCbCustomPanel, "f"), true);
|
|
11391
11378
|
}, _KupDataTable_closeCustomSettings = function _KupDataTable_closeCustomSettings() {
|
|
11392
|
-
__classPrivateFieldGet$
|
|
11393
|
-
if (__classPrivateFieldGet$
|
|
11379
|
+
__classPrivateFieldGet$3(this, _KupDataTable_customizeTopButtonRef, "f").classList.remove('toggled');
|
|
11380
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f") == null) {
|
|
11394
11381
|
return;
|
|
11395
11382
|
}
|
|
11396
|
-
__classPrivateFieldGet$
|
|
11383
|
+
__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f").menuVisible = false;
|
|
11397
11384
|
this.openedCustomSettings = false;
|
|
11398
|
-
__classPrivateFieldGet$
|
|
11385
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCbCustomPanel, "f"));
|
|
11399
11386
|
}, _KupDataTable_renderPaginator = function _KupDataTable_renderPaginator(top) {
|
|
11400
11387
|
return (index.h("div", { class: "paginator-wrapper" }, index.h("div", { class: "paginator-tabs" }, this.showLoadMore ||
|
|
11401
11388
|
(!this.lazyLoadRows &&
|
|
11402
|
-
__classPrivateFieldGet$
|
|
11389
|
+
__classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f") > this.rowsPerPage) ? (index.h(fPaginatorUtils.FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f"), perPage: this.currentRowsPerPage
|
|
11403
11390
|
? this.currentRowsPerPage
|
|
11404
11391
|
: this.rowsPerPage, onLoadMore: this.showLoadMore
|
|
11405
11392
|
? () => {
|
|
11406
|
-
__classPrivateFieldGet$
|
|
11393
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onLoadMoreClick).call(this);
|
|
11407
11394
|
}
|
|
11408
|
-
: null, onNextPage: () => __classPrivateFieldGet$
|
|
11395
|
+
: null, onNextPage: () => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, this.currentPage + 1), onPrevPage: () => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, this.currentPage - 1), onPageChange: (e) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, e.detail.value), onRowsChange: (e) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleRowsPerPageChange).call(this, e.detail.value) })) : null)));
|
|
11409
11396
|
}, _KupDataTable_columnRemoveArea = function _KupDataTable_columnRemoveArea() {
|
|
11410
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" })));
|
|
11411
11398
|
}, _KupDataTable_columnGroupArea = function _KupDataTable_columnGroupArea() {
|
|
11412
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" })));
|
|
11413
11400
|
}, _KupDataTable_hideShowColumnDropArea = function _KupDataTable_hideShowColumnDropArea(show, th) {
|
|
11414
11401
|
if (show && th && (this.removableColumns || this.showGroups)) {
|
|
11415
|
-
__classPrivateFieldGet$
|
|
11416
|
-
__classPrivateFieldGet$
|
|
11417
|
-
__classPrivateFieldGet$
|
|
11418
|
-
__classPrivateFieldGet$
|
|
11419
|
-
th.clientWidth / 2 - __classPrivateFieldGet$
|
|
11402
|
+
__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f").classList.add('droparea--visible');
|
|
11403
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f"), th, 10, kupManager.KupDynamicPositionPlacement.TOP);
|
|
11404
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f"));
|
|
11405
|
+
__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f").style.marginLeft =
|
|
11406
|
+
th.clientWidth / 2 - __classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f").clientWidth / 2 + 'px';
|
|
11420
11407
|
}
|
|
11421
11408
|
else {
|
|
11422
|
-
__classPrivateFieldGet$
|
|
11423
|
-
+__classPrivateFieldGet$
|
|
11409
|
+
__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f").classList.remove('droparea--visible');
|
|
11410
|
+
+__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f"));
|
|
11424
11411
|
}
|
|
11425
11412
|
}, _KupDataTable_handleColumnGroup = function _KupDataTable_handleColumnGroup(column2group) {
|
|
11426
11413
|
// Get sorted column current position
|
|
@@ -11488,19 +11475,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11488
11475
|
icon: icons[i],
|
|
11489
11476
|
id: codes[i],
|
|
11490
11477
|
selected: selectedCode == codes[i],
|
|
11491
|
-
value: __classPrivateFieldGet$
|
|
11478
|
+
value: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(value),
|
|
11492
11479
|
};
|
|
11493
11480
|
}
|
|
11494
11481
|
}
|
|
11495
11482
|
return listItems;
|
|
11496
11483
|
}, _KupDataTable_getFontSizeCodeFromDecode = function _KupDataTable_getFontSizeCodeFromDecode(decode) {
|
|
11497
|
-
return __classPrivateFieldGet$
|
|
11484
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$3(this, _KupDataTable_FONTSIZE_DECODES, "f"), __classPrivateFieldGet$3(this, _KupDataTable_FONTSIZE_CODES, "f"));
|
|
11498
11485
|
}, _KupDataTable_renderFontSizePanel = function _KupDataTable_renderFontSizePanel() {
|
|
11499
|
-
const listItems = __classPrivateFieldGet$
|
|
11486
|
+
const listItems = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, __classPrivateFieldGet$3(this, _KupDataTable_FONTSIZE_CODES, "f"), __classPrivateFieldGet$3(this, _KupDataTable_FONTSIZE_ICONS, "f"), this.fontsize);
|
|
11500
11487
|
const listData = { data: listItems, showIcons: true };
|
|
11501
11488
|
const textfieldData = {
|
|
11502
11489
|
trailingIcon: true,
|
|
11503
|
-
label: __classPrivateFieldGet$
|
|
11490
|
+
label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageFontsize.LABEL),
|
|
11504
11491
|
icon: 'arrow_drop_down',
|
|
11505
11492
|
};
|
|
11506
11493
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11517,22 +11504,22 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11517
11504
|
text = kupManager.KupLanguageFontsize.SMALL;
|
|
11518
11505
|
break;
|
|
11519
11506
|
}
|
|
11520
|
-
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$3(this, _KupDataTable_kupManager, "f").language.translate(text), "onkup-combobox-itemclick": (e) => {
|
|
11521
11508
|
e.stopPropagation();
|
|
11522
|
-
this.fontsize = __classPrivateFieldGet$
|
|
11509
|
+
this.fontsize = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getFontSizeCodeFromDecode).call(this, e.detail.node.id);
|
|
11523
11510
|
} })));
|
|
11524
11511
|
}, _KupDataTable_getDensityCodeFromDecode = function _KupDataTable_getDensityCodeFromDecode(decode) {
|
|
11525
|
-
return __classPrivateFieldGet$
|
|
11512
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$3(this, _KupDataTable_DENSITY_DECODES, "f"), [
|
|
11526
11513
|
'dense',
|
|
11527
11514
|
'medium',
|
|
11528
11515
|
'wide',
|
|
11529
11516
|
]);
|
|
11530
11517
|
}, _KupDataTable_renderDensityPanel = function _KupDataTable_renderDensityPanel() {
|
|
11531
|
-
const listItems = __classPrivateFieldGet$
|
|
11518
|
+
const listItems = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, ['dense', 'medium', 'wide'], __classPrivateFieldGet$3(this, _KupDataTable_DENSITY_ICONS, "f"), this.density);
|
|
11532
11519
|
const listData = { data: listItems, showIcons: true };
|
|
11533
11520
|
const textfieldData = {
|
|
11534
11521
|
trailingIcon: true,
|
|
11535
|
-
label: __classPrivateFieldGet$
|
|
11522
|
+
label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageDensity.LABEL),
|
|
11536
11523
|
icon: 'arrow_drop_down',
|
|
11537
11524
|
};
|
|
11538
11525
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11549,14 +11536,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11549
11536
|
text = kupManager.KupLanguageDensity.WIDE;
|
|
11550
11537
|
break;
|
|
11551
11538
|
}
|
|
11552
|
-
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$3(this, _KupDataTable_kupManager, "f").language.translate(text), selectMode: fCell.ItemsDisplayMode.DESCRIPTION, data: data, "onkup-combobox-itemclick": (e) => {
|
|
11553
11540
|
e.stopPropagation();
|
|
11554
|
-
this.density = __classPrivateFieldGet$
|
|
11541
|
+
this.density = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getDensityCodeFromDecode).call(this, e.detail.node.id);
|
|
11555
11542
|
} })));
|
|
11556
11543
|
}, _KupDataTable_getGridCodeFromDecode = function _KupDataTable_getGridCodeFromDecode(decode) {
|
|
11557
|
-
return __classPrivateFieldGet$
|
|
11544
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$3(this, _KupDataTable_GRID_DECODES, "f"), __classPrivateFieldGet$3(this, _KupDataTable_GRID_CODES, "f"));
|
|
11558
11545
|
}, _KupDataTable_renderTransposeSwitch = function _KupDataTable_renderTransposeSwitch() {
|
|
11559
|
-
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$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TRANSPOSE_DATA), leadingLabel: true, "onkup-switch-change": (e) => {
|
|
11560
11547
|
e.stopPropagation();
|
|
11561
11548
|
if (e.detail.value === 'on') {
|
|
11562
11549
|
this.transpose = true;
|
|
@@ -11566,16 +11553,16 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11566
11553
|
}
|
|
11567
11554
|
} })));
|
|
11568
11555
|
}, _KupDataTable_renderTotalsMatrix = function _KupDataTable_renderTotalsMatrix() {
|
|
11569
|
-
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$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TOTALS_TABLE) +
|
|
11570
11557
|
' (' +
|
|
11571
|
-
__classPrivateFieldGet$
|
|
11572
|
-
')', label: __classPrivateFieldGet$
|
|
11558
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
11559
|
+
')', label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TOTALS_TABLE), icon: "exposure", "onkup-button-click": () => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_switchToTotalsMatrix).call(this) })));
|
|
11573
11560
|
}, _KupDataTable_renderGridPanel = function _KupDataTable_renderGridPanel() {
|
|
11574
|
-
const listItems = __classPrivateFieldGet$
|
|
11561
|
+
const listItems = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, __classPrivateFieldGet$3(this, _KupDataTable_GRID_CODES, "f"), __classPrivateFieldGet$3(this, _KupDataTable_GRID_ICONS, "f"), this.showGrid);
|
|
11575
11562
|
const listData = { data: listItems, showIcons: true };
|
|
11576
11563
|
const textfieldData = {
|
|
11577
11564
|
trailingIcon: true,
|
|
11578
|
-
label: __classPrivateFieldGet$
|
|
11565
|
+
label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGrid.LABEL),
|
|
11579
11566
|
icon: 'arrow_drop_down',
|
|
11580
11567
|
};
|
|
11581
11568
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11595,9 +11582,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11595
11582
|
text = kupManager.KupLanguageGrid.ROW;
|
|
11596
11583
|
break;
|
|
11597
11584
|
}
|
|
11598
|
-
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$3(this, _KupDataTable_kupManager, "f").language.translate(text), data: data, "onkup-combobox-itemclick": (e) => {
|
|
11599
11586
|
e.stopPropagation();
|
|
11600
|
-
const grid = __classPrivateFieldGet$
|
|
11587
|
+
const grid = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getGridCodeFromDecode).call(this, e.detail.value);
|
|
11601
11588
|
this.showGrid = grid;
|
|
11602
11589
|
} })));
|
|
11603
11590
|
};
|
|
@@ -12001,7 +11988,7 @@ var KupDialogProps;
|
|
|
12001
11988
|
|
|
12002
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}";
|
|
12003
11990
|
|
|
12004
|
-
var __classPrivateFieldGet$
|
|
11991
|
+
var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12005
11992
|
if (kind === "a" && !f)
|
|
12006
11993
|
throw new TypeError("Private accessor was defined without a getter");
|
|
12007
11994
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -12084,12 +12071,12 @@ const KupDialog = class {
|
|
|
12084
12071
|
/* L i f e c y c l e H o o k s */
|
|
12085
12072
|
/*-------------------------------------------------*/
|
|
12086
12073
|
componentWillLoad() {
|
|
12087
|
-
__classPrivateFieldGet$
|
|
12088
|
-
__classPrivateFieldGet$
|
|
12074
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").debug.logLoad(this, false);
|
|
12075
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").theme.register(this);
|
|
12089
12076
|
}
|
|
12090
12077
|
componentDidLoad() {
|
|
12091
12078
|
var _a;
|
|
12092
|
-
__classPrivateFieldGet$
|
|
12079
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").interact.dialogify(this.rootElement, __classPrivateFieldGet$2(this, _KupDialog_header, "f") ? __classPrivateFieldGet$2(this, _KupDialog_header, "f") : null, !this.resizable);
|
|
12093
12080
|
if ((_a = this.autoCenter) === null || _a === void 0 ? void 0 : _a.onReady) {
|
|
12094
12081
|
this.recalcPosition().then(() => {
|
|
12095
12082
|
this.rootElement.removeAttribute('fade-in');
|
|
@@ -12099,7 +12086,7 @@ const KupDialog = class {
|
|
|
12099
12086
|
this.rootElement.removeAttribute('fade-in');
|
|
12100
12087
|
}
|
|
12101
12088
|
if (this.modal) {
|
|
12102
|
-
__classPrivateFieldGet$
|
|
12089
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").interact.showModalBackdrop(this.modal.closeOnBackdropClick
|
|
12103
12090
|
? () => {
|
|
12104
12091
|
this.close();
|
|
12105
12092
|
}
|
|
@@ -12109,13 +12096,13 @@ const KupDialog = class {
|
|
|
12109
12096
|
comp: this,
|
|
12110
12097
|
id: this.rootElement.id,
|
|
12111
12098
|
});
|
|
12112
|
-
__classPrivateFieldGet$
|
|
12099
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").debug.logLoad(this, true);
|
|
12113
12100
|
}
|
|
12114
12101
|
componentWillRender() {
|
|
12115
|
-
__classPrivateFieldGet$
|
|
12102
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").debug.logRender(this, false);
|
|
12116
12103
|
}
|
|
12117
12104
|
componentDidRender() {
|
|
12118
|
-
__classPrivateFieldGet$
|
|
12105
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").debug.logRender(this, true);
|
|
12119
12106
|
}
|
|
12120
12107
|
render() {
|
|
12121
12108
|
var _a;
|
|
@@ -12123,13 +12110,13 @@ const KupDialog = class {
|
|
|
12123
12110
|
'--kup_dialog_height': this.sizeY ? this.sizeY : 'auto',
|
|
12124
12111
|
'--kup_dialog_width': this.sizeX ? this.sizeX : 'auto',
|
|
12125
12112
|
};
|
|
12126
|
-
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$2(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)))));
|
|
12127
12114
|
}
|
|
12128
12115
|
disconnectedCallback() {
|
|
12129
12116
|
if (this.modal) {
|
|
12130
|
-
__classPrivateFieldGet$
|
|
12117
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").interact.hideModalBackdrop();
|
|
12131
12118
|
}
|
|
12132
|
-
__classPrivateFieldGet$
|
|
12119
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").theme.unregister(this);
|
|
12133
12120
|
}
|
|
12134
12121
|
get rootElement() { return index.getElement(this); }
|
|
12135
12122
|
};
|
|
@@ -14108,6 +14095,7 @@ const KupImage = class {
|
|
|
14108
14095
|
constructor(hostRef) {
|
|
14109
14096
|
index.registerInstance(this, hostRef);
|
|
14110
14097
|
this.kupClick = index.createEvent(this, "kup-image-click", 6);
|
|
14098
|
+
this.kupLoad = index.createEvent(this, "kup-image-load", 6);
|
|
14111
14099
|
/**
|
|
14112
14100
|
* True when the resource is an URL.
|
|
14113
14101
|
*/
|
|
@@ -14133,6 +14121,13 @@ const KupImage = class {
|
|
|
14133
14121
|
el: e.target,
|
|
14134
14122
|
});
|
|
14135
14123
|
}
|
|
14124
|
+
onKupLoad(e) {
|
|
14125
|
+
this.kupLoad.emit({
|
|
14126
|
+
comp: this,
|
|
14127
|
+
id: this.rootElement.id,
|
|
14128
|
+
el: e.target,
|
|
14129
|
+
});
|
|
14130
|
+
}
|
|
14136
14131
|
/*-------------------------------------------------*/
|
|
14137
14132
|
/* P u b l i c M e t h o d s */
|
|
14138
14133
|
/*-------------------------------------------------*/
|
|
@@ -14212,6 +14207,7 @@ const KupImage = class {
|
|
|
14212
14207
|
sizeX: this.sizeX,
|
|
14213
14208
|
sizeY: this.sizeY,
|
|
14214
14209
|
onClick: (e) => this.onKupClick(e),
|
|
14210
|
+
onLoad: (e) => this.onKupLoad(e),
|
|
14215
14211
|
};
|
|
14216
14212
|
let elStyle = {
|
|
14217
14213
|
height: props.sizeY,
|
|
@@ -14244,9 +14240,9 @@ const KupImage = class {
|
|
|
14244
14240
|
};
|
|
14245
14241
|
KupImage.style = kupImageCss;
|
|
14246
14242
|
|
|
14247
|
-
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(
|
|
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)}";
|
|
14248
14244
|
|
|
14249
|
-
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14245
|
+
var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14250
14246
|
if (kind === "a" && !f)
|
|
14251
14247
|
throw new TypeError("Private accessor was defined without a getter");
|
|
14252
14248
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -14307,7 +14303,7 @@ const KupList = class {
|
|
|
14307
14303
|
});
|
|
14308
14304
|
}
|
|
14309
14305
|
onKupClick(index) {
|
|
14310
|
-
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14306
|
+
__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14311
14307
|
}
|
|
14312
14308
|
/*-------------------------------------------------*/
|
|
14313
14309
|
/* L i s t e n e r s */
|
|
@@ -14328,7 +14324,7 @@ const KupList = class {
|
|
|
14328
14324
|
case 'Enter':
|
|
14329
14325
|
e.preventDefault();
|
|
14330
14326
|
e.stopPropagation();
|
|
14331
|
-
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_handleSelection).call(this, this.focused);
|
|
14327
|
+
__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_handleSelection).call(this, this.focused);
|
|
14332
14328
|
break;
|
|
14333
14329
|
}
|
|
14334
14330
|
}
|
|
@@ -14354,10 +14350,10 @@ const KupList = class {
|
|
|
14354
14350
|
else {
|
|
14355
14351
|
this.focused++;
|
|
14356
14352
|
}
|
|
14357
|
-
if (this.focused > __classPrivateFieldGet(this, _KupList_listItems, "f").length - 1) {
|
|
14353
|
+
if (this.focused > __classPrivateFieldGet$1(this, _KupList_listItems, "f").length - 1) {
|
|
14358
14354
|
this.focused = 0;
|
|
14359
14355
|
}
|
|
14360
|
-
__classPrivateFieldGet(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14356
|
+
__classPrivateFieldGet$1(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14361
14357
|
}
|
|
14362
14358
|
/**
|
|
14363
14359
|
* Focuses the previous element of the list.
|
|
@@ -14378,9 +14374,9 @@ const KupList = class {
|
|
|
14378
14374
|
this.focused--;
|
|
14379
14375
|
}
|
|
14380
14376
|
if (this.focused < 0) {
|
|
14381
|
-
this.focused = __classPrivateFieldGet(this, _KupList_listItems, "f").length - 1;
|
|
14377
|
+
this.focused = __classPrivateFieldGet$1(this, _KupList_listItems, "f").length - 1;
|
|
14382
14378
|
}
|
|
14383
|
-
__classPrivateFieldGet(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14379
|
+
__classPrivateFieldGet$1(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14384
14380
|
}
|
|
14385
14381
|
/**
|
|
14386
14382
|
* Used to retrieve component's props values.
|
|
@@ -14417,7 +14413,7 @@ const KupList = class {
|
|
|
14417
14413
|
if (index === undefined) {
|
|
14418
14414
|
index = this.focused;
|
|
14419
14415
|
}
|
|
14420
|
-
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14416
|
+
__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14421
14417
|
}
|
|
14422
14418
|
/**
|
|
14423
14419
|
* Sets the props to the component.
|
|
@@ -14430,8 +14426,8 @@ const KupList = class {
|
|
|
14430
14426
|
/* L i f e c y c l e H o o k s */
|
|
14431
14427
|
/*-------------------------------------------------*/
|
|
14432
14428
|
componentWillLoad() {
|
|
14433
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logLoad(this, false);
|
|
14434
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").theme.register(this);
|
|
14429
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").debug.logLoad(this, false);
|
|
14430
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").theme.register(this);
|
|
14435
14431
|
for (let index = 0; index < this.data.length; index++) {
|
|
14436
14432
|
const el = this.data[index];
|
|
14437
14433
|
if (el.selected) {
|
|
@@ -14440,10 +14436,10 @@ const KupList = class {
|
|
|
14440
14436
|
}
|
|
14441
14437
|
}
|
|
14442
14438
|
componentDidLoad() {
|
|
14443
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logLoad(this, true);
|
|
14439
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").debug.logLoad(this, true);
|
|
14444
14440
|
}
|
|
14445
14441
|
componentWillRender() {
|
|
14446
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logRender(this, false);
|
|
14442
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").debug.logRender(this, false);
|
|
14447
14443
|
}
|
|
14448
14444
|
componentDidRender() {
|
|
14449
14445
|
if (this.isMenu &&
|
|
@@ -14454,7 +14450,7 @@ const KupList = class {
|
|
|
14454
14450
|
this.rootElement.focus();
|
|
14455
14451
|
}, 0);
|
|
14456
14452
|
}
|
|
14457
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logRender(this, true);
|
|
14453
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").debug.logRender(this, true);
|
|
14458
14454
|
}
|
|
14459
14455
|
render() {
|
|
14460
14456
|
__classPrivateFieldSet(this, _KupList_listItems, [], "f");
|
|
@@ -14466,7 +14462,7 @@ const KupList = class {
|
|
|
14466
14462
|
wrapperClass += ' visible';
|
|
14467
14463
|
}
|
|
14468
14464
|
}
|
|
14469
|
-
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_checkRoleType).call(this);
|
|
14465
|
+
__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_checkRoleType).call(this);
|
|
14470
14466
|
if (this.selectable != true) {
|
|
14471
14467
|
componentClass += ' list--non-interactive';
|
|
14472
14468
|
}
|
|
@@ -14481,17 +14477,17 @@ const KupList = class {
|
|
|
14481
14477
|
}
|
|
14482
14478
|
let roleAttr = this.roleType;
|
|
14483
14479
|
let ariaMultiSelectable = 'false';
|
|
14484
|
-
if (__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isMultiSelection).call(this)) {
|
|
14480
|
+
if (__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isMultiSelection).call(this)) {
|
|
14485
14481
|
ariaMultiSelectable = 'true';
|
|
14486
14482
|
}
|
|
14487
14483
|
__classPrivateFieldSet(this, _KupList_radios, [], "f");
|
|
14488
14484
|
let index$1 = 0;
|
|
14489
|
-
return (index.h(index.Host, null, index.h("style", null, __classPrivateFieldGet(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
|
|
14490
|
-
.filter((item) => __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
14491
|
-
.map((item) => __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index$1++))))));
|
|
14485
|
+
return (index.h(index.Host, null, index.h("style", null, __classPrivateFieldGet$1(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$1(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
14487
|
+
.map((item) => __classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index$1++))))));
|
|
14492
14488
|
}
|
|
14493
14489
|
disconnectedCallback() {
|
|
14494
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").theme.unregister(this);
|
|
14490
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").theme.unregister(this);
|
|
14495
14491
|
}
|
|
14496
14492
|
get rootElement() { return index.getElement(this); }
|
|
14497
14493
|
};
|
|
@@ -14542,7 +14538,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14542
14538
|
if (this.showIcons == true &&
|
|
14543
14539
|
item.icon != null &&
|
|
14544
14540
|
item.icon.trim() != '') {
|
|
14545
|
-
imageTag = __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_getIconTag).call(this, item.icon);
|
|
14541
|
+
imageTag = __classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_getIconTag).call(this, item.icon);
|
|
14546
14542
|
}
|
|
14547
14543
|
let primaryTextTag = [
|
|
14548
14544
|
getIdOfItemByDisplayMode(item, this.displayMode, ' - '),
|
|
@@ -14558,9 +14554,9 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14558
14554
|
}
|
|
14559
14555
|
let classAttr = 'list-item';
|
|
14560
14556
|
let tabIndexAttr = item.selected == true ? '0' : '-1';
|
|
14561
|
-
if (!__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isNested).call(this) &&
|
|
14557
|
+
if (!__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isNested).call(this) &&
|
|
14562
14558
|
item.selected == true &&
|
|
14563
|
-
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isListBoxRule).call(this)) {
|
|
14559
|
+
__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isListBoxRule).call(this)) {
|
|
14564
14560
|
classAttr += ' list-item--selected';
|
|
14565
14561
|
}
|
|
14566
14562
|
if (this.focused === index$1) {
|
|
@@ -14576,7 +14572,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14576
14572
|
imageTag,
|
|
14577
14573
|
index.h("span", { class: "list-item__text" }, primaryTextTag, secTextTag),
|
|
14578
14574
|
];
|
|
14579
|
-
if (__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14575
|
+
if (__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14580
14576
|
roleAttr = 'radio';
|
|
14581
14577
|
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
14582
14578
|
let dataTmp = [
|
|
@@ -14590,12 +14586,12 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14590
14586
|
display: 'none',
|
|
14591
14587
|
};
|
|
14592
14588
|
innerSpanTag = [
|
|
14593
|
-
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(this, _KupList_radios, "f")[index$1] = el) })),
|
|
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$1(this, _KupList_radios, "f")[index$1] = el) })),
|
|
14594
14590
|
imageTag,
|
|
14595
14591
|
index.h("label", { class: "list-item__text", htmlFor: this.rootElement.id + '_' + index$1 }, primaryTextTag, secTextTag),
|
|
14596
14592
|
];
|
|
14597
14593
|
}
|
|
14598
|
-
else if (__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this)) {
|
|
14594
|
+
else if (__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this)) {
|
|
14599
14595
|
roleAttr = 'checkbox';
|
|
14600
14596
|
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
14601
14597
|
let checkedAttr = item.selected == true ? true : false;
|
|
@@ -14613,14 +14609,14 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14613
14609
|
vNodes.push(index.h("li", { role: "separator", class: "list-divider" }));
|
|
14614
14610
|
}
|
|
14615
14611
|
vNodes.push(index.h("li", { ref: (el) => {
|
|
14616
|
-
__classPrivateFieldGet(this, _KupList_listItems, "f").push(el);
|
|
14612
|
+
__classPrivateFieldGet$1(this, _KupList_listItems, "f").push(el);
|
|
14617
14613
|
}, class: classAttr, role: roleAttr, tabindex: tabIndexAttr, "data-id": item.id, "aria-selected": ariaSelectedAttr, "aria-checked": ariaCheckedAttr, onBlur: !this.selectable
|
|
14618
14614
|
? (e) => e.stopPropagation()
|
|
14619
14615
|
: () => this.onKupBlur(), onFocus: !this.selectable
|
|
14620
14616
|
? (e) => e.stopPropagation()
|
|
14621
14617
|
: () => this.onKupFocus(), onClick: !this.selectable
|
|
14622
14618
|
? (e) => e.stopPropagation()
|
|
14623
|
-
: __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isNested).call(this)
|
|
14619
|
+
: __classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isNested).call(this)
|
|
14624
14620
|
? (e) => {
|
|
14625
14621
|
e.stopPropagation();
|
|
14626
14622
|
this.onKupClick(index$1);
|
|
@@ -14641,7 +14637,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14641
14637
|
};
|
|
14642
14638
|
return (index.h(fImage.FImage, Object.assign({}, propsFImage, { resource: icon, wrapperClass: `icon-button__icon kup-icon` })));
|
|
14643
14639
|
}, _KupList_isMultiSelection = function _KupList_isMultiSelection() {
|
|
14644
|
-
return __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this);
|
|
14640
|
+
return __classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this);
|
|
14645
14641
|
}, _KupList_isCheckBoxRule = function _KupList_isCheckBoxRule() {
|
|
14646
14642
|
return this.roleType == fCell.KupListRole.GROUP;
|
|
14647
14643
|
}, _KupList_isRadioButtonRule = function _KupList_isRadioButtonRule() {
|
|
@@ -14649,7 +14645,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14649
14645
|
}, _KupList_isListBoxRule = function _KupList_isListBoxRule() {
|
|
14650
14646
|
return this.roleType == fCell.KupListRole.LISTBOX;
|
|
14651
14647
|
}, _KupList_checkRoleType = function _KupList_checkRoleType() {
|
|
14652
|
-
if (!__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this) && !__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14648
|
+
if (!__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this) && !__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14653
14649
|
this.roleType = fCell.KupListRole.LISTBOX;
|
|
14654
14650
|
}
|
|
14655
14651
|
}, _KupList_itemCompliant = function _KupList_itemCompliant(item) {
|
|
@@ -16486,6 +16482,14 @@ class FiltersTreeItems extends fPaginatorUtils.FiltersRows {
|
|
|
16486
16482
|
|
|
16487
16483
|
const kupTreeCss = ":host{--kup_tree_border:var(--kup-tree-border, 1px solid var(--kup-border-color));--kup_tree_color:var(--kup-tree-color, var(--kup-text-color));--kup_tree_color_rgb:var(--kup-tree-color-rgb, var(--kup-text-color-rgb));--kup_tree_font_family:var(--kup-tree-font-family, var(--kup-font-family));--kup_tree_filter_background_color:var(--kup-tree-filter-background-color, var(--kup-background-color));--kup_tree_font_family_monospace:var(\n --kup-tree-font-family-monospace,\n var(--kup-font-family-monospace)\n );--kup_tree_font_size:var(--kup-tree-font-size, var(--kup-font-size));--kup_tree_hover_color:var(--kup-tree-hover-color, var(--kup-hover-color));--kup_tree_hover_background_color:var(\n --kup-tree-hover-background-color,\n var(--kup-hover-background-color)\n );--kup_tree_icon_color:var(--kup-tree-icon-color, var(--kup-icon-color));--kup_tree_primary_color:var(\n --kup-tree-primary-color,\n var(--kup-primary-color)\n );--kup_tree_primary_color_rgb:var(\n --kup-tree-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_tree_text_on_primary_color:var(\n --kup-tree-text-on-primary-color,\n var(--kup-text-on-primary-color)\n );display:block;font-family:var(--kup_tree_font_family);font-size:var(--kup_tree_font_size)}:host([prevent-x-scroll]) .wrapper{overflow-x:hidden}#kup-component{color:var(--kup_tree_color)}.density-dense .wrapper .kup-tree td:not(.grid-cell),.density-dense .wrapper .kup-tree th{padding:0 0.5em}.density-dense .wrapper .kup-tree td:not(.grid-cell) .kup-tree__icon~.cell-content,.density-dense .wrapper .kup-tree td:not(.grid-cell) .kup-tree__icon+.cell-content,.density-dense .wrapper .kup-tree th .kup-tree__icon~.cell-content,.density-dense .wrapper .kup-tree th .kup-tree__icon+.cell-content{vertical-align:0.4em}.density-wide .wrapper .kup-tree td:not(.grid-cell),.density-wide .wrapper .kup-tree th{padding:0.75em 0.5em}.wrapper{overflow-x:auto}.wrapper .kup-tree{border-collapse:collapse;width:max-content}.wrapper .kup-tree thead{display:none}.wrapper .kup-tree thead.header--is-visible{display:table-header-group}.wrapper .kup-tree thead.header--is-visible th{padding:0.8em 0.5em;font-size:1.1em}.wrapper .kup-tree thead th{text-align:left}.wrapper .kup-tree tr,.wrapper .kup-tree td{font-size:1em;line-height:1em}.wrapper .kup-tree tr.mdc-ripple-surface,.wrapper .kup-tree td.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.wrapper .kup-tree tr.mdc-ripple-surface:before,.wrapper .kup-tree tr.mdc-ripple-surface:after,.wrapper .kup-tree td.mdc-ripple-surface:before,.wrapper .kup-tree td.mdc-ripple-surface:after{background-color:var(--kup_tree_primary_color)}.wrapper .kup-tree tr .kup-tree__icon~.cell-content,.wrapper .kup-tree tr .kup-tree__icon+.cell-content,.wrapper .kup-tree td .kup-tree__icon~.cell-content,.wrapper .kup-tree td .kup-tree__icon+.cell-content{display:inline-block;vertical-align:0.3em}.wrapper .kup-tree td:not(.grid-cell),.wrapper .kup-tree th{padding:0.4em 0.5em}.wrapper .kup-tree td{padding:0;white-space:nowrap}.wrapper .kup-tree__indent{display:inline-block;width:calc(1.5em * var(--kup_tree_node_depth, 0))}.wrapper .kup-tree__icon{display:inline-block;margin-right:0.4em;height:1.5em;min-width:1.5em;width:1.5em}.wrapper .kup-tree__node__expander{transition:transform 0.1s}.wrapper .kup-tree__node{cursor:default}.wrapper .kup-tree__node.with-dyn:not(.kup-tree__node--disabled){cursor:pointer}.wrapper .kup-tree__node:not(.kup-tree__node--disabled) .wrapper .kup-tree__node__expander{cursor:pointer}.wrapper .kup-tree__node:not(.kup-tree__node--disabled) .kup-icon.kup-tree__node__expander{cursor:pointer}.wrapper .kup-tree__node--disabled{opacity:0.4}.wrapper .kup-tree__node--disabled__expander{pointer-events:none}.wrapper .kup-tree__node .kup-icon:not(.is-image){background-color:var(--kup_tree_icon_color)}.wrapper .kup-tree__node .kup-icon.kup-tree__node__expander:not(.is-image){background-color:var(--kup_tree_color)}.wrapper .kup-tree__node .kup-icon.is-image img{display:block;height:auto;width:100%}.wrapper .kup-tree__node:hover:not(.kup-tree__node--disabled):not(.kup-tree__node--selected) td{background-color:var(--kup_tree_hover_background_color);color:var(--kup_tree_hover_color)}.wrapper .kup-tree__node:hover:not(.kup-tree__node--disabled):not(.kup-tree__node--selected) td .kup-icon{background-color:var(--kup_tree_hover_color)}.wrapper .kup-tree__node--selected:not(.kup-tree__node--disabled) td{background-color:rgba(var(--kup_tree_primary_color_rgb), 0.175);color:var(--kup_tree_color)}.wrapper .kup-tree[data-show-columns] .kup-tree__node{border-bottom:solid 1px var(--kup-border-color)}#global-filter{background:var(--kup_tree_filter_background_color);margin-bottom:1em;position:sticky;top:0;z-index:1}.first-node .cell-content{font-weight:bold}.cell-content--ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--kup_tree_content_width, auto)}.cell-content--highlighted{color:var(--kup_tree_text_on_primary_color);background-color:var(--kup_tree_primary_color)}.kup-icon.kup-filter-remove-icon:not(.f-image){background-color:var(--kup_tree_color);margin:0 0.25em;height:1em;width:1em;cursor:pointer;float:right;margin:0 0.25em;opacity:0.5}.grid-cell{height:0}tfoot td{border-bottom:var(--kup_tree_border);border-right:var(--kup_tree_border);box-sizing:border-box;height:36px;text-align:right;font-weight:bold;padding:0.5em 0.3125em}tfoot td:hover{background-color:var(--kup-background-color)}tfoot td:first-of-type{border:none;border-right:var(--kup_tree_border)}.hidden span{color:transparent;position:relative;text-overflow:ellipsis;transition:color 200ms}.hidden span:hover{color:var(--kup_tree_color)}.totals-value{font-weight:bold}:host([as-accordion]) .wrapper .kup-tree thead{display:table-header-group}:host([as-accordion]) .wrapper .kup-tree thead tr{border-left:var(--kup_tree_border);border-right:var(--kup_tree_border)}:host([as-accordion]) .density-dense .first-node:not(.grid-cell){padding:0.5em 1em}:host([as-accordion]) .density-medium .first-node:not(.grid-cell){padding:1em 1.5em}:host([as-accordion]) .density-wide .first-node:not(.grid-cell){padding:1.75em 1.75em}:host([as-accordion]) .kup-tree__node--first{border:none;box-sizing:border-box;display:block}:host([as-accordion]) .kup-tree__node--first:hover,:host([as-accordion]) .kup-tree__node--first[data-is-expanded]{background-color:var(--kup_tree_hover_background_color)}:host([as-accordion]) .kup-tree__node--first:hover .cell-content,:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .cell-content{color:var(--kup_tree_hover_color)}:host([as-accordion]) .kup-tree__node--first:hover .kup-icon,:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .kup-icon{background-color:var(--kup_tree_hover_color)}:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .first-node{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .kup-dropdown-icon{transform:rotate(180deg)}:host([as-accordion]) .kup-tree__node--first:first-of-type .first-node{border-top-left-radius:4px;border-top-right-radius:4px;border-top:var(--kup_tree_border)}:host([as-accordion]) .kup-tree__node--first:last-of-type .first-node{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host([as-accordion]) .kup-tree__node--first .first-node{align-items:center;border-bottom:var(--kup_tree_border);border-left:var(--kup_tree_border);border-right:var(--kup_tree_border);box-sizing:border-box;color:var(--kup_tree_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;text-align:left;transition:background-color 80ms, color 80ms;width:100%}:host([as-accordion]) .kup-tree__node--first .kup-tree__icon{margin-left:0;margin-right:0.5em;min-width:1.5em}:host([as-accordion]) .kup-tree__node--first .cell-content{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}:host([as-accordion]) .kup-tree__node--first .kup-dropdown-icon{background-color:var(--kup_tree_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform 0.1s}:host([as-accordion]) .kup-tree__node:not(.kup-tree__node--first)+.kup-tree__node--first{border-top:var(--kup_tree_border);border-top-left-radius:4px;border-top-right-radius:4px}.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:33vh;overflow:auto;position:relative;transform:none;transform-origin:unset;transition:height 0.2s;will-change:unset}.kup-menu.visible{display:block}.kup-icon.kup-collapsed-icon{-webkit-mask:var(--kup-collapsed-icon);mask:var(--kup-collapsed-icon)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-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)}:host(.kup-borderless) .first-node{border:none !important}:host(.kup-borderless) .kup-tree__node:not(.kup-tree__node--first)+.kup-tree__node--first{border:none !important}:host(.kup-full-width){min-width:100%}:host(.kup-full-width) table.kup-tree{min-width:100%}:host(.kup-layout-fixed) #kup-component table{table-layout:fixed;width:100%}:host(.kup-shaped) td.mdc-ripple-surface{border-radius:0 66px 66px 0}tr.clickable{cursor:pointer}";
|
|
16488
16484
|
|
|
16485
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
16486
|
+
if (kind === "a" && !f)
|
|
16487
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
16488
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
16489
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
16490
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
16491
|
+
};
|
|
16492
|
+
var _KupTree_kupManager;
|
|
16489
16493
|
const KupTree = class {
|
|
16490
16494
|
constructor(hostRef) {
|
|
16491
16495
|
index.registerInstance(this, hostRef);
|
|
@@ -16510,7 +16514,7 @@ const KupTree = class {
|
|
|
16510
16514
|
/**
|
|
16511
16515
|
* Instance of the KupManager class.
|
|
16512
16516
|
*/
|
|
16513
|
-
this
|
|
16517
|
+
_KupTree_kupManager.set(this, kupManager.kupManagerInstance());
|
|
16514
16518
|
/**
|
|
16515
16519
|
* Reference to the column menu card.
|
|
16516
16520
|
*/
|
|
@@ -16575,31 +16579,31 @@ const KupTree = class {
|
|
|
16575
16579
|
persistState() {
|
|
16576
16580
|
if (this.store && this.stateId) {
|
|
16577
16581
|
let somethingChanged = false;
|
|
16578
|
-
if (!this.
|
|
16582
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.filters, this.filters)) {
|
|
16579
16583
|
this.state.filters = Object.assign({}, this.filters);
|
|
16580
16584
|
somethingChanged = true;
|
|
16581
16585
|
}
|
|
16582
|
-
if (!this.
|
|
16586
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.density, this.density)) {
|
|
16583
16587
|
this.state.density = this.density;
|
|
16584
16588
|
somethingChanged = true;
|
|
16585
16589
|
}
|
|
16586
|
-
if (!this.
|
|
16590
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.showFilters, this.showFilters)) {
|
|
16587
16591
|
this.state.showFilters = this.showFilters;
|
|
16588
16592
|
somethingChanged = true;
|
|
16589
16593
|
}
|
|
16590
|
-
if (!this.
|
|
16594
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.showFooter, this.showFooter)) {
|
|
16591
16595
|
this.state.showFooter = this.showFooter;
|
|
16592
16596
|
somethingChanged = true;
|
|
16593
16597
|
}
|
|
16594
|
-
if (!this.
|
|
16598
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.totals, this.totals)) {
|
|
16595
16599
|
this.state.totals = Object.assign({}, this.totals);
|
|
16596
16600
|
somethingChanged = true;
|
|
16597
16601
|
}
|
|
16598
|
-
if (!this.
|
|
16602
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.globalFilter, this.globalFilter)) {
|
|
16599
16603
|
this.state.globalFilter = this.globalFilter;
|
|
16600
16604
|
somethingChanged = true;
|
|
16601
16605
|
}
|
|
16602
|
-
if (!this.
|
|
16606
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
16603
16607
|
this.state.globalFilterValue = this.globalFilterValue;
|
|
16604
16608
|
somethingChanged = true;
|
|
16605
16609
|
}
|
|
@@ -16730,7 +16734,7 @@ const KupTree = class {
|
|
|
16730
16734
|
* @param {KupDataColumn} column - Column to hide.
|
|
16731
16735
|
*/
|
|
16732
16736
|
async hideColumn(column) {
|
|
16733
|
-
this.
|
|
16737
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").data.column.hide(this.columns, [column.name]);
|
|
16734
16738
|
this.kupColumnRemove.emit({
|
|
16735
16739
|
comp: this,
|
|
16736
16740
|
id: this.rootElement.id,
|
|
@@ -16814,21 +16818,21 @@ const KupTree = class {
|
|
|
16814
16818
|
return this.treeColumnVisible;
|
|
16815
16819
|
}
|
|
16816
16820
|
checkScrollOnHover() {
|
|
16817
|
-
if (!this.
|
|
16821
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").scrollOnHover.isRegistered(this.treeWrapperRef)) {
|
|
16818
16822
|
if (this.scrollOnHover) {
|
|
16819
|
-
this.
|
|
16823
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").scrollOnHover.register(this.treeWrapperRef);
|
|
16820
16824
|
}
|
|
16821
16825
|
}
|
|
16822
16826
|
else {
|
|
16823
16827
|
if (!this.scrollOnHover) {
|
|
16824
|
-
this.
|
|
16828
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").scrollOnHover.unregister(this.treeWrapperRef);
|
|
16825
16829
|
}
|
|
16826
16830
|
}
|
|
16827
16831
|
}
|
|
16828
16832
|
onKupTreeNodeDblClick(treeNodeData, treeNodePath) {
|
|
16829
16833
|
for (let index = 0; index < this.clickTimeout.length; index++) {
|
|
16830
16834
|
clearTimeout(this.clickTimeout[index]);
|
|
16831
|
-
this.
|
|
16835
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logMessage(this, 'Cleared hdlTreeNodeClick timeout(' +
|
|
16832
16836
|
this.clickTimeout[index] +
|
|
16833
16837
|
').');
|
|
16834
16838
|
}
|
|
@@ -17017,7 +17021,7 @@ const KupTree = class {
|
|
|
17017
17021
|
}
|
|
17018
17022
|
contextMenuHandler(e) {
|
|
17019
17023
|
e.preventDefault();
|
|
17020
|
-
const details = this.getEventDetails(this.getEventPath(e.target), e);
|
|
17024
|
+
const details = this.getEventDetails(__classPrivateFieldGet(this, _KupTree_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
17021
17025
|
if (details.area === 'header') {
|
|
17022
17026
|
if (details.th && details.column) {
|
|
17023
17027
|
this.openColumnMenu(details.column.name);
|
|
@@ -17033,18 +17037,6 @@ const KupTree = class {
|
|
|
17033
17037
|
}
|
|
17034
17038
|
return details;
|
|
17035
17039
|
}
|
|
17036
|
-
getEventPath(currentEl) {
|
|
17037
|
-
const path = [];
|
|
17038
|
-
while (currentEl &&
|
|
17039
|
-
currentEl !== this.rootElement &&
|
|
17040
|
-
currentEl !== document.body) {
|
|
17041
|
-
path.push(currentEl);
|
|
17042
|
-
currentEl = currentEl.parentNode
|
|
17043
|
-
? currentEl.parentNode
|
|
17044
|
-
: currentEl.host;
|
|
17045
|
-
}
|
|
17046
|
-
return path;
|
|
17047
|
-
}
|
|
17048
17040
|
// When a TreeNode can be selected
|
|
17049
17041
|
hdlTreeNodeClick(e, treeNodeData, treeNodePath) {
|
|
17050
17042
|
if (this.expansionMode.toLowerCase() ===
|
|
@@ -17052,7 +17044,9 @@ const KupTree = class {
|
|
|
17052
17044
|
(this.expansionMode.toLowerCase() === fPaginatorUtils.KupTreeExpansionMode.NODE &&
|
|
17053
17045
|
!treeNodeData.expandable)) {
|
|
17054
17046
|
const td = e
|
|
17055
|
-
? this
|
|
17047
|
+
? __classPrivateFieldGet(this, _KupTree_kupManager, "f")
|
|
17048
|
+
.getEventPath(e.target, this.rootElement)
|
|
17049
|
+
.find((el) => {
|
|
17056
17050
|
if (el.tagName === 'TD')
|
|
17057
17051
|
return el;
|
|
17058
17052
|
})
|
|
@@ -17244,10 +17238,10 @@ const KupTree = class {
|
|
|
17244
17238
|
refreshStructureState() {
|
|
17245
17239
|
if (this.data) {
|
|
17246
17240
|
if (this.data.columns) {
|
|
17247
|
-
this.
|
|
17241
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logMessage(this, 'Detected KupDataDataset: setting up tree as grid.', kupManager.KupDebugCategory.WARNING);
|
|
17248
17242
|
const data = this.data;
|
|
17249
17243
|
this.columns = data.columns;
|
|
17250
|
-
this.data = this.
|
|
17244
|
+
this.data = __classPrivateFieldGet(this, _KupTree_kupManager, "f").data.row.toNode(data);
|
|
17251
17245
|
this.showColumns = true;
|
|
17252
17246
|
this.showHeader = true;
|
|
17253
17247
|
}
|
|
@@ -17310,7 +17304,7 @@ const KupTree = class {
|
|
|
17310
17304
|
//---- Filter ----
|
|
17311
17305
|
let filter = null;
|
|
17312
17306
|
if (this.filtersColumnMenuInstance.hasFiltersForColumn(this.filters, column)) {
|
|
17313
|
-
const svgLabel = this.
|
|
17307
|
+
const svgLabel = __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.REMOVE_FILTERS) + `: '${this.getFilterValueForTooltip(column)}'`;
|
|
17314
17308
|
/**
|
|
17315
17309
|
* When column has a filter but filters must not be displayed, shows an icon to remove the filter.
|
|
17316
17310
|
* Upon click, the filter gets removed.
|
|
@@ -17385,9 +17379,9 @@ const KupTree = class {
|
|
|
17385
17379
|
expandClass += ` ${kupManager.KupThemeIconValues.COLLAPSED.replace('--', '')}`;
|
|
17386
17380
|
}
|
|
17387
17381
|
}
|
|
17388
|
-
let treeExpandIcon = (index.h("span", { title: this.
|
|
17382
|
+
let treeExpandIcon = (index.h("span", { title: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPAND) +
|
|
17389
17383
|
'/' +
|
|
17390
|
-
this.
|
|
17384
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.COLLAPSE) +
|
|
17391
17385
|
' (CTRL + Click)', class: expandClass, onClick: this.expansionMode.toLowerCase() ===
|
|
17392
17386
|
fPaginatorUtils.KupTreeExpansionMode.DROPDOWN && !treeNodeData.disabled
|
|
17393
17387
|
? (event) => {
|
|
@@ -17460,8 +17454,8 @@ const KupTree = class {
|
|
|
17460
17454
|
}
|
|
17461
17455
|
}
|
|
17462
17456
|
let title = undefined;
|
|
17463
|
-
if (!this.
|
|
17464
|
-
this.
|
|
17457
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.isEmptyKupObj(treeNodeData.obj) &&
|
|
17458
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.isDebug()) {
|
|
17465
17459
|
title =
|
|
17466
17460
|
treeNodeData.obj.t +
|
|
17467
17461
|
'; ' +
|
|
@@ -17484,7 +17478,7 @@ const KupTree = class {
|
|
|
17484
17478
|
'mdc-ripple-surface': this.ripple &&
|
|
17485
17479
|
!this.showColumns &&
|
|
17486
17480
|
!treeNodeData.disabled,
|
|
17487
|
-
'is-obj': !this.
|
|
17481
|
+
'is-obj': !__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.isEmptyKupObj(treeNodeData.obj),
|
|
17488
17482
|
}, style: treeNodeData.style || null, title: title, onDblClick: () => {
|
|
17489
17483
|
this.onKupTreeNodeDblClick(treeNodeData, treeNodePath);
|
|
17490
17484
|
} }, this.asAccordion && !treeNodeDepth
|
|
@@ -17507,7 +17501,7 @@ const KupTree = class {
|
|
|
17507
17501
|
}
|
|
17508
17502
|
closeTotalMenu() {
|
|
17509
17503
|
this.openedTotalMenu = null;
|
|
17510
|
-
this.
|
|
17504
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").removeClickCallback(this.clickCb);
|
|
17511
17505
|
}
|
|
17512
17506
|
isOpenedTotalMenuForColumn(column) {
|
|
17513
17507
|
return this.openedTotalMenu === column;
|
|
@@ -17537,15 +17531,15 @@ const KupTree = class {
|
|
|
17537
17531
|
let totalMenu = undefined;
|
|
17538
17532
|
let menuLabel = kupManager.TotalLabel.CALC;
|
|
17539
17533
|
const translation = {
|
|
17540
|
-
[kupManager.TotalLabel.AVERAGE]: this.
|
|
17541
|
-
[kupManager.TotalLabel.CALC]: this.
|
|
17542
|
-
[kupManager.TotalLabel.CANC]: this.
|
|
17543
|
-
[kupManager.TotalLabel.COUNT]: this.
|
|
17544
|
-
[kupManager.TotalLabel.DISTINCT]: this.
|
|
17545
|
-
[kupManager.TotalLabel.MATH]: this.
|
|
17546
|
-
[kupManager.TotalLabel.MAX]: this.
|
|
17547
|
-
[kupManager.TotalLabel.MIN]: this.
|
|
17548
|
-
[kupManager.TotalLabel.SUM]: this.
|
|
17534
|
+
[kupManager.TotalLabel.AVERAGE]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageTotals.AVERAGE),
|
|
17535
|
+
[kupManager.TotalLabel.CALC]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageTotals.CALCULATE),
|
|
17536
|
+
[kupManager.TotalLabel.CANC]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageTotals.CANCEL),
|
|
17537
|
+
[kupManager.TotalLabel.COUNT]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageTotals.COUNT),
|
|
17538
|
+
[kupManager.TotalLabel.DISTINCT]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageTotals.DISTINCT),
|
|
17539
|
+
[kupManager.TotalLabel.MATH]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageTotals.FORMULA),
|
|
17540
|
+
[kupManager.TotalLabel.MAX]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageTotals.MAXIMUM),
|
|
17541
|
+
[kupManager.TotalLabel.MIN]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageTotals.MINIMUM),
|
|
17542
|
+
[kupManager.TotalLabel.SUM]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageTotals.SUM),
|
|
17549
17543
|
};
|
|
17550
17544
|
if (this.totals) {
|
|
17551
17545
|
const totalValue = this.totals[column.name];
|
|
@@ -17588,7 +17582,7 @@ const KupTree = class {
|
|
|
17588
17582
|
value: translation[kupManager.TotalLabel.DISTINCT],
|
|
17589
17583
|
},
|
|
17590
17584
|
];
|
|
17591
|
-
if (this.
|
|
17585
|
+
if (__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.isNumber(column.obj)) {
|
|
17592
17586
|
listData.push({
|
|
17593
17587
|
id: kupManager.TotalMode.SUM,
|
|
17594
17588
|
value: translation[kupManager.TotalLabel.SUM],
|
|
@@ -17654,25 +17648,25 @@ const KupTree = class {
|
|
|
17654
17648
|
});
|
|
17655
17649
|
}
|
|
17656
17650
|
};
|
|
17657
|
-
this.
|
|
17658
|
-
this.
|
|
17651
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").interact.on(this.treeWrapperRef, kupManager.KupPointerEventTypes.TAP, tapCb);
|
|
17652
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").interact.on(this.treeWrapperRef, kupManager.KupPointerEventTypes.HOLD, holdCb);
|
|
17659
17653
|
}
|
|
17660
17654
|
totalMenuPosition() {
|
|
17661
17655
|
if (this.rootElement.shadowRoot) {
|
|
17662
17656
|
const menu = this.rootElement.shadowRoot.querySelector('#totals-menu');
|
|
17663
17657
|
if (menu) {
|
|
17664
|
-
this.
|
|
17658
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").dynamicPosition.register(menu, this.totalMenuCoords);
|
|
17665
17659
|
if (!this.clickCb) {
|
|
17666
17660
|
this.clickCb = {
|
|
17667
17661
|
cb: () => {
|
|
17668
17662
|
this.closeTotalMenu();
|
|
17669
|
-
this.
|
|
17663
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").dynamicPosition.stop(menu);
|
|
17670
17664
|
},
|
|
17671
17665
|
el: menu,
|
|
17672
17666
|
};
|
|
17673
17667
|
}
|
|
17674
|
-
this.
|
|
17675
|
-
this.
|
|
17668
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").addClickCallback(this.clickCb, true);
|
|
17669
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").dynamicPosition.start(menu);
|
|
17676
17670
|
menu.menuVisible = true;
|
|
17677
17671
|
}
|
|
17678
17672
|
}
|
|
@@ -17730,20 +17724,20 @@ const KupTree = class {
|
|
|
17730
17724
|
/* L i f e c y c l e H o o k s */
|
|
17731
17725
|
/*-------------------------------------------------*/
|
|
17732
17726
|
componentWillLoad() {
|
|
17733
|
-
this.
|
|
17734
|
-
this.
|
|
17735
|
-
this.
|
|
17727
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logLoad(this, false);
|
|
17728
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").language.register(this);
|
|
17729
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").theme.register(this);
|
|
17736
17730
|
this.columnMenuInstance = new KupColumnMenu();
|
|
17737
17731
|
this.refreshStructureState();
|
|
17738
17732
|
}
|
|
17739
17733
|
componentDidLoad() {
|
|
17740
17734
|
this.didLoadInteractables();
|
|
17741
17735
|
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
17742
|
-
this.
|
|
17743
|
-
this.
|
|
17736
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").resize.observe(this.rootElement);
|
|
17737
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logLoad(this, true);
|
|
17744
17738
|
}
|
|
17745
17739
|
componentWillRender() {
|
|
17746
|
-
this.
|
|
17740
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logRender(this, false);
|
|
17747
17741
|
if (this.showFooter && this.columns) {
|
|
17748
17742
|
this.footer = fPaginatorUtils.calcTotals(fPaginatorUtils.normalizeRows(this.getColumns(), this.nodesToRows()), this.totals);
|
|
17749
17743
|
}
|
|
@@ -17775,7 +17769,7 @@ const KupTree = class {
|
|
|
17775
17769
|
this.persistState();
|
|
17776
17770
|
// ***
|
|
17777
17771
|
this.oldWidth = this.rootElement.clientWidth;
|
|
17778
|
-
this.
|
|
17772
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logRender(this, true);
|
|
17779
17773
|
}
|
|
17780
17774
|
render() {
|
|
17781
17775
|
this.contentRefs = [];
|
|
@@ -17798,7 +17792,7 @@ const KupTree = class {
|
|
|
17798
17792
|
}
|
|
17799
17793
|
else {
|
|
17800
17794
|
// There are no TreeNodes, so we print a single cell with a caption
|
|
17801
|
-
treeNodes.push(index.h("tr", null, index.h("td", null, this.
|
|
17795
|
+
treeNodes.push(index.h("tr", null, index.h("td", null, __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EMPTY_DATA))));
|
|
17802
17796
|
}
|
|
17803
17797
|
// Calculates if header must be shown or not
|
|
17804
17798
|
const visibleHeader = this.showHeader && this.showColumns;
|
|
@@ -17807,12 +17801,12 @@ const KupTree = class {
|
|
|
17807
17801
|
this.data &&
|
|
17808
17802
|
this.data.length &&
|
|
17809
17803
|
this.data.length > 0) {
|
|
17810
|
-
filterField = (index.h("div", { id: "global-filter" }, index.h("kup-text-field", { fullWidth: true, label: this.
|
|
17804
|
+
filterField = (index.h("div", { id: "global-filter" }, index.h("kup-text-field", { fullWidth: true, label: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(kupManager.KupLanguageSearch.SEARCH), icon: kupManager.KupThemeIconValues.SEARCH, initialValue: this.globalFilterValue, "onkup-textfield-input": (event) => {
|
|
17811
17805
|
window.clearTimeout(this.globalFilterTimeout);
|
|
17812
17806
|
this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
|
|
17813
17807
|
} })));
|
|
17814
17808
|
}
|
|
17815
|
-
return (index.h(index.Host, null, index.h("style", null, this.
|
|
17809
|
+
return (index.h(index.Host, null, index.h("style", null, __classPrivateFieldGet(this, _KupTree_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, class: wrapperClass }, filterField, index.h("div", { class: "wrapper", ref: (el) => (this.treeWrapperRef =
|
|
17816
17810
|
el) }, index.h("table", { class: "kup-tree", "data-show-columns": this.showColumns, onContextMenu: (e) => {
|
|
17817
17811
|
e.preventDefault();
|
|
17818
17812
|
} }, index.h("thead", { class: {
|
|
@@ -17823,18 +17817,18 @@ const KupTree = class {
|
|
|
17823
17817
|
: null)))));
|
|
17824
17818
|
}
|
|
17825
17819
|
disconnectedCallback() {
|
|
17826
|
-
this.
|
|
17827
|
-
this.
|
|
17828
|
-
this.
|
|
17820
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").language.register(this);
|
|
17821
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").resize.unobserve(this.rootElement);
|
|
17822
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").theme.unregister(this);
|
|
17829
17823
|
const dynamicPositionElements = this.rootElement.shadowRoot.querySelectorAll('[' + kupManager.kupDynamicPositionAttribute + ']');
|
|
17830
17824
|
if (dynamicPositionElements.length > 0) {
|
|
17831
|
-
this.
|
|
17825
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").dynamicPosition.unregister(Array.prototype.slice.call(dynamicPositionElements));
|
|
17832
17826
|
}
|
|
17833
17827
|
if (this.columnMenuCard) {
|
|
17834
17828
|
this.columnMenuCard.remove();
|
|
17835
17829
|
}
|
|
17836
17830
|
if (this.scrollOnHover) {
|
|
17837
|
-
this.
|
|
17831
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").scrollOnHover.unregister(this.treeWrapperRef);
|
|
17838
17832
|
}
|
|
17839
17833
|
this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
|
|
17840
17834
|
}
|
|
@@ -17844,6 +17838,7 @@ const KupTree = class {
|
|
|
17844
17838
|
"expanded": ["enrichStructureStateWhenChanged"]
|
|
17845
17839
|
}; }
|
|
17846
17840
|
};
|
|
17841
|
+
_KupTree_kupManager = new WeakMap();
|
|
17847
17842
|
KupTree.style = kupTreeCss;
|
|
17848
17843
|
|
|
17849
17844
|
exports.kup_autocomplete = KupAutocomplete;
|