@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,4 +1,4 @@
|
|
|
1
|
-
import { a as getAssetPath, s as setAssetPath } from './index-
|
|
1
|
+
import { a as getAssetPath, s as setAssetPath } from './index-e41330a5.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Props of the kup-card component.
|
|
@@ -135,6 +135,17 @@ var KupLanguageColumn;
|
|
|
135
135
|
KupLanguageColumn["NON_NUMERICAL_IN_TABLE"] = "columnNonNumericalInTable";
|
|
136
136
|
KupLanguageColumn["SWAP"] = "columnSwap";
|
|
137
137
|
})(KupLanguageColumn || (KupLanguageColumn = {}));
|
|
138
|
+
/**
|
|
139
|
+
* Dashboard related decodes.
|
|
140
|
+
*/
|
|
141
|
+
var KupLanguageDashboard;
|
|
142
|
+
(function (KupLanguageDashboard) {
|
|
143
|
+
KupLanguageDashboard["DIMENSION"] = "dashboardDimension";
|
|
144
|
+
KupLanguageDashboard["LOADED"] = "dashboardLoaded";
|
|
145
|
+
KupLanguageDashboard["RESET"] = "dashboardReset";
|
|
146
|
+
KupLanguageDashboard["SAVE"] = "dashboardSave";
|
|
147
|
+
KupLanguageDashboard["VERTICAL"] = "dashboardVertical";
|
|
148
|
+
})(KupLanguageDashboard || (KupLanguageDashboard = {}));
|
|
138
149
|
/**
|
|
139
150
|
* Debug widget decodes.
|
|
140
151
|
*/
|
|
@@ -325,7 +336,7 @@ var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
325
336
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
326
337
|
};
|
|
327
338
|
var _KupDebug_debugWidget;
|
|
328
|
-
const dom$
|
|
339
|
+
const dom$i = document.documentElement;
|
|
329
340
|
/**
|
|
330
341
|
* Debugging suite, used to log messages and statuses from the Ketchup components.
|
|
331
342
|
* @module KupDebug
|
|
@@ -372,32 +383,32 @@ class KupDebug {
|
|
|
372
383
|
*/
|
|
373
384
|
showWidget() {
|
|
374
385
|
const debugWidget = document.createElement('kup-card');
|
|
375
|
-
const languages = dom$
|
|
386
|
+
const languages = dom$i.ketchup.language.getLanguages();
|
|
376
387
|
const languagesListData = [];
|
|
377
388
|
for (let index = 0; index < languages.length; index++) {
|
|
378
389
|
languagesListData.push({
|
|
379
390
|
id: languages[index],
|
|
380
|
-
selected: languages[index] === dom$
|
|
391
|
+
selected: languages[index] === dom$i.ketchup.language.name
|
|
381
392
|
? true
|
|
382
393
|
: false,
|
|
383
394
|
value: languages[index],
|
|
384
395
|
});
|
|
385
396
|
}
|
|
386
|
-
const themes = dom$
|
|
397
|
+
const themes = dom$i.ketchup.theme.getThemes();
|
|
387
398
|
const themesListData = [];
|
|
388
399
|
for (let index = 0; index < themes.length; index++) {
|
|
389
400
|
themesListData.push({
|
|
390
401
|
id: themes[index],
|
|
391
|
-
selected: themes[index] === dom$
|
|
402
|
+
selected: themes[index] === dom$i.ketchup.theme.name ? true : false,
|
|
392
403
|
value: themes[index],
|
|
393
404
|
});
|
|
394
405
|
}
|
|
395
|
-
const locales = dom$
|
|
406
|
+
const locales = dom$i.ketchup.dates.getLocales();
|
|
396
407
|
const localesListData = [];
|
|
397
408
|
for (let index = 0; index < locales.length; index++) {
|
|
398
409
|
localesListData.push({
|
|
399
410
|
id: locales[index],
|
|
400
|
-
selected: locales[index] === dom$
|
|
411
|
+
selected: locales[index] === dom$i.ketchup.dates.locale ? true : false,
|
|
401
412
|
value: locales[index],
|
|
402
413
|
});
|
|
403
414
|
}
|
|
@@ -407,13 +418,13 @@ class KupDebug {
|
|
|
407
418
|
icon: 'power_settings_new',
|
|
408
419
|
id: 'kup-debug-off',
|
|
409
420
|
customStyle: ':host {--kup-font-size: 0.875em; border-left: 1px solid var(--kup-border-color); border-right: 1px solid var(--kup-border-color);}',
|
|
410
|
-
title: dom$
|
|
421
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.OFF),
|
|
411
422
|
},
|
|
412
423
|
{
|
|
413
424
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
414
425
|
icon: 'print',
|
|
415
426
|
id: 'kup-debug-print',
|
|
416
|
-
title: dom$
|
|
427
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.PRINT),
|
|
417
428
|
},
|
|
418
429
|
{
|
|
419
430
|
checked: this.autoPrint,
|
|
@@ -421,20 +432,20 @@ class KupDebug {
|
|
|
421
432
|
icon: 'speaker_notes',
|
|
422
433
|
iconOff: 'speaker_notes_off',
|
|
423
434
|
id: 'kup-debug-autoprint',
|
|
424
|
-
title: dom$
|
|
435
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.AUTOPRINT),
|
|
425
436
|
toggable: true,
|
|
426
437
|
},
|
|
427
438
|
{
|
|
428
439
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
429
440
|
icon: 'broom',
|
|
430
441
|
id: 'kup-debug-clear',
|
|
431
|
-
title: dom$
|
|
442
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.CLEAR),
|
|
432
443
|
},
|
|
433
444
|
{
|
|
434
445
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
435
446
|
icon: 'delete',
|
|
436
447
|
id: 'kup-debug-delete',
|
|
437
|
-
title: dom$
|
|
448
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.DUMP),
|
|
438
449
|
},
|
|
439
450
|
{
|
|
440
451
|
className: 'kup-full-height',
|
|
@@ -443,22 +454,22 @@ class KupDebug {
|
|
|
443
454
|
id: 'kup-debug-dl-props',
|
|
444
455
|
label: 'Props',
|
|
445
456
|
styling: 'flat',
|
|
446
|
-
title: dom$
|
|
457
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.DL_PROPS),
|
|
447
458
|
},
|
|
448
459
|
{
|
|
449
460
|
className: 'kup-full-height',
|
|
450
461
|
customStyle: ':host {border-right: 1px solid var(--kup-border-color);}',
|
|
451
462
|
icon: 'download',
|
|
452
463
|
id: 'kup-debug-dl-all',
|
|
453
|
-
label: dom$
|
|
464
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.DL_ALL),
|
|
454
465
|
styling: 'flat',
|
|
455
|
-
title: dom$
|
|
466
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.DL_ALL),
|
|
456
467
|
},
|
|
457
468
|
{
|
|
458
469
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
459
470
|
icon: 'auto-fix',
|
|
460
471
|
id: 'kup-debug-magic-box',
|
|
461
|
-
title: dom$
|
|
472
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.MAGIC_BOX),
|
|
462
473
|
},
|
|
463
474
|
],
|
|
464
475
|
combobox: [
|
|
@@ -473,11 +484,11 @@ class KupDebug {
|
|
|
473
484
|
className: 'kup-full-height',
|
|
474
485
|
emitSubmitEventOnEnter: false,
|
|
475
486
|
inputType: 'text',
|
|
476
|
-
label: dom$
|
|
487
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.THEME_CHANGER),
|
|
477
488
|
},
|
|
478
489
|
},
|
|
479
490
|
id: 'kup-debug-theme-changer',
|
|
480
|
-
initialValue: dom$
|
|
491
|
+
initialValue: dom$i.ketchup.theme.name,
|
|
481
492
|
isSelect: true,
|
|
482
493
|
},
|
|
483
494
|
{
|
|
@@ -491,11 +502,11 @@ class KupDebug {
|
|
|
491
502
|
className: 'kup-full-height',
|
|
492
503
|
emitSubmitEventOnEnter: false,
|
|
493
504
|
inputType: 'text',
|
|
494
|
-
label: dom$
|
|
505
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.LANGUAGE_CHANGER),
|
|
495
506
|
},
|
|
496
507
|
},
|
|
497
508
|
id: 'kup-debug-language-changer',
|
|
498
|
-
initialValue: dom$
|
|
509
|
+
initialValue: dom$i.ketchup.language.name,
|
|
499
510
|
isSelect: true,
|
|
500
511
|
},
|
|
501
512
|
{
|
|
@@ -509,11 +520,11 @@ class KupDebug {
|
|
|
509
520
|
className: 'kup-full-height',
|
|
510
521
|
emitSubmitEventOnEnter: false,
|
|
511
522
|
inputType: 'text',
|
|
512
|
-
label: dom$
|
|
523
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.LOCALE_CHANGER),
|
|
513
524
|
},
|
|
514
525
|
},
|
|
515
526
|
id: 'kup-debug-locale-changer',
|
|
516
|
-
initialValue: dom$
|
|
527
|
+
initialValue: dom$i.ketchup.dates.locale,
|
|
517
528
|
isSelect: true,
|
|
518
529
|
},
|
|
519
530
|
],
|
|
@@ -521,7 +532,7 @@ class KupDebug {
|
|
|
521
532
|
{
|
|
522
533
|
className: 'kup-full-height',
|
|
523
534
|
id: 'kup-debug-log-limit',
|
|
524
|
-
label: dom$
|
|
535
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.LOG_LIMIT),
|
|
525
536
|
initialValue: this.logLimit,
|
|
526
537
|
emitSubmitEventOnEnter: false,
|
|
527
538
|
inputType: 'number',
|
|
@@ -572,7 +583,7 @@ class KupDebug {
|
|
|
572
583
|
kupDebug.dump();
|
|
573
584
|
break;
|
|
574
585
|
case 'kup-debug-magic-box':
|
|
575
|
-
dom$
|
|
586
|
+
dom$i.ketchup.toggleMagicBox();
|
|
576
587
|
break;
|
|
577
588
|
case 'kup-debug-off':
|
|
578
589
|
kupDebug.toggle();
|
|
@@ -587,14 +598,14 @@ class KupDebug {
|
|
|
587
598
|
case 'kup-combobox-itemclick':
|
|
588
599
|
switch (compID) {
|
|
589
600
|
case 'kup-debug-language-changer':
|
|
590
|
-
dom$
|
|
601
|
+
dom$i.ketchup.language.set(compEvent.detail.value);
|
|
591
602
|
break;
|
|
592
603
|
case 'kup-debug-locale-changer':
|
|
593
|
-
dom$
|
|
594
|
-
dom$
|
|
604
|
+
dom$i.ketchup.dates.setLocale(compEvent.detail.value);
|
|
605
|
+
dom$i.ketchup.math.setLocale(compEvent.detail.value);
|
|
595
606
|
break;
|
|
596
607
|
case 'kup-debug-theme-changer':
|
|
597
|
-
dom$
|
|
608
|
+
dom$i.ketchup.theme.set(compEvent.detail.value);
|
|
598
609
|
break;
|
|
599
610
|
}
|
|
600
611
|
case 'kup-textfield-input':
|
|
@@ -656,7 +667,7 @@ class KupDebug {
|
|
|
656
667
|
// If the log is tied to a KupComponent, on click its props will be downloaded.
|
|
657
668
|
// Also, a different style will be applied to distinguish it between the others.
|
|
658
669
|
if (typeof this.logs[index].element == 'object') {
|
|
659
|
-
slot.title = dom$
|
|
670
|
+
slot.title = dom$i.ketchup.language.translate(KupLanguageDebug.DL_PROPS_COMP);
|
|
660
671
|
slot.style.fontWeight = 'bold';
|
|
661
672
|
slot.style.cursor = 'pointer';
|
|
662
673
|
slot.onclick = () => {
|
|
@@ -714,7 +725,7 @@ class KupDebug {
|
|
|
714
725
|
printLog[type] = [];
|
|
715
726
|
}
|
|
716
727
|
printLog[type].push({
|
|
717
|
-
date: dom$
|
|
728
|
+
date: dom$i.ketchup.dates.format(this.logs[index].date, 'LLL:ms'),
|
|
718
729
|
element: isComponent
|
|
719
730
|
? this.logs[index].element
|
|
720
731
|
: this.logs[index].id,
|
|
@@ -894,7 +905,7 @@ class KupDebug {
|
|
|
894
905
|
message: message,
|
|
895
906
|
};
|
|
896
907
|
if (this.logs.length > this.logLimit) {
|
|
897
|
-
console.warn(dom$
|
|
908
|
+
console.warn(dom$i.ketchup.dates.format(date, 'LLL:ms') +
|
|
898
909
|
' kup-debug => ' +
|
|
899
910
|
'Too many logs (> ' +
|
|
900
911
|
this.logLimit +
|
|
@@ -910,14 +921,14 @@ class KupDebug {
|
|
|
910
921
|
}
|
|
911
922
|
switch (category) {
|
|
912
923
|
case KupDebugCategory.ERROR:
|
|
913
|
-
console.error(dom$
|
|
924
|
+
console.error(dom$i.ketchup.dates.format(date, 'LLL:ms') + id + message, obj);
|
|
914
925
|
window.dispatchEvent(new CustomEvent('kup-debug-error', {
|
|
915
926
|
bubbles: true,
|
|
916
927
|
detail: { comp, date, message },
|
|
917
928
|
}));
|
|
918
929
|
break;
|
|
919
930
|
case KupDebugCategory.WARNING:
|
|
920
|
-
console.warn(dom$
|
|
931
|
+
console.warn(dom$i.ketchup.dates.format(date, 'LLL:ms') + id + message, obj);
|
|
921
932
|
break;
|
|
922
933
|
}
|
|
923
934
|
}
|
|
@@ -1004,7 +1015,7 @@ var KupDynamicPositionPlacement;
|
|
|
1004
1015
|
KupDynamicPositionPlacement["TOP_RIGHT"] = "tr";
|
|
1005
1016
|
})(KupDynamicPositionPlacement || (KupDynamicPositionPlacement = {}));
|
|
1006
1017
|
|
|
1007
|
-
const dom$
|
|
1018
|
+
const dom$h = document.documentElement;
|
|
1008
1019
|
/**
|
|
1009
1020
|
* This class is used to dynamically reposition HTML elements.
|
|
1010
1021
|
* @module KupDynamicPosition
|
|
@@ -1072,7 +1083,7 @@ class KupDynamicPosition {
|
|
|
1072
1083
|
const target = mutations[0].target;
|
|
1073
1084
|
if (target.classList.contains(kupDynamicPositionActiveClass)) {
|
|
1074
1085
|
requestAnimationFrame(function () {
|
|
1075
|
-
dom$
|
|
1086
|
+
dom$h.ketchup.dynamicPosition.run(el);
|
|
1076
1087
|
});
|
|
1077
1088
|
}
|
|
1078
1089
|
});
|
|
@@ -1129,7 +1140,7 @@ class KupDynamicPosition {
|
|
|
1129
1140
|
*/
|
|
1130
1141
|
run(el) {
|
|
1131
1142
|
if (!el.isConnected) {
|
|
1132
|
-
dom$
|
|
1143
|
+
dom$h.ketchup.dynamicPosition.managedElements.delete(el);
|
|
1133
1144
|
cancelAnimationFrame(el.kupDynamicPosition.rAF);
|
|
1134
1145
|
return;
|
|
1135
1146
|
}
|
|
@@ -1237,7 +1248,7 @@ class KupDynamicPosition {
|
|
|
1237
1248
|
// Recursive
|
|
1238
1249
|
if (!el.kupDynamicPosition.detach) {
|
|
1239
1250
|
el.kupDynamicPosition.rAF = requestAnimationFrame(function () {
|
|
1240
|
-
dom$
|
|
1251
|
+
dom$h.ketchup.dynamicPosition.run(el);
|
|
1241
1252
|
});
|
|
1242
1253
|
}
|
|
1243
1254
|
else {
|
|
@@ -1325,7 +1336,7 @@ var KupDropEventTypes;
|
|
|
1325
1336
|
KupDropEventTypes["MAGICBOX"] = "text/kup-magic-box-drag";
|
|
1326
1337
|
})(KupDropEventTypes || (KupDropEventTypes = {}));
|
|
1327
1338
|
|
|
1328
|
-
const dom$
|
|
1339
|
+
const dom$g = document.documentElement;
|
|
1329
1340
|
/**
|
|
1330
1341
|
* This class handles elements as dialogs, making them resizable and movable.
|
|
1331
1342
|
* @module KupInteract
|
|
@@ -1374,16 +1385,13 @@ class KupInteract {
|
|
|
1374
1385
|
draggable.kupDragDrop.ghostImage
|
|
1375
1386
|
? draggable.kupDragDrop.ghostImage
|
|
1376
1387
|
: e.target;
|
|
1377
|
-
const oldTransform = ghostImage.style.transform;
|
|
1378
1388
|
let x = parseFloat(ghostImage.getAttribute('data-x')) || 0;
|
|
1379
1389
|
let y = parseFloat(ghostImage.getAttribute('data-y')) || 0;
|
|
1380
1390
|
x = x + e.dx;
|
|
1381
1391
|
y = y + e.dy;
|
|
1382
1392
|
ghostImage.style.transform = `translate(${x}px, ${y}px)`;
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
ghostImage.setAttribute('data-y', y.toString());
|
|
1386
|
-
}
|
|
1393
|
+
ghostImage.setAttribute('data-x', x.toString());
|
|
1394
|
+
ghostImage.setAttribute('data-y', y.toString());
|
|
1387
1395
|
}
|
|
1388
1396
|
},
|
|
1389
1397
|
start(e) {
|
|
@@ -1426,11 +1434,12 @@ class KupInteract {
|
|
|
1426
1434
|
ghostImage.style.transition = 'none';
|
|
1427
1435
|
ghostImage.style.zIndex =
|
|
1428
1436
|
'calc(var(--kup-navbar-zindex) + 1)';
|
|
1429
|
-
dom$
|
|
1437
|
+
dom$g.ketchup.interact.container.appendChild(ghostImage);
|
|
1430
1438
|
draggable.kupDragDrop.ghostImage = ghostImage;
|
|
1431
1439
|
break;
|
|
1432
1440
|
case KupDragEffect.CLONE:
|
|
1433
1441
|
ghostImage = draggable.cloneNode(true);
|
|
1442
|
+
ghostImage.id = '';
|
|
1434
1443
|
ghostImage.style.cursor = 'grabbing';
|
|
1435
1444
|
ghostImage.style.height = draggable.clientHeight + 'px';
|
|
1436
1445
|
ghostImage.style.left =
|
|
@@ -1586,7 +1595,7 @@ class KupInteract {
|
|
|
1586
1595
|
x += e.deltaRect.left;
|
|
1587
1596
|
y += e.deltaRect.top;
|
|
1588
1597
|
el.style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
|
1589
|
-
if (dom$
|
|
1598
|
+
if (dom$g.ketchup.interact.isInViewport(el, oldTransform, e.delta)) {
|
|
1590
1599
|
el.setAttribute('data-x', x.toString());
|
|
1591
1600
|
el.setAttribute('data-y', y.toString());
|
|
1592
1601
|
}
|
|
@@ -1638,7 +1647,7 @@ class KupInteract {
|
|
|
1638
1647
|
const callbacks = {
|
|
1639
1648
|
start(e) {
|
|
1640
1649
|
const el = e.currentTarget;
|
|
1641
|
-
el.style.zIndex = (dom$
|
|
1650
|
+
el.style.zIndex = (dom$g.ketchup.interact.zIndex++).toString();
|
|
1642
1651
|
},
|
|
1643
1652
|
};
|
|
1644
1653
|
this.draggable(el, {
|
|
@@ -1647,7 +1656,7 @@ class KupInteract {
|
|
|
1647
1656
|
interact.modifiers.restrictRect({
|
|
1648
1657
|
restriction: restrictContainer
|
|
1649
1658
|
? restrictContainer
|
|
1650
|
-
: dom$
|
|
1659
|
+
: dom$g.ketchup.interact.restrictContainer,
|
|
1651
1660
|
endOnly: true,
|
|
1652
1661
|
}),
|
|
1653
1662
|
],
|
|
@@ -1706,6 +1715,11 @@ const chinese = {
|
|
|
1706
1715
|
columnNonNumerical: "这些列不是数字的",
|
|
1707
1716
|
columnNonNumericalInTable: "此表中不存在数字列",
|
|
1708
1717
|
columnSwap: "交换",
|
|
1718
|
+
dashboardDimension: "方面",
|
|
1719
|
+
dashboardLoaded: "已加载",
|
|
1720
|
+
dashboardReset: "重置",
|
|
1721
|
+
dashboardSave: "节省",
|
|
1722
|
+
dashboardVertical: "垂直的",
|
|
1709
1723
|
debugAutoprint: "切换自动打印",
|
|
1710
1724
|
debugClear: "清除小部件",
|
|
1711
1725
|
debugDLAll: "全部",
|
|
@@ -1819,6 +1833,11 @@ const english = {
|
|
|
1819
1833
|
columnNonNumerical: "These columns are not numerical.",
|
|
1820
1834
|
columnNonNumericalInTable: "No numerical columns exist in this table.",
|
|
1821
1835
|
columnSwap: "Swap columns",
|
|
1836
|
+
dashboardDimension: "Dimension",
|
|
1837
|
+
dashboardLoaded: "Loaded",
|
|
1838
|
+
dashboardReset: "Reset",
|
|
1839
|
+
dashboardSave: "Save",
|
|
1840
|
+
dashboardVertical: "Vertical",
|
|
1822
1841
|
debugAutoprint: "Toggle automatic print",
|
|
1823
1842
|
debugClear: "Clear widget",
|
|
1824
1843
|
debugDLAll: "All",
|
|
@@ -1932,6 +1951,11 @@ const french = {
|
|
|
1932
1951
|
columnNonNumerical: "Ces colonnes ne sont pas numériques.",
|
|
1933
1952
|
columnNonNumericalInTable: "Aucune colonne numérique n'existe dans ce tableau.",
|
|
1934
1953
|
columnSwap: "Permuter les colonnes",
|
|
1954
|
+
dashboardDimension: "Dimension",
|
|
1955
|
+
dashboardLoaded: "Chargé",
|
|
1956
|
+
dashboardReset: "Réinitialiser",
|
|
1957
|
+
dashboardSave: "Enregistrer",
|
|
1958
|
+
dashboardVertical: "Vertical",
|
|
1935
1959
|
debugAutoprint: "Activer l'impression automatique",
|
|
1936
1960
|
debugClear: "Effacer le widget",
|
|
1937
1961
|
debugDLAll: "Tout",
|
|
@@ -2045,6 +2069,11 @@ const italian = {
|
|
|
2045
2069
|
columnNonNumerical: "Queste colonne non sono numeriche.",
|
|
2046
2070
|
columnNonNumericalInTable: "Non esistono colonne numeriche in questa tabella.",
|
|
2047
2071
|
columnSwap: "Scambia le colonne",
|
|
2072
|
+
dashboardDimension: "Dimensione",
|
|
2073
|
+
dashboardLoaded: "Caricata",
|
|
2074
|
+
dashboardReset: "Ripristina",
|
|
2075
|
+
dashboardSave: "Salva",
|
|
2076
|
+
dashboardVertical: "Verticale",
|
|
2048
2077
|
debugAutoprint: "Attiva stampa automatica logs",
|
|
2049
2078
|
debugClear: "Pulisci widget",
|
|
2050
2079
|
debugDLAll: "Tutto",
|
|
@@ -2172,6 +2201,11 @@ const polish = {
|
|
|
2172
2201
|
columnNonNumerical: "Te kolumny nie są numeryczne.",
|
|
2173
2202
|
columnNonNumericalInTable: "W tej tabeli nie ma kolumn liczbowych.",
|
|
2174
2203
|
columnSwap: "Zamień kolumny",
|
|
2204
|
+
dashboardDimension: "Wymiar",
|
|
2205
|
+
dashboardLoaded: "Załadowany",
|
|
2206
|
+
dashboardReset: "Resetowanie",
|
|
2207
|
+
dashboardSave: "Ratować",
|
|
2208
|
+
dashboardVertical: "Pionowy",
|
|
2175
2209
|
debugAutoprint: "Przełącz automatyczne drukowanie",
|
|
2176
2210
|
debugClear: "Wyczyść widżet",
|
|
2177
2211
|
debugDLAll: "Wszystko",
|
|
@@ -2285,6 +2319,11 @@ const russian = {
|
|
|
2285
2319
|
columnNonNumerical: "Эти столбцы не числовые",
|
|
2286
2320
|
columnNonNumericalInTable: "В этой таблице нет числовых столбцов",
|
|
2287
2321
|
columnSwap: "Поменять местами столбцы",
|
|
2322
|
+
dashboardDimension: "Измерение",
|
|
2323
|
+
dashboardLoaded: "Загружено",
|
|
2324
|
+
dashboardReset: "Перезагрузить",
|
|
2325
|
+
dashboardSave: "Сохранять",
|
|
2326
|
+
dashboardVertical: "Вертикальный",
|
|
2288
2327
|
debugAutoprint: "Включить автоматическую печать",
|
|
2289
2328
|
debugClear: "Очистить виджет",
|
|
2290
2329
|
debugDLAll: "Все",
|
|
@@ -2398,6 +2437,11 @@ const spanish = {
|
|
|
2398
2437
|
columnNonNumerical: "Estas columnas no son numéricas.",
|
|
2399
2438
|
columnNonNumericalInTable: "No existen columnas numéricas en esta tabla.",
|
|
2400
2439
|
columnSwap: "Intercambiar columnas",
|
|
2440
|
+
dashboardDimension: "Dimensión",
|
|
2441
|
+
dashboardLoaded: "Cargado",
|
|
2442
|
+
dashboardReset: "Reiniciar",
|
|
2443
|
+
dashboardSave: "Ahorrar",
|
|
2444
|
+
dashboardVertical: "Vertical",
|
|
2401
2445
|
debugAutoprint: "Alternar impresión automática",
|
|
2402
2446
|
debugClear: "Borrar widget",
|
|
2403
2447
|
debugDLAll: "Todas",
|
|
@@ -2506,7 +2550,7 @@ const languages = {
|
|
|
2506
2550
|
spanish: spanish
|
|
2507
2551
|
};
|
|
2508
2552
|
|
|
2509
|
-
const dom$
|
|
2553
|
+
const dom$f = document.documentElement;
|
|
2510
2554
|
/**
|
|
2511
2555
|
* Handles the translation to different languages.
|
|
2512
2556
|
* @module KupLanguage
|
|
@@ -2560,7 +2604,7 @@ class KupLanguage {
|
|
|
2560
2604
|
return invalidKey(key);
|
|
2561
2605
|
}
|
|
2562
2606
|
function invalidKey(key) {
|
|
2563
|
-
dom$
|
|
2607
|
+
dom$f.ketchup.debug.logMessage('kup-language', 'Invalid translation for key (' + key + ')!', KupDebugCategory.WARNING);
|
|
2564
2608
|
return key;
|
|
2565
2609
|
}
|
|
2566
2610
|
}
|
|
@@ -2573,7 +2617,7 @@ class KupLanguage {
|
|
|
2573
2617
|
language = language.toLowerCase();
|
|
2574
2618
|
}
|
|
2575
2619
|
else {
|
|
2576
|
-
dom$
|
|
2620
|
+
dom$f.ketchup.debug.logMessage('kup-language', "Couldn't set language, invalid string received (" +
|
|
2577
2621
|
language +
|
|
2578
2622
|
')!', KupDebugCategory.WARNING);
|
|
2579
2623
|
return;
|
|
@@ -2583,12 +2627,12 @@ class KupLanguage {
|
|
|
2583
2627
|
const dVariant = decodedLanguage.variant;
|
|
2584
2628
|
if (this.list[dLanguage]) {
|
|
2585
2629
|
if (dVariant && !this.list[dLanguage].variants[dVariant]) {
|
|
2586
|
-
dom$
|
|
2630
|
+
dom$f.ketchup.debug.logMessage('kup-language', 'Variant not found (' + dVariant + ')!', KupDebugCategory.WARNING);
|
|
2587
2631
|
return;
|
|
2588
2632
|
}
|
|
2589
2633
|
}
|
|
2590
2634
|
else {
|
|
2591
|
-
dom$
|
|
2635
|
+
dom$f.ketchup.debug.logMessage('kup-language', 'Language not found (' + dLanguage + ')!', KupDebugCategory.WARNING);
|
|
2592
2636
|
return;
|
|
2593
2637
|
}
|
|
2594
2638
|
this.name = language;
|
|
@@ -2675,7 +2719,7 @@ const obj = {
|
|
|
2675
2719
|
types: types
|
|
2676
2720
|
};
|
|
2677
2721
|
|
|
2678
|
-
const dom$
|
|
2722
|
+
const dom$e = document.documentElement;
|
|
2679
2723
|
/**
|
|
2680
2724
|
* Handles objects definition and validation.
|
|
2681
2725
|
* @module KupObjects
|
|
@@ -2904,6 +2948,16 @@ class KupObjects {
|
|
|
2904
2948
|
!this.isRadio(obj) &&
|
|
2905
2949
|
!this.isChart(obj));
|
|
2906
2950
|
}
|
|
2951
|
+
/**
|
|
2952
|
+
* Checks whether the object represents a switch or not.
|
|
2953
|
+
* @param {KupObj} obj - Object to check.
|
|
2954
|
+
* @returns {boolean} True when the object is a switch.
|
|
2955
|
+
*/
|
|
2956
|
+
isSwitch(obj) {
|
|
2957
|
+
if (!obj)
|
|
2958
|
+
return false;
|
|
2959
|
+
return 'V2' === obj.t && 'ONOFF' === obj.p;
|
|
2960
|
+
}
|
|
2907
2961
|
/**
|
|
2908
2962
|
* Checks whether the object represents a text field or not.
|
|
2909
2963
|
* @param {KupObj} obj - Object to check.
|
|
@@ -2990,9 +3044,9 @@ class KupObjects {
|
|
|
2990
3044
|
*/
|
|
2991
3045
|
parseDate(obj) {
|
|
2992
3046
|
if (obj.t === 'D8' && obj.p === '*DMYY') {
|
|
2993
|
-
return dom$
|
|
3047
|
+
return dom$e.ketchup.dates.toDayjs(obj.k, 'DDMMYYYY');
|
|
2994
3048
|
}
|
|
2995
|
-
return dom$
|
|
3049
|
+
return dom$e.ketchup.dates.toDayjs(obj.k);
|
|
2996
3050
|
}
|
|
2997
3051
|
/**
|
|
2998
3052
|
* Check whether two JS objects are deeply equal. When the arguments aren't objects, they are tested directly for equity.
|
|
@@ -3047,8 +3101,10 @@ class KupObjects {
|
|
|
3047
3101
|
*/
|
|
3048
3102
|
var ScrollOnHoverDirection;
|
|
3049
3103
|
(function (ScrollOnHoverDirection) {
|
|
3104
|
+
ScrollOnHoverDirection["BOTTOM"] = "bottom";
|
|
3050
3105
|
ScrollOnHoverDirection["LEFT"] = "left";
|
|
3051
3106
|
ScrollOnHoverDirection["RIGHT"] = "right";
|
|
3107
|
+
ScrollOnHoverDirection["TOP"] = "top";
|
|
3052
3108
|
})(ScrollOnHoverDirection || (ScrollOnHoverDirection = {}));
|
|
3053
3109
|
|
|
3054
3110
|
var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
@@ -3062,8 +3118,8 @@ var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
3062
3118
|
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");
|
|
3063
3119
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3064
3120
|
};
|
|
3065
|
-
var _KupScrollOnHover_arrowsContainer, _KupScrollOnHover_leftArrows, _KupScrollOnHover_rightArrows, _KupScrollOnHover_scrollEvent, _KupScrollOnHover_mousemoveEvent, _KupScrollOnHover_mouseleaveEvent, _KupScrollOnHover_rAF, _KupScrollOnHover_timeout;
|
|
3066
|
-
const dom$
|
|
3121
|
+
var _KupScrollOnHover_instances, _KupScrollOnHover_arrowsContainer, _KupScrollOnHover_leftArrows, _KupScrollOnHover_rightArrows, _KupScrollOnHover_scrollEvent, _KupScrollOnHover_mousemoveEvent, _KupScrollOnHover_mouseleaveEvent, _KupScrollOnHover_rAF, _KupScrollOnHover_timeout, _KupScrollOnHover_initArrows;
|
|
3122
|
+
const dom$d = document.documentElement;
|
|
3067
3123
|
/**
|
|
3068
3124
|
* Lets the user scroll an element's overflow by hovering with the mouse on its left/right edge.
|
|
3069
3125
|
* @module KupScrollOnHover
|
|
@@ -3075,6 +3131,7 @@ class KupScrollOnHover {
|
|
|
3075
3131
|
* @param {number} step - The amount in pixels for each scroll recursion.
|
|
3076
3132
|
*/
|
|
3077
3133
|
constructor(delay, step) {
|
|
3134
|
+
_KupScrollOnHover_instances.add(this);
|
|
3078
3135
|
_KupScrollOnHover_arrowsContainer.set(this, void 0);
|
|
3079
3136
|
_KupScrollOnHover_leftArrows.set(this, void 0);
|
|
3080
3137
|
_KupScrollOnHover_rightArrows.set(this, void 0);
|
|
@@ -3086,42 +3143,32 @@ class KupScrollOnHover {
|
|
|
3086
3143
|
this.delay = delay ? delay : 500;
|
|
3087
3144
|
this.managedElements = new Set();
|
|
3088
3145
|
this.step = step ? step : 50;
|
|
3089
|
-
__classPrivateFieldSet$2(this, _KupScrollOnHover_arrowsContainer, document.createElement('div'), "f");
|
|
3090
|
-
__classPrivateFieldSet$2(this, _KupScrollOnHover_leftArrows, [], "f");
|
|
3091
3146
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_mouseleaveEvent, (event) => this.stop(event.target), "f");
|
|
3092
3147
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_mousemoveEvent, (event) => this.start(event), "f");
|
|
3093
3148
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, null, "f");
|
|
3094
|
-
__classPrivateFieldSet$2(this, _KupScrollOnHover_rightArrows, [], "f");
|
|
3095
3149
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_scrollEvent, (event) => this.updateChildren(event.target), "f");
|
|
3096
3150
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_timeout, null, "f");
|
|
3097
|
-
__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f").id = 'kup-scrolling-arrows';
|
|
3098
|
-
for (let index = 1; index < 4; index++) {
|
|
3099
|
-
const arrow = document.createElement('div');
|
|
3100
|
-
arrow.setAttribute('class', 'kup-left-scrolling-arrow kup-arrow-' + index);
|
|
3101
|
-
__classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f").push(arrow);
|
|
3102
|
-
}
|
|
3103
|
-
for (let index = 1; index < 4; index++) {
|
|
3104
|
-
const arrow = document.createElement('div');
|
|
3105
|
-
arrow.setAttribute('class', 'kup-right-scrolling-arrow kup-arrow-' + index);
|
|
3106
|
-
__classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f").push(arrow);
|
|
3107
|
-
}
|
|
3108
|
-
__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]);
|
|
3109
|
-
this.container = document.createElement('div');
|
|
3110
|
-
this.container.setAttribute('kup-scroll-on-hover', '');
|
|
3111
|
-
this.container.appendChild(__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f"));
|
|
3112
|
-
document.body.appendChild(this.container);
|
|
3113
3151
|
}
|
|
3114
3152
|
/**
|
|
3115
3153
|
* Watches the given element in order to trigger the scroll on hover when conditions are met.
|
|
3116
3154
|
* Children nodes with the "hover-scrolling-child" will be watched and scrolled when el scrolls.
|
|
3117
3155
|
* @param {KupScrollOnHoverElement} el - Element to watch.
|
|
3156
|
+
* @param {boolean} vertical - Enables vertical scroll.
|
|
3157
|
+
* @param {KupScrollOnHoverPercentages} percentages - Sets how big is the area in which the scroll is enabled.
|
|
3118
3158
|
*/
|
|
3119
|
-
register(el) {
|
|
3159
|
+
register(el, vertical, percentages) {
|
|
3160
|
+
if (!__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f")) {
|
|
3161
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_instances, "m", _KupScrollOnHover_initArrows).call(this);
|
|
3162
|
+
}
|
|
3120
3163
|
el.style.overflowX = 'auto';
|
|
3121
3164
|
el.scrollOnHover = {
|
|
3122
3165
|
active: false,
|
|
3123
3166
|
children: el.querySelectorAll('.hover-scrolling-child'),
|
|
3167
|
+
percentages: percentages
|
|
3168
|
+
? percentages
|
|
3169
|
+
: { back: 0.1, forward: 0.9 },
|
|
3124
3170
|
rect: null,
|
|
3171
|
+
vertical: vertical || null,
|
|
3125
3172
|
x: 0,
|
|
3126
3173
|
y: 0,
|
|
3127
3174
|
};
|
|
@@ -3166,14 +3213,19 @@ class KupScrollOnHover {
|
|
|
3166
3213
|
if (el.scrollOnHover.active || __classPrivateFieldGet$2(this, _KupScrollOnHover_timeout, "f")) {
|
|
3167
3214
|
return;
|
|
3168
3215
|
}
|
|
3216
|
+
let trueHeight = el.clientHeight;
|
|
3217
|
+
if (trueHeight === 0) {
|
|
3218
|
+
trueHeight = el.offsetHeight;
|
|
3219
|
+
}
|
|
3169
3220
|
let trueWidth = el.clientWidth;
|
|
3170
3221
|
if (trueWidth === 0) {
|
|
3171
3222
|
trueWidth = el.offsetWidth;
|
|
3172
3223
|
}
|
|
3173
3224
|
if (el.scrollWidth > trueWidth + 10) {
|
|
3174
3225
|
if (trueWidth !== 0 && !el.scrollOnHover.active) {
|
|
3175
|
-
const percRight = trueWidth - trueWidth *
|
|
3176
|
-
const percLeft = trueWidth -
|
|
3226
|
+
const percRight = trueWidth - trueWidth * el.scrollOnHover.percentages.back;
|
|
3227
|
+
const percLeft = trueWidth -
|
|
3228
|
+
trueWidth * el.scrollOnHover.percentages.forward;
|
|
3177
3229
|
const elOffset = el.scrollOnHover.x - el.scrollOnHover.rect.left;
|
|
3178
3230
|
const maxScrollLeft = el.scrollWidth - trueWidth;
|
|
3179
3231
|
const direction = elOffset < percLeft && el.scrollLeft !== 0
|
|
@@ -3194,7 +3246,29 @@ class KupScrollOnHover {
|
|
|
3194
3246
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_timeout, setTimeout(() => {
|
|
3195
3247
|
el.scrollOnHover.active = true;
|
|
3196
3248
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
3197
|
-
dom$
|
|
3249
|
+
dom$d.ketchup.scrollOnHover.run(el, maxScrollLeft, percRight, percLeft, direction);
|
|
3250
|
+
}), "f");
|
|
3251
|
+
}, this.delay), "f");
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
if (el.scrollOnHover.vertical && el.scrollHeight > trueHeight + 10) {
|
|
3256
|
+
if (trueHeight !== 0 && !el.scrollOnHover.active) {
|
|
3257
|
+
const percBottom = trueHeight - trueHeight * el.scrollOnHover.percentages.back;
|
|
3258
|
+
const percTop = trueHeight -
|
|
3259
|
+
trueHeight * el.scrollOnHover.percentages.forward;
|
|
3260
|
+
const elOffset = el.scrollOnHover.y - el.scrollOnHover.rect.top;
|
|
3261
|
+
const maxScrollTop = el.scrollHeight - trueHeight;
|
|
3262
|
+
const direction = elOffset < percTop && el.scrollTop !== 0
|
|
3263
|
+
? ScrollOnHoverDirection.TOP
|
|
3264
|
+
: elOffset > percBottom && el.scrollTop !== maxScrollTop
|
|
3265
|
+
? ScrollOnHoverDirection.BOTTOM
|
|
3266
|
+
: null;
|
|
3267
|
+
if (direction) {
|
|
3268
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_timeout, setTimeout(() => {
|
|
3269
|
+
el.scrollOnHover.active = true;
|
|
3270
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
3271
|
+
dom$d.ketchup.scrollOnHover.run(el, maxScrollTop, percBottom, percTop, direction);
|
|
3198
3272
|
}), "f");
|
|
3199
3273
|
}, this.delay), "f");
|
|
3200
3274
|
}
|
|
@@ -3223,25 +3297,51 @@ class KupScrollOnHover {
|
|
|
3223
3297
|
* The actual recursive scroll function.
|
|
3224
3298
|
* @param {KupScrollOnHoverElement} el - The scrolled element.
|
|
3225
3299
|
* @param {number} maxScrollLeft - Left coordinates to which the recursiveness must be stopped.
|
|
3226
|
-
* @param {number}
|
|
3227
|
-
* @param {number}
|
|
3300
|
+
* @param {number} percForward - Range of the right (or bottom) area.
|
|
3301
|
+
* @param {number} percBack - Range of the left (or top) scrollable area.
|
|
3228
3302
|
* @param {ScrollOnHoverDirection} direction - Direction of the scroll.
|
|
3229
3303
|
*/
|
|
3230
|
-
run(el, maxScrollLeft,
|
|
3304
|
+
run(el, maxScrollLeft, percForward, percBack, direction) {
|
|
3231
3305
|
if (!el.scrollOnHover.active) {
|
|
3232
3306
|
this.stop(el);
|
|
3233
3307
|
return;
|
|
3234
3308
|
}
|
|
3235
|
-
|
|
3236
|
-
|
|
3309
|
+
let offset = 0;
|
|
3310
|
+
switch (direction) {
|
|
3311
|
+
case ScrollOnHoverDirection.BOTTOM:
|
|
3312
|
+
case ScrollOnHoverDirection.TOP: {
|
|
3313
|
+
offset = el.scrollOnHover.y - el.scrollOnHover.rect.top;
|
|
3314
|
+
if (offset > percBack && offset < percForward) {
|
|
3315
|
+
this.stop(el);
|
|
3316
|
+
return;
|
|
3317
|
+
}
|
|
3318
|
+
break;
|
|
3319
|
+
}
|
|
3320
|
+
case ScrollOnHoverDirection.LEFT:
|
|
3321
|
+
case ScrollOnHoverDirection.RIGHT: {
|
|
3322
|
+
offset = el.scrollOnHover.x - el.scrollOnHover.rect.left;
|
|
3323
|
+
if (offset > percBack && offset < percForward) {
|
|
3324
|
+
this.stop(el);
|
|
3325
|
+
return;
|
|
3326
|
+
}
|
|
3327
|
+
break;
|
|
3328
|
+
}
|
|
3329
|
+
}
|
|
3330
|
+
if (direction === ScrollOnHoverDirection.RIGHT &&
|
|
3331
|
+
percForward > offset) {
|
|
3332
|
+
this.stop(el);
|
|
3333
|
+
return;
|
|
3334
|
+
}
|
|
3335
|
+
if (direction === ScrollOnHoverDirection.LEFT && percBack < offset) {
|
|
3237
3336
|
this.stop(el);
|
|
3238
3337
|
return;
|
|
3239
3338
|
}
|
|
3240
|
-
if (direction === ScrollOnHoverDirection.
|
|
3339
|
+
if (direction === ScrollOnHoverDirection.TOP && percBack < offset) {
|
|
3241
3340
|
this.stop(el);
|
|
3242
3341
|
return;
|
|
3243
3342
|
}
|
|
3244
|
-
if (direction === ScrollOnHoverDirection.
|
|
3343
|
+
if (direction === ScrollOnHoverDirection.BOTTOM &&
|
|
3344
|
+
percForward > offset) {
|
|
3245
3345
|
this.stop(el);
|
|
3246
3346
|
return;
|
|
3247
3347
|
}
|
|
@@ -3249,27 +3349,49 @@ class KupScrollOnHover {
|
|
|
3249
3349
|
this.updateChildren(el);
|
|
3250
3350
|
}
|
|
3251
3351
|
let arrow;
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3352
|
+
switch (direction) {
|
|
3353
|
+
case ScrollOnHoverDirection.BOTTOM: {
|
|
3354
|
+
arrow = [];
|
|
3355
|
+
if (el.scrollTop === maxScrollLeft) {
|
|
3356
|
+
this.stop(el);
|
|
3357
|
+
return;
|
|
3358
|
+
}
|
|
3359
|
+
el.scrollTop += this.step;
|
|
3360
|
+
break;
|
|
3257
3361
|
}
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3362
|
+
case ScrollOnHoverDirection.LEFT: {
|
|
3363
|
+
arrow = __classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f");
|
|
3364
|
+
if (el.scrollLeft === 0) {
|
|
3365
|
+
this.stop(el);
|
|
3366
|
+
return;
|
|
3367
|
+
}
|
|
3368
|
+
el.scrollLeft -= this.step;
|
|
3369
|
+
break;
|
|
3370
|
+
}
|
|
3371
|
+
case ScrollOnHoverDirection.RIGHT: {
|
|
3372
|
+
arrow = __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f");
|
|
3373
|
+
if (el.scrollLeft === maxScrollLeft) {
|
|
3374
|
+
this.stop(el);
|
|
3375
|
+
return;
|
|
3376
|
+
}
|
|
3377
|
+
el.scrollLeft += this.step;
|
|
3378
|
+
break;
|
|
3379
|
+
}
|
|
3380
|
+
case ScrollOnHoverDirection.TOP: {
|
|
3381
|
+
arrow = [];
|
|
3382
|
+
if (el.scrollTop === 0) {
|
|
3383
|
+
this.stop(el);
|
|
3384
|
+
return;
|
|
3385
|
+
}
|
|
3386
|
+
el.scrollTop -= this.step;
|
|
3387
|
+
break;
|
|
3265
3388
|
}
|
|
3266
|
-
el.scrollLeft += this.step;
|
|
3267
3389
|
}
|
|
3268
3390
|
for (let i = 0; i < arrow.length; i++) {
|
|
3269
3391
|
arrow[i].classList.add('kup-animated');
|
|
3270
3392
|
}
|
|
3271
3393
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
3272
|
-
dom$
|
|
3394
|
+
dom$d.ketchup.scrollOnHover.run(el, maxScrollLeft, percForward, percBack, direction);
|
|
3273
3395
|
}), "f");
|
|
3274
3396
|
}
|
|
3275
3397
|
/**
|
|
@@ -3282,7 +3404,27 @@ class KupScrollOnHover {
|
|
|
3282
3404
|
}
|
|
3283
3405
|
}
|
|
3284
3406
|
}
|
|
3285
|
-
_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()
|
|
3407
|
+
_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() {
|
|
3408
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_arrowsContainer, document.createElement('div'), "f");
|
|
3409
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_leftArrows, [], "f");
|
|
3410
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_rightArrows, [], "f");
|
|
3411
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f").id = 'kup-scrolling-arrows';
|
|
3412
|
+
for (let index = 1; index < 4; index++) {
|
|
3413
|
+
const arrow = document.createElement('div');
|
|
3414
|
+
arrow.setAttribute('class', 'kup-left-scrolling-arrow kup-arrow-' + index);
|
|
3415
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f").push(arrow);
|
|
3416
|
+
}
|
|
3417
|
+
for (let index = 1; index < 4; index++) {
|
|
3418
|
+
const arrow = document.createElement('div');
|
|
3419
|
+
arrow.setAttribute('class', 'kup-right-scrolling-arrow kup-arrow-' + index);
|
|
3420
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f").push(arrow);
|
|
3421
|
+
}
|
|
3422
|
+
__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]);
|
|
3423
|
+
this.container = document.createElement('div');
|
|
3424
|
+
this.container.setAttribute('kup-scroll-on-hover', '');
|
|
3425
|
+
this.container.appendChild(__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f"));
|
|
3426
|
+
document.body.appendChild(this.container);
|
|
3427
|
+
};
|
|
3286
3428
|
|
|
3287
3429
|
const bubbles = {
|
|
3288
3430
|
cssVariables: {
|
|
@@ -3781,6 +3923,7 @@ const print = {
|
|
|
3781
3923
|
"KUP-BUTTON": ":host(:not(.printable)) {\ndisplay: none;\n}\n\n",
|
|
3782
3924
|
"KUP-CARD": "",
|
|
3783
3925
|
"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",
|
|
3926
|
+
"KUP-FAMILY-TREE": "#kup-component .family-tree__item__expand {\ndisplay: none;\n}\n\n",
|
|
3784
3927
|
"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",
|
|
3785
3928
|
"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}"
|
|
3786
3929
|
},
|
|
@@ -4166,7 +4309,7 @@ const kupThemeComponentCss = "[kup-dialog]{animation:fade-in .25s ease-out;backg
|
|
|
4166
4309
|
|
|
4167
4310
|
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)}}";
|
|
4168
4311
|
|
|
4169
|
-
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}";
|
|
4312
|
+
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}";
|
|
4170
4313
|
|
|
4171
4314
|
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}";
|
|
4172
4315
|
|
|
@@ -4203,12 +4346,13 @@ var KupTagNames;
|
|
|
4203
4346
|
KupTagNames["COMBOBOX"] = "KUP-COMBOBOX";
|
|
4204
4347
|
KupTagNames["DASH"] = "KUP-DASH";
|
|
4205
4348
|
KupTagNames["DASH_LIST"] = "KUP-DASH-LIST";
|
|
4349
|
+
KupTagNames["DASHBOARD"] = "KUP-DASHBOARD";
|
|
4206
4350
|
KupTagNames["DATA_TABLE"] = "KUP-DATA-TABLE";
|
|
4207
4351
|
KupTagNames["DATE_PICKER"] = "KUP-DATE-PICKER";
|
|
4208
4352
|
KupTagNames["DRAWER"] = "KUP-DRAWER";
|
|
4209
4353
|
KupTagNames["DROPDOWN_BUTTON"] = "KUP-DROPDOWN-BUTTON";
|
|
4210
|
-
KupTagNames["
|
|
4211
|
-
KupTagNames["
|
|
4354
|
+
KupTagNames["FAMILY_TREE"] = "KUP-FAMILY-TREE";
|
|
4355
|
+
KupTagNames["FORM"] = "KUP-FORM";
|
|
4212
4356
|
KupTagNames["GAUGE"] = "KUP-GAUGE";
|
|
4213
4357
|
KupTagNames["GRID"] = "KUP-GRID";
|
|
4214
4358
|
KupTagNames["IFRAME"] = "KUP-IFRAME";
|
|
@@ -4247,9 +4391,11 @@ const fButtonUsers = [
|
|
|
4247
4391
|
KupTagNames.BOX,
|
|
4248
4392
|
KupTagNames.CALENDAR,
|
|
4249
4393
|
KupTagNames.CARD,
|
|
4394
|
+
KupTagNames.DASHBOARD,
|
|
4250
4395
|
KupTagNames.DATA_TABLE,
|
|
4251
4396
|
KupTagNames.DROPDOWN_BUTTON,
|
|
4252
|
-
KupTagNames.
|
|
4397
|
+
KupTagNames.FAMILY_TREE,
|
|
4398
|
+
KupTagNames.FORM,
|
|
4253
4399
|
KupTagNames.IMAGE_LIST,
|
|
4254
4400
|
KupTagNames.SNACKBAR,
|
|
4255
4401
|
];
|
|
@@ -4260,6 +4406,7 @@ const fCellUsers = [
|
|
|
4260
4406
|
KupTagNames.BOX,
|
|
4261
4407
|
KupTagNames.CELL,
|
|
4262
4408
|
KupTagNames.DATA_TABLE,
|
|
4409
|
+
KupTagNames.FORM,
|
|
4263
4410
|
KupTagNames.TREE,
|
|
4264
4411
|
];
|
|
4265
4412
|
/**
|
|
@@ -4269,7 +4416,9 @@ const fCheckboxUsers = [
|
|
|
4269
4416
|
KupTagNames.BOX,
|
|
4270
4417
|
KupTagNames.CELL,
|
|
4271
4418
|
KupTagNames.CHECKBOX,
|
|
4419
|
+
KupTagNames.DASHBOARD,
|
|
4272
4420
|
KupTagNames.DATA_TABLE,
|
|
4421
|
+
KupTagNames.FORM,
|
|
4273
4422
|
KupTagNames.LIST,
|
|
4274
4423
|
KupTagNames.TREE,
|
|
4275
4424
|
];
|
|
@@ -4282,6 +4431,7 @@ const fChipUsers = [
|
|
|
4282
4431
|
KupTagNames.CELL,
|
|
4283
4432
|
KupTagNames.CHIP,
|
|
4284
4433
|
KupTagNames.DATA_TABLE,
|
|
4434
|
+
KupTagNames.FORM,
|
|
4285
4435
|
KupTagNames.TREE,
|
|
4286
4436
|
];
|
|
4287
4437
|
/**
|
|
@@ -4297,9 +4447,11 @@ const fImageUsers = [
|
|
|
4297
4447
|
KupTagNames.CARD,
|
|
4298
4448
|
KupTagNames.CELL,
|
|
4299
4449
|
KupTagNames.CHIP,
|
|
4450
|
+
KupTagNames.DASHBOARD,
|
|
4300
4451
|
KupTagNames.DATA_TABLE,
|
|
4301
4452
|
KupTagNames.DROPDOWN_BUTTON,
|
|
4302
|
-
KupTagNames.
|
|
4453
|
+
KupTagNames.FAMILY_TREE,
|
|
4454
|
+
KupTagNames.FORM,
|
|
4303
4455
|
KupTagNames.IMAGE,
|
|
4304
4456
|
KupTagNames.IMAGE_LIST,
|
|
4305
4457
|
KupTagNames.LIST,
|
|
@@ -4315,7 +4467,14 @@ const fPaginatorUsers = [KupTagNames.BOX, KupTagNames.DATA_TABLE];
|
|
|
4315
4467
|
/**
|
|
4316
4468
|
* Components using the FSwitch functional component.
|
|
4317
4469
|
*/
|
|
4318
|
-
const fSwitchUsers = [
|
|
4470
|
+
const fSwitchUsers = [
|
|
4471
|
+
KupTagNames.BOX,
|
|
4472
|
+
KupTagNames.CELL,
|
|
4473
|
+
KupTagNames.DATA_TABLE,
|
|
4474
|
+
KupTagNames.FORM,
|
|
4475
|
+
KupTagNames.SWITCH,
|
|
4476
|
+
KupTagNames.TREE,
|
|
4477
|
+
];
|
|
4319
4478
|
/**
|
|
4320
4479
|
* Components using the FTextField functional component.
|
|
4321
4480
|
*/
|
|
@@ -4325,8 +4484,10 @@ const fTextFieldUsers = [
|
|
|
4325
4484
|
KupTagNames.CELL,
|
|
4326
4485
|
KupTagNames.COLOR_PICKER,
|
|
4327
4486
|
KupTagNames.COMBOBOX,
|
|
4487
|
+
KupTagNames.DASHBOARD,
|
|
4328
4488
|
KupTagNames.DATA_TABLE,
|
|
4329
4489
|
KupTagNames.DATE_PICKER,
|
|
4490
|
+
KupTagNames.FORM,
|
|
4330
4491
|
KupTagNames.NUMERIC_PICKER,
|
|
4331
4492
|
KupTagNames.TEXT_FIELD,
|
|
4332
4493
|
KupTagNames.TIME_PICKER,
|
|
@@ -4391,7 +4552,7 @@ var KupThemeIconValues;
|
|
|
4391
4552
|
KupThemeIconValues["SEARCH"] = "--kup-search-icon";
|
|
4392
4553
|
})(KupThemeIconValues || (KupThemeIconValues = {}));
|
|
4393
4554
|
|
|
4394
|
-
const dom$
|
|
4555
|
+
const dom$c = document.documentElement;
|
|
4395
4556
|
/**
|
|
4396
4557
|
* Theme manager, handles everything about theming, customStyles and color utilities.
|
|
4397
4558
|
* @module KupTheme
|
|
@@ -4405,7 +4566,7 @@ class KupTheme {
|
|
|
4405
4566
|
this.list = list ? list : themes;
|
|
4406
4567
|
this.managedComponents = new Set();
|
|
4407
4568
|
this.name = name ? name : 'ketchup';
|
|
4408
|
-
this.styleTag = dom$
|
|
4569
|
+
this.styleTag = dom$c
|
|
4409
4570
|
.querySelector('head')
|
|
4410
4571
|
.appendChild(document.createElement('style'));
|
|
4411
4572
|
}
|
|
@@ -4492,9 +4653,9 @@ class KupTheme {
|
|
|
4492
4653
|
if (list) {
|
|
4493
4654
|
this.list = list;
|
|
4494
4655
|
}
|
|
4495
|
-
dom$
|
|
4656
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Setting theme to: ' + this.name + '.');
|
|
4496
4657
|
if (!this.list[this.name]) {
|
|
4497
|
-
dom$
|
|
4658
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Invalid theme name, falling back to default ("ketchup").');
|
|
4498
4659
|
this.name = 'ketchup';
|
|
4499
4660
|
}
|
|
4500
4661
|
this.cssVars = {};
|
|
@@ -4537,11 +4698,11 @@ class KupTheme {
|
|
|
4537
4698
|
this.icons() +
|
|
4538
4699
|
'}';
|
|
4539
4700
|
this.customStyle();
|
|
4540
|
-
dom$
|
|
4701
|
+
dom$c.ketchup.debug.logMessage('kup-theme', 'Theme ' + dom$c.getAttribute('kup-theme') + ' refreshed.');
|
|
4541
4702
|
document.dispatchEvent(new CustomEvent('kup-theme-refresh'));
|
|
4542
4703
|
}
|
|
4543
4704
|
catch (error) {
|
|
4544
|
-
dom$
|
|
4705
|
+
dom$c.ketchup.debug.logMessage('kup-theme', 'Theme not refreshed.', KupDebugCategory.WARNING);
|
|
4545
4706
|
}
|
|
4546
4707
|
}
|
|
4547
4708
|
/**
|
|
@@ -4660,7 +4821,7 @@ class KupTheme {
|
|
|
4660
4821
|
this.set(themes[index]);
|
|
4661
4822
|
}
|
|
4662
4823
|
else {
|
|
4663
|
-
dom$
|
|
4824
|
+
dom$c.ketchup.debug.logMessage('kup-theme', "Couldn't set a random theme: no themes available!", KupDebugCategory.WARNING);
|
|
4664
4825
|
}
|
|
4665
4826
|
}
|
|
4666
4827
|
/**
|
|
@@ -4672,7 +4833,7 @@ class KupTheme {
|
|
|
4672
4833
|
//Testing whether the color is transparent, if it is a fall back value will be returned matching the background-color
|
|
4673
4834
|
if (color === 'transparent') {
|
|
4674
4835
|
color = this.cssVars['--kup-background-color'];
|
|
4675
|
-
dom$
|
|
4836
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Received TRANSPARENT color, converted to ' +
|
|
4676
4837
|
color +
|
|
4677
4838
|
' (theme background).');
|
|
4678
4839
|
}
|
|
@@ -4690,7 +4851,7 @@ class KupTheme {
|
|
|
4690
4851
|
const oldColor = color;
|
|
4691
4852
|
color = this.codeToHex(color);
|
|
4692
4853
|
isHex = color.substring(0, 1) === '#' ? true : false;
|
|
4693
|
-
dom$
|
|
4854
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Received CODE NAME color ' +
|
|
4694
4855
|
oldColor +
|
|
4695
4856
|
', converted to ' +
|
|
4696
4857
|
color +
|
|
@@ -4744,14 +4905,14 @@ class KupTheme {
|
|
|
4744
4905
|
else {
|
|
4745
4906
|
hexColor = this.rgbToHex(rgbColorObj.r, rgbColorObj.g, rgbColorObj.b);
|
|
4746
4907
|
}
|
|
4747
|
-
dom$
|
|
4908
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Received HEX color ' +
|
|
4748
4909
|
oldColor +
|
|
4749
4910
|
', converted to ' +
|
|
4750
4911
|
color +
|
|
4751
4912
|
'.');
|
|
4752
4913
|
}
|
|
4753
4914
|
catch (error) {
|
|
4754
|
-
dom$
|
|
4915
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Invalid color: ' + color + '.');
|
|
4755
4916
|
}
|
|
4756
4917
|
}
|
|
4757
4918
|
let rgbValues = null;
|
|
@@ -4761,14 +4922,14 @@ class KupTheme {
|
|
|
4761
4922
|
rgbColor = color;
|
|
4762
4923
|
}
|
|
4763
4924
|
catch (error) {
|
|
4764
|
-
dom$
|
|
4925
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Color not converted to rgb values: ' + color + '.');
|
|
4765
4926
|
}
|
|
4766
4927
|
if (!hexColor) {
|
|
4767
4928
|
try {
|
|
4768
4929
|
hexColor = this.rgbToHex(parseInt(values[1]), parseInt(values[2]), parseInt(values[3]));
|
|
4769
4930
|
}
|
|
4770
4931
|
catch (error) {
|
|
4771
|
-
dom$
|
|
4932
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
|
|
4772
4933
|
}
|
|
4773
4934
|
}
|
|
4774
4935
|
if (!hslColor || !hslValues) {
|
|
@@ -4781,7 +4942,7 @@ class KupTheme {
|
|
|
4781
4942
|
hslColor = 'hsl(' + hsl.h + ',' + hsl.s + '%,' + hsl.l + '%)';
|
|
4782
4943
|
}
|
|
4783
4944
|
catch (error) {
|
|
4784
|
-
dom$
|
|
4945
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
|
|
4785
4946
|
}
|
|
4786
4947
|
}
|
|
4787
4948
|
return {
|
|
@@ -5086,7 +5247,7 @@ class KupTheme {
|
|
|
5086
5247
|
return colorCodes[color.toLowerCase()];
|
|
5087
5248
|
}
|
|
5088
5249
|
else {
|
|
5089
|
-
dom$
|
|
5250
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Could not decode color ' + color + '!');
|
|
5090
5251
|
return color;
|
|
5091
5252
|
}
|
|
5092
5253
|
}
|
|
@@ -5114,7 +5275,7 @@ var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
5114
5275
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5115
5276
|
};
|
|
5116
5277
|
var _KupToolbar_keyEvent;
|
|
5117
|
-
const dom$
|
|
5278
|
+
const dom$b = document.documentElement;
|
|
5118
5279
|
/**
|
|
5119
5280
|
* Handles component's toolbar.
|
|
5120
5281
|
* @module KupToolbar
|
|
@@ -5132,7 +5293,7 @@ class KupToolbar {
|
|
|
5132
5293
|
KupToolbarModifierKeys.CTRL,
|
|
5133
5294
|
];
|
|
5134
5295
|
__classPrivateFieldSet$1(this, _KupToolbar_keyEvent, function (e) {
|
|
5135
|
-
const toolbar = dom$
|
|
5296
|
+
const toolbar = dom$b.ketchup.toolbar;
|
|
5136
5297
|
if (toolbar.managedElements) {
|
|
5137
5298
|
for (let index = 0; index < toolbar.modifiers.length; index++) {
|
|
5138
5299
|
if (toolbar.modifiers[index] ===
|
|
@@ -5479,65 +5640,1168 @@ var KupDataNewColumnTypes;
|
|
|
5479
5640
|
KupDataNewColumnTypes["MERGE"] = "merge";
|
|
5480
5641
|
})(KupDataNewColumnTypes || (KupDataNewColumnTypes = {}));
|
|
5481
5642
|
|
|
5482
|
-
const dom$7 = document.documentElement;
|
|
5483
5643
|
/**
|
|
5484
|
-
*
|
|
5485
|
-
*
|
|
5486
|
-
* @param {KupDataFindCellFilters} filters - Filters of the research.
|
|
5487
|
-
* @returns {KupDataCell[]} Array of cells fetched after applying the filters.
|
|
5644
|
+
* Props of the kup-data-table component.
|
|
5645
|
+
* Used to export every prop in an object.
|
|
5488
5646
|
*/
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5647
|
+
var KupDataTableProps;
|
|
5648
|
+
(function (KupDataTableProps) {
|
|
5649
|
+
KupDataTableProps["autoFillMissingCells"] = "When true and when a row is missing some columns, the missing cells will be autogenerated.";
|
|
5650
|
+
KupDataTableProps["customStyle"] = "Custom style of the component.";
|
|
5651
|
+
KupDataTableProps["data"] = "The data of the table.";
|
|
5652
|
+
KupDataTableProps["density"] = "The density of the rows, defaults at 'medium' and can be also set to 'large' or 'small'.";
|
|
5653
|
+
KupDataTableProps["dragEnabled"] = "Enables drag.";
|
|
5654
|
+
KupDataTableProps["dropEnabled"] = "Enables drop.";
|
|
5655
|
+
KupDataTableProps["editableData"] = "When set to true, editable cells will be rendered using input components.";
|
|
5656
|
+
KupDataTableProps["emptyDataLabel"] = "Defines the label to show when the table is empty.";
|
|
5657
|
+
KupDataTableProps["enableColumnsFormula"] = "Enables the choice to set formulas on columns by dragging them into different columns.";
|
|
5658
|
+
KupDataTableProps["enableMergeColumns"] = "Enables the merging of columns by dragging them into different columns.";
|
|
5659
|
+
KupDataTableProps["enableExtraColumns"] = "Enables adding extra columns.";
|
|
5660
|
+
KupDataTableProps["enableSortableColumns"] = "Enables the sorting of columns by dragging them into different columns.";
|
|
5661
|
+
KupDataTableProps["expandGroups"] = "Expands groups when set to true.";
|
|
5662
|
+
KupDataTableProps["filters"] = "List of filters set by the user.";
|
|
5663
|
+
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.";
|
|
5664
|
+
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.";
|
|
5665
|
+
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.";
|
|
5666
|
+
KupDataTableProps["globalFilter"] = "When set to true it activates the global filter.";
|
|
5667
|
+
KupDataTableProps["globalFilterValue"] = "The value of the global filter.";
|
|
5668
|
+
KupDataTableProps["groupLabelDisplay"] = "How the label of a group must be displayed. For available values";
|
|
5669
|
+
KupDataTableProps["groups"] = "The list of groups.";
|
|
5670
|
+
KupDataTableProps["headerIsPersistent"] = "When set to true the header will stick on top of the table when scrolling.";
|
|
5671
|
+
KupDataTableProps["isFocusable"] = "When set to true, clicked-on rows will have a visual feedback.";
|
|
5672
|
+
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.";
|
|
5673
|
+
KupDataTableProps["lineBreakCharacter"] = "Defines the placeholder character which will be replaced by a line break inside table header cells, normal or sticky.";
|
|
5674
|
+
KupDataTableProps["loadMoreLimit"] = "Sets a maximum limit of new records which can be required by the load more functionality.";
|
|
5675
|
+
KupDataTableProps["loadMoreMode"] = "Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.";
|
|
5676
|
+
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.";
|
|
5677
|
+
KupDataTableProps["multiSelection"] = "When set to true enables rows multi selection.";
|
|
5678
|
+
KupDataTableProps["pageSelected"] = "Current selected page set on component load";
|
|
5679
|
+
KupDataTableProps["paginatorPos"] = "Sets the position of the paginator. Available positions: top, bottom or both.";
|
|
5680
|
+
KupDataTableProps["removableColumns"] = "Sets the possibility to remove the selected column.";
|
|
5681
|
+
KupDataTableProps["resizableColumns"] = "Gives the possibility to resize columns by dragging on their right edge.";
|
|
5682
|
+
KupDataTableProps["rowActions"] = "Sets the actions of the rows.";
|
|
5683
|
+
KupDataTableProps["rowsPerPage"] = "Sets the number of rows per page to display.";
|
|
5684
|
+
KupDataTableProps["scrollOnHover"] = "Activates the scroll on hover function.";
|
|
5685
|
+
KupDataTableProps["showCustomization"] = "If set to true, displays the button to open the customization panel.";
|
|
5686
|
+
KupDataTableProps["showFilters"] = "When set to true enables the column filters.";
|
|
5687
|
+
KupDataTableProps["showFooter"] = "When set to true shows the footer.";
|
|
5688
|
+
KupDataTableProps["showGrid"] = "Can be used to customize the grid view of the table.";
|
|
5689
|
+
KupDataTableProps["showGroups"] = "When set to true enables the column grouping.";
|
|
5690
|
+
KupDataTableProps["showHeader"] = "Enables rendering of the table header.";
|
|
5691
|
+
KupDataTableProps["showLoadMore"] = "If set to true, displays the button to load more records.";
|
|
5692
|
+
KupDataTableProps["sort"] = "Defines the current sorting options.";
|
|
5693
|
+
KupDataTableProps["stateId"] = "";
|
|
5694
|
+
KupDataTableProps["store"] = "";
|
|
5695
|
+
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";
|
|
5696
|
+
KupDataTableProps["sortEnabled"] = "When set to true enables the sorting of the columns by clicking on the column header.";
|
|
5697
|
+
KupDataTableProps["tableHeight"] = "Sets the height of the table.";
|
|
5698
|
+
KupDataTableProps["tableWidth"] = "Sets the width of the table.";
|
|
5699
|
+
KupDataTableProps["totals"] = "Defines the current totals options.";
|
|
5700
|
+
KupDataTableProps["transpose"] = "Transposes the data of the data table.";
|
|
5701
|
+
})(KupDataTableProps || (KupDataTableProps = {}));
|
|
5702
|
+
var SortMode;
|
|
5703
|
+
(function (SortMode) {
|
|
5704
|
+
SortMode["A"] = "A";
|
|
5705
|
+
SortMode["D"] = "D";
|
|
5706
|
+
})(SortMode || (SortMode = {}));
|
|
5707
|
+
var TotalMode;
|
|
5708
|
+
(function (TotalMode) {
|
|
5709
|
+
TotalMode["COUNT"] = "Count";
|
|
5710
|
+
TotalMode["SUM"] = "Sum";
|
|
5711
|
+
TotalMode["MIN"] = "Min";
|
|
5712
|
+
TotalMode["MAX"] = "Max";
|
|
5713
|
+
TotalMode["DISTINCT"] = "Distinct";
|
|
5714
|
+
TotalMode["AVERAGE"] = "Average";
|
|
5715
|
+
TotalMode["MATH"] = "MATH";
|
|
5716
|
+
})(TotalMode || (TotalMode = {}));
|
|
5717
|
+
var TotalLabel;
|
|
5718
|
+
(function (TotalLabel) {
|
|
5719
|
+
TotalLabel["COUNT"] = "Count";
|
|
5720
|
+
TotalLabel["SUM"] = "Sum";
|
|
5721
|
+
TotalLabel["MIN"] = "Min";
|
|
5722
|
+
TotalLabel["MAX"] = "Max";
|
|
5723
|
+
TotalLabel["DISTINCT"] = "Distinct";
|
|
5724
|
+
TotalLabel["AVERAGE"] = "Average";
|
|
5725
|
+
TotalLabel["MATH"] = "Formula";
|
|
5726
|
+
TotalLabel["CANC"] = "Cancel";
|
|
5727
|
+
TotalLabel["CALC"] = "Calculate";
|
|
5728
|
+
})(TotalLabel || (TotalLabel = {}));
|
|
5729
|
+
var PaginatorPos;
|
|
5730
|
+
(function (PaginatorPos) {
|
|
5731
|
+
PaginatorPos["TOP"] = "Top";
|
|
5732
|
+
PaginatorPos["BOTTOM"] = "Bottom";
|
|
5733
|
+
PaginatorPos["BOTH"] = "Both";
|
|
5734
|
+
})(PaginatorPos || (PaginatorPos = {}));
|
|
5735
|
+
var ShowGrid;
|
|
5736
|
+
(function (ShowGrid) {
|
|
5737
|
+
ShowGrid["NONE"] = "None";
|
|
5738
|
+
ShowGrid["ROW"] = "Row";
|
|
5739
|
+
ShowGrid["COL"] = "Col";
|
|
5740
|
+
ShowGrid["COMPLETE"] = "Complete";
|
|
5741
|
+
})(ShowGrid || (ShowGrid = {}));
|
|
5742
|
+
// export enum RowActionType {
|
|
5743
|
+
// DEFAULT = 'Default',
|
|
5744
|
+
// VARIABLE = 'Variable',
|
|
5745
|
+
// }
|
|
5746
|
+
//---- *NEXT functionality AKA load more ----
|
|
5747
|
+
var LoadMoreMode;
|
|
5748
|
+
(function (LoadMoreMode) {
|
|
5749
|
+
LoadMoreMode["CONSTANT"] = "constant";
|
|
5750
|
+
LoadMoreMode["CONSTANT_INCREMENT"] = "constant_increment";
|
|
5751
|
+
LoadMoreMode["PROGRESSIVE_THRESHOLD"] = "progressive_threshold";
|
|
5752
|
+
})(LoadMoreMode || (LoadMoreMode = {}));
|
|
5753
|
+
//---- Group label display functionality ----
|
|
5492
5754
|
/**
|
|
5493
|
-
*
|
|
5494
|
-
* @
|
|
5495
|
-
* @
|
|
5496
|
-
* @
|
|
5755
|
+
* The possible values the display property can have.
|
|
5756
|
+
* @enum
|
|
5757
|
+
* @property {string} BOTH - Shows both the column label and the value. This is the default.
|
|
5758
|
+
* @property {string} LABEL - Shows only the columns label.
|
|
5759
|
+
* @property {string} VALUE - Shows only the value.
|
|
5760
|
+
* @readonly
|
|
5497
5761
|
*/
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5762
|
+
var GroupLabelDisplayMode;
|
|
5763
|
+
(function (GroupLabelDisplayMode) {
|
|
5764
|
+
GroupLabelDisplayMode["BOTH"] = "Both";
|
|
5765
|
+
GroupLabelDisplayMode["LABEL"] = "Label";
|
|
5766
|
+
GroupLabelDisplayMode["VALUE"] = "Value";
|
|
5767
|
+
})(GroupLabelDisplayMode || (GroupLabelDisplayMode = {}));
|
|
5768
|
+
//---- Fixed rows and cells classes ----
|
|
5769
|
+
const FixedCellsClasses = {
|
|
5770
|
+
columns: 'fixed-column',
|
|
5771
|
+
rows: 'fixed-row',
|
|
5772
|
+
};
|
|
5773
|
+
const FixedCellsCSSVarsBase = {
|
|
5774
|
+
columns: '--ddt_column-left-',
|
|
5775
|
+
rows: '--ddt_row-top-',
|
|
5776
|
+
};
|
|
5512
5777
|
/**
|
|
5513
|
-
*
|
|
5514
|
-
* If no columns are provided, the value will be applied to every column of the dataset.
|
|
5515
|
-
* @param {KupDataDataset} dataset - Input dataset.
|
|
5516
|
-
* @param {KupDataCell} cell - New cell.
|
|
5517
|
-
* @param {string[]} columns - Columns to be handled.
|
|
5518
|
-
* @returns {KupDataCell[]} Replaced cells.
|
|
5778
|
+
* Constants for mocked/premade columns created by data mutations.
|
|
5519
5779
|
*/
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
}
|
|
5531
|
-
}
|
|
5532
|
-
return replaced;
|
|
5533
|
-
}
|
|
5780
|
+
const fieldColumn = 'Field';
|
|
5781
|
+
const iconColumn = 'Icon';
|
|
5782
|
+
const keyColumn = 'Key';
|
|
5783
|
+
var SelectionMode;
|
|
5784
|
+
(function (SelectionMode) {
|
|
5785
|
+
SelectionMode["SINGLE"] = "single";
|
|
5786
|
+
SelectionMode["MULTIPLE_CHECKBOX"] = "multiple-checkbox";
|
|
5787
|
+
SelectionMode["MULTIPLE"] = "multiple";
|
|
5788
|
+
SelectionMode["NONE"] = "none";
|
|
5789
|
+
})(SelectionMode || (SelectionMode = {}));
|
|
5534
5790
|
|
|
5535
|
-
const dom$6 = document.documentElement;
|
|
5536
5791
|
/**
|
|
5537
|
-
*
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5792
|
+
* Normalization types.
|
|
5793
|
+
*/
|
|
5794
|
+
var KupDatesNormalize;
|
|
5795
|
+
(function (KupDatesNormalize) {
|
|
5796
|
+
KupDatesNormalize["DATE"] = "date";
|
|
5797
|
+
KupDatesNormalize["TIME"] = "time";
|
|
5798
|
+
KupDatesNormalize["TIMESTAMP"] = "timestamp";
|
|
5799
|
+
})(KupDatesNormalize || (KupDatesNormalize = {}));
|
|
5800
|
+
/**
|
|
5801
|
+
* Common use formats
|
|
5802
|
+
*/
|
|
5803
|
+
var KupDatesFormats;
|
|
5804
|
+
(function (KupDatesFormats) {
|
|
5805
|
+
KupDatesFormats["ISO_DATE"] = "YYYY-MM-DD";
|
|
5806
|
+
KupDatesFormats["ISO_DATE_TIME"] = "YYYY-MM-DD HH:mm:ss";
|
|
5807
|
+
KupDatesFormats["ISO_TIME"] = "HH:mm:ss";
|
|
5808
|
+
KupDatesFormats["ISO_TIME_WITHOUT_SECONDS"] = "HH:mm";
|
|
5809
|
+
})(KupDatesFormats || (KupDatesFormats = {}));
|
|
5810
|
+
/**
|
|
5811
|
+
* Supported locales.
|
|
5812
|
+
*/
|
|
5813
|
+
var KupDatesLocales;
|
|
5814
|
+
(function (KupDatesLocales) {
|
|
5815
|
+
KupDatesLocales["CHINESE"] = "cn";
|
|
5816
|
+
KupDatesLocales["ENGLISH"] = "en";
|
|
5817
|
+
KupDatesLocales["FRENCH"] = "fr";
|
|
5818
|
+
KupDatesLocales["ITALIAN"] = "it";
|
|
5819
|
+
KupDatesLocales["POLISH"] = "pl";
|
|
5820
|
+
KupDatesLocales["RUSSIAN"] = "ru";
|
|
5821
|
+
KupDatesLocales["SPANISH"] = "es";
|
|
5822
|
+
})(KupDatesLocales || (KupDatesLocales = {}));
|
|
5823
|
+
|
|
5824
|
+
const dom$a = document.documentElement;
|
|
5825
|
+
var DateTimeFormatOptionsMonth;
|
|
5826
|
+
(function (DateTimeFormatOptionsMonth) {
|
|
5827
|
+
DateTimeFormatOptionsMonth["NUMERIC"] = "numeric";
|
|
5828
|
+
DateTimeFormatOptionsMonth["DIGIT2"] = "2-digit";
|
|
5829
|
+
DateTimeFormatOptionsMonth["LONG"] = "long";
|
|
5830
|
+
DateTimeFormatOptionsMonth["SHORT"] = "short";
|
|
5831
|
+
DateTimeFormatOptionsMonth["NARROW"] = "narrow";
|
|
5832
|
+
})(DateTimeFormatOptionsMonth || (DateTimeFormatOptionsMonth = {}));
|
|
5833
|
+
function identify(array) {
|
|
5834
|
+
if (array) {
|
|
5835
|
+
for (let i = 0; i < array.length; i++) {
|
|
5836
|
+
array[i].id = i.toString();
|
|
5837
|
+
}
|
|
5838
|
+
}
|
|
5839
|
+
}
|
|
5840
|
+
function getSeparator(locale, separatorType) {
|
|
5841
|
+
const numberWithGroupAndDecimalSeparator = 1000.1;
|
|
5842
|
+
return Intl.NumberFormat(locale)
|
|
5843
|
+
.formatToParts(numberWithGroupAndDecimalSeparator)
|
|
5844
|
+
.find((part) => part.type === separatorType).value;
|
|
5845
|
+
}
|
|
5846
|
+
function getCurrentTimeFormatFromBrowserLocale(manageSeconds) {
|
|
5847
|
+
const options = {
|
|
5848
|
+
hour: '2-digit',
|
|
5849
|
+
minute: '2-digit',
|
|
5850
|
+
hour12: false,
|
|
5851
|
+
};
|
|
5852
|
+
if (manageSeconds == true) {
|
|
5853
|
+
options.second = '2-digit';
|
|
5854
|
+
}
|
|
5855
|
+
const formatObj = new Intl.DateTimeFormat(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options).formatToParts(new Date());
|
|
5856
|
+
let timeFormat = formatObj
|
|
5857
|
+
.map((obj) => {
|
|
5858
|
+
switch (obj.type) {
|
|
5859
|
+
case 'hour':
|
|
5860
|
+
return 'HH';
|
|
5861
|
+
case 'minute':
|
|
5862
|
+
return 'mm';
|
|
5863
|
+
case 'second':
|
|
5864
|
+
return 'ss';
|
|
5865
|
+
default:
|
|
5866
|
+
return obj.value;
|
|
5867
|
+
}
|
|
5868
|
+
})
|
|
5869
|
+
.join('');
|
|
5870
|
+
return timeFormat;
|
|
5871
|
+
}
|
|
5872
|
+
/**
|
|
5873
|
+
* @param value number as string, formatted by actual browser locale
|
|
5874
|
+
* @param type - type of number for calculate suffix
|
|
5875
|
+
* @returns true if number string in input is a valid number
|
|
5876
|
+
*/
|
|
5877
|
+
function isValidFormattedStringNumber(value, type) {
|
|
5878
|
+
if (value == null || value.trim() == '') {
|
|
5879
|
+
return false;
|
|
5880
|
+
}
|
|
5881
|
+
let tmpStr = formattedStringToUnformattedStringNumber(value, type);
|
|
5882
|
+
if (isNumber(tmpStr)) {
|
|
5883
|
+
return true;
|
|
5884
|
+
}
|
|
5885
|
+
return false;
|
|
5886
|
+
}
|
|
5887
|
+
function isNumber(value) {
|
|
5888
|
+
//return typeof value === 'number';
|
|
5889
|
+
return !isNaN(value);
|
|
5890
|
+
}
|
|
5891
|
+
/**
|
|
5892
|
+
* @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
|
|
5893
|
+
* @returns number
|
|
5894
|
+
**/
|
|
5895
|
+
function stringToNumber(input) {
|
|
5896
|
+
if (!input || input == null || input.trim() == '') {
|
|
5897
|
+
input = '0';
|
|
5898
|
+
}
|
|
5899
|
+
return dom$a.ketchup.math.numberify(input);
|
|
5900
|
+
}
|
|
5901
|
+
/**
|
|
5902
|
+
* @param input number
|
|
5903
|
+
* @param decimals number of significant decimal digits for output
|
|
5904
|
+
* @returns number as string, formatted by actual browser locale
|
|
5905
|
+
**/
|
|
5906
|
+
function numberToString(input, decimals) {
|
|
5907
|
+
if (input == null) {
|
|
5908
|
+
return '';
|
|
5909
|
+
}
|
|
5910
|
+
return _numberToString(input, decimals, dom$a.ketchup.dates.getLocale(), true);
|
|
5911
|
+
}
|
|
5912
|
+
/**
|
|
5913
|
+
* @param type - type of number for calculate suffix
|
|
5914
|
+
* @returns suffix for number, by type
|
|
5915
|
+
**/
|
|
5916
|
+
function getNumericValueSuffixByType(type) {
|
|
5917
|
+
type = type.toUpperCase();
|
|
5918
|
+
let nstr = '';
|
|
5919
|
+
if (type == 'P') {
|
|
5920
|
+
nstr = ' %';
|
|
5921
|
+
}
|
|
5922
|
+
else if (type == 'VE') {
|
|
5923
|
+
nstr = ' €';
|
|
5924
|
+
}
|
|
5925
|
+
else if (type == 'VL') {
|
|
5926
|
+
nstr = ' £';
|
|
5927
|
+
}
|
|
5928
|
+
else if (type == 'VV') {
|
|
5929
|
+
nstr = ' $';
|
|
5930
|
+
}
|
|
5931
|
+
return nstr;
|
|
5932
|
+
}
|
|
5933
|
+
/**
|
|
5934
|
+
* @param input number
|
|
5935
|
+
* @param decimals number of significant decimal digits for output
|
|
5936
|
+
* @param type - type of number for calculate suffix
|
|
5937
|
+
* @returns number as string, formatted by actual browser locale, with suffix by type
|
|
5938
|
+
**/
|
|
5939
|
+
function numberToFormattedStringNumber(input, decimals, type) {
|
|
5940
|
+
if (input == null || isNaN(input)) {
|
|
5941
|
+
return '';
|
|
5942
|
+
}
|
|
5943
|
+
let nstr = numberToString(input, decimals);
|
|
5944
|
+
nstr = nstr + getNumericValueSuffixByType(type);
|
|
5945
|
+
return nstr;
|
|
5946
|
+
}
|
|
5947
|
+
/**
|
|
5948
|
+
* @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
|
|
5949
|
+
* @param decimals number of significant decimal digits for output
|
|
5950
|
+
* @param type - type of number for calculate suffix
|
|
5951
|
+
* @returns number as string, formatted by actual browser locale, with suffix by type
|
|
5952
|
+
**/
|
|
5953
|
+
function unformattedStringToFormattedStringNumber(input, decimals, type) {
|
|
5954
|
+
return numberToFormattedStringNumber(stringToNumber(input), decimals, type);
|
|
5955
|
+
}
|
|
5956
|
+
/**
|
|
5957
|
+
* @param input number as string, formatted by actual browser locale
|
|
5958
|
+
* @param type - type of number for calculate suffix
|
|
5959
|
+
* @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
|
|
5960
|
+
**/
|
|
5961
|
+
function formattedStringToUnformattedStringNumber(input, type) {
|
|
5962
|
+
return numberStringToNumberString(input, type, getDecimalSeparator(dom$a.ketchup.dates.getLocale()));
|
|
5963
|
+
}
|
|
5964
|
+
/**
|
|
5965
|
+
* @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers), with group separator
|
|
5966
|
+
* @param type - type of number for calculate suffix
|
|
5967
|
+
* @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
|
|
5968
|
+
**/
|
|
5969
|
+
function unformattedStringNumberToNumber(input, type) {
|
|
5970
|
+
return numberStringToNumberString(input, type, '.');
|
|
5971
|
+
}
|
|
5972
|
+
function numberStringToNumberString(input, type, decFmt) {
|
|
5973
|
+
if (input == null || input.trim() == '') {
|
|
5974
|
+
return '';
|
|
5975
|
+
}
|
|
5976
|
+
let originalInputValue = input;
|
|
5977
|
+
let suffix = getNumericValueSuffixByType(type);
|
|
5978
|
+
if (suffix != '') {
|
|
5979
|
+
input = input.replace(suffix, '');
|
|
5980
|
+
}
|
|
5981
|
+
let regExpr = null;
|
|
5982
|
+
if (decFmt == '.') {
|
|
5983
|
+
regExpr = /,/g;
|
|
5984
|
+
}
|
|
5985
|
+
else {
|
|
5986
|
+
regExpr = /\./g;
|
|
5987
|
+
}
|
|
5988
|
+
input = input.replace(regExpr, '');
|
|
5989
|
+
if (decFmt != '.') {
|
|
5990
|
+
input = input.replace(/,/g, '.');
|
|
5991
|
+
}
|
|
5992
|
+
if (dom$a.ketchup.math.numberify(input) == null ||
|
|
5993
|
+
isNaN(dom$a.ketchup.math.numberify(input))) {
|
|
5994
|
+
return originalInputValue;
|
|
5995
|
+
}
|
|
5996
|
+
let unf = stringToNumber(input);
|
|
5997
|
+
return _numberToString(unf, -1, 'en-US', false);
|
|
5998
|
+
}
|
|
5999
|
+
function getDecimalSeparator(locale) {
|
|
6000
|
+
return getSeparator(locale, 'decimal');
|
|
6001
|
+
}
|
|
6002
|
+
function countDecimals(value) {
|
|
6003
|
+
if (Math.floor(value) === value)
|
|
6004
|
+
return 0;
|
|
6005
|
+
let stringValue = value.toString().split('.')[1];
|
|
6006
|
+
if (stringValue) {
|
|
6007
|
+
return stringValue.length ? stringValue.length : 0;
|
|
6008
|
+
}
|
|
6009
|
+
else {
|
|
6010
|
+
return 0;
|
|
6011
|
+
}
|
|
6012
|
+
}
|
|
6013
|
+
function _numberToString(input, decimals, locale, useGrouping) {
|
|
6014
|
+
if (input == null) {
|
|
6015
|
+
input = 0;
|
|
6016
|
+
}
|
|
6017
|
+
if (decimals == null || decimals == -1) {
|
|
6018
|
+
decimals = countDecimals(input);
|
|
6019
|
+
}
|
|
6020
|
+
let n = Number(input);
|
|
6021
|
+
let f = decimals > -1
|
|
6022
|
+
? {
|
|
6023
|
+
minimumFractionDigits: decimals,
|
|
6024
|
+
maximumFractionDigits: decimals,
|
|
6025
|
+
useGrouping: useGrouping,
|
|
6026
|
+
}
|
|
6027
|
+
: { useGrouping: useGrouping };
|
|
6028
|
+
return n.toLocaleString(locale, f);
|
|
6029
|
+
}
|
|
6030
|
+
/**
|
|
6031
|
+
* @param time time as Date object
|
|
6032
|
+
* @param manageSeconds flag to set seconds managing
|
|
6033
|
+
* @return time as string, formatted
|
|
6034
|
+
**/
|
|
6035
|
+
function formatTime(time, manageSeconds) {
|
|
6036
|
+
const options = {
|
|
6037
|
+
hour: '2-digit',
|
|
6038
|
+
minute: '2-digit',
|
|
6039
|
+
hour12: false,
|
|
6040
|
+
};
|
|
6041
|
+
if (manageSeconds == true) {
|
|
6042
|
+
options.second = '2-digit';
|
|
6043
|
+
}
|
|
6044
|
+
return time.toLocaleTimeString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6045
|
+
}
|
|
6046
|
+
/**
|
|
6047
|
+
* @param value time string, formatted by actual browser locale
|
|
6048
|
+
* @returns true if time string in input is a valid time
|
|
6049
|
+
*/
|
|
6050
|
+
function isValidFormattedStringTime(value, manageSeconds) {
|
|
6051
|
+
let format = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
|
|
6052
|
+
return dom$a.ketchup.dates.isValid(value, format, true);
|
|
6053
|
+
}
|
|
6054
|
+
/**
|
|
6055
|
+
* @param value date/time as string, formatted by actual browser locale
|
|
6056
|
+
* @returns date/time as string, formatted ISO
|
|
6057
|
+
**/
|
|
6058
|
+
function formattedStringToDefaultUnformattedStringTimestamp(value) {
|
|
6059
|
+
return formattedStringToCustomUnformattedStringTime(value, KupDatesFormats.ISO_DATE_TIME, true);
|
|
6060
|
+
}
|
|
6061
|
+
/**
|
|
6062
|
+
* @param value time as string, formatted by actual browser locale
|
|
6063
|
+
* @param outputFormat time format to return
|
|
6064
|
+
* @param manageSeconds flag to set seconds managing
|
|
6065
|
+
* @returns time as string, formatted
|
|
6066
|
+
**/
|
|
6067
|
+
function formattedStringToCustomUnformattedStringTime(value, outputFormat, manageSeconds) {
|
|
6068
|
+
let inputFormat = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
|
|
6069
|
+
if (dom$a.ketchup.dates.isValid(value, inputFormat)) {
|
|
6070
|
+
return dom$a.ketchup.dates.format(dom$a.ketchup.dates.normalize(value, KupDatesNormalize.TIME), outputFormat);
|
|
6071
|
+
}
|
|
6072
|
+
else {
|
|
6073
|
+
return '';
|
|
6074
|
+
}
|
|
6075
|
+
}
|
|
6076
|
+
/**
|
|
6077
|
+
* @param value time as string, formatted ISO
|
|
6078
|
+
* @param manageSeconds flag to set seconds managing
|
|
6079
|
+
* @param valueTimeFormat time format (default ISO)
|
|
6080
|
+
* @param customedFormat time format from smeupObject
|
|
6081
|
+
* @returns time as string, formatted by actual browser locale
|
|
6082
|
+
**/
|
|
6083
|
+
function unformattedStringToFormattedStringTime(value, manageSeconds, customedFormat) {
|
|
6084
|
+
const options = {
|
|
6085
|
+
hour: '2-digit',
|
|
6086
|
+
minute: '2-digit',
|
|
6087
|
+
hour12: false,
|
|
6088
|
+
};
|
|
6089
|
+
if (manageSeconds == true) {
|
|
6090
|
+
options.second = '2-digit';
|
|
6091
|
+
}
|
|
6092
|
+
let date = dom$a.ketchup.dates.toDate(dom$a.ketchup.dates.normalize(value, KupDatesNormalize.TIME));
|
|
6093
|
+
return formatByCustomedOutputTimeFormat(value, date, options, customedFormat);
|
|
6094
|
+
}
|
|
6095
|
+
function formatByCustomedOutputTimeFormat(valueStr, date, options, customedFormat) {
|
|
6096
|
+
if (customedFormat == null) {
|
|
6097
|
+
return date.toLocaleTimeString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6098
|
+
}
|
|
6099
|
+
switch (customedFormat) {
|
|
6100
|
+
case 'I13': {
|
|
6101
|
+
//hh:mm
|
|
6102
|
+
break;
|
|
6103
|
+
}
|
|
6104
|
+
case 'I12': {
|
|
6105
|
+
//hh:mm:ss
|
|
6106
|
+
break;
|
|
6107
|
+
}
|
|
6108
|
+
case 'I11': {
|
|
6109
|
+
//???
|
|
6110
|
+
//hh:dddd
|
|
6111
|
+
//return moment(date).format('HH:DDDD');
|
|
6112
|
+
return valueStr;
|
|
6113
|
+
}
|
|
6114
|
+
case 'I14': {
|
|
6115
|
+
//???
|
|
6116
|
+
//sssss
|
|
6117
|
+
//return moment(date).format('SSSSS');
|
|
6118
|
+
return valueStr;
|
|
6119
|
+
}
|
|
6120
|
+
case 'I1H': {
|
|
6121
|
+
//???
|
|
6122
|
+
//Ora,Cen/Min HH,xx
|
|
6123
|
+
return valueStr;
|
|
6124
|
+
}
|
|
6125
|
+
case 'I1M': {
|
|
6126
|
+
//???
|
|
6127
|
+
//Min,Cen/Sec MMMM,xx
|
|
6128
|
+
return valueStr;
|
|
6129
|
+
}
|
|
6130
|
+
case 'I21': {
|
|
6131
|
+
//???
|
|
6132
|
+
//Giorni,(4 decim)
|
|
6133
|
+
return valueStr;
|
|
6134
|
+
}
|
|
6135
|
+
case 'I22': {
|
|
6136
|
+
//???
|
|
6137
|
+
//Ore,(4 decim)
|
|
6138
|
+
return valueStr;
|
|
6139
|
+
}
|
|
6140
|
+
case 'I23': {
|
|
6141
|
+
//???
|
|
6142
|
+
//Minuti,(4 decim)
|
|
6143
|
+
return valueStr;
|
|
6144
|
+
}
|
|
6145
|
+
case 'I24': {
|
|
6146
|
+
//???
|
|
6147
|
+
//Secondi
|
|
6148
|
+
return valueStr;
|
|
6149
|
+
}
|
|
6150
|
+
case 'I2H': {
|
|
6151
|
+
//???
|
|
6152
|
+
//Ora,Cen/Min HHHH,xx
|
|
6153
|
+
return valueStr;
|
|
6154
|
+
}
|
|
6155
|
+
case 'I2D': {
|
|
6156
|
+
//???
|
|
6157
|
+
//Ore Minuti Secondi HHMMS
|
|
6158
|
+
return valueStr;
|
|
6159
|
+
}
|
|
6160
|
+
case 'I2M': {
|
|
6161
|
+
//???
|
|
6162
|
+
//Min,Cen/Sec MMMM,xx
|
|
6163
|
+
return valueStr;
|
|
6164
|
+
}
|
|
6165
|
+
}
|
|
6166
|
+
return date.toLocaleTimeString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6167
|
+
}
|
|
6168
|
+
/**
|
|
6169
|
+
* @param value date/time as string, formatted ISO
|
|
6170
|
+
* @param valueDateFormat date/time format (default ISO)
|
|
6171
|
+
* @returns date/time as string, formatted by actual browser locale
|
|
6172
|
+
**/
|
|
6173
|
+
function unformattedStringToFormattedStringTimestamp(value) {
|
|
6174
|
+
const options = {
|
|
6175
|
+
day: '2-digit',
|
|
6176
|
+
month: '2-digit',
|
|
6177
|
+
year: 'numeric',
|
|
6178
|
+
hour: '2-digit',
|
|
6179
|
+
minute: '2-digit',
|
|
6180
|
+
second: '2-digit',
|
|
6181
|
+
hour12: false,
|
|
6182
|
+
};
|
|
6183
|
+
let date = dom$a.ketchup.dates.toDate(dom$a.ketchup.dates.normalize(value, KupDatesNormalize.TIMESTAMP));
|
|
6184
|
+
return date.toLocaleString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6185
|
+
}
|
|
6186
|
+
function getMonthAsStringByLocale(month, format) {
|
|
6187
|
+
if (month == null) {
|
|
6188
|
+
return '';
|
|
6189
|
+
}
|
|
6190
|
+
const dateTmp = new Date();
|
|
6191
|
+
dateTmp.setDate(1);
|
|
6192
|
+
dateTmp.setMonth(month - 1);
|
|
6193
|
+
const options = {
|
|
6194
|
+
month: format,
|
|
6195
|
+
};
|
|
6196
|
+
const dateTimeFormat = new Intl.DateTimeFormat(dom$a.ketchup.dates.getLocale(), options);
|
|
6197
|
+
return dateTimeFormat.format(dateTmp);
|
|
6198
|
+
}
|
|
6199
|
+
function getMonthsAsStringByLocale(format) {
|
|
6200
|
+
if (format == null || format.trim() == '') {
|
|
6201
|
+
format = DateTimeFormatOptionsMonth.LONG;
|
|
6202
|
+
}
|
|
6203
|
+
var months = [];
|
|
6204
|
+
for (var i = 0; i < 12; i++) {
|
|
6205
|
+
months[i] = getMonthAsStringByLocale(i + 1, format);
|
|
6206
|
+
}
|
|
6207
|
+
return months;
|
|
6208
|
+
}
|
|
6209
|
+
/**
|
|
6210
|
+
* Used to retrieve component's props values.
|
|
6211
|
+
* @param {any} comp - Component calling this function.
|
|
6212
|
+
* @param {GenericObject} list - Prop list, specific for each component.
|
|
6213
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
6214
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
6215
|
+
*/
|
|
6216
|
+
function getProps(comp, list, descriptions) {
|
|
6217
|
+
let props = {};
|
|
6218
|
+
if (descriptions) {
|
|
6219
|
+
props = list;
|
|
6220
|
+
}
|
|
6221
|
+
else {
|
|
6222
|
+
for (const key in list) {
|
|
6223
|
+
if (Object.prototype.hasOwnProperty.call(list, key)) {
|
|
6224
|
+
props[key] = comp[key];
|
|
6225
|
+
}
|
|
6226
|
+
}
|
|
6227
|
+
}
|
|
6228
|
+
return props;
|
|
6229
|
+
}
|
|
6230
|
+
/**
|
|
6231
|
+
* Sets the props to the component.
|
|
6232
|
+
* @param {any} comp - Component calling this function.
|
|
6233
|
+
* @param {GenericObject} list - Prop list, specific for each component.
|
|
6234
|
+
* @param {GenericObject} props - Prop to be set.
|
|
6235
|
+
*/
|
|
6236
|
+
function setProps(comp, list, props) {
|
|
6237
|
+
for (const key in props) {
|
|
6238
|
+
// If key is a custom prop it will be set on the component (i.e.: "data", "customStyle", ecc.)
|
|
6239
|
+
if (list[key]) {
|
|
6240
|
+
comp[key] = props[key];
|
|
6241
|
+
}
|
|
6242
|
+
else {
|
|
6243
|
+
// Otherwise, it will be set on its HTML element (i.e.: "id", "style", ecc.)
|
|
6244
|
+
comp.rootElement[key] = props[key];
|
|
6245
|
+
}
|
|
6246
|
+
}
|
|
6247
|
+
}
|
|
6248
|
+
|
|
6249
|
+
const dom$9 = document.documentElement;
|
|
6250
|
+
// -------------
|
|
6251
|
+
// COMMONS
|
|
6252
|
+
// -------------
|
|
6253
|
+
function getCellValueForDisplay(column, cell) {
|
|
6254
|
+
if (cell != null) {
|
|
6255
|
+
if (cell.displayedValue != null) {
|
|
6256
|
+
return cell.displayedValue;
|
|
6257
|
+
}
|
|
6258
|
+
}
|
|
6259
|
+
let formattedValue = _getCellValueForDisplay(cell.value, column, cell);
|
|
6260
|
+
if (cell != null) {
|
|
6261
|
+
cell.displayedValue = formattedValue;
|
|
6262
|
+
}
|
|
6263
|
+
return formattedValue;
|
|
6264
|
+
}
|
|
6265
|
+
function getValueForDisplay2(values, column) {
|
|
6266
|
+
if (values == null) {
|
|
6267
|
+
return '';
|
|
6268
|
+
}
|
|
6269
|
+
if (values.displayedValue == null || values.displayedValue.trim() == '') {
|
|
6270
|
+
values.displayedValue = _getCellValueForDisplay(values.value, column, null);
|
|
6271
|
+
}
|
|
6272
|
+
return values.displayedValue;
|
|
6273
|
+
}
|
|
6274
|
+
function formatToNumber(cell) {
|
|
6275
|
+
if (cell.obj) {
|
|
6276
|
+
return dom$9.ketchup.math.numberify(cell.obj.k);
|
|
6277
|
+
}
|
|
6278
|
+
return dom$9.ketchup.math.numberify(cell.value);
|
|
6279
|
+
}
|
|
6280
|
+
function _getCellValueForDisplay(value, column, cell) {
|
|
6281
|
+
let obj = column != null ? column.obj : null;
|
|
6282
|
+
if (cell != null) {
|
|
6283
|
+
obj = cell.obj ? cell.obj : obj;
|
|
6284
|
+
}
|
|
6285
|
+
return getValueForDisplay(value, obj, column != null ? column.decimals : null);
|
|
6286
|
+
}
|
|
6287
|
+
function getValueForDisplay(value, obj, decimals) {
|
|
6288
|
+
if (value == null || value.trim() == '') {
|
|
6289
|
+
return value;
|
|
6290
|
+
}
|
|
6291
|
+
if (dom$9.ketchup.objects.isNumber(obj)) {
|
|
6292
|
+
return unformattedStringToFormattedStringNumber(value, decimals ? decimals : -1, obj ? obj.p : '');
|
|
6293
|
+
}
|
|
6294
|
+
if (dom$9.ketchup.objects.isDate(obj) &&
|
|
6295
|
+
dom$9.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
|
|
6296
|
+
return dom$9.ketchup.dates.format(value);
|
|
6297
|
+
}
|
|
6298
|
+
if (dom$9.ketchup.objects.isTime(obj)) {
|
|
6299
|
+
return unformattedStringToFormattedStringTime(value, dom$9.ketchup.objects.isTimeWithSeconds(obj), obj.t + obj.p);
|
|
6300
|
+
}
|
|
6301
|
+
if (dom$9.ketchup.objects.isTimestamp(obj)) {
|
|
6302
|
+
return unformattedStringToFormattedStringTimestamp(value);
|
|
6303
|
+
}
|
|
6304
|
+
return value;
|
|
6305
|
+
}
|
|
6306
|
+
function getColumnByName(columns, name) {
|
|
6307
|
+
if (columns == null) {
|
|
6308
|
+
return null;
|
|
6309
|
+
}
|
|
6310
|
+
for (let column of columns) {
|
|
6311
|
+
if (column.name === name) {
|
|
6312
|
+
return column;
|
|
6313
|
+
}
|
|
6314
|
+
}
|
|
6315
|
+
return null;
|
|
6316
|
+
}
|
|
6317
|
+
function compareCell(cell1, cell2, sortMode) {
|
|
6318
|
+
return compareValues(cell1.obj, cell1.value, cell2.obj, cell2.value, sortMode);
|
|
6319
|
+
}
|
|
6320
|
+
function compareValues(obj1, value1, obj2, value2, sortMode) {
|
|
6321
|
+
const sm = sortMode === 'A' ? 1 : -1;
|
|
6322
|
+
if (obj1 == null || obj2 == null) {
|
|
6323
|
+
return sm * localCompareAsInJava(value1, value2);
|
|
6324
|
+
}
|
|
6325
|
+
// If either the type or the parameter of the current object are not equal.
|
|
6326
|
+
if (!(obj1.t === obj2.t && obj1.p === obj2.p)) {
|
|
6327
|
+
let compare = localCompareAsInJava(obj1.t, obj2.t);
|
|
6328
|
+
if (compare === 0) {
|
|
6329
|
+
compare = localCompareAsInJava(obj1.p, obj2.p);
|
|
6330
|
+
}
|
|
6331
|
+
return compare * sm;
|
|
6332
|
+
}
|
|
6333
|
+
let s1 = value1;
|
|
6334
|
+
let s2 = value2;
|
|
6335
|
+
if (s1 == s2) {
|
|
6336
|
+
return 0;
|
|
6337
|
+
}
|
|
6338
|
+
if (s1 == '') {
|
|
6339
|
+
return sm * -1;
|
|
6340
|
+
}
|
|
6341
|
+
if (s2 == '') {
|
|
6342
|
+
return sm * 1;
|
|
6343
|
+
}
|
|
6344
|
+
let v1 = s1;
|
|
6345
|
+
let v2 = s2;
|
|
6346
|
+
if (dom$9.ketchup.objects.isNumber(obj1)) {
|
|
6347
|
+
v1 = stringToNumber(s1);
|
|
6348
|
+
v2 = stringToNumber(s2);
|
|
6349
|
+
}
|
|
6350
|
+
else if (dom$9.ketchup.objects.isDate(obj1)) {
|
|
6351
|
+
v1 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s1, KupDatesFormats.ISO_DATE));
|
|
6352
|
+
v2 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s2, KupDatesFormats.ISO_DATE));
|
|
6353
|
+
}
|
|
6354
|
+
else if (dom$9.ketchup.objects.isTime(obj1)) {
|
|
6355
|
+
let manageSeconds = dom$9.ketchup.objects.isTimeWithSeconds(obj1);
|
|
6356
|
+
v1 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s1, manageSeconds
|
|
6357
|
+
? KupDatesFormats.ISO_TIME
|
|
6358
|
+
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
|
|
6359
|
+
v2 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s2, manageSeconds
|
|
6360
|
+
? KupDatesFormats.ISO_TIME
|
|
6361
|
+
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
|
|
6362
|
+
}
|
|
6363
|
+
else if (dom$9.ketchup.objects.isTimestamp(obj1)) {
|
|
6364
|
+
v1 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s1, KupDatesFormats.ISO_DATE_TIME));
|
|
6365
|
+
v2 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s2, KupDatesFormats.ISO_DATE_TIME));
|
|
6366
|
+
}
|
|
6367
|
+
if (v1 > v2) {
|
|
6368
|
+
return sm * 1;
|
|
6369
|
+
}
|
|
6370
|
+
if (v1 < v2) {
|
|
6371
|
+
return sm * -1;
|
|
6372
|
+
}
|
|
6373
|
+
return 0;
|
|
6374
|
+
}
|
|
6375
|
+
/**
|
|
6376
|
+
* Given two strings to compare, the functions decides which string comes before the other or if they are equal.
|
|
6377
|
+
* This is meant as a replacement for the JavaScript function localCompare() which produces a slightly different result from
|
|
6378
|
+
* the Java version of compareTo().
|
|
6379
|
+
*
|
|
6380
|
+
* Re-implemented from java source method compareTo() of java.lang.String
|
|
6381
|
+
* @param t1 firstString the first string to be compared
|
|
6382
|
+
* @param t2 anotherString the another string to be compared to the first one
|
|
6383
|
+
* @returns the value 0 if the anotherString is equal to
|
|
6384
|
+
* firstString; a value less than 0 if firstString
|
|
6385
|
+
* is lexicographically less than the anotherString; and a
|
|
6386
|
+
* value greater than 0 if firstString is
|
|
6387
|
+
* lexicographically greater than the anotherString.
|
|
6388
|
+
*/
|
|
6389
|
+
function localCompareAsInJava(t1, t2) {
|
|
6390
|
+
let t1Length = t1 == null ? 0 : t1.length;
|
|
6391
|
+
let t2Length = t2 == null ? 0 : t2.length;
|
|
6392
|
+
const lim = Math.min(t1Length, t2Length);
|
|
6393
|
+
let k = 0;
|
|
6394
|
+
while (k < lim) {
|
|
6395
|
+
const c1 = t1[k];
|
|
6396
|
+
const c2 = t2[k];
|
|
6397
|
+
if (c1 !== c2) {
|
|
6398
|
+
return c1.charCodeAt(0) - c2.charCodeAt(0);
|
|
6399
|
+
}
|
|
6400
|
+
k++;
|
|
6401
|
+
}
|
|
6402
|
+
return t1Length - t2Length;
|
|
6403
|
+
}
|
|
6404
|
+
|
|
6405
|
+
/**
|
|
6406
|
+
* Interface for ranged filters.
|
|
6407
|
+
*/
|
|
6408
|
+
var FilterInterval;
|
|
6409
|
+
(function (FilterInterval) {
|
|
6410
|
+
FilterInterval[FilterInterval["FROM"] = 0] = "FROM";
|
|
6411
|
+
FilterInterval[FilterInterval["TO"] = 1] = "TO";
|
|
6412
|
+
})(FilterInterval || (FilterInterval = {}));
|
|
6413
|
+
/**
|
|
6414
|
+
* This regular expressions returns a match like this one:
|
|
6415
|
+
* if the string does not match is null, otherwise the indexes are equal to the object below:
|
|
6416
|
+
*
|
|
6417
|
+
* @property {string} 0 - The entire match of the regexp; is equal to the cellValue.
|
|
6418
|
+
* @property {string} 1 - Either !' or ' it's the start of the regexp.
|
|
6419
|
+
* @property {string} 2 - Either % or null: means the string must start with the given string.
|
|
6420
|
+
* @property {string} 3 - Either "" or a string with a length.
|
|
6421
|
+
* @property {string} 4 - Either % or null: means the string must finish with the given string.
|
|
6422
|
+
* @property {string} 5 - Always equal to ': it's the end of the filter.
|
|
6423
|
+
*/
|
|
6424
|
+
const FILTER_ANALIZER = /^('|!')(%){0,1}(.*?)(%){0,1}(')$/;
|
|
6425
|
+
var KupGlobalFilterMode;
|
|
6426
|
+
(function (KupGlobalFilterMode) {
|
|
6427
|
+
KupGlobalFilterMode["SIMPLE"] = "simple";
|
|
6428
|
+
KupGlobalFilterMode["HIGHLIGHT"] = "highlight";
|
|
6429
|
+
})(KupGlobalFilterMode || (KupGlobalFilterMode = {}));
|
|
6430
|
+
|
|
6431
|
+
const dom$8 = document.documentElement;
|
|
6432
|
+
/**
|
|
6433
|
+
* Filtering algorithms.
|
|
6434
|
+
* @module Filters
|
|
6435
|
+
* @todo Should contain EVERY filtering method in common between filtering types (i.e.: global filters and column menu filters).
|
|
6436
|
+
*/
|
|
6437
|
+
class Filters {
|
|
6438
|
+
/**
|
|
6439
|
+
* Function used to check whether the component is a KupTree or KupDataTable.
|
|
6440
|
+
* @param {KupDataTable | KupTree} comp - Component using the column menu.
|
|
6441
|
+
* @returns {comp is KupTree} Returns true when the component is KupTree.
|
|
6442
|
+
*/
|
|
6443
|
+
static isTree(comp) {
|
|
6444
|
+
return comp.rootElement.tagName === KupTagNames.TREE;
|
|
6445
|
+
}
|
|
6446
|
+
isObjFiltrableByInterval(obj) {
|
|
6447
|
+
if (dom$8.ketchup.objects.isDate(obj)) {
|
|
6448
|
+
return true;
|
|
6449
|
+
}
|
|
6450
|
+
if (dom$8.ketchup.objects.isTime(obj)) {
|
|
6451
|
+
return true;
|
|
6452
|
+
}
|
|
6453
|
+
if (dom$8.ketchup.objects.isTimestamp(obj)) {
|
|
6454
|
+
return true;
|
|
6455
|
+
}
|
|
6456
|
+
if (dom$8.ketchup.objects.isNumber(obj)) {
|
|
6457
|
+
return true;
|
|
6458
|
+
}
|
|
6459
|
+
return false;
|
|
6460
|
+
}
|
|
6461
|
+
normalizeValue(value, smeupObj) {
|
|
6462
|
+
let newValue = value != null ? value.trim() : value;
|
|
6463
|
+
if (newValue == null || newValue == '' || smeupObj == null) {
|
|
6464
|
+
return newValue;
|
|
6465
|
+
}
|
|
6466
|
+
if (dom$8.ketchup.objects.isDate(smeupObj)) {
|
|
6467
|
+
if (dom$8.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
|
|
6468
|
+
return newValue;
|
|
6469
|
+
}
|
|
6470
|
+
if (dom$8.ketchup.dates.isValid(value)) {
|
|
6471
|
+
return dom$8.ketchup.dates.format(dom$8.ketchup.dates.normalize(value, KupDatesNormalize.DATE), KupDatesFormats.ISO_DATE);
|
|
6472
|
+
}
|
|
6473
|
+
}
|
|
6474
|
+
else if (dom$8.ketchup.objects.isTime(smeupObj)) {
|
|
6475
|
+
let manageSeconds = dom$8.ketchup.objects.isTimeWithSeconds(smeupObj);
|
|
6476
|
+
if (dom$8.ketchup.dates.isValid(value, manageSeconds
|
|
6477
|
+
? KupDatesFormats.ISO_TIME
|
|
6478
|
+
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS)) {
|
|
6479
|
+
return newValue;
|
|
6480
|
+
}
|
|
6481
|
+
if (isValidFormattedStringTime(value, manageSeconds)) {
|
|
6482
|
+
return formattedStringToCustomUnformattedStringTime(value, manageSeconds
|
|
6483
|
+
? KupDatesFormats.ISO_TIME
|
|
6484
|
+
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, manageSeconds);
|
|
6485
|
+
}
|
|
6486
|
+
}
|
|
6487
|
+
else if (dom$8.ketchup.objects.isTimestamp(smeupObj)) {
|
|
6488
|
+
if (dom$8.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE_TIME)) {
|
|
6489
|
+
return newValue;
|
|
6490
|
+
}
|
|
6491
|
+
if (isValidFormattedStringTime(value, true)) {
|
|
6492
|
+
return formattedStringToDefaultUnformattedStringTimestamp(value);
|
|
6493
|
+
}
|
|
6494
|
+
}
|
|
6495
|
+
else if (dom$8.ketchup.objects.isNumber(smeupObj)) {
|
|
6496
|
+
if (isValidFormattedStringNumber(value, smeupObj ? smeupObj.p : '')) {
|
|
6497
|
+
return formattedStringToUnformattedStringNumber(value, smeupObj ? smeupObj.p : '');
|
|
6498
|
+
}
|
|
6499
|
+
}
|
|
6500
|
+
return newValue;
|
|
6501
|
+
}
|
|
6502
|
+
/**
|
|
6503
|
+
* Given a filter value, check if is a negative filter
|
|
6504
|
+
* @param filterValue the filter value to use for check
|
|
6505
|
+
*/
|
|
6506
|
+
filterIsNegative(filterValue) {
|
|
6507
|
+
const analyzedFilter = filterValue.match(FILTER_ANALIZER);
|
|
6508
|
+
const filterIsNegative = analyzedFilter
|
|
6509
|
+
? analyzedFilter[1].indexOf('!') >= 0
|
|
6510
|
+
: false;
|
|
6511
|
+
return filterIsNegative;
|
|
6512
|
+
}
|
|
6513
|
+
/**
|
|
6514
|
+
* Given a value and a filter value, returns if that value matches the filter.
|
|
6515
|
+
*
|
|
6516
|
+
* Web filters can also be expressions: by putting strings between single quotes (') it's possible to activate filter expressions.
|
|
6517
|
+
* Valid syntax:
|
|
6518
|
+
* 'filter' = search for exact phrase;
|
|
6519
|
+
* '' = match when value is empty;
|
|
6520
|
+
* 'filter%' = match when a string starts with "filter";
|
|
6521
|
+
* '%filter' = match when a string ends with "filter";
|
|
6522
|
+
* '%filter%' = match when a string contains "filter".
|
|
6523
|
+
*
|
|
6524
|
+
* It is also possible to negate the expression by prepending "!" in front of the expression.
|
|
6525
|
+
* For example: !'' = value in the cell must not be empty.
|
|
6526
|
+
*
|
|
6527
|
+
* With no expression set, the filter is by default set to '%filter%'.
|
|
6528
|
+
*
|
|
6529
|
+
* @param value - The current value to check.
|
|
6530
|
+
* @param filterValue - The value of the current filter.
|
|
6531
|
+
* @returns false if value or filterValue are empty;
|
|
6532
|
+
true if value contains filterValue;
|
|
6533
|
+
true if value matches special filter created on filterValue;
|
|
6534
|
+
false otherwise.
|
|
6535
|
+
*/
|
|
6536
|
+
isFilterCompliantForValue(value, filterValue) {
|
|
6537
|
+
if (value == null) {
|
|
6538
|
+
return false;
|
|
6539
|
+
}
|
|
6540
|
+
if (filterValue == null) {
|
|
6541
|
+
return false;
|
|
6542
|
+
}
|
|
6543
|
+
const _filterIsNegative = this.filterIsNegative(filterValue);
|
|
6544
|
+
// checks if the value of the filter is contained inside value of the object
|
|
6545
|
+
// Or is if the filter is a special filter to be matched.
|
|
6546
|
+
if (value.toLowerCase().includes(filterValue.toLowerCase()) ||
|
|
6547
|
+
this.matchSpecialFilter(value.toLowerCase(), filterValue.toLowerCase().match(FILTER_ANALIZER), true)) {
|
|
6548
|
+
// the element matches the field filter
|
|
6549
|
+
if (_filterIsNegative) {
|
|
6550
|
+
return false;
|
|
6551
|
+
}
|
|
6552
|
+
return true;
|
|
6553
|
+
}
|
|
6554
|
+
if (_filterIsNegative) {
|
|
6555
|
+
return true;
|
|
6556
|
+
}
|
|
6557
|
+
return false;
|
|
6558
|
+
}
|
|
6559
|
+
/**
|
|
6560
|
+
* Given a value and a filter value, returns if that value matches the filter.
|
|
6561
|
+
*
|
|
6562
|
+
* Web filters can also be expressions: by putting strings between single quotes (') it's possible to activate filter expressions.
|
|
6563
|
+
* Valid syntax:
|
|
6564
|
+
* 'filter' = search for exact phrase;
|
|
6565
|
+
* '' = match when value is empty;
|
|
6566
|
+
* 'filter%' = match when a string starts with "filter";
|
|
6567
|
+
* '%filter' = match when a string ends with "filter";
|
|
6568
|
+
* '%filter%' = match when a string contains "filter".
|
|
6569
|
+
*
|
|
6570
|
+
* It is also possible to negate the expression by prepending "!" in front of the expression.
|
|
6571
|
+
* For example: !'' = value in the cell must not be empty.
|
|
6572
|
+
*
|
|
6573
|
+
* With no expression set, the filter is by default set to '%filter%'.
|
|
6574
|
+
*
|
|
6575
|
+
* @param value - The current value to check.
|
|
6576
|
+
* @param parsedFilter - The value of the current filter.
|
|
6577
|
+
* @param ignoreNegativeFlag = false - When set to true, the matcher will ignore the (!) operator; useful for global filter.
|
|
6578
|
+
* @returns True if the filter is empty and the value of the cell is empty, false otherwise.
|
|
6579
|
+
*/
|
|
6580
|
+
matchSpecialFilter(value, parsedFilter, ignoreNegativeFlag = false) {
|
|
6581
|
+
if (parsedFilter != null) {
|
|
6582
|
+
// endsWith and startWith are not supported by IE 11
|
|
6583
|
+
// Check here https://www.w3schools.com/jsref/jsref_endswith.asp
|
|
6584
|
+
const toRet = (parsedFilter[3] === '' && !value.trim()) ||
|
|
6585
|
+
(!parsedFilter[2] &&
|
|
6586
|
+
parsedFilter[4] &&
|
|
6587
|
+
value.startsWith(parsedFilter[3])) ||
|
|
6588
|
+
(parsedFilter[2] &&
|
|
6589
|
+
!parsedFilter[4] &&
|
|
6590
|
+
value.endsWith(parsedFilter[3])) ||
|
|
6591
|
+
(!parsedFilter[2] &&
|
|
6592
|
+
!parsedFilter[4] &&
|
|
6593
|
+
value === parsedFilter[3]) ||
|
|
6594
|
+
(parsedFilter[2] &&
|
|
6595
|
+
parsedFilter[4] &&
|
|
6596
|
+
value.indexOf(parsedFilter[3]) >= 0);
|
|
6597
|
+
return !ignoreNegativeFlag
|
|
6598
|
+
? parsedFilter[1].indexOf('!') < 0
|
|
6599
|
+
? toRet
|
|
6600
|
+
: !toRet
|
|
6601
|
+
: toRet;
|
|
6602
|
+
}
|
|
6603
|
+
return false;
|
|
6604
|
+
}
|
|
6605
|
+
isFilterCompliantForSimpleValue(valueToCheck, obj, filterValue, interval) {
|
|
6606
|
+
if (valueToCheck == null) {
|
|
6607
|
+
return false;
|
|
6608
|
+
}
|
|
6609
|
+
filterValue = this.normalizeValue(filterValue, obj);
|
|
6610
|
+
let value = valueToCheck;
|
|
6611
|
+
let from = '';
|
|
6612
|
+
let to = '';
|
|
6613
|
+
if (interval != null) {
|
|
6614
|
+
from = interval[FilterInterval.FROM];
|
|
6615
|
+
to = interval[FilterInterval.TO];
|
|
6616
|
+
}
|
|
6617
|
+
let checkByRegularExpression = true;
|
|
6618
|
+
if (dom$8.ketchup.objects.isNumber(obj)) {
|
|
6619
|
+
value = unformattedStringNumberToNumber(value, obj ? obj.p : '');
|
|
6620
|
+
let valueNumber = stringToNumber(value);
|
|
6621
|
+
if (from != '') {
|
|
6622
|
+
if (isNumber(from)) {
|
|
6623
|
+
checkByRegularExpression = false;
|
|
6624
|
+
let fromNumber = stringToNumber(from);
|
|
6625
|
+
if (valueNumber < fromNumber) {
|
|
6626
|
+
return false;
|
|
6627
|
+
}
|
|
6628
|
+
}
|
|
6629
|
+
else {
|
|
6630
|
+
filterValue = from;
|
|
6631
|
+
}
|
|
6632
|
+
}
|
|
6633
|
+
if (to != '') {
|
|
6634
|
+
if (isNumber(to)) {
|
|
6635
|
+
checkByRegularExpression = false;
|
|
6636
|
+
let toNumber = stringToNumber(to);
|
|
6637
|
+
if (valueNumber > toNumber) {
|
|
6638
|
+
return false;
|
|
6639
|
+
}
|
|
6640
|
+
}
|
|
6641
|
+
else {
|
|
6642
|
+
filterValue = to;
|
|
6643
|
+
}
|
|
6644
|
+
}
|
|
6645
|
+
}
|
|
6646
|
+
if (dom$8.ketchup.objects.isDate(obj) ||
|
|
6647
|
+
dom$8.ketchup.objects.isTime(obj) ||
|
|
6648
|
+
dom$8.ketchup.objects.isTimestamp(obj)) {
|
|
6649
|
+
let valueDate = null;
|
|
6650
|
+
let defaultFormat = KupDatesFormats.ISO_DATE;
|
|
6651
|
+
if (dom$8.ketchup.objects.isDate(obj)) {
|
|
6652
|
+
defaultFormat = KupDatesFormats.ISO_DATE;
|
|
6653
|
+
}
|
|
6654
|
+
else if (dom$8.ketchup.objects.isTime(obj)) {
|
|
6655
|
+
defaultFormat = dom$8.ketchup.objects.isTimeWithSeconds(obj)
|
|
6656
|
+
? KupDatesFormats.ISO_TIME
|
|
6657
|
+
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS;
|
|
6658
|
+
}
|
|
6659
|
+
else if (dom$8.ketchup.objects.isTimestamp(obj)) {
|
|
6660
|
+
defaultFormat = KupDatesFormats.ISO_DATE_TIME;
|
|
6661
|
+
}
|
|
6662
|
+
if (dom$8.ketchup.dates.isValid(value, defaultFormat, true)) {
|
|
6663
|
+
valueDate = dom$8.ketchup.dates.toDate(value, defaultFormat);
|
|
6664
|
+
}
|
|
6665
|
+
if (from != '') {
|
|
6666
|
+
if (valueDate != null &&
|
|
6667
|
+
dom$8.ketchup.dates.isValid(from, defaultFormat, true)) {
|
|
6668
|
+
checkByRegularExpression = false;
|
|
6669
|
+
let fromDate = dom$8.ketchup.dates.toDate(from, defaultFormat);
|
|
6670
|
+
if (valueDate < fromDate) {
|
|
6671
|
+
return false;
|
|
6672
|
+
}
|
|
6673
|
+
}
|
|
6674
|
+
else {
|
|
6675
|
+
filterValue = from;
|
|
6676
|
+
}
|
|
6677
|
+
}
|
|
6678
|
+
if (to != '') {
|
|
6679
|
+
if (valueDate != null &&
|
|
6680
|
+
dom$8.ketchup.dates.isValid(to, defaultFormat, true)) {
|
|
6681
|
+
checkByRegularExpression = false;
|
|
6682
|
+
let toDate = dom$8.ketchup.dates.toDate(to, defaultFormat);
|
|
6683
|
+
if (valueDate > toDate) {
|
|
6684
|
+
return false;
|
|
6685
|
+
}
|
|
6686
|
+
}
|
|
6687
|
+
else {
|
|
6688
|
+
filterValue = to;
|
|
6689
|
+
}
|
|
6690
|
+
}
|
|
6691
|
+
if (!dom$8.ketchup.dates.isValid(filterValue, defaultFormat) &&
|
|
6692
|
+
!dom$8.ketchup.dates.isValid(filterValue)) {
|
|
6693
|
+
value = dom$8.ketchup.dates.format(value);
|
|
6694
|
+
}
|
|
6695
|
+
}
|
|
6696
|
+
if (checkByRegularExpression) {
|
|
6697
|
+
return this.isFilterCompliantForValue(value, filterValue);
|
|
6698
|
+
}
|
|
6699
|
+
return true;
|
|
6700
|
+
}
|
|
6701
|
+
static valuesArrayContainsValue(values, value) {
|
|
6702
|
+
return Filters.indexOfValueInValuesArray(values, value) >= 0;
|
|
6703
|
+
}
|
|
6704
|
+
static indexOfValueInValuesArray(values, value) {
|
|
6705
|
+
if (values == null || values.length < 1) {
|
|
6706
|
+
return -1;
|
|
6707
|
+
}
|
|
6708
|
+
for (let i = 0; i < values.length; i++) {
|
|
6709
|
+
if (values[i].value == value) {
|
|
6710
|
+
return i;
|
|
6711
|
+
}
|
|
6712
|
+
}
|
|
6713
|
+
return -1;
|
|
6714
|
+
}
|
|
6715
|
+
}
|
|
6716
|
+
|
|
6717
|
+
const dom$7 = document.documentElement;
|
|
6718
|
+
const kupObjects = dom$7.ketchup
|
|
6719
|
+
? dom$7.ketchup.objects
|
|
6720
|
+
: new KupObjects();
|
|
6721
|
+
/**
|
|
6722
|
+
* Finds all the cells matching the filters criteria in the input dataset.
|
|
6723
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
6724
|
+
* @param {KupDataFindCellFilters} filters - Filters of the research.
|
|
6725
|
+
* @returns {KupDataCell[]} Array of cells fetched after applying the filters.
|
|
6726
|
+
*/
|
|
6727
|
+
function findCell(dataset, filters) {
|
|
6728
|
+
return dom$7.ketchup.data.finder(dataset, filters).cells;
|
|
6729
|
+
}
|
|
6730
|
+
/**
|
|
6731
|
+
* Returns all the cells values of the specified column, sorted if required.
|
|
6732
|
+
* @param {Array<KupDataRow>} dataset - Input dataset.
|
|
6733
|
+
* @param {KupDataColumn} column - Column included in the search. When missing, returns empty array.
|
|
6734
|
+
* @returns {ValueDisplayedValue[]} Values of the cells, sorted.
|
|
6735
|
+
*/
|
|
6736
|
+
function getCellValue(dataset, column, sorted) {
|
|
6737
|
+
const rows = dataset.rows;
|
|
6738
|
+
const values = new Array();
|
|
6739
|
+
const result = new Array();
|
|
6740
|
+
if (!rows || rows.length == 0 || !column) {
|
|
6741
|
+
return result;
|
|
6742
|
+
}
|
|
6743
|
+
extractColumnValues(rows, column, values);
|
|
6744
|
+
if (sorted == true) {
|
|
6745
|
+
values.sort((n1, n2) => {
|
|
6746
|
+
return compareValues(null, kupObjects.isDate(n1.obj)
|
|
6747
|
+
? n1.value
|
|
6748
|
+
: getValueForDisplay2(n1, column), null, kupObjects.isDate(n2.obj)
|
|
6749
|
+
? n2.value
|
|
6750
|
+
: getValueForDisplay2(n2, column), SortMode.A);
|
|
6751
|
+
});
|
|
6752
|
+
}
|
|
6753
|
+
for (let i = 0; i < values.length; i++) {
|
|
6754
|
+
let v = values[i];
|
|
6755
|
+
result.push({ value: v.value, displayedValue: v.displayedValue });
|
|
6756
|
+
}
|
|
6757
|
+
return result;
|
|
6758
|
+
}
|
|
6759
|
+
function extractColumnValues(rows, column, values) {
|
|
6760
|
+
/** il valore delle righe attualmente filtrate, formattato */
|
|
6761
|
+
rows.forEach((row) => addColumnValueFromRow(values, column, row.cells[column.name]));
|
|
6762
|
+
return values;
|
|
6763
|
+
}
|
|
6764
|
+
function addColumnValueFromRow(values, column, cell) {
|
|
6765
|
+
if (cell) {
|
|
6766
|
+
let item = {
|
|
6767
|
+
value: cell.value,
|
|
6768
|
+
displayedValue: getCellValueForDisplay(column, cell),
|
|
6769
|
+
obj: cell.obj ? cell.obj : column.obj,
|
|
6770
|
+
};
|
|
6771
|
+
if (!Filters.valuesArrayContainsValue(values, cell.value)) {
|
|
6772
|
+
values.push(item);
|
|
6773
|
+
}
|
|
6774
|
+
}
|
|
6775
|
+
}
|
|
6776
|
+
/**
|
|
6777
|
+
* Overrides the given cell attributes for the specified columns.
|
|
6778
|
+
* If no columns are provided, the value will be applied to every column of the dataset.
|
|
6779
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
6780
|
+
* @param {KupDataCell} cell - New cell.
|
|
6781
|
+
* @param {string[]} columns - Columns to be handled.
|
|
6782
|
+
* @returns {KupDataCell[]} Replaced cells.
|
|
6783
|
+
*/
|
|
6784
|
+
function replaceCell(dataset, cell, columns) {
|
|
6785
|
+
const replaced = [];
|
|
6786
|
+
for (let index = 0; index < dataset.rows.length; index++) {
|
|
6787
|
+
const row = dataset.rows[index];
|
|
6788
|
+
const cells = row.cells;
|
|
6789
|
+
for (const key in cells) {
|
|
6790
|
+
if (!columns || !columns.length || columns.includes(key)) {
|
|
6791
|
+
cells[key] = Object.assign({}, cell);
|
|
6792
|
+
replaced.push(cells[key]);
|
|
6793
|
+
}
|
|
6794
|
+
}
|
|
6795
|
+
}
|
|
6796
|
+
return replaced;
|
|
6797
|
+
}
|
|
6798
|
+
|
|
6799
|
+
const dom$6 = document.documentElement;
|
|
6800
|
+
/**
|
|
6801
|
+
* Finds the columns matching the criteria specified in the filters argument.
|
|
6802
|
+
* @param {KupDataDataset | Column[]} dataset - Input dataset or array of columns.
|
|
6803
|
+
* @param {Partial<Column>} filters - Column interface containing the filters to match.
|
|
6804
|
+
* @returns {Column[]} Columns matching the criteria.
|
|
5541
6805
|
*/
|
|
5542
6806
|
function findColumns(dataset, filters) {
|
|
5543
6807
|
const columns = dataset.columns
|
|
@@ -5927,6 +7191,41 @@ function toStreamNode(nodes) {
|
|
|
5927
7191
|
}
|
|
5928
7192
|
return streamlined;
|
|
5929
7193
|
}
|
|
7194
|
+
/**
|
|
7195
|
+
* Gets information about the tree depth, such as max number of children and max depth.
|
|
7196
|
+
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
7197
|
+
* @returns {KupDataNodeDrilldownInfo} Information about the tree depth.
|
|
7198
|
+
*/
|
|
7199
|
+
function getDrilldownInfoNode(nodes) {
|
|
7200
|
+
let maxChildren = 0;
|
|
7201
|
+
let maxDepth = 0;
|
|
7202
|
+
const getDepth = function (n) {
|
|
7203
|
+
const depth = 0;
|
|
7204
|
+
if (n.children) {
|
|
7205
|
+
n.children.forEach(function (d) {
|
|
7206
|
+
getDepth(d);
|
|
7207
|
+
});
|
|
7208
|
+
}
|
|
7209
|
+
return depth;
|
|
7210
|
+
};
|
|
7211
|
+
const recursive = (arr) => {
|
|
7212
|
+
maxDepth++;
|
|
7213
|
+
for (let index = 0; index < arr.length; index++) {
|
|
7214
|
+
const node = arr[index];
|
|
7215
|
+
getDepth(node);
|
|
7216
|
+
if (Array.isArray(node.children) &&
|
|
7217
|
+
maxChildren < node.children.length) {
|
|
7218
|
+
maxChildren = node.children.length;
|
|
7219
|
+
recursive(node.children);
|
|
7220
|
+
}
|
|
7221
|
+
}
|
|
7222
|
+
};
|
|
7223
|
+
recursive(nodes);
|
|
7224
|
+
return {
|
|
7225
|
+
maxChildren,
|
|
7226
|
+
maxDepth,
|
|
7227
|
+
};
|
|
7228
|
+
}
|
|
5930
7229
|
/**
|
|
5931
7230
|
* Returns the parent of the given node.
|
|
5932
7231
|
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
@@ -5950,155 +7249,187 @@ function getParentNode(nodes, child) {
|
|
|
5950
7249
|
}
|
|
5951
7250
|
}
|
|
5952
7251
|
return parent;
|
|
7252
|
+
}
|
|
7253
|
+
/**
|
|
7254
|
+
* Returns the node with id equal to the given value.
|
|
7255
|
+
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
7256
|
+
* @param {string} treeNodePath - Tree node path.
|
|
7257
|
+
* @returns {KupDataNode} Node.
|
|
7258
|
+
*/
|
|
7259
|
+
function getNodeByPath(nodes, treeNodePath) {
|
|
7260
|
+
if (!nodes || nodes.length == 0) {
|
|
7261
|
+
return undefined;
|
|
7262
|
+
}
|
|
7263
|
+
if (!treeNodePath || treeNodePath.length == 0) {
|
|
7264
|
+
return undefined;
|
|
7265
|
+
}
|
|
7266
|
+
return _getNodeByPath(nodes, treeNodePath);
|
|
7267
|
+
}
|
|
7268
|
+
function _getNodeByPath(nodes, path) {
|
|
7269
|
+
let node = null;
|
|
7270
|
+
for (let j = 0; j < path.length; j++) {
|
|
7271
|
+
const i = path[j];
|
|
7272
|
+
node = _getNode(nodes, node, i);
|
|
7273
|
+
}
|
|
7274
|
+
return node;
|
|
7275
|
+
}
|
|
7276
|
+
function _getNode(nodes, node, index) {
|
|
7277
|
+
if (node == null) {
|
|
7278
|
+
return nodes[index];
|
|
7279
|
+
}
|
|
7280
|
+
else {
|
|
7281
|
+
return node.children[index];
|
|
7282
|
+
}
|
|
5953
7283
|
}
|
|
5954
7284
|
|
|
7285
|
+
const autoCenterComps = [KupTagNames.DATA_TABLE, KupTagNames.TREE];
|
|
7286
|
+
const fullWidthFieldsComps = [KupTagNames.DATA_TABLE, KupTagNames.TREE];
|
|
5955
7287
|
/**
|
|
5956
|
-
*
|
|
5957
|
-
* Used to export every prop in an object.
|
|
7288
|
+
* Supported cell events.
|
|
5958
7289
|
*/
|
|
5959
|
-
var
|
|
5960
|
-
(function (
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
KupDataTableProps["dropEnabled"] = "Enables drop.";
|
|
5967
|
-
KupDataTableProps["editableData"] = "When set to true, editable cells will be rendered using input components.";
|
|
5968
|
-
KupDataTableProps["emptyDataLabel"] = "Defines the label to show when the table is empty.";
|
|
5969
|
-
KupDataTableProps["enableColumnsFormula"] = "Enables the choice to set formulas on columns by dragging them into different columns.";
|
|
5970
|
-
KupDataTableProps["enableMergeColumns"] = "Enables the merging of columns by dragging them into different columns.";
|
|
5971
|
-
KupDataTableProps["enableExtraColumns"] = "Enables adding extra columns.";
|
|
5972
|
-
KupDataTableProps["enableSortableColumns"] = "Enables the sorting of columns by dragging them into different columns.";
|
|
5973
|
-
KupDataTableProps["expandGroups"] = "Expands groups when set to true.";
|
|
5974
|
-
KupDataTableProps["filters"] = "List of filters set by the user.";
|
|
5975
|
-
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.";
|
|
5976
|
-
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.";
|
|
5977
|
-
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.";
|
|
5978
|
-
KupDataTableProps["globalFilter"] = "When set to true it activates the global filter.";
|
|
5979
|
-
KupDataTableProps["globalFilterValue"] = "The value of the global filter.";
|
|
5980
|
-
KupDataTableProps["groupLabelDisplay"] = "How the label of a group must be displayed. For available values";
|
|
5981
|
-
KupDataTableProps["groups"] = "The list of groups.";
|
|
5982
|
-
KupDataTableProps["headerIsPersistent"] = "When set to true the header will stick on top of the table when scrolling.";
|
|
5983
|
-
KupDataTableProps["isFocusable"] = "When set to true, clicked-on rows will have a visual feedback.";
|
|
5984
|
-
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.";
|
|
5985
|
-
KupDataTableProps["lineBreakCharacter"] = "Defines the placeholder character which will be replaced by a line break inside table header cells, normal or sticky.";
|
|
5986
|
-
KupDataTableProps["loadMoreLimit"] = "Sets a maximum limit of new records which can be required by the load more functionality.";
|
|
5987
|
-
KupDataTableProps["loadMoreMode"] = "Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.";
|
|
5988
|
-
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.";
|
|
5989
|
-
KupDataTableProps["multiSelection"] = "When set to true enables rows multi selection.";
|
|
5990
|
-
KupDataTableProps["pageSelected"] = "Current selected page set on component load";
|
|
5991
|
-
KupDataTableProps["paginatorPos"] = "Sets the position of the paginator. Available positions: top, bottom or both.";
|
|
5992
|
-
KupDataTableProps["removableColumns"] = "Sets the possibility to remove the selected column.";
|
|
5993
|
-
KupDataTableProps["resizableColumns"] = "Gives the possibility to resize columns by dragging on their right edge.";
|
|
5994
|
-
KupDataTableProps["rowActions"] = "Sets the actions of the rows.";
|
|
5995
|
-
KupDataTableProps["rowsPerPage"] = "Sets the number of rows per page to display.";
|
|
5996
|
-
KupDataTableProps["scrollOnHover"] = "Activates the scroll on hover function.";
|
|
5997
|
-
KupDataTableProps["showCustomization"] = "If set to true, displays the button to open the customization panel.";
|
|
5998
|
-
KupDataTableProps["showFilters"] = "When set to true enables the column filters.";
|
|
5999
|
-
KupDataTableProps["showFooter"] = "When set to true shows the footer.";
|
|
6000
|
-
KupDataTableProps["showGrid"] = "Can be used to customize the grid view of the table.";
|
|
6001
|
-
KupDataTableProps["showGroups"] = "When set to true enables the column grouping.";
|
|
6002
|
-
KupDataTableProps["showHeader"] = "Enables rendering of the table header.";
|
|
6003
|
-
KupDataTableProps["showLoadMore"] = "If set to true, displays the button to load more records.";
|
|
6004
|
-
KupDataTableProps["sort"] = "Defines the current sorting options.";
|
|
6005
|
-
KupDataTableProps["stateId"] = "";
|
|
6006
|
-
KupDataTableProps["store"] = "";
|
|
6007
|
-
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";
|
|
6008
|
-
KupDataTableProps["sortEnabled"] = "When set to true enables the sorting of the columns by clicking on the column header.";
|
|
6009
|
-
KupDataTableProps["tableHeight"] = "Sets the height of the table.";
|
|
6010
|
-
KupDataTableProps["tableWidth"] = "Sets the width of the table.";
|
|
6011
|
-
KupDataTableProps["totals"] = "Defines the current totals options.";
|
|
6012
|
-
KupDataTableProps["transpose"] = "Transposes the data of the data table.";
|
|
6013
|
-
})(KupDataTableProps || (KupDataTableProps = {}));
|
|
6014
|
-
var SortMode;
|
|
6015
|
-
(function (SortMode) {
|
|
6016
|
-
SortMode["A"] = "A";
|
|
6017
|
-
SortMode["D"] = "D";
|
|
6018
|
-
})(SortMode || (SortMode = {}));
|
|
6019
|
-
var TotalMode;
|
|
6020
|
-
(function (TotalMode) {
|
|
6021
|
-
TotalMode["COUNT"] = "Count";
|
|
6022
|
-
TotalMode["SUM"] = "Sum";
|
|
6023
|
-
TotalMode["MIN"] = "Min";
|
|
6024
|
-
TotalMode["MAX"] = "Max";
|
|
6025
|
-
TotalMode["DISTINCT"] = "Distinct";
|
|
6026
|
-
TotalMode["AVERAGE"] = "Average";
|
|
6027
|
-
TotalMode["MATH"] = "MATH";
|
|
6028
|
-
})(TotalMode || (TotalMode = {}));
|
|
6029
|
-
var TotalLabel;
|
|
6030
|
-
(function (TotalLabel) {
|
|
6031
|
-
TotalLabel["COUNT"] = "Count";
|
|
6032
|
-
TotalLabel["SUM"] = "Sum";
|
|
6033
|
-
TotalLabel["MIN"] = "Min";
|
|
6034
|
-
TotalLabel["MAX"] = "Max";
|
|
6035
|
-
TotalLabel["DISTINCT"] = "Distinct";
|
|
6036
|
-
TotalLabel["AVERAGE"] = "Average";
|
|
6037
|
-
TotalLabel["MATH"] = "Formula";
|
|
6038
|
-
TotalLabel["CANC"] = "Cancel";
|
|
6039
|
-
TotalLabel["CALC"] = "Calculate";
|
|
6040
|
-
})(TotalLabel || (TotalLabel = {}));
|
|
6041
|
-
var PaginatorPos;
|
|
6042
|
-
(function (PaginatorPos) {
|
|
6043
|
-
PaginatorPos["TOP"] = "Top";
|
|
6044
|
-
PaginatorPos["BOTTOM"] = "Bottom";
|
|
6045
|
-
PaginatorPos["BOTH"] = "Both";
|
|
6046
|
-
})(PaginatorPos || (PaginatorPos = {}));
|
|
6047
|
-
var ShowGrid;
|
|
6048
|
-
(function (ShowGrid) {
|
|
6049
|
-
ShowGrid["NONE"] = "None";
|
|
6050
|
-
ShowGrid["ROW"] = "Row";
|
|
6051
|
-
ShowGrid["COL"] = "Col";
|
|
6052
|
-
ShowGrid["COMPLETE"] = "Complete";
|
|
6053
|
-
})(ShowGrid || (ShowGrid = {}));
|
|
6054
|
-
// export enum RowActionType {
|
|
6055
|
-
// DEFAULT = 'Default',
|
|
6056
|
-
// VARIABLE = 'Variable',
|
|
6057
|
-
// }
|
|
6058
|
-
//---- *NEXT functionality AKA load more ----
|
|
6059
|
-
var LoadMoreMode;
|
|
6060
|
-
(function (LoadMoreMode) {
|
|
6061
|
-
LoadMoreMode["CONSTANT"] = "constant";
|
|
6062
|
-
LoadMoreMode["CONSTANT_INCREMENT"] = "constant_increment";
|
|
6063
|
-
LoadMoreMode["PROGRESSIVE_THRESHOLD"] = "progressive_threshold";
|
|
6064
|
-
})(LoadMoreMode || (LoadMoreMode = {}));
|
|
6065
|
-
//---- Group label display functionality ----
|
|
7290
|
+
var FCellEvents;
|
|
7291
|
+
(function (FCellEvents) {
|
|
7292
|
+
FCellEvents["CLICK"] = "kup-cell-click";
|
|
7293
|
+
FCellEvents["ICON_CLICK"] = "kup-cell-iconclick";
|
|
7294
|
+
FCellEvents["INPUT"] = "kup-cell-input";
|
|
7295
|
+
FCellEvents["UPDATE"] = "kup-cell-update";
|
|
7296
|
+
})(FCellEvents || (FCellEvents = {}));
|
|
6066
7297
|
/**
|
|
6067
|
-
*
|
|
6068
|
-
* @enum
|
|
6069
|
-
* @property {string} BOTH - Shows both the column label and the value. This is the default.
|
|
6070
|
-
* @property {string} LABEL - Shows only the columns label.
|
|
6071
|
-
* @property {string} VALUE - Shows only the value.
|
|
6072
|
-
* @readonly
|
|
7298
|
+
* Supported cell padding.
|
|
6073
7299
|
*/
|
|
6074
|
-
var
|
|
6075
|
-
(function (
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
const FixedCellsClasses = {
|
|
6082
|
-
columns: 'fixed-column',
|
|
6083
|
-
rows: 'fixed-row',
|
|
6084
|
-
};
|
|
6085
|
-
const FixedCellsCSSVarsBase = {
|
|
6086
|
-
columns: '--ddt_column-left-',
|
|
6087
|
-
rows: '--ddt_row-top-',
|
|
6088
|
-
};
|
|
7300
|
+
var FCellPadding;
|
|
7301
|
+
(function (FCellPadding) {
|
|
7302
|
+
FCellPadding["DENSE"] = "dense";
|
|
7303
|
+
FCellPadding["MEDIUM"] = "medium";
|
|
7304
|
+
FCellPadding["NONE"] = "";
|
|
7305
|
+
FCellPadding["WIDE"] = "wide";
|
|
7306
|
+
})(FCellPadding || (FCellPadding = {}));
|
|
6089
7307
|
/**
|
|
6090
|
-
*
|
|
7308
|
+
* Supported cell CSS classes.
|
|
6091
7309
|
*/
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
7310
|
+
var FCellClasses;
|
|
7311
|
+
(function (FCellClasses) {
|
|
7312
|
+
FCellClasses["BG_DANGER"] = "danger-bg";
|
|
7313
|
+
FCellClasses["BG_GREEN"] = "green-bg";
|
|
7314
|
+
FCellClasses["BG_GREY"] = "grey-bg";
|
|
7315
|
+
FCellClasses["BG_ORANGE"] = "orange-bg";
|
|
7316
|
+
FCellClasses["BG_PURPLE"] = "purple-bg";
|
|
7317
|
+
FCellClasses["BG_SUCCESS"] = "success-bg";
|
|
7318
|
+
FCellClasses["BG_TEAL"] = "teal-bg";
|
|
7319
|
+
FCellClasses["BG_WARNING"] = "warning-bg";
|
|
7320
|
+
FCellClasses["C_BG_DANGER"] = "c-danger-bg";
|
|
7321
|
+
FCellClasses["C_BG_GREEN"] = "c-green-bg";
|
|
7322
|
+
FCellClasses["C_BG_GREY"] = "c-grey-bg";
|
|
7323
|
+
FCellClasses["C_BG_ORANGE"] = "c-orange-bg";
|
|
7324
|
+
FCellClasses["C_BG_PURPLE"] = "c-purple-bg";
|
|
7325
|
+
FCellClasses["C_BG_SUCCESS"] = "c-success-bg";
|
|
7326
|
+
FCellClasses["C_BG_TEAL"] = "c-teal-bg";
|
|
7327
|
+
FCellClasses["C_BG_WARNING"] = "c-warning-bg";
|
|
7328
|
+
FCellClasses["C_CENTERED"] = "c-centered";
|
|
7329
|
+
FCellClasses["C_FITTED"] = "c-fitted";
|
|
7330
|
+
FCellClasses["C_PADDED"] = "c-padded";
|
|
7331
|
+
FCellClasses["C_PADDED_HOR"] = "c-padded-hor";
|
|
7332
|
+
FCellClasses["C_PADDED_VER"] = "c-padded-ver";
|
|
7333
|
+
FCellClasses["C_ROUND"] = "c-round";
|
|
7334
|
+
FCellClasses["C_RIGHT_ALIGNED"] = "c-right-aligned";
|
|
7335
|
+
FCellClasses["C_SHAPED"] = "c-shaped";
|
|
7336
|
+
FCellClasses["C_TEXT_VERTICAL"] = "c-vertical-text";
|
|
7337
|
+
FCellClasses["CLICKABLE"] = "clickable";
|
|
7338
|
+
FCellClasses["HOVER_DISPLAY"] = "display-on-hover";
|
|
7339
|
+
FCellClasses["HOVER_EXPAND"] = "expand-on-hover";
|
|
7340
|
+
FCellClasses["HOVER_REDUCE"] = "reduce-on-hover";
|
|
7341
|
+
FCellClasses["INDICATOR_TOPRIGHT"] = "top-right-indicator";
|
|
7342
|
+
FCellClasses["LINK"] = "link";
|
|
7343
|
+
FCellClasses["MONOSPACE"] = "monospace";
|
|
7344
|
+
FCellClasses["OBJ"] = "obj";
|
|
7345
|
+
FCellClasses["SHAPED"] = "shaped";
|
|
7346
|
+
FCellClasses["TEXT_DANGER"] = "danger-text";
|
|
7347
|
+
FCellClasses["TEXT_INFO"] = "info-text";
|
|
7348
|
+
FCellClasses["TEXT_PRIMARY"] = "primary-text";
|
|
7349
|
+
FCellClasses["TEXT_PURPLE"] = "purple-text";
|
|
7350
|
+
FCellClasses["TEXT_SECONDARY"] = "secondary-text";
|
|
7351
|
+
FCellClasses["TEXT_STRONG"] = "strong-text";
|
|
7352
|
+
FCellClasses["TEXT_SUCCESS"] = "success-text";
|
|
7353
|
+
FCellClasses["TEXT_WARNING"] = "warning-text";
|
|
7354
|
+
FCellClasses["UNDERLINED"] = "underlined";
|
|
7355
|
+
})(FCellClasses || (FCellClasses = {}));
|
|
7356
|
+
/**
|
|
7357
|
+
* Supported cell shapes.
|
|
7358
|
+
*/
|
|
7359
|
+
var FCellShapes;
|
|
7360
|
+
(function (FCellShapes) {
|
|
7361
|
+
FCellShapes["AUTOCOMPLETE"] = "ACP";
|
|
7362
|
+
FCellShapes["BUTTON_LIST"] = "BTN";
|
|
7363
|
+
FCellShapes["CHART"] = "GRA";
|
|
7364
|
+
FCellShapes["CHECKBOX"] = "CHK";
|
|
7365
|
+
FCellShapes["CHIP"] = "CHI";
|
|
7366
|
+
FCellShapes["COLOR_PICKER"] = "CLP";
|
|
7367
|
+
FCellShapes["COMBOBOX"] = "CMB";
|
|
7368
|
+
FCellShapes["EDITOR"] = "EDT";
|
|
7369
|
+
FCellShapes["GAUGE"] = "GAU";
|
|
7370
|
+
FCellShapes["IMAGE"] = "IMG";
|
|
7371
|
+
FCellShapes["KNOB"] = "KNB";
|
|
7372
|
+
FCellShapes["PROGRESS_BAR"] = "PGB";
|
|
7373
|
+
FCellShapes["RADIO"] = "RAD";
|
|
7374
|
+
FCellShapes["RATING"] = "RTG";
|
|
7375
|
+
FCellShapes["SWITCH"] = "SWT";
|
|
7376
|
+
FCellShapes["TEXT_FIELD"] = "ITX";
|
|
7377
|
+
})(FCellShapes || (FCellShapes = {}));
|
|
7378
|
+
/**
|
|
7379
|
+
* Supported cell types.
|
|
7380
|
+
*/
|
|
7381
|
+
var FCellTypes;
|
|
7382
|
+
(function (FCellTypes) {
|
|
7383
|
+
FCellTypes["AUTOCOMPLETE"] = "autocomplete";
|
|
7384
|
+
FCellTypes["BAR"] = "bar";
|
|
7385
|
+
FCellTypes["BUTTON"] = "button";
|
|
7386
|
+
FCellTypes["BUTTON_LIST"] = "button-list";
|
|
7387
|
+
FCellTypes["CHART"] = "chart";
|
|
7388
|
+
FCellTypes["CHECKBOX"] = "checkbox";
|
|
7389
|
+
FCellTypes["CHIP"] = "chips";
|
|
7390
|
+
FCellTypes["COLOR_PICKER"] = "color-picker";
|
|
7391
|
+
FCellTypes["COMBOBOX"] = "combobox";
|
|
7392
|
+
FCellTypes["DATE"] = "date";
|
|
7393
|
+
FCellTypes["DATETIME"] = "datetime";
|
|
7394
|
+
FCellTypes["EDITOR"] = "editor";
|
|
7395
|
+
FCellTypes["GAUGE"] = "gauge";
|
|
7396
|
+
FCellTypes["ICON"] = "icon";
|
|
7397
|
+
FCellTypes["IMAGE"] = "image";
|
|
7398
|
+
FCellTypes["KNOB"] = "knob";
|
|
7399
|
+
FCellTypes["LINK"] = "link";
|
|
7400
|
+
FCellTypes["NUMBER"] = "number";
|
|
7401
|
+
FCellTypes["PROGRESS_BAR"] = "progress-bar";
|
|
7402
|
+
FCellTypes["RADIO"] = "radio";
|
|
7403
|
+
FCellTypes["RATING"] = "rating";
|
|
7404
|
+
FCellTypes["STRING"] = "string";
|
|
7405
|
+
FCellTypes["SWITCH"] = "switch";
|
|
7406
|
+
FCellTypes["TIME"] = "time";
|
|
7407
|
+
})(FCellTypes || (FCellTypes = {}));
|
|
7408
|
+
const editableTypes = [
|
|
7409
|
+
FCellTypes.AUTOCOMPLETE,
|
|
7410
|
+
FCellTypes.CHECKBOX,
|
|
7411
|
+
FCellTypes.COLOR_PICKER,
|
|
7412
|
+
FCellTypes.COMBOBOX,
|
|
7413
|
+
FCellTypes.DATE,
|
|
7414
|
+
FCellTypes.NUMBER,
|
|
7415
|
+
FCellTypes.RATING,
|
|
7416
|
+
FCellTypes.STRING,
|
|
7417
|
+
FCellTypes.SWITCH,
|
|
7418
|
+
FCellTypes.TIME,
|
|
7419
|
+
];
|
|
7420
|
+
const kupTypes = [
|
|
7421
|
+
FCellTypes.BAR,
|
|
7422
|
+
FCellTypes.BUTTON,
|
|
7423
|
+
FCellTypes.BUTTON_LIST,
|
|
7424
|
+
FCellTypes.CHART,
|
|
7425
|
+
FCellTypes.CHIP,
|
|
7426
|
+
FCellTypes.COLOR_PICKER,
|
|
7427
|
+
FCellTypes.GAUGE,
|
|
7428
|
+
FCellTypes.KNOB,
|
|
7429
|
+
FCellTypes.PROGRESS_BAR,
|
|
7430
|
+
FCellTypes.RADIO,
|
|
7431
|
+
FCellTypes.RATING,
|
|
7432
|
+
];
|
|
6102
7433
|
|
|
6103
7434
|
const dom$4 = document.documentElement;
|
|
6104
7435
|
/**
|
|
@@ -6111,12 +7442,105 @@ class KupData {
|
|
|
6111
7442
|
find(dataset, filters) {
|
|
6112
7443
|
return findCell(dataset, filters);
|
|
6113
7444
|
},
|
|
6114
|
-
getValue(dataset,
|
|
6115
|
-
return getCellValue(dataset,
|
|
7445
|
+
getValue(dataset, column, sorted) {
|
|
7446
|
+
return getCellValue(dataset, column, sorted);
|
|
6116
7447
|
},
|
|
6117
7448
|
replace(dataset, cell, columns) {
|
|
6118
7449
|
return replaceCell(dataset, cell, columns);
|
|
6119
7450
|
},
|
|
7451
|
+
getType(cell, shape) {
|
|
7452
|
+
const obj = cell.obj;
|
|
7453
|
+
if (shape) {
|
|
7454
|
+
switch (shape.toUpperCase()) {
|
|
7455
|
+
case FCellShapes.AUTOCOMPLETE:
|
|
7456
|
+
return FCellTypes.AUTOCOMPLETE;
|
|
7457
|
+
case FCellShapes.BUTTON_LIST:
|
|
7458
|
+
return FCellTypes.BUTTON_LIST;
|
|
7459
|
+
case FCellShapes.CHART:
|
|
7460
|
+
return FCellTypes.CHART;
|
|
7461
|
+
case FCellShapes.CHECKBOX:
|
|
7462
|
+
return FCellTypes.CHECKBOX;
|
|
7463
|
+
case FCellShapes.CHIP:
|
|
7464
|
+
return FCellTypes.CHIP;
|
|
7465
|
+
case FCellShapes.COLOR_PICKER:
|
|
7466
|
+
return FCellTypes.COLOR_PICKER;
|
|
7467
|
+
case FCellShapes.COMBOBOX:
|
|
7468
|
+
return FCellTypes.COMBOBOX;
|
|
7469
|
+
case FCellShapes.EDITOR:
|
|
7470
|
+
return FCellTypes.EDITOR;
|
|
7471
|
+
case FCellShapes.GAUGE:
|
|
7472
|
+
return FCellTypes.GAUGE;
|
|
7473
|
+
case FCellShapes.IMAGE:
|
|
7474
|
+
return FCellTypes.IMAGE;
|
|
7475
|
+
case FCellShapes.KNOB:
|
|
7476
|
+
return FCellTypes.KNOB;
|
|
7477
|
+
case FCellShapes.PROGRESS_BAR:
|
|
7478
|
+
return FCellTypes.PROGRESS_BAR;
|
|
7479
|
+
case FCellShapes.RADIO:
|
|
7480
|
+
return FCellTypes.RADIO;
|
|
7481
|
+
case FCellShapes.RATING:
|
|
7482
|
+
return FCellTypes.RATING;
|
|
7483
|
+
case FCellShapes.SWITCH:
|
|
7484
|
+
return FCellTypes.SWITCH;
|
|
7485
|
+
case FCellShapes.TEXT_FIELD:
|
|
7486
|
+
return FCellTypes.STRING;
|
|
7487
|
+
}
|
|
7488
|
+
}
|
|
7489
|
+
if (dom$4.ketchup.objects.isBar(obj)) {
|
|
7490
|
+
return FCellTypes.BAR;
|
|
7491
|
+
}
|
|
7492
|
+
else if (dom$4.ketchup.objects.isButton(obj)) {
|
|
7493
|
+
return FCellTypes.BUTTON;
|
|
7494
|
+
}
|
|
7495
|
+
else if (dom$4.ketchup.objects.isChart(obj)) {
|
|
7496
|
+
return FCellTypes.CHART;
|
|
7497
|
+
}
|
|
7498
|
+
else if (dom$4.ketchup.objects.isCheckbox(obj)) {
|
|
7499
|
+
return FCellTypes.CHECKBOX;
|
|
7500
|
+
}
|
|
7501
|
+
else if (dom$4.ketchup.objects.isColor(obj)) {
|
|
7502
|
+
return FCellTypes.COLOR_PICKER;
|
|
7503
|
+
}
|
|
7504
|
+
else if (dom$4.ketchup.objects.isIcon(obj)) {
|
|
7505
|
+
return FCellTypes.ICON;
|
|
7506
|
+
}
|
|
7507
|
+
else if (dom$4.ketchup.objects.isImage(obj)) {
|
|
7508
|
+
return FCellTypes.IMAGE;
|
|
7509
|
+
}
|
|
7510
|
+
else if (dom$4.ketchup.objects.isLink(obj)) {
|
|
7511
|
+
return FCellTypes.LINK;
|
|
7512
|
+
}
|
|
7513
|
+
else if (dom$4.ketchup.objects.isProgressBar(obj)) {
|
|
7514
|
+
return FCellTypes.PROGRESS_BAR;
|
|
7515
|
+
}
|
|
7516
|
+
else if (dom$4.ketchup.objects.isRadio(obj)) {
|
|
7517
|
+
return FCellTypes.RADIO;
|
|
7518
|
+
}
|
|
7519
|
+
else if (dom$4.ketchup.objects.isSwitch(obj)) {
|
|
7520
|
+
return FCellTypes.SWITCH;
|
|
7521
|
+
}
|
|
7522
|
+
else if (dom$4.ketchup.objects.isKupObjList(obj)) {
|
|
7523
|
+
return FCellTypes.CHIP;
|
|
7524
|
+
}
|
|
7525
|
+
else if (dom$4.ketchup.objects.isNumber(obj)) {
|
|
7526
|
+
return FCellTypes.NUMBER;
|
|
7527
|
+
}
|
|
7528
|
+
else if (dom$4.ketchup.objects.isDate(obj)) {
|
|
7529
|
+
return FCellTypes.DATE;
|
|
7530
|
+
}
|
|
7531
|
+
else if (dom$4.ketchup.objects.isTimestamp(obj)) {
|
|
7532
|
+
return FCellTypes.DATETIME;
|
|
7533
|
+
}
|
|
7534
|
+
else if (dom$4.ketchup.objects.isTime(obj)) {
|
|
7535
|
+
return FCellTypes.TIME;
|
|
7536
|
+
}
|
|
7537
|
+
else if (dom$4.ketchup.objects.isVoCodver(obj)) {
|
|
7538
|
+
return FCellTypes.ICON;
|
|
7539
|
+
}
|
|
7540
|
+
else {
|
|
7541
|
+
return FCellTypes.STRING;
|
|
7542
|
+
}
|
|
7543
|
+
},
|
|
6120
7544
|
};
|
|
6121
7545
|
this.column = {
|
|
6122
7546
|
find(dataset, filters) {
|
|
@@ -6130,9 +7554,23 @@ class KupData {
|
|
|
6130
7554
|
},
|
|
6131
7555
|
};
|
|
6132
7556
|
this.node = {
|
|
7557
|
+
getDrilldownInfo(nodes) {
|
|
7558
|
+
return getDrilldownInfoNode(nodes);
|
|
7559
|
+
},
|
|
6133
7560
|
getParent(nodes, child) {
|
|
6134
7561
|
return getParentNode(nodes, child);
|
|
6135
7562
|
},
|
|
7563
|
+
find(nodes, treeNodePath) {
|
|
7564
|
+
return getNodeByPath(nodes, treeNodePath);
|
|
7565
|
+
},
|
|
7566
|
+
findByStrTreeNodePath(nodes, treeNodePath) {
|
|
7567
|
+
const split = treeNodePath.split(',');
|
|
7568
|
+
const path = [];
|
|
7569
|
+
for (let i = 0; i < split.length; i++) {
|
|
7570
|
+
path.push(Number(split[i]));
|
|
7571
|
+
}
|
|
7572
|
+
return getNodeByPath(nodes, path);
|
|
7573
|
+
},
|
|
6136
7574
|
remove(nodes, node2remove) {
|
|
6137
7575
|
return removeNode(nodes, node2remove);
|
|
6138
7576
|
},
|
|
@@ -6362,9 +7800,9 @@ class KupData {
|
|
|
6362
7800
|
};
|
|
6363
7801
|
const length = dataset.rows.length;
|
|
6364
7802
|
// sort all columns values by descending
|
|
6365
|
-
let values = getCellValue(dataset, [
|
|
7803
|
+
let values = getCellValue(dataset, this.column.find(dataset, { name: headerColumn })[0]);
|
|
6366
7804
|
values.sort(function (a, b) {
|
|
6367
|
-
return Number(a) - Number(b);
|
|
7805
|
+
return Number(a.value) - Number(b.value);
|
|
6368
7806
|
});
|
|
6369
7807
|
values.reverse();
|
|
6370
7808
|
// excluding duplicates values.
|
|
@@ -6376,7 +7814,7 @@ class KupData {
|
|
|
6376
7814
|
let rightIdx = idx + 1;
|
|
6377
7815
|
// sort the rows like a "mountain", the greatest is in the middle and the other ones are splitted left and right
|
|
6378
7816
|
for (let i = 0; i < length; i++) {
|
|
6379
|
-
const value = values[i];
|
|
7817
|
+
const value = values[i].value;
|
|
6380
7818
|
// looping the rows because we have many rows with same value.
|
|
6381
7819
|
this.finder(dataset, {
|
|
6382
7820
|
columns: [headerColumn],
|
|
@@ -6519,39 +7957,6 @@ createCommonjsModule(function (module, exports) {
|
|
|
6519
7957
|
!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}));
|
|
6520
7958
|
});
|
|
6521
7959
|
|
|
6522
|
-
/**
|
|
6523
|
-
* Normalization types.
|
|
6524
|
-
*/
|
|
6525
|
-
var KupDatesNormalize;
|
|
6526
|
-
(function (KupDatesNormalize) {
|
|
6527
|
-
KupDatesNormalize["DATE"] = "date";
|
|
6528
|
-
KupDatesNormalize["TIME"] = "time";
|
|
6529
|
-
KupDatesNormalize["TIMESTAMP"] = "timestamp";
|
|
6530
|
-
})(KupDatesNormalize || (KupDatesNormalize = {}));
|
|
6531
|
-
/**
|
|
6532
|
-
* Common use formats
|
|
6533
|
-
*/
|
|
6534
|
-
var KupDatesFormats;
|
|
6535
|
-
(function (KupDatesFormats) {
|
|
6536
|
-
KupDatesFormats["ISO_DATE"] = "YYYY-MM-DD";
|
|
6537
|
-
KupDatesFormats["ISO_DATE_TIME"] = "YYYY-MM-DD HH:mm:ss";
|
|
6538
|
-
KupDatesFormats["ISO_TIME"] = "HH:mm:ss";
|
|
6539
|
-
KupDatesFormats["ISO_TIME_WITHOUT_SECONDS"] = "HH:mm";
|
|
6540
|
-
})(KupDatesFormats || (KupDatesFormats = {}));
|
|
6541
|
-
/**
|
|
6542
|
-
* Supported locales.
|
|
6543
|
-
*/
|
|
6544
|
-
var KupDatesLocales;
|
|
6545
|
-
(function (KupDatesLocales) {
|
|
6546
|
-
KupDatesLocales["CHINESE"] = "cn";
|
|
6547
|
-
KupDatesLocales["ENGLISH"] = "en";
|
|
6548
|
-
KupDatesLocales["FRENCH"] = "fr";
|
|
6549
|
-
KupDatesLocales["ITALIAN"] = "it";
|
|
6550
|
-
KupDatesLocales["POLISH"] = "pl";
|
|
6551
|
-
KupDatesLocales["RUSSIAN"] = "ru";
|
|
6552
|
-
KupDatesLocales["SPANISH"] = "es";
|
|
6553
|
-
})(KupDatesLocales || (KupDatesLocales = {}));
|
|
6554
|
-
|
|
6555
7960
|
/**
|
|
6556
7961
|
* Handles operations and formatting of dates.
|
|
6557
7962
|
* @module KupDates
|
|
@@ -16683,4 +18088,4 @@ function kupManagerInstance() {
|
|
|
16683
18088
|
return dom.ketchup;
|
|
16684
18089
|
}
|
|
16685
18090
|
|
|
16686
|
-
export {
|
|
18091
|
+
export { numberToFormattedStringNumber as $, KupLanguageCheckbox as A, getValueForDisplay2 as B, getValueForDisplay as C, DateTimeFormatOptionsMonth as D, KupLanguageSearch as E, Filters as F, GroupLabelDisplayMode as G, FilterInterval as H, FCellPadding as I, ShowGrid as J, KupThemeIconValues as K, LoadMoreMode as L, TotalLabel as M, KupPointerEventTypes as N, kupDraggableColumnAttr as O, PaginatorPos as P, kupDragActiveAttr as Q, KupDragEffect as R, SelectionMode as S, TotalMode as T, kupDraggableCellAttr as U, KupDropEventTypes as V, iconColumn as W, keyColumn as X, fieldColumn as Y, FixedCellsCSSVarsBase as Z, SortMode as _, KupDynamicPositionPlacement as a, KupLanguageFontsize as a0, KupLanguageDensity as a1, KupLanguageGrid as a2, kupDynamicPositionAttribute as a3, KupDataTableProps as a4, FixedCellsClasses as a5, unformattedStringToFormattedStringNumber as a6, formattedStringToCustomUnformattedStringTime as a7, isValidFormattedStringTime as a8, formatTime as a9, unformattedStringToFormattedStringTime as aa, addColumnValueFromRow as ab, KupGlobalFilterMode as ac, getCellValueForDisplay as ad, KupData as ae, compareCell as af, stringToNumber as ag, isNumber as ah, KupLanguagePage as ai, editableTypes as aj, kupTypes as ak, FCellTypes as al, KupTagNames as am, fullWidthFieldsComps as an, FCellClasses as ao, autoCenterComps as ap, FCellEvents as aq, createCommonjsModule as ar, getDefaultExportFromCjs as as, KupDatesLocales as at, getDecimalSeparator as au, KupLanguageDashboard as av, kupDropEvent as aw, kupDraggableRowAttr as ax, KupThemeColorValues as b, KupDebugCategory as c, getMonthsAsStringByLocale as d, KupDatesFormats as e, KupCardBuiltInClockElements as f, getProps as g, KupCardCSSClasses as h, KupLanguageTotals as i, KupLanguageGeneric as j, kupManagerInstance as k, KupLanguageColumn as l, KupDataNewColumnTypes as m, KupCardSubEvents as n, KupCardIds as o, KupLanguageRow as p, KupCardFamily as q, KupCardProps as r, setProps as s, getColumnByName as t, KupDates as u, formatToNumber as v, KupDatesNormalize as w, KupObjects as x, identify as y, KupLanguageGrouping as z };
|