@sme.up/ketchup 8.0.0 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-button-49b2c37c.js → f-button-9524bbf7.js} +2 -2
- package/dist/cjs/{f-cell-9a6bc55c.js → f-cell-bcb75ade.js} +22 -13
- package/dist/cjs/{f-checkbox-593f72c3.js → f-checkbox-1148e791.js} +1 -1
- package/dist/cjs/{f-chip-dee84122.js → f-chip-2249b386.js} +3 -3
- package/dist/cjs/{f-image-27f965ff.js → f-image-47d74999.js} +2 -2
- package/dist/cjs/{f-paginator-utils-4a30189d.js → f-paginator-utils-b0a9ae5f.js} +64 -63
- package/dist/cjs/{f-text-field-04a663b4.js → f-text-field-579c0fc0.js} +83 -9
- package/dist/cjs/{index-74433248.js → index-1f177abc.js} +0 -3
- package/dist/cjs/ketchup.cjs.js +2 -2
- package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +798 -815
- package/dist/cjs/kup-box.cjs.entry.js +10 -10
- package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
- package/dist/cjs/kup-cell.cjs.entry.js +7 -7
- package/dist/cjs/kup-dash-list.cjs.entry.js +3 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +2 -2
- package/dist/cjs/kup-dashboard.cjs.entry.js +6 -6
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +2 -2
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
- package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
- package/dist/cjs/{kup-manager-2ff5d258.js → kup-manager-85b2a756.js} +758 -538
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +3 -3
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +12 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +5 -61
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +1 -1
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +1 -3
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +7 -8
- package/dist/collection/components/kup-data-table/kup-data-table.js +5 -4
- package/dist/collection/components/kup-gauge/kup-gauge.js +4 -4
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +27 -0
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +107 -9
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +7 -7
- package/dist/collection/components/kup-tree/kup-tree.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell.js +16 -8
- package/dist/collection/f-components/f-paginator/f-paginator-utils.js +3 -3
- package/dist/collection/f-components/f-text-field/f-text-field.js +80 -6
- package/dist/collection/managers/kup-data/kup-data.js +3 -1
- package/dist/collection/managers/kup-dates/kup-dates-declarations.js +21 -10
- package/dist/collection/managers/kup-dates/kup-dates.js +312 -1
- package/dist/collection/managers/kup-math/kup-math.js +258 -6
- package/dist/collection/utils/cell-utils.js +5 -6
- package/dist/collection/utils/filters/filters.js +11 -13
- package/dist/collection/utils/utils.js +18 -444
- package/dist/components/kup-autocomplete2.js +1301 -1002
- package/dist/components/kup-box2.js +1 -1
- package/dist/components/kup-calendar.js +1 -1
- package/dist/components/kup-cell.js +1 -1
- package/dist/components/kup-dash-list.js +2 -3
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +1 -1
- package/dist/components/kup-family-tree.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid2.js +1 -1
- package/dist/components/kup-iframe.js +1 -1
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-planner.js +1 -1
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +8 -0
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/esm/{f-button-744cf1f6.js → f-button-024f0cfe.js} +2 -2
- package/dist/esm/{f-cell-b319c869.js → f-cell-90240a8c.js} +22 -13
- package/dist/esm/{f-checkbox-ec85b437.js → f-checkbox-9b3f5f5b.js} +1 -1
- package/dist/esm/{f-chip-7e3e4180.js → f-chip-2238ad43.js} +3 -3
- package/dist/esm/{f-image-098c26ce.js → f-image-f2e9bf79.js} +2 -2
- package/dist/esm/{f-paginator-utils-674cb2ae.js → f-paginator-utils-8cb3c023.js} +64 -63
- package/dist/esm/{f-text-field-c38ef113.js → f-text-field-d231982c.js} +83 -9
- package/dist/esm/{index-b326ffc9.js → index-8bd38435.js} +1 -3
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +3 -3
- package/dist/esm/kup-autocomplete_27.entry.js +792 -809
- package/dist/esm/kup-box.entry.js +10 -10
- package/dist/esm/kup-calendar.entry.js +5 -5
- package/dist/esm/kup-cell.entry.js +7 -7
- package/dist/esm/kup-dash-list.entry.js +3 -4
- package/dist/esm/kup-dash_2.entry.js +2 -2
- package/dist/esm/kup-dashboard.entry.js +6 -6
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +2 -2
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-lazy.entry.js +2 -2
- package/dist/esm/kup-magic-box.entry.js +3 -3
- package/dist/esm/{kup-manager-b41eb2a8.js → kup-manager-d1da769e.js} +758 -529
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +2 -2
- package/dist/esm/kup-planner.entry.js +3 -3
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +12 -4
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-5ce2b4fc.entry.js → p-063d4c27.entry.js} +1 -1
- package/dist/ketchup/{p-4325d965.entry.js → p-0bcda0e2.entry.js} +1 -1
- package/dist/ketchup/{p-af82131e.entry.js → p-0d7d59c7.entry.js} +1 -1
- package/dist/ketchup/{p-bd42562d.entry.js → p-163b18b9.entry.js} +1 -1
- package/dist/ketchup/{p-b244f5ca.entry.js → p-1ad628fb.entry.js} +1 -1
- package/dist/ketchup/{p-a9b7533b.entry.js → p-33aff1ca.entry.js} +1 -1
- package/dist/ketchup/p-3432ebaf.entry.js +9 -0
- package/dist/ketchup/{p-b032f47d.entry.js → p-35b29b22.entry.js} +1 -1
- package/dist/ketchup/{p-940a5feb.js → p-36dac88e.js} +3 -3
- package/dist/ketchup/{p-395e1960.entry.js → p-37067ee6.entry.js} +1 -1
- package/dist/ketchup/p-39a55c47.js +1 -0
- package/dist/ketchup/p-3cf64473.js +1 -0
- package/dist/ketchup/{p-5d398e42.js → p-410c102a.js} +1 -1
- package/dist/ketchup/p-43b67de4.entry.js +1 -0
- package/dist/ketchup/{p-a7e19620.entry.js → p-489d55ff.entry.js} +1 -1
- package/dist/ketchup/{p-77e3d537.js → p-5f3680f2.js} +1 -1
- package/dist/ketchup/p-651d89c8.entry.js +1 -0
- package/dist/ketchup/{p-da891093.entry.js → p-73c8d651.entry.js} +1 -1
- package/dist/ketchup/{p-bb17c1ba.entry.js → p-83435e6c.entry.js} +1 -1
- package/dist/ketchup/{p-3b41aca7.entry.js → p-89743989.entry.js} +1 -1
- package/dist/ketchup/{p-ef614656.js → p-8b46e7ce.js} +1 -1
- package/dist/ketchup/{p-d4ece435.js → p-9dcfbb1e.js} +2 -2
- package/dist/ketchup/{p-c26975bf.js → p-9f9b6656.js} +1 -1
- package/dist/ketchup/{p-c968e93d.entry.js → p-a84f1d24.entry.js} +1 -1
- package/dist/ketchup/{p-e02b5141.entry.js → p-b2fd2dbf.entry.js} +1 -1
- package/dist/ketchup/{p-d739710a.entry.js → p-c42b80c1.entry.js} +1 -1
- package/dist/ketchup/p-d1b050d0.entry.js +27 -0
- package/dist/ketchup/p-d6ea709e.entry.js +1 -0
- package/dist/ketchup/{p-0b91f5f8.entry.js → p-e1f1e661.entry.js} +1 -1
- package/dist/ketchup/p-eda7f130.js +1 -0
- package/dist/ketchup/{p-4ae2ca6f.entry.js → p-f876125d.entry.js} +1 -1
- package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +5 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +20 -2
- package/dist/types/components.d.ts +34 -0
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +3 -0
- package/dist/types/managers/kup-dates/kup-dates-declarations.d.ts +19 -9
- package/dist/types/managers/kup-dates/kup-dates.d.ts +94 -1
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +88 -3
- package/dist/types/utils/utils.d.ts +13 -103
- package/package.json +1 -1
- package/dist/ketchup/p-0b0b61cb.entry.js +0 -1
- package/dist/ketchup/p-3efe7f43.entry.js +0 -27
- package/dist/ketchup/p-9700eb32.js +0 -1
- package/dist/ketchup/p-a877a87b.entry.js +0 -9
- package/dist/ketchup/p-c8b7790a.entry.js +0 -1
- package/dist/ketchup/p-d98fdb9b.js +0 -1
- package/dist/ketchup/p-df316daf.entry.js +0 -1
- package/dist/ketchup/p-e714f4dc.js +0 -1
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const fTextField = require('./f-text-field-
|
|
5
|
+
const index = require('./index-1f177abc.js');
|
|
6
|
+
const kupManager = require('./kup-manager-85b2a756.js');
|
|
7
|
+
const fTextField = require('./f-text-field-579c0fc0.js');
|
|
8
8
|
const fTextFieldMdc = require('./f-text-field-mdc-0e22f3e3.js');
|
|
9
|
-
const fCell = require('./f-cell-
|
|
9
|
+
const fCell = require('./f-cell-bcb75ade.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-47d74999.js');
|
|
12
|
+
const fButton = require('./f-button-9524bbf7.js');
|
|
13
13
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
14
|
-
const fChip = require('./f-chip-
|
|
14
|
+
const fChip = require('./f-chip-2249b386.js');
|
|
15
15
|
const component = require('./component-85c2bd4d.js');
|
|
16
|
-
const fCheckbox = require('./f-checkbox-
|
|
17
|
-
const fPaginatorUtils = require('./f-paginator-utils-
|
|
16
|
+
const fCheckbox = require('./f-checkbox-1148e791.js');
|
|
17
|
+
const fPaginatorUtils = require('./f-paginator-utils-b0a9ae5f.js');
|
|
18
18
|
require('./tslib.es6-386654de.js');
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -168,7 +168,7 @@ function getItemByDisplayMode(listData, id, displayMode, setSelected) {
|
|
|
168
168
|
|
|
169
169
|
const kupAutocompleteCss = ":host{display:block;width:max-content}.kup-icon{transition:transform 0.15s}.toggled .kup-icon.kup-dropdown-icon{transform:rotate(-180deg)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
170
170
|
|
|
171
|
-
var __classPrivateFieldGet$
|
|
171
|
+
var __classPrivateFieldGet$7 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
172
172
|
if (kind === "a" && !f)
|
|
173
173
|
throw new TypeError("Private accessor was defined without a getter");
|
|
174
174
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -229,18 +229,18 @@ const KupAutocomplete = class {
|
|
|
229
229
|
comp: this,
|
|
230
230
|
id: this.rootElement.id,
|
|
231
231
|
value: this.value,
|
|
232
|
-
inputValue: __classPrivateFieldGet$
|
|
232
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
onKupChange(value) {
|
|
236
236
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
237
|
-
const ret = __classPrivateFieldGet$
|
|
237
|
+
const ret = __classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
238
238
|
if (ret.exists || this.allowInconsistentValues) {
|
|
239
239
|
this.kupChange.emit({
|
|
240
240
|
comp: this,
|
|
241
241
|
id: this.rootElement.id,
|
|
242
242
|
value: this.value,
|
|
243
|
-
inputValue: __classPrivateFieldGet$
|
|
243
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
244
244
|
node: ret.node,
|
|
245
245
|
});
|
|
246
246
|
}
|
|
@@ -250,7 +250,7 @@ const KupAutocomplete = class {
|
|
|
250
250
|
comp: this,
|
|
251
251
|
id: this.rootElement.id,
|
|
252
252
|
value: this.value,
|
|
253
|
-
inputValue: __classPrivateFieldGet$
|
|
253
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
onKupFocus() {
|
|
@@ -258,51 +258,51 @@ const KupAutocomplete = class {
|
|
|
258
258
|
comp: this,
|
|
259
259
|
id: this.rootElement.id,
|
|
260
260
|
value: this.value,
|
|
261
|
-
inputValue: __classPrivateFieldGet$
|
|
261
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
onKupInput() {
|
|
265
265
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
266
|
-
const ret = __classPrivateFieldGet$
|
|
267
|
-
__classPrivateFieldGet$
|
|
268
|
-
if (__classPrivateFieldGet$
|
|
266
|
+
const ret = __classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value, false);
|
|
267
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
268
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value.length >= this.minimumChars) {
|
|
269
269
|
this.kupInput.emit({
|
|
270
270
|
comp: this,
|
|
271
271
|
id: this.rootElement.id,
|
|
272
272
|
value: this.value,
|
|
273
|
-
inputValue: __classPrivateFieldGet$
|
|
273
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
274
274
|
node: ret.node,
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
onKupIconClick() {
|
|
279
|
-
if (__classPrivateFieldGet$
|
|
280
|
-
__classPrivateFieldGet$
|
|
279
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
280
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
281
281
|
}
|
|
282
282
|
else {
|
|
283
283
|
if (this.showDropDownIcon) {
|
|
284
|
-
__classPrivateFieldGet$
|
|
284
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, true);
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
this.kupIconClick.emit({
|
|
288
288
|
comp: this,
|
|
289
289
|
id: this.rootElement.id,
|
|
290
290
|
value: this.value,
|
|
291
|
-
inputValue: __classPrivateFieldGet$
|
|
292
|
-
open: __classPrivateFieldGet$
|
|
291
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
292
|
+
open: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled'),
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
295
|
onKupItemClick(e) {
|
|
296
296
|
this.onKupChange(e.detail.selected.id);
|
|
297
|
-
__classPrivateFieldGet$
|
|
298
|
-
if (__classPrivateFieldGet$
|
|
299
|
-
__classPrivateFieldGet$
|
|
297
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
298
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f")) {
|
|
299
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
300
300
|
}
|
|
301
301
|
this.kupItemClick.emit({
|
|
302
302
|
comp: this,
|
|
303
303
|
id: this.rootElement.id,
|
|
304
304
|
value: this.value,
|
|
305
|
-
inputValue: __classPrivateFieldGet$
|
|
305
|
+
inputValue: __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
306
306
|
node: e.detail.selected,
|
|
307
307
|
});
|
|
308
308
|
}
|
|
@@ -310,30 +310,30 @@ const KupAutocomplete = class {
|
|
|
310
310
|
/* L i s t e n e r s */
|
|
311
311
|
/*-------------------------------------------------*/
|
|
312
312
|
listenKeydown(e) {
|
|
313
|
-
if (__classPrivateFieldGet$
|
|
313
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_isListOpened).call(this)) {
|
|
314
314
|
switch (e.key) {
|
|
315
315
|
case 'ArrowDown':
|
|
316
316
|
e.preventDefault();
|
|
317
317
|
e.stopPropagation();
|
|
318
|
-
__classPrivateFieldGet$
|
|
318
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
319
319
|
break;
|
|
320
320
|
case 'ArrowUp':
|
|
321
321
|
e.preventDefault();
|
|
322
322
|
e.stopPropagation();
|
|
323
|
-
__classPrivateFieldGet$
|
|
323
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
324
324
|
break;
|
|
325
325
|
case 'Enter':
|
|
326
326
|
e.preventDefault();
|
|
327
327
|
e.stopPropagation();
|
|
328
|
-
__classPrivateFieldGet$
|
|
329
|
-
__classPrivateFieldGet$
|
|
330
|
-
__classPrivateFieldGet$
|
|
328
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").select().then(() => {
|
|
329
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
330
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
331
331
|
});
|
|
332
332
|
break;
|
|
333
333
|
case 'Escape':
|
|
334
334
|
e.preventDefault();
|
|
335
335
|
e.stopPropagation();
|
|
336
|
-
__classPrivateFieldGet$
|
|
336
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
337
337
|
break;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
@@ -342,14 +342,14 @@ const KupAutocomplete = class {
|
|
|
342
342
|
case 'ArrowDown':
|
|
343
343
|
e.preventDefault();
|
|
344
344
|
e.stopPropagation();
|
|
345
|
-
__classPrivateFieldGet$
|
|
346
|
-
__classPrivateFieldGet$
|
|
345
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
346
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
347
347
|
break;
|
|
348
348
|
case 'ArrowUp':
|
|
349
349
|
e.preventDefault();
|
|
350
350
|
e.stopPropagation();
|
|
351
|
-
__classPrivateFieldGet$
|
|
352
|
-
__classPrivateFieldGet$
|
|
351
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
352
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
353
353
|
break;
|
|
354
354
|
}
|
|
355
355
|
}
|
|
@@ -382,7 +382,7 @@ const KupAutocomplete = class {
|
|
|
382
382
|
* Sets the focus to the component.
|
|
383
383
|
*/
|
|
384
384
|
async setFocus() {
|
|
385
|
-
__classPrivateFieldGet$
|
|
385
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
386
386
|
}
|
|
387
387
|
/**
|
|
388
388
|
* Sets the props to the component.
|
|
@@ -397,14 +397,14 @@ const KupAutocomplete = class {
|
|
|
397
397
|
*/
|
|
398
398
|
async setValue(value) {
|
|
399
399
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
400
|
-
__classPrivateFieldGet$
|
|
400
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
401
401
|
}
|
|
402
402
|
/*-------------------------------------------------*/
|
|
403
403
|
/* L i f e c y c l e H o o k s */
|
|
404
404
|
/*-------------------------------------------------*/
|
|
405
405
|
componentWillLoad() {
|
|
406
|
-
__classPrivateFieldGet$
|
|
407
|
-
__classPrivateFieldGet$
|
|
406
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, false);
|
|
407
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").theme.register(this);
|
|
408
408
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
409
409
|
this.value = this.initialValue;
|
|
410
410
|
if (!this.data) {
|
|
@@ -415,11 +415,11 @@ const KupAutocomplete = class {
|
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
componentDidLoad() {
|
|
418
|
-
__classPrivateFieldGet$
|
|
419
|
-
__classPrivateFieldGet$
|
|
418
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, this.value, true);
|
|
419
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, true);
|
|
420
420
|
}
|
|
421
421
|
componentWillRender() {
|
|
422
|
-
__classPrivateFieldGet$
|
|
422
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, false);
|
|
423
423
|
}
|
|
424
424
|
componentDidRender() {
|
|
425
425
|
const root = this.rootElement.shadowRoot;
|
|
@@ -431,81 +431,81 @@ const KupAutocomplete = class {
|
|
|
431
431
|
fTextFieldMdc.FTextFieldMDC(f);
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
__classPrivateFieldGet$
|
|
434
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, true);
|
|
435
435
|
}
|
|
436
436
|
render() {
|
|
437
437
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
438
438
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
439
|
-
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$
|
|
439
|
+
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$7(this, _KupAutocomplete_elStyle, "f") }, index.h("style", null, __classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$7(this, _KupAutocomplete_elStyle, "f") }, index.h(fTextField.FTextField, Object.assign({ icon: this.showDropDownIcon
|
|
440
440
|
? kupManager.KupThemeIconValues.DROPDOWN
|
|
441
441
|
: null, trailingIcon: true }, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => {
|
|
442
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
442
|
+
window.clearTimeout(__classPrivateFieldGet$7(this, _KupAutocomplete_inputTimeout, "f"));
|
|
443
443
|
__classPrivateFieldSet$4(this, _KupAutocomplete_inputTimeout, window.setTimeout(() => this.onKupInput(), this.inputDelay), "f");
|
|
444
|
-
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$
|
|
444
|
+
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_prepList).call(this)));
|
|
445
445
|
}
|
|
446
446
|
disconnectedCallback() {
|
|
447
|
-
if (__classPrivateFieldGet$
|
|
448
|
-
__classPrivateFieldGet$
|
|
449
|
-
__classPrivateFieldGet$
|
|
447
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f")) {
|
|
448
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f")]);
|
|
449
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").remove();
|
|
450
450
|
}
|
|
451
|
-
__classPrivateFieldGet$
|
|
451
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").theme.unregister(this);
|
|
452
452
|
}
|
|
453
453
|
get rootElement() { return index.getElement(this); }
|
|
454
454
|
};
|
|
455
455
|
_KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle = new WeakMap(), _KupAutocomplete_listEl = new WeakMap(), _KupAutocomplete_kupManager = new WeakMap(), _KupAutocomplete_textfieldWrapper = new WeakMap(), _KupAutocomplete_textfieldEl = new WeakMap(), _KupAutocomplete_clickCb = new WeakMap(), _KupAutocomplete_inputTimeout = new WeakMap(), _KupAutocomplete_instances = new WeakSet(), _KupAutocomplete_openList = function _KupAutocomplete_openList(forceOpen) {
|
|
456
456
|
if (forceOpen != true &&
|
|
457
|
-
__classPrivateFieldGet$
|
|
458
|
-
__classPrivateFieldGet$
|
|
457
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldEl, "f").value.length < this.minimumChars) {
|
|
458
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
459
459
|
return false;
|
|
460
460
|
}
|
|
461
|
-
__classPrivateFieldGet$
|
|
462
|
-
__classPrivateFieldGet$
|
|
463
|
-
const elStyle = __classPrivateFieldGet$
|
|
461
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f").classList.add('toggled');
|
|
462
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").menuVisible = true;
|
|
463
|
+
const elStyle = __classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").style;
|
|
464
464
|
elStyle.height = 'auto';
|
|
465
|
-
elStyle.minWidth = __classPrivateFieldGet$
|
|
466
|
-
if (__classPrivateFieldGet$
|
|
467
|
-
__classPrivateFieldGet$
|
|
465
|
+
elStyle.minWidth = __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f").clientWidth + 'px';
|
|
466
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"))) {
|
|
467
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f"));
|
|
468
468
|
}
|
|
469
469
|
else {
|
|
470
|
-
__classPrivateFieldGet$
|
|
470
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f"), 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
471
471
|
}
|
|
472
|
-
__classPrivateFieldGet$
|
|
473
|
-
if (!__classPrivateFieldGet$
|
|
472
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"));
|
|
473
|
+
if (!__classPrivateFieldGet$7(this, _KupAutocomplete_clickCb, "f")) {
|
|
474
474
|
__classPrivateFieldSet$4(this, _KupAutocomplete_clickCb, {
|
|
475
475
|
cb: () => {
|
|
476
|
-
__classPrivateFieldGet$
|
|
476
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
477
477
|
},
|
|
478
|
-
el: __classPrivateFieldGet$
|
|
478
|
+
el: __classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"),
|
|
479
479
|
}, "f");
|
|
480
480
|
}
|
|
481
|
-
__classPrivateFieldGet$
|
|
481
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").addClickCallback(__classPrivateFieldGet$7(this, _KupAutocomplete_clickCb, "f"), true);
|
|
482
482
|
return true;
|
|
483
483
|
}, _KupAutocomplete_closeList = function _KupAutocomplete_closeList() {
|
|
484
|
-
__classPrivateFieldGet$
|
|
485
|
-
__classPrivateFieldGet$
|
|
486
|
-
__classPrivateFieldGet$
|
|
487
|
-
__classPrivateFieldGet$
|
|
484
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_textfieldWrapper, "f").classList.remove('toggled');
|
|
485
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").menuVisible = false;
|
|
486
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"));
|
|
487
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet$7(this, _KupAutocomplete_clickCb, "f"));
|
|
488
488
|
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
489
|
-
return __classPrivateFieldGet$
|
|
489
|
+
return __classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
490
490
|
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, setValue) {
|
|
491
|
-
if (!__classPrivateFieldGet$
|
|
491
|
+
if (!__classPrivateFieldGet$7(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
492
492
|
return;
|
|
493
493
|
}
|
|
494
494
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
495
|
-
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$
|
|
495
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
496
496
|
if (ret.exists || this.allowInconsistentValues) {
|
|
497
497
|
if (setValue) {
|
|
498
498
|
this.value = ret.value;
|
|
499
499
|
this.displayedValue = ret.displayedValue;
|
|
500
500
|
}
|
|
501
|
-
if (__classPrivateFieldGet$
|
|
502
|
-
__classPrivateFieldGet$
|
|
501
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
502
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
else {
|
|
506
506
|
this.displayedValue = idIn;
|
|
507
|
-
if (__classPrivateFieldGet$
|
|
508
|
-
__classPrivateFieldGet$
|
|
507
|
+
if (__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
508
|
+
__classPrivateFieldGet$7(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
return ret;
|
|
@@ -1394,7 +1394,7 @@ function prepareCalendar(component) {
|
|
|
1394
1394
|
}
|
|
1395
1395
|
if (!el.kupData.value)
|
|
1396
1396
|
setValue$2(component, new Date());
|
|
1397
|
-
const months =
|
|
1397
|
+
const months = dom$8.ketchup.dates.getMonthsAsString();
|
|
1398
1398
|
const curYear = getYear(component);
|
|
1399
1399
|
const curMonth = getMonth(component);
|
|
1400
1400
|
const yearRange = getInitEndYear(curYear);
|
|
@@ -1521,7 +1521,7 @@ function createCalendar(component) {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
1523
1523
|
function createDaysCalendar(component) {
|
|
1524
|
-
const days =
|
|
1524
|
+
const days = dom$8.ketchup.dates.getDaysOfWeekAsString(getFirstDayIndex(component));
|
|
1525
1525
|
const selectedDate = getValue$1(component);
|
|
1526
1526
|
const selectedDay = getDay(component);
|
|
1527
1527
|
const selectedMonth = getMonth(component);
|
|
@@ -1557,9 +1557,9 @@ function createDaysCalendar(component) {
|
|
|
1557
1557
|
let dataIndex = {
|
|
1558
1558
|
'data-index': selectedYear.toString() +
|
|
1559
1559
|
'-' +
|
|
1560
|
-
fillString((selectedMonth + 1).toString(), '0', 2, true) +
|
|
1560
|
+
kupManager.fillString((selectedMonth + 1).toString(), '0', 2, true) +
|
|
1561
1561
|
'-' +
|
|
1562
|
-
fillString(dayCount.toString(), '0', 2, true),
|
|
1562
|
+
kupManager.fillString(dayCount.toString(), '0', 2, true),
|
|
1563
1563
|
};
|
|
1564
1564
|
if ((selectedDay != null && dayCount === selectedDay) ||
|
|
1565
1565
|
(dayCount === selectedDate.getDate() &&
|
|
@@ -1587,7 +1587,7 @@ function createDaysCalendar(component) {
|
|
|
1587
1587
|
index.h("tbody", null, tbody)));
|
|
1588
1588
|
}
|
|
1589
1589
|
function createMonthsCalendar(component) {
|
|
1590
|
-
const months =
|
|
1590
|
+
const months = dom$8.ketchup.dates.getMonthsAsString(kupManager.KupDateTimeFormatOptionsMonth.SHORT);
|
|
1591
1591
|
let selectedDay = getDay(component);
|
|
1592
1592
|
const selectedMonth = getMonth(component);
|
|
1593
1593
|
const selectedYear = getYear(component);
|
|
@@ -1602,9 +1602,9 @@ function createMonthsCalendar(component) {
|
|
|
1602
1602
|
const dataIndex = {
|
|
1603
1603
|
'data-index': selectedYear.toString() +
|
|
1604
1604
|
'-' +
|
|
1605
|
-
fillString((monthCount + 1).toString(), '0', 2, true) +
|
|
1605
|
+
kupManager.fillString((monthCount + 1).toString(), '0', 2, true) +
|
|
1606
1606
|
'-' +
|
|
1607
|
-
fillString(selectedDay.toString(), '0', 2, true),
|
|
1607
|
+
kupManager.fillString(selectedDay.toString(), '0', 2, true),
|
|
1608
1608
|
};
|
|
1609
1609
|
if (monthCount === selectedMonth) {
|
|
1610
1610
|
monthClass += ' selected';
|
|
@@ -1641,9 +1641,9 @@ function createYearsCalendar(component) {
|
|
|
1641
1641
|
let dataIndex = {
|
|
1642
1642
|
'data-index': yearCount.toString() +
|
|
1643
1643
|
'-' +
|
|
1644
|
-
fillString((selectedMonth + 1).toString(), '0', 2, true) +
|
|
1644
|
+
kupManager.fillString((selectedMonth + 1).toString(), '0', 2, true) +
|
|
1645
1645
|
'-' +
|
|
1646
|
-
fillString(selectedDay.toString(), '0', 2, true),
|
|
1646
|
+
kupManager.fillString(selectedDay.toString(), '0', 2, true),
|
|
1647
1647
|
};
|
|
1648
1648
|
if (yearCount === selectedYear) {
|
|
1649
1649
|
yearClass += ' selected';
|
|
@@ -1662,62 +1662,6 @@ function createYearsCalendar(component) {
|
|
|
1662
1662
|
return (index.h("table", { class: "calendar" },
|
|
1663
1663
|
index.h("tbody", null, tbody)));
|
|
1664
1664
|
}
|
|
1665
|
-
function getDaysOfWeekAsStringByLocale(firstDayIndex) {
|
|
1666
|
-
const thisWeekDays = thisWeek(firstDayIndex);
|
|
1667
|
-
const monday = thisWeekDays.startDate;
|
|
1668
|
-
const days = [];
|
|
1669
|
-
for (var i = 0; i < 7; i++) {
|
|
1670
|
-
var date = new Date(monday.toISOString());
|
|
1671
|
-
date.setDate(date.getDate() + i);
|
|
1672
|
-
days[i] = getDayAsStringByLocale(date);
|
|
1673
|
-
}
|
|
1674
|
-
return days;
|
|
1675
|
-
}
|
|
1676
|
-
function thisWeek(firstDayIndex) {
|
|
1677
|
-
const firstDay = firstDayThisWeek(firstDayIndex);
|
|
1678
|
-
return {
|
|
1679
|
-
startDate: firstDay,
|
|
1680
|
-
endDate: offsetDate(firstDay, 6),
|
|
1681
|
-
};
|
|
1682
|
-
}
|
|
1683
|
-
function firstDayThisWeek(firstDayIndex) {
|
|
1684
|
-
const d = new Date();
|
|
1685
|
-
const day = d.getDay();
|
|
1686
|
-
// dayIndex0
|
|
1687
|
-
d.setDate(d.getDate() - day);
|
|
1688
|
-
// dayIndexX
|
|
1689
|
-
d.setDate(d.getDate() + firstDayIndex);
|
|
1690
|
-
return d;
|
|
1691
|
-
}
|
|
1692
|
-
const offsetDate = (base, count) => {
|
|
1693
|
-
const date = new Date(base);
|
|
1694
|
-
date.setDate(base.getDate() + count);
|
|
1695
|
-
return date;
|
|
1696
|
-
};
|
|
1697
|
-
function getDayAsStringByLocale(date) {
|
|
1698
|
-
if (date == null) {
|
|
1699
|
-
return '';
|
|
1700
|
-
}
|
|
1701
|
-
const options = {
|
|
1702
|
-
weekday: 'narrow',
|
|
1703
|
-
/** weekday: 'narrow' 'short' 'long' */
|
|
1704
|
-
};
|
|
1705
|
-
const dateTimeFormat = new Intl.DateTimeFormat(dom$8.ketchup.dates.getLocale(), options);
|
|
1706
|
-
return dateTimeFormat.format(date);
|
|
1707
|
-
}
|
|
1708
|
-
function fillString(stringIn, stringForFill, finalLen, addBefore) {
|
|
1709
|
-
const initSize = stringIn.length;
|
|
1710
|
-
let stringOut = '';
|
|
1711
|
-
for (let i = initSize; i < finalLen; i += stringForFill.length) {
|
|
1712
|
-
stringOut += stringForFill;
|
|
1713
|
-
}
|
|
1714
|
-
if (addBefore) {
|
|
1715
|
-
return stringOut + stringIn;
|
|
1716
|
-
}
|
|
1717
|
-
else {
|
|
1718
|
-
return stringIn + stringOut;
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
1665
|
function prevPage(component) {
|
|
1722
1666
|
let mm = getMonth(component);
|
|
1723
1667
|
let yy = getYear(component);
|
|
@@ -6451,7 +6395,7 @@ var KupChipProps;
|
|
|
6451
6395
|
|
|
6452
6396
|
const kupChipCss = ":host{display:block}";
|
|
6453
6397
|
|
|
6454
|
-
var __classPrivateFieldGet$
|
|
6398
|
+
var __classPrivateFieldGet$6 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
6455
6399
|
if (kind === "a" && !f)
|
|
6456
6400
|
throw new TypeError("Private accessor was defined without a getter");
|
|
6457
6401
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -6520,7 +6464,7 @@ const KupChip = class {
|
|
|
6520
6464
|
this.kupChange.emit({
|
|
6521
6465
|
comp: this,
|
|
6522
6466
|
id: this.rootElement.id,
|
|
6523
|
-
stringifiedValues: __classPrivateFieldGet$
|
|
6467
|
+
stringifiedValues: __classPrivateFieldGet$6(this, _KupChip_instances, "m", _KupChip_stringifiedValues).call(this),
|
|
6524
6468
|
});
|
|
6525
6469
|
this.refresh();
|
|
6526
6470
|
}
|
|
@@ -6637,11 +6581,11 @@ const KupChip = class {
|
|
|
6637
6581
|
props.onIconClick.push((chip) => this.onKupIconClick(chip));
|
|
6638
6582
|
}
|
|
6639
6583
|
return (index.h(index.Host, { "onKup-autocomplete-itemclick": (e) => {
|
|
6640
|
-
__classPrivateFieldGet$
|
|
6584
|
+
__classPrivateFieldGet$6(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6641
6585
|
}, "onKup-combobox-itemclick": (e) => {
|
|
6642
|
-
__classPrivateFieldGet$
|
|
6586
|
+
__classPrivateFieldGet$6(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6643
6587
|
}, "onKup-textfield-change": (e) => {
|
|
6644
|
-
__classPrivateFieldGet$
|
|
6588
|
+
__classPrivateFieldGet$6(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6645
6589
|
} }, 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
6590
|
}
|
|
6647
6591
|
disconnectedCallback() {
|
|
@@ -6679,7 +6623,7 @@ _KupChip_instances = new WeakSet(), _KupChip_changeHandler =
|
|
|
6679
6623
|
this.kupChange.emit({
|
|
6680
6624
|
comp: this,
|
|
6681
6625
|
id: this.rootElement.id,
|
|
6682
|
-
stringifiedValues: __classPrivateFieldGet$
|
|
6626
|
+
stringifiedValues: __classPrivateFieldGet$6(this, _KupChip_instances, "m", _KupChip_stringifiedValues).call(this),
|
|
6683
6627
|
});
|
|
6684
6628
|
}
|
|
6685
6629
|
}
|
|
@@ -6968,7 +6912,7 @@ var KupComboboxProps;
|
|
|
6968
6912
|
|
|
6969
6913
|
const kupComboboxCss = ":host{display:block;font-size:var(--kup-font-size);width:max-content}:host([is-select]) #kup-component{transition:background-color 0.2s}:host([is-select]) #kup-component:hover{background-color:rgba(var(--kup-text-color-rgb), 0.1)}:host([is-select]) .mdc-text-field:not(.mdc-text-field--disabled) input{cursor:pointer}.kup-icon{transition:transform 0.15s}.toggled .kup-icon.kup-dropdown-icon{transform:rotate(-180deg)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
6970
6914
|
|
|
6971
|
-
var __classPrivateFieldGet$
|
|
6915
|
+
var __classPrivateFieldGet$5 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
6972
6916
|
if (kind === "a" && !f)
|
|
6973
6917
|
throw new TypeError("Private accessor was defined without a getter");
|
|
6974
6918
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -7024,33 +6968,33 @@ const KupCombobox = class {
|
|
|
7024
6968
|
comp: this,
|
|
7025
6969
|
id: this.rootElement.id,
|
|
7026
6970
|
value: this.value,
|
|
7027
|
-
inputValue: __classPrivateFieldGet$
|
|
6971
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7028
6972
|
});
|
|
7029
6973
|
}
|
|
7030
6974
|
onKupChange(value) {
|
|
7031
|
-
let ret = __classPrivateFieldGet$
|
|
6975
|
+
let ret = __classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7032
6976
|
this.kupChange.emit({
|
|
7033
6977
|
comp: this,
|
|
7034
6978
|
id: this.rootElement.id,
|
|
7035
6979
|
value: this.value,
|
|
7036
|
-
inputValue: __classPrivateFieldGet$
|
|
6980
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7037
6981
|
node: ret.node,
|
|
7038
6982
|
});
|
|
7039
6983
|
}
|
|
7040
6984
|
onKupClick() {
|
|
7041
6985
|
if (this.isSelect == true) {
|
|
7042
|
-
if (__classPrivateFieldGet$
|
|
7043
|
-
__classPrivateFieldGet$
|
|
6986
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
6987
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7044
6988
|
}
|
|
7045
6989
|
else {
|
|
7046
|
-
__classPrivateFieldGet$
|
|
6990
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7047
6991
|
}
|
|
7048
6992
|
}
|
|
7049
6993
|
this.kupClick.emit({
|
|
7050
6994
|
comp: this,
|
|
7051
6995
|
id: this.rootElement.id,
|
|
7052
6996
|
value: this.value,
|
|
7053
|
-
inputValue: __classPrivateFieldGet$
|
|
6997
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7054
6998
|
});
|
|
7055
6999
|
}
|
|
7056
7000
|
onKupFocus() {
|
|
@@ -7058,47 +7002,47 @@ const KupCombobox = class {
|
|
|
7058
7002
|
comp: this,
|
|
7059
7003
|
id: this.rootElement.id,
|
|
7060
7004
|
value: this.value,
|
|
7061
|
-
inputValue: __classPrivateFieldGet$
|
|
7005
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7062
7006
|
});
|
|
7063
7007
|
}
|
|
7064
7008
|
onKupInput() {
|
|
7065
|
-
let ret = __classPrivateFieldGet$
|
|
7066
|
-
__classPrivateFieldGet$
|
|
7009
|
+
let ret = __classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value, false);
|
|
7010
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7067
7011
|
this.kupInput.emit({
|
|
7068
7012
|
comp: this,
|
|
7069
7013
|
id: this.rootElement.id,
|
|
7070
7014
|
value: this.value,
|
|
7071
|
-
inputValue: __classPrivateFieldGet$
|
|
7015
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7072
7016
|
node: ret.node,
|
|
7073
7017
|
});
|
|
7074
7018
|
}
|
|
7075
7019
|
onKupIconClick() {
|
|
7076
|
-
if (__classPrivateFieldGet$
|
|
7077
|
-
__classPrivateFieldGet$
|
|
7020
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
7021
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7078
7022
|
}
|
|
7079
7023
|
else {
|
|
7080
|
-
__classPrivateFieldGet$
|
|
7024
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7081
7025
|
}
|
|
7082
7026
|
this.kupIconClick.emit({
|
|
7083
7027
|
comp: this,
|
|
7084
7028
|
id: this.rootElement.id,
|
|
7085
7029
|
value: this.value,
|
|
7086
|
-
inputValue: __classPrivateFieldGet$
|
|
7087
|
-
open: __classPrivateFieldGet$
|
|
7030
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7031
|
+
open: __classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled'),
|
|
7088
7032
|
});
|
|
7089
7033
|
}
|
|
7090
7034
|
onKupItemClick(e) {
|
|
7091
7035
|
this.onKupChange(e.detail.selected.id);
|
|
7092
|
-
__classPrivateFieldGet$
|
|
7093
|
-
if (__classPrivateFieldGet$
|
|
7094
|
-
__classPrivateFieldGet$
|
|
7036
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7037
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f")) {
|
|
7038
|
+
__classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7095
7039
|
}
|
|
7096
7040
|
this.kupItemClick.emit({
|
|
7097
7041
|
comp: this,
|
|
7098
7042
|
id: this.rootElement.id,
|
|
7099
7043
|
node: e.detail.selected,
|
|
7100
7044
|
value: this.value,
|
|
7101
|
-
inputValue: __classPrivateFieldGet$
|
|
7045
|
+
inputValue: __classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").value,
|
|
7102
7046
|
});
|
|
7103
7047
|
}
|
|
7104
7048
|
/*-------------------------------------------------*/
|
|
@@ -7111,30 +7055,30 @@ const KupCombobox = class {
|
|
|
7111
7055
|
/* L i s t e n e r s */
|
|
7112
7056
|
/*-------------------------------------------------*/
|
|
7113
7057
|
listenKeydown(e) {
|
|
7114
|
-
if (__classPrivateFieldGet$
|
|
7058
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7115
7059
|
switch (e.key) {
|
|
7116
7060
|
case 'ArrowDown':
|
|
7117
7061
|
e.preventDefault();
|
|
7118
7062
|
e.stopPropagation();
|
|
7119
|
-
__classPrivateFieldGet$
|
|
7063
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").focusNext();
|
|
7120
7064
|
break;
|
|
7121
7065
|
case 'ArrowUp':
|
|
7122
7066
|
e.preventDefault();
|
|
7123
7067
|
e.stopPropagation();
|
|
7124
|
-
__classPrivateFieldGet$
|
|
7068
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").focusPrevious();
|
|
7125
7069
|
break;
|
|
7126
7070
|
case 'Enter':
|
|
7127
7071
|
e.preventDefault();
|
|
7128
7072
|
e.stopPropagation();
|
|
7129
|
-
__classPrivateFieldGet$
|
|
7130
|
-
__classPrivateFieldGet$
|
|
7131
|
-
__classPrivateFieldGet$
|
|
7073
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").select().then(() => {
|
|
7074
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7075
|
+
__classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7132
7076
|
});
|
|
7133
7077
|
break;
|
|
7134
7078
|
case 'Escape':
|
|
7135
7079
|
e.preventDefault();
|
|
7136
7080
|
e.stopPropagation();
|
|
7137
|
-
__classPrivateFieldGet$
|
|
7081
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7138
7082
|
break;
|
|
7139
7083
|
}
|
|
7140
7084
|
}
|
|
@@ -7143,14 +7087,14 @@ const KupCombobox = class {
|
|
|
7143
7087
|
case 'ArrowDown':
|
|
7144
7088
|
e.preventDefault();
|
|
7145
7089
|
e.stopPropagation();
|
|
7146
|
-
__classPrivateFieldGet$
|
|
7147
|
-
__classPrivateFieldGet$
|
|
7090
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7091
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").focusNext();
|
|
7148
7092
|
break;
|
|
7149
7093
|
case 'ArrowUp':
|
|
7150
7094
|
e.preventDefault();
|
|
7151
7095
|
e.stopPropagation();
|
|
7152
|
-
__classPrivateFieldGet$
|
|
7153
|
-
__classPrivateFieldGet$
|
|
7096
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7097
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").focusPrevious();
|
|
7154
7098
|
break;
|
|
7155
7099
|
}
|
|
7156
7100
|
}
|
|
@@ -7183,7 +7127,7 @@ const KupCombobox = class {
|
|
|
7183
7127
|
* Sets the focus to the component.
|
|
7184
7128
|
*/
|
|
7185
7129
|
async setFocus() {
|
|
7186
|
-
__classPrivateFieldGet$
|
|
7130
|
+
__classPrivateFieldGet$5(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7187
7131
|
}
|
|
7188
7132
|
/**
|
|
7189
7133
|
* Sets the props to the component.
|
|
@@ -7197,14 +7141,14 @@ const KupCombobox = class {
|
|
|
7197
7141
|
* @param {string} value - Value to be set.
|
|
7198
7142
|
*/
|
|
7199
7143
|
async setValue(value) {
|
|
7200
|
-
__classPrivateFieldGet$
|
|
7144
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7201
7145
|
}
|
|
7202
7146
|
/*-------------------------------------------------*/
|
|
7203
7147
|
/* L i f e c y c l e H o o k s */
|
|
7204
7148
|
/*-------------------------------------------------*/
|
|
7205
7149
|
componentWillLoad() {
|
|
7206
|
-
__classPrivateFieldGet$
|
|
7207
|
-
__classPrivateFieldGet$
|
|
7150
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").debug.logLoad(this, false);
|
|
7151
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").theme.register(this);
|
|
7208
7152
|
this.value = this.initialValue;
|
|
7209
7153
|
if (!this.data) {
|
|
7210
7154
|
this.data = {
|
|
@@ -7214,11 +7158,11 @@ const KupCombobox = class {
|
|
|
7214
7158
|
}
|
|
7215
7159
|
}
|
|
7216
7160
|
componentDidLoad() {
|
|
7217
|
-
__classPrivateFieldGet$
|
|
7218
|
-
__classPrivateFieldGet$
|
|
7161
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, this.value, true);
|
|
7162
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").debug.logLoad(this, true);
|
|
7219
7163
|
}
|
|
7220
7164
|
componentWillRender() {
|
|
7221
|
-
__classPrivateFieldGet$
|
|
7165
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").debug.logRender(this, false);
|
|
7222
7166
|
}
|
|
7223
7167
|
componentDidRender() {
|
|
7224
7168
|
const root = this.rootElement.shadowRoot;
|
|
@@ -7230,21 +7174,21 @@ const KupCombobox = class {
|
|
|
7230
7174
|
fTextFieldMdc.FTextFieldMDC(f);
|
|
7231
7175
|
}
|
|
7232
7176
|
}
|
|
7233
|
-
__classPrivateFieldGet$
|
|
7177
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").debug.logRender(this, true);
|
|
7234
7178
|
}
|
|
7235
7179
|
render() {
|
|
7236
7180
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
7237
7181
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
7238
|
-
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$
|
|
7182
|
+
return (index.h(index.Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$5(this, _KupCombobox_elStyle, "f") }, index.h("style", null, __classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$5(this, _KupCombobox_elStyle, "f") }, index.h(fTextField.FTextField, Object.assign({}, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, icon: this.showDropDownIcon
|
|
7239
7183
|
? kupManager.KupThemeIconValues.DROPDOWN
|
|
7240
|
-
: null, readOnly: this.isSelect, trailingIcon: true, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$
|
|
7184
|
+
: null, readOnly: this.isSelect, trailingIcon: true, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
7241
7185
|
}
|
|
7242
7186
|
disconnectedCallback() {
|
|
7243
|
-
if (__classPrivateFieldGet$
|
|
7244
|
-
__classPrivateFieldGet$
|
|
7245
|
-
__classPrivateFieldGet$
|
|
7187
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f")) {
|
|
7188
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f")]);
|
|
7189
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").remove();
|
|
7246
7190
|
}
|
|
7247
|
-
__classPrivateFieldGet$
|
|
7191
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").theme.unregister(this);
|
|
7248
7192
|
}
|
|
7249
7193
|
get rootElement() { return index.getElement(this); }
|
|
7250
7194
|
static get watchers() { return {
|
|
@@ -7252,54 +7196,54 @@ const KupCombobox = class {
|
|
|
7252
7196
|
}; }
|
|
7253
7197
|
};
|
|
7254
7198
|
_KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _KupCombobox_listEl = new WeakMap(), _KupCombobox_textfieldWrapper = new WeakMap(), _KupCombobox_textfieldEl = new WeakMap(), _KupCombobox_clickCb = new WeakMap(), _KupCombobox_instances = new WeakSet(), _KupCombobox_openList = function _KupCombobox_openList() {
|
|
7255
|
-
if (__classPrivateFieldGet$
|
|
7199
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7256
7200
|
return;
|
|
7257
7201
|
}
|
|
7258
|
-
__classPrivateFieldGet$
|
|
7259
|
-
__classPrivateFieldGet$
|
|
7260
|
-
__classPrivateFieldGet$
|
|
7261
|
-
const elStyle = __classPrivateFieldGet$
|
|
7202
|
+
__classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").classList.add('toggled');
|
|
7203
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").menuVisible = true;
|
|
7204
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").filter = '';
|
|
7205
|
+
const elStyle = __classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").style;
|
|
7262
7206
|
elStyle.height = 'auto';
|
|
7263
|
-
elStyle.minWidth = __classPrivateFieldGet$
|
|
7264
|
-
if (__classPrivateFieldGet$
|
|
7265
|
-
__classPrivateFieldGet$
|
|
7207
|
+
elStyle.minWidth = __classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").clientWidth + 'px';
|
|
7208
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"))) {
|
|
7209
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"), __classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f"));
|
|
7266
7210
|
}
|
|
7267
7211
|
else {
|
|
7268
|
-
__classPrivateFieldGet$
|
|
7212
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"), __classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f"), 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
7269
7213
|
}
|
|
7270
|
-
__classPrivateFieldGet$
|
|
7271
|
-
if (!__classPrivateFieldGet$
|
|
7214
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"));
|
|
7215
|
+
if (!__classPrivateFieldGet$5(this, _KupCombobox_clickCb, "f")) {
|
|
7272
7216
|
__classPrivateFieldSet$3(this, _KupCombobox_clickCb, {
|
|
7273
7217
|
cb: () => {
|
|
7274
|
-
__classPrivateFieldGet$
|
|
7218
|
+
__classPrivateFieldGet$5(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7275
7219
|
},
|
|
7276
|
-
el: __classPrivateFieldGet$
|
|
7220
|
+
el: __classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"),
|
|
7277
7221
|
}, "f");
|
|
7278
7222
|
}
|
|
7279
|
-
__classPrivateFieldGet$
|
|
7223
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").addClickCallback(__classPrivateFieldGet$5(this, _KupCombobox_clickCb, "f"), true);
|
|
7280
7224
|
}, _KupCombobox_closeList = function _KupCombobox_closeList() {
|
|
7281
|
-
__classPrivateFieldGet$
|
|
7282
|
-
__classPrivateFieldGet$
|
|
7283
|
-
__classPrivateFieldGet$
|
|
7284
|
-
__classPrivateFieldGet$
|
|
7225
|
+
__classPrivateFieldGet$5(this, _KupCombobox_textfieldWrapper, "f").classList.remove('toggled');
|
|
7226
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").menuVisible = false;
|
|
7227
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"));
|
|
7228
|
+
__classPrivateFieldGet$5(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$5(this, _KupCombobox_clickCb, "f"));
|
|
7285
7229
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
7286
|
-
return __classPrivateFieldGet$
|
|
7230
|
+
return __classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
7287
7231
|
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, setValue) {
|
|
7288
|
-
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$
|
|
7232
|
+
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$5(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
7289
7233
|
if (ret.exists) {
|
|
7290
7234
|
if (setValue) {
|
|
7291
7235
|
this.value = ret.value;
|
|
7292
7236
|
this.displayedValue = ret.displayedValue;
|
|
7293
7237
|
}
|
|
7294
|
-
if (__classPrivateFieldGet$
|
|
7295
|
-
__classPrivateFieldGet$
|
|
7238
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f") != null) {
|
|
7239
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7296
7240
|
}
|
|
7297
7241
|
}
|
|
7298
7242
|
else {
|
|
7299
7243
|
this.value = idIn;
|
|
7300
7244
|
this.displayedValue = idIn;
|
|
7301
|
-
if (__classPrivateFieldGet$
|
|
7302
|
-
__classPrivateFieldGet$
|
|
7245
|
+
if (__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f") != null) {
|
|
7246
|
+
__classPrivateFieldGet$5(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7303
7247
|
}
|
|
7304
7248
|
}
|
|
7305
7249
|
return ret;
|
|
@@ -8085,7 +8029,7 @@ class KupColumnMenu {
|
|
|
8085
8029
|
|
|
8086
8030
|
const kupDataTableCss = ":host{--kup_datatable_background_color:var(\n --kup-datatable-background-color,\n var(--kup-background-color)\n );--kup_datatable_border:var(\n --kup-datatable-border,\n 1px solid var(--kup-border-color)\n );--kup_datatable_color:var(--kup-datatable-color, var(--kup-text-color));--kup_datatable_font_family:var(\n --kup-datatable-font-family,\n var(--kup-font-family)\n );--kup_datatable_font_family_monospace:var(\n --kup-datatable-font-family-monospace,\n var(--kup-font-family-monospace)\n );--kup_datatable_font_size:var(\n --kup-datatable-font-size,\n var(--kup-font-size)\n );--kup_datatable_th_border:var(\n --kup-datatable-th-border,\n 1px solid var(--kup-border-color)\n );--kup_datatable_th_resize_handle_width:var(\n --kup-datatable-th-resize-handle-width,\n 3px\n );display:block;font-family:var(--kup_datatable_font_family);font-size:var(--kup_datatable_font_size);position:relative}:host([kup-toolbar]) .settings-trigger{height:12px}:host([kup-toolbar]) .customize-panel{visibility:visible}:host([force-one-line]) .f-cell__text{white-space:nowrap}table{background-color:var(--kup_datatable_background_color);border-spacing:0;border-collapse:separate;color:var(--kup_datatable_color);min-width:intrinsic;min-width:-moz-max-content;min-width:-webkit-max-content;text-align:left;width:100%}table.auto-width{min-width:auto;width:0}table>tbody>tr.focus td:first-of-type,table>tbody>tr[kup-drag-over] td:first-of-type{box-shadow:inset 4px 0px 0px 0px var(--kup-secondary-color)}table>tbody>tr>td:first-of-type,table>tbody>tr>td.placeholder~td:not(.placeholder){border-left:var(--kup_datatable_border)}table>tbody>tr>td:last-of-type{border-right:var(--kup_datatable_border)}table>tbody>tr:last-of-type>td{border-bottom:var(--kup_datatable_border)}table.border-top>tbody>tr:first-of-type>td{border-top:var(--kup_datatable_border)}table.row-separation>tbody>tr>td{border-bottom:var(--kup_datatable_border)}table.column-separation>tbody>tr>td{border-right:var(--kup_datatable_border)}table.noGrid,table.noGrid td{border:none}table tfoot td{border-bottom:var(--kup_datatable_border);border-right:var(--kup_datatable_border);box-sizing:border-box;height:36px;text-align:right;font-weight:bold;padding:0.5em 0.3125em}table tfoot td:hover{background-color:var(--kup_datatable_background_color)}table tfoot td:first-of-type{border-left:var(--kup_datatable_border)}#global-filter{margin:0.5em 0px;min-width:140px;width:100%}.kup-icon:not(.f-image){background-color:var(--kup-title-color);margin:0 0.25em;height:1.25em;width:1.25em}.kup-icon:not(.f-image).kup-ascending-icon,.kup-icon:not(.f-image).kup-descending-icon,.kup-icon:not(.f-image).kup-key-icon,.kup-icon:not(.f-image).kup-filter-remove-icon{height:auto}.kup-icon:not(.f-image).kup-collapsed-icon,.kup-icon:not(.f-image).kup-expanded-icon{float:left}.kup-icon:not(.f-image).kup-filter-remove-icon,.kup-icon:not(.f-image).kup-key-icon{margin:0 0.25em}.below-wrapper{backface-visibility:hidden;height:auto;overflow:auto}.below-wrapper.custom-size{overflow:unset}.below-wrapper:not(.custom-size){overflow-x:auto}.density-dense tbody>tr.group td{padding-top:0.25em;padding-bottom:0.25em}.density-wide tbody>tr.group>td{padding-top:0.75em;padding-bottom:0.75em}.fontsize-small{font-size:calc(var(--kup_datatable_font_size) * 0.75);transition:font-size 0.1s}.fontsize-small .group-cell-content>span:before{font-size:calc(var(--kup_datatable_font_size) * 1) !important}.fontsize-big{font-size:calc(var(--kup_datatable_font_size) * 1.25);transition:font-size 0.1s}.fontsize-big .group-cell-content>span:before{font-size:calc(var(--kup_datatable_font_size) * 1.5) !important}th{background-color:var(--kup-title-background-color);border:var(--kup_datatable_th_border);border-left:0 none;border-bottom-width:2px;box-sizing:border-box;top:0;touch-action:none;transition:background-color 0.25s ease;user-select:none}th:first-of-type{border-left:var(--kup_datatable_th_border)}.header-cell__content{color:var(--kup-title-color);display:flex;justify-content:space-between;padding:0.5em 0.3125em;text-overflow:ellipsis;white-space:nowrap}.header-cell--centered .header-cell__content{justify-content:center}.header-cell--is-number .header-cell__content{justify-content:flex-end}.header-cell__title{overflow:hidden;text-overflow:ellipsis;user-select:none}.header-cell__icons{display:flex}.header-cell__drag-handler{background:rgba(var(--kup-title-color-rgb), 0.25);height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:var(--kup_datatable_th_resize_handle_width)}.header-cell__drag-handler:hover{background:rgba(var(--kup-title-color-rgb), 0.5)}.header-cell--sortable{cursor:pointer}.header-cell--is-icon{width:30px}tbody{cursor:auto}tbody td{height:0;padding:0}tbody td>*{border:none !important}tbody tr kup-button{max-width:max-content}tbody tr[kup-draggable]{opacity:0.5}tbody tr.selected td{background-color:rgba(var(--kup-primary-color-rgb), 0.175)}tbody tr:hover:not(.group):not(.selected) td{color:var(--kup-hover-color);background-color:var(--kup-hover-background-color)}tbody tr.group{background:var(--kup-title-background-color);border-top:var(--kup_datatable_border);color:var(--kup-title-color);font-weight:bold;cursor:pointer}tbody tr.group.group-label{border-bottom:none}tbody tr.group.group-total{border-top:none;line-height:0.5em}tbody tr.group>td{padding:0.5em 0}tbody tr.group>td .group-cell-content .indent{float:left;margin-left:0.25em}tbody tr.group>td .group-cell-content>span{display:inline-flex;outline:none;margin-left:0.25em}tbody tr.group>td.total{text-align:right;padding:0.5em 0.3125em}tbody tr.group>td.total.negative-number{color:var(--kup-danger-color)}tbody tr>td{box-sizing:border-box;transition:box-shadow 0.1s}tbody tr>td .row-expander{margin-right:0.5em}tbody tr>td .row-action{margin-right:0.2em}tbody tr [row-select-cell]{min-height:40px}tbody tr td[row-action-cell]{width:calc(3em * var(--kup_datatable_row_actions))}tbody tr td[row-action-cell] .f-image{cursor:pointer;margin-left:0.75em;display:inline-block;opacity:1;transition:0.25s ease-in-out}tbody tr td[row-action-cell] .f-image:hover{opacity:0.5}.above-wrapper{display:flex;width:100%}.kup-icon.overlay-action{display:none;position:absolute;top:0.5em;left:calc(50% - 0.625em)}th:hover .kup-icon.overlay-action{display:block}thead th{position:relative}th.obj:hover span:not(.overlay-action){opacity:0.5}.hidden span{color:transparent;position:relative;text-overflow:ellipsis;transition:color 200ms}.hidden span:hover{color:var(--kup_datatable_color)}.group-wrapper{--kup-chip-margin:0 4px}.totals-value{font-weight:bold}.settings-trigger{cursor:pointer;display:block;width:32px;height:0;border-top-left-radius:25px 30px;border-top-right-radius:25px 30px;background-color:var(--kup-border-color);transition:height 0.25s}.settings-trigger.toggled{background-color:var(--kup-primary-color)}.settings-trigger.toggled .f-image__icon{background:var(--kup-text-on-primary-color) !important}.indent{display:inline-block;height:1em;width:2em}.indent~kup-image,.indent~kup-button{margin:0;vertical-align:middle}.indent~kup-image{display:inline-block}.indent~kup-button,.indent~kup-checkbox{display:inline-block}.actions-wrapper{display:flex}.insert-button,.delete-button,.save-button{padding:1em 0.5em}.kup-icon.kup-ascending-icon{-webkit-mask:var(--kup-ascending-icon);mask:var(--kup-ascending-icon)}.kup-icon.kup-collapsed-icon{-webkit-mask:var(--kup-collapsed-icon);mask:var(--kup-collapsed-icon)}.kup-icon.kup-descending-icon{-webkit-mask:var(--kup-descending-icon);mask:var(--kup-descending-icon)}.kup-icon.kup-expanded-icon{-webkit-mask:var(--kup-expanded-icon);mask:var(--kup-expanded-icon)}.kup-icon.kup-filter-remove-icon{-webkit-mask:var(--kup-filter-remove-icon);mask:var(--kup-filter-remove-icon)}.kup-icon.kup-key-icon{-webkit-mask:var(--kup-key-icon);mask:var(--kup-key-icon)}.paginator-wrapper{display:flex;flex-flow:wrap;min-width:max-content}.paginator-tabs{width:100%}.paginator-tabs kup-paginator{display:inline-flex}.paginator-tabs kup-button{position:relative;height:100%;margin-left:0.25em;float:right}.paginator-tabs .load-more-button{margin:0.5em 0px 0px}sticky-header{display:none}.persistent-header~sticky-header{background:var(--kup-title-background-color);border-bottom:2px solid var(--kup-border-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);color:var(--kup-title-color);display:block;opacity:0;overflow:hidden;pointer-events:none;position:fixed;top:0;transition:opacity 0.25s ease-in-out;z-index:10}.persistent-header~sticky-header.activated{opacity:1;pointer-events:all}.persistent-header~sticky-header[hidden]{display:none}.persistent-header~sticky-header tr-sticky{display:inline-flex}.persistent-header~sticky-header th-sticky{box-sizing:border-box;display:inline-flex;padding:0 0.3125em}.persistent-header~sticky-header th-sticky .header-cell__content{width:100%}.fixed-column,.fixed-row{background-color:var(--kup_datatable_background_color);color:var(--kup-text-color);position:sticky}thead .fixed-column,thead .fixed-row,tfoot .fixed-column,tfoot .fixed-row{z-index:10}table.custom-size th{position:sticky;top:0;z-index:10}table.custom-size th.fixed-column{z-index:11}tr:hover .fixed-row,tr:hover .fixed-column{color:var(--kup-hover-color);background-color:var(--kup-hover-background-color)}tr.selected .fixed-column,tr.selected .fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-primary-color-rgb), 0.175) 0%, rgba(var(--kup-primary-color-rgb), 0.175) 0.1%, rgba(var(--kup-primary-color-rgb), 0.175))}.fixed-row{top:0;z-index:4}.fixed-column{left:0;z-index:6}.fixed-column.fixed-row{z-index:8}thead tr .fixed-column,thead tr:hover:not(.group):not(.selected) .fixed-column{background-color:var(--kup-title-background-color);color:var(--kup-title-color)}tfoot tr:hover:not(.group):not(.selected) .fixed-row,tfoot tr:hover:not(.group):not(.selected) .fixed-column{color:var(--kup-text-color);background-color:var(--kup_datatable_background_color)}:host([drag-enabled]) tr{touch-action:none}th[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}th[kup-draggable]{cursor:grabbing !important;opacity:0.5}.droparea{animation:fade-in 0.25s ease-out;background:var(--kup_datatable_background_color);border-radius:8px;box-shadow:var(--kup-box-shadow);display:none;padding:1em 0.5em}.droparea--visible{display:flex}.droparea__groups{border:2px dashed var(--kup-text-color)}.droparea__remove{border:2px dashed var(--kup-danger-color)}.droparea__groups,.droparea__remove{background:var(--kup_datatable_background_color);box-shadow:var(--kup-box-shadow);display:block;height:50px;margin:0 0.5em;opacity:0.5;position:relative;transition:opacity 0.25s;width:50px}.droparea__groups .f-image,.droparea__remove .f-image{width:100%;position:absolute}.droparea__groups .f-image:first-of-type,.droparea__remove .f-image:first-of-type{opacity:1}.droparea__groups .f-image:last-of-type,.droparea__remove .f-image:last-of-type{opacity:0}.droparea__groups[kup-drag-over],.droparea__remove[kup-drag-over]{opacity:1}.droparea__groups[kup-drag-over] .f-image:first-of-type,.droparea__remove[kup-drag-over] .f-image:first-of-type{opacity:0}.droparea__groups[kup-drag-over] .f-image:last-of-type,.droparea__remove[kup-drag-over] .f-image:last-of-type{opacity:1}:host(.kup-cross-selection) #kup-component th.selected{box-shadow:inset 0px 4px 0px 0px var(--kup-secondary-color)}:host(.kup-cross-selection) #kup-component td.selected{background-color:rgba(var(--kup-text-color-rgb), 0.075)}:host(.kup-cross-selection) #kup-component td.selected.fixed-column,:host(.kup-cross-selection) #kup-component td.selected.fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.075) 0%, rgba(var(--kup-text-color-rgb), 0.075) 0.1%, rgba(var(--kup-text-color-rgb), 0.075))}:host(.kup-cross-selection) #kup-component tr.selected td{background-color:rgba(var(--kup-text-color-rgb), 0.075)}:host(.kup-cross-selection) #kup-component tr.selected td:first-of-type{box-shadow:inset 4px 0px 0px 0px var(--kup-secondary-color)}:host(.kup-cross-selection) #kup-component tr.selected td.selected{background-color:rgba(var(--kup-text-color-rgb), 0.15)}:host(.kup-cross-selection) #kup-component tr.selected td.fixed-column,:host(.kup-cross-selection) #kup-component tr.selected td.fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.075) 0%, rgba(var(--kup-text-color-rgb), 0.075) 0.1%, rgba(var(--kup-text-color-rgb), 0.075))}:host(.kup-cross-selection) #kup-component tr.selected td.fixed-column.selected,:host(.kup-cross-selection) #kup-component tr.selected td.fixed-row.selected{background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.15) 0%, rgba(var(--kup-text-color-rgb), 0.15) 0.1%, rgba(var(--kup-text-color-rgb), 0.15))}:host(.kup-layout-fixed) #kup-component table{table-layout:fixed;width:100%}tr.clickable{cursor:pointer}";
|
|
8087
8031
|
|
|
8088
|
-
var __classPrivateFieldGet$
|
|
8032
|
+
var __classPrivateFieldGet$4 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8089
8033
|
if (kind === "a" && !f)
|
|
8090
8034
|
throw new TypeError("Private accessor was defined without a getter");
|
|
8091
8035
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -8197,18 +8141,18 @@ const KupDataTable = class {
|
|
|
8197
8141
|
_KupDataTable_MESSAGE_WRAPPER_ID.set(this, 'messageWrapper');
|
|
8198
8142
|
_KupDataTable_INSERT_PREFIX.set(this, 'insert_');
|
|
8199
8143
|
_KupDataTable_stickyHeaderPosition.set(this, () => {
|
|
8200
|
-
if (__classPrivateFieldGet$
|
|
8201
|
-
if (__classPrivateFieldGet$
|
|
8202
|
-
if (!__classPrivateFieldGet$
|
|
8203
|
-
__classPrivateFieldGet$
|
|
8204
|
-
__classPrivateFieldGet$
|
|
8144
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f")) {
|
|
8145
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_tableIntersecting, "f")) {
|
|
8146
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_theadIntersecting, "f")) {
|
|
8147
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_updateStickyHeaderSize).call(this);
|
|
8148
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").classList.add('activated');
|
|
8205
8149
|
}
|
|
8206
8150
|
else {
|
|
8207
|
-
__classPrivateFieldGet$
|
|
8151
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").classList.remove('activated');
|
|
8208
8152
|
}
|
|
8209
8153
|
}
|
|
8210
8154
|
else {
|
|
8211
|
-
__classPrivateFieldGet$
|
|
8155
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").classList.remove('activated');
|
|
8212
8156
|
}
|
|
8213
8157
|
}
|
|
8214
8158
|
});
|
|
@@ -8302,7 +8246,7 @@ const KupDataTable = class {
|
|
|
8302
8246
|
if (this.store && this.stateId) {
|
|
8303
8247
|
const state = this.store.getState(this.stateId);
|
|
8304
8248
|
if (state != null) {
|
|
8305
|
-
__classPrivateFieldGet$
|
|
8249
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Initializing stateId ' + this.stateId);
|
|
8306
8250
|
// *** PROPS ***
|
|
8307
8251
|
this.filters = Object.assign({}, state.filters);
|
|
8308
8252
|
this.groups = [...state.groups];
|
|
@@ -8338,116 +8282,116 @@ const KupDataTable = class {
|
|
|
8338
8282
|
persistState() {
|
|
8339
8283
|
if (this.store && this.stateId) {
|
|
8340
8284
|
let somethingChanged = false;
|
|
8341
|
-
if (!__classPrivateFieldGet$
|
|
8285
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.filters, this.filters)) {
|
|
8342
8286
|
this.state.filters = Object.assign({}, this.filters);
|
|
8343
8287
|
somethingChanged = true;
|
|
8344
8288
|
}
|
|
8345
|
-
if (!__classPrivateFieldGet$
|
|
8289
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.groups, this.groups)) {
|
|
8346
8290
|
this.state.groups = [...this.groups];
|
|
8347
8291
|
somethingChanged = true;
|
|
8348
8292
|
}
|
|
8349
|
-
if (!__classPrivateFieldGet$
|
|
8293
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sort, this.sort)) {
|
|
8350
8294
|
this.state.sort = [...this.sort];
|
|
8351
8295
|
somethingChanged = true;
|
|
8352
8296
|
}
|
|
8353
|
-
if (!__classPrivateFieldGet$
|
|
8297
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.expandGroups, this.expandGroups)) {
|
|
8354
8298
|
this.state.expandGroups = this.expandGroups;
|
|
8355
8299
|
somethingChanged = true;
|
|
8356
8300
|
}
|
|
8357
|
-
if (!__classPrivateFieldGet$
|
|
8301
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.groupLabelDisplay, this.groupLabelDisplay)) {
|
|
8358
8302
|
this.state.groupLabelDisplay = this.groupLabelDisplay;
|
|
8359
8303
|
somethingChanged = true;
|
|
8360
8304
|
}
|
|
8361
|
-
if (!__classPrivateFieldGet$
|
|
8305
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.density, this.density)) {
|
|
8362
8306
|
this.state.density = this.density;
|
|
8363
8307
|
somethingChanged = true;
|
|
8364
8308
|
}
|
|
8365
|
-
if (!__classPrivateFieldGet$
|
|
8309
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.enableExtraColumns, this.enableExtraColumns)) {
|
|
8366
8310
|
this.state.enableExtraColumns = this.enableExtraColumns;
|
|
8367
8311
|
somethingChanged = true;
|
|
8368
8312
|
}
|
|
8369
|
-
if (!__classPrivateFieldGet$
|
|
8313
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.enableSortableColumns, this.enableSortableColumns)) {
|
|
8370
8314
|
this.state.enableSortableColumns = this.enableSortableColumns;
|
|
8371
8315
|
somethingChanged = true;
|
|
8372
8316
|
}
|
|
8373
|
-
if (!__classPrivateFieldGet$
|
|
8317
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.forceOneLine, this.forceOneLine)) {
|
|
8374
8318
|
this.state.forceOneLine = this.forceOneLine;
|
|
8375
8319
|
somethingChanged = true;
|
|
8376
8320
|
}
|
|
8377
|
-
if (!__classPrivateFieldGet$
|
|
8321
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.globalFilter, this.globalFilter)) {
|
|
8378
8322
|
this.state.globalFilter = this.globalFilter;
|
|
8379
8323
|
somethingChanged = true;
|
|
8380
8324
|
}
|
|
8381
|
-
if (!__classPrivateFieldGet$
|
|
8325
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
8382
8326
|
this.state.globalFilterValue = this.globalFilterValue;
|
|
8383
8327
|
somethingChanged = true;
|
|
8384
8328
|
}
|
|
8385
|
-
if (!__classPrivateFieldGet$
|
|
8329
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.headerIsPersistent, this.headerIsPersistent)) {
|
|
8386
8330
|
this.state.headerIsPersistent = this.headerIsPersistent;
|
|
8387
8331
|
somethingChanged = true;
|
|
8388
8332
|
}
|
|
8389
|
-
if (!__classPrivateFieldGet$
|
|
8333
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.lazyLoadRows, this.lazyLoadRows)) {
|
|
8390
8334
|
this.state.lazyLoadRows = this.lazyLoadRows;
|
|
8391
8335
|
somethingChanged = true;
|
|
8392
8336
|
}
|
|
8393
|
-
if (!__classPrivateFieldGet$
|
|
8337
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.loadMoreLimit, this.loadMoreLimit)) {
|
|
8394
8338
|
this.state.loadMoreLimit = this.loadMoreLimit;
|
|
8395
8339
|
somethingChanged = true;
|
|
8396
8340
|
}
|
|
8397
|
-
if (!__classPrivateFieldGet$
|
|
8341
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.selection, this.selection)) {
|
|
8398
8342
|
this.state.selection = this.selection;
|
|
8399
8343
|
somethingChanged = true;
|
|
8400
8344
|
}
|
|
8401
|
-
if (!__classPrivateFieldGet$
|
|
8345
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
|
|
8402
8346
|
this.state.rowsPerPage = this.currentRowsPerPage;
|
|
8403
8347
|
somethingChanged = true;
|
|
8404
8348
|
}
|
|
8405
|
-
if (!__classPrivateFieldGet$
|
|
8349
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showFilters, this.showFilters)) {
|
|
8406
8350
|
this.state.showFilters = this.showFilters;
|
|
8407
8351
|
somethingChanged = true;
|
|
8408
8352
|
}
|
|
8409
|
-
if (!__classPrivateFieldGet$
|
|
8353
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showGroups, this.showGroups)) {
|
|
8410
8354
|
this.state.showGroups = this.showGroups;
|
|
8411
8355
|
somethingChanged = true;
|
|
8412
8356
|
}
|
|
8413
|
-
if (!__classPrivateFieldGet$
|
|
8357
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showHeader, this.showHeader)) {
|
|
8414
8358
|
this.state.showHeader = this.showHeader;
|
|
8415
8359
|
somethingChanged = true;
|
|
8416
8360
|
}
|
|
8417
|
-
if (!__classPrivateFieldGet$
|
|
8361
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showLoadMore, this.showLoadMore)) {
|
|
8418
8362
|
this.state.showLoadMore = this.showLoadMore;
|
|
8419
8363
|
somethingChanged = true;
|
|
8420
8364
|
}
|
|
8421
|
-
if (!__classPrivateFieldGet$
|
|
8365
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sortEnabled, this.sortEnabled)) {
|
|
8422
8366
|
this.state.sortEnabled = this.sortEnabled;
|
|
8423
8367
|
somethingChanged = true;
|
|
8424
8368
|
}
|
|
8425
|
-
if (!__classPrivateFieldGet$
|
|
8369
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sortableColumnsMutateData, this.sortableColumnsMutateData)) {
|
|
8426
8370
|
this.state.sortableColumnsMutateData =
|
|
8427
8371
|
this.sortableColumnsMutateData;
|
|
8428
8372
|
somethingChanged = true;
|
|
8429
8373
|
}
|
|
8430
|
-
if (!__classPrivateFieldGet$
|
|
8374
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.pageSelected, this.currentPage)) {
|
|
8431
8375
|
this.state.pageSelected = this.currentPage;
|
|
8432
8376
|
somethingChanged = true;
|
|
8433
8377
|
}
|
|
8434
|
-
if (!__classPrivateFieldGet$
|
|
8378
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.dragEnabled, this.dragEnabled)) {
|
|
8435
8379
|
this.state.dragEnabled = this.dragEnabled;
|
|
8436
8380
|
somethingChanged = true;
|
|
8437
8381
|
}
|
|
8438
|
-
if (!__classPrivateFieldGet$
|
|
8382
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.dropEnabled, this.dropEnabled)) {
|
|
8439
8383
|
this.state.dropEnabled = this.dropEnabled;
|
|
8440
8384
|
somethingChanged = true;
|
|
8441
8385
|
}
|
|
8442
|
-
if (!__classPrivateFieldGet$
|
|
8386
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showFooter, this.showFooter)) {
|
|
8443
8387
|
this.state.showFooter = this.showFooter;
|
|
8444
8388
|
somethingChanged = true;
|
|
8445
8389
|
}
|
|
8446
|
-
if (!__classPrivateFieldGet$
|
|
8390
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.totals, this.totals)) {
|
|
8447
8391
|
this.state.totals = Object.assign({}, this.totals);
|
|
8448
8392
|
somethingChanged = true;
|
|
8449
8393
|
}
|
|
8450
|
-
if (!__classPrivateFieldGet$
|
|
8394
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.selectRowsById, this.selectedRows.reduce((accumulator, row, currentIndex) => {
|
|
8451
8395
|
const prefix = currentIndex > 0 ? ';' : '';
|
|
8452
8396
|
return accumulator + prefix + row.id;
|
|
8453
8397
|
}, ''))) {
|
|
@@ -8462,7 +8406,7 @@ const KupDataTable = class {
|
|
|
8462
8406
|
return;
|
|
8463
8407
|
}
|
|
8464
8408
|
if (somethingChanged) {
|
|
8465
|
-
__classPrivateFieldGet$
|
|
8409
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
|
|
8466
8410
|
this.store.persistState(this.stateId, this.state);
|
|
8467
8411
|
}
|
|
8468
8412
|
}
|
|
@@ -8471,33 +8415,33 @@ const KupDataTable = class {
|
|
|
8471
8415
|
this.currentRowsPerPage = newValue;
|
|
8472
8416
|
}
|
|
8473
8417
|
expandGroupsHandler() {
|
|
8474
|
-
if (!__classPrivateFieldGet$
|
|
8418
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_isRestoringState, "f")) {
|
|
8475
8419
|
this.recalculateRows();
|
|
8476
8420
|
// reset group state
|
|
8477
8421
|
this.groupState = {};
|
|
8478
|
-
__classPrivateFieldGet$
|
|
8422
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_forceGroupExpansion).call(this);
|
|
8479
8423
|
}
|
|
8480
8424
|
}
|
|
8481
8425
|
filtersChanged() {
|
|
8482
8426
|
this.expandGroupsHandler();
|
|
8483
8427
|
}
|
|
8484
8428
|
recalculateRows() {
|
|
8485
|
-
if (!__classPrivateFieldGet$
|
|
8486
|
-
__classPrivateFieldGet$
|
|
8429
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_isRestoringState, "f")) {
|
|
8430
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
8487
8431
|
}
|
|
8488
8432
|
}
|
|
8489
8433
|
identifyAndInitRows() {
|
|
8490
8434
|
kupManager.identify(this.getRows());
|
|
8491
8435
|
this.expandGroupsHandler();
|
|
8492
|
-
__classPrivateFieldGet$
|
|
8436
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8493
8437
|
}
|
|
8494
8438
|
recalculateRowsAndUndoSelections() {
|
|
8495
|
-
if (!__classPrivateFieldGet$
|
|
8439
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_isRestoringState, "f")) {
|
|
8496
8440
|
this.recalculateRows();
|
|
8497
8441
|
// reset group state
|
|
8498
8442
|
this.groupState = {};
|
|
8499
|
-
__classPrivateFieldGet$
|
|
8500
|
-
__classPrivateFieldGet$
|
|
8443
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_forceGroupExpansion).call(this);
|
|
8444
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8501
8445
|
}
|
|
8502
8446
|
}
|
|
8503
8447
|
controlFixedRowsColumns() {
|
|
@@ -8513,8 +8457,8 @@ const KupDataTable = class {
|
|
|
8513
8457
|
}
|
|
8514
8458
|
}
|
|
8515
8459
|
recalculateData() {
|
|
8516
|
-
if (__classPrivateFieldGet$
|
|
8517
|
-
__classPrivateFieldGet$
|
|
8460
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_initialized, "f")) {
|
|
8461
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_calculateData).call(this);
|
|
8518
8462
|
}
|
|
8519
8463
|
}
|
|
8520
8464
|
/**
|
|
@@ -8522,14 +8466,14 @@ const KupDataTable = class {
|
|
|
8522
8466
|
*/
|
|
8523
8467
|
async closeColumnMenu() {
|
|
8524
8468
|
this.columnMenuAnchor = null;
|
|
8525
|
-
if (__classPrivateFieldGet$
|
|
8526
|
-
__classPrivateFieldGet$
|
|
8469
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f")) {
|
|
8470
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").data = null;
|
|
8527
8471
|
}
|
|
8528
|
-
__classPrivateFieldGet$
|
|
8472
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").close(__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"));
|
|
8529
8473
|
this.kupDataTableColumnMenu.emit({
|
|
8530
8474
|
comp: this,
|
|
8531
8475
|
id: this.rootElement.id,
|
|
8532
|
-
card: __classPrivateFieldGet$
|
|
8476
|
+
card: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"),
|
|
8533
8477
|
event: null,
|
|
8534
8478
|
open: false,
|
|
8535
8479
|
});
|
|
@@ -8572,8 +8516,8 @@ const KupDataTable = class {
|
|
|
8572
8516
|
* Closes the insert new record card (called by backend, on success)
|
|
8573
8517
|
*/
|
|
8574
8518
|
async closeInsertCard() {
|
|
8575
|
-
if (__classPrivateFieldGet$
|
|
8576
|
-
__classPrivateFieldGet$
|
|
8519
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f")) {
|
|
8520
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").remove();
|
|
8577
8521
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, null, "f");
|
|
8578
8522
|
}
|
|
8579
8523
|
}
|
|
@@ -8581,8 +8525,8 @@ const KupDataTable = class {
|
|
|
8581
8525
|
* Closes the delete confirm card (called by backend, on success)
|
|
8582
8526
|
*/
|
|
8583
8527
|
async closeConfirmDeleteCard() {
|
|
8584
|
-
if (__classPrivateFieldGet$
|
|
8585
|
-
__classPrivateFieldGet$
|
|
8528
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteDialog, "f")) {
|
|
8529
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteDialog, "f").close();
|
|
8586
8530
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteCard, null, "f");
|
|
8587
8531
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteDialog, null, "f");
|
|
8588
8532
|
}
|
|
@@ -8592,23 +8536,23 @@ const KupDataTable = class {
|
|
|
8592
8536
|
*/
|
|
8593
8537
|
async getCards() {
|
|
8594
8538
|
const obj = {};
|
|
8595
|
-
if (__classPrivateFieldGet$
|
|
8539
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f")) {
|
|
8596
8540
|
obj['insertCard'] = {
|
|
8597
|
-
el: __classPrivateFieldGet$
|
|
8598
|
-
messageWrapper: __classPrivateFieldGet$
|
|
8599
|
-
message: __classPrivateFieldGet$
|
|
8600
|
-
submitButton: __classPrivateFieldGet$
|
|
8601
|
-
cancelButton: __classPrivateFieldGet$
|
|
8602
|
-
form: __classPrivateFieldGet$
|
|
8541
|
+
el: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f"),
|
|
8542
|
+
messageWrapper: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f")),
|
|
8543
|
+
message: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_ID, "f")),
|
|
8544
|
+
submitButton: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_SUBMIT_ID, "f")),
|
|
8545
|
+
cancelButton: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_CANCEL_ID, "f")),
|
|
8546
|
+
form: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_FIELDS_FORM_ID, "f")),
|
|
8603
8547
|
};
|
|
8604
8548
|
}
|
|
8605
|
-
if (__classPrivateFieldGet$
|
|
8549
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f")) {
|
|
8606
8550
|
obj['confirmDeleteCard'] = {
|
|
8607
|
-
el: __classPrivateFieldGet$
|
|
8608
|
-
messageWrapper: __classPrivateFieldGet$
|
|
8609
|
-
message: __classPrivateFieldGet$
|
|
8610
|
-
submitButton: __classPrivateFieldGet$
|
|
8611
|
-
cancelButton: __classPrivateFieldGet$
|
|
8551
|
+
el: __classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f"),
|
|
8552
|
+
messageWrapper: __classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f")),
|
|
8553
|
+
message: __classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_ID, "f")),
|
|
8554
|
+
submitButton: __classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_SUBMIT_ID, "f")),
|
|
8555
|
+
cancelButton: __classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_CANCEL_ID, "f")),
|
|
8612
8556
|
};
|
|
8613
8557
|
}
|
|
8614
8558
|
/*
|
|
@@ -8662,7 +8606,7 @@ const KupDataTable = class {
|
|
|
8662
8606
|
* @param {KupDataColumn} column - Column to hide.
|
|
8663
8607
|
*/
|
|
8664
8608
|
async hideColumn(column) {
|
|
8665
|
-
__classPrivateFieldGet$
|
|
8609
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").data.column.hide(this.data, [column.name]);
|
|
8666
8610
|
this.kupColumnRemove.emit({
|
|
8667
8611
|
comp: this,
|
|
8668
8612
|
id: this.rootElement.id,
|
|
@@ -8677,7 +8621,7 @@ const KupDataTable = class {
|
|
|
8677
8621
|
* @returns {string|KupDataColumn} Returns the new column created or a string containing the error message if something went wrong.
|
|
8678
8622
|
*/
|
|
8679
8623
|
async newColumn(type, options) {
|
|
8680
|
-
const result = __classPrivateFieldGet$
|
|
8624
|
+
const result = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").data.column.new(this.data, type, options);
|
|
8681
8625
|
this.refresh();
|
|
8682
8626
|
return result;
|
|
8683
8627
|
}
|
|
@@ -8687,40 +8631,40 @@ const KupDataTable = class {
|
|
|
8687
8631
|
*/
|
|
8688
8632
|
async openColumnMenu(column) {
|
|
8689
8633
|
this.columnMenuAnchor = column;
|
|
8690
|
-
if (!__classPrivateFieldGet$
|
|
8634
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f")) {
|
|
8691
8635
|
__classPrivateFieldSet$2(this, _KupDataTable_columnMenuCard, document.createElement('kup-card'), "f");
|
|
8692
|
-
__classPrivateFieldGet$
|
|
8693
|
-
__classPrivateFieldGet$
|
|
8694
|
-
__classPrivateFieldGet$
|
|
8695
|
-
__classPrivateFieldGet$
|
|
8696
|
-
__classPrivateFieldGet$
|
|
8636
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").isMenu = true;
|
|
8637
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").layoutNumber = 12;
|
|
8638
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").sizeX = 'auto';
|
|
8639
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").sizeY = 'auto';
|
|
8640
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").addEventListener('kup-card-click', (e) => {
|
|
8697
8641
|
this.kupDataTableColumnMenu.emit({
|
|
8698
8642
|
comp: this,
|
|
8699
8643
|
id: this.rootElement.id,
|
|
8700
|
-
card: __classPrivateFieldGet$
|
|
8644
|
+
card: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"),
|
|
8701
8645
|
event: e,
|
|
8702
|
-
open: __classPrivateFieldGet$
|
|
8646
|
+
open: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").menuVisible,
|
|
8703
8647
|
});
|
|
8704
8648
|
});
|
|
8705
|
-
__classPrivateFieldGet$
|
|
8706
|
-
__classPrivateFieldGet$
|
|
8649
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").addEventListener('kup-card-event', (e) => {
|
|
8650
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").eventHandlers(e, this);
|
|
8707
8651
|
this.kupDataTableColumnMenu.emit({
|
|
8708
8652
|
comp: this,
|
|
8709
8653
|
id: this.rootElement.id,
|
|
8710
|
-
card: __classPrivateFieldGet$
|
|
8654
|
+
card: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"),
|
|
8711
8655
|
event: e,
|
|
8712
|
-
open: __classPrivateFieldGet$
|
|
8656
|
+
open: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").menuVisible,
|
|
8713
8657
|
});
|
|
8714
8658
|
});
|
|
8715
8659
|
}
|
|
8716
|
-
__classPrivateFieldGet$
|
|
8717
|
-
__classPrivateFieldGet$
|
|
8718
|
-
__classPrivateFieldGet$
|
|
8719
|
-
__classPrivateFieldGet$
|
|
8660
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").setAttribute('data-column', column);
|
|
8661
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").data = __classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").prepData(this, kupManager.getColumnByName(this.getVisibleColumns(), column));
|
|
8662
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").open(this, column);
|
|
8663
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").reposition(this, __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"));
|
|
8720
8664
|
this.kupDataTableColumnMenu.emit({
|
|
8721
8665
|
comp: this,
|
|
8722
8666
|
id: this.rootElement.id,
|
|
8723
|
-
card: __classPrivateFieldGet$
|
|
8667
|
+
card: __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f"),
|
|
8724
8668
|
event: null,
|
|
8725
8669
|
open: true,
|
|
8726
8670
|
});
|
|
@@ -8730,7 +8674,7 @@ const KupDataTable = class {
|
|
|
8730
8674
|
*/
|
|
8731
8675
|
async refresh(recalcRows) {
|
|
8732
8676
|
if (recalcRows) {
|
|
8733
|
-
__classPrivateFieldGet$
|
|
8677
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
8734
8678
|
}
|
|
8735
8679
|
index.forceUpdate(this);
|
|
8736
8680
|
}
|
|
@@ -8739,8 +8683,8 @@ const KupDataTable = class {
|
|
|
8739
8683
|
*/
|
|
8740
8684
|
async resizeCallback() {
|
|
8741
8685
|
if (this.lazyLoadCells &&
|
|
8742
|
-
this.rootElement.clientWidth !== __classPrivateFieldGet$
|
|
8743
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
8686
|
+
this.rootElement.clientWidth !== __classPrivateFieldGet$4(this, _KupDataTable_oldWidth, "f")) {
|
|
8687
|
+
window.clearTimeout(__classPrivateFieldGet$4(this, _KupDataTable_resizeTimeout, "f"));
|
|
8744
8688
|
__classPrivateFieldSet$2(this, _KupDataTable_resizeTimeout, window.setTimeout(() => this.refresh(), 300), "f");
|
|
8745
8689
|
}
|
|
8746
8690
|
}
|
|
@@ -8755,7 +8699,7 @@ const KupDataTable = class {
|
|
|
8755
8699
|
if (!column) {
|
|
8756
8700
|
return;
|
|
8757
8701
|
}
|
|
8758
|
-
const row = __classPrivateFieldGet$
|
|
8702
|
+
const row = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, rowId);
|
|
8759
8703
|
if (!row) {
|
|
8760
8704
|
return;
|
|
8761
8705
|
}
|
|
@@ -8813,7 +8757,7 @@ const KupDataTable = class {
|
|
|
8813
8757
|
this.selectedRows = [];
|
|
8814
8758
|
for (let index = 0; index < rowsIdentifiers.length; index++) {
|
|
8815
8759
|
const id = rowsIdentifiers[index];
|
|
8816
|
-
this.selectedRows.push(__classPrivateFieldGet$
|
|
8760
|
+
this.selectedRows.push(__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, id));
|
|
8817
8761
|
}
|
|
8818
8762
|
if (emitEvent !== false) {
|
|
8819
8763
|
this.kupRowSelected.emit({
|
|
@@ -8827,12 +8771,12 @@ const KupDataTable = class {
|
|
|
8827
8771
|
}
|
|
8828
8772
|
//---- Lifecycle hooks ----
|
|
8829
8773
|
componentWillLoad() {
|
|
8830
|
-
__classPrivateFieldGet$
|
|
8831
|
-
__classPrivateFieldGet$
|
|
8832
|
-
__classPrivateFieldGet$
|
|
8833
|
-
__classPrivateFieldGet$
|
|
8774
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logLoad(this, false);
|
|
8775
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.register(this);
|
|
8776
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").theme.register(this);
|
|
8777
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").toolbar.register(this.rootElement);
|
|
8834
8778
|
if (!this.emptyDataLabel) {
|
|
8835
|
-
this.emptyDataLabel = __classPrivateFieldGet$
|
|
8779
|
+
this.emptyDataLabel = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EMPTY_DATA);
|
|
8836
8780
|
}
|
|
8837
8781
|
__classPrivateFieldSet$2(this, _KupDataTable_columnMenuInstance, new KupColumnMenu(), "f");
|
|
8838
8782
|
__classPrivateFieldSet$2(this, _KupDataTable_filtersColumnMenuInstance, new fPaginatorUtils.FiltersColumnMenu(), "f");
|
|
@@ -8856,18 +8800,18 @@ const KupDataTable = class {
|
|
|
8856
8800
|
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, 0, "f");
|
|
8857
8801
|
}
|
|
8858
8802
|
if (document.querySelector('.topbar')) {
|
|
8859
|
-
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$
|
|
8803
|
+
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$4(this, _KupDataTable_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
|
|
8860
8804
|
}
|
|
8861
|
-
__classPrivateFieldGet$
|
|
8805
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_setObserver).call(this);
|
|
8862
8806
|
//this.recalculateRows();
|
|
8863
8807
|
// Detects is the browser is Safari. If needed, this function can be moved into an external file and then imported into components
|
|
8864
8808
|
__classPrivateFieldSet$2(this, _KupDataTable_isSafariBrowser, CSS.supports('position', '-webkit-sticky') ||
|
|
8865
8809
|
!!(window && window.safari), "f");
|
|
8866
|
-
__classPrivateFieldGet$
|
|
8810
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_calculateData).call(this);
|
|
8867
8811
|
__classPrivateFieldSet$2(this, _KupDataTable_initialized, true, "f");
|
|
8868
8812
|
}
|
|
8869
8813
|
componentWillRender() {
|
|
8870
|
-
__classPrivateFieldGet$
|
|
8814
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logRender(this, false);
|
|
8871
8815
|
}
|
|
8872
8816
|
componentDidRender() {
|
|
8873
8817
|
const root = this.rootElement.shadowRoot;
|
|
@@ -8878,40 +8822,40 @@ const KupDataTable = class {
|
|
|
8878
8822
|
}
|
|
8879
8823
|
}
|
|
8880
8824
|
if (this.showCustomization) {
|
|
8881
|
-
__classPrivateFieldGet$
|
|
8882
|
-
}
|
|
8883
|
-
__classPrivateFieldGet$
|
|
8884
|
-
__classPrivateFieldGet$
|
|
8885
|
-
__classPrivateFieldGet$
|
|
8886
|
-
__classPrivateFieldGet$
|
|
8887
|
-
__classPrivateFieldGet$
|
|
8888
|
-
__classPrivateFieldGet$
|
|
8825
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_customizePanelPosition).call(this);
|
|
8826
|
+
}
|
|
8827
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_totalMenuPosition).call(this);
|
|
8828
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_checkScrollOnHover).call(this);
|
|
8829
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_didRenderObservers).call(this);
|
|
8830
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_didRenderInteractables).call(this);
|
|
8831
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
8832
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_setDynPosElements).call(this);
|
|
8889
8833
|
if (this.headerIsPersistent &&
|
|
8890
8834
|
this.tableHeight === undefined &&
|
|
8891
8835
|
this.tableWidth === undefined) {
|
|
8892
|
-
__classPrivateFieldGet$
|
|
8836
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_updateStickyHeaderSize).call(this);
|
|
8893
8837
|
}
|
|
8894
|
-
setTimeout(() => __classPrivateFieldGet$
|
|
8838
|
+
setTimeout(() => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_updateFixedRowsAndColumnsCssVariables).call(this), 50);
|
|
8895
8839
|
// *** Store
|
|
8896
8840
|
if (this.lazyLoadCells) {
|
|
8897
8841
|
this.persistState();
|
|
8898
8842
|
}
|
|
8899
8843
|
// ***
|
|
8900
8844
|
__classPrivateFieldSet$2(this, _KupDataTable_oldWidth, this.rootElement.clientWidth, "f");
|
|
8901
|
-
__classPrivateFieldGet$
|
|
8845
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logRender(this, true);
|
|
8902
8846
|
}
|
|
8903
8847
|
componentDidLoad() {
|
|
8904
|
-
__classPrivateFieldGet$
|
|
8905
|
-
__classPrivateFieldGet$
|
|
8906
|
-
__classPrivateFieldGet$
|
|
8848
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_didLoadObservers).call(this);
|
|
8849
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_didLoadEventHandling).call(this);
|
|
8850
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_didLoadInteractables).call(this);
|
|
8907
8851
|
this.lazyLoadCells = true;
|
|
8908
8852
|
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
8909
|
-
__classPrivateFieldGet$
|
|
8910
|
-
__classPrivateFieldGet$
|
|
8853
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").resize.observe(this.rootElement);
|
|
8854
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logLoad(this, true);
|
|
8911
8855
|
}
|
|
8912
8856
|
resetCurrentPage() {
|
|
8913
8857
|
this.currentPage = 1;
|
|
8914
|
-
__classPrivateFieldGet$
|
|
8858
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8915
8859
|
}
|
|
8916
8860
|
getColumns() {
|
|
8917
8861
|
return this.data && this.data.columns
|
|
@@ -8922,7 +8866,7 @@ const KupDataTable = class {
|
|
|
8922
8866
|
// TODO: change into `visible ?? true` when TS dependency has been updated
|
|
8923
8867
|
const visibleColumns = this.getColumns().filter(({ visible }) => visible !== undefined ? visible : true);
|
|
8924
8868
|
// check grouping
|
|
8925
|
-
if (__classPrivateFieldGet$
|
|
8869
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
8926
8870
|
// filtering column based on group visibility
|
|
8927
8871
|
return visibleColumns.filter((column) => {
|
|
8928
8872
|
// check if in group
|
|
@@ -8946,7 +8890,7 @@ const KupDataTable = class {
|
|
|
8946
8890
|
return visibleColumns;
|
|
8947
8891
|
}
|
|
8948
8892
|
getGroupByName(column) {
|
|
8949
|
-
if (!__classPrivateFieldGet$
|
|
8893
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
8950
8894
|
return null;
|
|
8951
8895
|
}
|
|
8952
8896
|
for (let group of this.groups) {
|
|
@@ -8957,7 +8901,7 @@ const KupDataTable = class {
|
|
|
8957
8901
|
return null;
|
|
8958
8902
|
}
|
|
8959
8903
|
getColumnValues(column) {
|
|
8960
|
-
return __classPrivateFieldGet$
|
|
8904
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_filtersRowsInstance, "f").getColumnValues(this, column, this.globalFilterValue, __classPrivateFieldGet$4(this, _KupDataTable_filtersColumnMenuInstance, "f"));
|
|
8961
8905
|
}
|
|
8962
8906
|
getRows() {
|
|
8963
8907
|
return this.data && this.data.rows ? this.data.rows : [];
|
|
@@ -8972,7 +8916,7 @@ const KupDataTable = class {
|
|
|
8972
8916
|
}
|
|
8973
8917
|
async defaultSortingFunction(columns, receivingColumnIndex, sortedColumnIndex, useNewObject = false) {
|
|
8974
8918
|
const toSort = !useNewObject ? columns : [...columns];
|
|
8975
|
-
__classPrivateFieldGet$
|
|
8919
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_moveSortedColumns).call(this, toSort, receivingColumnIndex, sortedColumnIndex);
|
|
8976
8920
|
return toSort;
|
|
8977
8921
|
}
|
|
8978
8922
|
areTotalsSelected(column) {
|
|
@@ -8980,7 +8924,7 @@ const KupDataTable = class {
|
|
|
8980
8924
|
}
|
|
8981
8925
|
onTotalsChange(event, column) {
|
|
8982
8926
|
// close menu
|
|
8983
|
-
__classPrivateFieldGet$
|
|
8927
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
8984
8928
|
if (column) {
|
|
8985
8929
|
// must do this
|
|
8986
8930
|
// otherwise does not fire the watcher
|
|
@@ -9003,14 +8947,14 @@ const KupDataTable = class {
|
|
|
9003
8947
|
let selectRowCell = null;
|
|
9004
8948
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
9005
8949
|
extraCells++;
|
|
9006
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
8950
|
+
const fixedCellStyle = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, extraCells, 0, extraCells);
|
|
9007
8951
|
selectRowCell = (index.h("td", { class: fixedCellStyle ? fixedCellStyle.fixedCellClasses : null, style: fixedCellStyle ? fixedCellStyle.fixedCellStyle : null }));
|
|
9008
8952
|
}
|
|
9009
8953
|
// Action cell
|
|
9010
8954
|
let actionsCell = null;
|
|
9011
|
-
if (__classPrivateFieldGet$
|
|
8955
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
9012
8956
|
extraCells++;
|
|
9013
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
8957
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, extraCells, 0, extraCells);
|
|
9014
8958
|
actionsCell = (index.h("td", { class: selectionStyleAndClass
|
|
9015
8959
|
? selectionStyleAndClass.fixedCellClasses
|
|
9016
8960
|
: {}, style: selectionStyleAndClass
|
|
@@ -9018,19 +8962,19 @@ const KupDataTable = class {
|
|
|
9018
8962
|
: {} }));
|
|
9019
8963
|
}
|
|
9020
8964
|
const footerCells = this.getVisibleColumns().map((column, columnIndex) => {
|
|
9021
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
8965
|
+
const fixedCellStyle = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, columnIndex + 1 + extraCells, 0, extraCells);
|
|
9022
8966
|
let totalMenu = undefined;
|
|
9023
8967
|
let menuLabel = kupManager.TotalLabel.CALC;
|
|
9024
8968
|
const translation = {
|
|
9025
|
-
[kupManager.TotalLabel.AVERAGE]: __classPrivateFieldGet$
|
|
9026
|
-
[kupManager.TotalLabel.CALC]: __classPrivateFieldGet$
|
|
9027
|
-
[kupManager.TotalLabel.CANC]: __classPrivateFieldGet$
|
|
9028
|
-
[kupManager.TotalLabel.COUNT]: __classPrivateFieldGet$
|
|
9029
|
-
[kupManager.TotalLabel.DISTINCT]: __classPrivateFieldGet$
|
|
9030
|
-
[kupManager.TotalLabel.MATH]: __classPrivateFieldGet$
|
|
9031
|
-
[kupManager.TotalLabel.MAX]: __classPrivateFieldGet$
|
|
9032
|
-
[kupManager.TotalLabel.MIN]: __classPrivateFieldGet$
|
|
9033
|
-
[kupManager.TotalLabel.SUM]: __classPrivateFieldGet$
|
|
8969
|
+
[kupManager.TotalLabel.AVERAGE]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.AVERAGE),
|
|
8970
|
+
[kupManager.TotalLabel.CALC]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.CALCULATE),
|
|
8971
|
+
[kupManager.TotalLabel.CANC]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.CANCEL),
|
|
8972
|
+
[kupManager.TotalLabel.COUNT]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.COUNT),
|
|
8973
|
+
[kupManager.TotalLabel.DISTINCT]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.DISTINCT),
|
|
8974
|
+
[kupManager.TotalLabel.MATH]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.FORMULA),
|
|
8975
|
+
[kupManager.TotalLabel.MAX]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.MAXIMUM),
|
|
8976
|
+
[kupManager.TotalLabel.MIN]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.MINIMUM),
|
|
8977
|
+
[kupManager.TotalLabel.SUM]: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageTotals.SUM),
|
|
9034
8978
|
};
|
|
9035
8979
|
if (this.totals) {
|
|
9036
8980
|
const totalValue = this.totals[column.name];
|
|
@@ -9062,7 +9006,7 @@ const KupDataTable = class {
|
|
|
9062
9006
|
}
|
|
9063
9007
|
}
|
|
9064
9008
|
}
|
|
9065
|
-
if (__classPrivateFieldGet$
|
|
9009
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isOpenedTotalMenuForColumn).call(this, column.name)) {
|
|
9066
9010
|
const listData = [
|
|
9067
9011
|
{
|
|
9068
9012
|
id: kupManager.TotalMode.COUNT,
|
|
@@ -9073,7 +9017,7 @@ const KupDataTable = class {
|
|
|
9073
9017
|
value: translation[kupManager.TotalLabel.DISTINCT],
|
|
9074
9018
|
},
|
|
9075
9019
|
];
|
|
9076
|
-
if (__classPrivateFieldGet$
|
|
9020
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isNumber(column.obj)) {
|
|
9077
9021
|
// TODO Move these objects in declarations
|
|
9078
9022
|
listData.push({
|
|
9079
9023
|
id: kupManager.TotalMode.SUM,
|
|
@@ -9090,7 +9034,7 @@ const KupDataTable = class {
|
|
|
9090
9034
|
value: translation[kupManager.TotalLabel.MAX],
|
|
9091
9035
|
});
|
|
9092
9036
|
}
|
|
9093
|
-
else if (__classPrivateFieldGet$
|
|
9037
|
+
else if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
9094
9038
|
listData.push({
|
|
9095
9039
|
id: kupManager.TotalMode.MIN,
|
|
9096
9040
|
separator: true,
|
|
@@ -9115,20 +9059,20 @@ const KupDataTable = class {
|
|
|
9115
9059
|
}
|
|
9116
9060
|
// TODO please use getValueForDisplay
|
|
9117
9061
|
let value;
|
|
9118
|
-
const footerValue = __classPrivateFieldGet$
|
|
9062
|
+
const footerValue = __classPrivateFieldGet$4(this, _KupDataTable_footer, "f")[column.name];
|
|
9119
9063
|
if (menuLabel === kupManager.TotalLabel.COUNT ||
|
|
9120
9064
|
menuLabel === kupManager.TotalLabel.DISTINCT) {
|
|
9121
9065
|
value = footerValue;
|
|
9122
9066
|
}
|
|
9123
9067
|
else if ((menuLabel === kupManager.TotalLabel.MAX ||
|
|
9124
9068
|
menuLabel === kupManager.TotalLabel.MIN) &&
|
|
9125
|
-
__classPrivateFieldGet$
|
|
9069
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
9126
9070
|
if (footerValue) {
|
|
9127
9071
|
value = footerValue;
|
|
9128
9072
|
}
|
|
9129
9073
|
}
|
|
9130
9074
|
else {
|
|
9131
|
-
value =
|
|
9075
|
+
value = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").math.numberToFormattedString(footerValue, column.decimals, column.obj ? column.obj.p : '');
|
|
9132
9076
|
}
|
|
9133
9077
|
return (index.h("td", { "data-column": column.name, class: fixedCellStyle && fixedCellStyle.fixedCellClasses
|
|
9134
9078
|
? fixedCellStyle.fixedCellClasses
|
|
@@ -9146,38 +9090,38 @@ const KupDataTable = class {
|
|
|
9146
9090
|
let transpose = undefined;
|
|
9147
9091
|
let totalsMatrix = undefined;
|
|
9148
9092
|
if (this.openedCustomSettings) {
|
|
9149
|
-
density = __classPrivateFieldGet$
|
|
9150
|
-
fontsize = __classPrivateFieldGet$
|
|
9151
|
-
grid = __classPrivateFieldGet$
|
|
9152
|
-
transpose = __classPrivateFieldGet$
|
|
9093
|
+
density = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderDensityPanel).call(this);
|
|
9094
|
+
fontsize = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderFontSizePanel).call(this);
|
|
9095
|
+
grid = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderGridPanel).call(this);
|
|
9096
|
+
transpose = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderTransposeSwitch).call(this);
|
|
9153
9097
|
if (this.totals && this.groups.length > 0) {
|
|
9154
|
-
totalsMatrix = __classPrivateFieldGet$
|
|
9098
|
+
totalsMatrix = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderTotalsMatrix).call(this);
|
|
9155
9099
|
}
|
|
9156
9100
|
}
|
|
9157
9101
|
return (index.h("kup-card", { customStyle: "::slotted(kup-switch) { width: max-content !important; } ::slotted(*) { margin: auto !important; } ::slotted(.customize-element) { margin: auto !important; padding: 0 1em 1em 1em !important; width: max-content !important; } ::slotted(.customize-element):nth-child(1) { padding-top: 1em !important; }", isMenu: true, layoutFamily: kupManager.KupCardFamily.FREE, ref: (el) => {
|
|
9158
9102
|
__classPrivateFieldSet$2(this, _KupDataTable_customizeTopPanelRef, el, "f");
|
|
9159
|
-
}, sizeX: "360px", sizeY: "300px" }, density, grid, fontsize, transpose, index.h("kup-switch", { class: "customize-element", checked: this.dragEnabled, label: __classPrivateFieldGet$
|
|
9103
|
+
}, sizeX: "360px", sizeY: "300px" }, density, grid, fontsize, transpose, index.h("kup-switch", { class: "customize-element", checked: this.dragEnabled, label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.DRAG_AND_DROP), leadingLabel: true, "onkup-switch-change": () => (this.dragEnabled = !this.dragEnabled) }), index.h("kup-switch", { class: "customize-element", checked: this.editableData, label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EDITABLE), leadingLabel: true, "onkup-switch-change": () => (this.editableData = !this.editableData) }), index.h("kup-button", { title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TOGGLE) +
|
|
9160
9104
|
' Magic Box ' +
|
|
9161
9105
|
'(' +
|
|
9162
|
-
__classPrivateFieldGet$
|
|
9163
|
-
')', icon: "auto-fix", "onkup-button-click": () => __classPrivateFieldGet$
|
|
9106
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
9107
|
+
')', icon: "auto-fix", "onkup-button-click": () => __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").toggleMagicBox() }), totalsMatrix));
|
|
9164
9108
|
}
|
|
9165
9109
|
render() {
|
|
9166
9110
|
__classPrivateFieldSet$2(this, _KupDataTable_thRefs, [], "f");
|
|
9167
9111
|
__classPrivateFieldSet$2(this, _KupDataTable_rowsRefs, [], "f");
|
|
9168
9112
|
__classPrivateFieldSet$2(this, _KupDataTable_renderedRows, [], "f");
|
|
9169
9113
|
let elStyle = undefined;
|
|
9170
|
-
__classPrivateFieldSet$2(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$
|
|
9114
|
+
__classPrivateFieldSet$2(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
|
|
9171
9115
|
let rows = null;
|
|
9172
|
-
if (__classPrivateFieldGet$
|
|
9173
|
-
rows = (index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
9116
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
|
|
9117
|
+
rows = (index.h("tr", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").push(el) }, index.h("td", { colSpan: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
|
|
9174
9118
|
}
|
|
9175
9119
|
else {
|
|
9176
9120
|
rows = [];
|
|
9177
|
-
__classPrivateFieldGet$
|
|
9121
|
+
__classPrivateFieldGet$4(this, _KupDataTable_paginatedRows, "f")
|
|
9178
9122
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
9179
9123
|
// When the column has specified the parameter hideValuesRepetitions
|
|
9180
|
-
.map((row, rowIndex, currentArray) => __classPrivateFieldGet$
|
|
9124
|
+
.map((row, rowIndex, currentArray) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, 0, rowIndex + 1, rowIndex > 0 ? currentArray[rowIndex - 1] : null))
|
|
9181
9125
|
.forEach((jsxRow) => {
|
|
9182
9126
|
if (Array.isArray(jsxRow)) {
|
|
9183
9127
|
jsxRow.forEach((jr) => rows.push(jr));
|
|
@@ -9189,24 +9133,24 @@ const KupDataTable = class {
|
|
|
9189
9133
|
}
|
|
9190
9134
|
// header
|
|
9191
9135
|
// for multi selection purposes, this should be called before this.renderedRows has been evaluated
|
|
9192
|
-
const header = __classPrivateFieldGet$
|
|
9193
|
-
const stickyHeader = __classPrivateFieldGet$
|
|
9136
|
+
const header = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderHeader).call(this);
|
|
9137
|
+
const stickyHeader = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderStickyHeader).call(this);
|
|
9194
9138
|
let paginatorTop = undefined;
|
|
9195
9139
|
let paginatorBottom = undefined;
|
|
9196
|
-
if ((!this.lazyLoadRows && __classPrivateFieldGet$
|
|
9140
|
+
if ((!this.lazyLoadRows && __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f") > this.rowsPerPage) ||
|
|
9197
9141
|
this.showCustomization ||
|
|
9198
9142
|
this.showLoadMore) {
|
|
9199
9143
|
if (kupManager.PaginatorPos.TOP === this.paginatorPos ||
|
|
9200
9144
|
kupManager.PaginatorPos.BOTH === this.paginatorPos) {
|
|
9201
|
-
paginatorTop = __classPrivateFieldGet$
|
|
9145
|
+
paginatorTop = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderPaginator).call(this, true);
|
|
9202
9146
|
}
|
|
9203
9147
|
if (kupManager.PaginatorPos.BOTTOM === this.paginatorPos ||
|
|
9204
9148
|
kupManager.PaginatorPos.BOTH === this.paginatorPos) {
|
|
9205
|
-
paginatorBottom = __classPrivateFieldGet$
|
|
9149
|
+
paginatorBottom = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderPaginator).call(this, false);
|
|
9206
9150
|
}
|
|
9207
9151
|
}
|
|
9208
9152
|
let groupChips = null;
|
|
9209
|
-
if (__classPrivateFieldGet$
|
|
9153
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
9210
9154
|
const chipsData = [];
|
|
9211
9155
|
for (let index = 0; index < this.groups.length; index++) {
|
|
9212
9156
|
const group = this.groups[index];
|
|
@@ -9219,7 +9163,7 @@ const KupDataTable = class {
|
|
|
9219
9163
|
});
|
|
9220
9164
|
}
|
|
9221
9165
|
else {
|
|
9222
|
-
__classPrivateFieldGet$
|
|
9166
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Grouped for a non-existent column! (' +
|
|
9223
9167
|
group.column +
|
|
9224
9168
|
')', kupManager.KupDebugCategory.WARNING);
|
|
9225
9169
|
}
|
|
@@ -9232,7 +9176,7 @@ const KupDataTable = class {
|
|
|
9232
9176
|
onIconClick: [],
|
|
9233
9177
|
};
|
|
9234
9178
|
for (let i = 0; i < chipsData.length; i++) {
|
|
9235
|
-
props.onIconClick.push(() => __classPrivateFieldGet$
|
|
9179
|
+
props.onIconClick.push(() => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_removeGroup).call(this, i));
|
|
9236
9180
|
}
|
|
9237
9181
|
groupChips = index.h(fChip.FChip, Object.assign({}, props));
|
|
9238
9182
|
}
|
|
@@ -9240,7 +9184,7 @@ const KupDataTable = class {
|
|
|
9240
9184
|
const tableClass = {
|
|
9241
9185
|
// Class to specify whether the table should have width: auto or not.
|
|
9242
9186
|
// Mandatory to check with custom column size.
|
|
9243
|
-
'auto-width': __classPrivateFieldGet$
|
|
9187
|
+
'auto-width': __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_tableHasAutoWidth).call(this),
|
|
9244
9188
|
'column-separation': kupManager.ShowGrid.COMPLETE === this.showGrid ||
|
|
9245
9189
|
kupManager.ShowGrid.COL === this.showGrid,
|
|
9246
9190
|
// When there are columns with a specified width, we must add table-layout: fixed to force the table to respect them
|
|
@@ -9290,17 +9234,17 @@ const KupDataTable = class {
|
|
|
9290
9234
|
}
|
|
9291
9235
|
}
|
|
9292
9236
|
};
|
|
9293
|
-
const compCreated = (index.h(index.Host, { "onKup-cell-input": autoselectOnAction, "onKup-cell-update": autoselectOnAction }, index.h("style", null, __classPrivateFieldGet$
|
|
9237
|
+
const compCreated = (index.h(index.Host, { "onKup-cell-input": autoselectOnAction, "onKup-cell-update": autoselectOnAction }, index.h("style", null, __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, index.h("div", { class: "above-wrapper" }, this.globalFilter ? (index.h("div", { id: "global-filter" }, index.h(fTextField.FTextField, { fullWidth: true, icon: kupManager.KupThemeIconValues.SEARCH, label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageSearch.SEARCH), value: this.globalFilterValue, onInput: (event) => {
|
|
9294
9238
|
const t = event.target;
|
|
9295
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
9296
|
-
__classPrivateFieldSet$2(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$
|
|
9239
|
+
window.clearTimeout(__classPrivateFieldGet$4(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
9240
|
+
__classPrivateFieldSet$2(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
9297
9241
|
} }))) : null, paginatorTop), index.h("div", { class: "group-wrapper" }, groupChips), index.h("div", { class: "actions-wrapper" }, this.insertMode !== '' ? (index.h(fButton.FButton, { icon: "plus", onClick: async () => {
|
|
9298
9242
|
var _a;
|
|
9299
9243
|
if (this.insertMode === 'form') {
|
|
9300
|
-
__classPrivateFieldGet$
|
|
9244
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_rowInsertForm).call(this);
|
|
9301
9245
|
}
|
|
9302
9246
|
else {
|
|
9303
|
-
__classPrivateFieldSet$2(this, _KupDataTable_insertCount, (_a = __classPrivateFieldGet$
|
|
9247
|
+
__classPrivateFieldSet$2(this, _KupDataTable_insertCount, (_a = __classPrivateFieldGet$4(this, _KupDataTable_insertCount, "f"), _a++, _a), "f");
|
|
9304
9248
|
const cells = {};
|
|
9305
9249
|
for (let index = 0; index < this.data.columns.length; index++) {
|
|
9306
9250
|
const column = this.data.columns[index];
|
|
@@ -9314,8 +9258,8 @@ const KupDataTable = class {
|
|
|
9314
9258
|
}
|
|
9315
9259
|
const row = {
|
|
9316
9260
|
cells,
|
|
9317
|
-
id: __classPrivateFieldGet$
|
|
9318
|
-
__classPrivateFieldGet$
|
|
9261
|
+
id: __classPrivateFieldGet$4(this, _KupDataTable_INSERT_PREFIX, "f") +
|
|
9262
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCount, "f"),
|
|
9319
9263
|
};
|
|
9320
9264
|
this.data.rows.unshift(row);
|
|
9321
9265
|
await this.refresh(true);
|
|
@@ -9329,13 +9273,13 @@ const KupDataTable = class {
|
|
|
9329
9273
|
});
|
|
9330
9274
|
}, styling: fButtonDeclarations.FButtonStyling.OUTLINED, title: "Save", wrapperClass: "save-button" })) : null, this.showDeleteButton &&
|
|
9331
9275
|
this.selectedRows.length > 0 ? (index.h(fButton.FButton, { icon: "delete", onClick: () => {
|
|
9332
|
-
__classPrivateFieldGet$
|
|
9333
|
-
}, styling: fButtonDeclarations.FButtonStyling.OUTLINED, title: "Delete selected rows", wrapperClass: "delete-button" })) : null), index.h("div", { class: "droparea", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet$
|
|
9334
|
-
? __classPrivateFieldGet$
|
|
9276
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_rowsDelete).call(this);
|
|
9277
|
+
}, styling: fButtonDeclarations.FButtonStyling.OUTLINED, title: "Delete selected rows", wrapperClass: "delete-button" })) : null), index.h("div", { class: "droparea", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
|
|
9278
|
+
? __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
|
|
9335
9279
|
: null), index.h("div", { style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
|
|
9336
9280
|
? [
|
|
9337
9281
|
index.h("div", { class: "settings-trigger", onClick: () => {
|
|
9338
|
-
__classPrivateFieldGet$
|
|
9282
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
|
|
9339
9283
|
}, ref: (el) => {
|
|
9340
9284
|
__classPrivateFieldSet$2(this, _KupDataTable_customizeTopButtonRef, el, "f");
|
|
9341
9285
|
} }, index.h(fImage.FImage, { color: `var(${kupManager.KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
|
|
@@ -9345,29 +9289,29 @@ const KupDataTable = class {
|
|
|
9345
9289
|
ev.stopPropagation();
|
|
9346
9290
|
}, onContextMenu: (e) => {
|
|
9347
9291
|
e.preventDefault();
|
|
9348
|
-
} }, index.h("thead", { hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_theadRef, el, "f")) }, index.h("tr", null, header)), index.h("tbody", null, rows), this.showFooter || __classPrivateFieldGet$
|
|
9292
|
+
} }, index.h("thead", { hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_theadRef, el, "f")) }, index.h("tr", null, header)), index.h("tbody", null, rows), this.showFooter || __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)
|
|
9349
9293
|
? this.renderFooter()
|
|
9350
9294
|
: null), stickyEl), paginatorBottom)));
|
|
9351
9295
|
return compCreated;
|
|
9352
9296
|
}
|
|
9353
9297
|
disconnectedCallback() {
|
|
9354
|
-
__classPrivateFieldGet$
|
|
9355
|
-
__classPrivateFieldGet$
|
|
9356
|
-
__classPrivateFieldGet$
|
|
9298
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.unregister(__classPrivateFieldGet$4(this, _KupDataTable_interactableDrag, "f").concat(__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f"), __classPrivateFieldGet$4(this, _KupDataTable_interactableResize, "f"), __classPrivateFieldGet$4(this, _KupDataTable_interactableTouch, "f")));
|
|
9299
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.unregister(this);
|
|
9300
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").theme.unregister(this);
|
|
9357
9301
|
const dynamicPositionElements = this.rootElement.shadowRoot.querySelectorAll('[' + kupManager.kupDynamicPositionAttribute + ']');
|
|
9358
9302
|
if (dynamicPositionElements.length > 0) {
|
|
9359
|
-
__classPrivateFieldGet$
|
|
9303
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.unregister(Array.prototype.slice.call(dynamicPositionElements));
|
|
9360
9304
|
}
|
|
9361
|
-
if (__classPrivateFieldGet$
|
|
9362
|
-
__classPrivateFieldGet$
|
|
9305
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f")) {
|
|
9306
|
+
__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f").remove();
|
|
9363
9307
|
}
|
|
9364
|
-
if (__classPrivateFieldGet$
|
|
9365
|
-
__classPrivateFieldGet$
|
|
9308
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f")) {
|
|
9309
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").remove();
|
|
9366
9310
|
}
|
|
9367
9311
|
if (this.scrollOnHover) {
|
|
9368
|
-
__classPrivateFieldGet$
|
|
9312
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").scrollOnHover.unregister(__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f"));
|
|
9369
9313
|
}
|
|
9370
|
-
__classPrivateFieldGet$
|
|
9314
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").resize.unobserve(this.rootElement);
|
|
9371
9315
|
this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
|
|
9372
9316
|
}
|
|
9373
9317
|
get rootElement() { return index.getElement(this); }
|
|
@@ -9388,16 +9332,16 @@ const KupDataTable = class {
|
|
|
9388
9332
|
}; }
|
|
9389
9333
|
};
|
|
9390
9334
|
_KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _KupDataTable_rowsLength = new WeakMap(), _KupDataTable_paginatedRows = new WeakMap(), _KupDataTable_paginatedRowsLength = new WeakMap(), _KupDataTable_footer = new WeakMap(), _KupDataTable_kupManager = new WeakMap(), _KupDataTable_renderedRows = new WeakMap(), _KupDataTable_loadMoreEventCounter = new WeakMap(), _KupDataTable_loadMoreEventPreviousQuantity = new WeakMap(), _KupDataTable_theadRef = new WeakMap(), _KupDataTable_tableRef = new WeakMap(), _KupDataTable_originalData = new WeakMap(), _KupDataTable_tableAreaRef = new WeakMap(), _KupDataTable_stickyTheadRef = new WeakMap(), _KupDataTable_customizeTopButtonRef = new WeakMap(), _KupDataTable_customizeTopPanelRef = new WeakMap(), _KupDataTable_sizedColumns = new WeakMap(), _KupDataTable_intObserver = new WeakMap(), _KupDataTable_navBarHeight = new WeakMap(), _KupDataTable_theadIntersecting = new WeakMap(), _KupDataTable_tableIntersecting = new WeakMap(), _KupDataTable_isSafariBrowser = new WeakMap(), _KupDataTable_isRestoringState = new WeakMap(), _KupDataTable_globalFilterTimeout = new WeakMap(), _KupDataTable_totalMenuCoords = new WeakMap(), _KupDataTable_clickTimeout = new WeakMap(), _KupDataTable_thRefs = new WeakMap(), _KupDataTable_rowsRefs = new WeakMap(), _KupDataTable_oldWidth = new WeakMap(), _KupDataTable_hold = new WeakMap(), _KupDataTable_interactableDrag = new WeakMap(), _KupDataTable_interactableDrop = new WeakMap(), _KupDataTable_interactableResize = new WeakMap(), _KupDataTable_interactableTouch = new WeakMap(), _KupDataTable_dropareaRef = new WeakMap(), _KupDataTable_removeDropareaRef = new WeakMap(), _KupDataTable_groupsDropareaRef = new WeakMap(), _KupDataTable_clickCb = new WeakMap(), _KupDataTable_clickCbCustomPanel = new WeakMap(), _KupDataTable_clickCbDropCard = new WeakMap(), _KupDataTable_resizeTimeout = new WeakMap(), _KupDataTable_columnMenuInstance = new WeakMap(), _KupDataTable_filtersColumnMenuInstance = new WeakMap(), _KupDataTable_filtersRowsInstance = new WeakMap(), _KupDataTable_detailCard = new WeakMap(), _KupDataTable_insertCard = new WeakMap(), _KupDataTable_confirmDeleteCard = new WeakMap(), _KupDataTable_confirmDeleteDialog = new WeakMap(), _KupDataTable_columnMenuCard = new WeakMap(), _KupDataTable_columnDropCard = new WeakMap(), _KupDataTable_columnDropCardAnchor = new WeakMap(), _KupDataTable_insertCount = new WeakMap(), _KupDataTable_BUTTON_CANCEL_ID = new WeakMap(), _KupDataTable_BUTTON_SUBMIT_ID = new WeakMap(), _KupDataTable_FIELDS_FORM_ID = new WeakMap(), _KupDataTable_MESSAGE_ID = new WeakMap(), _KupDataTable_MESSAGE_WRAPPER_ID = new WeakMap(), _KupDataTable_INSERT_PREFIX = new WeakMap(), _KupDataTable_stickyHeaderPosition = new WeakMap(), _KupDataTable_FONTSIZE_CODES = new WeakMap(), _KupDataTable_FONTSIZE_DECODES = new WeakMap(), _KupDataTable_FONTSIZE_ICONS = new WeakMap(), _KupDataTable_DENSITY_DECODES = new WeakMap(), _KupDataTable_DENSITY_ICONS = new WeakMap(), _KupDataTable_GRID_CODES = new WeakMap(), _KupDataTable_GRID_DECODES = new WeakMap(), _KupDataTable_GRID_ICONS = new WeakMap(), _KupDataTable_instances = new WeakSet(), _KupDataTable_closeDropCard = function _KupDataTable_closeDropCard() {
|
|
9391
|
-
__classPrivateFieldGet$
|
|
9392
|
-
__classPrivateFieldGet$
|
|
9393
|
-
__classPrivateFieldGet$
|
|
9335
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f"));
|
|
9336
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCbDropCard, "f"));
|
|
9337
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").remove();
|
|
9394
9338
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCard, null, "f");
|
|
9395
9339
|
}, _KupDataTable_createDropCard = function _KupDataTable_createDropCard(starter, receiving) {
|
|
9396
|
-
if (__classPrivateFieldGet$
|
|
9397
|
-
__classPrivateFieldGet$
|
|
9340
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f")) {
|
|
9341
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9398
9342
|
}
|
|
9399
9343
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCard, document.createElement('kup-card'), "f");
|
|
9400
|
-
__classPrivateFieldGet$
|
|
9344
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").data = {
|
|
9401
9345
|
options: {
|
|
9402
9346
|
data: this.data,
|
|
9403
9347
|
enableFormula: this.enableColumnsFormula,
|
|
@@ -9406,46 +9350,46 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9406
9350
|
receivingColumn: receiving,
|
|
9407
9351
|
starterColumn: starter,
|
|
9408
9352
|
formulaCb: () => {
|
|
9409
|
-
__classPrivateFieldGet$
|
|
9353
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9410
9354
|
this.refresh();
|
|
9411
9355
|
},
|
|
9412
9356
|
mergeCb: () => {
|
|
9413
9357
|
this.newColumn(kupManager.KupDataNewColumnTypes.CONCATENATE, {
|
|
9414
9358
|
columns: [receiving.name, starter.name],
|
|
9415
9359
|
});
|
|
9416
|
-
__classPrivateFieldGet$
|
|
9360
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9417
9361
|
},
|
|
9418
9362
|
moveCb: () => {
|
|
9419
|
-
__classPrivateFieldGet$
|
|
9420
|
-
__classPrivateFieldGet$
|
|
9363
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnSort).call(this, receiving, starter);
|
|
9364
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9421
9365
|
},
|
|
9422
9366
|
},
|
|
9423
9367
|
};
|
|
9424
|
-
__classPrivateFieldGet$
|
|
9425
|
-
__classPrivateFieldGet$
|
|
9426
|
-
__classPrivateFieldGet$
|
|
9427
|
-
__classPrivateFieldGet$
|
|
9428
|
-
__classPrivateFieldGet$
|
|
9429
|
-
__classPrivateFieldGet$
|
|
9430
|
-
__classPrivateFieldGet$
|
|
9368
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").layoutFamily = kupManager.KupCardFamily.BUILT_IN;
|
|
9369
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").layoutNumber = 3;
|
|
9370
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").isMenu = true;
|
|
9371
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").sizeX = '280px';
|
|
9372
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").sizeY = 'auto';
|
|
9373
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f"), __classPrivateFieldGet$4(this, _KupDataTable_columnDropCardAnchor, "f"), 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
9374
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f"));
|
|
9431
9375
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCbDropCard, {
|
|
9432
9376
|
cb: () => {
|
|
9433
|
-
__classPrivateFieldGet$
|
|
9377
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9434
9378
|
},
|
|
9435
|
-
el: __classPrivateFieldGet$
|
|
9379
|
+
el: __classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f"),
|
|
9436
9380
|
}, "f");
|
|
9437
|
-
__classPrivateFieldGet$
|
|
9438
|
-
__classPrivateFieldGet$
|
|
9381
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCbDropCard, "f"), true);
|
|
9382
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnDropCard, "f").menuVisible = true;
|
|
9439
9383
|
}, _KupDataTable_calculateData = function _KupDataTable_calculateData() {
|
|
9440
9384
|
if (!this.transpose) {
|
|
9441
9385
|
// restore
|
|
9442
|
-
if (__classPrivateFieldGet$
|
|
9443
|
-
this.data = Object.assign({}, __classPrivateFieldGet$
|
|
9386
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_originalData, "f")) {
|
|
9387
|
+
this.data = Object.assign({}, __classPrivateFieldGet$4(this, _KupDataTable_originalData, "f"));
|
|
9444
9388
|
}
|
|
9445
9389
|
}
|
|
9446
9390
|
else {
|
|
9447
9391
|
// transpose
|
|
9448
|
-
__classPrivateFieldGet$
|
|
9392
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_setTransposedData).call(this);
|
|
9449
9393
|
}
|
|
9450
9394
|
}, _KupDataTable_getRow = function _KupDataTable_getRow(id) {
|
|
9451
9395
|
let row = null;
|
|
@@ -9462,26 +9406,26 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9462
9406
|
row = rows.find((row) => row.id === id);
|
|
9463
9407
|
}
|
|
9464
9408
|
};
|
|
9465
|
-
if (__classPrivateFieldGet$
|
|
9466
|
-
__classPrivateFieldGet$
|
|
9409
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) && typeof id === 'string') {
|
|
9410
|
+
__classPrivateFieldGet$4(this, _KupDataTable_paginatedRows, "f").forEach((row) => search(row.group.children));
|
|
9467
9411
|
}
|
|
9468
9412
|
else {
|
|
9469
|
-
test(__classPrivateFieldGet$
|
|
9413
|
+
test(__classPrivateFieldGet$4(this, _KupDataTable_rows, "f"));
|
|
9470
9414
|
}
|
|
9471
9415
|
return row;
|
|
9472
9416
|
}, _KupDataTable_getTransposedData = function _KupDataTable_getTransposedData(column) {
|
|
9473
9417
|
if (column) {
|
|
9474
9418
|
this.filters = {};
|
|
9475
9419
|
}
|
|
9476
|
-
return __classPrivateFieldGet$
|
|
9420
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").data.transpose(this.data, column);
|
|
9477
9421
|
}, _KupDataTable_setTransposedData = function _KupDataTable_setTransposedData() {
|
|
9478
9422
|
// transpose
|
|
9479
9423
|
__classPrivateFieldSet$2(this, _KupDataTable_originalData, Object.assign({}, this.data), "f");
|
|
9480
9424
|
if (this.data.columns.length > 0) {
|
|
9481
|
-
this.data = __classPrivateFieldGet$
|
|
9425
|
+
this.data = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getTransposedData).call(this, this.data.columns[0].name);
|
|
9482
9426
|
}
|
|
9483
9427
|
}, _KupDataTable_switchToTotalsMatrix = function _KupDataTable_switchToTotalsMatrix() {
|
|
9484
|
-
if (__classPrivateFieldGet$
|
|
9428
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_rows, "f").length === 0 || !__classPrivateFieldGet$4(this, _KupDataTable_rows, "f")[0].group)
|
|
9485
9429
|
return;
|
|
9486
9430
|
// calc totals matrix data
|
|
9487
9431
|
const totalsMatrixData = {};
|
|
@@ -9489,9 +9433,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9489
9433
|
// note that the sorting of the columns depends on the totals selection
|
|
9490
9434
|
// the first column is the one that is selected first in the totals, and so on...
|
|
9491
9435
|
const ids = [];
|
|
9492
|
-
ids.push(__classPrivateFieldGet$
|
|
9493
|
-
Object.keys(__classPrivateFieldGet$
|
|
9494
|
-
if (__classPrivateFieldGet$
|
|
9436
|
+
ids.push(__classPrivateFieldGet$4(this, _KupDataTable_rows, "f")[0].group.column);
|
|
9437
|
+
Object.keys(__classPrivateFieldGet$4(this, _KupDataTable_rows, "f")[0].group.totals).forEach((columnKey) => {
|
|
9438
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_rows, "f")[0].group.column !== columnKey)
|
|
9495
9439
|
ids.push(columnKey);
|
|
9496
9440
|
});
|
|
9497
9441
|
// calc columns
|
|
@@ -9521,7 +9465,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9521
9465
|
totalMode + ' ' + currentColumn.title;
|
|
9522
9466
|
}
|
|
9523
9467
|
}
|
|
9524
|
-
__classPrivateFieldGet$
|
|
9468
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_setObjForTotalsMatrix).call(this, currentColumn, this.totals);
|
|
9525
9469
|
}
|
|
9526
9470
|
totalsMatrixColumns.push(currentColumn);
|
|
9527
9471
|
}
|
|
@@ -9532,15 +9476,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9532
9476
|
// calc rows
|
|
9533
9477
|
const totalsMatrixRows = [];
|
|
9534
9478
|
let index = 0;
|
|
9535
|
-
__classPrivateFieldGet$
|
|
9479
|
+
__classPrivateFieldGet$4(this, _KupDataTable_rows, "f").forEach((row) => {
|
|
9536
9480
|
const cells = {};
|
|
9537
9481
|
ids.forEach((id) => {
|
|
9538
9482
|
let totalValue = row.group.totals[id];
|
|
9539
9483
|
if (!totalValue) {
|
|
9540
9484
|
totalValue = row.group.id;
|
|
9541
9485
|
}
|
|
9542
|
-
if (__classPrivateFieldGet$
|
|
9543
|
-
totalValue = __classPrivateFieldGet$
|
|
9486
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dates.isValid(totalValue, kupManager.KupDatesFormats.ISO_DATE)) {
|
|
9487
|
+
totalValue = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dates.format(totalValue);
|
|
9544
9488
|
}
|
|
9545
9489
|
cells[id] = {
|
|
9546
9490
|
value: String(totalValue),
|
|
@@ -9580,13 +9524,13 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9580
9524
|
}, _KupDataTable_setObjForTotalsMatrix = function _KupDataTable_setObjForTotalsMatrix(column, totals) {
|
|
9581
9525
|
const obj = column.obj;
|
|
9582
9526
|
const totalMode = totals[column.name];
|
|
9583
|
-
if (__classPrivateFieldGet$
|
|
9527
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isDate(obj)) {
|
|
9584
9528
|
// check if min or max totals mode
|
|
9585
9529
|
if (totalMode === kupManager.TotalMode.MAX || totalMode === kupManager.TotalMode.MIN) {
|
|
9586
9530
|
return;
|
|
9587
9531
|
}
|
|
9588
9532
|
}
|
|
9589
|
-
else if (__classPrivateFieldGet$
|
|
9533
|
+
else if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isNumber(obj)) {
|
|
9590
9534
|
// check if percentage
|
|
9591
9535
|
if (obj.p && obj.p.toUpperCase() === 'P') {
|
|
9592
9536
|
if (totalMode !== kupManager.TotalMode.COUNT &&
|
|
@@ -9614,14 +9558,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9614
9558
|
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, 0, "f");
|
|
9615
9559
|
}
|
|
9616
9560
|
if (topBar) {
|
|
9617
|
-
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$
|
|
9618
|
-
}
|
|
9619
|
-
if (__classPrivateFieldGet$
|
|
9620
|
-
__classPrivateFieldGet$
|
|
9621
|
-
const widthTable = __classPrivateFieldGet$
|
|
9622
|
-
__classPrivateFieldGet$
|
|
9623
|
-
const thCollection = __classPrivateFieldGet$
|
|
9624
|
-
const thStickyCollection = __classPrivateFieldGet$
|
|
9561
|
+
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$4(this, _KupDataTable_navBarHeight, "f") + topBar.clientHeight, "f");
|
|
9562
|
+
}
|
|
9563
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
9564
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").style.top = __classPrivateFieldGet$4(this, _KupDataTable_navBarHeight, "f") + 'px';
|
|
9565
|
+
const widthTable = __classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f").offsetWidth;
|
|
9566
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").style.maxWidth = widthTable + 'px';
|
|
9567
|
+
const thCollection = __classPrivateFieldGet$4(this, _KupDataTable_theadRef, "f").querySelectorAll('th');
|
|
9568
|
+
const thStickyCollection = __classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").querySelectorAll('th-sticky');
|
|
9625
9569
|
for (let i = 0; i < thCollection.length; i++) {
|
|
9626
9570
|
const widthTH = thCollection[i].offsetWidth;
|
|
9627
9571
|
thStickyCollection[i].style.width = widthTH + 'px';
|
|
@@ -9632,8 +9576,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9632
9576
|
entries.forEach((entry) => {
|
|
9633
9577
|
if (entry.target.tagName === 'TR') {
|
|
9634
9578
|
if (entry.isIntersecting) {
|
|
9635
|
-
__classPrivateFieldGet$
|
|
9636
|
-
const delta = __classPrivateFieldGet$
|
|
9579
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
|
|
9580
|
+
const delta = __classPrivateFieldGet$4(this, _KupDataTable_rows, "f").length - this.currentRowsPerPage;
|
|
9637
9581
|
if (delta < this.loadMoreStep) {
|
|
9638
9582
|
this.currentRowsPerPage += delta;
|
|
9639
9583
|
}
|
|
@@ -9647,7 +9591,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9647
9591
|
if (entry.isIntersecting) {
|
|
9648
9592
|
__classPrivateFieldSet$2(this, _KupDataTable_theadIntersecting, true, "f");
|
|
9649
9593
|
}
|
|
9650
|
-
else if (entry.boundingClientRect.bottom > __classPrivateFieldGet$
|
|
9594
|
+
else if (entry.boundingClientRect.bottom > __classPrivateFieldGet$4(this, _KupDataTable_navBarHeight, "f")) {
|
|
9651
9595
|
//If the thead is not intersecting but it still is inside the viewport, is to be considered intersected
|
|
9652
9596
|
__classPrivateFieldSet$2(this, _KupDataTable_theadIntersecting, true, "f");
|
|
9653
9597
|
}
|
|
@@ -9666,19 +9610,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9666
9610
|
if (this.tableHeight === undefined &&
|
|
9667
9611
|
this.tableWidth === undefined &&
|
|
9668
9612
|
this.headerIsPersistent) {
|
|
9669
|
-
__classPrivateFieldGet$
|
|
9613
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyHeaderPosition, "f").call(this);
|
|
9670
9614
|
}
|
|
9671
9615
|
});
|
|
9672
9616
|
};
|
|
9673
9617
|
const options = {
|
|
9674
9618
|
threshold: 0,
|
|
9675
|
-
rootMargin: '-' + __classPrivateFieldGet$
|
|
9619
|
+
rootMargin: '-' + __classPrivateFieldGet$4(this, _KupDataTable_navBarHeight, "f") + 'px 0px 0px 0px',
|
|
9676
9620
|
};
|
|
9677
9621
|
__classPrivateFieldSet$2(this, _KupDataTable_intObserver, new IntersectionObserver(callback, options), "f");
|
|
9678
9622
|
}, _KupDataTable_didLoadInteractables = function _KupDataTable_didLoadInteractables() {
|
|
9679
|
-
__classPrivateFieldGet$
|
|
9623
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableTouch, "f").push(__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"));
|
|
9680
9624
|
const tapCb = (e) => {
|
|
9681
|
-
if (__classPrivateFieldGet$
|
|
9625
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_hold, "f")) {
|
|
9682
9626
|
__classPrivateFieldSet$2(this, _KupDataTable_hold, false, "f");
|
|
9683
9627
|
return;
|
|
9684
9628
|
}
|
|
@@ -9691,11 +9635,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9691
9635
|
for (const key in e) {
|
|
9692
9636
|
clone[key] = e[key];
|
|
9693
9637
|
}
|
|
9694
|
-
__classPrivateFieldGet$
|
|
9638
|
+
__classPrivateFieldGet$4(this, _KupDataTable_clickTimeout, "f").push(setTimeout(() => {
|
|
9695
9639
|
this.kupDataTableClick.emit({
|
|
9696
9640
|
comp: this,
|
|
9697
9641
|
id: this.rootElement.id,
|
|
9698
|
-
details: __classPrivateFieldGet$
|
|
9642
|
+
details: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_clickHandler).call(this, clone),
|
|
9699
9643
|
});
|
|
9700
9644
|
}, 300));
|
|
9701
9645
|
break;
|
|
@@ -9704,7 +9648,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9704
9648
|
this.kupDataTableContextMenu.emit({
|
|
9705
9649
|
comp: this,
|
|
9706
9650
|
id: this.rootElement.id,
|
|
9707
|
-
details: __classPrivateFieldGet$
|
|
9651
|
+
details: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_contextMenuHandler).call(this, e),
|
|
9708
9652
|
});
|
|
9709
9653
|
break;
|
|
9710
9654
|
}
|
|
@@ -9713,17 +9657,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9713
9657
|
switch (e.button) {
|
|
9714
9658
|
// left click
|
|
9715
9659
|
case 0:
|
|
9716
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9717
|
-
clearTimeout(__classPrivateFieldGet$
|
|
9718
|
-
__classPrivateFieldGet$
|
|
9719
|
-
__classPrivateFieldGet$
|
|
9660
|
+
for (let index = 0; index < __classPrivateFieldGet$4(this, _KupDataTable_clickTimeout, "f").length; index++) {
|
|
9661
|
+
clearTimeout(__classPrivateFieldGet$4(this, _KupDataTable_clickTimeout, "f")[index]);
|
|
9662
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Cleared clickHandler timeout(' +
|
|
9663
|
+
__classPrivateFieldGet$4(this, _KupDataTable_clickTimeout, "f")[index] +
|
|
9720
9664
|
').');
|
|
9721
9665
|
}
|
|
9722
9666
|
__classPrivateFieldSet$2(this, _KupDataTable_clickTimeout, [], "f");
|
|
9723
9667
|
this.kupDataTableDblClick.emit({
|
|
9724
9668
|
comp: this,
|
|
9725
9669
|
id: this.rootElement.id,
|
|
9726
|
-
details: __classPrivateFieldGet$
|
|
9670
|
+
details: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_dblClickHandler).call(this, e),
|
|
9727
9671
|
});
|
|
9728
9672
|
break;
|
|
9729
9673
|
}
|
|
@@ -9734,40 +9678,40 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9734
9678
|
this.kupDataTableContextMenu.emit({
|
|
9735
9679
|
comp: this,
|
|
9736
9680
|
id: this.rootElement.id,
|
|
9737
|
-
details: __classPrivateFieldGet$
|
|
9681
|
+
details: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_contextMenuHandler).call(this, e),
|
|
9738
9682
|
});
|
|
9739
9683
|
}
|
|
9740
9684
|
};
|
|
9741
|
-
__classPrivateFieldGet$
|
|
9742
|
-
__classPrivateFieldGet$
|
|
9743
|
-
__classPrivateFieldGet$
|
|
9685
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"), kupManager.KupPointerEventTypes.TAP, tapCb);
|
|
9686
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"), kupManager.KupPointerEventTypes.DOUBLETAP, doubletapCb);
|
|
9687
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"), kupManager.KupPointerEventTypes.HOLD, holdCb);
|
|
9744
9688
|
}, _KupDataTable_didRenderInteractables = function _KupDataTable_didRenderInteractables() {
|
|
9745
9689
|
if (this.showGroups) {
|
|
9746
|
-
if (!__classPrivateFieldGet$
|
|
9747
|
-
__classPrivateFieldGet$
|
|
9748
|
-
__classPrivateFieldGet$
|
|
9690
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").includes(__classPrivateFieldGet$4(this, _KupDataTable_groupsDropareaRef, "f"))) {
|
|
9691
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").push(__classPrivateFieldGet$4(this, _KupDataTable_groupsDropareaRef, "f"));
|
|
9692
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.dropzone(__classPrivateFieldGet$4(this, _KupDataTable_groupsDropareaRef, "f"), {
|
|
9749
9693
|
accept: `[${kupManager.kupDraggableColumnAttr}]`,
|
|
9750
9694
|
}, null, {
|
|
9751
9695
|
drop: (e) => {
|
|
9752
9696
|
const draggedTh = e.relatedTarget;
|
|
9753
9697
|
const grouped = kupManager.getColumnByName(this.getColumns(), draggedTh.dataset.column);
|
|
9754
|
-
__classPrivateFieldGet$
|
|
9755
|
-
__classPrivateFieldGet$
|
|
9698
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnGroup).call(this, grouped);
|
|
9699
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager.kupDragActiveAttr);
|
|
9756
9700
|
},
|
|
9757
9701
|
});
|
|
9758
9702
|
}
|
|
9759
9703
|
}
|
|
9760
9704
|
if (this.removableColumns) {
|
|
9761
|
-
if (!__classPrivateFieldGet$
|
|
9762
|
-
__classPrivateFieldGet$
|
|
9763
|
-
__classPrivateFieldGet$
|
|
9705
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").includes(__classPrivateFieldGet$4(this, _KupDataTable_removeDropareaRef, "f"))) {
|
|
9706
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").push(__classPrivateFieldGet$4(this, _KupDataTable_removeDropareaRef, "f"));
|
|
9707
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.dropzone(__classPrivateFieldGet$4(this, _KupDataTable_removeDropareaRef, "f"), {
|
|
9764
9708
|
accept: `[${kupManager.kupDraggableColumnAttr}]`,
|
|
9765
9709
|
}, null, {
|
|
9766
9710
|
drop: (e) => {
|
|
9767
9711
|
const draggedTh = e.relatedTarget;
|
|
9768
9712
|
const deleted = kupManager.getColumnByName(this.getColumns(), draggedTh.dataset.column);
|
|
9769
9713
|
this.hideColumn(deleted);
|
|
9770
|
-
__classPrivateFieldGet$
|
|
9714
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager.kupDragActiveAttr);
|
|
9771
9715
|
},
|
|
9772
9716
|
});
|
|
9773
9717
|
}
|
|
@@ -9800,7 +9744,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9800
9744
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCardAnchor, e.target, "f");
|
|
9801
9745
|
if (receiving && starter) {
|
|
9802
9746
|
if (onlySort) {
|
|
9803
|
-
__classPrivateFieldGet$
|
|
9747
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnSort).call(this, receiving, starter);
|
|
9804
9748
|
}
|
|
9805
9749
|
else if (onlyMerge) {
|
|
9806
9750
|
this.newColumn(kupManager.KupDataNewColumnTypes.CONCATENATE, {
|
|
@@ -9808,17 +9752,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9808
9752
|
});
|
|
9809
9753
|
}
|
|
9810
9754
|
else {
|
|
9811
|
-
__classPrivateFieldGet$
|
|
9755
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_createDropCard).call(this, starter, receiving);
|
|
9812
9756
|
}
|
|
9813
9757
|
}
|
|
9814
|
-
__classPrivateFieldGet$
|
|
9758
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager.kupDragActiveAttr);
|
|
9815
9759
|
};
|
|
9816
9760
|
const startCb = (e) => {
|
|
9817
9761
|
const draggable = e.target;
|
|
9818
|
-
__classPrivateFieldGet$
|
|
9762
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, true, draggable);
|
|
9819
9763
|
};
|
|
9820
9764
|
const endCb = () => {
|
|
9821
|
-
__classPrivateFieldGet$
|
|
9765
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
9822
9766
|
};
|
|
9823
9767
|
const dropCallbacks = {
|
|
9824
9768
|
drop: dropCb,
|
|
@@ -9827,14 +9771,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9827
9771
|
start: startCb,
|
|
9828
9772
|
end: endCb,
|
|
9829
9773
|
};
|
|
9830
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9831
|
-
const th = __classPrivateFieldGet$
|
|
9832
|
-
if (th && !__classPrivateFieldGet$
|
|
9833
|
-
__classPrivateFieldGet$
|
|
9834
|
-
__classPrivateFieldGet$
|
|
9774
|
+
for (let index = 0; index < __classPrivateFieldGet$4(this, _KupDataTable_thRefs, "f").length; index++) {
|
|
9775
|
+
const th = __classPrivateFieldGet$4(this, _KupDataTable_thRefs, "f")[index];
|
|
9776
|
+
if (th && !__classPrivateFieldGet$4(this, _KupDataTable_interactableDrag, "f").includes(th)) {
|
|
9777
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableDrag, "f").push(th);
|
|
9778
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.dropzone(th, {
|
|
9835
9779
|
accept: `[${kupManager.kupDraggableColumnAttr}]`,
|
|
9836
9780
|
}, null, dropCallbacks);
|
|
9837
|
-
__classPrivateFieldGet$
|
|
9781
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.draggable(th, {
|
|
9838
9782
|
cursorChecker() {
|
|
9839
9783
|
return null;
|
|
9840
9784
|
},
|
|
@@ -9854,11 +9798,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9854
9798
|
const callbacks = {
|
|
9855
9799
|
move: moveCb,
|
|
9856
9800
|
};
|
|
9857
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9858
|
-
const th = __classPrivateFieldGet$
|
|
9859
|
-
if (th && !__classPrivateFieldGet$
|
|
9860
|
-
__classPrivateFieldGet$
|
|
9861
|
-
__classPrivateFieldGet$
|
|
9801
|
+
for (let index = 0; index < __classPrivateFieldGet$4(this, _KupDataTable_thRefs, "f").length; index++) {
|
|
9802
|
+
const th = __classPrivateFieldGet$4(this, _KupDataTable_thRefs, "f")[index];
|
|
9803
|
+
if (th && !__classPrivateFieldGet$4(this, _KupDataTable_interactableResize, "f").includes(th)) {
|
|
9804
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableResize, "f").push(th);
|
|
9805
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.resizable(th, {
|
|
9862
9806
|
allowFrom: '.header-cell__drag-handler',
|
|
9863
9807
|
edges: {
|
|
9864
9808
|
left: false,
|
|
@@ -9872,8 +9816,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9872
9816
|
}
|
|
9873
9817
|
}
|
|
9874
9818
|
if (this.dragEnabled) {
|
|
9875
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9876
|
-
const row = __classPrivateFieldGet$
|
|
9819
|
+
for (let index = 0; index < __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").length; index++) {
|
|
9820
|
+
const row = __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f")[index];
|
|
9877
9821
|
const dataCb = () => {
|
|
9878
9822
|
const cellEl = this.rootElement.shadowRoot.querySelector('td:hover');
|
|
9879
9823
|
return {
|
|
@@ -9886,9 +9830,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9886
9830
|
selectedRows: this.selectedRows,
|
|
9887
9831
|
};
|
|
9888
9832
|
};
|
|
9889
|
-
if (row && !__classPrivateFieldGet$
|
|
9890
|
-
__classPrivateFieldGet$
|
|
9891
|
-
__classPrivateFieldGet$
|
|
9833
|
+
if (row && !__classPrivateFieldGet$4(this, _KupDataTable_interactableDrag, "f").includes(row)) {
|
|
9834
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableDrag, "f").push(row);
|
|
9835
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.draggable(row, {
|
|
9892
9836
|
allowFrom: 'td',
|
|
9893
9837
|
cursorChecker() {
|
|
9894
9838
|
return null;
|
|
@@ -9903,11 +9847,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9903
9847
|
const dataCb = () => {
|
|
9904
9848
|
const cell = this.rootElement.shadowRoot.querySelector('td:hover');
|
|
9905
9849
|
if (!cell) {
|
|
9906
|
-
__classPrivateFieldGet$
|
|
9850
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, "Couldn't find cell hovered to retrieve dropzone informations!", kupManager.KupDebugCategory.WARNING);
|
|
9907
9851
|
return;
|
|
9908
9852
|
}
|
|
9909
|
-
const path = __classPrivateFieldGet$
|
|
9910
|
-
const receivingDetails = __classPrivateFieldGet$
|
|
9853
|
+
const path = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").getEventPath(cell, this.rootElement);
|
|
9854
|
+
const receivingDetails = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, path);
|
|
9911
9855
|
return {
|
|
9912
9856
|
cell: receivingDetails.cell,
|
|
9913
9857
|
column: receivingDetails.column,
|
|
@@ -9915,11 +9859,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9915
9859
|
row: receivingDetails.row,
|
|
9916
9860
|
};
|
|
9917
9861
|
};
|
|
9918
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9919
|
-
const row = __classPrivateFieldGet$
|
|
9920
|
-
if (row && !__classPrivateFieldGet$
|
|
9921
|
-
__classPrivateFieldGet$
|
|
9922
|
-
__classPrivateFieldGet$
|
|
9862
|
+
for (let index = 0; index < __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").length; index++) {
|
|
9863
|
+
const row = __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f")[index];
|
|
9864
|
+
if (row && !__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").includes(row)) {
|
|
9865
|
+
__classPrivateFieldGet$4(this, _KupDataTable_interactableDrop, "f").push(row);
|
|
9866
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").interact.dropzone(row, {
|
|
9923
9867
|
accept: `[${kupManager.kupDraggableCellAttr}]`,
|
|
9924
9868
|
}, {
|
|
9925
9869
|
callback: dataCb,
|
|
@@ -9933,44 +9877,44 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9933
9877
|
if (this.headerIsPersistent &&
|
|
9934
9878
|
this.tableHeight === undefined &&
|
|
9935
9879
|
this.tableWidth === undefined) {
|
|
9936
|
-
__classPrivateFieldGet$
|
|
9937
|
-
__classPrivateFieldGet$
|
|
9880
|
+
__classPrivateFieldGet$4(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"));
|
|
9881
|
+
__classPrivateFieldGet$4(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$4(this, _KupDataTable_theadRef, "f"));
|
|
9938
9882
|
}
|
|
9939
9883
|
}, _KupDataTable_didRenderObservers = function _KupDataTable_didRenderObservers() {
|
|
9940
|
-
if (__classPrivateFieldGet$
|
|
9941
|
-
__classPrivateFieldGet$
|
|
9884
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_paginatedRowsLength, "f") < __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f") && this.lazyLoadRows) {
|
|
9885
|
+
__classPrivateFieldGet$4(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f")[__classPrivateFieldGet$4(this, _KupDataTable_paginatedRowsLength, "f") - 1]);
|
|
9942
9886
|
}
|
|
9943
9887
|
}, _KupDataTable_didLoadEventHandling = function _KupDataTable_didLoadEventHandling() {
|
|
9944
|
-
__classPrivateFieldGet$
|
|
9888
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f").addEventListener('scroll', () => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_scrollStickyHeader).call(this));
|
|
9945
9889
|
}, _KupDataTable_scrollStickyHeader = function _KupDataTable_scrollStickyHeader() {
|
|
9946
|
-
if (!__classPrivateFieldGet$
|
|
9890
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
9947
9891
|
return;
|
|
9948
9892
|
}
|
|
9949
|
-
__classPrivateFieldGet$
|
|
9893
|
+
__classPrivateFieldGet$4(this, _KupDataTable_stickyTheadRef, "f").scrollLeft = __classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f").scrollLeft;
|
|
9950
9894
|
}, _KupDataTable_checkScrollOnHover = function _KupDataTable_checkScrollOnHover() {
|
|
9951
|
-
if (!__classPrivateFieldGet$
|
|
9895
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").scrollOnHover.isRegistered(__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f"))) {
|
|
9952
9896
|
if (this.scrollOnHover &&
|
|
9953
9897
|
this.tableHeight === undefined &&
|
|
9954
9898
|
this.tableWidth === undefined) {
|
|
9955
|
-
__classPrivateFieldGet$
|
|
9899
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").scrollOnHover.register(__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f"));
|
|
9956
9900
|
}
|
|
9957
9901
|
}
|
|
9958
9902
|
else {
|
|
9959
9903
|
if (!this.scrollOnHover &&
|
|
9960
9904
|
(this.tableHeight !== undefined ||
|
|
9961
9905
|
this.tableWidth !== undefined)) {
|
|
9962
|
-
__classPrivateFieldGet$
|
|
9906
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").scrollOnHover.unregister(__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f"));
|
|
9963
9907
|
}
|
|
9964
9908
|
}
|
|
9965
9909
|
}, _KupDataTable_customizePanelPosition = function _KupDataTable_customizePanelPosition() {
|
|
9966
|
-
if (__classPrivateFieldGet$
|
|
9967
|
-
!__classPrivateFieldGet$
|
|
9968
|
-
__classPrivateFieldGet$
|
|
9910
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_customizeTopButtonRef, "f") &&
|
|
9911
|
+
!__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f"))) {
|
|
9912
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f"), __classPrivateFieldGet$4(this, _KupDataTable_customizeTopButtonRef, "f"), 0, kupManager.KupDynamicPositionPlacement.BOTTOM, true);
|
|
9969
9913
|
}
|
|
9970
9914
|
}, _KupDataTable_rowsPointLength = function _KupDataTable_rowsPointLength() {
|
|
9971
|
-
return __classPrivateFieldGet$
|
|
9915
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, __classPrivateFieldGet$4(this, _KupDataTable_rows, "f"));
|
|
9972
9916
|
}, _KupDataTable_paginatedRowsPointLength = function _KupDataTable_paginatedRowsPointLength() {
|
|
9973
|
-
return __classPrivateFieldGet$
|
|
9917
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, __classPrivateFieldGet$4(this, _KupDataTable_paginatedRows, "f"));
|
|
9974
9918
|
}, _KupDataTable__rowsLength = function _KupDataTable__rowsLength(r) {
|
|
9975
9919
|
if (r == null) {
|
|
9976
9920
|
return 0;
|
|
@@ -9983,14 +9927,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9983
9927
|
}
|
|
9984
9928
|
count += 1;
|
|
9985
9929
|
if (row.group != null) {
|
|
9986
|
-
count += __classPrivateFieldGet$
|
|
9930
|
+
count += __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, row.group.children);
|
|
9987
9931
|
}
|
|
9988
9932
|
}
|
|
9989
9933
|
return count;
|
|
9990
9934
|
}, _KupDataTable_setDynPosElements = function _KupDataTable_setDynPosElements() {
|
|
9991
9935
|
// Column menu
|
|
9992
|
-
if (__classPrivateFieldGet$
|
|
9993
|
-
__classPrivateFieldGet$
|
|
9936
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f") && __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").data) {
|
|
9937
|
+
__classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").data = __classPrivateFieldGet$4(this, _KupDataTable_columnMenuInstance, "f").prepData(this, kupManager.getColumnByName(this.getVisibleColumns(), this.columnMenuAnchor), __classPrivateFieldGet$4(this, _KupDataTable_columnMenuCard, "f").data);
|
|
9994
9938
|
}
|
|
9995
9939
|
}, _KupDataTable_resetSelectedRows = function _KupDataTable_resetSelectedRows() {
|
|
9996
9940
|
if (this.getRows().length === 0)
|
|
@@ -10014,7 +9958,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10014
9958
|
return undefined;
|
|
10015
9959
|
}
|
|
10016
9960
|
}, _KupDataTable_rowDetail = function _KupDataTable_rowDetail(row, x, y) {
|
|
10017
|
-
const transposedData = __classPrivateFieldGet$
|
|
9961
|
+
const transposedData = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getTransposedData).call(this);
|
|
10018
9962
|
const cardData = {
|
|
10019
9963
|
button: [
|
|
10020
9964
|
{
|
|
@@ -10043,7 +9987,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10043
9987
|
showHeader: false,
|
|
10044
9988
|
},
|
|
10045
9989
|
],
|
|
10046
|
-
text: [__classPrivateFieldGet$
|
|
9990
|
+
text: [__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.DETAIL)],
|
|
10047
9991
|
};
|
|
10048
9992
|
const columns = cardData.datatable[0].data.columns;
|
|
10049
9993
|
const rows = cardData.datatable[0].data.rows;
|
|
@@ -10067,7 +10011,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10067
10011
|
currentColumn.visible = true;
|
|
10068
10012
|
}
|
|
10069
10013
|
else {
|
|
10070
|
-
__classPrivateFieldGet$
|
|
10014
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Invalid column name on row ID (' +
|
|
10071
10015
|
row.id +
|
|
10072
10016
|
"), couldn't set current record!", kupManager.KupDebugCategory.WARNING);
|
|
10073
10017
|
}
|
|
@@ -10076,7 +10020,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10076
10020
|
for (let index = 0; index < rows.length; index++) {
|
|
10077
10021
|
const column = this.data.columns.find((x) => x.name === rows[index].transposedColumnName);
|
|
10078
10022
|
if (!column) {
|
|
10079
|
-
__classPrivateFieldGet$
|
|
10023
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Column not found on row name (' + column + ')!', kupManager.KupDebugCategory.WARNING);
|
|
10080
10024
|
return;
|
|
10081
10025
|
}
|
|
10082
10026
|
const editable = rows[index].cells[row.id].isEditable
|
|
@@ -10100,8 +10044,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10100
10044
|
resource: editable ? 'edit-key' : 'key-variant',
|
|
10101
10045
|
},
|
|
10102
10046
|
title: editable
|
|
10103
|
-
? __classPrivateFieldGet$
|
|
10104
|
-
: __classPrivateFieldGet$
|
|
10047
|
+
? __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.EDITABLE_KEY)
|
|
10048
|
+
: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.KEY),
|
|
10105
10049
|
value: editable ? 'edit-key' : 'key-variant',
|
|
10106
10050
|
};
|
|
10107
10051
|
}
|
|
@@ -10116,7 +10060,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10116
10060
|
color: `var(${kupManager.KupThemeColorValues.TEXT})`,
|
|
10117
10061
|
resource: 'pencil',
|
|
10118
10062
|
},
|
|
10119
|
-
title: __classPrivateFieldGet$
|
|
10063
|
+
title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EDITABLE_FIELD),
|
|
10120
10064
|
value: 'pencil',
|
|
10121
10065
|
};
|
|
10122
10066
|
}
|
|
@@ -10138,35 +10082,35 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10138
10082
|
}
|
|
10139
10083
|
rows[index].cells[kupManager.iconColumn.toUpperCase()] = iconCell;
|
|
10140
10084
|
}
|
|
10141
|
-
if (!__classPrivateFieldGet$
|
|
10085
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f")) {
|
|
10142
10086
|
__classPrivateFieldSet$2(this, _KupDataTable_detailCard, document.createElement('kup-card'), "f");
|
|
10143
|
-
__classPrivateFieldGet$
|
|
10144
|
-
__classPrivateFieldGet$
|
|
10145
|
-
__classPrivateFieldGet$
|
|
10146
|
-
__classPrivateFieldGet$
|
|
10087
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").layoutFamily = kupManager.KupCardFamily.DIALOG;
|
|
10088
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").layoutNumber = 4;
|
|
10089
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").sizeX = 'auto';
|
|
10090
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").sizeY = 'auto';
|
|
10147
10091
|
}
|
|
10148
10092
|
else {
|
|
10149
|
-
const children = Array.prototype.slice.call(__classPrivateFieldGet$
|
|
10093
|
+
const children = Array.prototype.slice.call(__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").children, 0);
|
|
10150
10094
|
for (let index = 0; index < children.length; index++) {
|
|
10151
10095
|
children[index].remove();
|
|
10152
10096
|
}
|
|
10153
10097
|
}
|
|
10154
|
-
__classPrivateFieldGet$
|
|
10155
|
-
__classPrivateFieldGet$
|
|
10156
|
-
__classPrivateFieldGet$
|
|
10157
|
-
__classPrivateFieldGet$
|
|
10158
|
-
__classPrivateFieldGet$
|
|
10159
|
-
__classPrivateFieldGet$
|
|
10160
|
-
__classPrivateFieldGet$
|
|
10161
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
10098
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").data = cardData;
|
|
10099
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").style.position = 'fixed';
|
|
10100
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").style.left = '0';
|
|
10101
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").style.top = '0';
|
|
10102
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").setAttribute('data-x', x.toString());
|
|
10103
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").setAttribute('data-y', y.toString());
|
|
10104
|
+
__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f").style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
|
10105
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$4(this, _KupDataTable_detailCard, "f"));
|
|
10162
10106
|
}, _KupDataTable_rowInsertForm = function _KupDataTable_rowInsertForm() {
|
|
10163
10107
|
const CARD_WIDTH = 400;
|
|
10164
10108
|
const CARD_HEIGHT = 400;
|
|
10165
10109
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, document.createElement('kup-card'), "f");
|
|
10166
|
-
__classPrivateFieldGet$
|
|
10167
|
-
__classPrivateFieldGet$
|
|
10168
|
-
__classPrivateFieldGet$
|
|
10169
|
-
__classPrivateFieldGet$
|
|
10110
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").layoutFamily = kupManager.KupCardFamily.FREE;
|
|
10111
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").layoutNumber = 1;
|
|
10112
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").sizeX = CARD_WIDTH + 'px';
|
|
10113
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").sizeY = CARD_HEIGHT + 'px';
|
|
10170
10114
|
const style = document.createElement('style');
|
|
10171
10115
|
style.innerText =
|
|
10172
10116
|
'kup-form { max-height: 40vh; overflow: auto; } .page-wrapper { display: grid; } ' +
|
|
@@ -10174,24 +10118,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10174
10118
|
'.message-wrapper { display: none; justify-content: start; padding-top: 5px; padding-bottom: 5px; } ' +
|
|
10175
10119
|
'.errorIcon { --kup-icon-color: var(--kup-danger-color); } ' +
|
|
10176
10120
|
'.message { background-color: var(--kup-danger-color); color: white; padding: 3px; } ';
|
|
10177
|
-
__classPrivateFieldGet$
|
|
10121
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").append(style);
|
|
10178
10122
|
const pageWrapper = document.createElement('div');
|
|
10179
10123
|
pageWrapper.className = 'page-wrapper';
|
|
10180
10124
|
const buttonWrapper = document.createElement('div');
|
|
10181
10125
|
buttonWrapper.className = 'button-wrapper';
|
|
10182
10126
|
const cancel = document.createElement('kup-button');
|
|
10183
10127
|
const confirm = document.createElement('kup-button');
|
|
10184
|
-
cancel.id = __classPrivateFieldGet$
|
|
10128
|
+
cancel.id = __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_CANCEL_ID, "f");
|
|
10185
10129
|
cancel.icon = 'clear';
|
|
10186
|
-
cancel.label = __classPrivateFieldGet$
|
|
10130
|
+
cancel.label = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.ABORT);
|
|
10187
10131
|
cancel.styling = fButtonDeclarations.FButtonStyling.FLAT;
|
|
10188
10132
|
cancel.addEventListener('kup-button-click', () => {
|
|
10189
|
-
__classPrivateFieldGet$
|
|
10133
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").remove();
|
|
10190
10134
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, null, "f");
|
|
10191
10135
|
});
|
|
10192
|
-
confirm.id = __classPrivateFieldGet$
|
|
10136
|
+
confirm.id = __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_SUBMIT_ID, "f");
|
|
10193
10137
|
confirm.icon = 'check';
|
|
10194
|
-
confirm.label = __classPrivateFieldGet$
|
|
10138
|
+
confirm.label = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.CONFIRM);
|
|
10195
10139
|
let innerComp = document.createElement('kup-spinner');
|
|
10196
10140
|
innerComp.slot = 'spinner';
|
|
10197
10141
|
innerComp.dimensions = '0.6em';
|
|
@@ -10210,7 +10154,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10210
10154
|
buttonWrapper.append(cancel);
|
|
10211
10155
|
buttonWrapper.append(confirm);
|
|
10212
10156
|
const form = document.createElement('kup-form');
|
|
10213
|
-
form.id = __classPrivateFieldGet$
|
|
10157
|
+
form.id = __classPrivateFieldGet$4(this, _KupDataTable_FIELDS_FORM_ID, "f");
|
|
10214
10158
|
const row = {
|
|
10215
10159
|
cells: {},
|
|
10216
10160
|
id: '0',
|
|
@@ -10230,7 +10174,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10230
10174
|
};
|
|
10231
10175
|
const messageWrapper = document.createElement('div');
|
|
10232
10176
|
messageWrapper.className = 'message-wrapper';
|
|
10233
|
-
messageWrapper.id = __classPrivateFieldGet$
|
|
10177
|
+
messageWrapper.id = __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f");
|
|
10234
10178
|
const icon = document.createElement('kup-image');
|
|
10235
10179
|
icon.className = 'errorIcon';
|
|
10236
10180
|
icon.resource = 'cancel';
|
|
@@ -10239,43 +10183,43 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10239
10183
|
messageWrapper.append(icon);
|
|
10240
10184
|
const message = document.createElement('span');
|
|
10241
10185
|
message.className = 'message';
|
|
10242
|
-
message.id = __classPrivateFieldGet$
|
|
10186
|
+
message.id = __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_ID, "f");
|
|
10243
10187
|
let msg = '';
|
|
10244
10188
|
message.innerText = msg;
|
|
10245
10189
|
messageWrapper.append(message);
|
|
10246
10190
|
pageWrapper.append(messageWrapper);
|
|
10247
10191
|
pageWrapper.append(form);
|
|
10248
10192
|
pageWrapper.append(buttonWrapper);
|
|
10249
|
-
__classPrivateFieldGet$
|
|
10250
|
-
__classPrivateFieldGet$
|
|
10251
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
10193
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").append(pageWrapper);
|
|
10194
|
+
__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f").data = {};
|
|
10195
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$4(this, _KupDataTable_insertCard, "f"));
|
|
10252
10196
|
}, _KupDataTable_rowsDelete = function _KupDataTable_rowsDelete() {
|
|
10253
10197
|
const createDeleteCard = () => {
|
|
10254
10198
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteDialog, document.createElement('kup-dialog'), "f");
|
|
10255
10199
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteCard, document.createElement('kup-card'), "f");
|
|
10256
|
-
__classPrivateFieldGet$
|
|
10257
|
-
__classPrivateFieldGet$
|
|
10258
|
-
__classPrivateFieldGet$
|
|
10259
|
-
__classPrivateFieldGet$
|
|
10200
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").layoutFamily = kupManager.KupCardFamily.FREE;
|
|
10201
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").layoutNumber = 1;
|
|
10202
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").sizeX = 'auto';
|
|
10203
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").sizeY = 'auto';
|
|
10260
10204
|
const style = document.createElement('style');
|
|
10261
10205
|
style.innerText =
|
|
10262
10206
|
'.button-wrapper, .message-wrapper { display: flex; justify-content: space-around; z-index: var(--kup-card-zindex); } .message-wrapper { padding-bottom: 20px; }';
|
|
10263
10207
|
const messageWrapper = document.createElement('div');
|
|
10264
10208
|
messageWrapper.className = 'message-wrapper';
|
|
10265
|
-
messageWrapper.id = __classPrivateFieldGet$
|
|
10209
|
+
messageWrapper.id = __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f");
|
|
10266
10210
|
const message = document.createElement('span');
|
|
10267
10211
|
message.className = 'message';
|
|
10268
|
-
message.id = __classPrivateFieldGet$
|
|
10269
|
-
let msg = __classPrivateFieldGet$
|
|
10212
|
+
message.id = __classPrivateFieldGet$4(this, _KupDataTable_MESSAGE_ID, "f");
|
|
10213
|
+
let msg = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.CONFIRM_DELETE_X_ROWS);
|
|
10270
10214
|
msg = msg.replace('{0}', this.selectedRows.length + '');
|
|
10271
10215
|
message.innerText = msg;
|
|
10272
10216
|
messageWrapper.append(message);
|
|
10273
10217
|
const buttonWrapper = document.createElement('div');
|
|
10274
10218
|
buttonWrapper.className = 'button-wrapper';
|
|
10275
10219
|
const confirm = document.createElement('kup-button');
|
|
10276
|
-
confirm.id = __classPrivateFieldGet$
|
|
10220
|
+
confirm.id = __classPrivateFieldGet$4(this, _KupDataTable_BUTTON_SUBMIT_ID, "f");
|
|
10277
10221
|
confirm.icon = 'check';
|
|
10278
|
-
confirm.label = __classPrivateFieldGet$
|
|
10222
|
+
confirm.label = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.CONFIRM);
|
|
10279
10223
|
let innerComp = document.createElement('kup-spinner');
|
|
10280
10224
|
innerComp.slot = 'spinner';
|
|
10281
10225
|
innerComp.dimensions = '0.6em';
|
|
@@ -10290,17 +10234,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10290
10234
|
});
|
|
10291
10235
|
});
|
|
10292
10236
|
buttonWrapper.append(confirm);
|
|
10293
|
-
__classPrivateFieldGet$
|
|
10294
|
-
__classPrivateFieldGet$
|
|
10295
|
-
__classPrivateFieldGet$
|
|
10296
|
-
__classPrivateFieldGet$
|
|
10297
|
-
__classPrivateFieldGet$
|
|
10298
|
-
document.querySelector('body').append(__classPrivateFieldGet$
|
|
10237
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").append(style);
|
|
10238
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").append(messageWrapper);
|
|
10239
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").append(buttonWrapper);
|
|
10240
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f").data = {};
|
|
10241
|
+
__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteDialog, "f").append(__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteCard, "f"));
|
|
10242
|
+
document.querySelector('body').append(__classPrivateFieldGet$4(this, _KupDataTable_confirmDeleteDialog, "f"));
|
|
10299
10243
|
};
|
|
10300
10244
|
const insertRowsIds = [];
|
|
10301
10245
|
const startingRows = [];
|
|
10302
10246
|
this.selectedRows.forEach((row) => {
|
|
10303
|
-
if (row.id.indexOf(__classPrivateFieldGet$
|
|
10247
|
+
if (row.id.indexOf(__classPrivateFieldGet$4(this, _KupDataTable_INSERT_PREFIX, "f")) > -1) {
|
|
10304
10248
|
insertRowsIds.push(row.id);
|
|
10305
10249
|
}
|
|
10306
10250
|
else {
|
|
@@ -10405,15 +10349,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10405
10349
|
tr: tr ? tr : null,
|
|
10406
10350
|
};
|
|
10407
10351
|
}, _KupDataTable_clickHandler = function _KupDataTable_clickHandler(e) {
|
|
10408
|
-
const details = __classPrivateFieldGet$
|
|
10352
|
+
const details = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10409
10353
|
if (details.area === 'header') {
|
|
10410
10354
|
if (details.th && details.column) {
|
|
10411
10355
|
if (details.filterRemove) {
|
|
10412
|
-
__classPrivateFieldGet$
|
|
10356
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onRemoveFilter).call(this, details.column);
|
|
10413
10357
|
return details;
|
|
10414
10358
|
}
|
|
10415
10359
|
else if (this.sortEnabled) {
|
|
10416
|
-
__classPrivateFieldGet$
|
|
10360
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onColumnSort).call(this, e, details.column.name);
|
|
10417
10361
|
return details;
|
|
10418
10362
|
}
|
|
10419
10363
|
}
|
|
@@ -10428,22 +10372,22 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10428
10372
|
}
|
|
10429
10373
|
details.tr.classList.add('focus');
|
|
10430
10374
|
if (e.ctrlKey || e.metaKey) {
|
|
10431
|
-
__classPrivateFieldGet$
|
|
10375
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_rowDetail).call(this, Object.assign({}, details.row), e.clientX, e.clientY);
|
|
10432
10376
|
return details;
|
|
10433
10377
|
}
|
|
10434
10378
|
}
|
|
10435
10379
|
if (details.tr && details.row && details.isGroupRow) {
|
|
10436
|
-
__classPrivateFieldGet$
|
|
10380
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onRowExpand).call(this, details.row);
|
|
10437
10381
|
return details;
|
|
10438
10382
|
}
|
|
10439
10383
|
if (details.td && details.row && !details.textfield) {
|
|
10440
|
-
__classPrivateFieldGet$
|
|
10384
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, details.row, details.td, true);
|
|
10441
10385
|
return details;
|
|
10442
10386
|
}
|
|
10443
10387
|
}
|
|
10444
10388
|
return details;
|
|
10445
10389
|
}, _KupDataTable_contextMenuHandler = function _KupDataTable_contextMenuHandler(e) {
|
|
10446
|
-
const details = __classPrivateFieldGet$
|
|
10390
|
+
const details = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10447
10391
|
if (details.area === 'header') {
|
|
10448
10392
|
if (details.th && details.column) {
|
|
10449
10393
|
this.openColumnMenu(details.column.name);
|
|
@@ -10453,34 +10397,34 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10453
10397
|
else if (details.area === 'footer') {
|
|
10454
10398
|
if (details.td && details.column) {
|
|
10455
10399
|
__classPrivateFieldSet$2(this, _KupDataTable_totalMenuCoords, { x: e.clientX, y: e.clientY }, "f");
|
|
10456
|
-
__classPrivateFieldGet$
|
|
10400
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onTotalMenuOpen).call(this, details.column);
|
|
10457
10401
|
return details;
|
|
10458
10402
|
}
|
|
10459
10403
|
}
|
|
10460
10404
|
return details;
|
|
10461
10405
|
}, _KupDataTable_dblClickHandler = function _KupDataTable_dblClickHandler(e) {
|
|
10462
|
-
const details = __classPrivateFieldGet$
|
|
10406
|
+
const details = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10463
10407
|
if (details.area === 'body') {
|
|
10464
10408
|
if (this.selection == kupManager.SelectionMode.MULTIPLE) {
|
|
10465
|
-
__classPrivateFieldGet$
|
|
10409
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
10466
10410
|
}
|
|
10467
10411
|
if (this.selection == kupManager.SelectionMode.SINGLE ||
|
|
10468
10412
|
this.selection == kupManager.SelectionMode.MULTIPLE) {
|
|
10469
|
-
__classPrivateFieldGet$
|
|
10413
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, details.row, details.td, false);
|
|
10470
10414
|
}
|
|
10471
10415
|
}
|
|
10472
10416
|
return details;
|
|
10473
10417
|
}, _KupDataTable_initRows = function _KupDataTable_initRows() {
|
|
10474
|
-
__classPrivateFieldGet$
|
|
10475
|
-
__classPrivateFieldSet$2(this, _KupDataTable_footer, fPaginatorUtils.calcTotals(fPaginatorUtils.normalizeRows(this.getColumns(), __classPrivateFieldGet$
|
|
10476
|
-
__classPrivateFieldGet$
|
|
10477
|
-
__classPrivateFieldGet$
|
|
10478
|
-
__classPrivateFieldGet$
|
|
10479
|
-
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRows, fPaginatorUtils.paginateRows(__classPrivateFieldGet$
|
|
10480
|
-
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRowsLength, __classPrivateFieldGet$
|
|
10418
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_filterRows).call(this);
|
|
10419
|
+
__classPrivateFieldSet$2(this, _KupDataTable_footer, fPaginatorUtils.calcTotals(fPaginatorUtils.normalizeRows(this.getColumns(), __classPrivateFieldGet$4(this, _KupDataTable_rows, "f")), this.totals), "f");
|
|
10420
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_groupRows).call(this);
|
|
10421
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_sortRows).call(this);
|
|
10422
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
10423
|
+
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRows, fPaginatorUtils.paginateRows(__classPrivateFieldGet$4(this, _KupDataTable_rows, "f"), this.currentPage, this.currentRowsPerPage, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)), "f");
|
|
10424
|
+
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRowsLength, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_paginatedRowsPointLength).call(this), "f");
|
|
10481
10425
|
}, _KupDataTable_filterRows = function _KupDataTable_filterRows() {
|
|
10482
10426
|
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.filterRows(this.getRows(), this.filters, this.globalFilterValue, this.getColumns()), "f");
|
|
10483
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rowsLength, __classPrivateFieldGet$
|
|
10427
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rowsLength, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_rowsPointLength).call(this), "f");
|
|
10484
10428
|
}, _KupDataTable_isGrouping = function _KupDataTable_isGrouping() {
|
|
10485
10429
|
return this.groups && this.groups.length > 0;
|
|
10486
10430
|
}, _KupDataTable_hasRowActions = function _KupDataTable_hasRowActions() {
|
|
@@ -10494,19 +10438,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10494
10438
|
}, _KupDataTable_hasTotals = function _KupDataTable_hasTotals() {
|
|
10495
10439
|
return this.totals && Object.keys(this.totals).length > 0;
|
|
10496
10440
|
}, _KupDataTable_tableHasAutoWidth = function _KupDataTable_tableHasAutoWidth() {
|
|
10497
|
-
if (!__classPrivateFieldGet$
|
|
10441
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")) {
|
|
10498
10442
|
return;
|
|
10499
10443
|
}
|
|
10500
10444
|
const visibleCols = this.getVisibleColumns();
|
|
10501
10445
|
// Before checking each column, controls that visible columns are as many as items with custom sizes.
|
|
10502
10446
|
// If there are more visible columns, it means that the width of the table will be set to auto.
|
|
10503
|
-
if (visibleCols.length <= __classPrivateFieldGet$
|
|
10447
|
+
if (visibleCols.length <= __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f").length) {
|
|
10504
10448
|
let found = false;
|
|
10505
10449
|
// Each visible column must have its own width for the table to have a auto width
|
|
10506
10450
|
for (let i = 0; i < visibleCols.length; i++) {
|
|
10507
10451
|
found = false;
|
|
10508
|
-
for (let j = 0; j < __classPrivateFieldGet$
|
|
10509
|
-
if (visibleCols[i].name === __classPrivateFieldGet$
|
|
10452
|
+
for (let j = 0; j < __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f").length; j++) {
|
|
10453
|
+
if (visibleCols[i].name === __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")[j].name) {
|
|
10510
10454
|
found = true;
|
|
10511
10455
|
break;
|
|
10512
10456
|
}
|
|
@@ -10519,8 +10463,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10519
10463
|
}
|
|
10520
10464
|
return false;
|
|
10521
10465
|
}, _KupDataTable_forceGroupExpansion = function _KupDataTable_forceGroupExpansion() {
|
|
10522
|
-
__classPrivateFieldGet$
|
|
10523
|
-
__classPrivateFieldGet$
|
|
10466
|
+
__classPrivateFieldGet$4(this, _KupDataTable_rows, "f").forEach((row) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, row));
|
|
10467
|
+
__classPrivateFieldGet$4(this, _KupDataTable_paginatedRows, "f").forEach((row) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, row));
|
|
10524
10468
|
}, _KupDataTable_forceRowGroupExpansion = function _KupDataTable_forceRowGroupExpansion(row) {
|
|
10525
10469
|
// check if row is group
|
|
10526
10470
|
if (!row.group) {
|
|
@@ -10541,10 +10485,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10541
10485
|
}
|
|
10542
10486
|
this.groupState[row.group.id] = groupState;
|
|
10543
10487
|
if (row.group.children) {
|
|
10544
|
-
row.group.children.forEach((childRow) => __classPrivateFieldGet$
|
|
10488
|
+
row.group.children.forEach((childRow) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, childRow));
|
|
10545
10489
|
}
|
|
10546
10490
|
}, _KupDataTable_adjustPaginator = function _KupDataTable_adjustPaginator() {
|
|
10547
|
-
const numberOfRows = __classPrivateFieldGet$
|
|
10491
|
+
const numberOfRows = __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f");
|
|
10548
10492
|
// check if current page is valid
|
|
10549
10493
|
const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
|
|
10550
10494
|
if (this.currentPage > numberOfPages) {
|
|
@@ -10553,7 +10497,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10553
10497
|
this.resetCurrentPage();
|
|
10554
10498
|
}
|
|
10555
10499
|
}, _KupDataTable_composeFixedCellStyleAndClass = function _KupDataTable_composeFixedCellStyleAndClass(columnCssIndex, rowCssIndex, extraCellsCount = 0) {
|
|
10556
|
-
if (__classPrivateFieldGet$
|
|
10500
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
10557
10501
|
return undefined;
|
|
10558
10502
|
}
|
|
10559
10503
|
//-- Controls if there are fixed rows or columns --
|
|
@@ -10590,20 +10534,20 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10590
10534
|
}, _KupDataTable_updateFixedRowsAndColumnsCssVariables = function _KupDataTable_updateFixedRowsAndColumnsCssVariables() {
|
|
10591
10535
|
// [ffbf] - Using getBoundingClientRect is mandatory since Firefox return a wrong value for ele.offsetHeight and witdh values
|
|
10592
10536
|
// When grouping, the fixed rows and columns are not sticky
|
|
10593
|
-
if (__classPrivateFieldGet$
|
|
10537
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) || !__classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f"))
|
|
10594
10538
|
return false;
|
|
10595
10539
|
let toRet = false;
|
|
10596
10540
|
if (this.fixedRows >= 1) {
|
|
10597
|
-
let currentRow = __classPrivateFieldGet$
|
|
10541
|
+
let currentRow = __classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type');
|
|
10598
10542
|
// The height must start from the height of the header. BUT not on Safari.
|
|
10599
10543
|
// Safari handles the sticky position on the tables in a different way, making it start from the tbody element
|
|
10600
10544
|
// and not on the table with a specified position of sticky. There fore in that case we must set initial height to 0.
|
|
10601
|
-
let previousHeight = !__classPrivateFieldGet$
|
|
10602
|
-
? __classPrivateFieldGet$
|
|
10545
|
+
let previousHeight = !__classPrivateFieldGet$4(this, _KupDataTable_isSafariBrowser, "f")
|
|
10546
|
+
? __classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").querySelector('thead > tr:first-of-type > th:first-of-type').getBoundingClientRect().height // [ffbf]
|
|
10603
10547
|
: 0;
|
|
10604
10548
|
// [CSSCount] - I must start from 1 since we are referencing html elements e not array (with CSS selectors starting from 1)
|
|
10605
10549
|
for (let i = 1; i <= this.fixedRows && currentRow; i++) {
|
|
10606
|
-
__classPrivateFieldGet$
|
|
10550
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f").style.setProperty(kupManager.FixedCellsCSSVarsBase.rows + i, previousHeight + 'px');
|
|
10607
10551
|
previousHeight += currentRow.children[0].getBoundingClientRect().height; // [ffbf]
|
|
10608
10552
|
currentRow =
|
|
10609
10553
|
currentRow.nextElementSibling;
|
|
@@ -10611,14 +10555,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10611
10555
|
toRet = true;
|
|
10612
10556
|
}
|
|
10613
10557
|
if (this.fixedColumns >= 1) {
|
|
10614
|
-
let currentCell = __classPrivateFieldGet$
|
|
10558
|
+
let currentCell = __classPrivateFieldGet$4(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type > td:first-of-type');
|
|
10615
10559
|
let previousWidth = 0;
|
|
10616
10560
|
const totalFixedColumns = this.fixedColumns +
|
|
10617
|
-
(__classPrivateFieldGet$
|
|
10561
|
+
(__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ? 1 : 0) +
|
|
10618
10562
|
(this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX ? 1 : 0);
|
|
10619
10563
|
// @See [CSSCount]
|
|
10620
10564
|
for (let i = 1; i <= totalFixedColumns && currentCell; i++) {
|
|
10621
|
-
__classPrivateFieldGet$
|
|
10565
|
+
__classPrivateFieldGet$4(this, _KupDataTable_tableAreaRef, "f").style.setProperty(kupManager.FixedCellsCSSVarsBase.columns + i, previousWidth + 'px');
|
|
10622
10566
|
previousWidth += currentCell.getBoundingClientRect().width; // [ffbf]
|
|
10623
10567
|
currentCell =
|
|
10624
10568
|
currentCell.nextElementSibling;
|
|
@@ -10666,10 +10610,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10666
10610
|
// resetting current page
|
|
10667
10611
|
this.resetCurrentPage();
|
|
10668
10612
|
const newFilters = Object.assign({}, this.filters);
|
|
10669
|
-
__classPrivateFieldGet$
|
|
10613
|
+
__classPrivateFieldGet$4(this, _KupDataTable_filtersColumnMenuInstance, "f").removeFilter(newFilters, column.name);
|
|
10670
10614
|
this.filters = newFilters;
|
|
10671
10615
|
}, _KupDataTable_getFilterValueForTooltip = function _KupDataTable_getFilterValueForTooltip(column) {
|
|
10672
|
-
return __classPrivateFieldGet$
|
|
10616
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_filtersColumnMenuInstance, "f").getFilterValueForTooltip(this.filters, column);
|
|
10673
10617
|
}, _KupDataTable_onGlobalFilterChange = function _KupDataTable_onGlobalFilterChange(inputEl) {
|
|
10674
10618
|
this.resetCurrentPage();
|
|
10675
10619
|
if (inputEl) {
|
|
@@ -10680,15 +10624,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10680
10624
|
this.globalFilterValue = '';
|
|
10681
10625
|
}
|
|
10682
10626
|
}, _KupDataTable_handlePageChange = function _KupDataTable_handlePageChange(pageNumber) {
|
|
10683
|
-
const newPage = fPaginatorUtils.pageChange(pageNumber, __classPrivateFieldGet$
|
|
10627
|
+
const newPage = fPaginatorUtils.pageChange(pageNumber, __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f"), this.currentRowsPerPage);
|
|
10684
10628
|
if (newPage) {
|
|
10685
10629
|
this.currentPage = newPage;
|
|
10686
10630
|
}
|
|
10687
10631
|
}, _KupDataTable_handleRowsPerPageChange = function _KupDataTable_handleRowsPerPageChange(rowsNumber) {
|
|
10688
|
-
const newRows = fPaginatorUtils.rowsPerPageChange(rowsNumber, __classPrivateFieldGet$
|
|
10632
|
+
const newRows = fPaginatorUtils.rowsPerPageChange(rowsNumber, __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f"));
|
|
10689
10633
|
if (newRows) {
|
|
10690
10634
|
this.currentRowsPerPage = newRows;
|
|
10691
|
-
__classPrivateFieldGet$
|
|
10635
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
10692
10636
|
}
|
|
10693
10637
|
}, _KupDataTable_onRowClick = function _KupDataTable_onRowClick(row, td, emitEvent) {
|
|
10694
10638
|
// selecting row
|
|
@@ -10718,9 +10662,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10718
10662
|
if (!row.unselectable &&
|
|
10719
10663
|
this.selection !== kupManager.SelectionMode.NONE &&
|
|
10720
10664
|
clickedColumn) {
|
|
10721
|
-
__classPrivateFieldGet$
|
|
10665
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_deselectColumn).call(this, this.selectedColumn);
|
|
10722
10666
|
this.selectedColumn = clickedColumn;
|
|
10723
|
-
__classPrivateFieldGet$
|
|
10667
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_selectColumn).call(this, this.selectedColumn);
|
|
10724
10668
|
if (emitEvent !== false) {
|
|
10725
10669
|
// emit event
|
|
10726
10670
|
this.kupRowSelected.emit({
|
|
@@ -10795,7 +10739,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10795
10739
|
}, _KupDataTable_onSelectAll = function _KupDataTable_onSelectAll({ target }) {
|
|
10796
10740
|
if (target.checked) {
|
|
10797
10741
|
// select all rows
|
|
10798
|
-
this.selectedRows = __classPrivateFieldGet$
|
|
10742
|
+
this.selectedRows = __classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f");
|
|
10799
10743
|
// triggering event
|
|
10800
10744
|
this.kupRowSelected.emit({
|
|
10801
10745
|
comp: this,
|
|
@@ -10807,21 +10751,21 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10807
10751
|
}
|
|
10808
10752
|
else {
|
|
10809
10753
|
// deselect all rows
|
|
10810
|
-
__classPrivateFieldGet$
|
|
10754
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
10811
10755
|
}
|
|
10812
10756
|
}, _KupDataTable_openTotalMenu = function _KupDataTable_openTotalMenu(column) {
|
|
10813
10757
|
this.openedTotalMenu = column.name;
|
|
10814
10758
|
}, _KupDataTable_closeTotalMenu = function _KupDataTable_closeTotalMenu() {
|
|
10815
10759
|
this.openedTotalMenu = null;
|
|
10816
|
-
__classPrivateFieldGet$
|
|
10760
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCb, "f"));
|
|
10817
10761
|
}, _KupDataTable_isOpenedTotalMenuForColumn = function _KupDataTable_isOpenedTotalMenuForColumn(column) {
|
|
10818
10762
|
return this.openedTotalMenu === column;
|
|
10819
10763
|
}, _KupDataTable_groupRows = function _KupDataTable_groupRows() {
|
|
10820
|
-
if (!__classPrivateFieldGet$
|
|
10764
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
10821
10765
|
return;
|
|
10822
10766
|
}
|
|
10823
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.groupRows(this.getColumns(), __classPrivateFieldGet$
|
|
10824
|
-
__classPrivateFieldGet$
|
|
10767
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.groupRows(this.getColumns(), __classPrivateFieldGet$4(this, _KupDataTable_rows, "f"), this.groups, this.totals), "f");
|
|
10768
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupState).call(this);
|
|
10825
10769
|
}, _KupDataTable_onLoadMoreClick = function _KupDataTable_onLoadMoreClick() {
|
|
10826
10770
|
var _a;
|
|
10827
10771
|
let loadItems = 0;
|
|
@@ -10831,11 +10775,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10831
10775
|
break;
|
|
10832
10776
|
case kupManager.LoadMoreMode.CONSTANT_INCREMENT:
|
|
10833
10777
|
loadItems =
|
|
10834
|
-
this.loadMoreStep * (__classPrivateFieldGet$
|
|
10778
|
+
this.loadMoreStep * (__classPrivateFieldGet$4(this, _KupDataTable_loadMoreEventCounter, "f") + 1);
|
|
10835
10779
|
break;
|
|
10836
10780
|
case kupManager.LoadMoreMode.PROGRESSIVE_THRESHOLD:
|
|
10837
10781
|
loadItems =
|
|
10838
|
-
Math.max(__classPrivateFieldGet$
|
|
10782
|
+
Math.max(__classPrivateFieldGet$4(this, _KupDataTable_loadMoreEventPreviousQuantity, "f"), this.loadMoreStep) * Math.min(__classPrivateFieldGet$4(this, _KupDataTable_loadMoreEventCounter, "f") + 1, 2);
|
|
10839
10783
|
break;
|
|
10840
10784
|
}
|
|
10841
10785
|
if (loadItems > this.loadMoreLimit) {
|
|
@@ -10847,15 +10791,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10847
10791
|
loadItems: loadItems,
|
|
10848
10792
|
});
|
|
10849
10793
|
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventPreviousQuantity, loadItems, "f");
|
|
10850
|
-
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventCounter, (_a = __classPrivateFieldGet$
|
|
10794
|
+
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventCounter, (_a = __classPrivateFieldGet$4(this, _KupDataTable_loadMoreEventCounter, "f"), _a++, _a), "f");
|
|
10851
10795
|
}, _KupDataTable_adjustGroupState = function _KupDataTable_adjustGroupState() {
|
|
10852
|
-
if (!__classPrivateFieldGet$
|
|
10853
|
-
__classPrivateFieldGet$
|
|
10854
|
-
!__classPrivateFieldGet$
|
|
10796
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_rows, "f") ||
|
|
10797
|
+
__classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f") === 0 ||
|
|
10798
|
+
!__classPrivateFieldGet$4(this, _KupDataTable_rows, "f")[0].hasOwnProperty('group')) {
|
|
10855
10799
|
// no grouping
|
|
10856
10800
|
return;
|
|
10857
10801
|
}
|
|
10858
|
-
__classPrivateFieldGet$
|
|
10802
|
+
__classPrivateFieldGet$4(this, _KupDataTable_rows, "f").forEach((r) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupStateFromRow).call(this, r));
|
|
10859
10803
|
}, _KupDataTable_adjustGroupStateFromRow = function _KupDataTable_adjustGroupStateFromRow(row) {
|
|
10860
10804
|
if (!row || !row.hasOwnProperty('group')) {
|
|
10861
10805
|
// not a groping row, nothing to do
|
|
@@ -10872,9 +10816,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10872
10816
|
// update expanded
|
|
10873
10817
|
group.expanded = groupFromState.expanded;
|
|
10874
10818
|
}
|
|
10875
|
-
group.children.forEach((child) => __classPrivateFieldGet$
|
|
10819
|
+
group.children.forEach((child) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupStateFromRow).call(this, child));
|
|
10876
10820
|
}, _KupDataTable_sortRows = function _KupDataTable_sortRows() {
|
|
10877
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.sortRows(__classPrivateFieldGet$
|
|
10821
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rows, fPaginatorUtils.sortRows(__classPrivateFieldGet$4(this, _KupDataTable_rows, "f"), this.sort), "f");
|
|
10878
10822
|
}, _KupDataTable_getSortIcon = function _KupDataTable_getSortIcon(columnName) {
|
|
10879
10823
|
// check if column in sort array
|
|
10880
10824
|
for (let sortObj of this.sort) {
|
|
@@ -10900,7 +10844,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10900
10844
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
10901
10845
|
colSpan += 1;
|
|
10902
10846
|
}
|
|
10903
|
-
if (__classPrivateFieldGet$
|
|
10847
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
10904
10848
|
colSpan += 1;
|
|
10905
10849
|
}
|
|
10906
10850
|
return colSpan;
|
|
@@ -10930,7 +10874,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10930
10874
|
sourceColumn: this.data.columns[sortedColIndex],
|
|
10931
10875
|
targetColumn: this.data.columns[receivingColIndex],
|
|
10932
10876
|
});
|
|
10933
|
-
__classPrivateFieldGet$
|
|
10877
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_moveSortedColumns).call(this, this.data.columns, receivingColIndex, sortedColIndex);
|
|
10934
10878
|
}
|
|
10935
10879
|
}, _KupDataTable_moveSortedColumns = function _KupDataTable_moveSortedColumns(columns, receivingColumnIndex, sortedColumnIndex) {
|
|
10936
10880
|
const remove = columns.splice(sortedColumnIndex, 1);
|
|
@@ -10943,25 +10887,25 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10943
10887
|
.map((chunk, index$1) => (index$1 !== 0 ? [index.h("br", null), chunk] : chunk));
|
|
10944
10888
|
}, _KupDataTable_composeHeaderCellClassAndStyle = function _KupDataTable_composeHeaderCellClassAndStyle(columnIndex, extraCells = 0, column) {
|
|
10945
10889
|
let columnClass = { ['header-cell']: true }, thStyle = column.style ? Object.assign({}, column.style) : {};
|
|
10946
|
-
if (__classPrivateFieldGet$
|
|
10947
|
-
__classPrivateFieldGet$
|
|
10948
|
-
__classPrivateFieldGet$
|
|
10949
|
-
__classPrivateFieldGet$
|
|
10950
|
-
__classPrivateFieldGet$
|
|
10951
|
-
__classPrivateFieldGet$
|
|
10952
|
-
__classPrivateFieldGet$
|
|
10953
|
-
__classPrivateFieldGet$
|
|
10954
|
-
__classPrivateFieldGet$
|
|
10890
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isBar(column.obj) ||
|
|
10891
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isButton(column.obj) ||
|
|
10892
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isChart(column.obj) ||
|
|
10893
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isCheckbox(column.obj) ||
|
|
10894
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isImage(column.obj) ||
|
|
10895
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isIcon(column.obj) ||
|
|
10896
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isProgressBar(column.obj) ||
|
|
10897
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isRadio(column.obj) ||
|
|
10898
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isVoCodver(column.obj)) {
|
|
10955
10899
|
columnClass['header-cell--centered'] = true;
|
|
10956
10900
|
}
|
|
10957
|
-
if (__classPrivateFieldGet$
|
|
10901
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isNumber(column.obj)) {
|
|
10958
10902
|
columnClass['header-cell--is-number'] = true;
|
|
10959
10903
|
}
|
|
10960
|
-
if (__classPrivateFieldGet$
|
|
10904
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isIcon(column.obj)) {
|
|
10961
10905
|
columnClass['header-cell--is-icon'] = true;
|
|
10962
10906
|
}
|
|
10963
10907
|
// For fixed cells styles and classes
|
|
10964
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
10908
|
+
const fixedCellStyle = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, columnIndex + 1 + extraCells, 0, extraCells);
|
|
10965
10909
|
if (fixedCellStyle) {
|
|
10966
10910
|
columnClass = Object.assign(Object.assign({}, columnClass), fixedCellStyle.fixedCellClasses);
|
|
10967
10911
|
thStyle = Object.assign(Object.assign({}, thStyle), fixedCellStyle.fixedCellStyle);
|
|
@@ -10976,24 +10920,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10976
10920
|
let multiSelectColumn = null;
|
|
10977
10921
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
10978
10922
|
specialExtraCellsCount++;
|
|
10979
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
10923
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
10980
10924
|
const style = Object.assign({ width: '30px', margin: '0 auto' }, (selectionStyleAndClass
|
|
10981
10925
|
? selectionStyleAndClass.fixedCellStyle
|
|
10982
10926
|
: {}));
|
|
10983
10927
|
multiSelectColumn = (index.h("th", { class: selectionStyleAndClass
|
|
10984
10928
|
? selectionStyleAndClass.fixedCellClasses
|
|
10985
|
-
: {}, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$
|
|
10929
|
+
: {}, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onSelectAll).call(this, e), title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.SELECTED) +
|
|
10986
10930
|
`: ${this.selectedRows.length},` +
|
|
10987
|
-
__classPrivateFieldGet$
|
|
10988
|
-
`: ${__classPrivateFieldGet$
|
|
10931
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.RENDERED) +
|
|
10932
|
+
`: ${__classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f").length}`, checked: this.selectedRows.length > 0 &&
|
|
10989
10933
|
this.selectedRows.length ===
|
|
10990
|
-
__classPrivateFieldGet$
|
|
10934
|
+
__classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f").length })));
|
|
10991
10935
|
}
|
|
10992
10936
|
// Renders action column
|
|
10993
10937
|
let actionsColumn = null;
|
|
10994
|
-
if (__classPrivateFieldGet$
|
|
10938
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
10995
10939
|
specialExtraCellsCount++;
|
|
10996
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
10940
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
10997
10941
|
actionsColumn = (index.h("th", { class: selectionStyleAndClass
|
|
10998
10942
|
? selectionStyleAndClass.fixedCellClasses
|
|
10999
10943
|
: {}, style: selectionStyleAndClass
|
|
@@ -11002,26 +10946,26 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11002
10946
|
}
|
|
11003
10947
|
// Renders normal cells
|
|
11004
10948
|
const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
|
|
11005
|
-
const { columnClass, thStyle } = __classPrivateFieldGet$
|
|
10949
|
+
const { columnClass, thStyle } = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeHeaderCellClassAndStyle).call(this, columnIndex, specialExtraCellsCount, column);
|
|
11006
10950
|
let filter = null;
|
|
11007
|
-
if (__classPrivateFieldGet$
|
|
11008
|
-
const svgLabel = __classPrivateFieldGet$
|
|
10951
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_filtersColumnMenuInstance, "f").hasFiltersForColumn(this.filters, column)) {
|
|
10952
|
+
const svgLabel = __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.REMOVE_FILTERS) + `: '${__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getFilterValueForTooltip).call(this, column)}'`;
|
|
11009
10953
|
filter = (index.h("span", { title: svgLabel, class: `kup-icon ${kupManager.KupThemeIconValues.FILTER_REMOVE.replace('--', '')}` }));
|
|
11010
10954
|
}
|
|
11011
10955
|
let sortIcon = null;
|
|
11012
|
-
let iconClass = __classPrivateFieldGet$
|
|
10956
|
+
let iconClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getSortIcon).call(this, column.name);
|
|
11013
10957
|
if (iconClass !== '') {
|
|
11014
|
-
sortIcon = (index.h("span", { class: iconClass, title: __classPrivateFieldGet$
|
|
10958
|
+
sortIcon = (index.h("span", { class: iconClass, title: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getSortDecode).call(this, column.name) }));
|
|
11015
10959
|
}
|
|
11016
10960
|
columnClass['header-cell--sortable'] = true;
|
|
11017
10961
|
let keyIcon = null;
|
|
11018
10962
|
if (column.isKey) {
|
|
11019
|
-
keyIcon = (index.h("span", { class: `kup-icon ${kupManager.KupThemeIconValues.KEY.replace('--', '')}`, title: __classPrivateFieldGet$
|
|
10963
|
+
keyIcon = (index.h("span", { class: `kup-icon ${kupManager.KupThemeIconValues.KEY.replace('--', '')}`, title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.KEY) }));
|
|
11020
10964
|
}
|
|
11021
10965
|
// Sets custom columns width
|
|
11022
|
-
if (__classPrivateFieldGet$
|
|
11023
|
-
for (let i = 0; i < __classPrivateFieldGet$
|
|
11024
|
-
const currentCol = __classPrivateFieldGet$
|
|
10966
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")) {
|
|
10967
|
+
for (let i = 0; i < __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f").length; i++) {
|
|
10968
|
+
const currentCol = __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")[i];
|
|
11025
10969
|
if (currentCol.name === column.name) {
|
|
11026
10970
|
const width = currentCol.size + '';
|
|
11027
10971
|
if (width.indexOf('ch') < 1) {
|
|
@@ -11034,7 +10978,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11034
10978
|
}
|
|
11035
10979
|
}
|
|
11036
10980
|
}
|
|
11037
|
-
return (index.h("th", { ref: (el) => __classPrivateFieldGet$
|
|
10981
|
+
return (index.h("th", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_thRefs, "f").push(el), "data-cell": column, "data-column": column.name, class: columnClass, style: thStyle, title: column.name }, index.h("div", { class: "header-cell__content" }, index.h("span", { class: "header-cell__title" }, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_applyLineBreaks).call(this, column.title)), index.h("span", { class: "header-cell__icons" }, keyIcon, sortIcon, filter)), this.resizableColumns ? (index.h("span", { class: "header-cell__drag-handler" })) : null));
|
|
11038
10982
|
});
|
|
11039
10983
|
return [multiSelectColumn, actionsColumn, ...dataColumns];
|
|
11040
10984
|
// return [multiSelectColumn, groupColumn, actionsColumn, ...dataColumns];
|
|
@@ -11043,24 +10987,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11043
10987
|
let multiSelectColumn = null;
|
|
11044
10988
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11045
10989
|
specialExtraCellsCount++;
|
|
11046
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
10990
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
11047
10991
|
const style = Object.assign({ width: '30px', margin: '0 auto' }, (selectionStyleAndClass
|
|
11048
10992
|
? selectionStyleAndClass.fixedCellStyle
|
|
11049
10993
|
: {}));
|
|
11050
10994
|
multiSelectColumn = (index.h("th-sticky", { class: selectionStyleAndClass
|
|
11051
10995
|
? selectionStyleAndClass.fixedCellClasses
|
|
11052
|
-
: null, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$
|
|
10996
|
+
: null, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onSelectAll).call(this, e), title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.SELECTED) +
|
|
11053
10997
|
`: ${this.selectedRows.length},` +
|
|
11054
|
-
__classPrivateFieldGet$
|
|
11055
|
-
`: ${__classPrivateFieldGet$
|
|
10998
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageRow.RENDERED) +
|
|
10999
|
+
`: ${__classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f").length}`, checked: this.selectedRows.length > 0 &&
|
|
11056
11000
|
this.selectedRows.length ===
|
|
11057
|
-
__classPrivateFieldGet$
|
|
11001
|
+
__classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f").length })));
|
|
11058
11002
|
}
|
|
11059
11003
|
// Empty cell for the actions
|
|
11060
11004
|
let actionsColumn = null;
|
|
11061
|
-
if (__classPrivateFieldGet$
|
|
11005
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11062
11006
|
specialExtraCellsCount++;
|
|
11063
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11007
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
11064
11008
|
actionsColumn = (index.h("th-sticky", { class: selectionStyleAndClass
|
|
11065
11009
|
? selectionStyleAndClass.fixedCellClasses
|
|
11066
11010
|
: null, style: selectionStyleAndClass
|
|
@@ -11069,29 +11013,29 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11069
11013
|
}
|
|
11070
11014
|
// Composes normal header cells
|
|
11071
11015
|
const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
|
|
11072
|
-
const { columnClass, thStyle } = __classPrivateFieldGet$
|
|
11073
|
-
return (index.h("th-sticky", { class: columnClass, style: thStyle }, index.h("div", { class: "header-cell__content" }, index.h("span", { class: "header-cell__title" }, __classPrivateFieldGet$
|
|
11016
|
+
const { columnClass, thStyle } = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeHeaderCellClassAndStyle).call(this, columnIndex, specialExtraCellsCount, column);
|
|
11017
|
+
return (index.h("th-sticky", { class: columnClass, style: thStyle }, index.h("div", { class: "header-cell__content" }, index.h("span", { class: "header-cell__title" }, __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_applyLineBreaks).call(this, column.title)))));
|
|
11074
11018
|
});
|
|
11075
11019
|
return [multiSelectColumn, actionsColumn, ...dataColumns];
|
|
11076
11020
|
}, _KupDataTable_totalMenuPosition = function _KupDataTable_totalMenuPosition() {
|
|
11077
11021
|
if (this.rootElement.shadowRoot) {
|
|
11078
11022
|
const menu = this.rootElement.shadowRoot.querySelector('#totals-menu');
|
|
11079
11023
|
if (menu) {
|
|
11080
|
-
__classPrivateFieldGet$
|
|
11024
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.register(menu, __classPrivateFieldGet$4(this, _KupDataTable_totalMenuCoords, "f"));
|
|
11081
11025
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCb, {
|
|
11082
11026
|
cb: () => {
|
|
11083
|
-
__classPrivateFieldGet$
|
|
11027
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
11084
11028
|
},
|
|
11085
11029
|
el: menu,
|
|
11086
11030
|
}, "f");
|
|
11087
|
-
__classPrivateFieldGet$
|
|
11088
|
-
__classPrivateFieldGet$
|
|
11031
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCb, "f"), true);
|
|
11032
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.start(menu);
|
|
11089
11033
|
menu.menuVisible = true;
|
|
11090
11034
|
}
|
|
11091
11035
|
}
|
|
11092
11036
|
}, _KupDataTable_onTotalMenuOpen = function _KupDataTable_onTotalMenuOpen(column) {
|
|
11093
|
-
__classPrivateFieldGet$
|
|
11094
|
-
__classPrivateFieldGet$
|
|
11037
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
11038
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_openTotalMenu).call(this, column);
|
|
11095
11039
|
}, _KupDataTable_renderRow = function _KupDataTable_renderRow(row, level = 0, rowCssIndex = 0, previousRow) {
|
|
11096
11040
|
const visibleColumns = this.getVisibleColumns();
|
|
11097
11041
|
let rowActionsCount = 0;
|
|
@@ -11123,17 +11067,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11123
11067
|
for (let i = 0; i < level; i++) {
|
|
11124
11068
|
indent.push(index.h("span", { class: "indent" }));
|
|
11125
11069
|
}
|
|
11126
|
-
if (__classPrivateFieldGet$
|
|
11070
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)) {
|
|
11127
11071
|
//const colSpan = this.multiSelection ? 2 : 1;
|
|
11128
11072
|
const cells = [];
|
|
11129
|
-
if (__classPrivateFieldGet$
|
|
11073
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11130
11074
|
cells.push(index.h("td", null));
|
|
11131
11075
|
}
|
|
11132
11076
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11133
11077
|
cells.push(index.h("td", null));
|
|
11134
11078
|
}
|
|
11135
11079
|
// adding 'grouping' cell
|
|
11136
|
-
const grouplabelcell = (index.h("td", { colSpan: __classPrivateFieldGet$
|
|
11080
|
+
const grouplabelcell = (index.h("td", { colSpan: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, index.h("span", { class: "group-cell-content" }, indent, index.h("span", { class: iconClass }), index.h("span", { class: "text" }, composedGroupLabel))));
|
|
11137
11081
|
// adding 'totals grouping' cells
|
|
11138
11082
|
for (let column of visibleColumns) {
|
|
11139
11083
|
let totalClass = 'total';
|
|
@@ -11148,11 +11092,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11148
11092
|
value = totalValue;
|
|
11149
11093
|
}
|
|
11150
11094
|
else {
|
|
11151
|
-
if (__classPrivateFieldGet$
|
|
11095
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
11152
11096
|
if (totalValue) {
|
|
11153
|
-
if (__classPrivateFieldGet$
|
|
11097
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dates.isValid(totalValue, kupManager.KupDatesFormats.ISO_DATE)) {
|
|
11154
11098
|
value =
|
|
11155
|
-
__classPrivateFieldGet$
|
|
11099
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dates.format(totalValue);
|
|
11156
11100
|
}
|
|
11157
11101
|
else {
|
|
11158
11102
|
console.warn(`invalid date: ${totalValue}`);
|
|
@@ -11160,23 +11104,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11160
11104
|
}
|
|
11161
11105
|
}
|
|
11162
11106
|
else {
|
|
11163
|
-
value =
|
|
11107
|
+
value =
|
|
11108
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").math.numberToFormattedString(totalValue, column.decimals, column.obj ? column.obj.p : '');
|
|
11164
11109
|
}
|
|
11165
11110
|
}
|
|
11166
11111
|
cells.push(index.h("td", { class: totalClass }, value));
|
|
11167
11112
|
}
|
|
11168
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11169
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11113
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group group-label" }, grouplabelcell));
|
|
11114
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group group-total" }, cells));
|
|
11170
11115
|
}
|
|
11171
11116
|
else {
|
|
11172
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11117
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group" }, index.h("td", { colSpan: __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, index.h("span", { class: "group-cell-content" }, indent, index.h("span", { class: iconClass }), index.h("span", { class: "text" }, composedGroupLabel)))));
|
|
11173
11118
|
}
|
|
11174
11119
|
// if group is expanded, add children
|
|
11175
|
-
if (__classPrivateFieldGet$
|
|
11120
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_isGroupExpanded).call(this, row)) {
|
|
11176
11121
|
row.group.children
|
|
11177
11122
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
11178
11123
|
// When the column has specified the parameter hideValuesRepetitions
|
|
11179
|
-
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$
|
|
11124
|
+
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, level + 1, groupRowIndex, groupRowIndex > 0
|
|
11180
11125
|
? currentArray[groupRowIndex - 1]
|
|
11181
11126
|
: undefined))
|
|
11182
11127
|
.forEach((jsxRow) => {
|
|
@@ -11203,11 +11148,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11203
11148
|
let selectRowCell = null;
|
|
11204
11149
|
if (this.selection === kupManager.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11205
11150
|
specialExtraCellsCount++;
|
|
11206
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11151
|
+
const selectionStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, rowCssIndex, specialExtraCellsCount - 1);
|
|
11207
11152
|
const props = {
|
|
11208
11153
|
checked: this.selectedRows.includes(row),
|
|
11209
11154
|
onChange: () => {
|
|
11210
|
-
__classPrivateFieldGet$
|
|
11155
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handleRowSelect).call(this, row);
|
|
11211
11156
|
},
|
|
11212
11157
|
};
|
|
11213
11158
|
selectRowCell = (index.h("td", { "row-select-cell": true, class: selectionStyleAndClass
|
|
@@ -11219,18 +11164,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11219
11164
|
// Renders action cell
|
|
11220
11165
|
// If active, this can be either the first or second cell
|
|
11221
11166
|
let rowActionsCell = null;
|
|
11222
|
-
if (__classPrivateFieldGet$
|
|
11167
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11223
11168
|
// Increments
|
|
11224
11169
|
specialExtraCellsCount++;
|
|
11225
|
-
const actionsStyleAndClass = __classPrivateFieldGet$
|
|
11170
|
+
const actionsStyleAndClass = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, rowCssIndex, specialExtraCellsCount - 1);
|
|
11226
11171
|
rowActionsCount += this.rowActions.length;
|
|
11227
|
-
const defaultRowActions = __classPrivateFieldGet$
|
|
11172
|
+
const defaultRowActions = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderActions).call(this, this.rowActions, row, 'default');
|
|
11228
11173
|
let rowActionExpander = null;
|
|
11229
11174
|
let variableActions = null;
|
|
11230
11175
|
if (row.actions) {
|
|
11231
11176
|
rowActionsCount += row.actions.length;
|
|
11232
11177
|
// adding variable actions
|
|
11233
|
-
variableActions = __classPrivateFieldGet$
|
|
11178
|
+
variableActions = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_renderActions).call(this, row.actions, row, 'variable');
|
|
11234
11179
|
}
|
|
11235
11180
|
else {
|
|
11236
11181
|
// adding expander
|
|
@@ -11239,10 +11184,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11239
11184
|
resource: 'chevron-right',
|
|
11240
11185
|
sizeX: '1.5em',
|
|
11241
11186
|
sizeY: '1.5em',
|
|
11242
|
-
title: __classPrivateFieldGet$
|
|
11187
|
+
title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPAND),
|
|
11243
11188
|
wrapperClass: 'expander',
|
|
11244
11189
|
onClick: (e) => {
|
|
11245
|
-
__classPrivateFieldGet$
|
|
11190
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onRowActionExpanderClick).call(this, e, row);
|
|
11246
11191
|
},
|
|
11247
11192
|
};
|
|
11248
11193
|
rowActionsCount++;
|
|
@@ -11291,18 +11236,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11291
11236
|
let cellClass = null;
|
|
11292
11237
|
let cellStyle = Object.assign({}, cell.style);
|
|
11293
11238
|
//-- For fixed cells --
|
|
11294
|
-
const fixedStyles = __classPrivateFieldGet$
|
|
11239
|
+
const fixedStyles = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, cellIndex + 1 + specialExtraCellsCount, rowCssIndex, specialExtraCellsCount);
|
|
11295
11240
|
if (fixedStyles) {
|
|
11296
11241
|
cellStyle = Object.assign(cellStyle ? cellStyle : {}, fixedStyles.fixedCellStyle);
|
|
11297
11242
|
cellClass = Object.assign(Object.assign({}, cellClass), fixedStyles.fixedCellClasses);
|
|
11298
11243
|
}
|
|
11299
11244
|
// Controls if there are columns with a specified width
|
|
11300
|
-
if (__classPrivateFieldGet$
|
|
11245
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")) {
|
|
11301
11246
|
let colWidth = '';
|
|
11302
11247
|
// Search if this column has a specified width
|
|
11303
|
-
for (let j = 0; j < __classPrivateFieldGet$
|
|
11304
|
-
if (name === __classPrivateFieldGet$
|
|
11305
|
-
colWidth = __classPrivateFieldGet$
|
|
11248
|
+
for (let j = 0; j < __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f").length; j++) {
|
|
11249
|
+
if (name === __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")[j].name) {
|
|
11250
|
+
colWidth = __classPrivateFieldGet$4(this, _KupDataTable_sizedColumns, "f")[j].size;
|
|
11306
11251
|
break;
|
|
11307
11252
|
}
|
|
11308
11253
|
}
|
|
@@ -11324,7 +11269,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11324
11269
|
return (index.h("td", Object.assign({ title: title, colSpan: cell.span && cell.span.col ? cell.span.col : null, rowSpan: cell.span && cell.span.row ? cell.span.row : null, "data-cell": cell, "data-column": name, "data-row": row, style: cellStyle, class: cellClass }, eventHandlers), jsxCell));
|
|
11325
11270
|
});
|
|
11326
11271
|
// adding row to rendered rows
|
|
11327
|
-
__classPrivateFieldGet$
|
|
11272
|
+
__classPrivateFieldGet$4(this, _KupDataTable_renderedRows, "f").push(row);
|
|
11328
11273
|
const rowClass = {
|
|
11329
11274
|
selected: this.selectedRows.includes(row),
|
|
11330
11275
|
};
|
|
@@ -11334,7 +11279,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11334
11279
|
const style = {
|
|
11335
11280
|
'--kup_datatable_row_actions': rowActionsCount,
|
|
11336
11281
|
};
|
|
11337
|
-
return (index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11282
|
+
return (index.h("tr", { ref: (el) => __classPrivateFieldGet$4(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: rowClass, style: style }, selectRowCell, rowActionsCell, cells));
|
|
11338
11283
|
}
|
|
11339
11284
|
}, _KupDataTable_renderActions = function _KupDataTable_renderActions(actions, row, type) {
|
|
11340
11285
|
return actions.map((action, index$1) => {
|
|
@@ -11345,7 +11290,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11345
11290
|
sizeY: '1.5em',
|
|
11346
11291
|
title: action.text,
|
|
11347
11292
|
wrapperClass: 'action',
|
|
11348
|
-
onClick: () => __classPrivateFieldGet$
|
|
11293
|
+
onClick: () => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onDefaultRowActionClick).call(this, {
|
|
11349
11294
|
action,
|
|
11350
11295
|
row,
|
|
11351
11296
|
index: index$1,
|
|
@@ -11356,58 +11301,58 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11356
11301
|
});
|
|
11357
11302
|
}, _KupDataTable_onCustomSettingsClick = function _KupDataTable_onCustomSettingsClick() {
|
|
11358
11303
|
if (!this.openedCustomSettings) {
|
|
11359
|
-
__classPrivateFieldGet$
|
|
11304
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_openCustomSettings).call(this);
|
|
11360
11305
|
}
|
|
11361
11306
|
else {
|
|
11362
|
-
__classPrivateFieldGet$
|
|
11307
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
11363
11308
|
}
|
|
11364
11309
|
}, _KupDataTable_openCustomSettings = function _KupDataTable_openCustomSettings() {
|
|
11365
|
-
__classPrivateFieldGet$
|
|
11366
|
-
__classPrivateFieldGet$
|
|
11367
|
-
__classPrivateFieldGet$
|
|
11310
|
+
__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f").menuVisible = true;
|
|
11311
|
+
__classPrivateFieldGet$4(this, _KupDataTable_customizeTopButtonRef, "f").classList.add('toggled');
|
|
11312
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f"));
|
|
11368
11313
|
this.openedCustomSettings = true;
|
|
11369
|
-
if (!__classPrivateFieldGet$
|
|
11314
|
+
if (!__classPrivateFieldGet$4(this, _KupDataTable_clickCbCustomPanel, "f")) {
|
|
11370
11315
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCbCustomPanel, {
|
|
11371
11316
|
cb: () => {
|
|
11372
|
-
__classPrivateFieldGet$
|
|
11317
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
11373
11318
|
},
|
|
11374
|
-
el: __classPrivateFieldGet$
|
|
11319
|
+
el: __classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f"),
|
|
11375
11320
|
}, "f");
|
|
11376
11321
|
}
|
|
11377
|
-
__classPrivateFieldGet$
|
|
11322
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCbCustomPanel, "f"), true);
|
|
11378
11323
|
}, _KupDataTable_closeCustomSettings = function _KupDataTable_closeCustomSettings() {
|
|
11379
|
-
__classPrivateFieldGet$
|
|
11380
|
-
if (__classPrivateFieldGet$
|
|
11324
|
+
__classPrivateFieldGet$4(this, _KupDataTable_customizeTopButtonRef, "f").classList.remove('toggled');
|
|
11325
|
+
if (__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f") == null) {
|
|
11381
11326
|
return;
|
|
11382
11327
|
}
|
|
11383
|
-
__classPrivateFieldGet$
|
|
11328
|
+
__classPrivateFieldGet$4(this, _KupDataTable_customizeTopPanelRef, "f").menuVisible = false;
|
|
11384
11329
|
this.openedCustomSettings = false;
|
|
11385
|
-
__classPrivateFieldGet$
|
|
11330
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$4(this, _KupDataTable_clickCbCustomPanel, "f"));
|
|
11386
11331
|
}, _KupDataTable_renderPaginator = function _KupDataTable_renderPaginator(top) {
|
|
11387
11332
|
return (index.h("div", { class: "paginator-wrapper" }, index.h("div", { class: "paginator-tabs" }, this.showLoadMore ||
|
|
11388
11333
|
(!this.lazyLoadRows &&
|
|
11389
|
-
__classPrivateFieldGet$
|
|
11334
|
+
__classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f") > this.rowsPerPage) ? (index.h(fPaginatorUtils.FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: __classPrivateFieldGet$4(this, _KupDataTable_rowsLength, "f"), perPage: this.currentRowsPerPage
|
|
11390
11335
|
? this.currentRowsPerPage
|
|
11391
11336
|
: this.rowsPerPage, onLoadMore: this.showLoadMore
|
|
11392
11337
|
? () => {
|
|
11393
|
-
__classPrivateFieldGet$
|
|
11338
|
+
__classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_onLoadMoreClick).call(this);
|
|
11394
11339
|
}
|
|
11395
|
-
: null, onNextPage: () => __classPrivateFieldGet$
|
|
11340
|
+
: null, onNextPage: () => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, this.currentPage + 1), onPrevPage: () => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, this.currentPage - 1), onPageChange: (e) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, e.detail.value), onRowsChange: (e) => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_handleRowsPerPageChange).call(this, e.detail.value) })) : null)));
|
|
11396
11341
|
}, _KupDataTable_columnRemoveArea = function _KupDataTable_columnRemoveArea() {
|
|
11397
11342
|
return (index.h("div", { class: "droparea__remove", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_removeDropareaRef, el, "f")) }, index.h(fImage.FImage, { resource: "delete", color: `var(${kupManager.KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" }), index.h(fImage.FImage, { resource: "delete-empty", color: `var(${kupManager.KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" })));
|
|
11398
11343
|
}, _KupDataTable_columnGroupArea = function _KupDataTable_columnGroupArea() {
|
|
11399
11344
|
return (index.h("div", { class: "droparea__groups", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_groupsDropareaRef, el, "f")) }, index.h(fImage.FImage, { resource: "bookmark", color: `var(${kupManager.KupThemeColorValues.TEXT})`, sizeX: "30px", sizeY: "50px" }), index.h(fImage.FImage, { resource: "book", color: `var(${kupManager.KupThemeColorValues.TEXT})`, sizeX: "30px", sizeY: "50px" })));
|
|
11400
11345
|
}, _KupDataTable_hideShowColumnDropArea = function _KupDataTable_hideShowColumnDropArea(show, th) {
|
|
11401
11346
|
if (show && th && (this.removableColumns || this.showGroups)) {
|
|
11402
|
-
__classPrivateFieldGet$
|
|
11403
|
-
__classPrivateFieldGet$
|
|
11404
|
-
__classPrivateFieldGet$
|
|
11405
|
-
__classPrivateFieldGet$
|
|
11406
|
-
th.clientWidth / 2 - __classPrivateFieldGet$
|
|
11347
|
+
__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f").classList.add('droparea--visible');
|
|
11348
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f"), th, 10, kupManager.KupDynamicPositionPlacement.TOP);
|
|
11349
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f"));
|
|
11350
|
+
__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f").style.marginLeft =
|
|
11351
|
+
th.clientWidth / 2 - __classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f").clientWidth / 2 + 'px';
|
|
11407
11352
|
}
|
|
11408
11353
|
else {
|
|
11409
|
-
__classPrivateFieldGet$
|
|
11410
|
-
+__classPrivateFieldGet$
|
|
11354
|
+
__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f").classList.remove('droparea--visible');
|
|
11355
|
+
+__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$4(this, _KupDataTable_dropareaRef, "f"));
|
|
11411
11356
|
}
|
|
11412
11357
|
}, _KupDataTable_handleColumnGroup = function _KupDataTable_handleColumnGroup(column2group) {
|
|
11413
11358
|
// Get sorted column current position
|
|
@@ -11475,19 +11420,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11475
11420
|
icon: icons[i],
|
|
11476
11421
|
id: codes[i],
|
|
11477
11422
|
selected: selectedCode == codes[i],
|
|
11478
|
-
value: __classPrivateFieldGet$
|
|
11423
|
+
value: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(value),
|
|
11479
11424
|
};
|
|
11480
11425
|
}
|
|
11481
11426
|
}
|
|
11482
11427
|
return listItems;
|
|
11483
11428
|
}, _KupDataTable_getFontSizeCodeFromDecode = function _KupDataTable_getFontSizeCodeFromDecode(decode) {
|
|
11484
|
-
return __classPrivateFieldGet$
|
|
11429
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$4(this, _KupDataTable_FONTSIZE_DECODES, "f"), __classPrivateFieldGet$4(this, _KupDataTable_FONTSIZE_CODES, "f"));
|
|
11485
11430
|
}, _KupDataTable_renderFontSizePanel = function _KupDataTable_renderFontSizePanel() {
|
|
11486
|
-
const listItems = __classPrivateFieldGet$
|
|
11431
|
+
const listItems = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, __classPrivateFieldGet$4(this, _KupDataTable_FONTSIZE_CODES, "f"), __classPrivateFieldGet$4(this, _KupDataTable_FONTSIZE_ICONS, "f"), this.fontsize);
|
|
11487
11432
|
const listData = { data: listItems, showIcons: true };
|
|
11488
11433
|
const textfieldData = {
|
|
11489
11434
|
trailingIcon: true,
|
|
11490
|
-
label: __classPrivateFieldGet$
|
|
11435
|
+
label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageFontsize.LABEL),
|
|
11491
11436
|
icon: 'arrow_drop_down',
|
|
11492
11437
|
};
|
|
11493
11438
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11504,22 +11449,22 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11504
11449
|
text = kupManager.KupLanguageFontsize.SMALL;
|
|
11505
11450
|
break;
|
|
11506
11451
|
}
|
|
11507
|
-
return (index.h("div", { class: "customize-element fontsize-panel" }, index.h("kup-combobox", { isSelect: true, data: data, initialValue: __classPrivateFieldGet$
|
|
11452
|
+
return (index.h("div", { class: "customize-element fontsize-panel" }, index.h("kup-combobox", { isSelect: true, data: data, initialValue: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(text), "onkup-combobox-itemclick": (e) => {
|
|
11508
11453
|
e.stopPropagation();
|
|
11509
|
-
this.fontsize = __classPrivateFieldGet$
|
|
11454
|
+
this.fontsize = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getFontSizeCodeFromDecode).call(this, e.detail.node.id);
|
|
11510
11455
|
} })));
|
|
11511
11456
|
}, _KupDataTable_getDensityCodeFromDecode = function _KupDataTable_getDensityCodeFromDecode(decode) {
|
|
11512
|
-
return __classPrivateFieldGet$
|
|
11457
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$4(this, _KupDataTable_DENSITY_DECODES, "f"), [
|
|
11513
11458
|
'dense',
|
|
11514
11459
|
'medium',
|
|
11515
11460
|
'wide',
|
|
11516
11461
|
]);
|
|
11517
11462
|
}, _KupDataTable_renderDensityPanel = function _KupDataTable_renderDensityPanel() {
|
|
11518
|
-
const listItems = __classPrivateFieldGet$
|
|
11463
|
+
const listItems = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, ['dense', 'medium', 'wide'], __classPrivateFieldGet$4(this, _KupDataTable_DENSITY_ICONS, "f"), this.density);
|
|
11519
11464
|
const listData = { data: listItems, showIcons: true };
|
|
11520
11465
|
const textfieldData = {
|
|
11521
11466
|
trailingIcon: true,
|
|
11522
|
-
label: __classPrivateFieldGet$
|
|
11467
|
+
label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageDensity.LABEL),
|
|
11523
11468
|
icon: 'arrow_drop_down',
|
|
11524
11469
|
};
|
|
11525
11470
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11536,14 +11481,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11536
11481
|
text = kupManager.KupLanguageDensity.WIDE;
|
|
11537
11482
|
break;
|
|
11538
11483
|
}
|
|
11539
|
-
return (index.h("div", { class: "customize-element density-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$
|
|
11484
|
+
return (index.h("div", { class: "customize-element density-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(text), selectMode: fCell.ItemsDisplayMode.DESCRIPTION, data: data, "onkup-combobox-itemclick": (e) => {
|
|
11540
11485
|
e.stopPropagation();
|
|
11541
|
-
this.density = __classPrivateFieldGet$
|
|
11486
|
+
this.density = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getDensityCodeFromDecode).call(this, e.detail.node.id);
|
|
11542
11487
|
} })));
|
|
11543
11488
|
}, _KupDataTable_getGridCodeFromDecode = function _KupDataTable_getGridCodeFromDecode(decode) {
|
|
11544
|
-
return __classPrivateFieldGet$
|
|
11489
|
+
return __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$4(this, _KupDataTable_GRID_DECODES, "f"), __classPrivateFieldGet$4(this, _KupDataTable_GRID_CODES, "f"));
|
|
11545
11490
|
}, _KupDataTable_renderTransposeSwitch = function _KupDataTable_renderTransposeSwitch() {
|
|
11546
|
-
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-switch", { checked: this.transpose, label: __classPrivateFieldGet$
|
|
11491
|
+
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-switch", { checked: this.transpose, label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TRANSPOSE_DATA), leadingLabel: true, "onkup-switch-change": (e) => {
|
|
11547
11492
|
e.stopPropagation();
|
|
11548
11493
|
if (e.detail.value === 'on') {
|
|
11549
11494
|
this.transpose = true;
|
|
@@ -11553,16 +11498,16 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11553
11498
|
}
|
|
11554
11499
|
} })));
|
|
11555
11500
|
}, _KupDataTable_renderTotalsMatrix = function _KupDataTable_renderTotalsMatrix() {
|
|
11556
|
-
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-button", { title: __classPrivateFieldGet$
|
|
11501
|
+
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-button", { title: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TOTALS_TABLE) +
|
|
11557
11502
|
' (' +
|
|
11558
|
-
__classPrivateFieldGet$
|
|
11559
|
-
')', label: __classPrivateFieldGet$
|
|
11503
|
+
__classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
11504
|
+
')', label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TOTALS_TABLE), icon: "exposure", "onkup-button-click": () => __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_switchToTotalsMatrix).call(this) })));
|
|
11560
11505
|
}, _KupDataTable_renderGridPanel = function _KupDataTable_renderGridPanel() {
|
|
11561
|
-
const listItems = __classPrivateFieldGet$
|
|
11506
|
+
const listItems = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, __classPrivateFieldGet$4(this, _KupDataTable_GRID_CODES, "f"), __classPrivateFieldGet$4(this, _KupDataTable_GRID_ICONS, "f"), this.showGrid);
|
|
11562
11507
|
const listData = { data: listItems, showIcons: true };
|
|
11563
11508
|
const textfieldData = {
|
|
11564
11509
|
trailingIcon: true,
|
|
11565
|
-
label: __classPrivateFieldGet$
|
|
11510
|
+
label: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(kupManager.KupLanguageGrid.LABEL),
|
|
11566
11511
|
icon: 'arrow_drop_down',
|
|
11567
11512
|
};
|
|
11568
11513
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11582,9 +11527,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11582
11527
|
text = kupManager.KupLanguageGrid.ROW;
|
|
11583
11528
|
break;
|
|
11584
11529
|
}
|
|
11585
|
-
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$
|
|
11530
|
+
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$4(this, _KupDataTable_kupManager, "f").language.translate(text), data: data, "onkup-combobox-itemclick": (e) => {
|
|
11586
11531
|
e.stopPropagation();
|
|
11587
|
-
const grid = __classPrivateFieldGet$
|
|
11532
|
+
const grid = __classPrivateFieldGet$4(this, _KupDataTable_instances, "m", _KupDataTable_getGridCodeFromDecode).call(this, e.detail.value);
|
|
11588
11533
|
this.showGrid = grid;
|
|
11589
11534
|
} })));
|
|
11590
11535
|
};
|
|
@@ -11988,7 +11933,7 @@ var KupDialogProps;
|
|
|
11988
11933
|
|
|
11989
11934
|
const kupDialogCss = ":host{--kup_dialog_header_height:var(--kup-dialog-header-height, 2em);box-sizing:border-box;display:block;height:var(--kup_dialog_height);left:var(--kup_dialog_left);min-height:var(--kup_dialog_height);min-width:var(--kup_dialog_width);position:absolute;top:var(--kup_dialog_top);transition:opacity 0.25s ease-in;width:var(--kup_dialog_width)}#kup-component{height:100%;width:100%}[fade-in]{opacity:0}[fade-in] ::slotted{display:none}.header{background-color:var(--kup-title-background-color);color:var(--kup-title-color);display:flex;flex-direction:row;height:var(--kup_dialog_header_height);position:relative;width:100%}.header__title{font-weight:bold;line-height:2em;padding-left:0.5em;padding-right:2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header__close.f-image{--kup-icon-color:var(--kup-title-color);cursor:pointer;margin-right:0;transition:opacity 0.25s;position:absolute;right:0;background:var(--kup-title-background-color)}.header__close.f-image:hover{opacity:0.5}.content{height:calc(100% - var(--kup_dialog_header_height));overflow:auto;user-select:text}";
|
|
11990
11935
|
|
|
11991
|
-
var __classPrivateFieldGet$
|
|
11936
|
+
var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11992
11937
|
if (kind === "a" && !f)
|
|
11993
11938
|
throw new TypeError("Private accessor was defined without a getter");
|
|
11994
11939
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -12071,12 +12016,12 @@ const KupDialog = class {
|
|
|
12071
12016
|
/* L i f e c y c l e H o o k s */
|
|
12072
12017
|
/*-------------------------------------------------*/
|
|
12073
12018
|
componentWillLoad() {
|
|
12074
|
-
__classPrivateFieldGet$
|
|
12075
|
-
__classPrivateFieldGet$
|
|
12019
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").debug.logLoad(this, false);
|
|
12020
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").theme.register(this);
|
|
12076
12021
|
}
|
|
12077
12022
|
componentDidLoad() {
|
|
12078
12023
|
var _a;
|
|
12079
|
-
__classPrivateFieldGet$
|
|
12024
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").interact.dialogify(this.rootElement, __classPrivateFieldGet$3(this, _KupDialog_header, "f") ? __classPrivateFieldGet$3(this, _KupDialog_header, "f") : null, !this.resizable);
|
|
12080
12025
|
if ((_a = this.autoCenter) === null || _a === void 0 ? void 0 : _a.onReady) {
|
|
12081
12026
|
this.recalcPosition().then(() => {
|
|
12082
12027
|
this.rootElement.removeAttribute('fade-in');
|
|
@@ -12086,7 +12031,7 @@ const KupDialog = class {
|
|
|
12086
12031
|
this.rootElement.removeAttribute('fade-in');
|
|
12087
12032
|
}
|
|
12088
12033
|
if (this.modal) {
|
|
12089
|
-
__classPrivateFieldGet$
|
|
12034
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").interact.showModalBackdrop(this.modal.closeOnBackdropClick
|
|
12090
12035
|
? () => {
|
|
12091
12036
|
this.close();
|
|
12092
12037
|
}
|
|
@@ -12096,13 +12041,13 @@ const KupDialog = class {
|
|
|
12096
12041
|
comp: this,
|
|
12097
12042
|
id: this.rootElement.id,
|
|
12098
12043
|
});
|
|
12099
|
-
__classPrivateFieldGet$
|
|
12044
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").debug.logLoad(this, true);
|
|
12100
12045
|
}
|
|
12101
12046
|
componentWillRender() {
|
|
12102
|
-
__classPrivateFieldGet$
|
|
12047
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").debug.logRender(this, false);
|
|
12103
12048
|
}
|
|
12104
12049
|
componentDidRender() {
|
|
12105
|
-
__classPrivateFieldGet$
|
|
12050
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").debug.logRender(this, true);
|
|
12106
12051
|
}
|
|
12107
12052
|
render() {
|
|
12108
12053
|
var _a;
|
|
@@ -12110,13 +12055,13 @@ const KupDialog = class {
|
|
|
12110
12055
|
'--kup_dialog_height': this.sizeY ? this.sizeY : 'auto',
|
|
12111
12056
|
'--kup_dialog_width': this.sizeX ? this.sizeX : 'auto',
|
|
12112
12057
|
};
|
|
12113
|
-
return (index.h(index.Host, { "fade-in": true, style: style }, index.h("style", null, __classPrivateFieldGet$
|
|
12058
|
+
return (index.h(index.Host, { "fade-in": true, style: style }, index.h("style", null, __classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, this.header ? (index.h("div", { class: "header", ref: (el) => (__classPrivateFieldSet$1(this, _KupDialog_header, el, "f")) }, this.header.title ? (index.h("div", { class: "header__title" }, this.header.title)) : null, ((_a = this.header.icons) === null || _a === void 0 ? void 0 : _a.close) ? (index.h(fImage.FImage, { onClick: () => this.close(), sizeX: "1.25em", sizeY: "100%", resource: "clear", wrapperClass: "header__close" })) : null)) : null, index.h("div", { class: "content" }, index.h("slot", null)))));
|
|
12114
12059
|
}
|
|
12115
12060
|
disconnectedCallback() {
|
|
12116
12061
|
if (this.modal) {
|
|
12117
|
-
__classPrivateFieldGet$
|
|
12062
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").interact.hideModalBackdrop();
|
|
12118
12063
|
}
|
|
12119
|
-
__classPrivateFieldGet$
|
|
12064
|
+
__classPrivateFieldGet$3(this, _KupDialog_kupManager, "f").theme.unregister(this);
|
|
12120
12065
|
}
|
|
12121
12066
|
get rootElement() { return index.getElement(this); }
|
|
12122
12067
|
};
|
|
@@ -13611,7 +13556,7 @@ const KupGauge = class {
|
|
|
13611
13556
|
let retValue = '';
|
|
13612
13557
|
if (thresholdPercentage > 0 && thresholdPercentage < 1) {
|
|
13613
13558
|
if (this.showLabels && !this.onlyValue) {
|
|
13614
|
-
retValue = (index.h("text", { class: "gauge__label-text", "text-anchor": textPosition, x: topX, y: topY }, kupManager.
|
|
13559
|
+
retValue = (index.h("text", { class: "gauge__label-text", "text-anchor": textPosition, x: topX, y: topY }, this.kupManager.math.numberStringToFormattedString(String(threshold), -1, '')));
|
|
13615
13560
|
}
|
|
13616
13561
|
}
|
|
13617
13562
|
else {
|
|
@@ -13624,7 +13569,7 @@ const KupGauge = class {
|
|
|
13624
13569
|
topX = this.size - this.arcThickness;
|
|
13625
13570
|
topY = halvedSize + this.labelDistance;
|
|
13626
13571
|
}
|
|
13627
|
-
retValue = (index.h("text", { class: "gauge__label-text", "text-anchor": textPosition, x: topX, y: topY }, kupManager.
|
|
13572
|
+
retValue = (index.h("text", { class: "gauge__label-text", "text-anchor": textPosition, x: topX, y: topY }, this.kupManager.math.numberStringToFormattedString(String(threshold), -1, '')));
|
|
13628
13573
|
}
|
|
13629
13574
|
}
|
|
13630
13575
|
return retValue;
|
|
@@ -13633,7 +13578,7 @@ const KupGauge = class {
|
|
|
13633
13578
|
const style = { fontSize: this.calculateValueFontSize() };
|
|
13634
13579
|
let valueText = undefined;
|
|
13635
13580
|
if (this.showValue) {
|
|
13636
|
-
valueText = (index.h("text", { class: "gauge__label-text value", "text-anchor": "middle", x: halvedSize, y: valueLabelYPosition, style: style }, kupManager.
|
|
13581
|
+
valueText = (index.h("text", { class: "gauge__label-text value", "text-anchor": "middle", x: halvedSize, y: valueLabelYPosition, style: style }, this.kupManager.math.numberStringToFormattedString(String(tempValue), -1, '') +
|
|
13637
13582
|
' ' +
|
|
13638
13583
|
this.measurementUnit));
|
|
13639
13584
|
}
|
|
@@ -14242,7 +14187,7 @@ KupImage.style = kupImageCss;
|
|
|
14242
14187
|
|
|
14243
14188
|
const kupListCss = ":host{--kup_list_background:var(\n --kup-list-background,\n var(--kup-background-color)\n );--kup_list_color:var(--kup-list-color, var(--kup-text-color));--kup_list_font_family:var(--kup-list-font-family, var(--kup-font-family));--kup_list_font_size:var(--kup-list-font-size, var(--kup-font-size));--kup_list_font_weight:var(--kup-list-font-weight, 400);--kup_list_group_item_height:var(--kup-list-group-item-height, 3em);--kup_list_item_height:var(--kup-list-item-height, 2.5em);--kup_list_item_padding_left:var(--kup-list-item-padding, 0.75em);--kup_list_item_padding_right:var(--kup-list-item-padding, 0.75em);--kup_list_max_height_as_menu:var(--kup-list-max-height-as-menu, 33vh);--kup_list_primary_color:var(\n --kup-list-primary-color,\n var(--kup-primary-color)\n );--kup_list_primary_color_rgb:var(\n --kup-list-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_list_separator_color:var(\n --kup-list-separator-color,\n rgba(var(--kup-text-color-rgb), 0.25)\n );--kup_list_transition:var(--kup-list-transition, 120ms);display:block;font-family:var(--kup_list_font_family);font-size:var(--kup_list_font_size);outline:none}.list{background:var(--kup_list_background);color:var(--kup_list_color);font-weight:var(--kup_list_font_weight);letter-spacing:0.009375em;line-height:1.5em;list-style-type:none;margin:0;padding:0.5em 0;text-decoration:inherit;text-transform:inherit}.list--empty{padding:0}.list .list-item{display:-ms-flexbox;display:flex;height:var(--kup_list_item_height);position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding-left:var(--kup_list_item_padding_left);padding-right:calc(var(--kup_list_item_padding_left) + var(--kup_list_item_expand_padding, 0px));overflow:hidden;outline:none;transition:background-color var(--kup_list_transition), color var(--kup_list_transition)}.list .list-item[role=checkbox],.list .list-item[role=radio]{height:var(--kup_list_group_item_height)}.list .list-item.list-item--activated,.list .list-item.list-item--activated .list-item__graphic,.list .list-item.list-item--selected,.list .list-item.list-item--selected .list-item__graphic{background-color:rgba(var(--kup_list_primary_color_rgb), 0.175);color:var(--kup_list_primary_color)}.list .list-item .list-item__text{-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.list .list-item .list-item__primary-text{-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-top:0;line-height:normal;margin-bottom:-1.5em;display:block}.list .list-item .list-item__primary-text:before{display:inline-block;width:0;height:1.5em;content:\"\";vertical-align:0}.list .list-item .list-item__primary-text:after{display:inline-block;width:0;height:2em;content:\"\";vertical-align:-2em}.list .list-item .list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-o-text-overflow:ellipsis;-webkit-font-smoothing:antialiased;display:block;font-size:0.875em;font-weight:400;letter-spacing:0.0178571429em;line-height:1.25em;text-decoration:inherit;text-transform:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-top:0;line-height:normal;color:var(--kup_list_color);opacity:0.75}.list .list-item .kup-icon{margin:0;margin-right:0.75em}.list .list-item kup-checkbox{margin:0}.list .list-divider{background-color:var(--kup_list_separator_color);height:1px;padding:0;background-clip:content-box}.list.list--two-line .list-item{height:3.6em}.list.list--two-line .list-item__text{-ms-flex-item-align:start;align-self:flex-start}.list:not(.list--non-interactive)>:not(.list-item--disabled).list-item{cursor:pointer}.list:not(.list--non-interactive)>:not(.list-item--disabled).list-item label{cursor:pointer}.list:not(.list--non-interactive) .list-item:not(.list-item--selected):hover,.list:not(.list--non-interactive) .list-item:not(.list-item--selected).list-item--focused{background-color:var(--kup-hover-background-color);color:var(--kup-hover-color)}.list.text-hidden .list-item__text{display:none}.kup-menu{animation:fade-in 0.25s ease-out;background-color:var(--kup-background-color);box-shadow:var(--kup-box-shadow);color:var(--kup-text-color);display:none;max-height:var(--kup_list_max_height_as_menu);overflow:auto;position:relative;transform:none;transform-origin:unset;transition:height 0.2s;user-select:none;will-change:unset}.kup-menu.visible{display:block}.kup-menu .list-item__text{user-select:none}:host([nested-list]){--kup_list_item_expand_padding:1.5em;max-width:250px}:host([nested-list]) .kup-menu{max-height:unset;overflow:visible}:host([nested-list]) kup-list{display:none;left:100%;position:absolute;top:0}:host([nested-list]) .list-item{overflow:visible}:host([nested-list]) .list-item__expand-icon{position:absolute;right:0}:host([nested-list]) .list-item:hover kup-list{display:block}:host(.kup-paddingless) .list{padding:0}:host(.kup-danger){--kup-list-primary-color:var(--kup-danger-color);--kup-list-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-list-primary-color:var(--kup-info-color);--kup-list-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-list-primary-color:var(--kup-secondary-color);--kup-list-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-list-primary-color:var(--kup-success-color);--kup-list-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-list-primary-color:var(--kup-warning-color);--kup-list-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
14244
14189
|
|
|
14245
|
-
var __classPrivateFieldGet$
|
|
14190
|
+
var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14246
14191
|
if (kind === "a" && !f)
|
|
14247
14192
|
throw new TypeError("Private accessor was defined without a getter");
|
|
14248
14193
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -14303,7 +14248,7 @@ const KupList = class {
|
|
|
14303
14248
|
});
|
|
14304
14249
|
}
|
|
14305
14250
|
onKupClick(index) {
|
|
14306
|
-
__classPrivateFieldGet$
|
|
14251
|
+
__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14307
14252
|
}
|
|
14308
14253
|
/*-------------------------------------------------*/
|
|
14309
14254
|
/* L i s t e n e r s */
|
|
@@ -14324,7 +14269,7 @@ const KupList = class {
|
|
|
14324
14269
|
case 'Enter':
|
|
14325
14270
|
e.preventDefault();
|
|
14326
14271
|
e.stopPropagation();
|
|
14327
|
-
__classPrivateFieldGet$
|
|
14272
|
+
__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_handleSelection).call(this, this.focused);
|
|
14328
14273
|
break;
|
|
14329
14274
|
}
|
|
14330
14275
|
}
|
|
@@ -14350,10 +14295,10 @@ const KupList = class {
|
|
|
14350
14295
|
else {
|
|
14351
14296
|
this.focused++;
|
|
14352
14297
|
}
|
|
14353
|
-
if (this.focused > __classPrivateFieldGet$
|
|
14298
|
+
if (this.focused > __classPrivateFieldGet$2(this, _KupList_listItems, "f").length - 1) {
|
|
14354
14299
|
this.focused = 0;
|
|
14355
14300
|
}
|
|
14356
|
-
__classPrivateFieldGet$
|
|
14301
|
+
__classPrivateFieldGet$2(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14357
14302
|
}
|
|
14358
14303
|
/**
|
|
14359
14304
|
* Focuses the previous element of the list.
|
|
@@ -14374,9 +14319,9 @@ const KupList = class {
|
|
|
14374
14319
|
this.focused--;
|
|
14375
14320
|
}
|
|
14376
14321
|
if (this.focused < 0) {
|
|
14377
|
-
this.focused = __classPrivateFieldGet$
|
|
14322
|
+
this.focused = __classPrivateFieldGet$2(this, _KupList_listItems, "f").length - 1;
|
|
14378
14323
|
}
|
|
14379
|
-
__classPrivateFieldGet$
|
|
14324
|
+
__classPrivateFieldGet$2(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14380
14325
|
}
|
|
14381
14326
|
/**
|
|
14382
14327
|
* Used to retrieve component's props values.
|
|
@@ -14413,7 +14358,7 @@ const KupList = class {
|
|
|
14413
14358
|
if (index === undefined) {
|
|
14414
14359
|
index = this.focused;
|
|
14415
14360
|
}
|
|
14416
|
-
__classPrivateFieldGet$
|
|
14361
|
+
__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14417
14362
|
}
|
|
14418
14363
|
/**
|
|
14419
14364
|
* Sets the props to the component.
|
|
@@ -14426,8 +14371,8 @@ const KupList = class {
|
|
|
14426
14371
|
/* L i f e c y c l e H o o k s */
|
|
14427
14372
|
/*-------------------------------------------------*/
|
|
14428
14373
|
componentWillLoad() {
|
|
14429
|
-
__classPrivateFieldGet$
|
|
14430
|
-
__classPrivateFieldGet$
|
|
14374
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").debug.logLoad(this, false);
|
|
14375
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").theme.register(this);
|
|
14431
14376
|
for (let index = 0; index < this.data.length; index++) {
|
|
14432
14377
|
const el = this.data[index];
|
|
14433
14378
|
if (el.selected) {
|
|
@@ -14436,10 +14381,10 @@ const KupList = class {
|
|
|
14436
14381
|
}
|
|
14437
14382
|
}
|
|
14438
14383
|
componentDidLoad() {
|
|
14439
|
-
__classPrivateFieldGet$
|
|
14384
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").debug.logLoad(this, true);
|
|
14440
14385
|
}
|
|
14441
14386
|
componentWillRender() {
|
|
14442
|
-
__classPrivateFieldGet$
|
|
14387
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").debug.logRender(this, false);
|
|
14443
14388
|
}
|
|
14444
14389
|
componentDidRender() {
|
|
14445
14390
|
if (this.isMenu &&
|
|
@@ -14450,7 +14395,7 @@ const KupList = class {
|
|
|
14450
14395
|
this.rootElement.focus();
|
|
14451
14396
|
}, 0);
|
|
14452
14397
|
}
|
|
14453
|
-
__classPrivateFieldGet$
|
|
14398
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").debug.logRender(this, true);
|
|
14454
14399
|
}
|
|
14455
14400
|
render() {
|
|
14456
14401
|
__classPrivateFieldSet(this, _KupList_listItems, [], "f");
|
|
@@ -14462,7 +14407,7 @@ const KupList = class {
|
|
|
14462
14407
|
wrapperClass += ' visible';
|
|
14463
14408
|
}
|
|
14464
14409
|
}
|
|
14465
|
-
__classPrivateFieldGet$
|
|
14410
|
+
__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_checkRoleType).call(this);
|
|
14466
14411
|
if (this.selectable != true) {
|
|
14467
14412
|
componentClass += ' list--non-interactive';
|
|
14468
14413
|
}
|
|
@@ -14477,17 +14422,17 @@ const KupList = class {
|
|
|
14477
14422
|
}
|
|
14478
14423
|
let roleAttr = this.roleType;
|
|
14479
14424
|
let ariaMultiSelectable = 'false';
|
|
14480
|
-
if (__classPrivateFieldGet$
|
|
14425
|
+
if (__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isMultiSelection).call(this)) {
|
|
14481
14426
|
ariaMultiSelectable = 'true';
|
|
14482
14427
|
}
|
|
14483
14428
|
__classPrivateFieldSet(this, _KupList_radios, [], "f");
|
|
14484
14429
|
let index$1 = 0;
|
|
14485
|
-
return (index.h(index.Host, null, index.h("style", null, __classPrivateFieldGet$
|
|
14486
|
-
.filter((item) => __classPrivateFieldGet$
|
|
14487
|
-
.map((item) => __classPrivateFieldGet$
|
|
14430
|
+
return (index.h(index.Host, null, index.h("style", null, __classPrivateFieldGet$2(this, _KupList_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: "kup-component", class: wrapperClass }, index.h("ul", { class: componentClass, role: roleAttr, "aria-multiselectable": ariaMultiSelectable }, this.data
|
|
14431
|
+
.filter((item) => __classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
14432
|
+
.map((item) => __classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index$1++))))));
|
|
14488
14433
|
}
|
|
14489
14434
|
disconnectedCallback() {
|
|
14490
|
-
__classPrivateFieldGet$
|
|
14435
|
+
__classPrivateFieldGet$2(this, _KupList_kupManager, "f").theme.unregister(this);
|
|
14491
14436
|
}
|
|
14492
14437
|
get rootElement() { return index.getElement(this); }
|
|
14493
14438
|
};
|
|
@@ -14538,7 +14483,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14538
14483
|
if (this.showIcons == true &&
|
|
14539
14484
|
item.icon != null &&
|
|
14540
14485
|
item.icon.trim() != '') {
|
|
14541
|
-
imageTag = __classPrivateFieldGet$
|
|
14486
|
+
imageTag = __classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_getIconTag).call(this, item.icon);
|
|
14542
14487
|
}
|
|
14543
14488
|
let primaryTextTag = [
|
|
14544
14489
|
getIdOfItemByDisplayMode(item, this.displayMode, ' - '),
|
|
@@ -14554,9 +14499,9 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14554
14499
|
}
|
|
14555
14500
|
let classAttr = 'list-item';
|
|
14556
14501
|
let tabIndexAttr = item.selected == true ? '0' : '-1';
|
|
14557
|
-
if (!__classPrivateFieldGet$
|
|
14502
|
+
if (!__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isNested).call(this) &&
|
|
14558
14503
|
item.selected == true &&
|
|
14559
|
-
__classPrivateFieldGet$
|
|
14504
|
+
__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isListBoxRule).call(this)) {
|
|
14560
14505
|
classAttr += ' list-item--selected';
|
|
14561
14506
|
}
|
|
14562
14507
|
if (this.focused === index$1) {
|
|
@@ -14572,7 +14517,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14572
14517
|
imageTag,
|
|
14573
14518
|
index.h("span", { class: "list-item__text" }, primaryTextTag, secTextTag),
|
|
14574
14519
|
];
|
|
14575
|
-
if (__classPrivateFieldGet$
|
|
14520
|
+
if (__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14576
14521
|
roleAttr = 'radio';
|
|
14577
14522
|
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
14578
14523
|
let dataTmp = [
|
|
@@ -14586,12 +14531,12 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14586
14531
|
display: 'none',
|
|
14587
14532
|
};
|
|
14588
14533
|
innerSpanTag = [
|
|
14589
|
-
index.h("span", { class: "list-item__graphic" }, index.h("input", { type: "radio", style: trickForMDC }), index.h("kup-radio", { data: dataTmp, id: this.rootElement.id + '_' + index$1, ref: (el) => (__classPrivateFieldGet$
|
|
14534
|
+
index.h("span", { class: "list-item__graphic" }, index.h("input", { type: "radio", style: trickForMDC }), index.h("kup-radio", { data: dataTmp, id: this.rootElement.id + '_' + index$1, ref: (el) => (__classPrivateFieldGet$2(this, _KupList_radios, "f")[index$1] = el) })),
|
|
14590
14535
|
imageTag,
|
|
14591
14536
|
index.h("label", { class: "list-item__text", htmlFor: this.rootElement.id + '_' + index$1 }, primaryTextTag, secTextTag),
|
|
14592
14537
|
];
|
|
14593
14538
|
}
|
|
14594
|
-
else if (__classPrivateFieldGet$
|
|
14539
|
+
else if (__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this)) {
|
|
14595
14540
|
roleAttr = 'checkbox';
|
|
14596
14541
|
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
14597
14542
|
let checkedAttr = item.selected == true ? true : false;
|
|
@@ -14609,14 +14554,14 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14609
14554
|
vNodes.push(index.h("li", { role: "separator", class: "list-divider" }));
|
|
14610
14555
|
}
|
|
14611
14556
|
vNodes.push(index.h("li", { ref: (el) => {
|
|
14612
|
-
__classPrivateFieldGet$
|
|
14557
|
+
__classPrivateFieldGet$2(this, _KupList_listItems, "f").push(el);
|
|
14613
14558
|
}, class: classAttr, role: roleAttr, tabindex: tabIndexAttr, "data-id": item.id, "aria-selected": ariaSelectedAttr, "aria-checked": ariaCheckedAttr, onBlur: !this.selectable
|
|
14614
14559
|
? (e) => e.stopPropagation()
|
|
14615
14560
|
: () => this.onKupBlur(), onFocus: !this.selectable
|
|
14616
14561
|
? (e) => e.stopPropagation()
|
|
14617
14562
|
: () => this.onKupFocus(), onClick: !this.selectable
|
|
14618
14563
|
? (e) => e.stopPropagation()
|
|
14619
|
-
: __classPrivateFieldGet$
|
|
14564
|
+
: __classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isNested).call(this)
|
|
14620
14565
|
? (e) => {
|
|
14621
14566
|
e.stopPropagation();
|
|
14622
14567
|
this.onKupClick(index$1);
|
|
@@ -14637,7 +14582,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14637
14582
|
};
|
|
14638
14583
|
return (index.h(fImage.FImage, Object.assign({}, propsFImage, { resource: icon, wrapperClass: `icon-button__icon kup-icon` })));
|
|
14639
14584
|
}, _KupList_isMultiSelection = function _KupList_isMultiSelection() {
|
|
14640
|
-
return __classPrivateFieldGet$
|
|
14585
|
+
return __classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this);
|
|
14641
14586
|
}, _KupList_isCheckBoxRule = function _KupList_isCheckBoxRule() {
|
|
14642
14587
|
return this.roleType == fCell.KupListRole.GROUP;
|
|
14643
14588
|
}, _KupList_isRadioButtonRule = function _KupList_isRadioButtonRule() {
|
|
@@ -14645,7 +14590,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14645
14590
|
}, _KupList_isListBoxRule = function _KupList_isListBoxRule() {
|
|
14646
14591
|
return this.roleType == fCell.KupListRole.LISTBOX;
|
|
14647
14592
|
}, _KupList_checkRoleType = function _KupList_checkRoleType() {
|
|
14648
|
-
if (!__classPrivateFieldGet$
|
|
14593
|
+
if (!__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this) && !__classPrivateFieldGet$2(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14649
14594
|
this.roleType = fCell.KupListRole.LISTBOX;
|
|
14650
14595
|
}
|
|
14651
14596
|
}, _KupList_itemCompliant = function _KupList_itemCompliant(item) {
|
|
@@ -15633,11 +15578,13 @@ KupTabBar.style = kupTabBarCss;
|
|
|
15633
15578
|
*/
|
|
15634
15579
|
var KupTextFieldProps;
|
|
15635
15580
|
(function (KupTextFieldProps) {
|
|
15581
|
+
KupTextFieldProps["allowNegative"] = "When true, could be input negative numbers. It has effect only with number input type.";
|
|
15636
15582
|
KupTextFieldProps["customStyle"] = "Custom style of the component.";
|
|
15637
15583
|
KupTextFieldProps["decimals"] = "Number of decimals (should be used when inputType is number).";
|
|
15638
15584
|
KupTextFieldProps["disabled"] = "When set to true, the component is disabled.";
|
|
15639
15585
|
KupTextFieldProps["emitSubmitEventOnEnter"] = "When the text field is part of the autocomplete component and the list is opened, enter key selects the item and doesn't submit.";
|
|
15640
15586
|
KupTextFieldProps["fullWidth"] = "When set to true, the component will be rendered at full width.";
|
|
15587
|
+
KupTextFieldProps["group"] = "When true, the number will be formatted with group separator. It has effect only with number input type.";
|
|
15641
15588
|
KupTextFieldProps["helper"] = "When set, its content will be shown as a help text below the field.";
|
|
15642
15589
|
KupTextFieldProps["helperEnabled"] = "When true, the helper will be displayed.";
|
|
15643
15590
|
KupTextFieldProps["helperWhenFocused"] = "When set, the helper will be shown only when the field is focused.";
|
|
@@ -15645,6 +15592,7 @@ var KupTextFieldProps;
|
|
|
15645
15592
|
KupTextFieldProps["initialValue"] = "Sets the initial value of the component";
|
|
15646
15593
|
KupTextFieldProps["inputMode"] = "The HTML inputmode of the input element. It has no effect on text areas.";
|
|
15647
15594
|
KupTextFieldProps["inputType"] = "The HTML type of the input element. It has no effect on text areas.";
|
|
15595
|
+
KupTextFieldProps["integers"] = "Number of integers (should be used when inputType is number).";
|
|
15648
15596
|
KupTextFieldProps["isClearable"] = "Enables a clear trailing icon.";
|
|
15649
15597
|
KupTextFieldProps["label"] = "When set, its content will be shown as a label.";
|
|
15650
15598
|
KupTextFieldProps["leadingLabel"] = "When set to true, the label will be on the left of the component.";
|
|
@@ -15662,6 +15610,14 @@ var KupTextFieldProps;
|
|
|
15662
15610
|
|
|
15663
15611
|
const kupTextFieldCss = ":host{display:block;font-size:var(--kup-font-size)}:host([full-width]){width:100%}:host([full-width]) #kup-component{width:100%}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{height:100%}:host(.kup-shaped) #kup-component .mdc-text-field.mdc-text-field--filled{border-radius:16px 16px 0 0}:host(.kup-shaped) #kup-component .mdc-text-field.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-radius:28px 0 0 28px;width:28px}:host(.kup-shaped) #kup-component .mdc-text-field.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-radius:0 28px 28px 0;width:28px}";
|
|
15664
15612
|
|
|
15613
|
+
var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
15614
|
+
if (kind === "a" && !f)
|
|
15615
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
15616
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
15617
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15618
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15619
|
+
};
|
|
15620
|
+
var _KupTextField_instances, _KupTextField_getValueForOutput, _KupTextField_setValueFromEventTaget;
|
|
15665
15621
|
const KupTextField = class {
|
|
15666
15622
|
constructor(hostRef) {
|
|
15667
15623
|
index.registerInstance(this, hostRef);
|
|
@@ -15673,16 +15629,19 @@ const KupTextField = class {
|
|
|
15673
15629
|
this.kupIconClick = index.createEvent(this, "kup-textfield-iconclick", 6);
|
|
15674
15630
|
this.kupClearIconClick = index.createEvent(this, "kup-textfield-cleariconclick", 6);
|
|
15675
15631
|
this.kupTextFieldSubmit = index.createEvent(this, "kup-textfield-submit", 6);
|
|
15632
|
+
_KupTextField_instances.add(this);
|
|
15676
15633
|
/**
|
|
15677
15634
|
* Instance of the KupManager class.
|
|
15678
15635
|
*/
|
|
15679
15636
|
this.kupManager = kupManager.kupManagerInstance();
|
|
15680
15637
|
this.value = '';
|
|
15638
|
+
this.allowNegative = false;
|
|
15681
15639
|
this.customStyle = '';
|
|
15682
15640
|
this.decimals = null;
|
|
15683
15641
|
this.disabled = false;
|
|
15684
15642
|
this.emitSubmitEventOnEnter = true;
|
|
15685
15643
|
this.fullWidth = false;
|
|
15644
|
+
this.group = false;
|
|
15686
15645
|
this.helper = null;
|
|
15687
15646
|
this.helperEnabled = true;
|
|
15688
15647
|
this.helperWhenFocused = false;
|
|
@@ -15690,6 +15649,7 @@ const KupTextField = class {
|
|
|
15690
15649
|
this.initialValue = '';
|
|
15691
15650
|
this.inputMode = null;
|
|
15692
15651
|
this.inputType = 'text';
|
|
15652
|
+
this.integers = null;
|
|
15693
15653
|
this.isClearable = false;
|
|
15694
15654
|
this.label = null;
|
|
15695
15655
|
this.leadingLabel = false;
|
|
@@ -15706,35 +15666,36 @@ const KupTextField = class {
|
|
|
15706
15666
|
}
|
|
15707
15667
|
onKupBlur(event) {
|
|
15708
15668
|
const { target } = event;
|
|
15669
|
+
__classPrivateFieldGet$1(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
15709
15670
|
this.kupBlur.emit({
|
|
15710
15671
|
comp: this,
|
|
15711
15672
|
id: this.rootElement.id,
|
|
15712
|
-
value:
|
|
15673
|
+
value: this.value,
|
|
15713
15674
|
});
|
|
15714
15675
|
}
|
|
15715
15676
|
onKupChange(event) {
|
|
15716
15677
|
const { target } = event;
|
|
15717
|
-
this.
|
|
15678
|
+
__classPrivateFieldGet$1(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
15718
15679
|
this.kupChange.emit({
|
|
15719
15680
|
comp: this,
|
|
15720
15681
|
id: this.rootElement.id,
|
|
15721
|
-
value:
|
|
15682
|
+
value: this.value,
|
|
15722
15683
|
});
|
|
15723
15684
|
}
|
|
15724
15685
|
onKupClick(event) {
|
|
15725
15686
|
const { target } = event;
|
|
15687
|
+
__classPrivateFieldGet$1(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
15726
15688
|
this.kupClick.emit({
|
|
15727
15689
|
comp: this,
|
|
15728
15690
|
id: this.rootElement.id,
|
|
15729
|
-
value:
|
|
15691
|
+
value: this.value,
|
|
15730
15692
|
});
|
|
15731
15693
|
}
|
|
15732
|
-
onKupFocus(
|
|
15733
|
-
const { target } = event;
|
|
15694
|
+
onKupFocus(_event) {
|
|
15734
15695
|
this.kupFocus.emit({
|
|
15735
15696
|
comp: this,
|
|
15736
15697
|
id: this.rootElement.id,
|
|
15737
|
-
value:
|
|
15698
|
+
value: this.value,
|
|
15738
15699
|
});
|
|
15739
15700
|
}
|
|
15740
15701
|
onKupInput(event) {
|
|
@@ -15762,12 +15723,14 @@ const KupTextField = class {
|
|
|
15762
15723
|
});
|
|
15763
15724
|
}
|
|
15764
15725
|
onKeyDown(event) {
|
|
15726
|
+
const { target } = event;
|
|
15765
15727
|
if (event.key === 'Enter') {
|
|
15766
15728
|
if (this.emitSubmitEventOnEnter == true) {
|
|
15729
|
+
__classPrivateFieldGet$1(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
15767
15730
|
this.kupTextFieldSubmit.emit({
|
|
15768
15731
|
comp: this,
|
|
15769
15732
|
id: this.rootElement.id,
|
|
15770
|
-
value: this.
|
|
15733
|
+
value: this.value,
|
|
15771
15734
|
});
|
|
15772
15735
|
}
|
|
15773
15736
|
}
|
|
@@ -15787,6 +15750,9 @@ const KupTextField = class {
|
|
|
15787
15750
|
* Returns the component's internal value.
|
|
15788
15751
|
*/
|
|
15789
15752
|
async getValue() {
|
|
15753
|
+
if (this.inputType == 'number') {
|
|
15754
|
+
return this.kupManager.math.formattedStringToNumberString(this.value, '');
|
|
15755
|
+
}
|
|
15790
15756
|
return this.value;
|
|
15791
15757
|
}
|
|
15792
15758
|
/**
|
|
@@ -15814,7 +15780,7 @@ const KupTextField = class {
|
|
|
15814
15780
|
async setValue(value) {
|
|
15815
15781
|
this.value = value;
|
|
15816
15782
|
try {
|
|
15817
|
-
this.inputEl.value =
|
|
15783
|
+
this.inputEl.value = __classPrivateFieldGet$1(this, _KupTextField_instances, "m", _KupTextField_getValueForOutput).call(this);
|
|
15818
15784
|
}
|
|
15819
15785
|
catch (error) {
|
|
15820
15786
|
this.kupManager.debug.logMessage(this, "Couldn't set value on input element: '" + value + "'", kupManager.KupDebugCategory.WARNING);
|
|
@@ -15850,6 +15816,7 @@ const KupTextField = class {
|
|
|
15850
15816
|
}
|
|
15851
15817
|
render() {
|
|
15852
15818
|
const props = {
|
|
15819
|
+
allowNegative: this.allowNegative,
|
|
15853
15820
|
danger: this.rootElement.classList.contains('kup-danger')
|
|
15854
15821
|
? true
|
|
15855
15822
|
: false,
|
|
@@ -15859,6 +15826,7 @@ const KupTextField = class {
|
|
|
15859
15826
|
? true
|
|
15860
15827
|
: false,
|
|
15861
15828
|
fullWidth: this.fullWidth,
|
|
15829
|
+
group: this.group,
|
|
15862
15830
|
helper: this.helper,
|
|
15863
15831
|
helperEnabled: this.helperEnabled,
|
|
15864
15832
|
helperWhenFocused: this.helperWhenFocused,
|
|
@@ -15868,6 +15836,7 @@ const KupTextField = class {
|
|
|
15868
15836
|
: false,
|
|
15869
15837
|
inputMode: this.inputMode,
|
|
15870
15838
|
inputType: this.inputType,
|
|
15839
|
+
integers: this.integers,
|
|
15871
15840
|
isClearable: this.isClearable,
|
|
15872
15841
|
label: this.label,
|
|
15873
15842
|
leadingLabel: this.leadingLabel,
|
|
@@ -15910,6 +15879,20 @@ const KupTextField = class {
|
|
|
15910
15879
|
}
|
|
15911
15880
|
get rootElement() { return index.getElement(this); }
|
|
15912
15881
|
};
|
|
15882
|
+
_KupTextField_instances = new WeakSet(), _KupTextField_getValueForOutput = function _KupTextField_getValueForOutput() {
|
|
15883
|
+
if (this.value == null || this.value.trim() == '') {
|
|
15884
|
+
return '';
|
|
15885
|
+
}
|
|
15886
|
+
let v1 = this.kupManager.math.numberStringToFormattedString(this.value, this.decimals, '');
|
|
15887
|
+
return v1;
|
|
15888
|
+
}, _KupTextField_setValueFromEventTaget = function _KupTextField_setValueFromEventTaget(target) {
|
|
15889
|
+
if (this.inputType == 'number') {
|
|
15890
|
+
this.value = this.kupManager.math.formattedStringToNumberString(target.value, '');
|
|
15891
|
+
}
|
|
15892
|
+
else {
|
|
15893
|
+
this.value = target.value;
|
|
15894
|
+
}
|
|
15895
|
+
};
|
|
15913
15896
|
KupTextField.style = kupTextFieldCss;
|
|
15914
15897
|
|
|
15915
15898
|
/**
|
|
@@ -16123,13 +16106,13 @@ const KupTimePicker = class {
|
|
|
16123
16106
|
/* P r i v a t e M e t h o d s */
|
|
16124
16107
|
/*-------------------------------------------------*/
|
|
16125
16108
|
getFormattedValue(value) {
|
|
16126
|
-
return kupManager.
|
|
16109
|
+
return this.kupManager.dates.formattedStringToCustomDateTime(value, this.manageSeconds
|
|
16127
16110
|
? kupManager.KupDatesFormats.ISO_TIME
|
|
16128
16111
|
: kupManager.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, this.manageSeconds);
|
|
16129
16112
|
}
|
|
16130
16113
|
refreshPickerValue(eventDetailValue, eventToRaise) {
|
|
16131
16114
|
let newValue = null;
|
|
16132
|
-
if (kupManager.isValidFormattedStringTime(eventDetailValue, this.manageSeconds)) {
|
|
16115
|
+
if (this.kupManager.dates.isValidFormattedStringTime(eventDetailValue, this.manageSeconds)) {
|
|
16133
16116
|
this.value = eventDetailValue;
|
|
16134
16117
|
newValue = this.value;
|
|
16135
16118
|
}
|
|
@@ -16279,8 +16262,8 @@ const KupTimePicker = class {
|
|
|
16279
16262
|
date.getMinutes() == selectedTime.getMinutes()) {
|
|
16280
16263
|
selected = true;
|
|
16281
16264
|
}
|
|
16282
|
-
const value = kupManager.formatTime(date, this.manageSeconds);
|
|
16283
|
-
const id = kupManager.
|
|
16265
|
+
const value = this.kupManager.dates.formatTime(date, this.manageSeconds);
|
|
16266
|
+
const id = this.kupManager.dates.formattedStringToCustomDateTime(value, this.manageSeconds
|
|
16284
16267
|
? kupManager.KupDatesFormats.ISO_TIME
|
|
16285
16268
|
: kupManager.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, this.manageSeconds);
|
|
16286
16269
|
let item = {
|
|
@@ -16297,7 +16280,7 @@ const KupTimePicker = class {
|
|
|
16297
16280
|
if (this.value == null || this.value.trim() == '') {
|
|
16298
16281
|
return '';
|
|
16299
16282
|
}
|
|
16300
|
-
let v1 = kupManager.
|
|
16283
|
+
let v1 = this.kupManager.dates.timeStringToFormattedString(this.value, this.manageSeconds);
|
|
16301
16284
|
return v1;
|
|
16302
16285
|
}
|
|
16303
16286
|
/*-------------------------------------------------*/
|
|
@@ -17614,7 +17597,7 @@ const KupTree = class {
|
|
|
17614
17597
|
value = this.footer[column.name];
|
|
17615
17598
|
}
|
|
17616
17599
|
else {
|
|
17617
|
-
value =
|
|
17600
|
+
value = __classPrivateFieldGet(this, _KupTree_kupManager, "f").math.numberToFormattedString(this.footer[column.name], column.decimals, column.obj ? column.obj.p : '');
|
|
17618
17601
|
}
|
|
17619
17602
|
return (index.h("td", { "data-column": column.name }, totalMenu, index.h("span", { class: "totals-value", title: translation[menuLabel] }, value)));
|
|
17620
17603
|
});
|