@sme.up/ketchup 6.1.0-SNAPSHOT → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-button-ac179257.js → f-button-94cb5f35.js} +4 -4
- package/dist/cjs/f-cell-76830a0d.js +416 -0
- package/dist/cjs/f-checkbox-cd977193.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-68d45fd3.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-0e71df7e.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-46689c0a.js} +80 -403
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-b4229cef.js} +11 -3
- package/dist/cjs/{index-eb556444.js → index-31125378.js} +15 -8
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +5 -6
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +331 -299
- package/dist/cjs/kup-box.cjs.entry.js +1304 -0
- package/dist/cjs/kup-calendar.cjs.entry.js +9 -11
- package/dist/cjs/kup-cell.cjs.entry.js +10 -11
- package/dist/cjs/kup-dash-list.cjs.entry.js +5 -7
- package/dist/cjs/kup-dash_2.cjs.entry.js +5 -9
- package/dist/cjs/kup-dashboard.cjs.entry.js +438 -0
- package/dist/cjs/kup-drawer.cjs.entry.js +5 -6
- package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +66 -1353
- package/dist/cjs/kup-family-tree.cjs.entry.js +486 -0
- package/dist/cjs/kup-form.cjs.entry.js +478 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -5
- package/dist/cjs/kup-image-list.cjs.entry.js +73 -13
- package/dist/cjs/kup-lazy.cjs.entry.js +5 -6
- package/dist/cjs/kup-magic-box.cjs.entry.js +5 -6
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-7c514a30.js} +1787 -356
- package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -5
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +6 -7
- 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 +6 -7
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/assets/dashboard.js +161 -0
- package/dist/collection/assets/data-table.js +59 -0
- package/dist/collection/assets/family-tree.js +2654 -0
- package/dist/collection/assets/form.js +433 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +18 -6
- package/dist/collection/assets/kupinteract.js +68 -0
- package/dist/collection/collection-manifest.json +8 -7
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
- package/dist/collection/components/kup-box/kup-box.js +13 -2
- package/dist/collection/components/kup-button/kup-button.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +14 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +211 -152
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +42 -30
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
- package/dist/collection/components/kup-echart/kup-echart.js +9 -9
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +14 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +171 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +854 -0
- package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
- package/dist/collection/components/kup-form/kup-form.css +99 -0
- package/dist/collection/components/kup-form/kup-form.js +647 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
- package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
- package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +4 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +54 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +26 -9
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +9 -1
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +48 -15
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
- package/dist/collection/managers/kup-data/kup-data.js +114 -6
- package/dist/collection/managers/kup-interact/kup-interact.js +3 -5
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +2 -0
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +131 -45
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
- package/dist/collection/types/GenericTypes.js +3 -2
- package/dist/collection/utils/filters/filters-rows.js +4 -23
- package/dist/collection/utils/filters/filters-tree-items.js +2 -1
- package/dist/esm/{f-button-871a544b.js → f-button-cd948e50.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-474dd282.js} +46 -283
- package/dist/esm/f-checkbox-e06cf07b.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-d6f2eb94.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-914a03ef.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-a4a52732.js} +44 -366
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-76341fe3.js} +11 -3
- package/dist/esm/{index-baeab1ac.js → index-e41330a5.js} +15 -8
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +3 -4
- package/dist/esm/kup-autocomplete_25.entry.js +222 -190
- package/dist/esm/kup-box.entry.js +1300 -0
- package/dist/esm/kup-calendar.entry.js +5 -7
- package/dist/esm/kup-cell.entry.js +7 -8
- package/dist/esm/kup-dash-list.entry.js +2 -4
- package/dist/esm/kup-dash_2.entry.js +3 -7
- package/dist/esm/kup-dashboard.entry.js +434 -0
- package/dist/esm/kup-drawer.entry.js +3 -4
- package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +61 -1347
- package/dist/esm/kup-family-tree.entry.js +482 -0
- package/dist/esm/kup-form.entry.js +474 -0
- package/dist/esm/kup-iframe.entry.js +2 -3
- package/dist/esm/kup-image-list.entry.js +70 -10
- package/dist/esm/kup-lazy.entry.js +3 -4
- package/dist/esm/kup-magic-box.entry.js +3 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-86f440c7.js} +1762 -357
- package/dist/esm/kup-nav-bar.entry.js +2 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +4 -5
- 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 +4 -5
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-00e1133d.entry.js +9 -0
- package/dist/ketchup/p-066f344a.entry.js +1 -0
- package/dist/ketchup/p-0c6e0647.entry.js +1 -0
- package/dist/ketchup/p-151f7c17.entry.js +27 -0
- package/dist/ketchup/p-1e9c03b0.entry.js +1 -0
- package/dist/ketchup/p-21ea11cb.js +30 -0
- package/dist/ketchup/{p-fac1a08b.entry.js → p-2f4e6c50.entry.js} +1 -1
- package/dist/ketchup/p-3586f59c.js +1 -0
- package/dist/ketchup/p-359fd90d.entry.js +1 -0
- package/dist/ketchup/p-389fd0bf.js +1 -0
- package/dist/ketchup/p-5552f156.js +1 -0
- package/dist/ketchup/{p-f09f2f98.entry.js → p-77aff9c1.entry.js} +1 -1
- package/dist/ketchup/p-7cfdf53c.entry.js +39 -0
- package/dist/ketchup/p-853a5178.entry.js +1 -0
- package/dist/ketchup/{p-44ec4f03.js → p-8673bd4e.js} +1 -1
- package/dist/ketchup/p-8b55b786.entry.js +1 -0
- package/dist/ketchup/p-95f5834b.entry.js +1 -0
- package/dist/ketchup/p-a2c595c4.js +1 -0
- package/dist/ketchup/p-ae91f27e.entry.js +1 -0
- package/dist/ketchup/p-af664379.js +1 -0
- package/dist/ketchup/p-b0b3989b.js +2 -0
- package/dist/ketchup/p-b3b65a61.entry.js +1 -0
- package/dist/ketchup/p-bc306a53.entry.js +1 -0
- package/dist/ketchup/{p-f71a1675.entry.js → p-c3783b77.entry.js} +1 -1
- package/dist/ketchup/{p-7eff4eee.js → p-cd4fc3fb.js} +1 -1
- package/dist/ketchup/p-cee76b14.entry.js +1 -0
- package/dist/ketchup/p-cfaea29b.entry.js +1 -0
- package/dist/ketchup/p-d2f51e7b.entry.js +1 -0
- package/dist/ketchup/p-df8e6a4d.entry.js +1 -0
- package/dist/ketchup/p-e60a1170.entry.js +1 -0
- package/dist/ketchup/p-e9a1ba04.entry.js +1 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
- package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
- package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +17 -9
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +37 -0
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +82 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
- package/dist/types/components/kup-form/kup-form.d.ts +63 -0
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +4 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +10 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components/kup-tree/kup-tree.d.ts +0 -1
- package/dist/types/components.d.ts +492 -231
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +2 -0
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +13 -6
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +9 -2
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +9 -1
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +7 -5
- package/dist/types/types/GenericTypes.d.ts +3 -2
- package/dist/types/utils/filters/filters-rows.d.ts +0 -2
- package/package.json +2 -2
- package/dist/cjs/cell-utils-a78d6fac.js +0 -168
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/cjs/kup-field.cjs.entry.js +0 -241
- package/dist/cjs/kup-form-editor.cjs.entry.js +0 -404
- package/dist/cjs/utils-6287d878.js +0 -447
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
- package/dist/collection/components/kup-field/kup-field.css +0 -48
- package/dist/collection/components/kup-field/kup-field.js +0 -514
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/esm/cell-utils-964da6b5.js +0 -160
- package/dist/esm/kup-field.entry.js +0 -237
- package/dist/esm/kup-form-editor.entry.js +0 -400
- package/dist/esm/utils-d7e4b3c2.js +0 -428
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-3c11e615.entry.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-65974e48.entry.js +0 -1
- package/dist/ketchup/p-65b46587.entry.js +0 -40
- package/dist/ketchup/p-6dff70f8.entry.js +0 -1
- package/dist/ketchup/p-7454cb92.js +0 -1
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-8cdf61a4.js +0 -1
- package/dist/ketchup/p-954cc340.entry.js +0 -1
- package/dist/ketchup/p-976244f9.entry.js +0 -9
- package/dist/ketchup/p-99e0d768.entry.js +0 -1
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-a615a92b.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-c5ce8951.entry.js +0 -1
- package/dist/ketchup/p-d2ee56dd.entry.js +0 -1
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e0035c58.js +0 -1
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
- package/dist/ketchup/p-ea10176c.entry.js +0 -1
- package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
- package/dist/types/components/kup-field/kup-field.d.ts +0 -90
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-31125378.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Props of the kup-card component.
|
|
@@ -137,6 +137,17 @@ exports.KupLanguageColumn = void 0;
|
|
|
137
137
|
KupLanguageColumn["NON_NUMERICAL_IN_TABLE"] = "columnNonNumericalInTable";
|
|
138
138
|
KupLanguageColumn["SWAP"] = "columnSwap";
|
|
139
139
|
})(exports.KupLanguageColumn || (exports.KupLanguageColumn = {}));
|
|
140
|
+
/**
|
|
141
|
+
* Dashboard related decodes.
|
|
142
|
+
*/
|
|
143
|
+
exports.KupLanguageDashboard = void 0;
|
|
144
|
+
(function (KupLanguageDashboard) {
|
|
145
|
+
KupLanguageDashboard["DIMENSION"] = "dashboardDimension";
|
|
146
|
+
KupLanguageDashboard["LOADED"] = "dashboardLoaded";
|
|
147
|
+
KupLanguageDashboard["RESET"] = "dashboardReset";
|
|
148
|
+
KupLanguageDashboard["SAVE"] = "dashboardSave";
|
|
149
|
+
KupLanguageDashboard["VERTICAL"] = "dashboardVertical";
|
|
150
|
+
})(exports.KupLanguageDashboard || (exports.KupLanguageDashboard = {}));
|
|
140
151
|
/**
|
|
141
152
|
* Debug widget decodes.
|
|
142
153
|
*/
|
|
@@ -327,7 +338,7 @@ var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
327
338
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
328
339
|
};
|
|
329
340
|
var _KupDebug_debugWidget;
|
|
330
|
-
const dom$
|
|
341
|
+
const dom$i = document.documentElement;
|
|
331
342
|
/**
|
|
332
343
|
* Debugging suite, used to log messages and statuses from the Ketchup components.
|
|
333
344
|
* @module KupDebug
|
|
@@ -374,32 +385,32 @@ class KupDebug {
|
|
|
374
385
|
*/
|
|
375
386
|
showWidget() {
|
|
376
387
|
const debugWidget = document.createElement('kup-card');
|
|
377
|
-
const languages = dom$
|
|
388
|
+
const languages = dom$i.ketchup.language.getLanguages();
|
|
378
389
|
const languagesListData = [];
|
|
379
390
|
for (let index = 0; index < languages.length; index++) {
|
|
380
391
|
languagesListData.push({
|
|
381
392
|
id: languages[index],
|
|
382
|
-
selected: languages[index] === dom$
|
|
393
|
+
selected: languages[index] === dom$i.ketchup.language.name
|
|
383
394
|
? true
|
|
384
395
|
: false,
|
|
385
396
|
value: languages[index],
|
|
386
397
|
});
|
|
387
398
|
}
|
|
388
|
-
const themes = dom$
|
|
399
|
+
const themes = dom$i.ketchup.theme.getThemes();
|
|
389
400
|
const themesListData = [];
|
|
390
401
|
for (let index = 0; index < themes.length; index++) {
|
|
391
402
|
themesListData.push({
|
|
392
403
|
id: themes[index],
|
|
393
|
-
selected: themes[index] === dom$
|
|
404
|
+
selected: themes[index] === dom$i.ketchup.theme.name ? true : false,
|
|
394
405
|
value: themes[index],
|
|
395
406
|
});
|
|
396
407
|
}
|
|
397
|
-
const locales = dom$
|
|
408
|
+
const locales = dom$i.ketchup.dates.getLocales();
|
|
398
409
|
const localesListData = [];
|
|
399
410
|
for (let index = 0; index < locales.length; index++) {
|
|
400
411
|
localesListData.push({
|
|
401
412
|
id: locales[index],
|
|
402
|
-
selected: locales[index] === dom$
|
|
413
|
+
selected: locales[index] === dom$i.ketchup.dates.locale ? true : false,
|
|
403
414
|
value: locales[index],
|
|
404
415
|
});
|
|
405
416
|
}
|
|
@@ -409,13 +420,13 @@ class KupDebug {
|
|
|
409
420
|
icon: 'power_settings_new',
|
|
410
421
|
id: 'kup-debug-off',
|
|
411
422
|
customStyle: ':host {--kup-font-size: 0.875em; border-left: 1px solid var(--kup-border-color); border-right: 1px solid var(--kup-border-color);}',
|
|
412
|
-
title: dom$
|
|
423
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.OFF),
|
|
413
424
|
},
|
|
414
425
|
{
|
|
415
426
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
416
427
|
icon: 'print',
|
|
417
428
|
id: 'kup-debug-print',
|
|
418
|
-
title: dom$
|
|
429
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.PRINT),
|
|
419
430
|
},
|
|
420
431
|
{
|
|
421
432
|
checked: this.autoPrint,
|
|
@@ -423,20 +434,20 @@ class KupDebug {
|
|
|
423
434
|
icon: 'speaker_notes',
|
|
424
435
|
iconOff: 'speaker_notes_off',
|
|
425
436
|
id: 'kup-debug-autoprint',
|
|
426
|
-
title: dom$
|
|
437
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.AUTOPRINT),
|
|
427
438
|
toggable: true,
|
|
428
439
|
},
|
|
429
440
|
{
|
|
430
441
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
431
442
|
icon: 'broom',
|
|
432
443
|
id: 'kup-debug-clear',
|
|
433
|
-
title: dom$
|
|
444
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.CLEAR),
|
|
434
445
|
},
|
|
435
446
|
{
|
|
436
447
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
437
448
|
icon: 'delete',
|
|
438
449
|
id: 'kup-debug-delete',
|
|
439
|
-
title: dom$
|
|
450
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.DUMP),
|
|
440
451
|
},
|
|
441
452
|
{
|
|
442
453
|
className: 'kup-full-height',
|
|
@@ -445,22 +456,22 @@ class KupDebug {
|
|
|
445
456
|
id: 'kup-debug-dl-props',
|
|
446
457
|
label: 'Props',
|
|
447
458
|
styling: 'flat',
|
|
448
|
-
title: dom$
|
|
459
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.DL_PROPS),
|
|
449
460
|
},
|
|
450
461
|
{
|
|
451
462
|
className: 'kup-full-height',
|
|
452
463
|
customStyle: ':host {border-right: 1px solid var(--kup-border-color);}',
|
|
453
464
|
icon: 'download',
|
|
454
465
|
id: 'kup-debug-dl-all',
|
|
455
|
-
label: dom$
|
|
466
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.DL_ALL),
|
|
456
467
|
styling: 'flat',
|
|
457
|
-
title: dom$
|
|
468
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.DL_ALL),
|
|
458
469
|
},
|
|
459
470
|
{
|
|
460
471
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
461
472
|
icon: 'auto-fix',
|
|
462
473
|
id: 'kup-debug-magic-box',
|
|
463
|
-
title: dom$
|
|
474
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.MAGIC_BOX),
|
|
464
475
|
},
|
|
465
476
|
],
|
|
466
477
|
combobox: [
|
|
@@ -475,11 +486,11 @@ class KupDebug {
|
|
|
475
486
|
className: 'kup-full-height',
|
|
476
487
|
emitSubmitEventOnEnter: false,
|
|
477
488
|
inputType: 'text',
|
|
478
|
-
label: dom$
|
|
489
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.THEME_CHANGER),
|
|
479
490
|
},
|
|
480
491
|
},
|
|
481
492
|
id: 'kup-debug-theme-changer',
|
|
482
|
-
initialValue: dom$
|
|
493
|
+
initialValue: dom$i.ketchup.theme.name,
|
|
483
494
|
isSelect: true,
|
|
484
495
|
},
|
|
485
496
|
{
|
|
@@ -493,11 +504,11 @@ class KupDebug {
|
|
|
493
504
|
className: 'kup-full-height',
|
|
494
505
|
emitSubmitEventOnEnter: false,
|
|
495
506
|
inputType: 'text',
|
|
496
|
-
label: dom$
|
|
507
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.LANGUAGE_CHANGER),
|
|
497
508
|
},
|
|
498
509
|
},
|
|
499
510
|
id: 'kup-debug-language-changer',
|
|
500
|
-
initialValue: dom$
|
|
511
|
+
initialValue: dom$i.ketchup.language.name,
|
|
501
512
|
isSelect: true,
|
|
502
513
|
},
|
|
503
514
|
{
|
|
@@ -511,11 +522,11 @@ class KupDebug {
|
|
|
511
522
|
className: 'kup-full-height',
|
|
512
523
|
emitSubmitEventOnEnter: false,
|
|
513
524
|
inputType: 'text',
|
|
514
|
-
label: dom$
|
|
525
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.LOCALE_CHANGER),
|
|
515
526
|
},
|
|
516
527
|
},
|
|
517
528
|
id: 'kup-debug-locale-changer',
|
|
518
|
-
initialValue: dom$
|
|
529
|
+
initialValue: dom$i.ketchup.dates.locale,
|
|
519
530
|
isSelect: true,
|
|
520
531
|
},
|
|
521
532
|
],
|
|
@@ -523,7 +534,7 @@ class KupDebug {
|
|
|
523
534
|
{
|
|
524
535
|
className: 'kup-full-height',
|
|
525
536
|
id: 'kup-debug-log-limit',
|
|
526
|
-
label: dom$
|
|
537
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.LOG_LIMIT),
|
|
527
538
|
initialValue: this.logLimit,
|
|
528
539
|
emitSubmitEventOnEnter: false,
|
|
529
540
|
inputType: 'number',
|
|
@@ -574,7 +585,7 @@ class KupDebug {
|
|
|
574
585
|
kupDebug.dump();
|
|
575
586
|
break;
|
|
576
587
|
case 'kup-debug-magic-box':
|
|
577
|
-
dom$
|
|
588
|
+
dom$i.ketchup.toggleMagicBox();
|
|
578
589
|
break;
|
|
579
590
|
case 'kup-debug-off':
|
|
580
591
|
kupDebug.toggle();
|
|
@@ -589,14 +600,14 @@ class KupDebug {
|
|
|
589
600
|
case 'kup-combobox-itemclick':
|
|
590
601
|
switch (compID) {
|
|
591
602
|
case 'kup-debug-language-changer':
|
|
592
|
-
dom$
|
|
603
|
+
dom$i.ketchup.language.set(compEvent.detail.value);
|
|
593
604
|
break;
|
|
594
605
|
case 'kup-debug-locale-changer':
|
|
595
|
-
dom$
|
|
596
|
-
dom$
|
|
606
|
+
dom$i.ketchup.dates.setLocale(compEvent.detail.value);
|
|
607
|
+
dom$i.ketchup.math.setLocale(compEvent.detail.value);
|
|
597
608
|
break;
|
|
598
609
|
case 'kup-debug-theme-changer':
|
|
599
|
-
dom$
|
|
610
|
+
dom$i.ketchup.theme.set(compEvent.detail.value);
|
|
600
611
|
break;
|
|
601
612
|
}
|
|
602
613
|
case 'kup-textfield-input':
|
|
@@ -658,7 +669,7 @@ class KupDebug {
|
|
|
658
669
|
// If the log is tied to a KupComponent, on click its props will be downloaded.
|
|
659
670
|
// Also, a different style will be applied to distinguish it between the others.
|
|
660
671
|
if (typeof this.logs[index].element == 'object') {
|
|
661
|
-
slot.title = dom$
|
|
672
|
+
slot.title = dom$i.ketchup.language.translate(KupLanguageDebug.DL_PROPS_COMP);
|
|
662
673
|
slot.style.fontWeight = 'bold';
|
|
663
674
|
slot.style.cursor = 'pointer';
|
|
664
675
|
slot.onclick = () => {
|
|
@@ -716,7 +727,7 @@ class KupDebug {
|
|
|
716
727
|
printLog[type] = [];
|
|
717
728
|
}
|
|
718
729
|
printLog[type].push({
|
|
719
|
-
date: dom$
|
|
730
|
+
date: dom$i.ketchup.dates.format(this.logs[index].date, 'LLL:ms'),
|
|
720
731
|
element: isComponent
|
|
721
732
|
? this.logs[index].element
|
|
722
733
|
: this.logs[index].id,
|
|
@@ -896,7 +907,7 @@ class KupDebug {
|
|
|
896
907
|
message: message,
|
|
897
908
|
};
|
|
898
909
|
if (this.logs.length > this.logLimit) {
|
|
899
|
-
console.warn(dom$
|
|
910
|
+
console.warn(dom$i.ketchup.dates.format(date, 'LLL:ms') +
|
|
900
911
|
' kup-debug => ' +
|
|
901
912
|
'Too many logs (> ' +
|
|
902
913
|
this.logLimit +
|
|
@@ -912,14 +923,14 @@ class KupDebug {
|
|
|
912
923
|
}
|
|
913
924
|
switch (category) {
|
|
914
925
|
case exports.KupDebugCategory.ERROR:
|
|
915
|
-
console.error(dom$
|
|
926
|
+
console.error(dom$i.ketchup.dates.format(date, 'LLL:ms') + id + message, obj);
|
|
916
927
|
window.dispatchEvent(new CustomEvent('kup-debug-error', {
|
|
917
928
|
bubbles: true,
|
|
918
929
|
detail: { comp, date, message },
|
|
919
930
|
}));
|
|
920
931
|
break;
|
|
921
932
|
case exports.KupDebugCategory.WARNING:
|
|
922
|
-
console.warn(dom$
|
|
933
|
+
console.warn(dom$i.ketchup.dates.format(date, 'LLL:ms') + id + message, obj);
|
|
923
934
|
break;
|
|
924
935
|
}
|
|
925
936
|
}
|
|
@@ -1006,7 +1017,7 @@ exports.KupDynamicPositionPlacement = void 0;
|
|
|
1006
1017
|
KupDynamicPositionPlacement["TOP_RIGHT"] = "tr";
|
|
1007
1018
|
})(exports.KupDynamicPositionPlacement || (exports.KupDynamicPositionPlacement = {}));
|
|
1008
1019
|
|
|
1009
|
-
const dom$
|
|
1020
|
+
const dom$h = document.documentElement;
|
|
1010
1021
|
/**
|
|
1011
1022
|
* This class is used to dynamically reposition HTML elements.
|
|
1012
1023
|
* @module KupDynamicPosition
|
|
@@ -1074,7 +1085,7 @@ class KupDynamicPosition {
|
|
|
1074
1085
|
const target = mutations[0].target;
|
|
1075
1086
|
if (target.classList.contains(kupDynamicPositionActiveClass)) {
|
|
1076
1087
|
requestAnimationFrame(function () {
|
|
1077
|
-
dom$
|
|
1088
|
+
dom$h.ketchup.dynamicPosition.run(el);
|
|
1078
1089
|
});
|
|
1079
1090
|
}
|
|
1080
1091
|
});
|
|
@@ -1131,7 +1142,7 @@ class KupDynamicPosition {
|
|
|
1131
1142
|
*/
|
|
1132
1143
|
run(el) {
|
|
1133
1144
|
if (!el.isConnected) {
|
|
1134
|
-
dom$
|
|
1145
|
+
dom$h.ketchup.dynamicPosition.managedElements.delete(el);
|
|
1135
1146
|
cancelAnimationFrame(el.kupDynamicPosition.rAF);
|
|
1136
1147
|
return;
|
|
1137
1148
|
}
|
|
@@ -1239,7 +1250,7 @@ class KupDynamicPosition {
|
|
|
1239
1250
|
// Recursive
|
|
1240
1251
|
if (!el.kupDynamicPosition.detach) {
|
|
1241
1252
|
el.kupDynamicPosition.rAF = requestAnimationFrame(function () {
|
|
1242
|
-
dom$
|
|
1253
|
+
dom$h.ketchup.dynamicPosition.run(el);
|
|
1243
1254
|
});
|
|
1244
1255
|
}
|
|
1245
1256
|
else {
|
|
@@ -1327,7 +1338,7 @@ exports.KupDropEventTypes = void 0;
|
|
|
1327
1338
|
KupDropEventTypes["MAGICBOX"] = "text/kup-magic-box-drag";
|
|
1328
1339
|
})(exports.KupDropEventTypes || (exports.KupDropEventTypes = {}));
|
|
1329
1340
|
|
|
1330
|
-
const dom$
|
|
1341
|
+
const dom$g = document.documentElement;
|
|
1331
1342
|
/**
|
|
1332
1343
|
* This class handles elements as dialogs, making them resizable and movable.
|
|
1333
1344
|
* @module KupInteract
|
|
@@ -1376,16 +1387,13 @@ class KupInteract {
|
|
|
1376
1387
|
draggable.kupDragDrop.ghostImage
|
|
1377
1388
|
? draggable.kupDragDrop.ghostImage
|
|
1378
1389
|
: e.target;
|
|
1379
|
-
const oldTransform = ghostImage.style.transform;
|
|
1380
1390
|
let x = parseFloat(ghostImage.getAttribute('data-x')) || 0;
|
|
1381
1391
|
let y = parseFloat(ghostImage.getAttribute('data-y')) || 0;
|
|
1382
1392
|
x = x + e.dx;
|
|
1383
1393
|
y = y + e.dy;
|
|
1384
1394
|
ghostImage.style.transform = `translate(${x}px, ${y}px)`;
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
ghostImage.setAttribute('data-y', y.toString());
|
|
1388
|
-
}
|
|
1395
|
+
ghostImage.setAttribute('data-x', x.toString());
|
|
1396
|
+
ghostImage.setAttribute('data-y', y.toString());
|
|
1389
1397
|
}
|
|
1390
1398
|
},
|
|
1391
1399
|
start(e) {
|
|
@@ -1428,11 +1436,12 @@ class KupInteract {
|
|
|
1428
1436
|
ghostImage.style.transition = 'none';
|
|
1429
1437
|
ghostImage.style.zIndex =
|
|
1430
1438
|
'calc(var(--kup-navbar-zindex) + 1)';
|
|
1431
|
-
dom$
|
|
1439
|
+
dom$g.ketchup.interact.container.appendChild(ghostImage);
|
|
1432
1440
|
draggable.kupDragDrop.ghostImage = ghostImage;
|
|
1433
1441
|
break;
|
|
1434
1442
|
case exports.KupDragEffect.CLONE:
|
|
1435
1443
|
ghostImage = draggable.cloneNode(true);
|
|
1444
|
+
ghostImage.id = '';
|
|
1436
1445
|
ghostImage.style.cursor = 'grabbing';
|
|
1437
1446
|
ghostImage.style.height = draggable.clientHeight + 'px';
|
|
1438
1447
|
ghostImage.style.left =
|
|
@@ -1588,7 +1597,7 @@ class KupInteract {
|
|
|
1588
1597
|
x += e.deltaRect.left;
|
|
1589
1598
|
y += e.deltaRect.top;
|
|
1590
1599
|
el.style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
|
1591
|
-
if (dom$
|
|
1600
|
+
if (dom$g.ketchup.interact.isInViewport(el, oldTransform, e.delta)) {
|
|
1592
1601
|
el.setAttribute('data-x', x.toString());
|
|
1593
1602
|
el.setAttribute('data-y', y.toString());
|
|
1594
1603
|
}
|
|
@@ -1640,7 +1649,7 @@ class KupInteract {
|
|
|
1640
1649
|
const callbacks = {
|
|
1641
1650
|
start(e) {
|
|
1642
1651
|
const el = e.currentTarget;
|
|
1643
|
-
el.style.zIndex = (dom$
|
|
1652
|
+
el.style.zIndex = (dom$g.ketchup.interact.zIndex++).toString();
|
|
1644
1653
|
},
|
|
1645
1654
|
};
|
|
1646
1655
|
this.draggable(el, {
|
|
@@ -1649,7 +1658,7 @@ class KupInteract {
|
|
|
1649
1658
|
interact.modifiers.restrictRect({
|
|
1650
1659
|
restriction: restrictContainer
|
|
1651
1660
|
? restrictContainer
|
|
1652
|
-
: dom$
|
|
1661
|
+
: dom$g.ketchup.interact.restrictContainer,
|
|
1653
1662
|
endOnly: true,
|
|
1654
1663
|
}),
|
|
1655
1664
|
],
|
|
@@ -1708,6 +1717,11 @@ const chinese = {
|
|
|
1708
1717
|
columnNonNumerical: "这些列不是数字的",
|
|
1709
1718
|
columnNonNumericalInTable: "此表中不存在数字列",
|
|
1710
1719
|
columnSwap: "交换",
|
|
1720
|
+
dashboardDimension: "方面",
|
|
1721
|
+
dashboardLoaded: "已加载",
|
|
1722
|
+
dashboardReset: "重置",
|
|
1723
|
+
dashboardSave: "节省",
|
|
1724
|
+
dashboardVertical: "垂直的",
|
|
1711
1725
|
debugAutoprint: "切换自动打印",
|
|
1712
1726
|
debugClear: "清除小部件",
|
|
1713
1727
|
debugDLAll: "全部",
|
|
@@ -1821,6 +1835,11 @@ const english = {
|
|
|
1821
1835
|
columnNonNumerical: "These columns are not numerical.",
|
|
1822
1836
|
columnNonNumericalInTable: "No numerical columns exist in this table.",
|
|
1823
1837
|
columnSwap: "Swap columns",
|
|
1838
|
+
dashboardDimension: "Dimension",
|
|
1839
|
+
dashboardLoaded: "Loaded",
|
|
1840
|
+
dashboardReset: "Reset",
|
|
1841
|
+
dashboardSave: "Save",
|
|
1842
|
+
dashboardVertical: "Vertical",
|
|
1824
1843
|
debugAutoprint: "Toggle automatic print",
|
|
1825
1844
|
debugClear: "Clear widget",
|
|
1826
1845
|
debugDLAll: "All",
|
|
@@ -1934,6 +1953,11 @@ const french = {
|
|
|
1934
1953
|
columnNonNumerical: "Ces colonnes ne sont pas numériques.",
|
|
1935
1954
|
columnNonNumericalInTable: "Aucune colonne numérique n'existe dans ce tableau.",
|
|
1936
1955
|
columnSwap: "Permuter les colonnes",
|
|
1956
|
+
dashboardDimension: "Dimension",
|
|
1957
|
+
dashboardLoaded: "Chargé",
|
|
1958
|
+
dashboardReset: "Réinitialiser",
|
|
1959
|
+
dashboardSave: "Enregistrer",
|
|
1960
|
+
dashboardVertical: "Vertical",
|
|
1937
1961
|
debugAutoprint: "Activer l'impression automatique",
|
|
1938
1962
|
debugClear: "Effacer le widget",
|
|
1939
1963
|
debugDLAll: "Tout",
|
|
@@ -2047,6 +2071,11 @@ const italian = {
|
|
|
2047
2071
|
columnNonNumerical: "Queste colonne non sono numeriche.",
|
|
2048
2072
|
columnNonNumericalInTable: "Non esistono colonne numeriche in questa tabella.",
|
|
2049
2073
|
columnSwap: "Scambia le colonne",
|
|
2074
|
+
dashboardDimension: "Dimensione",
|
|
2075
|
+
dashboardLoaded: "Caricata",
|
|
2076
|
+
dashboardReset: "Ripristina",
|
|
2077
|
+
dashboardSave: "Salva",
|
|
2078
|
+
dashboardVertical: "Verticale",
|
|
2050
2079
|
debugAutoprint: "Attiva stampa automatica logs",
|
|
2051
2080
|
debugClear: "Pulisci widget",
|
|
2052
2081
|
debugDLAll: "Tutto",
|
|
@@ -2174,6 +2203,11 @@ const polish = {
|
|
|
2174
2203
|
columnNonNumerical: "Te kolumny nie są numeryczne.",
|
|
2175
2204
|
columnNonNumericalInTable: "W tej tabeli nie ma kolumn liczbowych.",
|
|
2176
2205
|
columnSwap: "Zamień kolumny",
|
|
2206
|
+
dashboardDimension: "Wymiar",
|
|
2207
|
+
dashboardLoaded: "Załadowany",
|
|
2208
|
+
dashboardReset: "Resetowanie",
|
|
2209
|
+
dashboardSave: "Ratować",
|
|
2210
|
+
dashboardVertical: "Pionowy",
|
|
2177
2211
|
debugAutoprint: "Przełącz automatyczne drukowanie",
|
|
2178
2212
|
debugClear: "Wyczyść widżet",
|
|
2179
2213
|
debugDLAll: "Wszystko",
|
|
@@ -2287,6 +2321,11 @@ const russian = {
|
|
|
2287
2321
|
columnNonNumerical: "Эти столбцы не числовые",
|
|
2288
2322
|
columnNonNumericalInTable: "В этой таблице нет числовых столбцов",
|
|
2289
2323
|
columnSwap: "Поменять местами столбцы",
|
|
2324
|
+
dashboardDimension: "Измерение",
|
|
2325
|
+
dashboardLoaded: "Загружено",
|
|
2326
|
+
dashboardReset: "Перезагрузить",
|
|
2327
|
+
dashboardSave: "Сохранять",
|
|
2328
|
+
dashboardVertical: "Вертикальный",
|
|
2290
2329
|
debugAutoprint: "Включить автоматическую печать",
|
|
2291
2330
|
debugClear: "Очистить виджет",
|
|
2292
2331
|
debugDLAll: "Все",
|
|
@@ -2400,6 +2439,11 @@ const spanish = {
|
|
|
2400
2439
|
columnNonNumerical: "Estas columnas no son numéricas.",
|
|
2401
2440
|
columnNonNumericalInTable: "No existen columnas numéricas en esta tabla.",
|
|
2402
2441
|
columnSwap: "Intercambiar columnas",
|
|
2442
|
+
dashboardDimension: "Dimensión",
|
|
2443
|
+
dashboardLoaded: "Cargado",
|
|
2444
|
+
dashboardReset: "Reiniciar",
|
|
2445
|
+
dashboardSave: "Ahorrar",
|
|
2446
|
+
dashboardVertical: "Vertical",
|
|
2403
2447
|
debugAutoprint: "Alternar impresión automática",
|
|
2404
2448
|
debugClear: "Borrar widget",
|
|
2405
2449
|
debugDLAll: "Todas",
|
|
@@ -2508,7 +2552,7 @@ const languages = {
|
|
|
2508
2552
|
spanish: spanish
|
|
2509
2553
|
};
|
|
2510
2554
|
|
|
2511
|
-
const dom$
|
|
2555
|
+
const dom$f = document.documentElement;
|
|
2512
2556
|
/**
|
|
2513
2557
|
* Handles the translation to different languages.
|
|
2514
2558
|
* @module KupLanguage
|
|
@@ -2562,7 +2606,7 @@ class KupLanguage {
|
|
|
2562
2606
|
return invalidKey(key);
|
|
2563
2607
|
}
|
|
2564
2608
|
function invalidKey(key) {
|
|
2565
|
-
dom$
|
|
2609
|
+
dom$f.ketchup.debug.logMessage('kup-language', 'Invalid translation for key (' + key + ')!', exports.KupDebugCategory.WARNING);
|
|
2566
2610
|
return key;
|
|
2567
2611
|
}
|
|
2568
2612
|
}
|
|
@@ -2575,7 +2619,7 @@ class KupLanguage {
|
|
|
2575
2619
|
language = language.toLowerCase();
|
|
2576
2620
|
}
|
|
2577
2621
|
else {
|
|
2578
|
-
dom$
|
|
2622
|
+
dom$f.ketchup.debug.logMessage('kup-language', "Couldn't set language, invalid string received (" +
|
|
2579
2623
|
language +
|
|
2580
2624
|
')!', exports.KupDebugCategory.WARNING);
|
|
2581
2625
|
return;
|
|
@@ -2585,12 +2629,12 @@ class KupLanguage {
|
|
|
2585
2629
|
const dVariant = decodedLanguage.variant;
|
|
2586
2630
|
if (this.list[dLanguage]) {
|
|
2587
2631
|
if (dVariant && !this.list[dLanguage].variants[dVariant]) {
|
|
2588
|
-
dom$
|
|
2632
|
+
dom$f.ketchup.debug.logMessage('kup-language', 'Variant not found (' + dVariant + ')!', exports.KupDebugCategory.WARNING);
|
|
2589
2633
|
return;
|
|
2590
2634
|
}
|
|
2591
2635
|
}
|
|
2592
2636
|
else {
|
|
2593
|
-
dom$
|
|
2637
|
+
dom$f.ketchup.debug.logMessage('kup-language', 'Language not found (' + dLanguage + ')!', exports.KupDebugCategory.WARNING);
|
|
2594
2638
|
return;
|
|
2595
2639
|
}
|
|
2596
2640
|
this.name = language;
|
|
@@ -2677,7 +2721,7 @@ const obj = {
|
|
|
2677
2721
|
types: types
|
|
2678
2722
|
};
|
|
2679
2723
|
|
|
2680
|
-
const dom$
|
|
2724
|
+
const dom$e = document.documentElement;
|
|
2681
2725
|
/**
|
|
2682
2726
|
* Handles objects definition and validation.
|
|
2683
2727
|
* @module KupObjects
|
|
@@ -2906,6 +2950,16 @@ class KupObjects {
|
|
|
2906
2950
|
!this.isRadio(obj) &&
|
|
2907
2951
|
!this.isChart(obj));
|
|
2908
2952
|
}
|
|
2953
|
+
/**
|
|
2954
|
+
* Checks whether the object represents a switch or not.
|
|
2955
|
+
* @param {KupObj} obj - Object to check.
|
|
2956
|
+
* @returns {boolean} True when the object is a switch.
|
|
2957
|
+
*/
|
|
2958
|
+
isSwitch(obj) {
|
|
2959
|
+
if (!obj)
|
|
2960
|
+
return false;
|
|
2961
|
+
return 'V2' === obj.t && 'ONOFF' === obj.p;
|
|
2962
|
+
}
|
|
2909
2963
|
/**
|
|
2910
2964
|
* Checks whether the object represents a text field or not.
|
|
2911
2965
|
* @param {KupObj} obj - Object to check.
|
|
@@ -2992,9 +3046,9 @@ class KupObjects {
|
|
|
2992
3046
|
*/
|
|
2993
3047
|
parseDate(obj) {
|
|
2994
3048
|
if (obj.t === 'D8' && obj.p === '*DMYY') {
|
|
2995
|
-
return dom$
|
|
3049
|
+
return dom$e.ketchup.dates.toDayjs(obj.k, 'DDMMYYYY');
|
|
2996
3050
|
}
|
|
2997
|
-
return dom$
|
|
3051
|
+
return dom$e.ketchup.dates.toDayjs(obj.k);
|
|
2998
3052
|
}
|
|
2999
3053
|
/**
|
|
3000
3054
|
* Check whether two JS objects are deeply equal. When the arguments aren't objects, they are tested directly for equity.
|
|
@@ -3049,8 +3103,10 @@ class KupObjects {
|
|
|
3049
3103
|
*/
|
|
3050
3104
|
var ScrollOnHoverDirection;
|
|
3051
3105
|
(function (ScrollOnHoverDirection) {
|
|
3106
|
+
ScrollOnHoverDirection["BOTTOM"] = "bottom";
|
|
3052
3107
|
ScrollOnHoverDirection["LEFT"] = "left";
|
|
3053
3108
|
ScrollOnHoverDirection["RIGHT"] = "right";
|
|
3109
|
+
ScrollOnHoverDirection["TOP"] = "top";
|
|
3054
3110
|
})(ScrollOnHoverDirection || (ScrollOnHoverDirection = {}));
|
|
3055
3111
|
|
|
3056
3112
|
var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
@@ -3064,8 +3120,8 @@ var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
3064
3120
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3065
3121
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3066
3122
|
};
|
|
3067
|
-
var _KupScrollOnHover_arrowsContainer, _KupScrollOnHover_leftArrows, _KupScrollOnHover_rightArrows, _KupScrollOnHover_scrollEvent, _KupScrollOnHover_mousemoveEvent, _KupScrollOnHover_mouseleaveEvent, _KupScrollOnHover_rAF, _KupScrollOnHover_timeout;
|
|
3068
|
-
const dom$
|
|
3123
|
+
var _KupScrollOnHover_instances, _KupScrollOnHover_arrowsContainer, _KupScrollOnHover_leftArrows, _KupScrollOnHover_rightArrows, _KupScrollOnHover_scrollEvent, _KupScrollOnHover_mousemoveEvent, _KupScrollOnHover_mouseleaveEvent, _KupScrollOnHover_rAF, _KupScrollOnHover_timeout, _KupScrollOnHover_initArrows;
|
|
3124
|
+
const dom$d = document.documentElement;
|
|
3069
3125
|
/**
|
|
3070
3126
|
* Lets the user scroll an element's overflow by hovering with the mouse on its left/right edge.
|
|
3071
3127
|
* @module KupScrollOnHover
|
|
@@ -3077,6 +3133,7 @@ class KupScrollOnHover {
|
|
|
3077
3133
|
* @param {number} step - The amount in pixels for each scroll recursion.
|
|
3078
3134
|
*/
|
|
3079
3135
|
constructor(delay, step) {
|
|
3136
|
+
_KupScrollOnHover_instances.add(this);
|
|
3080
3137
|
_KupScrollOnHover_arrowsContainer.set(this, void 0);
|
|
3081
3138
|
_KupScrollOnHover_leftArrows.set(this, void 0);
|
|
3082
3139
|
_KupScrollOnHover_rightArrows.set(this, void 0);
|
|
@@ -3088,42 +3145,32 @@ class KupScrollOnHover {
|
|
|
3088
3145
|
this.delay = delay ? delay : 500;
|
|
3089
3146
|
this.managedElements = new Set();
|
|
3090
3147
|
this.step = step ? step : 50;
|
|
3091
|
-
__classPrivateFieldSet$2(this, _KupScrollOnHover_arrowsContainer, document.createElement('div'), "f");
|
|
3092
|
-
__classPrivateFieldSet$2(this, _KupScrollOnHover_leftArrows, [], "f");
|
|
3093
3148
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_mouseleaveEvent, (event) => this.stop(event.target), "f");
|
|
3094
3149
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_mousemoveEvent, (event) => this.start(event), "f");
|
|
3095
3150
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, null, "f");
|
|
3096
|
-
__classPrivateFieldSet$2(this, _KupScrollOnHover_rightArrows, [], "f");
|
|
3097
3151
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_scrollEvent, (event) => this.updateChildren(event.target), "f");
|
|
3098
3152
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_timeout, null, "f");
|
|
3099
|
-
__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f").id = 'kup-scrolling-arrows';
|
|
3100
|
-
for (let index = 1; index < 4; index++) {
|
|
3101
|
-
const arrow = document.createElement('div');
|
|
3102
|
-
arrow.setAttribute('class', 'kup-left-scrolling-arrow kup-arrow-' + index);
|
|
3103
|
-
__classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f").push(arrow);
|
|
3104
|
-
}
|
|
3105
|
-
for (let index = 1; index < 4; index++) {
|
|
3106
|
-
const arrow = document.createElement('div');
|
|
3107
|
-
arrow.setAttribute('class', 'kup-right-scrolling-arrow kup-arrow-' + index);
|
|
3108
|
-
__classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f").push(arrow);
|
|
3109
|
-
}
|
|
3110
|
-
__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f").append(__classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f")[2], __classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f")[1], __classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f")[0], __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f")[0], __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f")[1], __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f")[2]);
|
|
3111
|
-
this.container = document.createElement('div');
|
|
3112
|
-
this.container.setAttribute('kup-scroll-on-hover', '');
|
|
3113
|
-
this.container.appendChild(__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f"));
|
|
3114
|
-
document.body.appendChild(this.container);
|
|
3115
3153
|
}
|
|
3116
3154
|
/**
|
|
3117
3155
|
* Watches the given element in order to trigger the scroll on hover when conditions are met.
|
|
3118
3156
|
* Children nodes with the "hover-scrolling-child" will be watched and scrolled when el scrolls.
|
|
3119
3157
|
* @param {KupScrollOnHoverElement} el - Element to watch.
|
|
3158
|
+
* @param {boolean} vertical - Enables vertical scroll.
|
|
3159
|
+
* @param {KupScrollOnHoverPercentages} percentages - Sets how big is the area in which the scroll is enabled.
|
|
3120
3160
|
*/
|
|
3121
|
-
register(el) {
|
|
3161
|
+
register(el, vertical, percentages) {
|
|
3162
|
+
if (!__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f")) {
|
|
3163
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_instances, "m", _KupScrollOnHover_initArrows).call(this);
|
|
3164
|
+
}
|
|
3122
3165
|
el.style.overflowX = 'auto';
|
|
3123
3166
|
el.scrollOnHover = {
|
|
3124
3167
|
active: false,
|
|
3125
3168
|
children: el.querySelectorAll('.hover-scrolling-child'),
|
|
3169
|
+
percentages: percentages
|
|
3170
|
+
? percentages
|
|
3171
|
+
: { back: 0.1, forward: 0.9 },
|
|
3126
3172
|
rect: null,
|
|
3173
|
+
vertical: vertical || null,
|
|
3127
3174
|
x: 0,
|
|
3128
3175
|
y: 0,
|
|
3129
3176
|
};
|
|
@@ -3168,14 +3215,19 @@ class KupScrollOnHover {
|
|
|
3168
3215
|
if (el.scrollOnHover.active || __classPrivateFieldGet$2(this, _KupScrollOnHover_timeout, "f")) {
|
|
3169
3216
|
return;
|
|
3170
3217
|
}
|
|
3218
|
+
let trueHeight = el.clientHeight;
|
|
3219
|
+
if (trueHeight === 0) {
|
|
3220
|
+
trueHeight = el.offsetHeight;
|
|
3221
|
+
}
|
|
3171
3222
|
let trueWidth = el.clientWidth;
|
|
3172
3223
|
if (trueWidth === 0) {
|
|
3173
3224
|
trueWidth = el.offsetWidth;
|
|
3174
3225
|
}
|
|
3175
3226
|
if (el.scrollWidth > trueWidth + 10) {
|
|
3176
3227
|
if (trueWidth !== 0 && !el.scrollOnHover.active) {
|
|
3177
|
-
const percRight = trueWidth - trueWidth *
|
|
3178
|
-
const percLeft = trueWidth -
|
|
3228
|
+
const percRight = trueWidth - trueWidth * el.scrollOnHover.percentages.back;
|
|
3229
|
+
const percLeft = trueWidth -
|
|
3230
|
+
trueWidth * el.scrollOnHover.percentages.forward;
|
|
3179
3231
|
const elOffset = el.scrollOnHover.x - el.scrollOnHover.rect.left;
|
|
3180
3232
|
const maxScrollLeft = el.scrollWidth - trueWidth;
|
|
3181
3233
|
const direction = elOffset < percLeft && el.scrollLeft !== 0
|
|
@@ -3196,7 +3248,29 @@ class KupScrollOnHover {
|
|
|
3196
3248
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_timeout, setTimeout(() => {
|
|
3197
3249
|
el.scrollOnHover.active = true;
|
|
3198
3250
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
3199
|
-
dom$
|
|
3251
|
+
dom$d.ketchup.scrollOnHover.run(el, maxScrollLeft, percRight, percLeft, direction);
|
|
3252
|
+
}), "f");
|
|
3253
|
+
}, this.delay), "f");
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
if (el.scrollOnHover.vertical && el.scrollHeight > trueHeight + 10) {
|
|
3258
|
+
if (trueHeight !== 0 && !el.scrollOnHover.active) {
|
|
3259
|
+
const percBottom = trueHeight - trueHeight * el.scrollOnHover.percentages.back;
|
|
3260
|
+
const percTop = trueHeight -
|
|
3261
|
+
trueHeight * el.scrollOnHover.percentages.forward;
|
|
3262
|
+
const elOffset = el.scrollOnHover.y - el.scrollOnHover.rect.top;
|
|
3263
|
+
const maxScrollTop = el.scrollHeight - trueHeight;
|
|
3264
|
+
const direction = elOffset < percTop && el.scrollTop !== 0
|
|
3265
|
+
? ScrollOnHoverDirection.TOP
|
|
3266
|
+
: elOffset > percBottom && el.scrollTop !== maxScrollTop
|
|
3267
|
+
? ScrollOnHoverDirection.BOTTOM
|
|
3268
|
+
: null;
|
|
3269
|
+
if (direction) {
|
|
3270
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_timeout, setTimeout(() => {
|
|
3271
|
+
el.scrollOnHover.active = true;
|
|
3272
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
3273
|
+
dom$d.ketchup.scrollOnHover.run(el, maxScrollTop, percBottom, percTop, direction);
|
|
3200
3274
|
}), "f");
|
|
3201
3275
|
}, this.delay), "f");
|
|
3202
3276
|
}
|
|
@@ -3225,25 +3299,51 @@ class KupScrollOnHover {
|
|
|
3225
3299
|
* The actual recursive scroll function.
|
|
3226
3300
|
* @param {KupScrollOnHoverElement} el - The scrolled element.
|
|
3227
3301
|
* @param {number} maxScrollLeft - Left coordinates to which the recursiveness must be stopped.
|
|
3228
|
-
* @param {number}
|
|
3229
|
-
* @param {number}
|
|
3302
|
+
* @param {number} percForward - Range of the right (or bottom) area.
|
|
3303
|
+
* @param {number} percBack - Range of the left (or top) scrollable area.
|
|
3230
3304
|
* @param {ScrollOnHoverDirection} direction - Direction of the scroll.
|
|
3231
3305
|
*/
|
|
3232
|
-
run(el, maxScrollLeft,
|
|
3306
|
+
run(el, maxScrollLeft, percForward, percBack, direction) {
|
|
3233
3307
|
if (!el.scrollOnHover.active) {
|
|
3234
3308
|
this.stop(el);
|
|
3235
3309
|
return;
|
|
3236
3310
|
}
|
|
3237
|
-
|
|
3238
|
-
|
|
3311
|
+
let offset = 0;
|
|
3312
|
+
switch (direction) {
|
|
3313
|
+
case ScrollOnHoverDirection.BOTTOM:
|
|
3314
|
+
case ScrollOnHoverDirection.TOP: {
|
|
3315
|
+
offset = el.scrollOnHover.y - el.scrollOnHover.rect.top;
|
|
3316
|
+
if (offset > percBack && offset < percForward) {
|
|
3317
|
+
this.stop(el);
|
|
3318
|
+
return;
|
|
3319
|
+
}
|
|
3320
|
+
break;
|
|
3321
|
+
}
|
|
3322
|
+
case ScrollOnHoverDirection.LEFT:
|
|
3323
|
+
case ScrollOnHoverDirection.RIGHT: {
|
|
3324
|
+
offset = el.scrollOnHover.x - el.scrollOnHover.rect.left;
|
|
3325
|
+
if (offset > percBack && offset < percForward) {
|
|
3326
|
+
this.stop(el);
|
|
3327
|
+
return;
|
|
3328
|
+
}
|
|
3329
|
+
break;
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
if (direction === ScrollOnHoverDirection.RIGHT &&
|
|
3333
|
+
percForward > offset) {
|
|
3334
|
+
this.stop(el);
|
|
3335
|
+
return;
|
|
3336
|
+
}
|
|
3337
|
+
if (direction === ScrollOnHoverDirection.LEFT && percBack < offset) {
|
|
3239
3338
|
this.stop(el);
|
|
3240
3339
|
return;
|
|
3241
3340
|
}
|
|
3242
|
-
if (direction === ScrollOnHoverDirection.
|
|
3341
|
+
if (direction === ScrollOnHoverDirection.TOP && percBack < offset) {
|
|
3243
3342
|
this.stop(el);
|
|
3244
3343
|
return;
|
|
3245
3344
|
}
|
|
3246
|
-
if (direction === ScrollOnHoverDirection.
|
|
3345
|
+
if (direction === ScrollOnHoverDirection.BOTTOM &&
|
|
3346
|
+
percForward > offset) {
|
|
3247
3347
|
this.stop(el);
|
|
3248
3348
|
return;
|
|
3249
3349
|
}
|
|
@@ -3251,27 +3351,49 @@ class KupScrollOnHover {
|
|
|
3251
3351
|
this.updateChildren(el);
|
|
3252
3352
|
}
|
|
3253
3353
|
let arrow;
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3354
|
+
switch (direction) {
|
|
3355
|
+
case ScrollOnHoverDirection.BOTTOM: {
|
|
3356
|
+
arrow = [];
|
|
3357
|
+
if (el.scrollTop === maxScrollLeft) {
|
|
3358
|
+
this.stop(el);
|
|
3359
|
+
return;
|
|
3360
|
+
}
|
|
3361
|
+
el.scrollTop += this.step;
|
|
3362
|
+
break;
|
|
3259
3363
|
}
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3364
|
+
case ScrollOnHoverDirection.LEFT: {
|
|
3365
|
+
arrow = __classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f");
|
|
3366
|
+
if (el.scrollLeft === 0) {
|
|
3367
|
+
this.stop(el);
|
|
3368
|
+
return;
|
|
3369
|
+
}
|
|
3370
|
+
el.scrollLeft -= this.step;
|
|
3371
|
+
break;
|
|
3372
|
+
}
|
|
3373
|
+
case ScrollOnHoverDirection.RIGHT: {
|
|
3374
|
+
arrow = __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f");
|
|
3375
|
+
if (el.scrollLeft === maxScrollLeft) {
|
|
3376
|
+
this.stop(el);
|
|
3377
|
+
return;
|
|
3378
|
+
}
|
|
3379
|
+
el.scrollLeft += this.step;
|
|
3380
|
+
break;
|
|
3381
|
+
}
|
|
3382
|
+
case ScrollOnHoverDirection.TOP: {
|
|
3383
|
+
arrow = [];
|
|
3384
|
+
if (el.scrollTop === 0) {
|
|
3385
|
+
this.stop(el);
|
|
3386
|
+
return;
|
|
3387
|
+
}
|
|
3388
|
+
el.scrollTop -= this.step;
|
|
3389
|
+
break;
|
|
3267
3390
|
}
|
|
3268
|
-
el.scrollLeft += this.step;
|
|
3269
3391
|
}
|
|
3270
3392
|
for (let i = 0; i < arrow.length; i++) {
|
|
3271
3393
|
arrow[i].classList.add('kup-animated');
|
|
3272
3394
|
}
|
|
3273
3395
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
3274
|
-
dom$
|
|
3396
|
+
dom$d.ketchup.scrollOnHover.run(el, maxScrollLeft, percForward, percBack, direction);
|
|
3275
3397
|
}), "f");
|
|
3276
3398
|
}
|
|
3277
3399
|
/**
|
|
@@ -3284,7 +3406,27 @@ class KupScrollOnHover {
|
|
|
3284
3406
|
}
|
|
3285
3407
|
}
|
|
3286
3408
|
}
|
|
3287
|
-
_KupScrollOnHover_arrowsContainer = new WeakMap(), _KupScrollOnHover_leftArrows = new WeakMap(), _KupScrollOnHover_rightArrows = new WeakMap(), _KupScrollOnHover_scrollEvent = new WeakMap(), _KupScrollOnHover_mousemoveEvent = new WeakMap(), _KupScrollOnHover_mouseleaveEvent = new WeakMap(), _KupScrollOnHover_rAF = new WeakMap(), _KupScrollOnHover_timeout = new WeakMap()
|
|
3409
|
+
_KupScrollOnHover_arrowsContainer = new WeakMap(), _KupScrollOnHover_leftArrows = new WeakMap(), _KupScrollOnHover_rightArrows = new WeakMap(), _KupScrollOnHover_scrollEvent = new WeakMap(), _KupScrollOnHover_mousemoveEvent = new WeakMap(), _KupScrollOnHover_mouseleaveEvent = new WeakMap(), _KupScrollOnHover_rAF = new WeakMap(), _KupScrollOnHover_timeout = new WeakMap(), _KupScrollOnHover_instances = new WeakSet(), _KupScrollOnHover_initArrows = function _KupScrollOnHover_initArrows() {
|
|
3410
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_arrowsContainer, document.createElement('div'), "f");
|
|
3411
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_leftArrows, [], "f");
|
|
3412
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_rightArrows, [], "f");
|
|
3413
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f").id = 'kup-scrolling-arrows';
|
|
3414
|
+
for (let index = 1; index < 4; index++) {
|
|
3415
|
+
const arrow = document.createElement('div');
|
|
3416
|
+
arrow.setAttribute('class', 'kup-left-scrolling-arrow kup-arrow-' + index);
|
|
3417
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f").push(arrow);
|
|
3418
|
+
}
|
|
3419
|
+
for (let index = 1; index < 4; index++) {
|
|
3420
|
+
const arrow = document.createElement('div');
|
|
3421
|
+
arrow.setAttribute('class', 'kup-right-scrolling-arrow kup-arrow-' + index);
|
|
3422
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f").push(arrow);
|
|
3423
|
+
}
|
|
3424
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f").append(__classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f")[2], __classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f")[1], __classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f")[0], __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f")[0], __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f")[1], __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f")[2]);
|
|
3425
|
+
this.container = document.createElement('div');
|
|
3426
|
+
this.container.setAttribute('kup-scroll-on-hover', '');
|
|
3427
|
+
this.container.appendChild(__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f"));
|
|
3428
|
+
document.body.appendChild(this.container);
|
|
3429
|
+
};
|
|
3288
3430
|
|
|
3289
3431
|
const bubbles = {
|
|
3290
3432
|
cssVariables: {
|
|
@@ -3783,6 +3925,7 @@ const print = {
|
|
|
3783
3925
|
"KUP-BUTTON": ":host(:not(.printable)) {\ndisplay: none;\n}\n\n",
|
|
3784
3926
|
"KUP-CARD": "",
|
|
3785
3927
|
"KUP-DATA-TABLE": "#kup-component sticky-header {\ndisplay: none;\n}\n\n#kup-component kup-paginator {\ndisplay: none;\n}\n\n:host(.cross-selection) #kup-component table tr.selected td.selected, \n#kup-component table td.selected, #kup-component tr.selected td {\nbackground-color: inherit;\nbackground-image: none;\n}\n\n#kup-component table,\n#kup-component .below-wrapper {\noverflow: hidden !important;\n}\n\n:host(.cross-selection) #kup-component tr.selected td:first-of-type,\n:host(.cross-selection) #kup-component th.selected { \nbox-shadow: none !important;\n}\n\n:host(.cross-selection) #kup-component table td.selected,\n:host(.cross-selection) #kup-component table tr.selected td {\nbackground-color: inherit;\n}\n\n:host(.cross-selection) #kup-component table tr.selected td.fixed-column.selected,\n:host(.cross-selection) #kup-component table td.selected.fixed-column, \n:host(.cross-selection) #kup-component table td.selected.fixed-row,\n:host(.cross-selection) #kup-component table tr.selected td.fixed-column, \n:host(.cross-selection) #kup-component table tr.selected td.fixed-row {\nbackground-color: inherit;\nbackground-image: none;\n}\n\n",
|
|
3928
|
+
"KUP-FAMILY-TREE": "#kup-component .family-tree__item__expand {\ndisplay: none;\n}\n\n",
|
|
3786
3929
|
"KUP-PROGRESS-BAR": "#kup-component .progress-bar {\nbackground: #e7e7e7;\n}\n\n#kup-component .progress-bar-percentage span {\ntext-shadow: 0px 0px 0px hsl(0deg 0% 100%);\n}\n\n",
|
|
3787
3930
|
"KUP-TREE": "#kup-component .wrapper {\noverflow: hidden;\n}\n\n#kup-component tr.mdc-ripple-surface::before, \n#kup-component tr.mdc-ripple-surface::after,\n#kup-component td.mdc-ripple-surface::before, \n#kup-component td.mdc-ripple-surface::after,\n#kup-component .kup-tree__node--selected:not(.kup-tree__node--disabled) td {\nbackground-color: var(--kup-background-color);\n}"
|
|
3788
3931
|
},
|
|
@@ -4168,7 +4311,7 @@ const kupThemeComponentCss = "[kup-dialog]{animation:fade-in .25s ease-out;backg
|
|
|
4168
4311
|
|
|
4169
4312
|
const fButtonCss = ".f-button{--kup_button_border_radius:var(--kup-button-border-radius, 4px);--kup_button_disabled_color:var( --kup-button-disabled-color, var(--kup-disabled-color) );--kup_button_font_family:var( --kup-button-font-family, var(--kup-font-family) );--kup_button_font_size:var(--kup-button-font-size, var(--kup-font-size));--kup_button_font_weight:var(--kup-button-font-weight, 400);--kup_button_height:var(--kup-button-height, 3em);--kup_button_padding:var(--kup-button-padding, 0 1.25em);--kup_button_primary_color:var( --kup-button-primary-color, var(--kup-primary-color) );--kup_button_primary_color_h:var( --kup-button-primary-color-h, var(--kup-primary-color-h) );--kup_button_primary_color_s:var( --kup-button-primary-color-s, var(--kup-primary-color-s) );--kup_button_primary_color_l:var( --kup-button-primary-color-l, var(--kup-primary-color-l) );--kup_button_primary_color_rgb:var( --kup-button-primary-color-rgb, var(--kup-primary-color-rgb) );--kup_button_text_on_primary_color:var( --kup-button-text-on-primary-color, var(--kup-text-on-primary-color) );--kup-spinner-color:var(--kup_button_primary_color);font-size:var(--kup_button_font_size)}.f-button .button{-moz-osx-font-smoothing:grayscale;-webkit-appearance:none;-webkit-font-smoothing:antialiased;align-items:center;background-color:rgba(0,0,0,0);border:none;border-radius:var(--kup_button_border_radius);box-sizing:border-box;color:var(--kup_button_primary_color);cursor:pointer;display:inline-flex;font-family:var(--kup_button_font_family);font-size:.775em;font-weight:var(--kup_button_font_weight);height:var(--kup_button_height);justify-content:center;letter-spacing:0.0892857143em;line-height:inherit;min-width:64px;outline:none;overflow:visible;padding:var(--kup_button_padding);position:relative;text-decoration:none;text-transform:uppercase;transition:background-color 80ms linear,box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);user-select:none;vertical-align:middle}.f-button .button:hover{background-color:rgba(var(--kup_button_primary_color_rgb), 0.125)}.f-button .button:focus{background-color:rgba(var(--kup_button_primary_color_rgb), 0.175)}.f-button .button .button__icon{margin-left:-0.25em;margin-right:.75em}.f-button .button .button__label+.button__icon{margin-left:.75em;margin-right:-0.25em}.f-button .button.button--floating,.f-button .button.button--raised{--kup-spinner-color:var(--kup_button_text_on_primary_color)}.f-button .button.button--floating:not(.button--disabled),.f-button .button.button--raised:not(.button--disabled){--kup-spinner-border-color:hsl( var(--kup_button_primary_color_h), calc(var(--kup_button_primary_color_s) * 0.75), calc(var(--kup_button_primary_color_l) * 0.85) );background-color:var(--kup_button_primary_color);color:var(--kup_button_text_on_primary_color)}.f-button .button.button--floating:hover,.f-button .button.button--raised:hover{background-color:hsl(var(--kup_button_primary_color_h), calc(var(--kup_button_primary_color_s) * 0.93), calc(var(--kup_button_primary_color_l) * 1.07))}.f-button .button.button--floating:focus,.f-button .button.button--raised:focus{background-color:hsl(var(--kup_button_primary_color_h), calc(var(--kup_button_primary_color_s) * 0.88), calc(var(--kup_button_primary_color_l) * 1.12))}.f-button .button.button--floating.button--disabled,.f-button .button.button--raised.button--disabled{background-color:var(--kup-disabled-background-color);box-shadow:none}.f-button .button.button--floating{border-radius:24px;box-shadow:0 .215em .35em -1px rgba(var(--kup-text-color-rgb), 0.2),0 .43em .71em 0 rgba(var(--kup-text-color-rgb), 0.14),0 .07em 1.285em 0 rgba(var(--kup-text-color-rgb), 0.12);font-weight:500;font-size:1em;height:3.4em;width:auto;padding:0 1.5em}.f-button .button.button--floating.button--no-label{border-radius:50%;height:4em;padding:0;width:4em}.f-button .button.button--floating:hover,.f-button .button.button--floating:focus{box-shadow:0 5px 5px -3px rgba(var(--kup-text-color-rgb), 0.2),0 8px 10px 1px rgba(var(--kup-text-color-rgb), 0.14),0 3px 14px 2px rgba(var(--kup-text-color-rgb), 0.12)}.f-button .button.button--floating:active{box-shadow:0 7px 8px -4px rgba(var(--kup-text-color-rgb), 0.2),0 12px 17px 2px rgba(var(--kup-text-color-rgb), 0.14),0 5px 22px 4px rgba(var(--kup-text-color-rgb), 0.12)}.f-button .button.button--raised{box-shadow:0 3px 1px -2px rgba(var(--kup-text-color-rgb), 0.2),0 2px 2px 0 rgba(var(--kup-text-color-rgb), 0.14),0 1px 5px 0 rgba(var(--kup-text-color-rgb), 0.12)}.f-button .button.button--raised:focus,.f-button .button.button--raised:hover{box-shadow:0 2px 4px -1px rgba(var(--kup-text-color-rgb), 0.2),0 4px 5px 0 rgba(var(--kup-text-color-rgb), 0.14),0 1px 10px 0 rgba(var(--kup-text-color-rgb), 0.12)}.f-button .button.button--raised:active{box-shadow:0 5px 5px -3px rgba(var(--kup-text-color-rgb), 0.2),0 8px 10px 1px rgba(var(--kup-text-color-rgb), 0.14),0 3px 14px 2px rgba(var(--kup-text-color-rgb), 0.12)}.f-button .button.button--outlined{border-width:1px;border-style:solid}.f-button .button.button--outlined:not(.button--disabled){border-color:var(--kup_button_primary_color);background-color:rgba(0,0,0,0);color:var(--kup_button_primary_color)}.f-button .button.button--outlined:hover{background-color:rgba(var(--kup_button_primary_color_rgb), 0.125)}.f-button .button.button--outlined:focus{background-color:rgba(var(--kup_button_primary_color_rgb), 0.175)}.f-button .button.button--outlined.button--disabled{opacity:.75;border-color:var(--kup_button_disabled_color)}.f-button .button.button--no-label{min-width:unset;padding:0 .5em}.f-button .button.button--no-label .button__icon{margin:0}.f-button .button.button--disabled{color:var(--kup_button_disabled_color);cursor:auto;opacity:.75;pointer-events:none}.f-button .button .button__spinner-container{width:100%;height:var(--kup_button_spinner_height);left:0;position:absolute}.f-button .icon-button{background-color:rgba(0,0,0,0);display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;font-size:var(--kup_button_font_size);text-decoration:none;cursor:pointer;user-select:none;padding:.75em;border-radius:50%}.f-button .icon-button:hover,.f-button .icon-button:focus{background-color:rgba(var(--kup_button_primary_color_rgb), 0.125)}.f-button .icon-button .icon-button__icon{display:flex;margin:auto}.f-button .icon-button .icon-button__icon.icon-button__icon--on{display:none}.f-button .icon-button.button--disabled{opacity:.75;pointer-events:none}.f-button .icon-button .icon-button__spinner-container{width:var(--kup_button_spinner_width);height:var(--kup_button_spinner_height)}.f-button .button--with-spinner{opacity:.8;pointer-events:none}.f-button .content--hidden{visibility:hidden}.f-button.kup-full-height{height:100%}.f-button.kup-full-height .button{height:100%}.f-button.kup-full-width{width:100%}.f-button.kup-full-width .button{width:100%}.f-button.kup-large button{font-size:1.25em}.f-button.kup-shaped .button{border-radius:18px}.f-button.kup-shaped .button.button--floating{border-radius:50% 0}.f-button.kup-slim button{font-size:.675em}.f-button.kup-pulsating .icon-button--on:after{content:\"\";animation:pulsating 1250ms infinite;position:absolute;height:2px;width:2px;top:calc(50% - 1px);left:calc(50% - 1px);border-radius:50%}.f-button.kup-danger{--kup-button-primary-color:var(--kup-danger-color);--kup-button-primary-color-h:var(--kup-danger-color-h);--kup-button-primary-color-s:var(--kup-danger-color-s);--kup-button-primary-color-l:var(--kup-danger-color-l);--kup-button-primary-color-rgb:var(--kup-danger-color-rgb);--kup-button-text-on-primary-color:white}.f-button.kup-info{--kup-button-primary-color:var(--kup-info-color);--kup-button-primary-color-h:var(--kup-info-color-h);--kup-button-primary-color-s:var(--kup-info-color-s);--kup-button-primary-color-l:var(--kup-info-color-l);--kup-button-primary-color-rgb:var(--kup-info-color-rgb);--kup-button-text-on-primary-color:white}.f-button.kup-secondary{--kup-button-primary-color:var(--kup-secondary-color);--kup-button-primary-color-h:var(--kup-secondary-color-h);--kup-button-primary-color-s:var(--kup-secondary-color-s);--kup-button-primary-color-l:var(--kup-secondary-color-l);--kup-button-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-button-text-on-primary-color:var(--kup-text-on-secondary-color)}.f-button.kup-success{--kup-button-primary-color:var(--kup-success-color);--kup-button-primary-color-h:var(--kup-success-color-h);--kup-button-primary-color-s:var(--kup-success-color-s);--kup-button-primary-color-l:var(--kup-success-color-l);--kup-button-primary-color-rgb:var(--kup-success-color-rgb);--kup-button-text-on-primary-color:white}.f-button.kup-warning{--kup-button-primary-color:var(--kup-warning-color);--kup-button-primary-color-h:var(--kup-warning-color-h);--kup-button-primary-color-s:var(--kup-warning-color-s);--kup-button-primary-color-l:var(--kup-warning-color-l);--kup-button-primary-color-rgb:var(--kup-warning-color-rgb);--kup-button-text-on-primary-color:white}@keyframes pulsating{0%{transform:scale(2);box-shadow:0 0 0 0 rgba(var(--kup_button_primary_color_rgb), 0.7)}70%{transform:scale(2.75);box-shadow:0 0 0 10px rgba(var(--kup_button_primary_color_rgb), 0)}100%{transform:scale(2);box-shadow:0 0 0 0 rgba(var(--kup_button_primary_color_rgb), 0)}}";
|
|
4170
4313
|
|
|
4171
|
-
const fCellCss = ".f-cell{--kup_cell_background:var(--kup-cell-background);--kup_cell_font_family:var(--kup-cell-font-family);--kup_cell_font_family_monospace:var( --kup-cell-font-family-monospace, var(--kup-font-family-monospace) );--kup_cell_font_size:var(--kup-cell-font-size);--kup_cell_text_color:var(--kup-cell-text-color);background:var(--kup_cell_background);box-sizing:border-box;color:var(--kup_cell_text_color);display:flex;font-family:var(--kup_cell_font_family);font-size:var(--kup_cell_font_size);min-height:100%;width:100%;word-break:break-all;word-wrap:break-word}.f-cell .f-cell__content{align-items:center;display:flex;width:100%}.f-cell .f-cell__content img,.f-cell .f-cell__content .f-image{margin:0}.f-cell .f-cell__content .cell-info{padding:0 .5em 0 .25em}.f-cell .f-cell__content .obj-icon{padding:0 .5em 0 0}.f-cell .f-cell__text{overflow:hidden;text-overflow:ellipsis}.f-cell.bar-cell .f-image--wrapper{height:100%;margin:auto;min-height:18px;overflow:hidden;position:relative;transition:color .2s ease;width:100%}.f-cell.editor-cell .f-cell__content{margin:0;overflow:hidden}.f-cell.editor-cell .f-cell__content>*{max-width:100%;word-break:normal}.f-cell.icon-cell .f-cell__content{min-height:18px}.f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family_monospace);font-family:var(--kup_cell_font_family_monospace)}.f-cell .mdc-text-field{padding:0px}.f-cell kup-checkbox,.f-cell kup-image{display:flex}.f-cell kup-button{display:inline-block}.f-cell kup-button-list{display:flex;margin:auto}.f-cell kup-progress-bar{display:block}.f-cell.clickable{cursor:pointer}.f-cell.monospace{--kup-textfield-font-family:var(--kup_cell_font_family_monospace);font-family:var(--kup-font-family-monospace)}.f-cell.display-on-hover{opacity:0;transition:opacity .25s}.f-cell.display-on-hover:hover{opacity:1}.f-cell.expand-on-hover .f-cell__content{transition:transform 125ms}.f-cell.expand-on-hover:hover .f-cell__content{transform:scale(1.25)}.f-cell.obj{cursor:var(--kup-obj-cursor)}.f-cell.reduce-on-hover .f-cell__content{transition:transform 125ms}.f-cell.reduce-on-hover:hover .f-cell__content{transform:scale(0.75)}.f-cell.shaped{border-radius:4px}.f-cell.strong-text{--kup-textfield-font-weight:600;font-weight:600}.f-cell.underlined{text-decoration:underline}.f-cell.primary-text{--kup-textfield-color:var(--kup-primary-color) !important;color:var(--kup-primary-color) !important}.f-cell.secondary-text{--kup-textfield-color:var(--kup-secondary-color) !important;color:var(--kup-secondary-color) !important}.f-cell.success-text{--kup-textfield-color:var(--kup-success-color) !important;color:var(--kup-success-color) !important}.f-cell.warning-text{--kup-textfield-color:var(--kup-warning-color) !important;color:var(--kup-warning-color) !important}.f-cell.danger-text{--kup-textfield-color:var(--kup-danger-color) !important;color:var(--kup-danger-color) !important}.f-cell.purple-text{--kup-textfield-color:#8e15bf !important;color:#8e15bf !important}.f-cell.success-bg{background:var(--kup-success-color) !important;color:#fff !important}.f-cell.warning-bg{background:var(--kup-warning-color) !important}.f-cell.danger-bg{background:var(--kup-danger-color) !important;color:#fff !important}.f-cell.teal-bg{background:#00b4bc !important;color:#fff !important}.f-cell.orange-bg{background:#f59729 !important;color:#fff !important}.f-cell.green-bg{background:#00be67 !important;color:#fff !important}.f-cell.grey-bg{background:#8d8d8d !important;color:#fff !important}.f-cell.purple-bg{background:#b88acc !important;color:#fff !important}.f-cell.top-right-indicator{position:relative}.f-cell.top-right-indicator:after{content:\"\";border-width:0 0 .5em .5em;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--kup-secondary-color) rgba(0,0,0,0);border-style:solid;transform:rotate(270deg);position:absolute;right:0;top:0}.f-cell.link .f-cell__content{color:#00e;cursor:pointer;text-decoration:underline}.f-cell.c-vertical-text .f-cell__content{width:auto;margin:auto;min-height:16px;min-width:16px;text-align:center;writing-mode:vertical-lr}.f-cell.c-right-aligned:not(.c-centered){--kup-textfield-text-align:right}.f-cell.c-right-aligned:not(.c-centered) .f-cell__content{justify-content:flex-end;margin:0;margin-left:auto;text-align:right}.f-cell.c-right-aligned:not(.c-centered) .f-cell__content img,.f-cell.c-right-aligned:not(.c-centered) .f-cell__content .f-image{margin-left:auto;margin-right:0}.f-cell.c-centered{--kup-textfield-text-align:center;justify-content:center}.f-cell.c-centered .f-cell__content{justify-content:center}.f-cell.c-centered .f-cell__content img,.f-cell.c-centered .f-cell__content .f-image{margin:auto}.f-cell.c-fitted .f-cell__content{max-width:max-content}.f-cell.c-round .f-cell__content{border-radius:50px}.f-cell.c-shaped .f-cell__content{border-radius:4px}.f-cell.c-padded .f-cell__content{padding:1em}.f-cell.c-hor-padded .f-cell__content{box-sizing:border-box;padding-left:.5em;padding-right:.5em}.f-cell.c-ver-padded .f-cell__content{box-sizing:border-box;padding-top:.5em;padding-bottom:.5em}.f-cell.c-success-bg .f-cell__content{background:var(--kup-success-color) !important;color:#fff !important}.f-cell.c-warning-bg .f-cell__content{background:var(--kup-warning-color) !important}.f-cell.c-danger-bg .f-cell__content{background:var(--kup-danger-color) !important;color:#fff !important}.f-cell.c-teal-bg .f-cell__content{background:#00b4bc !important;color:#fff !important}.f-cell.c-orange-bg .f-cell__content{background:#f59729 !important;color:#fff !important}.f-cell.c-green-bg .f-cell__content{background:#00be67 !important;color:#fff !important}.f-cell.c-grey-bg .f-cell__content{background:#8d8d8d !important;color:#fff !important}.f-cell.c-purple-bg .f-cell__content{background:#b88acc !important;color:#fff !important}.f-cell.dense{--kup-textfield-fullwidth-height:28px;--kup-textfield-fullwidth-padding:0px;--kup-checkbox-padding:0px;--kup-chip-margin:0 4px;padding:.2em .3125em}.f-cell.medium{--kup-textfield-fullwidth-height:36px;--kup-textfield-fullwidth-padding:0px;padding:.5em .3125em}.f-cell.wide{--kup-textfield-fullwidth-height:50px;--kup-textfield-fullwidth-padding:0px;padding:1em .3125em}";
|
|
4314
|
+
const fCellCss = ".f-cell{--kup_cell_background:var(--kup-cell-background);--kup_cell_font_family:var(--kup-cell-font-family);--kup_cell_font_family_monospace:var( --kup-cell-font-family-monospace, var(--kup-font-family-monospace) );--kup_cell_font_size:var(--kup-cell-font-size);--kup_cell_text_color:var(--kup-cell-text-color);background:var(--kup_cell_background);box-sizing:border-box;color:var(--kup_cell_text_color);display:flex;font-family:var(--kup_cell_font_family);font-size:var(--kup_cell_font_size);min-height:100%;width:100%;word-break:break-all;word-wrap:break-word}.f-cell .f-cell__content{align-items:center;display:flex;width:100%}.f-cell .f-cell__content img,.f-cell .f-cell__content .f-image{margin:0}.f-cell .f-cell__content .cell-info{padding:0 .5em 0 .25em}.f-cell .f-cell__content .obj-icon{padding:0 .5em 0 0}.f-cell .f-cell__text{overflow:hidden;text-overflow:ellipsis}.f-cell.bar-cell .f-image--wrapper{height:100%;margin:auto;min-height:18px;overflow:hidden;position:relative;transition:color .2s ease;width:100%}.f-cell.editor-cell .f-cell__content{margin:0;overflow:hidden}.f-cell.editor-cell .f-cell__content>*{max-width:100%;word-break:normal}.f-cell.icon-cell .f-cell__content{min-height:18px}.f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family_monospace);font-family:var(--kup_cell_font_family_monospace)}.f-cell.switch-cell{min-height:48px}.f-cell .mdc-text-field.mdc-text-field--fullwidth{padding:0px}.f-cell kup-checkbox,.f-cell kup-image{display:flex}.f-cell kup-button{display:inline-block}.f-cell kup-button-list{display:flex;margin:auto}.f-cell kup-progress-bar{display:block}.f-cell.clickable{cursor:pointer}.f-cell.monospace{--kup-textfield-font-family:var(--kup_cell_font_family_monospace);font-family:var(--kup-font-family-monospace)}.f-cell.display-on-hover{opacity:0;transition:opacity .25s}.f-cell.display-on-hover:hover{opacity:1}.f-cell.expand-on-hover .f-cell__content{transition:transform 125ms}.f-cell.expand-on-hover:hover .f-cell__content{transform:scale(1.25)}.f-cell.obj{cursor:var(--kup-obj-cursor)}.f-cell.reduce-on-hover .f-cell__content{transition:transform 125ms}.f-cell.reduce-on-hover:hover .f-cell__content{transform:scale(0.75)}.f-cell.shaped{border-radius:4px}.f-cell.strong-text{--kup-textfield-font-weight:600;font-weight:600}.f-cell.underlined{text-decoration:underline}.f-cell.primary-text{--kup-textfield-color:var(--kup-primary-color) !important;color:var(--kup-primary-color) !important}.f-cell.secondary-text{--kup-textfield-color:var(--kup-secondary-color) !important;color:var(--kup-secondary-color) !important}.f-cell.success-text{--kup-textfield-color:var(--kup-success-color) !important;color:var(--kup-success-color) !important}.f-cell.warning-text{--kup-textfield-color:var(--kup-warning-color) !important;color:var(--kup-warning-color) !important}.f-cell.danger-text{--kup-textfield-color:var(--kup-danger-color) !important;color:var(--kup-danger-color) !important}.f-cell.purple-text{--kup-textfield-color:#8e15bf !important;color:#8e15bf !important}.f-cell.success-bg{background:var(--kup-success-color) !important;color:#fff !important}.f-cell.warning-bg{background:var(--kup-warning-color) !important}.f-cell.danger-bg{background:var(--kup-danger-color) !important;color:#fff !important}.f-cell.teal-bg{background:#00b4bc !important;color:#fff !important}.f-cell.orange-bg{background:#f59729 !important;color:#fff !important}.f-cell.green-bg{background:#00be67 !important;color:#fff !important}.f-cell.grey-bg{background:#8d8d8d !important;color:#fff !important}.f-cell.purple-bg{background:#b88acc !important;color:#fff !important}.f-cell.top-right-indicator{position:relative}.f-cell.top-right-indicator:after{content:\"\";border-width:0 0 .5em .5em;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--kup-secondary-color) rgba(0,0,0,0);border-style:solid;transform:rotate(270deg);position:absolute;right:0;top:0}.f-cell.link .f-cell__content{color:#00e;cursor:pointer;text-decoration:underline}.f-cell.c-vertical-text .f-cell__content{width:auto;margin:auto;min-height:16px;min-width:16px;text-align:center;writing-mode:vertical-lr}.f-cell.c-right-aligned:not(.c-centered){--kup-textfield-text-align:right}.f-cell.c-right-aligned:not(.c-centered) .f-cell__content{justify-content:flex-end;margin:0;margin-left:auto;text-align:right}.f-cell.c-right-aligned:not(.c-centered) .f-cell__content img,.f-cell.c-right-aligned:not(.c-centered) .f-cell__content .f-image{margin-left:auto;margin-right:0}.f-cell.c-centered{--kup-textfield-text-align:center;justify-content:center}.f-cell.c-centered .f-cell__content{justify-content:center}.f-cell.c-centered .f-cell__content img,.f-cell.c-centered .f-cell__content .f-image{margin:auto}.f-cell.c-fitted .f-cell__content{max-width:max-content}.f-cell.c-round .f-cell__content{border-radius:50px}.f-cell.c-shaped .f-cell__content{border-radius:4px}.f-cell.c-padded .f-cell__content{padding:1em}.f-cell.c-hor-padded .f-cell__content{box-sizing:border-box;padding-left:.5em;padding-right:.5em}.f-cell.c-ver-padded .f-cell__content{box-sizing:border-box;padding-top:.5em;padding-bottom:.5em}.f-cell.c-success-bg .f-cell__content{background:var(--kup-success-color) !important;color:#fff !important}.f-cell.c-warning-bg .f-cell__content{background:var(--kup-warning-color) !important}.f-cell.c-danger-bg .f-cell__content{background:var(--kup-danger-color) !important;color:#fff !important}.f-cell.c-teal-bg .f-cell__content{background:#00b4bc !important;color:#fff !important}.f-cell.c-orange-bg .f-cell__content{background:#f59729 !important;color:#fff !important}.f-cell.c-green-bg .f-cell__content{background:#00be67 !important;color:#fff !important}.f-cell.c-grey-bg .f-cell__content{background:#8d8d8d !important;color:#fff !important}.f-cell.c-purple-bg .f-cell__content{background:#b88acc !important;color:#fff !important}.f-cell.dense{--kup-textfield-fullwidth-height:28px;--kup-textfield-fullwidth-padding:0px;--kup-checkbox-padding:0px;--kup-chip-margin:0 4px;padding:.2em .3125em}.f-cell.medium{--kup-textfield-fullwidth-height:36px;--kup-textfield-fullwidth-padding:0px;padding:.5em .3125em}.f-cell.wide{--kup-textfield-fullwidth-height:50px;--kup-textfield-fullwidth-padding:0px;padding:1em .3125em}";
|
|
4172
4315
|
|
|
4173
4316
|
const fCheckboxCss = ".f-checkbox{--kup_checkbox_font_family:var( --kup-checkbox-font-family, var(--kup-font-family) );--kup_checkbox_font_size:var(--kup-checkbox-font-size, var(--kup-font-size));--kup_checkbox_font_weight:var(--kup-checkbox-font-weight, 400);--kup_checkbox_disabled_checkmark_color:var( --kup-checkbox-disabled-checkmark-color, var(--kup-background-color) );--kup_checkbox_padding:var(--kup-checkbox-padding, 11px);--kup_checkbox_primary_color:var( --kup-checkbox-primary-color, var(--kup-primary-color) );--kup_checkbox_primary_color_rgb:var( --kup-checkbox-primary-color-rgb, var(--kup-primary-color-rgb) );--kup_checkbox_text_color:var( --kup-checkbox-text-color, var(--kup-text-color) );--kup_checkbox_text_color_rgb:var( --kup-checkbox-text-color-rgb, var(--kup-text-color-rgb) );--kup_checkbox_text_on_primary_color:var( --kup-checkbox-text-on-primary-color, var(--kup-text-on-primary-color) );--kup_checkbox_text_on_primary_color_rgb:var( --kup-checkbox-text-on-primary-color-rgb, var(--kup-text-on-primary-color-rgb) );font-family:var(--kup_checkbox_font_family);font-size:var(--kup_checkbox_font_size)}.f-checkbox .form-field{color:var(--kup_checkbox_text_color);line-height:1.25em;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;letter-spacing:0.0178571429em;text-decoration:inherit;align-items:center;vertical-align:middle;display:inline-flex}.f-checkbox .form-field label{font-size:.875em;margin-left:0px;margin-right:auto;order:0}.f-checkbox .form-field.form-field--align-end label{margin-left:auto;margin-right:0px;order:-1}.f-checkbox .checkbox{border-radius:50%;display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;will-change:transform,opacity;z-index:0;padding:var(--kup_checkbox_padding);transition:background-color 125ms linear}.f-checkbox .checkbox:hover{background:rgba(var(--kup_checkbox_primary_color_rgb), 0.125)}.f-checkbox .checkbox .checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;top:0;left:0;right:0;height:40px;width:40px}.f-checkbox .checkbox .checkbox__native-control:checked~.checkbox__background .checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.f-checkbox .checkbox .checkbox__checkmark-path{stroke:var(--kup_checkbox_text_on_primary_color);stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke-width:3.12px;transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.f-checkbox .checkbox .checkbox__background{position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid rgba(var(--kup_checkbox_text_color_rgb), 0.5);border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.f-checkbox .checkbox .checkbox__background .checkbox__checkmark{color:var(--kup_checkbox_text_on_primary_color);position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.f-checkbox .checkbox .checkbox__background .checkbox__mixedmark{position:absolute;top:6px;left:-1px;color:var(--kup_checkbox_text_on_primary_color);width:100%;height:0;border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.f-checkbox .checkbox.checkbox--checked .checkbox__background{background-color:var(--kup_checkbox_primary_color);border-color:var(--kup_checkbox_primary_color);opacity:1}.f-checkbox .checkbox.checkbox--checked .checkbox__checkmark-path{stroke-dashoffset:0}.f-checkbox .checkbox.checkbox--indeterminate .checkbox__background{background-color:var(--kup_checkbox_primary_color);border-color:var(--kup_checkbox_primary_color)}.f-checkbox .checkbox.checkbox--indeterminate .checkbox__mixedmark{border-color:var(--kup_checkbox_text_on_primary_color);transform:scaleX(1) rotate(0deg);opacity:1}.f-checkbox .checkbox.checkbox--indeterminate .checkbox__checkmark-path{stroke-dashoffset:0}.f-checkbox .checkbox.checkbox--disabled{pointer-events:none}.f-checkbox .checkbox.checkbox--disabled+label{pointer-events:none}.f-checkbox .checkbox.checkbox--disabled .checkbox__background{background-color:rgba(0,0,0,0);border-color:rgba(var(--kup_checkbox_text_color_rgb), 0.325)}.f-checkbox .checkbox.checkbox--disabled.checkbox--checked .checkbox__background{background-color:rgba(var(--kup_checkbox_text_color_rgb), 0.325);border-color:rgba(0,0,0,0)}.f-checkbox .checkbox.checkbox--disabled.checkbox--checked .checkbox__checkmark{color:var(--kup_checkbox_disabled_checkmark_color)}.f-checkbox .checkbox.checkbox--disabled.checkbox--checked .checkbox__mixedmark{color:var(--kup_checkbox_disabled_checkmark_color)}.f-checkbox.kup-danger{--kup-checkbox-primary-color:var(--kup-danger-color);--kup-checkbox-primary-color-rgb:var(--kup-danger-color-rgb);--kup-checkbox-text-on-primary-color:white;--kup-checkbox-text-on-primary-color-rgb:255, 255, 255}.f-checkbox.kup-info{--kup-checkbox-primary-color:var(--kup-info-color);--kup-checkbox-primary-color-rgb:var(--kup-info-color-rgb);--kup-checkbox-text-on-primary-color:white;--kup-checkbox-text-on-primary-color-rgb:255, 255, 255}.f-checkbox.kup-secondary{--kup-checkbox-primary-color:var(--kup-secondary-color);--kup-checkbox-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-checkbox-text-on-primary-color:var(--kup-text-on-secondary-color);--kup-checkbox-text-on-primary-color-rgb:var( --kup-text-on-secondary-color-rgb )}.f-checkbox.kup-success{--kup-checkbox-primary-color:var(--kup-success-color);--kup-checkbox-primary-color-rgb:var(--kup-success-color-rgb);--kup-checkbox-text-on-primary-color:white;--kup-checkbox-text-on-primary-color-rgb:255, 255, 255}.f-checkbox.kup-warning{--kup-checkbox-primary-color:var(--kup-warning-color);--kup-checkbox-primary-color-rgb:var(--kup-warning-color-rgb);--kup-checkbox-text-on-primary-color:white;--kup-checkbox-text-on-primary-color-rgb:255, 255, 255}";
|
|
4174
4317
|
|
|
@@ -4205,12 +4348,13 @@ exports.KupTagNames = void 0;
|
|
|
4205
4348
|
KupTagNames["COMBOBOX"] = "KUP-COMBOBOX";
|
|
4206
4349
|
KupTagNames["DASH"] = "KUP-DASH";
|
|
4207
4350
|
KupTagNames["DASH_LIST"] = "KUP-DASH-LIST";
|
|
4351
|
+
KupTagNames["DASHBOARD"] = "KUP-DASHBOARD";
|
|
4208
4352
|
KupTagNames["DATA_TABLE"] = "KUP-DATA-TABLE";
|
|
4209
4353
|
KupTagNames["DATE_PICKER"] = "KUP-DATE-PICKER";
|
|
4210
4354
|
KupTagNames["DRAWER"] = "KUP-DRAWER";
|
|
4211
4355
|
KupTagNames["DROPDOWN_BUTTON"] = "KUP-DROPDOWN-BUTTON";
|
|
4212
|
-
KupTagNames["
|
|
4213
|
-
KupTagNames["
|
|
4356
|
+
KupTagNames["FAMILY_TREE"] = "KUP-FAMILY-TREE";
|
|
4357
|
+
KupTagNames["FORM"] = "KUP-FORM";
|
|
4214
4358
|
KupTagNames["GAUGE"] = "KUP-GAUGE";
|
|
4215
4359
|
KupTagNames["GRID"] = "KUP-GRID";
|
|
4216
4360
|
KupTagNames["IFRAME"] = "KUP-IFRAME";
|
|
@@ -4249,9 +4393,11 @@ const fButtonUsers = [
|
|
|
4249
4393
|
exports.KupTagNames.BOX,
|
|
4250
4394
|
exports.KupTagNames.CALENDAR,
|
|
4251
4395
|
exports.KupTagNames.CARD,
|
|
4396
|
+
exports.KupTagNames.DASHBOARD,
|
|
4252
4397
|
exports.KupTagNames.DATA_TABLE,
|
|
4253
4398
|
exports.KupTagNames.DROPDOWN_BUTTON,
|
|
4254
|
-
exports.KupTagNames.
|
|
4399
|
+
exports.KupTagNames.FAMILY_TREE,
|
|
4400
|
+
exports.KupTagNames.FORM,
|
|
4255
4401
|
exports.KupTagNames.IMAGE_LIST,
|
|
4256
4402
|
exports.KupTagNames.SNACKBAR,
|
|
4257
4403
|
];
|
|
@@ -4262,6 +4408,7 @@ const fCellUsers = [
|
|
|
4262
4408
|
exports.KupTagNames.BOX,
|
|
4263
4409
|
exports.KupTagNames.CELL,
|
|
4264
4410
|
exports.KupTagNames.DATA_TABLE,
|
|
4411
|
+
exports.KupTagNames.FORM,
|
|
4265
4412
|
exports.KupTagNames.TREE,
|
|
4266
4413
|
];
|
|
4267
4414
|
/**
|
|
@@ -4271,7 +4418,9 @@ const fCheckboxUsers = [
|
|
|
4271
4418
|
exports.KupTagNames.BOX,
|
|
4272
4419
|
exports.KupTagNames.CELL,
|
|
4273
4420
|
exports.KupTagNames.CHECKBOX,
|
|
4421
|
+
exports.KupTagNames.DASHBOARD,
|
|
4274
4422
|
exports.KupTagNames.DATA_TABLE,
|
|
4423
|
+
exports.KupTagNames.FORM,
|
|
4275
4424
|
exports.KupTagNames.LIST,
|
|
4276
4425
|
exports.KupTagNames.TREE,
|
|
4277
4426
|
];
|
|
@@ -4284,6 +4433,7 @@ const fChipUsers = [
|
|
|
4284
4433
|
exports.KupTagNames.CELL,
|
|
4285
4434
|
exports.KupTagNames.CHIP,
|
|
4286
4435
|
exports.KupTagNames.DATA_TABLE,
|
|
4436
|
+
exports.KupTagNames.FORM,
|
|
4287
4437
|
exports.KupTagNames.TREE,
|
|
4288
4438
|
];
|
|
4289
4439
|
/**
|
|
@@ -4299,9 +4449,11 @@ const fImageUsers = [
|
|
|
4299
4449
|
exports.KupTagNames.CARD,
|
|
4300
4450
|
exports.KupTagNames.CELL,
|
|
4301
4451
|
exports.KupTagNames.CHIP,
|
|
4452
|
+
exports.KupTagNames.DASHBOARD,
|
|
4302
4453
|
exports.KupTagNames.DATA_TABLE,
|
|
4303
4454
|
exports.KupTagNames.DROPDOWN_BUTTON,
|
|
4304
|
-
exports.KupTagNames.
|
|
4455
|
+
exports.KupTagNames.FAMILY_TREE,
|
|
4456
|
+
exports.KupTagNames.FORM,
|
|
4305
4457
|
exports.KupTagNames.IMAGE,
|
|
4306
4458
|
exports.KupTagNames.IMAGE_LIST,
|
|
4307
4459
|
exports.KupTagNames.LIST,
|
|
@@ -4317,7 +4469,14 @@ const fPaginatorUsers = [exports.KupTagNames.BOX, exports.KupTagNames.DATA_TABLE
|
|
|
4317
4469
|
/**
|
|
4318
4470
|
* Components using the FSwitch functional component.
|
|
4319
4471
|
*/
|
|
4320
|
-
const fSwitchUsers = [
|
|
4472
|
+
const fSwitchUsers = [
|
|
4473
|
+
exports.KupTagNames.BOX,
|
|
4474
|
+
exports.KupTagNames.CELL,
|
|
4475
|
+
exports.KupTagNames.DATA_TABLE,
|
|
4476
|
+
exports.KupTagNames.FORM,
|
|
4477
|
+
exports.KupTagNames.SWITCH,
|
|
4478
|
+
exports.KupTagNames.TREE,
|
|
4479
|
+
];
|
|
4321
4480
|
/**
|
|
4322
4481
|
* Components using the FTextField functional component.
|
|
4323
4482
|
*/
|
|
@@ -4327,8 +4486,10 @@ const fTextFieldUsers = [
|
|
|
4327
4486
|
exports.KupTagNames.CELL,
|
|
4328
4487
|
exports.KupTagNames.COLOR_PICKER,
|
|
4329
4488
|
exports.KupTagNames.COMBOBOX,
|
|
4489
|
+
exports.KupTagNames.DASHBOARD,
|
|
4330
4490
|
exports.KupTagNames.DATA_TABLE,
|
|
4331
4491
|
exports.KupTagNames.DATE_PICKER,
|
|
4492
|
+
exports.KupTagNames.FORM,
|
|
4332
4493
|
exports.KupTagNames.NUMERIC_PICKER,
|
|
4333
4494
|
exports.KupTagNames.TEXT_FIELD,
|
|
4334
4495
|
exports.KupTagNames.TIME_PICKER,
|
|
@@ -4393,7 +4554,7 @@ exports.KupThemeIconValues = void 0;
|
|
|
4393
4554
|
KupThemeIconValues["SEARCH"] = "--kup-search-icon";
|
|
4394
4555
|
})(exports.KupThemeIconValues || (exports.KupThemeIconValues = {}));
|
|
4395
4556
|
|
|
4396
|
-
const dom$
|
|
4557
|
+
const dom$c = document.documentElement;
|
|
4397
4558
|
/**
|
|
4398
4559
|
* Theme manager, handles everything about theming, customStyles and color utilities.
|
|
4399
4560
|
* @module KupTheme
|
|
@@ -4407,7 +4568,7 @@ class KupTheme {
|
|
|
4407
4568
|
this.list = list ? list : themes;
|
|
4408
4569
|
this.managedComponents = new Set();
|
|
4409
4570
|
this.name = name ? name : 'ketchup';
|
|
4410
|
-
this.styleTag = dom$
|
|
4571
|
+
this.styleTag = dom$c
|
|
4411
4572
|
.querySelector('head')
|
|
4412
4573
|
.appendChild(document.createElement('style'));
|
|
4413
4574
|
}
|
|
@@ -4494,9 +4655,9 @@ class KupTheme {
|
|
|
4494
4655
|
if (list) {
|
|
4495
4656
|
this.list = list;
|
|
4496
4657
|
}
|
|
4497
|
-
dom$
|
|
4658
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Setting theme to: ' + this.name + '.');
|
|
4498
4659
|
if (!this.list[this.name]) {
|
|
4499
|
-
dom$
|
|
4660
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Invalid theme name, falling back to default ("ketchup").');
|
|
4500
4661
|
this.name = 'ketchup';
|
|
4501
4662
|
}
|
|
4502
4663
|
this.cssVars = {};
|
|
@@ -4539,11 +4700,11 @@ class KupTheme {
|
|
|
4539
4700
|
this.icons() +
|
|
4540
4701
|
'}';
|
|
4541
4702
|
this.customStyle();
|
|
4542
|
-
dom$
|
|
4703
|
+
dom$c.ketchup.debug.logMessage('kup-theme', 'Theme ' + dom$c.getAttribute('kup-theme') + ' refreshed.');
|
|
4543
4704
|
document.dispatchEvent(new CustomEvent('kup-theme-refresh'));
|
|
4544
4705
|
}
|
|
4545
4706
|
catch (error) {
|
|
4546
|
-
dom$
|
|
4707
|
+
dom$c.ketchup.debug.logMessage('kup-theme', 'Theme not refreshed.', exports.KupDebugCategory.WARNING);
|
|
4547
4708
|
}
|
|
4548
4709
|
}
|
|
4549
4710
|
/**
|
|
@@ -4662,7 +4823,7 @@ class KupTheme {
|
|
|
4662
4823
|
this.set(themes[index]);
|
|
4663
4824
|
}
|
|
4664
4825
|
else {
|
|
4665
|
-
dom$
|
|
4826
|
+
dom$c.ketchup.debug.logMessage('kup-theme', "Couldn't set a random theme: no themes available!", exports.KupDebugCategory.WARNING);
|
|
4666
4827
|
}
|
|
4667
4828
|
}
|
|
4668
4829
|
/**
|
|
@@ -4674,7 +4835,7 @@ class KupTheme {
|
|
|
4674
4835
|
//Testing whether the color is transparent, if it is a fall back value will be returned matching the background-color
|
|
4675
4836
|
if (color === 'transparent') {
|
|
4676
4837
|
color = this.cssVars['--kup-background-color'];
|
|
4677
|
-
dom$
|
|
4838
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Received TRANSPARENT color, converted to ' +
|
|
4678
4839
|
color +
|
|
4679
4840
|
' (theme background).');
|
|
4680
4841
|
}
|
|
@@ -4692,7 +4853,7 @@ class KupTheme {
|
|
|
4692
4853
|
const oldColor = color;
|
|
4693
4854
|
color = this.codeToHex(color);
|
|
4694
4855
|
isHex = color.substring(0, 1) === '#' ? true : false;
|
|
4695
|
-
dom$
|
|
4856
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Received CODE NAME color ' +
|
|
4696
4857
|
oldColor +
|
|
4697
4858
|
', converted to ' +
|
|
4698
4859
|
color +
|
|
@@ -4746,14 +4907,14 @@ class KupTheme {
|
|
|
4746
4907
|
else {
|
|
4747
4908
|
hexColor = this.rgbToHex(rgbColorObj.r, rgbColorObj.g, rgbColorObj.b);
|
|
4748
4909
|
}
|
|
4749
|
-
dom$
|
|
4910
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Received HEX color ' +
|
|
4750
4911
|
oldColor +
|
|
4751
4912
|
', converted to ' +
|
|
4752
4913
|
color +
|
|
4753
4914
|
'.');
|
|
4754
4915
|
}
|
|
4755
4916
|
catch (error) {
|
|
4756
|
-
dom$
|
|
4917
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Invalid color: ' + color + '.');
|
|
4757
4918
|
}
|
|
4758
4919
|
}
|
|
4759
4920
|
let rgbValues = null;
|
|
@@ -4763,14 +4924,14 @@ class KupTheme {
|
|
|
4763
4924
|
rgbColor = color;
|
|
4764
4925
|
}
|
|
4765
4926
|
catch (error) {
|
|
4766
|
-
dom$
|
|
4927
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Color not converted to rgb values: ' + color + '.');
|
|
4767
4928
|
}
|
|
4768
4929
|
if (!hexColor) {
|
|
4769
4930
|
try {
|
|
4770
4931
|
hexColor = this.rgbToHex(parseInt(values[1]), parseInt(values[2]), parseInt(values[3]));
|
|
4771
4932
|
}
|
|
4772
4933
|
catch (error) {
|
|
4773
|
-
dom$
|
|
4934
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
|
|
4774
4935
|
}
|
|
4775
4936
|
}
|
|
4776
4937
|
if (!hslColor || !hslValues) {
|
|
@@ -4783,7 +4944,7 @@ class KupTheme {
|
|
|
4783
4944
|
hslColor = 'hsl(' + hsl.h + ',' + hsl.s + '%,' + hsl.l + '%)';
|
|
4784
4945
|
}
|
|
4785
4946
|
catch (error) {
|
|
4786
|
-
dom$
|
|
4947
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
|
|
4787
4948
|
}
|
|
4788
4949
|
}
|
|
4789
4950
|
return {
|
|
@@ -5088,7 +5249,7 @@ class KupTheme {
|
|
|
5088
5249
|
return colorCodes[color.toLowerCase()];
|
|
5089
5250
|
}
|
|
5090
5251
|
else {
|
|
5091
|
-
dom$
|
|
5252
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Could not decode color ' + color + '!');
|
|
5092
5253
|
return color;
|
|
5093
5254
|
}
|
|
5094
5255
|
}
|
|
@@ -5116,7 +5277,7 @@ var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
5116
5277
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5117
5278
|
};
|
|
5118
5279
|
var _KupToolbar_keyEvent;
|
|
5119
|
-
const dom$
|
|
5280
|
+
const dom$b = document.documentElement;
|
|
5120
5281
|
/**
|
|
5121
5282
|
* Handles component's toolbar.
|
|
5122
5283
|
* @module KupToolbar
|
|
@@ -5134,7 +5295,7 @@ class KupToolbar {
|
|
|
5134
5295
|
KupToolbarModifierKeys.CTRL,
|
|
5135
5296
|
];
|
|
5136
5297
|
__classPrivateFieldSet$1(this, _KupToolbar_keyEvent, function (e) {
|
|
5137
|
-
const toolbar = dom$
|
|
5298
|
+
const toolbar = dom$b.ketchup.toolbar;
|
|
5138
5299
|
if (toolbar.managedElements) {
|
|
5139
5300
|
for (let index = 0; index < toolbar.modifiers.length; index++) {
|
|
5140
5301
|
if (toolbar.modifiers[index] ===
|
|
@@ -5481,65 +5642,1168 @@ exports.KupDataNewColumnTypes = void 0;
|
|
|
5481
5642
|
KupDataNewColumnTypes["MERGE"] = "merge";
|
|
5482
5643
|
})(exports.KupDataNewColumnTypes || (exports.KupDataNewColumnTypes = {}));
|
|
5483
5644
|
|
|
5484
|
-
const dom$7 = document.documentElement;
|
|
5485
5645
|
/**
|
|
5486
|
-
*
|
|
5487
|
-
*
|
|
5488
|
-
* @param {KupDataFindCellFilters} filters - Filters of the research.
|
|
5489
|
-
* @returns {KupDataCell[]} Array of cells fetched after applying the filters.
|
|
5646
|
+
* Props of the kup-data-table component.
|
|
5647
|
+
* Used to export every prop in an object.
|
|
5490
5648
|
*/
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5649
|
+
exports.KupDataTableProps = void 0;
|
|
5650
|
+
(function (KupDataTableProps) {
|
|
5651
|
+
KupDataTableProps["autoFillMissingCells"] = "When true and when a row is missing some columns, the missing cells will be autogenerated.";
|
|
5652
|
+
KupDataTableProps["customStyle"] = "Custom style of the component.";
|
|
5653
|
+
KupDataTableProps["data"] = "The data of the table.";
|
|
5654
|
+
KupDataTableProps["density"] = "The density of the rows, defaults at 'medium' and can be also set to 'large' or 'small'.";
|
|
5655
|
+
KupDataTableProps["dragEnabled"] = "Enables drag.";
|
|
5656
|
+
KupDataTableProps["dropEnabled"] = "Enables drop.";
|
|
5657
|
+
KupDataTableProps["editableData"] = "When set to true, editable cells will be rendered using input components.";
|
|
5658
|
+
KupDataTableProps["emptyDataLabel"] = "Defines the label to show when the table is empty.";
|
|
5659
|
+
KupDataTableProps["enableColumnsFormula"] = "Enables the choice to set formulas on columns by dragging them into different columns.";
|
|
5660
|
+
KupDataTableProps["enableMergeColumns"] = "Enables the merging of columns by dragging them into different columns.";
|
|
5661
|
+
KupDataTableProps["enableExtraColumns"] = "Enables adding extra columns.";
|
|
5662
|
+
KupDataTableProps["enableSortableColumns"] = "Enables the sorting of columns by dragging them into different columns.";
|
|
5663
|
+
KupDataTableProps["expandGroups"] = "Expands groups when set to true.";
|
|
5664
|
+
KupDataTableProps["filters"] = "List of filters set by the user.";
|
|
5665
|
+
KupDataTableProps["fixedColumns"] = "Fixes the given number of columns so that they stay visible when horizontally scrolling the data-table. If grouping is active or the value of the prop is <= 0, this prop will have no effect. Can be combined with fixedRows.";
|
|
5666
|
+
KupDataTableProps["fixedRows"] = "Fixes the given number of rows so that they stay visible when vertically scrolling the data-table. If grouping is active or the value of the prop is <= 0, this prop will have no effect. Can be combined with fixedColumns.";
|
|
5667
|
+
KupDataTableProps["forceOneLine"] = "Forces cells with long text and a fixed column size to have an ellipsis set on their text. The reflect attribute is mandatory to allow styling.";
|
|
5668
|
+
KupDataTableProps["globalFilter"] = "When set to true it activates the global filter.";
|
|
5669
|
+
KupDataTableProps["globalFilterValue"] = "The value of the global filter.";
|
|
5670
|
+
KupDataTableProps["groupLabelDisplay"] = "How the label of a group must be displayed. For available values";
|
|
5671
|
+
KupDataTableProps["groups"] = "The list of groups.";
|
|
5672
|
+
KupDataTableProps["headerIsPersistent"] = "When set to true the header will stick on top of the table when scrolling.";
|
|
5673
|
+
KupDataTableProps["isFocusable"] = "When set to true, clicked-on rows will have a visual feedback.";
|
|
5674
|
+
KupDataTableProps["lazyLoadRows"] = "When set to true, extra rows will be automatically loaded once the last row enters the viewport. When groups are present, the number of rows is referred to groups and not to their content. Paginator is disabled.";
|
|
5675
|
+
KupDataTableProps["lineBreakCharacter"] = "Defines the placeholder character which will be replaced by a line break inside table header cells, normal or sticky.";
|
|
5676
|
+
KupDataTableProps["loadMoreLimit"] = "Sets a maximum limit of new records which can be required by the load more functionality.";
|
|
5677
|
+
KupDataTableProps["loadMoreMode"] = "Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.";
|
|
5678
|
+
KupDataTableProps["loadMoreStep"] = "The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.";
|
|
5679
|
+
KupDataTableProps["multiSelection"] = "When set to true enables rows multi selection.";
|
|
5680
|
+
KupDataTableProps["pageSelected"] = "Current selected page set on component load";
|
|
5681
|
+
KupDataTableProps["paginatorPos"] = "Sets the position of the paginator. Available positions: top, bottom or both.";
|
|
5682
|
+
KupDataTableProps["removableColumns"] = "Sets the possibility to remove the selected column.";
|
|
5683
|
+
KupDataTableProps["resizableColumns"] = "Gives the possibility to resize columns by dragging on their right edge.";
|
|
5684
|
+
KupDataTableProps["rowActions"] = "Sets the actions of the rows.";
|
|
5685
|
+
KupDataTableProps["rowsPerPage"] = "Sets the number of rows per page to display.";
|
|
5686
|
+
KupDataTableProps["scrollOnHover"] = "Activates the scroll on hover function.";
|
|
5687
|
+
KupDataTableProps["showCustomization"] = "If set to true, displays the button to open the customization panel.";
|
|
5688
|
+
KupDataTableProps["showFilters"] = "When set to true enables the column filters.";
|
|
5689
|
+
KupDataTableProps["showFooter"] = "When set to true shows the footer.";
|
|
5690
|
+
KupDataTableProps["showGrid"] = "Can be used to customize the grid view of the table.";
|
|
5691
|
+
KupDataTableProps["showGroups"] = "When set to true enables the column grouping.";
|
|
5692
|
+
KupDataTableProps["showHeader"] = "Enables rendering of the table header.";
|
|
5693
|
+
KupDataTableProps["showLoadMore"] = "If set to true, displays the button to load more records.";
|
|
5694
|
+
KupDataTableProps["sort"] = "Defines the current sorting options.";
|
|
5695
|
+
KupDataTableProps["stateId"] = "";
|
|
5696
|
+
KupDataTableProps["store"] = "";
|
|
5697
|
+
KupDataTableProps["sortableColumnsMutateData"] = "If set to true, when a column is dragged to be sorted, the component directly mutates the data.columns property and then fires the event";
|
|
5698
|
+
KupDataTableProps["sortEnabled"] = "When set to true enables the sorting of the columns by clicking on the column header.";
|
|
5699
|
+
KupDataTableProps["tableHeight"] = "Sets the height of the table.";
|
|
5700
|
+
KupDataTableProps["tableWidth"] = "Sets the width of the table.";
|
|
5701
|
+
KupDataTableProps["totals"] = "Defines the current totals options.";
|
|
5702
|
+
KupDataTableProps["transpose"] = "Transposes the data of the data table.";
|
|
5703
|
+
})(exports.KupDataTableProps || (exports.KupDataTableProps = {}));
|
|
5704
|
+
exports.SortMode = void 0;
|
|
5705
|
+
(function (SortMode) {
|
|
5706
|
+
SortMode["A"] = "A";
|
|
5707
|
+
SortMode["D"] = "D";
|
|
5708
|
+
})(exports.SortMode || (exports.SortMode = {}));
|
|
5709
|
+
exports.TotalMode = void 0;
|
|
5710
|
+
(function (TotalMode) {
|
|
5711
|
+
TotalMode["COUNT"] = "Count";
|
|
5712
|
+
TotalMode["SUM"] = "Sum";
|
|
5713
|
+
TotalMode["MIN"] = "Min";
|
|
5714
|
+
TotalMode["MAX"] = "Max";
|
|
5715
|
+
TotalMode["DISTINCT"] = "Distinct";
|
|
5716
|
+
TotalMode["AVERAGE"] = "Average";
|
|
5717
|
+
TotalMode["MATH"] = "MATH";
|
|
5718
|
+
})(exports.TotalMode || (exports.TotalMode = {}));
|
|
5719
|
+
exports.TotalLabel = void 0;
|
|
5720
|
+
(function (TotalLabel) {
|
|
5721
|
+
TotalLabel["COUNT"] = "Count";
|
|
5722
|
+
TotalLabel["SUM"] = "Sum";
|
|
5723
|
+
TotalLabel["MIN"] = "Min";
|
|
5724
|
+
TotalLabel["MAX"] = "Max";
|
|
5725
|
+
TotalLabel["DISTINCT"] = "Distinct";
|
|
5726
|
+
TotalLabel["AVERAGE"] = "Average";
|
|
5727
|
+
TotalLabel["MATH"] = "Formula";
|
|
5728
|
+
TotalLabel["CANC"] = "Cancel";
|
|
5729
|
+
TotalLabel["CALC"] = "Calculate";
|
|
5730
|
+
})(exports.TotalLabel || (exports.TotalLabel = {}));
|
|
5731
|
+
exports.PaginatorPos = void 0;
|
|
5732
|
+
(function (PaginatorPos) {
|
|
5733
|
+
PaginatorPos["TOP"] = "Top";
|
|
5734
|
+
PaginatorPos["BOTTOM"] = "Bottom";
|
|
5735
|
+
PaginatorPos["BOTH"] = "Both";
|
|
5736
|
+
})(exports.PaginatorPos || (exports.PaginatorPos = {}));
|
|
5737
|
+
exports.ShowGrid = void 0;
|
|
5738
|
+
(function (ShowGrid) {
|
|
5739
|
+
ShowGrid["NONE"] = "None";
|
|
5740
|
+
ShowGrid["ROW"] = "Row";
|
|
5741
|
+
ShowGrid["COL"] = "Col";
|
|
5742
|
+
ShowGrid["COMPLETE"] = "Complete";
|
|
5743
|
+
})(exports.ShowGrid || (exports.ShowGrid = {}));
|
|
5744
|
+
// export enum RowActionType {
|
|
5745
|
+
// DEFAULT = 'Default',
|
|
5746
|
+
// VARIABLE = 'Variable',
|
|
5747
|
+
// }
|
|
5748
|
+
//---- *NEXT functionality AKA load more ----
|
|
5749
|
+
exports.LoadMoreMode = void 0;
|
|
5750
|
+
(function (LoadMoreMode) {
|
|
5751
|
+
LoadMoreMode["CONSTANT"] = "constant";
|
|
5752
|
+
LoadMoreMode["CONSTANT_INCREMENT"] = "constant_increment";
|
|
5753
|
+
LoadMoreMode["PROGRESSIVE_THRESHOLD"] = "progressive_threshold";
|
|
5754
|
+
})(exports.LoadMoreMode || (exports.LoadMoreMode = {}));
|
|
5755
|
+
//---- Group label display functionality ----
|
|
5494
5756
|
/**
|
|
5495
|
-
*
|
|
5496
|
-
* @
|
|
5497
|
-
* @
|
|
5498
|
-
* @
|
|
5757
|
+
* The possible values the display property can have.
|
|
5758
|
+
* @enum
|
|
5759
|
+
* @property {string} BOTH - Shows both the column label and the value. This is the default.
|
|
5760
|
+
* @property {string} LABEL - Shows only the columns label.
|
|
5761
|
+
* @property {string} VALUE - Shows only the value.
|
|
5762
|
+
* @readonly
|
|
5499
5763
|
*/
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5764
|
+
exports.GroupLabelDisplayMode = void 0;
|
|
5765
|
+
(function (GroupLabelDisplayMode) {
|
|
5766
|
+
GroupLabelDisplayMode["BOTH"] = "Both";
|
|
5767
|
+
GroupLabelDisplayMode["LABEL"] = "Label";
|
|
5768
|
+
GroupLabelDisplayMode["VALUE"] = "Value";
|
|
5769
|
+
})(exports.GroupLabelDisplayMode || (exports.GroupLabelDisplayMode = {}));
|
|
5770
|
+
//---- Fixed rows and cells classes ----
|
|
5771
|
+
const FixedCellsClasses = {
|
|
5772
|
+
columns: 'fixed-column',
|
|
5773
|
+
rows: 'fixed-row',
|
|
5774
|
+
};
|
|
5775
|
+
const FixedCellsCSSVarsBase = {
|
|
5776
|
+
columns: '--ddt_column-left-',
|
|
5777
|
+
rows: '--ddt_row-top-',
|
|
5778
|
+
};
|
|
5514
5779
|
/**
|
|
5515
|
-
*
|
|
5516
|
-
* If no columns are provided, the value will be applied to every column of the dataset.
|
|
5517
|
-
* @param {KupDataDataset} dataset - Input dataset.
|
|
5518
|
-
* @param {KupDataCell} cell - New cell.
|
|
5519
|
-
* @param {string[]} columns - Columns to be handled.
|
|
5520
|
-
* @returns {KupDataCell[]} Replaced cells.
|
|
5780
|
+
* Constants for mocked/premade columns created by data mutations.
|
|
5521
5781
|
*/
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
}
|
|
5533
|
-
}
|
|
5534
|
-
return replaced;
|
|
5535
|
-
}
|
|
5782
|
+
const fieldColumn = 'Field';
|
|
5783
|
+
const iconColumn = 'Icon';
|
|
5784
|
+
const keyColumn = 'Key';
|
|
5785
|
+
exports.SelectionMode = void 0;
|
|
5786
|
+
(function (SelectionMode) {
|
|
5787
|
+
SelectionMode["SINGLE"] = "single";
|
|
5788
|
+
SelectionMode["MULTIPLE_CHECKBOX"] = "multiple-checkbox";
|
|
5789
|
+
SelectionMode["MULTIPLE"] = "multiple";
|
|
5790
|
+
SelectionMode["NONE"] = "none";
|
|
5791
|
+
})(exports.SelectionMode || (exports.SelectionMode = {}));
|
|
5536
5792
|
|
|
5537
|
-
const dom$6 = document.documentElement;
|
|
5538
5793
|
/**
|
|
5539
|
-
*
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5794
|
+
* Normalization types.
|
|
5795
|
+
*/
|
|
5796
|
+
exports.KupDatesNormalize = void 0;
|
|
5797
|
+
(function (KupDatesNormalize) {
|
|
5798
|
+
KupDatesNormalize["DATE"] = "date";
|
|
5799
|
+
KupDatesNormalize["TIME"] = "time";
|
|
5800
|
+
KupDatesNormalize["TIMESTAMP"] = "timestamp";
|
|
5801
|
+
})(exports.KupDatesNormalize || (exports.KupDatesNormalize = {}));
|
|
5802
|
+
/**
|
|
5803
|
+
* Common use formats
|
|
5804
|
+
*/
|
|
5805
|
+
exports.KupDatesFormats = void 0;
|
|
5806
|
+
(function (KupDatesFormats) {
|
|
5807
|
+
KupDatesFormats["ISO_DATE"] = "YYYY-MM-DD";
|
|
5808
|
+
KupDatesFormats["ISO_DATE_TIME"] = "YYYY-MM-DD HH:mm:ss";
|
|
5809
|
+
KupDatesFormats["ISO_TIME"] = "HH:mm:ss";
|
|
5810
|
+
KupDatesFormats["ISO_TIME_WITHOUT_SECONDS"] = "HH:mm";
|
|
5811
|
+
})(exports.KupDatesFormats || (exports.KupDatesFormats = {}));
|
|
5812
|
+
/**
|
|
5813
|
+
* Supported locales.
|
|
5814
|
+
*/
|
|
5815
|
+
exports.KupDatesLocales = void 0;
|
|
5816
|
+
(function (KupDatesLocales) {
|
|
5817
|
+
KupDatesLocales["CHINESE"] = "cn";
|
|
5818
|
+
KupDatesLocales["ENGLISH"] = "en";
|
|
5819
|
+
KupDatesLocales["FRENCH"] = "fr";
|
|
5820
|
+
KupDatesLocales["ITALIAN"] = "it";
|
|
5821
|
+
KupDatesLocales["POLISH"] = "pl";
|
|
5822
|
+
KupDatesLocales["RUSSIAN"] = "ru";
|
|
5823
|
+
KupDatesLocales["SPANISH"] = "es";
|
|
5824
|
+
})(exports.KupDatesLocales || (exports.KupDatesLocales = {}));
|
|
5825
|
+
|
|
5826
|
+
const dom$a = document.documentElement;
|
|
5827
|
+
exports.DateTimeFormatOptionsMonth = void 0;
|
|
5828
|
+
(function (DateTimeFormatOptionsMonth) {
|
|
5829
|
+
DateTimeFormatOptionsMonth["NUMERIC"] = "numeric";
|
|
5830
|
+
DateTimeFormatOptionsMonth["DIGIT2"] = "2-digit";
|
|
5831
|
+
DateTimeFormatOptionsMonth["LONG"] = "long";
|
|
5832
|
+
DateTimeFormatOptionsMonth["SHORT"] = "short";
|
|
5833
|
+
DateTimeFormatOptionsMonth["NARROW"] = "narrow";
|
|
5834
|
+
})(exports.DateTimeFormatOptionsMonth || (exports.DateTimeFormatOptionsMonth = {}));
|
|
5835
|
+
function identify(array) {
|
|
5836
|
+
if (array) {
|
|
5837
|
+
for (let i = 0; i < array.length; i++) {
|
|
5838
|
+
array[i].id = i.toString();
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5841
|
+
}
|
|
5842
|
+
function getSeparator(locale, separatorType) {
|
|
5843
|
+
const numberWithGroupAndDecimalSeparator = 1000.1;
|
|
5844
|
+
return Intl.NumberFormat(locale)
|
|
5845
|
+
.formatToParts(numberWithGroupAndDecimalSeparator)
|
|
5846
|
+
.find((part) => part.type === separatorType).value;
|
|
5847
|
+
}
|
|
5848
|
+
function getCurrentTimeFormatFromBrowserLocale(manageSeconds) {
|
|
5849
|
+
const options = {
|
|
5850
|
+
hour: '2-digit',
|
|
5851
|
+
minute: '2-digit',
|
|
5852
|
+
hour12: false,
|
|
5853
|
+
};
|
|
5854
|
+
if (manageSeconds == true) {
|
|
5855
|
+
options.second = '2-digit';
|
|
5856
|
+
}
|
|
5857
|
+
const formatObj = new Intl.DateTimeFormat(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options).formatToParts(new Date());
|
|
5858
|
+
let timeFormat = formatObj
|
|
5859
|
+
.map((obj) => {
|
|
5860
|
+
switch (obj.type) {
|
|
5861
|
+
case 'hour':
|
|
5862
|
+
return 'HH';
|
|
5863
|
+
case 'minute':
|
|
5864
|
+
return 'mm';
|
|
5865
|
+
case 'second':
|
|
5866
|
+
return 'ss';
|
|
5867
|
+
default:
|
|
5868
|
+
return obj.value;
|
|
5869
|
+
}
|
|
5870
|
+
})
|
|
5871
|
+
.join('');
|
|
5872
|
+
return timeFormat;
|
|
5873
|
+
}
|
|
5874
|
+
/**
|
|
5875
|
+
* @param value number as string, formatted by actual browser locale
|
|
5876
|
+
* @param type - type of number for calculate suffix
|
|
5877
|
+
* @returns true if number string in input is a valid number
|
|
5878
|
+
*/
|
|
5879
|
+
function isValidFormattedStringNumber(value, type) {
|
|
5880
|
+
if (value == null || value.trim() == '') {
|
|
5881
|
+
return false;
|
|
5882
|
+
}
|
|
5883
|
+
let tmpStr = formattedStringToUnformattedStringNumber(value, type);
|
|
5884
|
+
if (isNumber(tmpStr)) {
|
|
5885
|
+
return true;
|
|
5886
|
+
}
|
|
5887
|
+
return false;
|
|
5888
|
+
}
|
|
5889
|
+
function isNumber(value) {
|
|
5890
|
+
//return typeof value === 'number';
|
|
5891
|
+
return !isNaN(value);
|
|
5892
|
+
}
|
|
5893
|
+
/**
|
|
5894
|
+
* @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
|
|
5895
|
+
* @returns number
|
|
5896
|
+
**/
|
|
5897
|
+
function stringToNumber(input) {
|
|
5898
|
+
if (!input || input == null || input.trim() == '') {
|
|
5899
|
+
input = '0';
|
|
5900
|
+
}
|
|
5901
|
+
return dom$a.ketchup.math.numberify(input);
|
|
5902
|
+
}
|
|
5903
|
+
/**
|
|
5904
|
+
* @param input number
|
|
5905
|
+
* @param decimals number of significant decimal digits for output
|
|
5906
|
+
* @returns number as string, formatted by actual browser locale
|
|
5907
|
+
**/
|
|
5908
|
+
function numberToString(input, decimals) {
|
|
5909
|
+
if (input == null) {
|
|
5910
|
+
return '';
|
|
5911
|
+
}
|
|
5912
|
+
return _numberToString(input, decimals, dom$a.ketchup.dates.getLocale(), true);
|
|
5913
|
+
}
|
|
5914
|
+
/**
|
|
5915
|
+
* @param type - type of number for calculate suffix
|
|
5916
|
+
* @returns suffix for number, by type
|
|
5917
|
+
**/
|
|
5918
|
+
function getNumericValueSuffixByType(type) {
|
|
5919
|
+
type = type.toUpperCase();
|
|
5920
|
+
let nstr = '';
|
|
5921
|
+
if (type == 'P') {
|
|
5922
|
+
nstr = ' %';
|
|
5923
|
+
}
|
|
5924
|
+
else if (type == 'VE') {
|
|
5925
|
+
nstr = ' €';
|
|
5926
|
+
}
|
|
5927
|
+
else if (type == 'VL') {
|
|
5928
|
+
nstr = ' £';
|
|
5929
|
+
}
|
|
5930
|
+
else if (type == 'VV') {
|
|
5931
|
+
nstr = ' $';
|
|
5932
|
+
}
|
|
5933
|
+
return nstr;
|
|
5934
|
+
}
|
|
5935
|
+
/**
|
|
5936
|
+
* @param input number
|
|
5937
|
+
* @param decimals number of significant decimal digits for output
|
|
5938
|
+
* @param type - type of number for calculate suffix
|
|
5939
|
+
* @returns number as string, formatted by actual browser locale, with suffix by type
|
|
5940
|
+
**/
|
|
5941
|
+
function numberToFormattedStringNumber(input, decimals, type) {
|
|
5942
|
+
if (input == null || isNaN(input)) {
|
|
5943
|
+
return '';
|
|
5944
|
+
}
|
|
5945
|
+
let nstr = numberToString(input, decimals);
|
|
5946
|
+
nstr = nstr + getNumericValueSuffixByType(type);
|
|
5947
|
+
return nstr;
|
|
5948
|
+
}
|
|
5949
|
+
/**
|
|
5950
|
+
* @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
|
|
5951
|
+
* @param decimals number of significant decimal digits for output
|
|
5952
|
+
* @param type - type of number for calculate suffix
|
|
5953
|
+
* @returns number as string, formatted by actual browser locale, with suffix by type
|
|
5954
|
+
**/
|
|
5955
|
+
function unformattedStringToFormattedStringNumber(input, decimals, type) {
|
|
5956
|
+
return numberToFormattedStringNumber(stringToNumber(input), decimals, type);
|
|
5957
|
+
}
|
|
5958
|
+
/**
|
|
5959
|
+
* @param input number as string, formatted by actual browser locale
|
|
5960
|
+
* @param type - type of number for calculate suffix
|
|
5961
|
+
* @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
|
|
5962
|
+
**/
|
|
5963
|
+
function formattedStringToUnformattedStringNumber(input, type) {
|
|
5964
|
+
return numberStringToNumberString(input, type, getDecimalSeparator(dom$a.ketchup.dates.getLocale()));
|
|
5965
|
+
}
|
|
5966
|
+
/**
|
|
5967
|
+
* @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers), with group separator
|
|
5968
|
+
* @param type - type of number for calculate suffix
|
|
5969
|
+
* @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
|
|
5970
|
+
**/
|
|
5971
|
+
function unformattedStringNumberToNumber(input, type) {
|
|
5972
|
+
return numberStringToNumberString(input, type, '.');
|
|
5973
|
+
}
|
|
5974
|
+
function numberStringToNumberString(input, type, decFmt) {
|
|
5975
|
+
if (input == null || input.trim() == '') {
|
|
5976
|
+
return '';
|
|
5977
|
+
}
|
|
5978
|
+
let originalInputValue = input;
|
|
5979
|
+
let suffix = getNumericValueSuffixByType(type);
|
|
5980
|
+
if (suffix != '') {
|
|
5981
|
+
input = input.replace(suffix, '');
|
|
5982
|
+
}
|
|
5983
|
+
let regExpr = null;
|
|
5984
|
+
if (decFmt == '.') {
|
|
5985
|
+
regExpr = /,/g;
|
|
5986
|
+
}
|
|
5987
|
+
else {
|
|
5988
|
+
regExpr = /\./g;
|
|
5989
|
+
}
|
|
5990
|
+
input = input.replace(regExpr, '');
|
|
5991
|
+
if (decFmt != '.') {
|
|
5992
|
+
input = input.replace(/,/g, '.');
|
|
5993
|
+
}
|
|
5994
|
+
if (dom$a.ketchup.math.numberify(input) == null ||
|
|
5995
|
+
isNaN(dom$a.ketchup.math.numberify(input))) {
|
|
5996
|
+
return originalInputValue;
|
|
5997
|
+
}
|
|
5998
|
+
let unf = stringToNumber(input);
|
|
5999
|
+
return _numberToString(unf, -1, 'en-US', false);
|
|
6000
|
+
}
|
|
6001
|
+
function getDecimalSeparator(locale) {
|
|
6002
|
+
return getSeparator(locale, 'decimal');
|
|
6003
|
+
}
|
|
6004
|
+
function countDecimals(value) {
|
|
6005
|
+
if (Math.floor(value) === value)
|
|
6006
|
+
return 0;
|
|
6007
|
+
let stringValue = value.toString().split('.')[1];
|
|
6008
|
+
if (stringValue) {
|
|
6009
|
+
return stringValue.length ? stringValue.length : 0;
|
|
6010
|
+
}
|
|
6011
|
+
else {
|
|
6012
|
+
return 0;
|
|
6013
|
+
}
|
|
6014
|
+
}
|
|
6015
|
+
function _numberToString(input, decimals, locale, useGrouping) {
|
|
6016
|
+
if (input == null) {
|
|
6017
|
+
input = 0;
|
|
6018
|
+
}
|
|
6019
|
+
if (decimals == null || decimals == -1) {
|
|
6020
|
+
decimals = countDecimals(input);
|
|
6021
|
+
}
|
|
6022
|
+
let n = Number(input);
|
|
6023
|
+
let f = decimals > -1
|
|
6024
|
+
? {
|
|
6025
|
+
minimumFractionDigits: decimals,
|
|
6026
|
+
maximumFractionDigits: decimals,
|
|
6027
|
+
useGrouping: useGrouping,
|
|
6028
|
+
}
|
|
6029
|
+
: { useGrouping: useGrouping };
|
|
6030
|
+
return n.toLocaleString(locale, f);
|
|
6031
|
+
}
|
|
6032
|
+
/**
|
|
6033
|
+
* @param time time as Date object
|
|
6034
|
+
* @param manageSeconds flag to set seconds managing
|
|
6035
|
+
* @return time as string, formatted
|
|
6036
|
+
**/
|
|
6037
|
+
function formatTime(time, manageSeconds) {
|
|
6038
|
+
const options = {
|
|
6039
|
+
hour: '2-digit',
|
|
6040
|
+
minute: '2-digit',
|
|
6041
|
+
hour12: false,
|
|
6042
|
+
};
|
|
6043
|
+
if (manageSeconds == true) {
|
|
6044
|
+
options.second = '2-digit';
|
|
6045
|
+
}
|
|
6046
|
+
return time.toLocaleTimeString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6047
|
+
}
|
|
6048
|
+
/**
|
|
6049
|
+
* @param value time string, formatted by actual browser locale
|
|
6050
|
+
* @returns true if time string in input is a valid time
|
|
6051
|
+
*/
|
|
6052
|
+
function isValidFormattedStringTime(value, manageSeconds) {
|
|
6053
|
+
let format = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
|
|
6054
|
+
return dom$a.ketchup.dates.isValid(value, format, true);
|
|
6055
|
+
}
|
|
6056
|
+
/**
|
|
6057
|
+
* @param value date/time as string, formatted by actual browser locale
|
|
6058
|
+
* @returns date/time as string, formatted ISO
|
|
6059
|
+
**/
|
|
6060
|
+
function formattedStringToDefaultUnformattedStringTimestamp(value) {
|
|
6061
|
+
return formattedStringToCustomUnformattedStringTime(value, exports.KupDatesFormats.ISO_DATE_TIME, true);
|
|
6062
|
+
}
|
|
6063
|
+
/**
|
|
6064
|
+
* @param value time as string, formatted by actual browser locale
|
|
6065
|
+
* @param outputFormat time format to return
|
|
6066
|
+
* @param manageSeconds flag to set seconds managing
|
|
6067
|
+
* @returns time as string, formatted
|
|
6068
|
+
**/
|
|
6069
|
+
function formattedStringToCustomUnformattedStringTime(value, outputFormat, manageSeconds) {
|
|
6070
|
+
let inputFormat = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
|
|
6071
|
+
if (dom$a.ketchup.dates.isValid(value, inputFormat)) {
|
|
6072
|
+
return dom$a.ketchup.dates.format(dom$a.ketchup.dates.normalize(value, exports.KupDatesNormalize.TIME), outputFormat);
|
|
6073
|
+
}
|
|
6074
|
+
else {
|
|
6075
|
+
return '';
|
|
6076
|
+
}
|
|
6077
|
+
}
|
|
6078
|
+
/**
|
|
6079
|
+
* @param value time as string, formatted ISO
|
|
6080
|
+
* @param manageSeconds flag to set seconds managing
|
|
6081
|
+
* @param valueTimeFormat time format (default ISO)
|
|
6082
|
+
* @param customedFormat time format from smeupObject
|
|
6083
|
+
* @returns time as string, formatted by actual browser locale
|
|
6084
|
+
**/
|
|
6085
|
+
function unformattedStringToFormattedStringTime(value, manageSeconds, customedFormat) {
|
|
6086
|
+
const options = {
|
|
6087
|
+
hour: '2-digit',
|
|
6088
|
+
minute: '2-digit',
|
|
6089
|
+
hour12: false,
|
|
6090
|
+
};
|
|
6091
|
+
if (manageSeconds == true) {
|
|
6092
|
+
options.second = '2-digit';
|
|
6093
|
+
}
|
|
6094
|
+
let date = dom$a.ketchup.dates.toDate(dom$a.ketchup.dates.normalize(value, exports.KupDatesNormalize.TIME));
|
|
6095
|
+
return formatByCustomedOutputTimeFormat(value, date, options, customedFormat);
|
|
6096
|
+
}
|
|
6097
|
+
function formatByCustomedOutputTimeFormat(valueStr, date, options, customedFormat) {
|
|
6098
|
+
if (customedFormat == null) {
|
|
6099
|
+
return date.toLocaleTimeString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6100
|
+
}
|
|
6101
|
+
switch (customedFormat) {
|
|
6102
|
+
case 'I13': {
|
|
6103
|
+
//hh:mm
|
|
6104
|
+
break;
|
|
6105
|
+
}
|
|
6106
|
+
case 'I12': {
|
|
6107
|
+
//hh:mm:ss
|
|
6108
|
+
break;
|
|
6109
|
+
}
|
|
6110
|
+
case 'I11': {
|
|
6111
|
+
//???
|
|
6112
|
+
//hh:dddd
|
|
6113
|
+
//return moment(date).format('HH:DDDD');
|
|
6114
|
+
return valueStr;
|
|
6115
|
+
}
|
|
6116
|
+
case 'I14': {
|
|
6117
|
+
//???
|
|
6118
|
+
//sssss
|
|
6119
|
+
//return moment(date).format('SSSSS');
|
|
6120
|
+
return valueStr;
|
|
6121
|
+
}
|
|
6122
|
+
case 'I1H': {
|
|
6123
|
+
//???
|
|
6124
|
+
//Ora,Cen/Min HH,xx
|
|
6125
|
+
return valueStr;
|
|
6126
|
+
}
|
|
6127
|
+
case 'I1M': {
|
|
6128
|
+
//???
|
|
6129
|
+
//Min,Cen/Sec MMMM,xx
|
|
6130
|
+
return valueStr;
|
|
6131
|
+
}
|
|
6132
|
+
case 'I21': {
|
|
6133
|
+
//???
|
|
6134
|
+
//Giorni,(4 decim)
|
|
6135
|
+
return valueStr;
|
|
6136
|
+
}
|
|
6137
|
+
case 'I22': {
|
|
6138
|
+
//???
|
|
6139
|
+
//Ore,(4 decim)
|
|
6140
|
+
return valueStr;
|
|
6141
|
+
}
|
|
6142
|
+
case 'I23': {
|
|
6143
|
+
//???
|
|
6144
|
+
//Minuti,(4 decim)
|
|
6145
|
+
return valueStr;
|
|
6146
|
+
}
|
|
6147
|
+
case 'I24': {
|
|
6148
|
+
//???
|
|
6149
|
+
//Secondi
|
|
6150
|
+
return valueStr;
|
|
6151
|
+
}
|
|
6152
|
+
case 'I2H': {
|
|
6153
|
+
//???
|
|
6154
|
+
//Ora,Cen/Min HHHH,xx
|
|
6155
|
+
return valueStr;
|
|
6156
|
+
}
|
|
6157
|
+
case 'I2D': {
|
|
6158
|
+
//???
|
|
6159
|
+
//Ore Minuti Secondi HHMMS
|
|
6160
|
+
return valueStr;
|
|
6161
|
+
}
|
|
6162
|
+
case 'I2M': {
|
|
6163
|
+
//???
|
|
6164
|
+
//Min,Cen/Sec MMMM,xx
|
|
6165
|
+
return valueStr;
|
|
6166
|
+
}
|
|
6167
|
+
}
|
|
6168
|
+
return date.toLocaleTimeString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6169
|
+
}
|
|
6170
|
+
/**
|
|
6171
|
+
* @param value date/time as string, formatted ISO
|
|
6172
|
+
* @param valueDateFormat date/time format (default ISO)
|
|
6173
|
+
* @returns date/time as string, formatted by actual browser locale
|
|
6174
|
+
**/
|
|
6175
|
+
function unformattedStringToFormattedStringTimestamp(value) {
|
|
6176
|
+
const options = {
|
|
6177
|
+
day: '2-digit',
|
|
6178
|
+
month: '2-digit',
|
|
6179
|
+
year: 'numeric',
|
|
6180
|
+
hour: '2-digit',
|
|
6181
|
+
minute: '2-digit',
|
|
6182
|
+
second: '2-digit',
|
|
6183
|
+
hour12: false,
|
|
6184
|
+
};
|
|
6185
|
+
let date = dom$a.ketchup.dates.toDate(dom$a.ketchup.dates.normalize(value, exports.KupDatesNormalize.TIMESTAMP));
|
|
6186
|
+
return date.toLocaleString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6187
|
+
}
|
|
6188
|
+
function getMonthAsStringByLocale(month, format) {
|
|
6189
|
+
if (month == null) {
|
|
6190
|
+
return '';
|
|
6191
|
+
}
|
|
6192
|
+
const dateTmp = new Date();
|
|
6193
|
+
dateTmp.setDate(1);
|
|
6194
|
+
dateTmp.setMonth(month - 1);
|
|
6195
|
+
const options = {
|
|
6196
|
+
month: format,
|
|
6197
|
+
};
|
|
6198
|
+
const dateTimeFormat = new Intl.DateTimeFormat(dom$a.ketchup.dates.getLocale(), options);
|
|
6199
|
+
return dateTimeFormat.format(dateTmp);
|
|
6200
|
+
}
|
|
6201
|
+
function getMonthsAsStringByLocale(format) {
|
|
6202
|
+
if (format == null || format.trim() == '') {
|
|
6203
|
+
format = exports.DateTimeFormatOptionsMonth.LONG;
|
|
6204
|
+
}
|
|
6205
|
+
var months = [];
|
|
6206
|
+
for (var i = 0; i < 12; i++) {
|
|
6207
|
+
months[i] = getMonthAsStringByLocale(i + 1, format);
|
|
6208
|
+
}
|
|
6209
|
+
return months;
|
|
6210
|
+
}
|
|
6211
|
+
/**
|
|
6212
|
+
* Used to retrieve component's props values.
|
|
6213
|
+
* @param {any} comp - Component calling this function.
|
|
6214
|
+
* @param {GenericObject} list - Prop list, specific for each component.
|
|
6215
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
6216
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
6217
|
+
*/
|
|
6218
|
+
function getProps(comp, list, descriptions) {
|
|
6219
|
+
let props = {};
|
|
6220
|
+
if (descriptions) {
|
|
6221
|
+
props = list;
|
|
6222
|
+
}
|
|
6223
|
+
else {
|
|
6224
|
+
for (const key in list) {
|
|
6225
|
+
if (Object.prototype.hasOwnProperty.call(list, key)) {
|
|
6226
|
+
props[key] = comp[key];
|
|
6227
|
+
}
|
|
6228
|
+
}
|
|
6229
|
+
}
|
|
6230
|
+
return props;
|
|
6231
|
+
}
|
|
6232
|
+
/**
|
|
6233
|
+
* Sets the props to the component.
|
|
6234
|
+
* @param {any} comp - Component calling this function.
|
|
6235
|
+
* @param {GenericObject} list - Prop list, specific for each component.
|
|
6236
|
+
* @param {GenericObject} props - Prop to be set.
|
|
6237
|
+
*/
|
|
6238
|
+
function setProps(comp, list, props) {
|
|
6239
|
+
for (const key in props) {
|
|
6240
|
+
// If key is a custom prop it will be set on the component (i.e.: "data", "customStyle", ecc.)
|
|
6241
|
+
if (list[key]) {
|
|
6242
|
+
comp[key] = props[key];
|
|
6243
|
+
}
|
|
6244
|
+
else {
|
|
6245
|
+
// Otherwise, it will be set on its HTML element (i.e.: "id", "style", ecc.)
|
|
6246
|
+
comp.rootElement[key] = props[key];
|
|
6247
|
+
}
|
|
6248
|
+
}
|
|
6249
|
+
}
|
|
6250
|
+
|
|
6251
|
+
const dom$9 = document.documentElement;
|
|
6252
|
+
// -------------
|
|
6253
|
+
// COMMONS
|
|
6254
|
+
// -------------
|
|
6255
|
+
function getCellValueForDisplay(column, cell) {
|
|
6256
|
+
if (cell != null) {
|
|
6257
|
+
if (cell.displayedValue != null) {
|
|
6258
|
+
return cell.displayedValue;
|
|
6259
|
+
}
|
|
6260
|
+
}
|
|
6261
|
+
let formattedValue = _getCellValueForDisplay(cell.value, column, cell);
|
|
6262
|
+
if (cell != null) {
|
|
6263
|
+
cell.displayedValue = formattedValue;
|
|
6264
|
+
}
|
|
6265
|
+
return formattedValue;
|
|
6266
|
+
}
|
|
6267
|
+
function getValueForDisplay2(values, column) {
|
|
6268
|
+
if (values == null) {
|
|
6269
|
+
return '';
|
|
6270
|
+
}
|
|
6271
|
+
if (values.displayedValue == null || values.displayedValue.trim() == '') {
|
|
6272
|
+
values.displayedValue = _getCellValueForDisplay(values.value, column, null);
|
|
6273
|
+
}
|
|
6274
|
+
return values.displayedValue;
|
|
6275
|
+
}
|
|
6276
|
+
function formatToNumber(cell) {
|
|
6277
|
+
if (cell.obj) {
|
|
6278
|
+
return dom$9.ketchup.math.numberify(cell.obj.k);
|
|
6279
|
+
}
|
|
6280
|
+
return dom$9.ketchup.math.numberify(cell.value);
|
|
6281
|
+
}
|
|
6282
|
+
function _getCellValueForDisplay(value, column, cell) {
|
|
6283
|
+
let obj = column != null ? column.obj : null;
|
|
6284
|
+
if (cell != null) {
|
|
6285
|
+
obj = cell.obj ? cell.obj : obj;
|
|
6286
|
+
}
|
|
6287
|
+
return getValueForDisplay(value, obj, column != null ? column.decimals : null);
|
|
6288
|
+
}
|
|
6289
|
+
function getValueForDisplay(value, obj, decimals) {
|
|
6290
|
+
if (value == null || value.trim() == '') {
|
|
6291
|
+
return value;
|
|
6292
|
+
}
|
|
6293
|
+
if (dom$9.ketchup.objects.isNumber(obj)) {
|
|
6294
|
+
return unformattedStringToFormattedStringNumber(value, decimals ? decimals : -1, obj ? obj.p : '');
|
|
6295
|
+
}
|
|
6296
|
+
if (dom$9.ketchup.objects.isDate(obj) &&
|
|
6297
|
+
dom$9.ketchup.dates.isValid(value, exports.KupDatesFormats.ISO_DATE)) {
|
|
6298
|
+
return dom$9.ketchup.dates.format(value);
|
|
6299
|
+
}
|
|
6300
|
+
if (dom$9.ketchup.objects.isTime(obj)) {
|
|
6301
|
+
return unformattedStringToFormattedStringTime(value, dom$9.ketchup.objects.isTimeWithSeconds(obj), obj.t + obj.p);
|
|
6302
|
+
}
|
|
6303
|
+
if (dom$9.ketchup.objects.isTimestamp(obj)) {
|
|
6304
|
+
return unformattedStringToFormattedStringTimestamp(value);
|
|
6305
|
+
}
|
|
6306
|
+
return value;
|
|
6307
|
+
}
|
|
6308
|
+
function getColumnByName(columns, name) {
|
|
6309
|
+
if (columns == null) {
|
|
6310
|
+
return null;
|
|
6311
|
+
}
|
|
6312
|
+
for (let column of columns) {
|
|
6313
|
+
if (column.name === name) {
|
|
6314
|
+
return column;
|
|
6315
|
+
}
|
|
6316
|
+
}
|
|
6317
|
+
return null;
|
|
6318
|
+
}
|
|
6319
|
+
function compareCell(cell1, cell2, sortMode) {
|
|
6320
|
+
return compareValues(cell1.obj, cell1.value, cell2.obj, cell2.value, sortMode);
|
|
6321
|
+
}
|
|
6322
|
+
function compareValues(obj1, value1, obj2, value2, sortMode) {
|
|
6323
|
+
const sm = sortMode === 'A' ? 1 : -1;
|
|
6324
|
+
if (obj1 == null || obj2 == null) {
|
|
6325
|
+
return sm * localCompareAsInJava(value1, value2);
|
|
6326
|
+
}
|
|
6327
|
+
// If either the type or the parameter of the current object are not equal.
|
|
6328
|
+
if (!(obj1.t === obj2.t && obj1.p === obj2.p)) {
|
|
6329
|
+
let compare = localCompareAsInJava(obj1.t, obj2.t);
|
|
6330
|
+
if (compare === 0) {
|
|
6331
|
+
compare = localCompareAsInJava(obj1.p, obj2.p);
|
|
6332
|
+
}
|
|
6333
|
+
return compare * sm;
|
|
6334
|
+
}
|
|
6335
|
+
let s1 = value1;
|
|
6336
|
+
let s2 = value2;
|
|
6337
|
+
if (s1 == s2) {
|
|
6338
|
+
return 0;
|
|
6339
|
+
}
|
|
6340
|
+
if (s1 == '') {
|
|
6341
|
+
return sm * -1;
|
|
6342
|
+
}
|
|
6343
|
+
if (s2 == '') {
|
|
6344
|
+
return sm * 1;
|
|
6345
|
+
}
|
|
6346
|
+
let v1 = s1;
|
|
6347
|
+
let v2 = s2;
|
|
6348
|
+
if (dom$9.ketchup.objects.isNumber(obj1)) {
|
|
6349
|
+
v1 = stringToNumber(s1);
|
|
6350
|
+
v2 = stringToNumber(s2);
|
|
6351
|
+
}
|
|
6352
|
+
else if (dom$9.ketchup.objects.isDate(obj1)) {
|
|
6353
|
+
v1 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s1, exports.KupDatesFormats.ISO_DATE));
|
|
6354
|
+
v2 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s2, exports.KupDatesFormats.ISO_DATE));
|
|
6355
|
+
}
|
|
6356
|
+
else if (dom$9.ketchup.objects.isTime(obj1)) {
|
|
6357
|
+
let manageSeconds = dom$9.ketchup.objects.isTimeWithSeconds(obj1);
|
|
6358
|
+
v1 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s1, manageSeconds
|
|
6359
|
+
? exports.KupDatesFormats.ISO_TIME
|
|
6360
|
+
: exports.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
|
|
6361
|
+
v2 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s2, manageSeconds
|
|
6362
|
+
? exports.KupDatesFormats.ISO_TIME
|
|
6363
|
+
: exports.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
|
|
6364
|
+
}
|
|
6365
|
+
else if (dom$9.ketchup.objects.isTimestamp(obj1)) {
|
|
6366
|
+
v1 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s1, exports.KupDatesFormats.ISO_DATE_TIME));
|
|
6367
|
+
v2 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s2, exports.KupDatesFormats.ISO_DATE_TIME));
|
|
6368
|
+
}
|
|
6369
|
+
if (v1 > v2) {
|
|
6370
|
+
return sm * 1;
|
|
6371
|
+
}
|
|
6372
|
+
if (v1 < v2) {
|
|
6373
|
+
return sm * -1;
|
|
6374
|
+
}
|
|
6375
|
+
return 0;
|
|
6376
|
+
}
|
|
6377
|
+
/**
|
|
6378
|
+
* Given two strings to compare, the functions decides which string comes before the other or if they are equal.
|
|
6379
|
+
* This is meant as a replacement for the JavaScript function localCompare() which produces a slightly different result from
|
|
6380
|
+
* the Java version of compareTo().
|
|
6381
|
+
*
|
|
6382
|
+
* Re-implemented from java source method compareTo() of java.lang.String
|
|
6383
|
+
* @param t1 firstString the first string to be compared
|
|
6384
|
+
* @param t2 anotherString the another string to be compared to the first one
|
|
6385
|
+
* @returns the value 0 if the anotherString is equal to
|
|
6386
|
+
* firstString; a value less than 0 if firstString
|
|
6387
|
+
* is lexicographically less than the anotherString; and a
|
|
6388
|
+
* value greater than 0 if firstString is
|
|
6389
|
+
* lexicographically greater than the anotherString.
|
|
6390
|
+
*/
|
|
6391
|
+
function localCompareAsInJava(t1, t2) {
|
|
6392
|
+
let t1Length = t1 == null ? 0 : t1.length;
|
|
6393
|
+
let t2Length = t2 == null ? 0 : t2.length;
|
|
6394
|
+
const lim = Math.min(t1Length, t2Length);
|
|
6395
|
+
let k = 0;
|
|
6396
|
+
while (k < lim) {
|
|
6397
|
+
const c1 = t1[k];
|
|
6398
|
+
const c2 = t2[k];
|
|
6399
|
+
if (c1 !== c2) {
|
|
6400
|
+
return c1.charCodeAt(0) - c2.charCodeAt(0);
|
|
6401
|
+
}
|
|
6402
|
+
k++;
|
|
6403
|
+
}
|
|
6404
|
+
return t1Length - t2Length;
|
|
6405
|
+
}
|
|
6406
|
+
|
|
6407
|
+
/**
|
|
6408
|
+
* Interface for ranged filters.
|
|
6409
|
+
*/
|
|
6410
|
+
exports.FilterInterval = void 0;
|
|
6411
|
+
(function (FilterInterval) {
|
|
6412
|
+
FilterInterval[FilterInterval["FROM"] = 0] = "FROM";
|
|
6413
|
+
FilterInterval[FilterInterval["TO"] = 1] = "TO";
|
|
6414
|
+
})(exports.FilterInterval || (exports.FilterInterval = {}));
|
|
6415
|
+
/**
|
|
6416
|
+
* This regular expressions returns a match like this one:
|
|
6417
|
+
* if the string does not match is null, otherwise the indexes are equal to the object below:
|
|
6418
|
+
*
|
|
6419
|
+
* @property {string} 0 - The entire match of the regexp; is equal to the cellValue.
|
|
6420
|
+
* @property {string} 1 - Either !' or ' it's the start of the regexp.
|
|
6421
|
+
* @property {string} 2 - Either % or null: means the string must start with the given string.
|
|
6422
|
+
* @property {string} 3 - Either "" or a string with a length.
|
|
6423
|
+
* @property {string} 4 - Either % or null: means the string must finish with the given string.
|
|
6424
|
+
* @property {string} 5 - Always equal to ': it's the end of the filter.
|
|
6425
|
+
*/
|
|
6426
|
+
const FILTER_ANALIZER = /^('|!')(%){0,1}(.*?)(%){0,1}(')$/;
|
|
6427
|
+
exports.KupGlobalFilterMode = void 0;
|
|
6428
|
+
(function (KupGlobalFilterMode) {
|
|
6429
|
+
KupGlobalFilterMode["SIMPLE"] = "simple";
|
|
6430
|
+
KupGlobalFilterMode["HIGHLIGHT"] = "highlight";
|
|
6431
|
+
})(exports.KupGlobalFilterMode || (exports.KupGlobalFilterMode = {}));
|
|
6432
|
+
|
|
6433
|
+
const dom$8 = document.documentElement;
|
|
6434
|
+
/**
|
|
6435
|
+
* Filtering algorithms.
|
|
6436
|
+
* @module Filters
|
|
6437
|
+
* @todo Should contain EVERY filtering method in common between filtering types (i.e.: global filters and column menu filters).
|
|
6438
|
+
*/
|
|
6439
|
+
class Filters {
|
|
6440
|
+
/**
|
|
6441
|
+
* Function used to check whether the component is a KupTree or KupDataTable.
|
|
6442
|
+
* @param {KupDataTable | KupTree} comp - Component using the column menu.
|
|
6443
|
+
* @returns {comp is KupTree} Returns true when the component is KupTree.
|
|
6444
|
+
*/
|
|
6445
|
+
static isTree(comp) {
|
|
6446
|
+
return comp.rootElement.tagName === exports.KupTagNames.TREE;
|
|
6447
|
+
}
|
|
6448
|
+
isObjFiltrableByInterval(obj) {
|
|
6449
|
+
if (dom$8.ketchup.objects.isDate(obj)) {
|
|
6450
|
+
return true;
|
|
6451
|
+
}
|
|
6452
|
+
if (dom$8.ketchup.objects.isTime(obj)) {
|
|
6453
|
+
return true;
|
|
6454
|
+
}
|
|
6455
|
+
if (dom$8.ketchup.objects.isTimestamp(obj)) {
|
|
6456
|
+
return true;
|
|
6457
|
+
}
|
|
6458
|
+
if (dom$8.ketchup.objects.isNumber(obj)) {
|
|
6459
|
+
return true;
|
|
6460
|
+
}
|
|
6461
|
+
return false;
|
|
6462
|
+
}
|
|
6463
|
+
normalizeValue(value, smeupObj) {
|
|
6464
|
+
let newValue = value != null ? value.trim() : value;
|
|
6465
|
+
if (newValue == null || newValue == '' || smeupObj == null) {
|
|
6466
|
+
return newValue;
|
|
6467
|
+
}
|
|
6468
|
+
if (dom$8.ketchup.objects.isDate(smeupObj)) {
|
|
6469
|
+
if (dom$8.ketchup.dates.isValid(value, exports.KupDatesFormats.ISO_DATE)) {
|
|
6470
|
+
return newValue;
|
|
6471
|
+
}
|
|
6472
|
+
if (dom$8.ketchup.dates.isValid(value)) {
|
|
6473
|
+
return dom$8.ketchup.dates.format(dom$8.ketchup.dates.normalize(value, exports.KupDatesNormalize.DATE), exports.KupDatesFormats.ISO_DATE);
|
|
6474
|
+
}
|
|
6475
|
+
}
|
|
6476
|
+
else if (dom$8.ketchup.objects.isTime(smeupObj)) {
|
|
6477
|
+
let manageSeconds = dom$8.ketchup.objects.isTimeWithSeconds(smeupObj);
|
|
6478
|
+
if (dom$8.ketchup.dates.isValid(value, manageSeconds
|
|
6479
|
+
? exports.KupDatesFormats.ISO_TIME
|
|
6480
|
+
: exports.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS)) {
|
|
6481
|
+
return newValue;
|
|
6482
|
+
}
|
|
6483
|
+
if (isValidFormattedStringTime(value, manageSeconds)) {
|
|
6484
|
+
return formattedStringToCustomUnformattedStringTime(value, manageSeconds
|
|
6485
|
+
? exports.KupDatesFormats.ISO_TIME
|
|
6486
|
+
: exports.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, manageSeconds);
|
|
6487
|
+
}
|
|
6488
|
+
}
|
|
6489
|
+
else if (dom$8.ketchup.objects.isTimestamp(smeupObj)) {
|
|
6490
|
+
if (dom$8.ketchup.dates.isValid(value, exports.KupDatesFormats.ISO_DATE_TIME)) {
|
|
6491
|
+
return newValue;
|
|
6492
|
+
}
|
|
6493
|
+
if (isValidFormattedStringTime(value, true)) {
|
|
6494
|
+
return formattedStringToDefaultUnformattedStringTimestamp(value);
|
|
6495
|
+
}
|
|
6496
|
+
}
|
|
6497
|
+
else if (dom$8.ketchup.objects.isNumber(smeupObj)) {
|
|
6498
|
+
if (isValidFormattedStringNumber(value, smeupObj ? smeupObj.p : '')) {
|
|
6499
|
+
return formattedStringToUnformattedStringNumber(value, smeupObj ? smeupObj.p : '');
|
|
6500
|
+
}
|
|
6501
|
+
}
|
|
6502
|
+
return newValue;
|
|
6503
|
+
}
|
|
6504
|
+
/**
|
|
6505
|
+
* Given a filter value, check if is a negative filter
|
|
6506
|
+
* @param filterValue the filter value to use for check
|
|
6507
|
+
*/
|
|
6508
|
+
filterIsNegative(filterValue) {
|
|
6509
|
+
const analyzedFilter = filterValue.match(FILTER_ANALIZER);
|
|
6510
|
+
const filterIsNegative = analyzedFilter
|
|
6511
|
+
? analyzedFilter[1].indexOf('!') >= 0
|
|
6512
|
+
: false;
|
|
6513
|
+
return filterIsNegative;
|
|
6514
|
+
}
|
|
6515
|
+
/**
|
|
6516
|
+
* Given a value and a filter value, returns if that value matches the filter.
|
|
6517
|
+
*
|
|
6518
|
+
* Web filters can also be expressions: by putting strings between single quotes (') it's possible to activate filter expressions.
|
|
6519
|
+
* Valid syntax:
|
|
6520
|
+
* 'filter' = search for exact phrase;
|
|
6521
|
+
* '' = match when value is empty;
|
|
6522
|
+
* 'filter%' = match when a string starts with "filter";
|
|
6523
|
+
* '%filter' = match when a string ends with "filter";
|
|
6524
|
+
* '%filter%' = match when a string contains "filter".
|
|
6525
|
+
*
|
|
6526
|
+
* It is also possible to negate the expression by prepending "!" in front of the expression.
|
|
6527
|
+
* For example: !'' = value in the cell must not be empty.
|
|
6528
|
+
*
|
|
6529
|
+
* With no expression set, the filter is by default set to '%filter%'.
|
|
6530
|
+
*
|
|
6531
|
+
* @param value - The current value to check.
|
|
6532
|
+
* @param filterValue - The value of the current filter.
|
|
6533
|
+
* @returns false if value or filterValue are empty;
|
|
6534
|
+
true if value contains filterValue;
|
|
6535
|
+
true if value matches special filter created on filterValue;
|
|
6536
|
+
false otherwise.
|
|
6537
|
+
*/
|
|
6538
|
+
isFilterCompliantForValue(value, filterValue) {
|
|
6539
|
+
if (value == null) {
|
|
6540
|
+
return false;
|
|
6541
|
+
}
|
|
6542
|
+
if (filterValue == null) {
|
|
6543
|
+
return false;
|
|
6544
|
+
}
|
|
6545
|
+
const _filterIsNegative = this.filterIsNegative(filterValue);
|
|
6546
|
+
// checks if the value of the filter is contained inside value of the object
|
|
6547
|
+
// Or is if the filter is a special filter to be matched.
|
|
6548
|
+
if (value.toLowerCase().includes(filterValue.toLowerCase()) ||
|
|
6549
|
+
this.matchSpecialFilter(value.toLowerCase(), filterValue.toLowerCase().match(FILTER_ANALIZER), true)) {
|
|
6550
|
+
// the element matches the field filter
|
|
6551
|
+
if (_filterIsNegative) {
|
|
6552
|
+
return false;
|
|
6553
|
+
}
|
|
6554
|
+
return true;
|
|
6555
|
+
}
|
|
6556
|
+
if (_filterIsNegative) {
|
|
6557
|
+
return true;
|
|
6558
|
+
}
|
|
6559
|
+
return false;
|
|
6560
|
+
}
|
|
6561
|
+
/**
|
|
6562
|
+
* Given a value and a filter value, returns if that value matches the filter.
|
|
6563
|
+
*
|
|
6564
|
+
* Web filters can also be expressions: by putting strings between single quotes (') it's possible to activate filter expressions.
|
|
6565
|
+
* Valid syntax:
|
|
6566
|
+
* 'filter' = search for exact phrase;
|
|
6567
|
+
* '' = match when value is empty;
|
|
6568
|
+
* 'filter%' = match when a string starts with "filter";
|
|
6569
|
+
* '%filter' = match when a string ends with "filter";
|
|
6570
|
+
* '%filter%' = match when a string contains "filter".
|
|
6571
|
+
*
|
|
6572
|
+
* It is also possible to negate the expression by prepending "!" in front of the expression.
|
|
6573
|
+
* For example: !'' = value in the cell must not be empty.
|
|
6574
|
+
*
|
|
6575
|
+
* With no expression set, the filter is by default set to '%filter%'.
|
|
6576
|
+
*
|
|
6577
|
+
* @param value - The current value to check.
|
|
6578
|
+
* @param parsedFilter - The value of the current filter.
|
|
6579
|
+
* @param ignoreNegativeFlag = false - When set to true, the matcher will ignore the (!) operator; useful for global filter.
|
|
6580
|
+
* @returns True if the filter is empty and the value of the cell is empty, false otherwise.
|
|
6581
|
+
*/
|
|
6582
|
+
matchSpecialFilter(value, parsedFilter, ignoreNegativeFlag = false) {
|
|
6583
|
+
if (parsedFilter != null) {
|
|
6584
|
+
// endsWith and startWith are not supported by IE 11
|
|
6585
|
+
// Check here https://www.w3schools.com/jsref/jsref_endswith.asp
|
|
6586
|
+
const toRet = (parsedFilter[3] === '' && !value.trim()) ||
|
|
6587
|
+
(!parsedFilter[2] &&
|
|
6588
|
+
parsedFilter[4] &&
|
|
6589
|
+
value.startsWith(parsedFilter[3])) ||
|
|
6590
|
+
(parsedFilter[2] &&
|
|
6591
|
+
!parsedFilter[4] &&
|
|
6592
|
+
value.endsWith(parsedFilter[3])) ||
|
|
6593
|
+
(!parsedFilter[2] &&
|
|
6594
|
+
!parsedFilter[4] &&
|
|
6595
|
+
value === parsedFilter[3]) ||
|
|
6596
|
+
(parsedFilter[2] &&
|
|
6597
|
+
parsedFilter[4] &&
|
|
6598
|
+
value.indexOf(parsedFilter[3]) >= 0);
|
|
6599
|
+
return !ignoreNegativeFlag
|
|
6600
|
+
? parsedFilter[1].indexOf('!') < 0
|
|
6601
|
+
? toRet
|
|
6602
|
+
: !toRet
|
|
6603
|
+
: toRet;
|
|
6604
|
+
}
|
|
6605
|
+
return false;
|
|
6606
|
+
}
|
|
6607
|
+
isFilterCompliantForSimpleValue(valueToCheck, obj, filterValue, interval) {
|
|
6608
|
+
if (valueToCheck == null) {
|
|
6609
|
+
return false;
|
|
6610
|
+
}
|
|
6611
|
+
filterValue = this.normalizeValue(filterValue, obj);
|
|
6612
|
+
let value = valueToCheck;
|
|
6613
|
+
let from = '';
|
|
6614
|
+
let to = '';
|
|
6615
|
+
if (interval != null) {
|
|
6616
|
+
from = interval[exports.FilterInterval.FROM];
|
|
6617
|
+
to = interval[exports.FilterInterval.TO];
|
|
6618
|
+
}
|
|
6619
|
+
let checkByRegularExpression = true;
|
|
6620
|
+
if (dom$8.ketchup.objects.isNumber(obj)) {
|
|
6621
|
+
value = unformattedStringNumberToNumber(value, obj ? obj.p : '');
|
|
6622
|
+
let valueNumber = stringToNumber(value);
|
|
6623
|
+
if (from != '') {
|
|
6624
|
+
if (isNumber(from)) {
|
|
6625
|
+
checkByRegularExpression = false;
|
|
6626
|
+
let fromNumber = stringToNumber(from);
|
|
6627
|
+
if (valueNumber < fromNumber) {
|
|
6628
|
+
return false;
|
|
6629
|
+
}
|
|
6630
|
+
}
|
|
6631
|
+
else {
|
|
6632
|
+
filterValue = from;
|
|
6633
|
+
}
|
|
6634
|
+
}
|
|
6635
|
+
if (to != '') {
|
|
6636
|
+
if (isNumber(to)) {
|
|
6637
|
+
checkByRegularExpression = false;
|
|
6638
|
+
let toNumber = stringToNumber(to);
|
|
6639
|
+
if (valueNumber > toNumber) {
|
|
6640
|
+
return false;
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6643
|
+
else {
|
|
6644
|
+
filterValue = to;
|
|
6645
|
+
}
|
|
6646
|
+
}
|
|
6647
|
+
}
|
|
6648
|
+
if (dom$8.ketchup.objects.isDate(obj) ||
|
|
6649
|
+
dom$8.ketchup.objects.isTime(obj) ||
|
|
6650
|
+
dom$8.ketchup.objects.isTimestamp(obj)) {
|
|
6651
|
+
let valueDate = null;
|
|
6652
|
+
let defaultFormat = exports.KupDatesFormats.ISO_DATE;
|
|
6653
|
+
if (dom$8.ketchup.objects.isDate(obj)) {
|
|
6654
|
+
defaultFormat = exports.KupDatesFormats.ISO_DATE;
|
|
6655
|
+
}
|
|
6656
|
+
else if (dom$8.ketchup.objects.isTime(obj)) {
|
|
6657
|
+
defaultFormat = dom$8.ketchup.objects.isTimeWithSeconds(obj)
|
|
6658
|
+
? exports.KupDatesFormats.ISO_TIME
|
|
6659
|
+
: exports.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS;
|
|
6660
|
+
}
|
|
6661
|
+
else if (dom$8.ketchup.objects.isTimestamp(obj)) {
|
|
6662
|
+
defaultFormat = exports.KupDatesFormats.ISO_DATE_TIME;
|
|
6663
|
+
}
|
|
6664
|
+
if (dom$8.ketchup.dates.isValid(value, defaultFormat, true)) {
|
|
6665
|
+
valueDate = dom$8.ketchup.dates.toDate(value, defaultFormat);
|
|
6666
|
+
}
|
|
6667
|
+
if (from != '') {
|
|
6668
|
+
if (valueDate != null &&
|
|
6669
|
+
dom$8.ketchup.dates.isValid(from, defaultFormat, true)) {
|
|
6670
|
+
checkByRegularExpression = false;
|
|
6671
|
+
let fromDate = dom$8.ketchup.dates.toDate(from, defaultFormat);
|
|
6672
|
+
if (valueDate < fromDate) {
|
|
6673
|
+
return false;
|
|
6674
|
+
}
|
|
6675
|
+
}
|
|
6676
|
+
else {
|
|
6677
|
+
filterValue = from;
|
|
6678
|
+
}
|
|
6679
|
+
}
|
|
6680
|
+
if (to != '') {
|
|
6681
|
+
if (valueDate != null &&
|
|
6682
|
+
dom$8.ketchup.dates.isValid(to, defaultFormat, true)) {
|
|
6683
|
+
checkByRegularExpression = false;
|
|
6684
|
+
let toDate = dom$8.ketchup.dates.toDate(to, defaultFormat);
|
|
6685
|
+
if (valueDate > toDate) {
|
|
6686
|
+
return false;
|
|
6687
|
+
}
|
|
6688
|
+
}
|
|
6689
|
+
else {
|
|
6690
|
+
filterValue = to;
|
|
6691
|
+
}
|
|
6692
|
+
}
|
|
6693
|
+
if (!dom$8.ketchup.dates.isValid(filterValue, defaultFormat) &&
|
|
6694
|
+
!dom$8.ketchup.dates.isValid(filterValue)) {
|
|
6695
|
+
value = dom$8.ketchup.dates.format(value);
|
|
6696
|
+
}
|
|
6697
|
+
}
|
|
6698
|
+
if (checkByRegularExpression) {
|
|
6699
|
+
return this.isFilterCompliantForValue(value, filterValue);
|
|
6700
|
+
}
|
|
6701
|
+
return true;
|
|
6702
|
+
}
|
|
6703
|
+
static valuesArrayContainsValue(values, value) {
|
|
6704
|
+
return Filters.indexOfValueInValuesArray(values, value) >= 0;
|
|
6705
|
+
}
|
|
6706
|
+
static indexOfValueInValuesArray(values, value) {
|
|
6707
|
+
if (values == null || values.length < 1) {
|
|
6708
|
+
return -1;
|
|
6709
|
+
}
|
|
6710
|
+
for (let i = 0; i < values.length; i++) {
|
|
6711
|
+
if (values[i].value == value) {
|
|
6712
|
+
return i;
|
|
6713
|
+
}
|
|
6714
|
+
}
|
|
6715
|
+
return -1;
|
|
6716
|
+
}
|
|
6717
|
+
}
|
|
6718
|
+
|
|
6719
|
+
const dom$7 = document.documentElement;
|
|
6720
|
+
const kupObjects = dom$7.ketchup
|
|
6721
|
+
? dom$7.ketchup.objects
|
|
6722
|
+
: new KupObjects();
|
|
6723
|
+
/**
|
|
6724
|
+
* Finds all the cells matching the filters criteria in the input dataset.
|
|
6725
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
6726
|
+
* @param {KupDataFindCellFilters} filters - Filters of the research.
|
|
6727
|
+
* @returns {KupDataCell[]} Array of cells fetched after applying the filters.
|
|
6728
|
+
*/
|
|
6729
|
+
function findCell(dataset, filters) {
|
|
6730
|
+
return dom$7.ketchup.data.finder(dataset, filters).cells;
|
|
6731
|
+
}
|
|
6732
|
+
/**
|
|
6733
|
+
* Returns all the cells values of the specified column, sorted if required.
|
|
6734
|
+
* @param {Array<KupDataRow>} dataset - Input dataset.
|
|
6735
|
+
* @param {KupDataColumn} column - Column included in the search. When missing, returns empty array.
|
|
6736
|
+
* @returns {ValueDisplayedValue[]} Values of the cells, sorted.
|
|
6737
|
+
*/
|
|
6738
|
+
function getCellValue(dataset, column, sorted) {
|
|
6739
|
+
const rows = dataset.rows;
|
|
6740
|
+
const values = new Array();
|
|
6741
|
+
const result = new Array();
|
|
6742
|
+
if (!rows || rows.length == 0 || !column) {
|
|
6743
|
+
return result;
|
|
6744
|
+
}
|
|
6745
|
+
extractColumnValues(rows, column, values);
|
|
6746
|
+
if (sorted == true) {
|
|
6747
|
+
values.sort((n1, n2) => {
|
|
6748
|
+
return compareValues(null, kupObjects.isDate(n1.obj)
|
|
6749
|
+
? n1.value
|
|
6750
|
+
: getValueForDisplay2(n1, column), null, kupObjects.isDate(n2.obj)
|
|
6751
|
+
? n2.value
|
|
6752
|
+
: getValueForDisplay2(n2, column), exports.SortMode.A);
|
|
6753
|
+
});
|
|
6754
|
+
}
|
|
6755
|
+
for (let i = 0; i < values.length; i++) {
|
|
6756
|
+
let v = values[i];
|
|
6757
|
+
result.push({ value: v.value, displayedValue: v.displayedValue });
|
|
6758
|
+
}
|
|
6759
|
+
return result;
|
|
6760
|
+
}
|
|
6761
|
+
function extractColumnValues(rows, column, values) {
|
|
6762
|
+
/** il valore delle righe attualmente filtrate, formattato */
|
|
6763
|
+
rows.forEach((row) => addColumnValueFromRow(values, column, row.cells[column.name]));
|
|
6764
|
+
return values;
|
|
6765
|
+
}
|
|
6766
|
+
function addColumnValueFromRow(values, column, cell) {
|
|
6767
|
+
if (cell) {
|
|
6768
|
+
let item = {
|
|
6769
|
+
value: cell.value,
|
|
6770
|
+
displayedValue: getCellValueForDisplay(column, cell),
|
|
6771
|
+
obj: cell.obj ? cell.obj : column.obj,
|
|
6772
|
+
};
|
|
6773
|
+
if (!Filters.valuesArrayContainsValue(values, cell.value)) {
|
|
6774
|
+
values.push(item);
|
|
6775
|
+
}
|
|
6776
|
+
}
|
|
6777
|
+
}
|
|
6778
|
+
/**
|
|
6779
|
+
* Overrides the given cell attributes for the specified columns.
|
|
6780
|
+
* If no columns are provided, the value will be applied to every column of the dataset.
|
|
6781
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
6782
|
+
* @param {KupDataCell} cell - New cell.
|
|
6783
|
+
* @param {string[]} columns - Columns to be handled.
|
|
6784
|
+
* @returns {KupDataCell[]} Replaced cells.
|
|
6785
|
+
*/
|
|
6786
|
+
function replaceCell(dataset, cell, columns) {
|
|
6787
|
+
const replaced = [];
|
|
6788
|
+
for (let index = 0; index < dataset.rows.length; index++) {
|
|
6789
|
+
const row = dataset.rows[index];
|
|
6790
|
+
const cells = row.cells;
|
|
6791
|
+
for (const key in cells) {
|
|
6792
|
+
if (!columns || !columns.length || columns.includes(key)) {
|
|
6793
|
+
cells[key] = Object.assign({}, cell);
|
|
6794
|
+
replaced.push(cells[key]);
|
|
6795
|
+
}
|
|
6796
|
+
}
|
|
6797
|
+
}
|
|
6798
|
+
return replaced;
|
|
6799
|
+
}
|
|
6800
|
+
|
|
6801
|
+
const dom$6 = document.documentElement;
|
|
6802
|
+
/**
|
|
6803
|
+
* Finds the columns matching the criteria specified in the filters argument.
|
|
6804
|
+
* @param {KupDataDataset | Column[]} dataset - Input dataset or array of columns.
|
|
6805
|
+
* @param {Partial<Column>} filters - Column interface containing the filters to match.
|
|
6806
|
+
* @returns {Column[]} Columns matching the criteria.
|
|
5543
6807
|
*/
|
|
5544
6808
|
function findColumns(dataset, filters) {
|
|
5545
6809
|
const columns = dataset.columns
|
|
@@ -5929,6 +7193,41 @@ function toStreamNode(nodes) {
|
|
|
5929
7193
|
}
|
|
5930
7194
|
return streamlined;
|
|
5931
7195
|
}
|
|
7196
|
+
/**
|
|
7197
|
+
* Gets information about the tree depth, such as max number of children and max depth.
|
|
7198
|
+
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
7199
|
+
* @returns {KupDataNodeDrilldownInfo} Information about the tree depth.
|
|
7200
|
+
*/
|
|
7201
|
+
function getDrilldownInfoNode(nodes) {
|
|
7202
|
+
let maxChildren = 0;
|
|
7203
|
+
let maxDepth = 0;
|
|
7204
|
+
const getDepth = function (n) {
|
|
7205
|
+
const depth = 0;
|
|
7206
|
+
if (n.children) {
|
|
7207
|
+
n.children.forEach(function (d) {
|
|
7208
|
+
getDepth(d);
|
|
7209
|
+
});
|
|
7210
|
+
}
|
|
7211
|
+
return depth;
|
|
7212
|
+
};
|
|
7213
|
+
const recursive = (arr) => {
|
|
7214
|
+
maxDepth++;
|
|
7215
|
+
for (let index = 0; index < arr.length; index++) {
|
|
7216
|
+
const node = arr[index];
|
|
7217
|
+
getDepth(node);
|
|
7218
|
+
if (Array.isArray(node.children) &&
|
|
7219
|
+
maxChildren < node.children.length) {
|
|
7220
|
+
maxChildren = node.children.length;
|
|
7221
|
+
recursive(node.children);
|
|
7222
|
+
}
|
|
7223
|
+
}
|
|
7224
|
+
};
|
|
7225
|
+
recursive(nodes);
|
|
7226
|
+
return {
|
|
7227
|
+
maxChildren,
|
|
7228
|
+
maxDepth,
|
|
7229
|
+
};
|
|
7230
|
+
}
|
|
5932
7231
|
/**
|
|
5933
7232
|
* Returns the parent of the given node.
|
|
5934
7233
|
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
@@ -5952,155 +7251,187 @@ function getParentNode(nodes, child) {
|
|
|
5952
7251
|
}
|
|
5953
7252
|
}
|
|
5954
7253
|
return parent;
|
|
7254
|
+
}
|
|
7255
|
+
/**
|
|
7256
|
+
* Returns the node with id equal to the given value.
|
|
7257
|
+
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
7258
|
+
* @param {string} treeNodePath - Tree node path.
|
|
7259
|
+
* @returns {KupDataNode} Node.
|
|
7260
|
+
*/
|
|
7261
|
+
function getNodeByPath(nodes, treeNodePath) {
|
|
7262
|
+
if (!nodes || nodes.length == 0) {
|
|
7263
|
+
return undefined;
|
|
7264
|
+
}
|
|
7265
|
+
if (!treeNodePath || treeNodePath.length == 0) {
|
|
7266
|
+
return undefined;
|
|
7267
|
+
}
|
|
7268
|
+
return _getNodeByPath(nodes, treeNodePath);
|
|
7269
|
+
}
|
|
7270
|
+
function _getNodeByPath(nodes, path) {
|
|
7271
|
+
let node = null;
|
|
7272
|
+
for (let j = 0; j < path.length; j++) {
|
|
7273
|
+
const i = path[j];
|
|
7274
|
+
node = _getNode(nodes, node, i);
|
|
7275
|
+
}
|
|
7276
|
+
return node;
|
|
7277
|
+
}
|
|
7278
|
+
function _getNode(nodes, node, index) {
|
|
7279
|
+
if (node == null) {
|
|
7280
|
+
return nodes[index];
|
|
7281
|
+
}
|
|
7282
|
+
else {
|
|
7283
|
+
return node.children[index];
|
|
7284
|
+
}
|
|
5955
7285
|
}
|
|
5956
7286
|
|
|
7287
|
+
const autoCenterComps = [exports.KupTagNames.DATA_TABLE, exports.KupTagNames.TREE];
|
|
7288
|
+
const fullWidthFieldsComps = [exports.KupTagNames.DATA_TABLE, exports.KupTagNames.TREE];
|
|
5957
7289
|
/**
|
|
5958
|
-
*
|
|
5959
|
-
* Used to export every prop in an object.
|
|
7290
|
+
* Supported cell events.
|
|
5960
7291
|
*/
|
|
5961
|
-
exports.
|
|
5962
|
-
(function (
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
KupDataTableProps["dropEnabled"] = "Enables drop.";
|
|
5969
|
-
KupDataTableProps["editableData"] = "When set to true, editable cells will be rendered using input components.";
|
|
5970
|
-
KupDataTableProps["emptyDataLabel"] = "Defines the label to show when the table is empty.";
|
|
5971
|
-
KupDataTableProps["enableColumnsFormula"] = "Enables the choice to set formulas on columns by dragging them into different columns.";
|
|
5972
|
-
KupDataTableProps["enableMergeColumns"] = "Enables the merging of columns by dragging them into different columns.";
|
|
5973
|
-
KupDataTableProps["enableExtraColumns"] = "Enables adding extra columns.";
|
|
5974
|
-
KupDataTableProps["enableSortableColumns"] = "Enables the sorting of columns by dragging them into different columns.";
|
|
5975
|
-
KupDataTableProps["expandGroups"] = "Expands groups when set to true.";
|
|
5976
|
-
KupDataTableProps["filters"] = "List of filters set by the user.";
|
|
5977
|
-
KupDataTableProps["fixedColumns"] = "Fixes the given number of columns so that they stay visible when horizontally scrolling the data-table. If grouping is active or the value of the prop is <= 0, this prop will have no effect. Can be combined with fixedRows.";
|
|
5978
|
-
KupDataTableProps["fixedRows"] = "Fixes the given number of rows so that they stay visible when vertically scrolling the data-table. If grouping is active or the value of the prop is <= 0, this prop will have no effect. Can be combined with fixedColumns.";
|
|
5979
|
-
KupDataTableProps["forceOneLine"] = "Forces cells with long text and a fixed column size to have an ellipsis set on their text. The reflect attribute is mandatory to allow styling.";
|
|
5980
|
-
KupDataTableProps["globalFilter"] = "When set to true it activates the global filter.";
|
|
5981
|
-
KupDataTableProps["globalFilterValue"] = "The value of the global filter.";
|
|
5982
|
-
KupDataTableProps["groupLabelDisplay"] = "How the label of a group must be displayed. For available values";
|
|
5983
|
-
KupDataTableProps["groups"] = "The list of groups.";
|
|
5984
|
-
KupDataTableProps["headerIsPersistent"] = "When set to true the header will stick on top of the table when scrolling.";
|
|
5985
|
-
KupDataTableProps["isFocusable"] = "When set to true, clicked-on rows will have a visual feedback.";
|
|
5986
|
-
KupDataTableProps["lazyLoadRows"] = "When set to true, extra rows will be automatically loaded once the last row enters the viewport. When groups are present, the number of rows is referred to groups and not to their content. Paginator is disabled.";
|
|
5987
|
-
KupDataTableProps["lineBreakCharacter"] = "Defines the placeholder character which will be replaced by a line break inside table header cells, normal or sticky.";
|
|
5988
|
-
KupDataTableProps["loadMoreLimit"] = "Sets a maximum limit of new records which can be required by the load more functionality.";
|
|
5989
|
-
KupDataTableProps["loadMoreMode"] = "Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.";
|
|
5990
|
-
KupDataTableProps["loadMoreStep"] = "The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.";
|
|
5991
|
-
KupDataTableProps["multiSelection"] = "When set to true enables rows multi selection.";
|
|
5992
|
-
KupDataTableProps["pageSelected"] = "Current selected page set on component load";
|
|
5993
|
-
KupDataTableProps["paginatorPos"] = "Sets the position of the paginator. Available positions: top, bottom or both.";
|
|
5994
|
-
KupDataTableProps["removableColumns"] = "Sets the possibility to remove the selected column.";
|
|
5995
|
-
KupDataTableProps["resizableColumns"] = "Gives the possibility to resize columns by dragging on their right edge.";
|
|
5996
|
-
KupDataTableProps["rowActions"] = "Sets the actions of the rows.";
|
|
5997
|
-
KupDataTableProps["rowsPerPage"] = "Sets the number of rows per page to display.";
|
|
5998
|
-
KupDataTableProps["scrollOnHover"] = "Activates the scroll on hover function.";
|
|
5999
|
-
KupDataTableProps["showCustomization"] = "If set to true, displays the button to open the customization panel.";
|
|
6000
|
-
KupDataTableProps["showFilters"] = "When set to true enables the column filters.";
|
|
6001
|
-
KupDataTableProps["showFooter"] = "When set to true shows the footer.";
|
|
6002
|
-
KupDataTableProps["showGrid"] = "Can be used to customize the grid view of the table.";
|
|
6003
|
-
KupDataTableProps["showGroups"] = "When set to true enables the column grouping.";
|
|
6004
|
-
KupDataTableProps["showHeader"] = "Enables rendering of the table header.";
|
|
6005
|
-
KupDataTableProps["showLoadMore"] = "If set to true, displays the button to load more records.";
|
|
6006
|
-
KupDataTableProps["sort"] = "Defines the current sorting options.";
|
|
6007
|
-
KupDataTableProps["stateId"] = "";
|
|
6008
|
-
KupDataTableProps["store"] = "";
|
|
6009
|
-
KupDataTableProps["sortableColumnsMutateData"] = "If set to true, when a column is dragged to be sorted, the component directly mutates the data.columns property and then fires the event";
|
|
6010
|
-
KupDataTableProps["sortEnabled"] = "When set to true enables the sorting of the columns by clicking on the column header.";
|
|
6011
|
-
KupDataTableProps["tableHeight"] = "Sets the height of the table.";
|
|
6012
|
-
KupDataTableProps["tableWidth"] = "Sets the width of the table.";
|
|
6013
|
-
KupDataTableProps["totals"] = "Defines the current totals options.";
|
|
6014
|
-
KupDataTableProps["transpose"] = "Transposes the data of the data table.";
|
|
6015
|
-
})(exports.KupDataTableProps || (exports.KupDataTableProps = {}));
|
|
6016
|
-
exports.SortMode = void 0;
|
|
6017
|
-
(function (SortMode) {
|
|
6018
|
-
SortMode["A"] = "A";
|
|
6019
|
-
SortMode["D"] = "D";
|
|
6020
|
-
})(exports.SortMode || (exports.SortMode = {}));
|
|
6021
|
-
exports.TotalMode = void 0;
|
|
6022
|
-
(function (TotalMode) {
|
|
6023
|
-
TotalMode["COUNT"] = "Count";
|
|
6024
|
-
TotalMode["SUM"] = "Sum";
|
|
6025
|
-
TotalMode["MIN"] = "Min";
|
|
6026
|
-
TotalMode["MAX"] = "Max";
|
|
6027
|
-
TotalMode["DISTINCT"] = "Distinct";
|
|
6028
|
-
TotalMode["AVERAGE"] = "Average";
|
|
6029
|
-
TotalMode["MATH"] = "MATH";
|
|
6030
|
-
})(exports.TotalMode || (exports.TotalMode = {}));
|
|
6031
|
-
exports.TotalLabel = void 0;
|
|
6032
|
-
(function (TotalLabel) {
|
|
6033
|
-
TotalLabel["COUNT"] = "Count";
|
|
6034
|
-
TotalLabel["SUM"] = "Sum";
|
|
6035
|
-
TotalLabel["MIN"] = "Min";
|
|
6036
|
-
TotalLabel["MAX"] = "Max";
|
|
6037
|
-
TotalLabel["DISTINCT"] = "Distinct";
|
|
6038
|
-
TotalLabel["AVERAGE"] = "Average";
|
|
6039
|
-
TotalLabel["MATH"] = "Formula";
|
|
6040
|
-
TotalLabel["CANC"] = "Cancel";
|
|
6041
|
-
TotalLabel["CALC"] = "Calculate";
|
|
6042
|
-
})(exports.TotalLabel || (exports.TotalLabel = {}));
|
|
6043
|
-
exports.PaginatorPos = void 0;
|
|
6044
|
-
(function (PaginatorPos) {
|
|
6045
|
-
PaginatorPos["TOP"] = "Top";
|
|
6046
|
-
PaginatorPos["BOTTOM"] = "Bottom";
|
|
6047
|
-
PaginatorPos["BOTH"] = "Both";
|
|
6048
|
-
})(exports.PaginatorPos || (exports.PaginatorPos = {}));
|
|
6049
|
-
exports.ShowGrid = void 0;
|
|
6050
|
-
(function (ShowGrid) {
|
|
6051
|
-
ShowGrid["NONE"] = "None";
|
|
6052
|
-
ShowGrid["ROW"] = "Row";
|
|
6053
|
-
ShowGrid["COL"] = "Col";
|
|
6054
|
-
ShowGrid["COMPLETE"] = "Complete";
|
|
6055
|
-
})(exports.ShowGrid || (exports.ShowGrid = {}));
|
|
6056
|
-
// export enum RowActionType {
|
|
6057
|
-
// DEFAULT = 'Default',
|
|
6058
|
-
// VARIABLE = 'Variable',
|
|
6059
|
-
// }
|
|
6060
|
-
//---- *NEXT functionality AKA load more ----
|
|
6061
|
-
exports.LoadMoreMode = void 0;
|
|
6062
|
-
(function (LoadMoreMode) {
|
|
6063
|
-
LoadMoreMode["CONSTANT"] = "constant";
|
|
6064
|
-
LoadMoreMode["CONSTANT_INCREMENT"] = "constant_increment";
|
|
6065
|
-
LoadMoreMode["PROGRESSIVE_THRESHOLD"] = "progressive_threshold";
|
|
6066
|
-
})(exports.LoadMoreMode || (exports.LoadMoreMode = {}));
|
|
6067
|
-
//---- Group label display functionality ----
|
|
7292
|
+
exports.FCellEvents = void 0;
|
|
7293
|
+
(function (FCellEvents) {
|
|
7294
|
+
FCellEvents["CLICK"] = "kup-cell-click";
|
|
7295
|
+
FCellEvents["ICON_CLICK"] = "kup-cell-iconclick";
|
|
7296
|
+
FCellEvents["INPUT"] = "kup-cell-input";
|
|
7297
|
+
FCellEvents["UPDATE"] = "kup-cell-update";
|
|
7298
|
+
})(exports.FCellEvents || (exports.FCellEvents = {}));
|
|
6068
7299
|
/**
|
|
6069
|
-
*
|
|
6070
|
-
* @enum
|
|
6071
|
-
* @property {string} BOTH - Shows both the column label and the value. This is the default.
|
|
6072
|
-
* @property {string} LABEL - Shows only the columns label.
|
|
6073
|
-
* @property {string} VALUE - Shows only the value.
|
|
6074
|
-
* @readonly
|
|
7300
|
+
* Supported cell padding.
|
|
6075
7301
|
*/
|
|
6076
|
-
exports.
|
|
6077
|
-
(function (
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
const FixedCellsClasses = {
|
|
6084
|
-
columns: 'fixed-column',
|
|
6085
|
-
rows: 'fixed-row',
|
|
6086
|
-
};
|
|
6087
|
-
const FixedCellsCSSVarsBase = {
|
|
6088
|
-
columns: '--ddt_column-left-',
|
|
6089
|
-
rows: '--ddt_row-top-',
|
|
6090
|
-
};
|
|
7302
|
+
exports.FCellPadding = void 0;
|
|
7303
|
+
(function (FCellPadding) {
|
|
7304
|
+
FCellPadding["DENSE"] = "dense";
|
|
7305
|
+
FCellPadding["MEDIUM"] = "medium";
|
|
7306
|
+
FCellPadding["NONE"] = "";
|
|
7307
|
+
FCellPadding["WIDE"] = "wide";
|
|
7308
|
+
})(exports.FCellPadding || (exports.FCellPadding = {}));
|
|
6091
7309
|
/**
|
|
6092
|
-
*
|
|
7310
|
+
* Supported cell CSS classes.
|
|
6093
7311
|
*/
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
7312
|
+
exports.FCellClasses = void 0;
|
|
7313
|
+
(function (FCellClasses) {
|
|
7314
|
+
FCellClasses["BG_DANGER"] = "danger-bg";
|
|
7315
|
+
FCellClasses["BG_GREEN"] = "green-bg";
|
|
7316
|
+
FCellClasses["BG_GREY"] = "grey-bg";
|
|
7317
|
+
FCellClasses["BG_ORANGE"] = "orange-bg";
|
|
7318
|
+
FCellClasses["BG_PURPLE"] = "purple-bg";
|
|
7319
|
+
FCellClasses["BG_SUCCESS"] = "success-bg";
|
|
7320
|
+
FCellClasses["BG_TEAL"] = "teal-bg";
|
|
7321
|
+
FCellClasses["BG_WARNING"] = "warning-bg";
|
|
7322
|
+
FCellClasses["C_BG_DANGER"] = "c-danger-bg";
|
|
7323
|
+
FCellClasses["C_BG_GREEN"] = "c-green-bg";
|
|
7324
|
+
FCellClasses["C_BG_GREY"] = "c-grey-bg";
|
|
7325
|
+
FCellClasses["C_BG_ORANGE"] = "c-orange-bg";
|
|
7326
|
+
FCellClasses["C_BG_PURPLE"] = "c-purple-bg";
|
|
7327
|
+
FCellClasses["C_BG_SUCCESS"] = "c-success-bg";
|
|
7328
|
+
FCellClasses["C_BG_TEAL"] = "c-teal-bg";
|
|
7329
|
+
FCellClasses["C_BG_WARNING"] = "c-warning-bg";
|
|
7330
|
+
FCellClasses["C_CENTERED"] = "c-centered";
|
|
7331
|
+
FCellClasses["C_FITTED"] = "c-fitted";
|
|
7332
|
+
FCellClasses["C_PADDED"] = "c-padded";
|
|
7333
|
+
FCellClasses["C_PADDED_HOR"] = "c-padded-hor";
|
|
7334
|
+
FCellClasses["C_PADDED_VER"] = "c-padded-ver";
|
|
7335
|
+
FCellClasses["C_ROUND"] = "c-round";
|
|
7336
|
+
FCellClasses["C_RIGHT_ALIGNED"] = "c-right-aligned";
|
|
7337
|
+
FCellClasses["C_SHAPED"] = "c-shaped";
|
|
7338
|
+
FCellClasses["C_TEXT_VERTICAL"] = "c-vertical-text";
|
|
7339
|
+
FCellClasses["CLICKABLE"] = "clickable";
|
|
7340
|
+
FCellClasses["HOVER_DISPLAY"] = "display-on-hover";
|
|
7341
|
+
FCellClasses["HOVER_EXPAND"] = "expand-on-hover";
|
|
7342
|
+
FCellClasses["HOVER_REDUCE"] = "reduce-on-hover";
|
|
7343
|
+
FCellClasses["INDICATOR_TOPRIGHT"] = "top-right-indicator";
|
|
7344
|
+
FCellClasses["LINK"] = "link";
|
|
7345
|
+
FCellClasses["MONOSPACE"] = "monospace";
|
|
7346
|
+
FCellClasses["OBJ"] = "obj";
|
|
7347
|
+
FCellClasses["SHAPED"] = "shaped";
|
|
7348
|
+
FCellClasses["TEXT_DANGER"] = "danger-text";
|
|
7349
|
+
FCellClasses["TEXT_INFO"] = "info-text";
|
|
7350
|
+
FCellClasses["TEXT_PRIMARY"] = "primary-text";
|
|
7351
|
+
FCellClasses["TEXT_PURPLE"] = "purple-text";
|
|
7352
|
+
FCellClasses["TEXT_SECONDARY"] = "secondary-text";
|
|
7353
|
+
FCellClasses["TEXT_STRONG"] = "strong-text";
|
|
7354
|
+
FCellClasses["TEXT_SUCCESS"] = "success-text";
|
|
7355
|
+
FCellClasses["TEXT_WARNING"] = "warning-text";
|
|
7356
|
+
FCellClasses["UNDERLINED"] = "underlined";
|
|
7357
|
+
})(exports.FCellClasses || (exports.FCellClasses = {}));
|
|
7358
|
+
/**
|
|
7359
|
+
* Supported cell shapes.
|
|
7360
|
+
*/
|
|
7361
|
+
var FCellShapes;
|
|
7362
|
+
(function (FCellShapes) {
|
|
7363
|
+
FCellShapes["AUTOCOMPLETE"] = "ACP";
|
|
7364
|
+
FCellShapes["BUTTON_LIST"] = "BTN";
|
|
7365
|
+
FCellShapes["CHART"] = "GRA";
|
|
7366
|
+
FCellShapes["CHECKBOX"] = "CHK";
|
|
7367
|
+
FCellShapes["CHIP"] = "CHI";
|
|
7368
|
+
FCellShapes["COLOR_PICKER"] = "CLP";
|
|
7369
|
+
FCellShapes["COMBOBOX"] = "CMB";
|
|
7370
|
+
FCellShapes["EDITOR"] = "EDT";
|
|
7371
|
+
FCellShapes["GAUGE"] = "GAU";
|
|
7372
|
+
FCellShapes["IMAGE"] = "IMG";
|
|
7373
|
+
FCellShapes["KNOB"] = "KNB";
|
|
7374
|
+
FCellShapes["PROGRESS_BAR"] = "PGB";
|
|
7375
|
+
FCellShapes["RADIO"] = "RAD";
|
|
7376
|
+
FCellShapes["RATING"] = "RTG";
|
|
7377
|
+
FCellShapes["SWITCH"] = "SWT";
|
|
7378
|
+
FCellShapes["TEXT_FIELD"] = "ITX";
|
|
7379
|
+
})(FCellShapes || (FCellShapes = {}));
|
|
7380
|
+
/**
|
|
7381
|
+
* Supported cell types.
|
|
7382
|
+
*/
|
|
7383
|
+
exports.FCellTypes = void 0;
|
|
7384
|
+
(function (FCellTypes) {
|
|
7385
|
+
FCellTypes["AUTOCOMPLETE"] = "autocomplete";
|
|
7386
|
+
FCellTypes["BAR"] = "bar";
|
|
7387
|
+
FCellTypes["BUTTON"] = "button";
|
|
7388
|
+
FCellTypes["BUTTON_LIST"] = "button-list";
|
|
7389
|
+
FCellTypes["CHART"] = "chart";
|
|
7390
|
+
FCellTypes["CHECKBOX"] = "checkbox";
|
|
7391
|
+
FCellTypes["CHIP"] = "chips";
|
|
7392
|
+
FCellTypes["COLOR_PICKER"] = "color-picker";
|
|
7393
|
+
FCellTypes["COMBOBOX"] = "combobox";
|
|
7394
|
+
FCellTypes["DATE"] = "date";
|
|
7395
|
+
FCellTypes["DATETIME"] = "datetime";
|
|
7396
|
+
FCellTypes["EDITOR"] = "editor";
|
|
7397
|
+
FCellTypes["GAUGE"] = "gauge";
|
|
7398
|
+
FCellTypes["ICON"] = "icon";
|
|
7399
|
+
FCellTypes["IMAGE"] = "image";
|
|
7400
|
+
FCellTypes["KNOB"] = "knob";
|
|
7401
|
+
FCellTypes["LINK"] = "link";
|
|
7402
|
+
FCellTypes["NUMBER"] = "number";
|
|
7403
|
+
FCellTypes["PROGRESS_BAR"] = "progress-bar";
|
|
7404
|
+
FCellTypes["RADIO"] = "radio";
|
|
7405
|
+
FCellTypes["RATING"] = "rating";
|
|
7406
|
+
FCellTypes["STRING"] = "string";
|
|
7407
|
+
FCellTypes["SWITCH"] = "switch";
|
|
7408
|
+
FCellTypes["TIME"] = "time";
|
|
7409
|
+
})(exports.FCellTypes || (exports.FCellTypes = {}));
|
|
7410
|
+
const editableTypes = [
|
|
7411
|
+
exports.FCellTypes.AUTOCOMPLETE,
|
|
7412
|
+
exports.FCellTypes.CHECKBOX,
|
|
7413
|
+
exports.FCellTypes.COLOR_PICKER,
|
|
7414
|
+
exports.FCellTypes.COMBOBOX,
|
|
7415
|
+
exports.FCellTypes.DATE,
|
|
7416
|
+
exports.FCellTypes.NUMBER,
|
|
7417
|
+
exports.FCellTypes.RATING,
|
|
7418
|
+
exports.FCellTypes.STRING,
|
|
7419
|
+
exports.FCellTypes.SWITCH,
|
|
7420
|
+
exports.FCellTypes.TIME,
|
|
7421
|
+
];
|
|
7422
|
+
const kupTypes = [
|
|
7423
|
+
exports.FCellTypes.BAR,
|
|
7424
|
+
exports.FCellTypes.BUTTON,
|
|
7425
|
+
exports.FCellTypes.BUTTON_LIST,
|
|
7426
|
+
exports.FCellTypes.CHART,
|
|
7427
|
+
exports.FCellTypes.CHIP,
|
|
7428
|
+
exports.FCellTypes.COLOR_PICKER,
|
|
7429
|
+
exports.FCellTypes.GAUGE,
|
|
7430
|
+
exports.FCellTypes.KNOB,
|
|
7431
|
+
exports.FCellTypes.PROGRESS_BAR,
|
|
7432
|
+
exports.FCellTypes.RADIO,
|
|
7433
|
+
exports.FCellTypes.RATING,
|
|
7434
|
+
];
|
|
6104
7435
|
|
|
6105
7436
|
const dom$4 = document.documentElement;
|
|
6106
7437
|
/**
|
|
@@ -6113,12 +7444,105 @@ class KupData {
|
|
|
6113
7444
|
find(dataset, filters) {
|
|
6114
7445
|
return findCell(dataset, filters);
|
|
6115
7446
|
},
|
|
6116
|
-
getValue(dataset,
|
|
6117
|
-
return getCellValue(dataset,
|
|
7447
|
+
getValue(dataset, column, sorted) {
|
|
7448
|
+
return getCellValue(dataset, column, sorted);
|
|
6118
7449
|
},
|
|
6119
7450
|
replace(dataset, cell, columns) {
|
|
6120
7451
|
return replaceCell(dataset, cell, columns);
|
|
6121
7452
|
},
|
|
7453
|
+
getType(cell, shape) {
|
|
7454
|
+
const obj = cell.obj;
|
|
7455
|
+
if (shape) {
|
|
7456
|
+
switch (shape.toUpperCase()) {
|
|
7457
|
+
case FCellShapes.AUTOCOMPLETE:
|
|
7458
|
+
return exports.FCellTypes.AUTOCOMPLETE;
|
|
7459
|
+
case FCellShapes.BUTTON_LIST:
|
|
7460
|
+
return exports.FCellTypes.BUTTON_LIST;
|
|
7461
|
+
case FCellShapes.CHART:
|
|
7462
|
+
return exports.FCellTypes.CHART;
|
|
7463
|
+
case FCellShapes.CHECKBOX:
|
|
7464
|
+
return exports.FCellTypes.CHECKBOX;
|
|
7465
|
+
case FCellShapes.CHIP:
|
|
7466
|
+
return exports.FCellTypes.CHIP;
|
|
7467
|
+
case FCellShapes.COLOR_PICKER:
|
|
7468
|
+
return exports.FCellTypes.COLOR_PICKER;
|
|
7469
|
+
case FCellShapes.COMBOBOX:
|
|
7470
|
+
return exports.FCellTypes.COMBOBOX;
|
|
7471
|
+
case FCellShapes.EDITOR:
|
|
7472
|
+
return exports.FCellTypes.EDITOR;
|
|
7473
|
+
case FCellShapes.GAUGE:
|
|
7474
|
+
return exports.FCellTypes.GAUGE;
|
|
7475
|
+
case FCellShapes.IMAGE:
|
|
7476
|
+
return exports.FCellTypes.IMAGE;
|
|
7477
|
+
case FCellShapes.KNOB:
|
|
7478
|
+
return exports.FCellTypes.KNOB;
|
|
7479
|
+
case FCellShapes.PROGRESS_BAR:
|
|
7480
|
+
return exports.FCellTypes.PROGRESS_BAR;
|
|
7481
|
+
case FCellShapes.RADIO:
|
|
7482
|
+
return exports.FCellTypes.RADIO;
|
|
7483
|
+
case FCellShapes.RATING:
|
|
7484
|
+
return exports.FCellTypes.RATING;
|
|
7485
|
+
case FCellShapes.SWITCH:
|
|
7486
|
+
return exports.FCellTypes.SWITCH;
|
|
7487
|
+
case FCellShapes.TEXT_FIELD:
|
|
7488
|
+
return exports.FCellTypes.STRING;
|
|
7489
|
+
}
|
|
7490
|
+
}
|
|
7491
|
+
if (dom$4.ketchup.objects.isBar(obj)) {
|
|
7492
|
+
return exports.FCellTypes.BAR;
|
|
7493
|
+
}
|
|
7494
|
+
else if (dom$4.ketchup.objects.isButton(obj)) {
|
|
7495
|
+
return exports.FCellTypes.BUTTON;
|
|
7496
|
+
}
|
|
7497
|
+
else if (dom$4.ketchup.objects.isChart(obj)) {
|
|
7498
|
+
return exports.FCellTypes.CHART;
|
|
7499
|
+
}
|
|
7500
|
+
else if (dom$4.ketchup.objects.isCheckbox(obj)) {
|
|
7501
|
+
return exports.FCellTypes.CHECKBOX;
|
|
7502
|
+
}
|
|
7503
|
+
else if (dom$4.ketchup.objects.isColor(obj)) {
|
|
7504
|
+
return exports.FCellTypes.COLOR_PICKER;
|
|
7505
|
+
}
|
|
7506
|
+
else if (dom$4.ketchup.objects.isIcon(obj)) {
|
|
7507
|
+
return exports.FCellTypes.ICON;
|
|
7508
|
+
}
|
|
7509
|
+
else if (dom$4.ketchup.objects.isImage(obj)) {
|
|
7510
|
+
return exports.FCellTypes.IMAGE;
|
|
7511
|
+
}
|
|
7512
|
+
else if (dom$4.ketchup.objects.isLink(obj)) {
|
|
7513
|
+
return exports.FCellTypes.LINK;
|
|
7514
|
+
}
|
|
7515
|
+
else if (dom$4.ketchup.objects.isProgressBar(obj)) {
|
|
7516
|
+
return exports.FCellTypes.PROGRESS_BAR;
|
|
7517
|
+
}
|
|
7518
|
+
else if (dom$4.ketchup.objects.isRadio(obj)) {
|
|
7519
|
+
return exports.FCellTypes.RADIO;
|
|
7520
|
+
}
|
|
7521
|
+
else if (dom$4.ketchup.objects.isSwitch(obj)) {
|
|
7522
|
+
return exports.FCellTypes.SWITCH;
|
|
7523
|
+
}
|
|
7524
|
+
else if (dom$4.ketchup.objects.isKupObjList(obj)) {
|
|
7525
|
+
return exports.FCellTypes.CHIP;
|
|
7526
|
+
}
|
|
7527
|
+
else if (dom$4.ketchup.objects.isNumber(obj)) {
|
|
7528
|
+
return exports.FCellTypes.NUMBER;
|
|
7529
|
+
}
|
|
7530
|
+
else if (dom$4.ketchup.objects.isDate(obj)) {
|
|
7531
|
+
return exports.FCellTypes.DATE;
|
|
7532
|
+
}
|
|
7533
|
+
else if (dom$4.ketchup.objects.isTimestamp(obj)) {
|
|
7534
|
+
return exports.FCellTypes.DATETIME;
|
|
7535
|
+
}
|
|
7536
|
+
else if (dom$4.ketchup.objects.isTime(obj)) {
|
|
7537
|
+
return exports.FCellTypes.TIME;
|
|
7538
|
+
}
|
|
7539
|
+
else if (dom$4.ketchup.objects.isVoCodver(obj)) {
|
|
7540
|
+
return exports.FCellTypes.ICON;
|
|
7541
|
+
}
|
|
7542
|
+
else {
|
|
7543
|
+
return exports.FCellTypes.STRING;
|
|
7544
|
+
}
|
|
7545
|
+
},
|
|
6122
7546
|
};
|
|
6123
7547
|
this.column = {
|
|
6124
7548
|
find(dataset, filters) {
|
|
@@ -6132,9 +7556,23 @@ class KupData {
|
|
|
6132
7556
|
},
|
|
6133
7557
|
};
|
|
6134
7558
|
this.node = {
|
|
7559
|
+
getDrilldownInfo(nodes) {
|
|
7560
|
+
return getDrilldownInfoNode(nodes);
|
|
7561
|
+
},
|
|
6135
7562
|
getParent(nodes, child) {
|
|
6136
7563
|
return getParentNode(nodes, child);
|
|
6137
7564
|
},
|
|
7565
|
+
find(nodes, treeNodePath) {
|
|
7566
|
+
return getNodeByPath(nodes, treeNodePath);
|
|
7567
|
+
},
|
|
7568
|
+
findByStrTreeNodePath(nodes, treeNodePath) {
|
|
7569
|
+
const split = treeNodePath.split(',');
|
|
7570
|
+
const path = [];
|
|
7571
|
+
for (let i = 0; i < split.length; i++) {
|
|
7572
|
+
path.push(Number(split[i]));
|
|
7573
|
+
}
|
|
7574
|
+
return getNodeByPath(nodes, path);
|
|
7575
|
+
},
|
|
6138
7576
|
remove(nodes, node2remove) {
|
|
6139
7577
|
return removeNode(nodes, node2remove);
|
|
6140
7578
|
},
|
|
@@ -6364,9 +7802,9 @@ class KupData {
|
|
|
6364
7802
|
};
|
|
6365
7803
|
const length = dataset.rows.length;
|
|
6366
7804
|
// sort all columns values by descending
|
|
6367
|
-
let values = getCellValue(dataset, [
|
|
7805
|
+
let values = getCellValue(dataset, this.column.find(dataset, { name: headerColumn })[0]);
|
|
6368
7806
|
values.sort(function (a, b) {
|
|
6369
|
-
return Number(a) - Number(b);
|
|
7807
|
+
return Number(a.value) - Number(b.value);
|
|
6370
7808
|
});
|
|
6371
7809
|
values.reverse();
|
|
6372
7810
|
// excluding duplicates values.
|
|
@@ -6378,7 +7816,7 @@ class KupData {
|
|
|
6378
7816
|
let rightIdx = idx + 1;
|
|
6379
7817
|
// sort the rows like a "mountain", the greatest is in the middle and the other ones are splitted left and right
|
|
6380
7818
|
for (let i = 0; i < length; i++) {
|
|
6381
|
-
const value = values[i];
|
|
7819
|
+
const value = values[i].value;
|
|
6382
7820
|
// looping the rows because we have many rows with same value.
|
|
6383
7821
|
this.finder(dataset, {
|
|
6384
7822
|
columns: [headerColumn],
|
|
@@ -6521,39 +7959,6 @@ createCommonjsModule(function (module, exports) {
|
|
|
6521
7959
|
!function(e,_){module.exports=_(dayjs_min);}(commonjsGlobal,(function(e){function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"zh",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,_){return "W"===_?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s后",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,_){var t=100*e+_;return t<600?"凌晨":t<900?"早上":t<1100?"上午":t<1300?"中午":t<1800?"下午":"晚上"}};return t.default.locale(d,null,!0),d}));
|
|
6522
7960
|
});
|
|
6523
7961
|
|
|
6524
|
-
/**
|
|
6525
|
-
* Normalization types.
|
|
6526
|
-
*/
|
|
6527
|
-
exports.KupDatesNormalize = void 0;
|
|
6528
|
-
(function (KupDatesNormalize) {
|
|
6529
|
-
KupDatesNormalize["DATE"] = "date";
|
|
6530
|
-
KupDatesNormalize["TIME"] = "time";
|
|
6531
|
-
KupDatesNormalize["TIMESTAMP"] = "timestamp";
|
|
6532
|
-
})(exports.KupDatesNormalize || (exports.KupDatesNormalize = {}));
|
|
6533
|
-
/**
|
|
6534
|
-
* Common use formats
|
|
6535
|
-
*/
|
|
6536
|
-
exports.KupDatesFormats = void 0;
|
|
6537
|
-
(function (KupDatesFormats) {
|
|
6538
|
-
KupDatesFormats["ISO_DATE"] = "YYYY-MM-DD";
|
|
6539
|
-
KupDatesFormats["ISO_DATE_TIME"] = "YYYY-MM-DD HH:mm:ss";
|
|
6540
|
-
KupDatesFormats["ISO_TIME"] = "HH:mm:ss";
|
|
6541
|
-
KupDatesFormats["ISO_TIME_WITHOUT_SECONDS"] = "HH:mm";
|
|
6542
|
-
})(exports.KupDatesFormats || (exports.KupDatesFormats = {}));
|
|
6543
|
-
/**
|
|
6544
|
-
* Supported locales.
|
|
6545
|
-
*/
|
|
6546
|
-
exports.KupDatesLocales = void 0;
|
|
6547
|
-
(function (KupDatesLocales) {
|
|
6548
|
-
KupDatesLocales["CHINESE"] = "cn";
|
|
6549
|
-
KupDatesLocales["ENGLISH"] = "en";
|
|
6550
|
-
KupDatesLocales["FRENCH"] = "fr";
|
|
6551
|
-
KupDatesLocales["ITALIAN"] = "it";
|
|
6552
|
-
KupDatesLocales["POLISH"] = "pl";
|
|
6553
|
-
KupDatesLocales["RUSSIAN"] = "ru";
|
|
6554
|
-
KupDatesLocales["SPANISH"] = "es";
|
|
6555
|
-
})(exports.KupDatesLocales || (exports.KupDatesLocales = {}));
|
|
6556
|
-
|
|
6557
7962
|
/**
|
|
6558
7963
|
* Handles operations and formatting of dates.
|
|
6559
7964
|
* @module KupDates
|
|
@@ -16685,14 +18090,34 @@ function kupManagerInstance() {
|
|
|
16685
18090
|
return dom.ketchup;
|
|
16686
18091
|
}
|
|
16687
18092
|
|
|
18093
|
+
exports.Filters = Filters;
|
|
16688
18094
|
exports.FixedCellsCSSVarsBase = FixedCellsCSSVarsBase;
|
|
16689
18095
|
exports.FixedCellsClasses = FixedCellsClasses;
|
|
18096
|
+
exports.KupData = KupData;
|
|
16690
18097
|
exports.KupDates = KupDates;
|
|
16691
18098
|
exports.KupObjects = KupObjects;
|
|
18099
|
+
exports.addColumnValueFromRow = addColumnValueFromRow;
|
|
18100
|
+
exports.autoCenterComps = autoCenterComps;
|
|
18101
|
+
exports.compareCell = compareCell;
|
|
16692
18102
|
exports.createCommonjsModule = createCommonjsModule;
|
|
18103
|
+
exports.editableTypes = editableTypes;
|
|
16693
18104
|
exports.fieldColumn = fieldColumn;
|
|
18105
|
+
exports.formatTime = formatTime;
|
|
18106
|
+
exports.formatToNumber = formatToNumber;
|
|
18107
|
+
exports.formattedStringToCustomUnformattedStringTime = formattedStringToCustomUnformattedStringTime;
|
|
18108
|
+
exports.fullWidthFieldsComps = fullWidthFieldsComps;
|
|
18109
|
+
exports.getCellValueForDisplay = getCellValueForDisplay;
|
|
18110
|
+
exports.getColumnByName = getColumnByName;
|
|
18111
|
+
exports.getDecimalSeparator = getDecimalSeparator;
|
|
16694
18112
|
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
18113
|
+
exports.getMonthsAsStringByLocale = getMonthsAsStringByLocale;
|
|
18114
|
+
exports.getProps = getProps;
|
|
18115
|
+
exports.getValueForDisplay = getValueForDisplay;
|
|
18116
|
+
exports.getValueForDisplay2 = getValueForDisplay2;
|
|
16695
18117
|
exports.iconColumn = iconColumn;
|
|
18118
|
+
exports.identify = identify;
|
|
18119
|
+
exports.isNumber = isNumber;
|
|
18120
|
+
exports.isValidFormattedStringTime = isValidFormattedStringTime;
|
|
16696
18121
|
exports.keyColumn = keyColumn;
|
|
16697
18122
|
exports.kupDragActiveAttr = kupDragActiveAttr;
|
|
16698
18123
|
exports.kupDraggableCellAttr = kupDraggableCellAttr;
|
|
@@ -16701,3 +18126,9 @@ exports.kupDraggableRowAttr = kupDraggableRowAttr;
|
|
|
16701
18126
|
exports.kupDropEvent = kupDropEvent;
|
|
16702
18127
|
exports.kupDynamicPositionAttribute = kupDynamicPositionAttribute;
|
|
16703
18128
|
exports.kupManagerInstance = kupManagerInstance;
|
|
18129
|
+
exports.kupTypes = kupTypes;
|
|
18130
|
+
exports.numberToFormattedStringNumber = numberToFormattedStringNumber;
|
|
18131
|
+
exports.setProps = setProps;
|
|
18132
|
+
exports.stringToNumber = stringToNumber;
|
|
18133
|
+
exports.unformattedStringToFormattedStringNumber = unformattedStringToFormattedStringNumber;
|
|
18134
|
+
exports.unformattedStringToFormattedStringTime = unformattedStringToFormattedStringTime;
|