@sme.up/ketchup 6.2.0 → 6.4.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-5b69d882.js → f-button-826a470e.js} +4 -4
- package/dist/cjs/{f-cell-3a740c48.js → f-cell-2d5bcf0c.js} +13 -15
- package/dist/cjs/{f-checkbox-57443ca3.js → f-checkbox-cd977193.js} +1 -1
- package/dist/cjs/{f-chip-02e83f82.js → f-chip-2fd3363e.js} +3 -3
- package/dist/cjs/{f-image-2a61ece2.js → f-image-0f17d599.js} +2 -2
- package/dist/cjs/{f-paginator-utils-09126bdd.js → f-paginator-utils-946b579d.js} +80 -403
- package/dist/cjs/{f-text-field-9ee20a67.js → f-text-field-d243e4d8.js} +13 -3
- package/dist/cjs/{index-06b131ea.js → index-31125378.js} +9 -4
- 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 +129 -115
- package/dist/cjs/kup-box.cjs.entry.js +20 -20
- package/dist/cjs/kup-calendar.cjs.entry.js +9 -11
- package/dist/cjs/kup-cell.cjs.entry.js +9 -11
- package/dist/cjs/kup-dash-list.cjs.entry.js +5 -7
- package/dist/cjs/kup-dash_2.cjs.entry.js +4 -5
- package/dist/cjs/kup-dashboard.cjs.entry.js +76 -17
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -5
- package/dist/cjs/kup-echart.cjs.entry.js +42 -34
- package/dist/cjs/kup-family-tree.cjs.entry.js +140 -64
- package/dist/cjs/kup-form.cjs.entry.js +21 -15
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -5
- package/dist/cjs/kup-image-list.cjs.entry.js +10 -12
- 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-02acbb37.js → kup-manager-a8eecc60.js} +1419 -375
- 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 +4 -5
- 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 +48 -0
- package/dist/collection/assets/family-tree.js +236 -19
- package/dist/collection/assets/form.js +41 -0
- package/dist/collection/assets/index.js +4 -0
- package/dist/collection/assets/kupinteract.js +68 -0
- package/dist/collection/collection-manifest.json +5 -5
- package/dist/collection/components/kup-box/kup-box.js +5 -3
- package/dist/collection/components/kup-button/kup-button-declarations.js +1 -0
- package/dist/collection/components/kup-button/kup-button.js +27 -0
- package/dist/collection/components/kup-dashboard/kup-dashboard.css +7 -0
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +67 -7
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +42 -30
- package/dist/collection/components/kup-data-table/kup-data-table.js +3 -1
- package/dist/collection/components/kup-echart/kup-echart.js +34 -24
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +3 -1
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +79 -9
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +253 -65
- package/dist/collection/components/kup-form/kup-form-declarations.js +1 -0
- package/dist/collection/components/kup-form/kup-form.css +8 -0
- package/dist/collection/components/kup-form/kup-form.js +31 -2
- package/dist/collection/components/kup-image/assets/svg/azure.svg +1 -0
- package/dist/collection/components/kup-lazy/kup-lazy.css +8 -2
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.css +1 -0
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +1 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field.js +11 -1
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +49 -15
- package/dist/collection/managers/kup-data/kup-data.js +9 -11
- package/dist/collection/managers/kup-dates/kup-dates.js +14 -0
- package/dist/collection/managers/kup-interact/kup-interact.js +3 -5
- 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/utils/filters/filters-rows.js +4 -23
- package/dist/collection/utils/filters/filters-tree-items.js +4 -3
- package/dist/esm/{f-button-fd44ef70.js → f-button-2d0a5f21.js} +4 -4
- package/dist/esm/{f-cell-7b159a22.js → f-cell-ee7d7b5c.js} +7 -9
- package/dist/esm/{f-checkbox-c51c4a75.js → f-checkbox-e06cf07b.js} +1 -1
- package/dist/esm/{f-chip-c2e4c522.js → f-chip-0d29f91f.js} +3 -3
- package/dist/esm/{f-image-2ab4b9aa.js → f-image-ab131d59.js} +2 -2
- package/dist/esm/{f-paginator-utils-ef537d82.js → f-paginator-utils-aa52af0f.js} +44 -366
- package/dist/esm/{f-text-field-41c575eb.js → f-text-field-0729b19f.js} +13 -3
- package/dist/esm/{index-ad6ab214.js → index-e41330a5.js} +9 -4
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +3 -4
- package/dist/esm/kup-autocomplete_25.entry.js +30 -16
- package/dist/esm/kup-box.entry.js +14 -14
- package/dist/esm/kup-calendar.entry.js +5 -7
- package/dist/esm/kup-cell.entry.js +7 -9
- package/dist/esm/kup-dash-list.entry.js +2 -4
- package/dist/esm/kup-dash_2.entry.js +2 -3
- package/dist/esm/kup-dashboard.entry.js +74 -15
- package/dist/esm/kup-drawer.entry.js +2 -3
- package/dist/esm/kup-echart.entry.js +36 -28
- package/dist/esm/kup-family-tree.entry.js +138 -62
- package/dist/esm/kup-form.entry.js +18 -12
- package/dist/esm/kup-iframe.entry.js +2 -3
- package/dist/esm/kup-image-list.entry.js +8 -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-22a475e6.js → kup-manager-13b4f989.js} +1398 -376
- 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 +2 -3
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +4 -5
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/assets/svg/azure.svg +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-0986ad5d.js +1 -0
- package/dist/ketchup/{p-38d7584e.js → p-0cf10db0.js} +1 -1
- package/dist/ketchup/p-13666119.entry.js +27 -0
- package/dist/ketchup/p-18b68e86.entry.js +1 -0
- package/dist/ketchup/{p-1959f835.entry.js → p-28d514d0.entry.js} +1 -1
- package/dist/ketchup/p-2ffdbee1.entry.js +1 -0
- package/dist/ketchup/p-3dcfffbe.entry.js +1 -0
- package/dist/ketchup/p-3fe35411.entry.js +1 -0
- package/dist/ketchup/{p-cd5cfa7c.js → p-5552f156.js} +1 -1
- package/dist/ketchup/p-5f51009b.entry.js +1 -0
- package/dist/ketchup/{p-264b1b19.entry.js → p-816f0938.entry.js} +1 -1
- package/dist/ketchup/p-83c214d7.entry.js +1 -0
- package/dist/ketchup/p-84957bbf.entry.js +1 -0
- package/dist/ketchup/p-86795579.entry.js +1 -0
- package/dist/ketchup/p-8f85b8bb.entry.js +9 -0
- package/dist/ketchup/p-982d3e3a.entry.js +1 -0
- package/dist/ketchup/{p-e9366aaf.entry.js → p-adcfcd4f.entry.js} +4 -4
- package/dist/ketchup/p-b0b3989b.js +2 -0
- package/dist/ketchup/{p-dc62a30f.js → p-b705be3b.js} +1 -1
- package/dist/ketchup/{p-fc2b1229.js → p-b8c921ee.js} +3 -3
- package/dist/ketchup/{p-edae3076.js → p-bfe88b03.js} +1 -1
- package/dist/ketchup/p-d7091875.entry.js +1 -0
- package/dist/ketchup/p-d8656956.entry.js +1 -0
- package/dist/ketchup/p-dc69549c.entry.js +1 -0
- package/dist/ketchup/p-e01fa411.entry.js +1 -0
- package/dist/ketchup/p-e0f659c9.entry.js +1 -0
- package/dist/ketchup/p-e1d82570.entry.js +1 -0
- package/dist/ketchup/p-e21c744a.js +1 -0
- package/dist/ketchup/p-e5a9d60a.entry.js +1 -0
- package/dist/ketchup/p-f50cbed9.js +1 -0
- package/dist/ketchup/{p-42080355.entry.js → p-fa9f161a.entry.js} +1 -1
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +1 -0
- package/dist/types/components/kup-button/kup-button-declarations.d.ts +1 -0
- package/dist/types/components/kup-button/kup-button.d.ts +5 -0
- package/dist/types/components/kup-dashboard/kup-dashboard.d.ts +6 -1
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +7 -3
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +26 -5
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +1 -0
- package/dist/types/components/kup-form/kup-form.d.ts +5 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +1 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components.d.ts +69 -7
- package/dist/types/f-components/f-button/f-button-declarations.d.ts +1 -0
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +13 -6
- package/dist/types/managers/kup-data/kup-data.d.ts +3 -1
- 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/utils/filters/filters-rows.d.ts +0 -2
- package/dist/types/utils/filters/filters-tree-items.d.ts +1 -1
- package/package.json +2 -2
- package/dist/cjs/cell-utils-fe64a28c.js +0 -168
- package/dist/cjs/utils-4b208b48.js +0 -447
- package/dist/esm/cell-utils-cb5d4149.js +0 -160
- package/dist/esm/utils-2c1f4122.js +0 -428
- package/dist/ketchup/p-06c6cc68.js +0 -1
- package/dist/ketchup/p-0dacd4bc.entry.js +0 -1
- package/dist/ketchup/p-1c44dc62.entry.js +0 -1
- package/dist/ketchup/p-4bc9f98b.entry.js +0 -1
- package/dist/ketchup/p-578583db.entry.js +0 -1
- package/dist/ketchup/p-5866d507.entry.js +0 -1
- package/dist/ketchup/p-61059e9d.entry.js +0 -9
- package/dist/ketchup/p-664be494.entry.js +0 -1
- package/dist/ketchup/p-67cd575d.entry.js +0 -1
- package/dist/ketchup/p-682a367a.js +0 -1
- package/dist/ketchup/p-6ccf7eb2.entry.js +0 -1
- package/dist/ketchup/p-7230ab97.entry.js +0 -1
- package/dist/ketchup/p-752b4cef.entry.js +0 -1
- package/dist/ketchup/p-7de3e7ac.entry.js +0 -1
- package/dist/ketchup/p-928c5c36.js +0 -1
- package/dist/ketchup/p-9b36497d.entry.js +0 -1
- package/dist/ketchup/p-b982d137.entry.js +0 -1
- package/dist/ketchup/p-c0219e5e.js +0 -1
- package/dist/ketchup/p-c55fd0a7.entry.js +0 -1
- package/dist/ketchup/p-d154b3a0.entry.js +0 -1
- package/dist/ketchup/p-d2affb6f.entry.js +0 -27
- package/dist/ketchup/p-d3b542b3.js +0 -2
- package/dist/ketchup/p-d6c12c6c.js +0 -1
- package/dist/ketchup/p-da0eab60.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-31125378.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Props of the kup-card component.
|
|
@@ -338,7 +338,7 @@ var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
338
338
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
339
339
|
};
|
|
340
340
|
var _KupDebug_debugWidget;
|
|
341
|
-
const dom$
|
|
341
|
+
const dom$i = document.documentElement;
|
|
342
342
|
/**
|
|
343
343
|
* Debugging suite, used to log messages and statuses from the Ketchup components.
|
|
344
344
|
* @module KupDebug
|
|
@@ -385,32 +385,32 @@ class KupDebug {
|
|
|
385
385
|
*/
|
|
386
386
|
showWidget() {
|
|
387
387
|
const debugWidget = document.createElement('kup-card');
|
|
388
|
-
const languages = dom$
|
|
388
|
+
const languages = dom$i.ketchup.language.getLanguages();
|
|
389
389
|
const languagesListData = [];
|
|
390
390
|
for (let index = 0; index < languages.length; index++) {
|
|
391
391
|
languagesListData.push({
|
|
392
392
|
id: languages[index],
|
|
393
|
-
selected: languages[index] === dom$
|
|
393
|
+
selected: languages[index] === dom$i.ketchup.language.name
|
|
394
394
|
? true
|
|
395
395
|
: false,
|
|
396
396
|
value: languages[index],
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
|
-
const themes = dom$
|
|
399
|
+
const themes = dom$i.ketchup.theme.getThemes();
|
|
400
400
|
const themesListData = [];
|
|
401
401
|
for (let index = 0; index < themes.length; index++) {
|
|
402
402
|
themesListData.push({
|
|
403
403
|
id: themes[index],
|
|
404
|
-
selected: themes[index] === dom$
|
|
404
|
+
selected: themes[index] === dom$i.ketchup.theme.name ? true : false,
|
|
405
405
|
value: themes[index],
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
|
-
const locales = dom$
|
|
408
|
+
const locales = dom$i.ketchup.dates.getLocales();
|
|
409
409
|
const localesListData = [];
|
|
410
410
|
for (let index = 0; index < locales.length; index++) {
|
|
411
411
|
localesListData.push({
|
|
412
412
|
id: locales[index],
|
|
413
|
-
selected: locales[index] === dom$
|
|
413
|
+
selected: locales[index] === dom$i.ketchup.dates.locale ? true : false,
|
|
414
414
|
value: locales[index],
|
|
415
415
|
});
|
|
416
416
|
}
|
|
@@ -420,13 +420,13 @@ class KupDebug {
|
|
|
420
420
|
icon: 'power_settings_new',
|
|
421
421
|
id: 'kup-debug-off',
|
|
422
422
|
customStyle: ':host {--kup-font-size: 0.875em; border-left: 1px solid var(--kup-border-color); border-right: 1px solid var(--kup-border-color);}',
|
|
423
|
-
title: dom$
|
|
423
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.OFF),
|
|
424
424
|
},
|
|
425
425
|
{
|
|
426
426
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
427
427
|
icon: 'print',
|
|
428
428
|
id: 'kup-debug-print',
|
|
429
|
-
title: dom$
|
|
429
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.PRINT),
|
|
430
430
|
},
|
|
431
431
|
{
|
|
432
432
|
checked: this.autoPrint,
|
|
@@ -434,20 +434,20 @@ class KupDebug {
|
|
|
434
434
|
icon: 'speaker_notes',
|
|
435
435
|
iconOff: 'speaker_notes_off',
|
|
436
436
|
id: 'kup-debug-autoprint',
|
|
437
|
-
title: dom$
|
|
437
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.AUTOPRINT),
|
|
438
438
|
toggable: true,
|
|
439
439
|
},
|
|
440
440
|
{
|
|
441
441
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
442
442
|
icon: 'broom',
|
|
443
443
|
id: 'kup-debug-clear',
|
|
444
|
-
title: dom$
|
|
444
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.CLEAR),
|
|
445
445
|
},
|
|
446
446
|
{
|
|
447
447
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
448
448
|
icon: 'delete',
|
|
449
449
|
id: 'kup-debug-delete',
|
|
450
|
-
title: dom$
|
|
450
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.DUMP),
|
|
451
451
|
},
|
|
452
452
|
{
|
|
453
453
|
className: 'kup-full-height',
|
|
@@ -456,22 +456,22 @@ class KupDebug {
|
|
|
456
456
|
id: 'kup-debug-dl-props',
|
|
457
457
|
label: 'Props',
|
|
458
458
|
styling: 'flat',
|
|
459
|
-
title: dom$
|
|
459
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.DL_PROPS),
|
|
460
460
|
},
|
|
461
461
|
{
|
|
462
462
|
className: 'kup-full-height',
|
|
463
463
|
customStyle: ':host {border-right: 1px solid var(--kup-border-color);}',
|
|
464
464
|
icon: 'download',
|
|
465
465
|
id: 'kup-debug-dl-all',
|
|
466
|
-
label: dom$
|
|
466
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.DL_ALL),
|
|
467
467
|
styling: 'flat',
|
|
468
|
-
title: dom$
|
|
468
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.DL_ALL),
|
|
469
469
|
},
|
|
470
470
|
{
|
|
471
471
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
472
472
|
icon: 'auto-fix',
|
|
473
473
|
id: 'kup-debug-magic-box',
|
|
474
|
-
title: dom$
|
|
474
|
+
title: dom$i.ketchup.language.translate(KupLanguageDebug.MAGIC_BOX),
|
|
475
475
|
},
|
|
476
476
|
],
|
|
477
477
|
combobox: [
|
|
@@ -486,11 +486,11 @@ class KupDebug {
|
|
|
486
486
|
className: 'kup-full-height',
|
|
487
487
|
emitSubmitEventOnEnter: false,
|
|
488
488
|
inputType: 'text',
|
|
489
|
-
label: dom$
|
|
489
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.THEME_CHANGER),
|
|
490
490
|
},
|
|
491
491
|
},
|
|
492
492
|
id: 'kup-debug-theme-changer',
|
|
493
|
-
initialValue: dom$
|
|
493
|
+
initialValue: dom$i.ketchup.theme.name,
|
|
494
494
|
isSelect: true,
|
|
495
495
|
},
|
|
496
496
|
{
|
|
@@ -504,11 +504,11 @@ class KupDebug {
|
|
|
504
504
|
className: 'kup-full-height',
|
|
505
505
|
emitSubmitEventOnEnter: false,
|
|
506
506
|
inputType: 'text',
|
|
507
|
-
label: dom$
|
|
507
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.LANGUAGE_CHANGER),
|
|
508
508
|
},
|
|
509
509
|
},
|
|
510
510
|
id: 'kup-debug-language-changer',
|
|
511
|
-
initialValue: dom$
|
|
511
|
+
initialValue: dom$i.ketchup.language.name,
|
|
512
512
|
isSelect: true,
|
|
513
513
|
},
|
|
514
514
|
{
|
|
@@ -522,11 +522,11 @@ class KupDebug {
|
|
|
522
522
|
className: 'kup-full-height',
|
|
523
523
|
emitSubmitEventOnEnter: false,
|
|
524
524
|
inputType: 'text',
|
|
525
|
-
label: dom$
|
|
525
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.LOCALE_CHANGER),
|
|
526
526
|
},
|
|
527
527
|
},
|
|
528
528
|
id: 'kup-debug-locale-changer',
|
|
529
|
-
initialValue: dom$
|
|
529
|
+
initialValue: dom$i.ketchup.dates.locale,
|
|
530
530
|
isSelect: true,
|
|
531
531
|
},
|
|
532
532
|
],
|
|
@@ -534,7 +534,7 @@ class KupDebug {
|
|
|
534
534
|
{
|
|
535
535
|
className: 'kup-full-height',
|
|
536
536
|
id: 'kup-debug-log-limit',
|
|
537
|
-
label: dom$
|
|
537
|
+
label: dom$i.ketchup.language.translate(KupLanguageDebug.LOG_LIMIT),
|
|
538
538
|
initialValue: this.logLimit,
|
|
539
539
|
emitSubmitEventOnEnter: false,
|
|
540
540
|
inputType: 'number',
|
|
@@ -585,7 +585,7 @@ class KupDebug {
|
|
|
585
585
|
kupDebug.dump();
|
|
586
586
|
break;
|
|
587
587
|
case 'kup-debug-magic-box':
|
|
588
|
-
dom$
|
|
588
|
+
dom$i.ketchup.toggleMagicBox();
|
|
589
589
|
break;
|
|
590
590
|
case 'kup-debug-off':
|
|
591
591
|
kupDebug.toggle();
|
|
@@ -600,14 +600,14 @@ class KupDebug {
|
|
|
600
600
|
case 'kup-combobox-itemclick':
|
|
601
601
|
switch (compID) {
|
|
602
602
|
case 'kup-debug-language-changer':
|
|
603
|
-
dom$
|
|
603
|
+
dom$i.ketchup.language.set(compEvent.detail.value);
|
|
604
604
|
break;
|
|
605
605
|
case 'kup-debug-locale-changer':
|
|
606
|
-
dom$
|
|
607
|
-
dom$
|
|
606
|
+
dom$i.ketchup.dates.setLocale(compEvent.detail.value);
|
|
607
|
+
dom$i.ketchup.math.setLocale(compEvent.detail.value);
|
|
608
608
|
break;
|
|
609
609
|
case 'kup-debug-theme-changer':
|
|
610
|
-
dom$
|
|
610
|
+
dom$i.ketchup.theme.set(compEvent.detail.value);
|
|
611
611
|
break;
|
|
612
612
|
}
|
|
613
613
|
case 'kup-textfield-input':
|
|
@@ -669,7 +669,7 @@ class KupDebug {
|
|
|
669
669
|
// If the log is tied to a KupComponent, on click its props will be downloaded.
|
|
670
670
|
// Also, a different style will be applied to distinguish it between the others.
|
|
671
671
|
if (typeof this.logs[index].element == 'object') {
|
|
672
|
-
slot.title = dom$
|
|
672
|
+
slot.title = dom$i.ketchup.language.translate(KupLanguageDebug.DL_PROPS_COMP);
|
|
673
673
|
slot.style.fontWeight = 'bold';
|
|
674
674
|
slot.style.cursor = 'pointer';
|
|
675
675
|
slot.onclick = () => {
|
|
@@ -727,7 +727,7 @@ class KupDebug {
|
|
|
727
727
|
printLog[type] = [];
|
|
728
728
|
}
|
|
729
729
|
printLog[type].push({
|
|
730
|
-
date: dom$
|
|
730
|
+
date: dom$i.ketchup.dates.format(this.logs[index].date, 'LLL:ms'),
|
|
731
731
|
element: isComponent
|
|
732
732
|
? this.logs[index].element
|
|
733
733
|
: this.logs[index].id,
|
|
@@ -907,7 +907,7 @@ class KupDebug {
|
|
|
907
907
|
message: message,
|
|
908
908
|
};
|
|
909
909
|
if (this.logs.length > this.logLimit) {
|
|
910
|
-
console.warn(dom$
|
|
910
|
+
console.warn(dom$i.ketchup.dates.format(date, 'LLL:ms') +
|
|
911
911
|
' kup-debug => ' +
|
|
912
912
|
'Too many logs (> ' +
|
|
913
913
|
this.logLimit +
|
|
@@ -923,14 +923,14 @@ class KupDebug {
|
|
|
923
923
|
}
|
|
924
924
|
switch (category) {
|
|
925
925
|
case exports.KupDebugCategory.ERROR:
|
|
926
|
-
console.error(dom$
|
|
926
|
+
console.error(dom$i.ketchup.dates.format(date, 'LLL:ms') + id + message, obj);
|
|
927
927
|
window.dispatchEvent(new CustomEvent('kup-debug-error', {
|
|
928
928
|
bubbles: true,
|
|
929
929
|
detail: { comp, date, message },
|
|
930
930
|
}));
|
|
931
931
|
break;
|
|
932
932
|
case exports.KupDebugCategory.WARNING:
|
|
933
|
-
console.warn(dom$
|
|
933
|
+
console.warn(dom$i.ketchup.dates.format(date, 'LLL:ms') + id + message, obj);
|
|
934
934
|
break;
|
|
935
935
|
}
|
|
936
936
|
}
|
|
@@ -1017,7 +1017,7 @@ exports.KupDynamicPositionPlacement = void 0;
|
|
|
1017
1017
|
KupDynamicPositionPlacement["TOP_RIGHT"] = "tr";
|
|
1018
1018
|
})(exports.KupDynamicPositionPlacement || (exports.KupDynamicPositionPlacement = {}));
|
|
1019
1019
|
|
|
1020
|
-
const dom$
|
|
1020
|
+
const dom$h = document.documentElement;
|
|
1021
1021
|
/**
|
|
1022
1022
|
* This class is used to dynamically reposition HTML elements.
|
|
1023
1023
|
* @module KupDynamicPosition
|
|
@@ -1085,7 +1085,7 @@ class KupDynamicPosition {
|
|
|
1085
1085
|
const target = mutations[0].target;
|
|
1086
1086
|
if (target.classList.contains(kupDynamicPositionActiveClass)) {
|
|
1087
1087
|
requestAnimationFrame(function () {
|
|
1088
|
-
dom$
|
|
1088
|
+
dom$h.ketchup.dynamicPosition.run(el);
|
|
1089
1089
|
});
|
|
1090
1090
|
}
|
|
1091
1091
|
});
|
|
@@ -1142,7 +1142,7 @@ class KupDynamicPosition {
|
|
|
1142
1142
|
*/
|
|
1143
1143
|
run(el) {
|
|
1144
1144
|
if (!el.isConnected) {
|
|
1145
|
-
dom$
|
|
1145
|
+
dom$h.ketchup.dynamicPosition.managedElements.delete(el);
|
|
1146
1146
|
cancelAnimationFrame(el.kupDynamicPosition.rAF);
|
|
1147
1147
|
return;
|
|
1148
1148
|
}
|
|
@@ -1250,7 +1250,7 @@ class KupDynamicPosition {
|
|
|
1250
1250
|
// Recursive
|
|
1251
1251
|
if (!el.kupDynamicPosition.detach) {
|
|
1252
1252
|
el.kupDynamicPosition.rAF = requestAnimationFrame(function () {
|
|
1253
|
-
dom$
|
|
1253
|
+
dom$h.ketchup.dynamicPosition.run(el);
|
|
1254
1254
|
});
|
|
1255
1255
|
}
|
|
1256
1256
|
else {
|
|
@@ -1338,7 +1338,7 @@ exports.KupDropEventTypes = void 0;
|
|
|
1338
1338
|
KupDropEventTypes["MAGICBOX"] = "text/kup-magic-box-drag";
|
|
1339
1339
|
})(exports.KupDropEventTypes || (exports.KupDropEventTypes = {}));
|
|
1340
1340
|
|
|
1341
|
-
const dom$
|
|
1341
|
+
const dom$g = document.documentElement;
|
|
1342
1342
|
/**
|
|
1343
1343
|
* This class handles elements as dialogs, making them resizable and movable.
|
|
1344
1344
|
* @module KupInteract
|
|
@@ -1387,16 +1387,13 @@ class KupInteract {
|
|
|
1387
1387
|
draggable.kupDragDrop.ghostImage
|
|
1388
1388
|
? draggable.kupDragDrop.ghostImage
|
|
1389
1389
|
: e.target;
|
|
1390
|
-
const oldTransform = ghostImage.style.transform;
|
|
1391
1390
|
let x = parseFloat(ghostImage.getAttribute('data-x')) || 0;
|
|
1392
1391
|
let y = parseFloat(ghostImage.getAttribute('data-y')) || 0;
|
|
1393
1392
|
x = x + e.dx;
|
|
1394
1393
|
y = y + e.dy;
|
|
1395
1394
|
ghostImage.style.transform = `translate(${x}px, ${y}px)`;
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
ghostImage.setAttribute('data-y', y.toString());
|
|
1399
|
-
}
|
|
1395
|
+
ghostImage.setAttribute('data-x', x.toString());
|
|
1396
|
+
ghostImage.setAttribute('data-y', y.toString());
|
|
1400
1397
|
}
|
|
1401
1398
|
},
|
|
1402
1399
|
start(e) {
|
|
@@ -1439,11 +1436,12 @@ class KupInteract {
|
|
|
1439
1436
|
ghostImage.style.transition = 'none';
|
|
1440
1437
|
ghostImage.style.zIndex =
|
|
1441
1438
|
'calc(var(--kup-navbar-zindex) + 1)';
|
|
1442
|
-
dom$
|
|
1439
|
+
dom$g.ketchup.interact.container.appendChild(ghostImage);
|
|
1443
1440
|
draggable.kupDragDrop.ghostImage = ghostImage;
|
|
1444
1441
|
break;
|
|
1445
1442
|
case exports.KupDragEffect.CLONE:
|
|
1446
1443
|
ghostImage = draggable.cloneNode(true);
|
|
1444
|
+
ghostImage.id = '';
|
|
1447
1445
|
ghostImage.style.cursor = 'grabbing';
|
|
1448
1446
|
ghostImage.style.height = draggable.clientHeight + 'px';
|
|
1449
1447
|
ghostImage.style.left =
|
|
@@ -1599,7 +1597,7 @@ class KupInteract {
|
|
|
1599
1597
|
x += e.deltaRect.left;
|
|
1600
1598
|
y += e.deltaRect.top;
|
|
1601
1599
|
el.style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
|
1602
|
-
if (dom$
|
|
1600
|
+
if (dom$g.ketchup.interact.isInViewport(el, oldTransform, e.delta)) {
|
|
1603
1601
|
el.setAttribute('data-x', x.toString());
|
|
1604
1602
|
el.setAttribute('data-y', y.toString());
|
|
1605
1603
|
}
|
|
@@ -1651,7 +1649,7 @@ class KupInteract {
|
|
|
1651
1649
|
const callbacks = {
|
|
1652
1650
|
start(e) {
|
|
1653
1651
|
const el = e.currentTarget;
|
|
1654
|
-
el.style.zIndex = (dom$
|
|
1652
|
+
el.style.zIndex = (dom$g.ketchup.interact.zIndex++).toString();
|
|
1655
1653
|
},
|
|
1656
1654
|
};
|
|
1657
1655
|
this.draggable(el, {
|
|
@@ -1660,7 +1658,7 @@ class KupInteract {
|
|
|
1660
1658
|
interact.modifiers.restrictRect({
|
|
1661
1659
|
restriction: restrictContainer
|
|
1662
1660
|
? restrictContainer
|
|
1663
|
-
: dom$
|
|
1661
|
+
: dom$g.ketchup.interact.restrictContainer,
|
|
1664
1662
|
endOnly: true,
|
|
1665
1663
|
}),
|
|
1666
1664
|
],
|
|
@@ -2554,7 +2552,7 @@ const languages = {
|
|
|
2554
2552
|
spanish: spanish
|
|
2555
2553
|
};
|
|
2556
2554
|
|
|
2557
|
-
const dom$
|
|
2555
|
+
const dom$f = document.documentElement;
|
|
2558
2556
|
/**
|
|
2559
2557
|
* Handles the translation to different languages.
|
|
2560
2558
|
* @module KupLanguage
|
|
@@ -2608,7 +2606,7 @@ class KupLanguage {
|
|
|
2608
2606
|
return invalidKey(key);
|
|
2609
2607
|
}
|
|
2610
2608
|
function invalidKey(key) {
|
|
2611
|
-
dom$
|
|
2609
|
+
dom$f.ketchup.debug.logMessage('kup-language', 'Invalid translation for key (' + key + ')!', exports.KupDebugCategory.WARNING);
|
|
2612
2610
|
return key;
|
|
2613
2611
|
}
|
|
2614
2612
|
}
|
|
@@ -2621,7 +2619,7 @@ class KupLanguage {
|
|
|
2621
2619
|
language = language.toLowerCase();
|
|
2622
2620
|
}
|
|
2623
2621
|
else {
|
|
2624
|
-
dom$
|
|
2622
|
+
dom$f.ketchup.debug.logMessage('kup-language', "Couldn't set language, invalid string received (" +
|
|
2625
2623
|
language +
|
|
2626
2624
|
')!', exports.KupDebugCategory.WARNING);
|
|
2627
2625
|
return;
|
|
@@ -2631,12 +2629,12 @@ class KupLanguage {
|
|
|
2631
2629
|
const dVariant = decodedLanguage.variant;
|
|
2632
2630
|
if (this.list[dLanguage]) {
|
|
2633
2631
|
if (dVariant && !this.list[dLanguage].variants[dVariant]) {
|
|
2634
|
-
dom$
|
|
2632
|
+
dom$f.ketchup.debug.logMessage('kup-language', 'Variant not found (' + dVariant + ')!', exports.KupDebugCategory.WARNING);
|
|
2635
2633
|
return;
|
|
2636
2634
|
}
|
|
2637
2635
|
}
|
|
2638
2636
|
else {
|
|
2639
|
-
dom$
|
|
2637
|
+
dom$f.ketchup.debug.logMessage('kup-language', 'Language not found (' + dLanguage + ')!', exports.KupDebugCategory.WARNING);
|
|
2640
2638
|
return;
|
|
2641
2639
|
}
|
|
2642
2640
|
this.name = language;
|
|
@@ -2723,7 +2721,7 @@ const obj = {
|
|
|
2723
2721
|
types: types
|
|
2724
2722
|
};
|
|
2725
2723
|
|
|
2726
|
-
const dom$
|
|
2724
|
+
const dom$e = document.documentElement;
|
|
2727
2725
|
/**
|
|
2728
2726
|
* Handles objects definition and validation.
|
|
2729
2727
|
* @module KupObjects
|
|
@@ -3048,9 +3046,9 @@ class KupObjects {
|
|
|
3048
3046
|
*/
|
|
3049
3047
|
parseDate(obj) {
|
|
3050
3048
|
if (obj.t === 'D8' && obj.p === '*DMYY') {
|
|
3051
|
-
return dom$
|
|
3049
|
+
return dom$e.ketchup.dates.toDayjs(obj.k, 'DDMMYYYY');
|
|
3052
3050
|
}
|
|
3053
|
-
return dom$
|
|
3051
|
+
return dom$e.ketchup.dates.toDayjs(obj.k);
|
|
3054
3052
|
}
|
|
3055
3053
|
/**
|
|
3056
3054
|
* Check whether two JS objects are deeply equal. When the arguments aren't objects, they are tested directly for equity.
|
|
@@ -3105,8 +3103,10 @@ class KupObjects {
|
|
|
3105
3103
|
*/
|
|
3106
3104
|
var ScrollOnHoverDirection;
|
|
3107
3105
|
(function (ScrollOnHoverDirection) {
|
|
3106
|
+
ScrollOnHoverDirection["BOTTOM"] = "bottom";
|
|
3108
3107
|
ScrollOnHoverDirection["LEFT"] = "left";
|
|
3109
3108
|
ScrollOnHoverDirection["RIGHT"] = "right";
|
|
3109
|
+
ScrollOnHoverDirection["TOP"] = "top";
|
|
3110
3110
|
})(ScrollOnHoverDirection || (ScrollOnHoverDirection = {}));
|
|
3111
3111
|
|
|
3112
3112
|
var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
@@ -3120,8 +3120,8 @@ var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
3120
3120
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3121
3121
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3122
3122
|
};
|
|
3123
|
-
var _KupScrollOnHover_arrowsContainer, _KupScrollOnHover_leftArrows, _KupScrollOnHover_rightArrows, _KupScrollOnHover_scrollEvent, _KupScrollOnHover_mousemoveEvent, _KupScrollOnHover_mouseleaveEvent, _KupScrollOnHover_rAF, _KupScrollOnHover_timeout;
|
|
3124
|
-
const dom$
|
|
3123
|
+
var _KupScrollOnHover_instances, _KupScrollOnHover_arrowsContainer, _KupScrollOnHover_leftArrows, _KupScrollOnHover_rightArrows, _KupScrollOnHover_scrollEvent, _KupScrollOnHover_mousemoveEvent, _KupScrollOnHover_mouseleaveEvent, _KupScrollOnHover_rAF, _KupScrollOnHover_timeout, _KupScrollOnHover_initArrows;
|
|
3124
|
+
const dom$d = document.documentElement;
|
|
3125
3125
|
/**
|
|
3126
3126
|
* Lets the user scroll an element's overflow by hovering with the mouse on its left/right edge.
|
|
3127
3127
|
* @module KupScrollOnHover
|
|
@@ -3133,6 +3133,7 @@ class KupScrollOnHover {
|
|
|
3133
3133
|
* @param {number} step - The amount in pixels for each scroll recursion.
|
|
3134
3134
|
*/
|
|
3135
3135
|
constructor(delay, step) {
|
|
3136
|
+
_KupScrollOnHover_instances.add(this);
|
|
3136
3137
|
_KupScrollOnHover_arrowsContainer.set(this, void 0);
|
|
3137
3138
|
_KupScrollOnHover_leftArrows.set(this, void 0);
|
|
3138
3139
|
_KupScrollOnHover_rightArrows.set(this, void 0);
|
|
@@ -3144,42 +3145,32 @@ class KupScrollOnHover {
|
|
|
3144
3145
|
this.delay = delay ? delay : 500;
|
|
3145
3146
|
this.managedElements = new Set();
|
|
3146
3147
|
this.step = step ? step : 50;
|
|
3147
|
-
__classPrivateFieldSet$2(this, _KupScrollOnHover_arrowsContainer, document.createElement('div'), "f");
|
|
3148
|
-
__classPrivateFieldSet$2(this, _KupScrollOnHover_leftArrows, [], "f");
|
|
3149
3148
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_mouseleaveEvent, (event) => this.stop(event.target), "f");
|
|
3150
3149
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_mousemoveEvent, (event) => this.start(event), "f");
|
|
3151
3150
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, null, "f");
|
|
3152
|
-
__classPrivateFieldSet$2(this, _KupScrollOnHover_rightArrows, [], "f");
|
|
3153
3151
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_scrollEvent, (event) => this.updateChildren(event.target), "f");
|
|
3154
3152
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_timeout, null, "f");
|
|
3155
|
-
__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f").id = 'kup-scrolling-arrows';
|
|
3156
|
-
for (let index = 1; index < 4; index++) {
|
|
3157
|
-
const arrow = document.createElement('div');
|
|
3158
|
-
arrow.setAttribute('class', 'kup-left-scrolling-arrow kup-arrow-' + index);
|
|
3159
|
-
__classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f").push(arrow);
|
|
3160
|
-
}
|
|
3161
|
-
for (let index = 1; index < 4; index++) {
|
|
3162
|
-
const arrow = document.createElement('div');
|
|
3163
|
-
arrow.setAttribute('class', 'kup-right-scrolling-arrow kup-arrow-' + index);
|
|
3164
|
-
__classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f").push(arrow);
|
|
3165
|
-
}
|
|
3166
|
-
__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]);
|
|
3167
|
-
this.container = document.createElement('div');
|
|
3168
|
-
this.container.setAttribute('kup-scroll-on-hover', '');
|
|
3169
|
-
this.container.appendChild(__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f"));
|
|
3170
|
-
document.body.appendChild(this.container);
|
|
3171
3153
|
}
|
|
3172
3154
|
/**
|
|
3173
3155
|
* Watches the given element in order to trigger the scroll on hover when conditions are met.
|
|
3174
3156
|
* Children nodes with the "hover-scrolling-child" will be watched and scrolled when el scrolls.
|
|
3175
3157
|
* @param {KupScrollOnHoverElement} el - Element to watch.
|
|
3158
|
+
* @param {boolean} vertical - Enables vertical scroll.
|
|
3159
|
+
* @param {KupScrollOnHoverPercentages} percentages - Sets how big is the area in which the scroll is enabled.
|
|
3176
3160
|
*/
|
|
3177
|
-
register(el) {
|
|
3161
|
+
register(el, vertical, percentages) {
|
|
3162
|
+
if (!__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f")) {
|
|
3163
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_instances, "m", _KupScrollOnHover_initArrows).call(this);
|
|
3164
|
+
}
|
|
3178
3165
|
el.style.overflowX = 'auto';
|
|
3179
3166
|
el.scrollOnHover = {
|
|
3180
3167
|
active: false,
|
|
3181
3168
|
children: el.querySelectorAll('.hover-scrolling-child'),
|
|
3169
|
+
percentages: percentages
|
|
3170
|
+
? percentages
|
|
3171
|
+
: { back: 0.1, forward: 0.9 },
|
|
3182
3172
|
rect: null,
|
|
3173
|
+
vertical: vertical || null,
|
|
3183
3174
|
x: 0,
|
|
3184
3175
|
y: 0,
|
|
3185
3176
|
};
|
|
@@ -3224,14 +3215,19 @@ class KupScrollOnHover {
|
|
|
3224
3215
|
if (el.scrollOnHover.active || __classPrivateFieldGet$2(this, _KupScrollOnHover_timeout, "f")) {
|
|
3225
3216
|
return;
|
|
3226
3217
|
}
|
|
3218
|
+
let trueHeight = el.clientHeight;
|
|
3219
|
+
if (trueHeight === 0) {
|
|
3220
|
+
trueHeight = el.offsetHeight;
|
|
3221
|
+
}
|
|
3227
3222
|
let trueWidth = el.clientWidth;
|
|
3228
3223
|
if (trueWidth === 0) {
|
|
3229
3224
|
trueWidth = el.offsetWidth;
|
|
3230
3225
|
}
|
|
3231
3226
|
if (el.scrollWidth > trueWidth + 10) {
|
|
3232
3227
|
if (trueWidth !== 0 && !el.scrollOnHover.active) {
|
|
3233
|
-
const percRight = trueWidth - trueWidth *
|
|
3234
|
-
const percLeft = trueWidth -
|
|
3228
|
+
const percRight = trueWidth - trueWidth * el.scrollOnHover.percentages.back;
|
|
3229
|
+
const percLeft = trueWidth -
|
|
3230
|
+
trueWidth * el.scrollOnHover.percentages.forward;
|
|
3235
3231
|
const elOffset = el.scrollOnHover.x - el.scrollOnHover.rect.left;
|
|
3236
3232
|
const maxScrollLeft = el.scrollWidth - trueWidth;
|
|
3237
3233
|
const direction = elOffset < percLeft && el.scrollLeft !== 0
|
|
@@ -3252,7 +3248,29 @@ class KupScrollOnHover {
|
|
|
3252
3248
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_timeout, setTimeout(() => {
|
|
3253
3249
|
el.scrollOnHover.active = true;
|
|
3254
3250
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
3255
|
-
dom$
|
|
3251
|
+
dom$d.ketchup.scrollOnHover.run(el, maxScrollLeft, percRight, percLeft, direction);
|
|
3252
|
+
}), "f");
|
|
3253
|
+
}, this.delay), "f");
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
if (el.scrollOnHover.vertical && el.scrollHeight > trueHeight + 10) {
|
|
3258
|
+
if (trueHeight !== 0 && !el.scrollOnHover.active) {
|
|
3259
|
+
const percBottom = trueHeight - trueHeight * el.scrollOnHover.percentages.back;
|
|
3260
|
+
const percTop = trueHeight -
|
|
3261
|
+
trueHeight * el.scrollOnHover.percentages.forward;
|
|
3262
|
+
const elOffset = el.scrollOnHover.y - el.scrollOnHover.rect.top;
|
|
3263
|
+
const maxScrollTop = el.scrollHeight - trueHeight;
|
|
3264
|
+
const direction = elOffset < percTop && el.scrollTop !== 0
|
|
3265
|
+
? ScrollOnHoverDirection.TOP
|
|
3266
|
+
: elOffset > percBottom && el.scrollTop !== maxScrollTop
|
|
3267
|
+
? ScrollOnHoverDirection.BOTTOM
|
|
3268
|
+
: null;
|
|
3269
|
+
if (direction) {
|
|
3270
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_timeout, setTimeout(() => {
|
|
3271
|
+
el.scrollOnHover.active = true;
|
|
3272
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
3273
|
+
dom$d.ketchup.scrollOnHover.run(el, maxScrollTop, percBottom, percTop, direction);
|
|
3256
3274
|
}), "f");
|
|
3257
3275
|
}, this.delay), "f");
|
|
3258
3276
|
}
|
|
@@ -3281,25 +3299,51 @@ class KupScrollOnHover {
|
|
|
3281
3299
|
* The actual recursive scroll function.
|
|
3282
3300
|
* @param {KupScrollOnHoverElement} el - The scrolled element.
|
|
3283
3301
|
* @param {number} maxScrollLeft - Left coordinates to which the recursiveness must be stopped.
|
|
3284
|
-
* @param {number}
|
|
3285
|
-
* @param {number}
|
|
3302
|
+
* @param {number} percForward - Range of the right (or bottom) area.
|
|
3303
|
+
* @param {number} percBack - Range of the left (or top) scrollable area.
|
|
3286
3304
|
* @param {ScrollOnHoverDirection} direction - Direction of the scroll.
|
|
3287
3305
|
*/
|
|
3288
|
-
run(el, maxScrollLeft,
|
|
3306
|
+
run(el, maxScrollLeft, percForward, percBack, direction) {
|
|
3289
3307
|
if (!el.scrollOnHover.active) {
|
|
3290
3308
|
this.stop(el);
|
|
3291
3309
|
return;
|
|
3292
3310
|
}
|
|
3293
|
-
|
|
3294
|
-
|
|
3311
|
+
let offset = 0;
|
|
3312
|
+
switch (direction) {
|
|
3313
|
+
case ScrollOnHoverDirection.BOTTOM:
|
|
3314
|
+
case ScrollOnHoverDirection.TOP: {
|
|
3315
|
+
offset = el.scrollOnHover.y - el.scrollOnHover.rect.top;
|
|
3316
|
+
if (offset > percBack && offset < percForward) {
|
|
3317
|
+
this.stop(el);
|
|
3318
|
+
return;
|
|
3319
|
+
}
|
|
3320
|
+
break;
|
|
3321
|
+
}
|
|
3322
|
+
case ScrollOnHoverDirection.LEFT:
|
|
3323
|
+
case ScrollOnHoverDirection.RIGHT: {
|
|
3324
|
+
offset = el.scrollOnHover.x - el.scrollOnHover.rect.left;
|
|
3325
|
+
if (offset > percBack && offset < percForward) {
|
|
3326
|
+
this.stop(el);
|
|
3327
|
+
return;
|
|
3328
|
+
}
|
|
3329
|
+
break;
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
if (direction === ScrollOnHoverDirection.RIGHT &&
|
|
3333
|
+
percForward > offset) {
|
|
3334
|
+
this.stop(el);
|
|
3335
|
+
return;
|
|
3336
|
+
}
|
|
3337
|
+
if (direction === ScrollOnHoverDirection.LEFT && percBack < offset) {
|
|
3295
3338
|
this.stop(el);
|
|
3296
3339
|
return;
|
|
3297
3340
|
}
|
|
3298
|
-
if (direction === ScrollOnHoverDirection.
|
|
3341
|
+
if (direction === ScrollOnHoverDirection.TOP && percBack < offset) {
|
|
3299
3342
|
this.stop(el);
|
|
3300
3343
|
return;
|
|
3301
3344
|
}
|
|
3302
|
-
if (direction === ScrollOnHoverDirection.
|
|
3345
|
+
if (direction === ScrollOnHoverDirection.BOTTOM &&
|
|
3346
|
+
percForward > offset) {
|
|
3303
3347
|
this.stop(el);
|
|
3304
3348
|
return;
|
|
3305
3349
|
}
|
|
@@ -3307,27 +3351,49 @@ class KupScrollOnHover {
|
|
|
3307
3351
|
this.updateChildren(el);
|
|
3308
3352
|
}
|
|
3309
3353
|
let arrow;
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3354
|
+
switch (direction) {
|
|
3355
|
+
case ScrollOnHoverDirection.BOTTOM: {
|
|
3356
|
+
arrow = [];
|
|
3357
|
+
if (el.scrollTop === maxScrollLeft) {
|
|
3358
|
+
this.stop(el);
|
|
3359
|
+
return;
|
|
3360
|
+
}
|
|
3361
|
+
el.scrollTop += this.step;
|
|
3362
|
+
break;
|
|
3315
3363
|
}
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3364
|
+
case ScrollOnHoverDirection.LEFT: {
|
|
3365
|
+
arrow = __classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f");
|
|
3366
|
+
if (el.scrollLeft === 0) {
|
|
3367
|
+
this.stop(el);
|
|
3368
|
+
return;
|
|
3369
|
+
}
|
|
3370
|
+
el.scrollLeft -= this.step;
|
|
3371
|
+
break;
|
|
3372
|
+
}
|
|
3373
|
+
case ScrollOnHoverDirection.RIGHT: {
|
|
3374
|
+
arrow = __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f");
|
|
3375
|
+
if (el.scrollLeft === maxScrollLeft) {
|
|
3376
|
+
this.stop(el);
|
|
3377
|
+
return;
|
|
3378
|
+
}
|
|
3379
|
+
el.scrollLeft += this.step;
|
|
3380
|
+
break;
|
|
3381
|
+
}
|
|
3382
|
+
case ScrollOnHoverDirection.TOP: {
|
|
3383
|
+
arrow = [];
|
|
3384
|
+
if (el.scrollTop === 0) {
|
|
3385
|
+
this.stop(el);
|
|
3386
|
+
return;
|
|
3387
|
+
}
|
|
3388
|
+
el.scrollTop -= this.step;
|
|
3389
|
+
break;
|
|
3323
3390
|
}
|
|
3324
|
-
el.scrollLeft += this.step;
|
|
3325
3391
|
}
|
|
3326
3392
|
for (let i = 0; i < arrow.length; i++) {
|
|
3327
3393
|
arrow[i].classList.add('kup-animated');
|
|
3328
3394
|
}
|
|
3329
3395
|
__classPrivateFieldSet$2(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
3330
|
-
dom$
|
|
3396
|
+
dom$d.ketchup.scrollOnHover.run(el, maxScrollLeft, percForward, percBack, direction);
|
|
3331
3397
|
}), "f");
|
|
3332
3398
|
}
|
|
3333
3399
|
/**
|
|
@@ -3340,7 +3406,27 @@ class KupScrollOnHover {
|
|
|
3340
3406
|
}
|
|
3341
3407
|
}
|
|
3342
3408
|
}
|
|
3343
|
-
_KupScrollOnHover_arrowsContainer = new WeakMap(), _KupScrollOnHover_leftArrows = new WeakMap(), _KupScrollOnHover_rightArrows = new WeakMap(), _KupScrollOnHover_scrollEvent = new WeakMap(), _KupScrollOnHover_mousemoveEvent = new WeakMap(), _KupScrollOnHover_mouseleaveEvent = new WeakMap(), _KupScrollOnHover_rAF = new WeakMap(), _KupScrollOnHover_timeout = new WeakMap()
|
|
3409
|
+
_KupScrollOnHover_arrowsContainer = new WeakMap(), _KupScrollOnHover_leftArrows = new WeakMap(), _KupScrollOnHover_rightArrows = new WeakMap(), _KupScrollOnHover_scrollEvent = new WeakMap(), _KupScrollOnHover_mousemoveEvent = new WeakMap(), _KupScrollOnHover_mouseleaveEvent = new WeakMap(), _KupScrollOnHover_rAF = new WeakMap(), _KupScrollOnHover_timeout = new WeakMap(), _KupScrollOnHover_instances = new WeakSet(), _KupScrollOnHover_initArrows = function _KupScrollOnHover_initArrows() {
|
|
3410
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_arrowsContainer, document.createElement('div'), "f");
|
|
3411
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_leftArrows, [], "f");
|
|
3412
|
+
__classPrivateFieldSet$2(this, _KupScrollOnHover_rightArrows, [], "f");
|
|
3413
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f").id = 'kup-scrolling-arrows';
|
|
3414
|
+
for (let index = 1; index < 4; index++) {
|
|
3415
|
+
const arrow = document.createElement('div');
|
|
3416
|
+
arrow.setAttribute('class', 'kup-left-scrolling-arrow kup-arrow-' + index);
|
|
3417
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f").push(arrow);
|
|
3418
|
+
}
|
|
3419
|
+
for (let index = 1; index < 4; index++) {
|
|
3420
|
+
const arrow = document.createElement('div');
|
|
3421
|
+
arrow.setAttribute('class', 'kup-right-scrolling-arrow kup-arrow-' + index);
|
|
3422
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f").push(arrow);
|
|
3423
|
+
}
|
|
3424
|
+
__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f").append(__classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f")[2], __classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f")[1], __classPrivateFieldGet$2(this, _KupScrollOnHover_leftArrows, "f")[0], __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f")[0], __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f")[1], __classPrivateFieldGet$2(this, _KupScrollOnHover_rightArrows, "f")[2]);
|
|
3425
|
+
this.container = document.createElement('div');
|
|
3426
|
+
this.container.setAttribute('kup-scroll-on-hover', '');
|
|
3427
|
+
this.container.appendChild(__classPrivateFieldGet$2(this, _KupScrollOnHover_arrowsContainer, "f"));
|
|
3428
|
+
document.body.appendChild(this.container);
|
|
3429
|
+
};
|
|
3344
3430
|
|
|
3345
3431
|
const bubbles = {
|
|
3346
3432
|
cssVariables: {
|
|
@@ -3839,6 +3925,7 @@ const print = {
|
|
|
3839
3925
|
"KUP-BUTTON": ":host(:not(.printable)) {\ndisplay: none;\n}\n\n",
|
|
3840
3926
|
"KUP-CARD": "",
|
|
3841
3927
|
"KUP-DATA-TABLE": "#kup-component sticky-header {\ndisplay: none;\n}\n\n#kup-component kup-paginator {\ndisplay: none;\n}\n\n:host(.cross-selection) #kup-component table tr.selected td.selected, \n#kup-component table td.selected, #kup-component tr.selected td {\nbackground-color: inherit;\nbackground-image: none;\n}\n\n#kup-component table,\n#kup-component .below-wrapper {\noverflow: hidden !important;\n}\n\n:host(.cross-selection) #kup-component tr.selected td:first-of-type,\n:host(.cross-selection) #kup-component th.selected { \nbox-shadow: none !important;\n}\n\n:host(.cross-selection) #kup-component table td.selected,\n:host(.cross-selection) #kup-component table tr.selected td {\nbackground-color: inherit;\n}\n\n:host(.cross-selection) #kup-component table tr.selected td.fixed-column.selected,\n:host(.cross-selection) #kup-component table td.selected.fixed-column, \n:host(.cross-selection) #kup-component table td.selected.fixed-row,\n:host(.cross-selection) #kup-component table tr.selected td.fixed-column, \n:host(.cross-selection) #kup-component table tr.selected td.fixed-row {\nbackground-color: inherit;\nbackground-image: none;\n}\n\n",
|
|
3928
|
+
"KUP-FAMILY-TREE": "#kup-component .family-tree__item__expand {\ndisplay: none;\n}\n\n",
|
|
3842
3929
|
"KUP-PROGRESS-BAR": "#kup-component .progress-bar {\nbackground: #e7e7e7;\n}\n\n#kup-component .progress-bar-percentage span {\ntext-shadow: 0px 0px 0px hsl(0deg 0% 100%);\n}\n\n",
|
|
3843
3930
|
"KUP-TREE": "#kup-component .wrapper {\noverflow: hidden;\n}\n\n#kup-component tr.mdc-ripple-surface::before, \n#kup-component tr.mdc-ripple-surface::after,\n#kup-component td.mdc-ripple-surface::before, \n#kup-component td.mdc-ripple-surface::after,\n#kup-component .kup-tree__node--selected:not(.kup-tree__node--disabled) td {\nbackground-color: var(--kup-background-color);\n}"
|
|
3844
3931
|
},
|
|
@@ -4467,7 +4554,7 @@ exports.KupThemeIconValues = void 0;
|
|
|
4467
4554
|
KupThemeIconValues["SEARCH"] = "--kup-search-icon";
|
|
4468
4555
|
})(exports.KupThemeIconValues || (exports.KupThemeIconValues = {}));
|
|
4469
4556
|
|
|
4470
|
-
const dom$
|
|
4557
|
+
const dom$c = document.documentElement;
|
|
4471
4558
|
/**
|
|
4472
4559
|
* Theme manager, handles everything about theming, customStyles and color utilities.
|
|
4473
4560
|
* @module KupTheme
|
|
@@ -4481,7 +4568,7 @@ class KupTheme {
|
|
|
4481
4568
|
this.list = list ? list : themes;
|
|
4482
4569
|
this.managedComponents = new Set();
|
|
4483
4570
|
this.name = name ? name : 'ketchup';
|
|
4484
|
-
this.styleTag = dom$
|
|
4571
|
+
this.styleTag = dom$c
|
|
4485
4572
|
.querySelector('head')
|
|
4486
4573
|
.appendChild(document.createElement('style'));
|
|
4487
4574
|
}
|
|
@@ -4568,9 +4655,9 @@ class KupTheme {
|
|
|
4568
4655
|
if (list) {
|
|
4569
4656
|
this.list = list;
|
|
4570
4657
|
}
|
|
4571
|
-
dom$
|
|
4658
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Setting theme to: ' + this.name + '.');
|
|
4572
4659
|
if (!this.list[this.name]) {
|
|
4573
|
-
dom$
|
|
4660
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Invalid theme name, falling back to default ("ketchup").');
|
|
4574
4661
|
this.name = 'ketchup';
|
|
4575
4662
|
}
|
|
4576
4663
|
this.cssVars = {};
|
|
@@ -4613,11 +4700,11 @@ class KupTheme {
|
|
|
4613
4700
|
this.icons() +
|
|
4614
4701
|
'}';
|
|
4615
4702
|
this.customStyle();
|
|
4616
|
-
dom$
|
|
4703
|
+
dom$c.ketchup.debug.logMessage('kup-theme', 'Theme ' + dom$c.getAttribute('kup-theme') + ' refreshed.');
|
|
4617
4704
|
document.dispatchEvent(new CustomEvent('kup-theme-refresh'));
|
|
4618
4705
|
}
|
|
4619
4706
|
catch (error) {
|
|
4620
|
-
dom$
|
|
4707
|
+
dom$c.ketchup.debug.logMessage('kup-theme', 'Theme not refreshed.', exports.KupDebugCategory.WARNING);
|
|
4621
4708
|
}
|
|
4622
4709
|
}
|
|
4623
4710
|
/**
|
|
@@ -4736,7 +4823,7 @@ class KupTheme {
|
|
|
4736
4823
|
this.set(themes[index]);
|
|
4737
4824
|
}
|
|
4738
4825
|
else {
|
|
4739
|
-
dom$
|
|
4826
|
+
dom$c.ketchup.debug.logMessage('kup-theme', "Couldn't set a random theme: no themes available!", exports.KupDebugCategory.WARNING);
|
|
4740
4827
|
}
|
|
4741
4828
|
}
|
|
4742
4829
|
/**
|
|
@@ -4748,7 +4835,7 @@ class KupTheme {
|
|
|
4748
4835
|
//Testing whether the color is transparent, if it is a fall back value will be returned matching the background-color
|
|
4749
4836
|
if (color === 'transparent') {
|
|
4750
4837
|
color = this.cssVars['--kup-background-color'];
|
|
4751
|
-
dom$
|
|
4838
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Received TRANSPARENT color, converted to ' +
|
|
4752
4839
|
color +
|
|
4753
4840
|
' (theme background).');
|
|
4754
4841
|
}
|
|
@@ -4766,7 +4853,7 @@ class KupTheme {
|
|
|
4766
4853
|
const oldColor = color;
|
|
4767
4854
|
color = this.codeToHex(color);
|
|
4768
4855
|
isHex = color.substring(0, 1) === '#' ? true : false;
|
|
4769
|
-
dom$
|
|
4856
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Received CODE NAME color ' +
|
|
4770
4857
|
oldColor +
|
|
4771
4858
|
', converted to ' +
|
|
4772
4859
|
color +
|
|
@@ -4820,14 +4907,14 @@ class KupTheme {
|
|
|
4820
4907
|
else {
|
|
4821
4908
|
hexColor = this.rgbToHex(rgbColorObj.r, rgbColorObj.g, rgbColorObj.b);
|
|
4822
4909
|
}
|
|
4823
|
-
dom$
|
|
4910
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Received HEX color ' +
|
|
4824
4911
|
oldColor +
|
|
4825
4912
|
', converted to ' +
|
|
4826
4913
|
color +
|
|
4827
4914
|
'.');
|
|
4828
4915
|
}
|
|
4829
4916
|
catch (error) {
|
|
4830
|
-
dom$
|
|
4917
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Invalid color: ' + color + '.');
|
|
4831
4918
|
}
|
|
4832
4919
|
}
|
|
4833
4920
|
let rgbValues = null;
|
|
@@ -4837,14 +4924,14 @@ class KupTheme {
|
|
|
4837
4924
|
rgbColor = color;
|
|
4838
4925
|
}
|
|
4839
4926
|
catch (error) {
|
|
4840
|
-
dom$
|
|
4927
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Color not converted to rgb values: ' + color + '.');
|
|
4841
4928
|
}
|
|
4842
4929
|
if (!hexColor) {
|
|
4843
4930
|
try {
|
|
4844
4931
|
hexColor = this.rgbToHex(parseInt(values[1]), parseInt(values[2]), parseInt(values[3]));
|
|
4845
4932
|
}
|
|
4846
4933
|
catch (error) {
|
|
4847
|
-
dom$
|
|
4934
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
|
|
4848
4935
|
}
|
|
4849
4936
|
}
|
|
4850
4937
|
if (!hslColor || !hslValues) {
|
|
@@ -4857,7 +4944,7 @@ class KupTheme {
|
|
|
4857
4944
|
hslColor = 'hsl(' + hsl.h + ',' + hsl.s + '%,' + hsl.l + '%)';
|
|
4858
4945
|
}
|
|
4859
4946
|
catch (error) {
|
|
4860
|
-
dom$
|
|
4947
|
+
dom$c.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
|
|
4861
4948
|
}
|
|
4862
4949
|
}
|
|
4863
4950
|
return {
|
|
@@ -5162,7 +5249,7 @@ class KupTheme {
|
|
|
5162
5249
|
return colorCodes[color.toLowerCase()];
|
|
5163
5250
|
}
|
|
5164
5251
|
else {
|
|
5165
|
-
dom$
|
|
5252
|
+
dom$c.ketchup.debug.logMessage('theme manager', 'Could not decode color ' + color + '!');
|
|
5166
5253
|
return color;
|
|
5167
5254
|
}
|
|
5168
5255
|
}
|
|
@@ -5190,7 +5277,7 @@ var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
5190
5277
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5191
5278
|
};
|
|
5192
5279
|
var _KupToolbar_keyEvent;
|
|
5193
|
-
const dom$
|
|
5280
|
+
const dom$b = document.documentElement;
|
|
5194
5281
|
/**
|
|
5195
5282
|
* Handles component's toolbar.
|
|
5196
5283
|
* @module KupToolbar
|
|
@@ -5208,7 +5295,7 @@ class KupToolbar {
|
|
|
5208
5295
|
KupToolbarModifierKeys.CTRL,
|
|
5209
5296
|
];
|
|
5210
5297
|
__classPrivateFieldSet$1(this, _KupToolbar_keyEvent, function (e) {
|
|
5211
|
-
const toolbar = dom$
|
|
5298
|
+
const toolbar = dom$b.ketchup.toolbar;
|
|
5212
5299
|
if (toolbar.managedElements) {
|
|
5213
5300
|
for (let index = 0; index < toolbar.modifiers.length; index++) {
|
|
5214
5301
|
if (toolbar.modifiers[index] ===
|
|
@@ -5555,78 +5642,1182 @@ exports.KupDataNewColumnTypes = void 0;
|
|
|
5555
5642
|
KupDataNewColumnTypes["MERGE"] = "merge";
|
|
5556
5643
|
})(exports.KupDataNewColumnTypes || (exports.KupDataNewColumnTypes = {}));
|
|
5557
5644
|
|
|
5558
|
-
const dom$7 = document.documentElement;
|
|
5559
5645
|
/**
|
|
5560
|
-
*
|
|
5561
|
-
*
|
|
5562
|
-
* @param {KupDataFindCellFilters} filters - Filters of the research.
|
|
5563
|
-
* @returns {KupDataCell[]} Array of cells fetched after applying the filters.
|
|
5646
|
+
* Props of the kup-data-table component.
|
|
5647
|
+
* Used to export every prop in an object.
|
|
5564
5648
|
*/
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5649
|
+
exports.KupDataTableProps = void 0;
|
|
5650
|
+
(function (KupDataTableProps) {
|
|
5651
|
+
KupDataTableProps["autoFillMissingCells"] = "When true and when a row is missing some columns, the missing cells will be autogenerated.";
|
|
5652
|
+
KupDataTableProps["customStyle"] = "Custom style of the component.";
|
|
5653
|
+
KupDataTableProps["data"] = "The data of the table.";
|
|
5654
|
+
KupDataTableProps["density"] = "The density of the rows, defaults at 'medium' and can be also set to 'large' or 'small'.";
|
|
5655
|
+
KupDataTableProps["dragEnabled"] = "Enables drag.";
|
|
5656
|
+
KupDataTableProps["dropEnabled"] = "Enables drop.";
|
|
5657
|
+
KupDataTableProps["editableData"] = "When set to true, editable cells will be rendered using input components.";
|
|
5658
|
+
KupDataTableProps["emptyDataLabel"] = "Defines the label to show when the table is empty.";
|
|
5659
|
+
KupDataTableProps["enableColumnsFormula"] = "Enables the choice to set formulas on columns by dragging them into different columns.";
|
|
5660
|
+
KupDataTableProps["enableMergeColumns"] = "Enables the merging of columns by dragging them into different columns.";
|
|
5661
|
+
KupDataTableProps["enableExtraColumns"] = "Enables adding extra columns.";
|
|
5662
|
+
KupDataTableProps["enableSortableColumns"] = "Enables the sorting of columns by dragging them into different columns.";
|
|
5663
|
+
KupDataTableProps["expandGroups"] = "Expands groups when set to true.";
|
|
5664
|
+
KupDataTableProps["filters"] = "List of filters set by the user.";
|
|
5665
|
+
KupDataTableProps["fixedColumns"] = "Fixes the given number of columns so that they stay visible when horizontally scrolling the data-table. If grouping is active or the value of the prop is <= 0, this prop will have no effect. Can be combined with fixedRows.";
|
|
5666
|
+
KupDataTableProps["fixedRows"] = "Fixes the given number of rows so that they stay visible when vertically scrolling the data-table. If grouping is active or the value of the prop is <= 0, this prop will have no effect. Can be combined with fixedColumns.";
|
|
5667
|
+
KupDataTableProps["forceOneLine"] = "Forces cells with long text and a fixed column size to have an ellipsis set on their text. The reflect attribute is mandatory to allow styling.";
|
|
5668
|
+
KupDataTableProps["globalFilter"] = "When set to true it activates the global filter.";
|
|
5669
|
+
KupDataTableProps["globalFilterValue"] = "The value of the global filter.";
|
|
5670
|
+
KupDataTableProps["groupLabelDisplay"] = "How the label of a group must be displayed. For available values";
|
|
5671
|
+
KupDataTableProps["groups"] = "The list of groups.";
|
|
5672
|
+
KupDataTableProps["headerIsPersistent"] = "When set to true the header will stick on top of the table when scrolling.";
|
|
5673
|
+
KupDataTableProps["isFocusable"] = "When set to true, clicked-on rows will have a visual feedback.";
|
|
5674
|
+
KupDataTableProps["lazyLoadRows"] = "When set to true, extra rows will be automatically loaded once the last row enters the viewport. When groups are present, the number of rows is referred to groups and not to their content. Paginator is disabled.";
|
|
5675
|
+
KupDataTableProps["lineBreakCharacter"] = "Defines the placeholder character which will be replaced by a line break inside table header cells, normal or sticky.";
|
|
5676
|
+
KupDataTableProps["loadMoreLimit"] = "Sets a maximum limit of new records which can be required by the load more functionality.";
|
|
5677
|
+
KupDataTableProps["loadMoreMode"] = "Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.";
|
|
5678
|
+
KupDataTableProps["loadMoreStep"] = "The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.";
|
|
5679
|
+
KupDataTableProps["multiSelection"] = "When set to true enables rows multi selection.";
|
|
5680
|
+
KupDataTableProps["pageSelected"] = "Current selected page set on component load";
|
|
5681
|
+
KupDataTableProps["paginatorPos"] = "Sets the position of the paginator. Available positions: top, bottom or both.";
|
|
5682
|
+
KupDataTableProps["removableColumns"] = "Sets the possibility to remove the selected column.";
|
|
5683
|
+
KupDataTableProps["resizableColumns"] = "Gives the possibility to resize columns by dragging on their right edge.";
|
|
5684
|
+
KupDataTableProps["rowActions"] = "Sets the actions of the rows.";
|
|
5685
|
+
KupDataTableProps["rowsPerPage"] = "Sets the number of rows per page to display.";
|
|
5686
|
+
KupDataTableProps["scrollOnHover"] = "Activates the scroll on hover function.";
|
|
5687
|
+
KupDataTableProps["showCustomization"] = "If set to true, displays the button to open the customization panel.";
|
|
5688
|
+
KupDataTableProps["showFilters"] = "When set to true enables the column filters.";
|
|
5689
|
+
KupDataTableProps["showFooter"] = "When set to true shows the footer.";
|
|
5690
|
+
KupDataTableProps["showGrid"] = "Can be used to customize the grid view of the table.";
|
|
5691
|
+
KupDataTableProps["showGroups"] = "When set to true enables the column grouping.";
|
|
5692
|
+
KupDataTableProps["showHeader"] = "Enables rendering of the table header.";
|
|
5693
|
+
KupDataTableProps["showLoadMore"] = "If set to true, displays the button to load more records.";
|
|
5694
|
+
KupDataTableProps["sort"] = "Defines the current sorting options.";
|
|
5695
|
+
KupDataTableProps["stateId"] = "";
|
|
5696
|
+
KupDataTableProps["store"] = "";
|
|
5697
|
+
KupDataTableProps["sortableColumnsMutateData"] = "If set to true, when a column is dragged to be sorted, the component directly mutates the data.columns property and then fires the event";
|
|
5698
|
+
KupDataTableProps["sortEnabled"] = "When set to true enables the sorting of the columns by clicking on the column header.";
|
|
5699
|
+
KupDataTableProps["tableHeight"] = "Sets the height of the table.";
|
|
5700
|
+
KupDataTableProps["tableWidth"] = "Sets the width of the table.";
|
|
5701
|
+
KupDataTableProps["totals"] = "Defines the current totals options.";
|
|
5702
|
+
KupDataTableProps["transpose"] = "Transposes the data of the data table.";
|
|
5703
|
+
})(exports.KupDataTableProps || (exports.KupDataTableProps = {}));
|
|
5704
|
+
exports.SortMode = void 0;
|
|
5705
|
+
(function (SortMode) {
|
|
5706
|
+
SortMode["A"] = "A";
|
|
5707
|
+
SortMode["D"] = "D";
|
|
5708
|
+
})(exports.SortMode || (exports.SortMode = {}));
|
|
5709
|
+
exports.TotalMode = void 0;
|
|
5710
|
+
(function (TotalMode) {
|
|
5711
|
+
TotalMode["COUNT"] = "Count";
|
|
5712
|
+
TotalMode["SUM"] = "Sum";
|
|
5713
|
+
TotalMode["MIN"] = "Min";
|
|
5714
|
+
TotalMode["MAX"] = "Max";
|
|
5715
|
+
TotalMode["DISTINCT"] = "Distinct";
|
|
5716
|
+
TotalMode["AVERAGE"] = "Average";
|
|
5717
|
+
TotalMode["MATH"] = "MATH";
|
|
5718
|
+
})(exports.TotalMode || (exports.TotalMode = {}));
|
|
5719
|
+
exports.TotalLabel = void 0;
|
|
5720
|
+
(function (TotalLabel) {
|
|
5721
|
+
TotalLabel["COUNT"] = "Count";
|
|
5722
|
+
TotalLabel["SUM"] = "Sum";
|
|
5723
|
+
TotalLabel["MIN"] = "Min";
|
|
5724
|
+
TotalLabel["MAX"] = "Max";
|
|
5725
|
+
TotalLabel["DISTINCT"] = "Distinct";
|
|
5726
|
+
TotalLabel["AVERAGE"] = "Average";
|
|
5727
|
+
TotalLabel["MATH"] = "Formula";
|
|
5728
|
+
TotalLabel["CANC"] = "Cancel";
|
|
5729
|
+
TotalLabel["CALC"] = "Calculate";
|
|
5730
|
+
})(exports.TotalLabel || (exports.TotalLabel = {}));
|
|
5731
|
+
exports.PaginatorPos = void 0;
|
|
5732
|
+
(function (PaginatorPos) {
|
|
5733
|
+
PaginatorPos["TOP"] = "Top";
|
|
5734
|
+
PaginatorPos["BOTTOM"] = "Bottom";
|
|
5735
|
+
PaginatorPos["BOTH"] = "Both";
|
|
5736
|
+
})(exports.PaginatorPos || (exports.PaginatorPos = {}));
|
|
5737
|
+
exports.ShowGrid = void 0;
|
|
5738
|
+
(function (ShowGrid) {
|
|
5739
|
+
ShowGrid["NONE"] = "None";
|
|
5740
|
+
ShowGrid["ROW"] = "Row";
|
|
5741
|
+
ShowGrid["COL"] = "Col";
|
|
5742
|
+
ShowGrid["COMPLETE"] = "Complete";
|
|
5743
|
+
})(exports.ShowGrid || (exports.ShowGrid = {}));
|
|
5744
|
+
// export enum RowActionType {
|
|
5745
|
+
// DEFAULT = 'Default',
|
|
5746
|
+
// VARIABLE = 'Variable',
|
|
5747
|
+
// }
|
|
5748
|
+
//---- *NEXT functionality AKA load more ----
|
|
5749
|
+
exports.LoadMoreMode = void 0;
|
|
5750
|
+
(function (LoadMoreMode) {
|
|
5751
|
+
LoadMoreMode["CONSTANT"] = "constant";
|
|
5752
|
+
LoadMoreMode["CONSTANT_INCREMENT"] = "constant_increment";
|
|
5753
|
+
LoadMoreMode["PROGRESSIVE_THRESHOLD"] = "progressive_threshold";
|
|
5754
|
+
})(exports.LoadMoreMode || (exports.LoadMoreMode = {}));
|
|
5755
|
+
//---- Group label display functionality ----
|
|
5568
5756
|
/**
|
|
5569
|
-
*
|
|
5570
|
-
* @
|
|
5571
|
-
* @
|
|
5572
|
-
* @
|
|
5757
|
+
* The possible values the display property can have.
|
|
5758
|
+
* @enum
|
|
5759
|
+
* @property {string} BOTH - Shows both the column label and the value. This is the default.
|
|
5760
|
+
* @property {string} LABEL - Shows only the columns label.
|
|
5761
|
+
* @property {string} VALUE - Shows only the value.
|
|
5762
|
+
* @readonly
|
|
5573
5763
|
*/
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5764
|
+
exports.GroupLabelDisplayMode = void 0;
|
|
5765
|
+
(function (GroupLabelDisplayMode) {
|
|
5766
|
+
GroupLabelDisplayMode["BOTH"] = "Both";
|
|
5767
|
+
GroupLabelDisplayMode["LABEL"] = "Label";
|
|
5768
|
+
GroupLabelDisplayMode["VALUE"] = "Value";
|
|
5769
|
+
})(exports.GroupLabelDisplayMode || (exports.GroupLabelDisplayMode = {}));
|
|
5770
|
+
//---- Fixed rows and cells classes ----
|
|
5771
|
+
const FixedCellsClasses = {
|
|
5772
|
+
columns: 'fixed-column',
|
|
5773
|
+
rows: 'fixed-row',
|
|
5774
|
+
};
|
|
5775
|
+
const FixedCellsCSSVarsBase = {
|
|
5776
|
+
columns: '--ddt_column-left-',
|
|
5777
|
+
rows: '--ddt_row-top-',
|
|
5778
|
+
};
|
|
5588
5779
|
/**
|
|
5589
|
-
*
|
|
5590
|
-
* If no columns are provided, the value will be applied to every column of the dataset.
|
|
5591
|
-
* @param {KupDataDataset} dataset - Input dataset.
|
|
5592
|
-
* @param {KupDataCell} cell - New cell.
|
|
5593
|
-
* @param {string[]} columns - Columns to be handled.
|
|
5594
|
-
* @returns {KupDataCell[]} Replaced cells.
|
|
5780
|
+
* Constants for mocked/premade columns created by data mutations.
|
|
5595
5781
|
*/
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
}
|
|
5607
|
-
}
|
|
5608
|
-
return replaced;
|
|
5609
|
-
}
|
|
5782
|
+
const fieldColumn = 'Field';
|
|
5783
|
+
const iconColumn = 'Icon';
|
|
5784
|
+
const keyColumn = 'Key';
|
|
5785
|
+
exports.SelectionMode = void 0;
|
|
5786
|
+
(function (SelectionMode) {
|
|
5787
|
+
SelectionMode["SINGLE"] = "single";
|
|
5788
|
+
SelectionMode["MULTIPLE_CHECKBOX"] = "multiple-checkbox";
|
|
5789
|
+
SelectionMode["MULTIPLE"] = "multiple";
|
|
5790
|
+
SelectionMode["NONE"] = "none";
|
|
5791
|
+
})(exports.SelectionMode || (exports.SelectionMode = {}));
|
|
5610
5792
|
|
|
5611
|
-
const dom$6 = document.documentElement;
|
|
5612
5793
|
/**
|
|
5613
|
-
*
|
|
5614
|
-
* @param {KupDataDataset | Column[]} dataset - Input dataset or array of columns.
|
|
5615
|
-
* @param {Partial<Column>} filters - Column interface containing the filters to match.
|
|
5616
|
-
* @returns {Column[]} Columns matching the criteria.
|
|
5794
|
+
* Normalization types.
|
|
5617
5795
|
*/
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5796
|
+
exports.KupDatesNormalize = void 0;
|
|
5797
|
+
(function (KupDatesNormalize) {
|
|
5798
|
+
KupDatesNormalize["DATE"] = "date";
|
|
5799
|
+
KupDatesNormalize["TIME"] = "time";
|
|
5800
|
+
KupDatesNormalize["TIMESTAMP"] = "timestamp";
|
|
5801
|
+
})(exports.KupDatesNormalize || (exports.KupDatesNormalize = {}));
|
|
5802
|
+
/**
|
|
5803
|
+
* Common use formats
|
|
5804
|
+
*/
|
|
5805
|
+
exports.KupDatesFormats = void 0;
|
|
5806
|
+
(function (KupDatesFormats) {
|
|
5807
|
+
KupDatesFormats["ISO_DATE"] = "YYYY-MM-DD";
|
|
5808
|
+
KupDatesFormats["ISO_DATE_TIME"] = "YYYY-MM-DD HH:mm:ss";
|
|
5809
|
+
KupDatesFormats["ISO_TIME"] = "HH:mm:ss";
|
|
5810
|
+
KupDatesFormats["ISO_TIME_WITHOUT_SECONDS"] = "HH:mm";
|
|
5811
|
+
})(exports.KupDatesFormats || (exports.KupDatesFormats = {}));
|
|
5812
|
+
/**
|
|
5813
|
+
* Supported locales.
|
|
5814
|
+
*/
|
|
5815
|
+
exports.KupDatesLocales = void 0;
|
|
5816
|
+
(function (KupDatesLocales) {
|
|
5817
|
+
KupDatesLocales["CHINESE"] = "cn";
|
|
5818
|
+
KupDatesLocales["ENGLISH"] = "en";
|
|
5819
|
+
KupDatesLocales["FRENCH"] = "fr";
|
|
5820
|
+
KupDatesLocales["ITALIAN"] = "it";
|
|
5821
|
+
KupDatesLocales["POLISH"] = "pl";
|
|
5822
|
+
KupDatesLocales["RUSSIAN"] = "ru";
|
|
5823
|
+
KupDatesLocales["SPANISH"] = "es";
|
|
5824
|
+
})(exports.KupDatesLocales || (exports.KupDatesLocales = {}));
|
|
5825
|
+
|
|
5826
|
+
const dom$a = document.documentElement;
|
|
5827
|
+
exports.DateTimeFormatOptionsMonth = void 0;
|
|
5828
|
+
(function (DateTimeFormatOptionsMonth) {
|
|
5829
|
+
DateTimeFormatOptionsMonth["NUMERIC"] = "numeric";
|
|
5830
|
+
DateTimeFormatOptionsMonth["DIGIT2"] = "2-digit";
|
|
5831
|
+
DateTimeFormatOptionsMonth["LONG"] = "long";
|
|
5832
|
+
DateTimeFormatOptionsMonth["SHORT"] = "short";
|
|
5833
|
+
DateTimeFormatOptionsMonth["NARROW"] = "narrow";
|
|
5834
|
+
})(exports.DateTimeFormatOptionsMonth || (exports.DateTimeFormatOptionsMonth = {}));
|
|
5835
|
+
function identify(array) {
|
|
5836
|
+
if (array) {
|
|
5837
|
+
for (let i = 0; i < array.length; i++) {
|
|
5838
|
+
array[i].id = i.toString();
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5841
|
+
}
|
|
5842
|
+
function getSeparator(locale, separatorType) {
|
|
5843
|
+
const numberWithGroupAndDecimalSeparator = 1000.1;
|
|
5844
|
+
return Intl.NumberFormat(locale)
|
|
5845
|
+
.formatToParts(numberWithGroupAndDecimalSeparator)
|
|
5846
|
+
.find((part) => part.type === separatorType).value;
|
|
5847
|
+
}
|
|
5848
|
+
function getCurrentTimeFormatFromBrowserLocale(manageSeconds) {
|
|
5849
|
+
const options = {
|
|
5850
|
+
hour: '2-digit',
|
|
5851
|
+
minute: '2-digit',
|
|
5852
|
+
hour12: false,
|
|
5853
|
+
};
|
|
5854
|
+
if (manageSeconds == true) {
|
|
5855
|
+
options.second = '2-digit';
|
|
5856
|
+
}
|
|
5857
|
+
const formatObj = new Intl.DateTimeFormat(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options).formatToParts(new Date());
|
|
5858
|
+
let timeFormat = formatObj
|
|
5859
|
+
.map((obj) => {
|
|
5860
|
+
switch (obj.type) {
|
|
5861
|
+
case 'hour':
|
|
5862
|
+
return 'HH';
|
|
5863
|
+
case 'minute':
|
|
5864
|
+
return 'mm';
|
|
5865
|
+
case 'second':
|
|
5866
|
+
return 'ss';
|
|
5867
|
+
default:
|
|
5868
|
+
return obj.value;
|
|
5869
|
+
}
|
|
5870
|
+
})
|
|
5871
|
+
.join('');
|
|
5872
|
+
return timeFormat;
|
|
5873
|
+
}
|
|
5874
|
+
/**
|
|
5875
|
+
* @param value number as string, formatted by actual browser locale
|
|
5876
|
+
* @param type - type of number for calculate suffix
|
|
5877
|
+
* @returns true if number string in input is a valid number
|
|
5878
|
+
*/
|
|
5879
|
+
function isValidFormattedStringNumber(value, type) {
|
|
5880
|
+
if (value == null || value.trim() == '') {
|
|
5881
|
+
return false;
|
|
5882
|
+
}
|
|
5883
|
+
let tmpStr = formattedStringToUnformattedStringNumber(value, type);
|
|
5884
|
+
if (isNumber(tmpStr)) {
|
|
5885
|
+
return true;
|
|
5886
|
+
}
|
|
5887
|
+
return false;
|
|
5888
|
+
}
|
|
5889
|
+
function isNumber(value) {
|
|
5890
|
+
//return typeof value === 'number';
|
|
5891
|
+
return !isNaN(value);
|
|
5892
|
+
}
|
|
5893
|
+
/**
|
|
5894
|
+
* @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
|
|
5895
|
+
* @returns number
|
|
5896
|
+
**/
|
|
5897
|
+
function stringToNumber(input) {
|
|
5898
|
+
if (!input || input == null || input.trim() == '') {
|
|
5899
|
+
input = '0';
|
|
5900
|
+
}
|
|
5901
|
+
return dom$a.ketchup.math.numberify(input);
|
|
5902
|
+
}
|
|
5903
|
+
/**
|
|
5904
|
+
* @param input number
|
|
5905
|
+
* @param decimals number of significant decimal digits for output
|
|
5906
|
+
* @returns number as string, formatted by actual browser locale
|
|
5907
|
+
**/
|
|
5908
|
+
function numberToString(input, decimals) {
|
|
5909
|
+
if (input == null) {
|
|
5910
|
+
return '';
|
|
5911
|
+
}
|
|
5912
|
+
return _numberToString(input, decimals, dom$a.ketchup.dates.getLocale(), true);
|
|
5913
|
+
}
|
|
5914
|
+
/**
|
|
5915
|
+
* @param type - type of number for calculate suffix
|
|
5916
|
+
* @returns suffix for number, by type
|
|
5917
|
+
**/
|
|
5918
|
+
function getNumericValueSuffixByType(type) {
|
|
5919
|
+
type = type.toUpperCase();
|
|
5920
|
+
let nstr = '';
|
|
5921
|
+
if (type == 'P') {
|
|
5922
|
+
nstr = ' %';
|
|
5923
|
+
}
|
|
5924
|
+
else if (type == 'VE') {
|
|
5925
|
+
nstr = ' €';
|
|
5926
|
+
}
|
|
5927
|
+
else if (type == 'VL') {
|
|
5928
|
+
nstr = ' £';
|
|
5929
|
+
}
|
|
5930
|
+
else if (type == 'VV') {
|
|
5931
|
+
nstr = ' $';
|
|
5932
|
+
}
|
|
5933
|
+
return nstr;
|
|
5934
|
+
}
|
|
5935
|
+
/**
|
|
5936
|
+
* @param input number
|
|
5937
|
+
* @param decimals number of significant decimal digits for output
|
|
5938
|
+
* @param type - type of number for calculate suffix
|
|
5939
|
+
* @returns number as string, formatted by actual browser locale, with suffix by type
|
|
5940
|
+
**/
|
|
5941
|
+
function numberToFormattedStringNumber(input, decimals, type) {
|
|
5942
|
+
if (input == null || isNaN(input)) {
|
|
5943
|
+
return '';
|
|
5944
|
+
}
|
|
5945
|
+
let nstr = numberToString(input, decimals);
|
|
5946
|
+
nstr = nstr + getNumericValueSuffixByType(type);
|
|
5947
|
+
return nstr;
|
|
5948
|
+
}
|
|
5949
|
+
/**
|
|
5950
|
+
* @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
|
|
5951
|
+
* @param decimals number of significant decimal digits for output
|
|
5952
|
+
* @param type - type of number for calculate suffix
|
|
5953
|
+
* @returns number as string, formatted by actual browser locale, with suffix by type
|
|
5954
|
+
**/
|
|
5955
|
+
function unformattedStringToFormattedStringNumber(input, decimals, type) {
|
|
5956
|
+
return numberToFormattedStringNumber(stringToNumber(input), decimals, type);
|
|
5957
|
+
}
|
|
5958
|
+
/**
|
|
5959
|
+
* @param input number as string, formatted by actual browser locale
|
|
5960
|
+
* @param type - type of number for calculate suffix
|
|
5961
|
+
* @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
|
|
5962
|
+
**/
|
|
5963
|
+
function formattedStringToUnformattedStringNumber(input, type) {
|
|
5964
|
+
return numberStringToNumberString(input, type, getDecimalSeparator(dom$a.ketchup.dates.getLocale()));
|
|
5965
|
+
}
|
|
5966
|
+
/**
|
|
5967
|
+
* @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers), with group separator
|
|
5968
|
+
* @param type - type of number for calculate suffix
|
|
5969
|
+
* @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
|
|
5970
|
+
**/
|
|
5971
|
+
function unformattedStringNumberToNumber(input, type) {
|
|
5972
|
+
return numberStringToNumberString(input, type, '.');
|
|
5973
|
+
}
|
|
5974
|
+
function numberStringToNumberString(input, type, decFmt) {
|
|
5975
|
+
if (input == null || input.trim() == '') {
|
|
5976
|
+
return '';
|
|
5977
|
+
}
|
|
5978
|
+
let originalInputValue = input;
|
|
5979
|
+
let suffix = getNumericValueSuffixByType(type);
|
|
5980
|
+
if (suffix != '') {
|
|
5981
|
+
input = input.replace(suffix, '');
|
|
5982
|
+
}
|
|
5983
|
+
let regExpr = null;
|
|
5984
|
+
if (decFmt == '.') {
|
|
5985
|
+
regExpr = /,/g;
|
|
5986
|
+
}
|
|
5987
|
+
else {
|
|
5988
|
+
regExpr = /\./g;
|
|
5989
|
+
}
|
|
5990
|
+
input = input.replace(regExpr, '');
|
|
5991
|
+
if (decFmt != '.') {
|
|
5992
|
+
input = input.replace(/,/g, '.');
|
|
5993
|
+
}
|
|
5994
|
+
if (dom$a.ketchup.math.numberify(input) == null ||
|
|
5995
|
+
isNaN(dom$a.ketchup.math.numberify(input))) {
|
|
5996
|
+
return originalInputValue;
|
|
5997
|
+
}
|
|
5998
|
+
let unf = stringToNumber(input);
|
|
5999
|
+
return _numberToString(unf, -1, 'en-US', false);
|
|
6000
|
+
}
|
|
6001
|
+
function getDecimalSeparator(locale) {
|
|
6002
|
+
return getSeparator(locale, 'decimal');
|
|
6003
|
+
}
|
|
6004
|
+
function countDecimals(value) {
|
|
6005
|
+
if (Math.floor(value) === value)
|
|
6006
|
+
return 0;
|
|
6007
|
+
let stringValue = value.toString().split('.')[1];
|
|
6008
|
+
if (stringValue) {
|
|
6009
|
+
return stringValue.length ? stringValue.length : 0;
|
|
6010
|
+
}
|
|
6011
|
+
else {
|
|
6012
|
+
return 0;
|
|
6013
|
+
}
|
|
6014
|
+
}
|
|
6015
|
+
function _numberToString(input, decimals, locale, useGrouping) {
|
|
6016
|
+
if (input == null) {
|
|
6017
|
+
input = 0;
|
|
6018
|
+
}
|
|
6019
|
+
if (decimals == null || decimals == -1) {
|
|
6020
|
+
decimals = countDecimals(input);
|
|
6021
|
+
}
|
|
6022
|
+
let n = Number(input);
|
|
6023
|
+
let f = decimals > -1
|
|
6024
|
+
? {
|
|
6025
|
+
minimumFractionDigits: decimals,
|
|
6026
|
+
maximumFractionDigits: decimals,
|
|
6027
|
+
useGrouping: useGrouping,
|
|
6028
|
+
}
|
|
6029
|
+
: { useGrouping: useGrouping };
|
|
6030
|
+
return n.toLocaleString(locale, f);
|
|
6031
|
+
}
|
|
6032
|
+
/**
|
|
6033
|
+
* @param time time as Date object
|
|
6034
|
+
* @param manageSeconds flag to set seconds managing
|
|
6035
|
+
* @return time as string, formatted
|
|
6036
|
+
**/
|
|
6037
|
+
function formatTime(time, manageSeconds) {
|
|
6038
|
+
const options = {
|
|
6039
|
+
hour: '2-digit',
|
|
6040
|
+
minute: '2-digit',
|
|
6041
|
+
hour12: false,
|
|
6042
|
+
};
|
|
6043
|
+
if (manageSeconds == true) {
|
|
6044
|
+
options.second = '2-digit';
|
|
6045
|
+
}
|
|
6046
|
+
return time.toLocaleTimeString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6047
|
+
}
|
|
6048
|
+
/**
|
|
6049
|
+
* @param value time string, formatted by actual browser locale
|
|
6050
|
+
* @returns true if time string in input is a valid time
|
|
6051
|
+
*/
|
|
6052
|
+
function isValidFormattedStringTime(value, manageSeconds) {
|
|
6053
|
+
let format = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
|
|
6054
|
+
return dom$a.ketchup.dates.isValid(value, format, true);
|
|
6055
|
+
}
|
|
6056
|
+
/**
|
|
6057
|
+
* @param value date/time as string, formatted by actual browser locale
|
|
6058
|
+
* @returns date/time as string, formatted ISO
|
|
6059
|
+
**/
|
|
6060
|
+
function formattedStringToDefaultUnformattedStringTimestamp(value) {
|
|
6061
|
+
return formattedStringToCustomUnformattedStringTime(value, exports.KupDatesFormats.ISO_DATE_TIME, true);
|
|
6062
|
+
}
|
|
6063
|
+
/**
|
|
6064
|
+
* @param value time as string, formatted by actual browser locale
|
|
6065
|
+
* @param outputFormat time format to return
|
|
6066
|
+
* @param manageSeconds flag to set seconds managing
|
|
6067
|
+
* @returns time as string, formatted
|
|
6068
|
+
**/
|
|
6069
|
+
function formattedStringToCustomUnformattedStringTime(value, outputFormat, manageSeconds) {
|
|
6070
|
+
let inputFormat = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
|
|
6071
|
+
if (dom$a.ketchup.dates.isValid(value, inputFormat)) {
|
|
6072
|
+
return dom$a.ketchup.dates.format(dom$a.ketchup.dates.normalize(value, exports.KupDatesNormalize.TIME), outputFormat);
|
|
6073
|
+
}
|
|
6074
|
+
else {
|
|
6075
|
+
return '';
|
|
6076
|
+
}
|
|
6077
|
+
}
|
|
6078
|
+
/**
|
|
6079
|
+
* @param value time as string, formatted ISO
|
|
6080
|
+
* @param manageSeconds flag to set seconds managing
|
|
6081
|
+
* @param valueTimeFormat time format (default ISO)
|
|
6082
|
+
* @param customedFormat time format from smeupObject
|
|
6083
|
+
* @returns time as string, formatted by actual browser locale
|
|
6084
|
+
**/
|
|
6085
|
+
function unformattedStringToFormattedStringTime(value, manageSeconds, customedFormat) {
|
|
6086
|
+
const options = {
|
|
6087
|
+
hour: '2-digit',
|
|
6088
|
+
minute: '2-digit',
|
|
6089
|
+
hour12: false,
|
|
6090
|
+
};
|
|
6091
|
+
if (manageSeconds == true) {
|
|
6092
|
+
options.second = '2-digit';
|
|
6093
|
+
}
|
|
6094
|
+
let date = dom$a.ketchup.dates.toDate(dom$a.ketchup.dates.normalize(value, exports.KupDatesNormalize.TIME));
|
|
6095
|
+
return formatByCustomedOutputTimeFormat(value, date, options, customedFormat);
|
|
6096
|
+
}
|
|
6097
|
+
function formatByCustomedOutputTimeFormat(valueStr, date, options, customedFormat) {
|
|
6098
|
+
if (customedFormat == null) {
|
|
6099
|
+
return date.toLocaleTimeString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6100
|
+
}
|
|
6101
|
+
switch (customedFormat) {
|
|
6102
|
+
case 'I13': {
|
|
6103
|
+
//hh:mm
|
|
6104
|
+
break;
|
|
6105
|
+
}
|
|
6106
|
+
case 'I12': {
|
|
6107
|
+
//hh:mm:ss
|
|
6108
|
+
break;
|
|
6109
|
+
}
|
|
6110
|
+
case 'I11': {
|
|
6111
|
+
//???
|
|
6112
|
+
//hh:dddd
|
|
6113
|
+
//return moment(date).format('HH:DDDD');
|
|
6114
|
+
return valueStr;
|
|
6115
|
+
}
|
|
6116
|
+
case 'I14': {
|
|
6117
|
+
//???
|
|
6118
|
+
//sssss
|
|
6119
|
+
//return moment(date).format('SSSSS');
|
|
6120
|
+
return valueStr;
|
|
6121
|
+
}
|
|
6122
|
+
case 'I1H': {
|
|
6123
|
+
//???
|
|
6124
|
+
//Ora,Cen/Min HH,xx
|
|
6125
|
+
return valueStr;
|
|
6126
|
+
}
|
|
6127
|
+
case 'I1M': {
|
|
6128
|
+
//???
|
|
6129
|
+
//Min,Cen/Sec MMMM,xx
|
|
6130
|
+
return valueStr;
|
|
6131
|
+
}
|
|
6132
|
+
case 'I21': {
|
|
6133
|
+
//???
|
|
6134
|
+
//Giorni,(4 decim)
|
|
6135
|
+
return valueStr;
|
|
6136
|
+
}
|
|
6137
|
+
case 'I22': {
|
|
6138
|
+
//???
|
|
6139
|
+
//Ore,(4 decim)
|
|
6140
|
+
return valueStr;
|
|
6141
|
+
}
|
|
6142
|
+
case 'I23': {
|
|
6143
|
+
//???
|
|
6144
|
+
//Minuti,(4 decim)
|
|
6145
|
+
return valueStr;
|
|
6146
|
+
}
|
|
6147
|
+
case 'I24': {
|
|
6148
|
+
//???
|
|
6149
|
+
//Secondi
|
|
6150
|
+
return valueStr;
|
|
6151
|
+
}
|
|
6152
|
+
case 'I2H': {
|
|
6153
|
+
//???
|
|
6154
|
+
//Ora,Cen/Min HHHH,xx
|
|
6155
|
+
return valueStr;
|
|
6156
|
+
}
|
|
6157
|
+
case 'I2D': {
|
|
6158
|
+
//???
|
|
6159
|
+
//Ore Minuti Secondi HHMMS
|
|
6160
|
+
return valueStr;
|
|
6161
|
+
}
|
|
6162
|
+
case 'I2M': {
|
|
6163
|
+
//???
|
|
6164
|
+
//Min,Cen/Sec MMMM,xx
|
|
6165
|
+
return valueStr;
|
|
6166
|
+
}
|
|
6167
|
+
}
|
|
6168
|
+
return date.toLocaleTimeString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6169
|
+
}
|
|
6170
|
+
/**
|
|
6171
|
+
* @param value date/time as string, formatted ISO
|
|
6172
|
+
* @param valueDateFormat date/time format (default ISO)
|
|
6173
|
+
* @returns date/time as string, formatted by actual browser locale
|
|
6174
|
+
**/
|
|
6175
|
+
function unformattedStringToFormattedStringTimestamp(value) {
|
|
6176
|
+
const options = {
|
|
6177
|
+
day: '2-digit',
|
|
6178
|
+
month: '2-digit',
|
|
6179
|
+
year: 'numeric',
|
|
6180
|
+
hour: '2-digit',
|
|
6181
|
+
minute: '2-digit',
|
|
6182
|
+
second: '2-digit',
|
|
6183
|
+
hour12: false,
|
|
6184
|
+
};
|
|
6185
|
+
let date = dom$a.ketchup.dates.toDate(dom$a.ketchup.dates.normalize(value, exports.KupDatesNormalize.TIMESTAMP));
|
|
6186
|
+
return date.toLocaleString(dom$a.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
6187
|
+
}
|
|
6188
|
+
function getMonthAsStringByLocale(month, format) {
|
|
6189
|
+
if (month == null) {
|
|
6190
|
+
return '';
|
|
6191
|
+
}
|
|
6192
|
+
const dateTmp = new Date();
|
|
6193
|
+
dateTmp.setDate(1);
|
|
6194
|
+
dateTmp.setMonth(month - 1);
|
|
6195
|
+
const options = {
|
|
6196
|
+
month: format,
|
|
6197
|
+
};
|
|
6198
|
+
const dateTimeFormat = new Intl.DateTimeFormat(dom$a.ketchup.dates.getLocale(), options);
|
|
6199
|
+
return dateTimeFormat.format(dateTmp);
|
|
6200
|
+
}
|
|
6201
|
+
function getMonthsAsStringByLocale(format) {
|
|
6202
|
+
if (format == null || format.trim() == '') {
|
|
6203
|
+
format = exports.DateTimeFormatOptionsMonth.LONG;
|
|
6204
|
+
}
|
|
6205
|
+
var months = [];
|
|
6206
|
+
for (var i = 0; i < 12; i++) {
|
|
6207
|
+
months[i] = getMonthAsStringByLocale(i + 1, format);
|
|
6208
|
+
}
|
|
6209
|
+
return months;
|
|
6210
|
+
}
|
|
6211
|
+
/**
|
|
6212
|
+
* Used to retrieve component's props values.
|
|
6213
|
+
* @param {any} comp - Component calling this function.
|
|
6214
|
+
* @param {GenericObject} list - Prop list, specific for each component.
|
|
6215
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
6216
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
6217
|
+
*/
|
|
6218
|
+
function getProps(comp, list, descriptions) {
|
|
6219
|
+
let props = {};
|
|
6220
|
+
if (descriptions) {
|
|
6221
|
+
props = list;
|
|
6222
|
+
}
|
|
6223
|
+
else {
|
|
6224
|
+
for (const key in list) {
|
|
6225
|
+
if (Object.prototype.hasOwnProperty.call(list, key)) {
|
|
6226
|
+
props[key] = comp[key];
|
|
6227
|
+
}
|
|
6228
|
+
}
|
|
6229
|
+
}
|
|
6230
|
+
return props;
|
|
6231
|
+
}
|
|
6232
|
+
/**
|
|
6233
|
+
* Sets the props to the component.
|
|
6234
|
+
* @param {any} comp - Component calling this function.
|
|
6235
|
+
* @param {GenericObject} list - Prop list, specific for each component.
|
|
6236
|
+
* @param {GenericObject} props - Prop to be set.
|
|
6237
|
+
*/
|
|
6238
|
+
function setProps(comp, list, props) {
|
|
6239
|
+
for (const key in props) {
|
|
6240
|
+
// If key is a custom prop it will be set on the component (i.e.: "data", "customStyle", ecc.)
|
|
6241
|
+
if (list[key]) {
|
|
6242
|
+
comp[key] = props[key];
|
|
6243
|
+
}
|
|
6244
|
+
else {
|
|
6245
|
+
// Otherwise, it will be set on its HTML element (i.e.: "id", "style", ecc.)
|
|
6246
|
+
comp.rootElement[key] = props[key];
|
|
6247
|
+
}
|
|
6248
|
+
}
|
|
6249
|
+
}
|
|
6250
|
+
|
|
6251
|
+
const dom$9 = document.documentElement;
|
|
6252
|
+
// -------------
|
|
6253
|
+
// COMMONS
|
|
6254
|
+
// -------------
|
|
6255
|
+
function getCellValueForDisplay(column, cell) {
|
|
6256
|
+
if (cell != null) {
|
|
6257
|
+
if (cell.displayedValue != null) {
|
|
6258
|
+
return cell.displayedValue;
|
|
6259
|
+
}
|
|
6260
|
+
}
|
|
6261
|
+
let formattedValue = _getCellValueForDisplay(cell.value, column, cell);
|
|
6262
|
+
if (cell != null) {
|
|
6263
|
+
cell.displayedValue = formattedValue;
|
|
6264
|
+
}
|
|
6265
|
+
return formattedValue;
|
|
6266
|
+
}
|
|
6267
|
+
function getValueForDisplay2(values, column) {
|
|
6268
|
+
if (values == null) {
|
|
6269
|
+
return '';
|
|
6270
|
+
}
|
|
6271
|
+
if (values.displayedValue == null || values.displayedValue.trim() == '') {
|
|
6272
|
+
values.displayedValue = _getCellValueForDisplay(values.value, column, null);
|
|
6273
|
+
}
|
|
6274
|
+
return values.displayedValue;
|
|
6275
|
+
}
|
|
6276
|
+
function formatToNumber(cell) {
|
|
6277
|
+
if (cell.obj) {
|
|
6278
|
+
return dom$9.ketchup.math.numberify(cell.obj.k);
|
|
6279
|
+
}
|
|
6280
|
+
return dom$9.ketchup.math.numberify(cell.value);
|
|
6281
|
+
}
|
|
6282
|
+
function _getCellValueForDisplay(value, column, cell) {
|
|
6283
|
+
let obj = column != null ? column.obj : null;
|
|
6284
|
+
if (cell != null) {
|
|
6285
|
+
obj = cell.obj ? cell.obj : obj;
|
|
6286
|
+
}
|
|
6287
|
+
return getValueForDisplay(value, obj, column != null ? column.decimals : null);
|
|
6288
|
+
}
|
|
6289
|
+
function getValueForDisplay(value, obj, decimals) {
|
|
6290
|
+
if (value == null || value.trim() == '') {
|
|
6291
|
+
return value;
|
|
6292
|
+
}
|
|
6293
|
+
if (dom$9.ketchup.objects.isNumber(obj)) {
|
|
6294
|
+
return unformattedStringToFormattedStringNumber(value, decimals ? decimals : -1, obj ? obj.p : '');
|
|
6295
|
+
}
|
|
6296
|
+
if (dom$9.ketchup.objects.isDate(obj) &&
|
|
6297
|
+
dom$9.ketchup.dates.isValid(value, exports.KupDatesFormats.ISO_DATE)) {
|
|
6298
|
+
return dom$9.ketchup.dates.format(value);
|
|
6299
|
+
}
|
|
6300
|
+
if (dom$9.ketchup.objects.isTime(obj)) {
|
|
6301
|
+
return unformattedStringToFormattedStringTime(value, dom$9.ketchup.objects.isTimeWithSeconds(obj), obj.t + obj.p);
|
|
6302
|
+
}
|
|
6303
|
+
if (dom$9.ketchup.objects.isTimestamp(obj)) {
|
|
6304
|
+
return unformattedStringToFormattedStringTimestamp(value);
|
|
6305
|
+
}
|
|
6306
|
+
return value;
|
|
6307
|
+
}
|
|
6308
|
+
function getColumnByName(columns, name) {
|
|
6309
|
+
if (columns == null) {
|
|
6310
|
+
return null;
|
|
6311
|
+
}
|
|
6312
|
+
for (let column of columns) {
|
|
6313
|
+
if (column.name === name) {
|
|
6314
|
+
return column;
|
|
6315
|
+
}
|
|
6316
|
+
}
|
|
6317
|
+
return null;
|
|
6318
|
+
}
|
|
6319
|
+
function compareCell(cell1, cell2, sortMode) {
|
|
6320
|
+
return compareValues(cell1.obj, cell1.value, cell2.obj, cell2.value, sortMode);
|
|
6321
|
+
}
|
|
6322
|
+
function compareValues(obj1, value1, obj2, value2, sortMode) {
|
|
6323
|
+
const sm = sortMode === 'A' ? 1 : -1;
|
|
6324
|
+
if (obj1 == null || obj2 == null) {
|
|
6325
|
+
return sm * localCompareAsInJava(value1, value2);
|
|
6326
|
+
}
|
|
6327
|
+
// If either the type or the parameter of the current object are not equal.
|
|
6328
|
+
if (!(obj1.t === obj2.t && obj1.p === obj2.p)) {
|
|
6329
|
+
let compare = localCompareAsInJava(obj1.t, obj2.t);
|
|
6330
|
+
if (compare === 0) {
|
|
6331
|
+
compare = localCompareAsInJava(obj1.p, obj2.p);
|
|
6332
|
+
}
|
|
6333
|
+
return compare * sm;
|
|
6334
|
+
}
|
|
6335
|
+
let s1 = value1;
|
|
6336
|
+
let s2 = value2;
|
|
6337
|
+
if (s1 == s2) {
|
|
6338
|
+
return 0;
|
|
6339
|
+
}
|
|
6340
|
+
if (s1 == '') {
|
|
6341
|
+
return sm * -1;
|
|
6342
|
+
}
|
|
6343
|
+
if (s2 == '') {
|
|
6344
|
+
return sm * 1;
|
|
6345
|
+
}
|
|
6346
|
+
let v1 = s1;
|
|
6347
|
+
let v2 = s2;
|
|
6348
|
+
if (dom$9.ketchup.objects.isNumber(obj1)) {
|
|
6349
|
+
v1 = stringToNumber(s1);
|
|
6350
|
+
v2 = stringToNumber(s2);
|
|
6351
|
+
}
|
|
6352
|
+
else if (dom$9.ketchup.objects.isDate(obj1)) {
|
|
6353
|
+
v1 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s1, exports.KupDatesFormats.ISO_DATE));
|
|
6354
|
+
v2 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s2, exports.KupDatesFormats.ISO_DATE));
|
|
6355
|
+
}
|
|
6356
|
+
else if (dom$9.ketchup.objects.isTime(obj1)) {
|
|
6357
|
+
let manageSeconds = dom$9.ketchup.objects.isTimeWithSeconds(obj1);
|
|
6358
|
+
v1 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s1, manageSeconds
|
|
6359
|
+
? exports.KupDatesFormats.ISO_TIME
|
|
6360
|
+
: exports.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
|
|
6361
|
+
v2 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s2, manageSeconds
|
|
6362
|
+
? exports.KupDatesFormats.ISO_TIME
|
|
6363
|
+
: exports.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
|
|
6364
|
+
}
|
|
6365
|
+
else if (dom$9.ketchup.objects.isTimestamp(obj1)) {
|
|
6366
|
+
v1 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s1, exports.KupDatesFormats.ISO_DATE_TIME));
|
|
6367
|
+
v2 = dom$9.ketchup.dates.toDate(dom$9.ketchup.dates.format(s2, exports.KupDatesFormats.ISO_DATE_TIME));
|
|
6368
|
+
}
|
|
6369
|
+
if (v1 > v2) {
|
|
6370
|
+
return sm * 1;
|
|
6371
|
+
}
|
|
6372
|
+
if (v1 < v2) {
|
|
6373
|
+
return sm * -1;
|
|
6374
|
+
}
|
|
6375
|
+
return 0;
|
|
6376
|
+
}
|
|
6377
|
+
/**
|
|
6378
|
+
* Given two strings to compare, the functions decides which string comes before the other or if they are equal.
|
|
6379
|
+
* This is meant as a replacement for the JavaScript function localCompare() which produces a slightly different result from
|
|
6380
|
+
* the Java version of compareTo().
|
|
6381
|
+
*
|
|
6382
|
+
* Re-implemented from java source method compareTo() of java.lang.String
|
|
6383
|
+
* @param t1 firstString the first string to be compared
|
|
6384
|
+
* @param t2 anotherString the another string to be compared to the first one
|
|
6385
|
+
* @returns the value 0 if the anotherString is equal to
|
|
6386
|
+
* firstString; a value less than 0 if firstString
|
|
6387
|
+
* is lexicographically less than the anotherString; and a
|
|
6388
|
+
* value greater than 0 if firstString is
|
|
6389
|
+
* lexicographically greater than the anotherString.
|
|
6390
|
+
*/
|
|
6391
|
+
function localCompareAsInJava(t1, t2) {
|
|
6392
|
+
let t1Length = t1 == null ? 0 : t1.length;
|
|
6393
|
+
let t2Length = t2 == null ? 0 : t2.length;
|
|
6394
|
+
const lim = Math.min(t1Length, t2Length);
|
|
6395
|
+
let k = 0;
|
|
6396
|
+
while (k < lim) {
|
|
6397
|
+
const c1 = t1[k];
|
|
6398
|
+
const c2 = t2[k];
|
|
6399
|
+
if (c1 !== c2) {
|
|
6400
|
+
return c1.charCodeAt(0) - c2.charCodeAt(0);
|
|
6401
|
+
}
|
|
6402
|
+
k++;
|
|
6403
|
+
}
|
|
6404
|
+
return t1Length - t2Length;
|
|
6405
|
+
}
|
|
6406
|
+
|
|
6407
|
+
/**
|
|
6408
|
+
* Interface for ranged filters.
|
|
6409
|
+
*/
|
|
6410
|
+
exports.FilterInterval = void 0;
|
|
6411
|
+
(function (FilterInterval) {
|
|
6412
|
+
FilterInterval[FilterInterval["FROM"] = 0] = "FROM";
|
|
6413
|
+
FilterInterval[FilterInterval["TO"] = 1] = "TO";
|
|
6414
|
+
})(exports.FilterInterval || (exports.FilterInterval = {}));
|
|
6415
|
+
/**
|
|
6416
|
+
* This regular expressions returns a match like this one:
|
|
6417
|
+
* if the string does not match is null, otherwise the indexes are equal to the object below:
|
|
6418
|
+
*
|
|
6419
|
+
* @property {string} 0 - The entire match of the regexp; is equal to the cellValue.
|
|
6420
|
+
* @property {string} 1 - Either !' or ' it's the start of the regexp.
|
|
6421
|
+
* @property {string} 2 - Either % or null: means the string must start with the given string.
|
|
6422
|
+
* @property {string} 3 - Either "" or a string with a length.
|
|
6423
|
+
* @property {string} 4 - Either % or null: means the string must finish with the given string.
|
|
6424
|
+
* @property {string} 5 - Always equal to ': it's the end of the filter.
|
|
6425
|
+
*/
|
|
6426
|
+
const FILTER_ANALIZER = /^('|!')(%){0,1}(.*?)(%){0,1}(')$/;
|
|
6427
|
+
exports.KupGlobalFilterMode = void 0;
|
|
6428
|
+
(function (KupGlobalFilterMode) {
|
|
6429
|
+
KupGlobalFilterMode["SIMPLE"] = "simple";
|
|
6430
|
+
KupGlobalFilterMode["HIGHLIGHT"] = "highlight";
|
|
6431
|
+
})(exports.KupGlobalFilterMode || (exports.KupGlobalFilterMode = {}));
|
|
6432
|
+
|
|
6433
|
+
const dom$8 = document.documentElement;
|
|
6434
|
+
/**
|
|
6435
|
+
* Filtering algorithms.
|
|
6436
|
+
* @module Filters
|
|
6437
|
+
* @todo Should contain EVERY filtering method in common between filtering types (i.e.: global filters and column menu filters).
|
|
6438
|
+
*/
|
|
6439
|
+
class Filters {
|
|
6440
|
+
/**
|
|
6441
|
+
* Function used to check whether the component is a KupTree or KupDataTable.
|
|
6442
|
+
* @param {KupDataTable | KupTree} comp - Component using the column menu.
|
|
6443
|
+
* @returns {comp is KupTree} Returns true when the component is KupTree.
|
|
6444
|
+
*/
|
|
6445
|
+
static isTree(comp) {
|
|
6446
|
+
return comp.rootElement.tagName === exports.KupTagNames.TREE;
|
|
6447
|
+
}
|
|
6448
|
+
isObjFiltrableByInterval(obj) {
|
|
6449
|
+
if (dom$8.ketchup.objects.isDate(obj)) {
|
|
6450
|
+
return true;
|
|
6451
|
+
}
|
|
6452
|
+
if (dom$8.ketchup.objects.isTime(obj)) {
|
|
6453
|
+
return true;
|
|
6454
|
+
}
|
|
6455
|
+
if (dom$8.ketchup.objects.isTimestamp(obj)) {
|
|
6456
|
+
return true;
|
|
6457
|
+
}
|
|
6458
|
+
if (dom$8.ketchup.objects.isNumber(obj)) {
|
|
6459
|
+
return true;
|
|
6460
|
+
}
|
|
6461
|
+
return false;
|
|
6462
|
+
}
|
|
6463
|
+
normalizeValue(value, smeupObj) {
|
|
6464
|
+
let newValue = value != null ? value.trim() : value;
|
|
6465
|
+
if (newValue == null || newValue == '' || smeupObj == null) {
|
|
6466
|
+
return newValue;
|
|
6467
|
+
}
|
|
6468
|
+
if (dom$8.ketchup.objects.isDate(smeupObj)) {
|
|
6469
|
+
if (dom$8.ketchup.dates.isValid(value, exports.KupDatesFormats.ISO_DATE)) {
|
|
6470
|
+
return newValue;
|
|
6471
|
+
}
|
|
6472
|
+
if (dom$8.ketchup.dates.isValid(value)) {
|
|
6473
|
+
return dom$8.ketchup.dates.format(dom$8.ketchup.dates.normalize(value, exports.KupDatesNormalize.DATE), exports.KupDatesFormats.ISO_DATE);
|
|
6474
|
+
}
|
|
6475
|
+
}
|
|
6476
|
+
else if (dom$8.ketchup.objects.isTime(smeupObj)) {
|
|
6477
|
+
let manageSeconds = dom$8.ketchup.objects.isTimeWithSeconds(smeupObj);
|
|
6478
|
+
if (dom$8.ketchup.dates.isValid(value, manageSeconds
|
|
6479
|
+
? exports.KupDatesFormats.ISO_TIME
|
|
6480
|
+
: exports.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS)) {
|
|
6481
|
+
return newValue;
|
|
6482
|
+
}
|
|
6483
|
+
if (isValidFormattedStringTime(value, manageSeconds)) {
|
|
6484
|
+
return formattedStringToCustomUnformattedStringTime(value, manageSeconds
|
|
6485
|
+
? exports.KupDatesFormats.ISO_TIME
|
|
6486
|
+
: exports.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, manageSeconds);
|
|
6487
|
+
}
|
|
6488
|
+
}
|
|
6489
|
+
else if (dom$8.ketchup.objects.isTimestamp(smeupObj)) {
|
|
6490
|
+
if (dom$8.ketchup.dates.isValid(value, exports.KupDatesFormats.ISO_DATE_TIME)) {
|
|
6491
|
+
return newValue;
|
|
6492
|
+
}
|
|
6493
|
+
if (isValidFormattedStringTime(value, true)) {
|
|
6494
|
+
return formattedStringToDefaultUnformattedStringTimestamp(value);
|
|
6495
|
+
}
|
|
6496
|
+
}
|
|
6497
|
+
else if (dom$8.ketchup.objects.isNumber(smeupObj)) {
|
|
6498
|
+
if (isValidFormattedStringNumber(value, smeupObj ? smeupObj.p : '')) {
|
|
6499
|
+
return formattedStringToUnformattedStringNumber(value, smeupObj ? smeupObj.p : '');
|
|
6500
|
+
}
|
|
6501
|
+
}
|
|
6502
|
+
return newValue;
|
|
6503
|
+
}
|
|
6504
|
+
/**
|
|
6505
|
+
* Given a filter value, check if is a negative filter
|
|
6506
|
+
* @param filterValue the filter value to use for check
|
|
6507
|
+
*/
|
|
6508
|
+
filterIsNegative(filterValue) {
|
|
6509
|
+
const analyzedFilter = filterValue.match(FILTER_ANALIZER);
|
|
6510
|
+
const filterIsNegative = analyzedFilter
|
|
6511
|
+
? analyzedFilter[1].indexOf('!') >= 0
|
|
6512
|
+
: false;
|
|
6513
|
+
return filterIsNegative;
|
|
6514
|
+
}
|
|
6515
|
+
/**
|
|
6516
|
+
* Given a value and a filter value, returns if that value matches the filter.
|
|
6517
|
+
*
|
|
6518
|
+
* Web filters can also be expressions: by putting strings between single quotes (') it's possible to activate filter expressions.
|
|
6519
|
+
* Valid syntax:
|
|
6520
|
+
* 'filter' = search for exact phrase;
|
|
6521
|
+
* '' = match when value is empty;
|
|
6522
|
+
* 'filter%' = match when a string starts with "filter";
|
|
6523
|
+
* '%filter' = match when a string ends with "filter";
|
|
6524
|
+
* '%filter%' = match when a string contains "filter".
|
|
6525
|
+
*
|
|
6526
|
+
* It is also possible to negate the expression by prepending "!" in front of the expression.
|
|
6527
|
+
* For example: !'' = value in the cell must not be empty.
|
|
6528
|
+
*
|
|
6529
|
+
* With no expression set, the filter is by default set to '%filter%'.
|
|
6530
|
+
*
|
|
6531
|
+
* @param value - The current value to check.
|
|
6532
|
+
* @param filterValue - The value of the current filter.
|
|
6533
|
+
* @returns false if value or filterValue are empty;
|
|
6534
|
+
true if value contains filterValue;
|
|
6535
|
+
true if value matches special filter created on filterValue;
|
|
6536
|
+
false otherwise.
|
|
6537
|
+
*/
|
|
6538
|
+
isFilterCompliantForValue(value, filterValue) {
|
|
6539
|
+
if (value == null) {
|
|
6540
|
+
return false;
|
|
6541
|
+
}
|
|
6542
|
+
if (filterValue == null) {
|
|
6543
|
+
return false;
|
|
6544
|
+
}
|
|
6545
|
+
const _filterIsNegative = this.filterIsNegative(filterValue);
|
|
6546
|
+
// checks if the value of the filter is contained inside value of the object
|
|
6547
|
+
// Or is if the filter is a special filter to be matched.
|
|
6548
|
+
if (value.toLowerCase().includes(filterValue.toLowerCase()) ||
|
|
6549
|
+
this.matchSpecialFilter(value.toLowerCase(), filterValue.toLowerCase().match(FILTER_ANALIZER), true)) {
|
|
6550
|
+
// the element matches the field filter
|
|
6551
|
+
if (_filterIsNegative) {
|
|
6552
|
+
return false;
|
|
6553
|
+
}
|
|
6554
|
+
return true;
|
|
6555
|
+
}
|
|
6556
|
+
if (_filterIsNegative) {
|
|
6557
|
+
return true;
|
|
6558
|
+
}
|
|
6559
|
+
return false;
|
|
6560
|
+
}
|
|
6561
|
+
/**
|
|
6562
|
+
* Given a value and a filter value, returns if that value matches the filter.
|
|
6563
|
+
*
|
|
6564
|
+
* Web filters can also be expressions: by putting strings between single quotes (') it's possible to activate filter expressions.
|
|
6565
|
+
* Valid syntax:
|
|
6566
|
+
* 'filter' = search for exact phrase;
|
|
6567
|
+
* '' = match when value is empty;
|
|
6568
|
+
* 'filter%' = match when a string starts with "filter";
|
|
6569
|
+
* '%filter' = match when a string ends with "filter";
|
|
6570
|
+
* '%filter%' = match when a string contains "filter".
|
|
6571
|
+
*
|
|
6572
|
+
* It is also possible to negate the expression by prepending "!" in front of the expression.
|
|
6573
|
+
* For example: !'' = value in the cell must not be empty.
|
|
6574
|
+
*
|
|
6575
|
+
* With no expression set, the filter is by default set to '%filter%'.
|
|
6576
|
+
*
|
|
6577
|
+
* @param value - The current value to check.
|
|
6578
|
+
* @param parsedFilter - The value of the current filter.
|
|
6579
|
+
* @param ignoreNegativeFlag = false - When set to true, the matcher will ignore the (!) operator; useful for global filter.
|
|
6580
|
+
* @returns True if the filter is empty and the value of the cell is empty, false otherwise.
|
|
6581
|
+
*/
|
|
6582
|
+
matchSpecialFilter(value, parsedFilter, ignoreNegativeFlag = false) {
|
|
6583
|
+
if (parsedFilter != null) {
|
|
6584
|
+
// endsWith and startWith are not supported by IE 11
|
|
6585
|
+
// Check here https://www.w3schools.com/jsref/jsref_endswith.asp
|
|
6586
|
+
const toRet = (parsedFilter[3] === '' && !value.trim()) ||
|
|
6587
|
+
(!parsedFilter[2] &&
|
|
6588
|
+
parsedFilter[4] &&
|
|
6589
|
+
value.startsWith(parsedFilter[3])) ||
|
|
6590
|
+
(parsedFilter[2] &&
|
|
6591
|
+
!parsedFilter[4] &&
|
|
6592
|
+
value.endsWith(parsedFilter[3])) ||
|
|
6593
|
+
(!parsedFilter[2] &&
|
|
6594
|
+
!parsedFilter[4] &&
|
|
6595
|
+
value === parsedFilter[3]) ||
|
|
6596
|
+
(parsedFilter[2] &&
|
|
6597
|
+
parsedFilter[4] &&
|
|
6598
|
+
value.indexOf(parsedFilter[3]) >= 0);
|
|
6599
|
+
return !ignoreNegativeFlag
|
|
6600
|
+
? parsedFilter[1].indexOf('!') < 0
|
|
6601
|
+
? toRet
|
|
6602
|
+
: !toRet
|
|
6603
|
+
: toRet;
|
|
6604
|
+
}
|
|
6605
|
+
return false;
|
|
6606
|
+
}
|
|
6607
|
+
isFilterCompliantForSimpleValue(valueToCheck, obj, filterValue, interval) {
|
|
6608
|
+
if (valueToCheck == null) {
|
|
6609
|
+
return false;
|
|
6610
|
+
}
|
|
6611
|
+
filterValue = this.normalizeValue(filterValue, obj);
|
|
6612
|
+
let value = valueToCheck;
|
|
6613
|
+
let from = '';
|
|
6614
|
+
let to = '';
|
|
6615
|
+
if (interval != null) {
|
|
6616
|
+
from = interval[exports.FilterInterval.FROM];
|
|
6617
|
+
to = interval[exports.FilterInterval.TO];
|
|
6618
|
+
}
|
|
6619
|
+
let checkByRegularExpression = true;
|
|
6620
|
+
if (dom$8.ketchup.objects.isNumber(obj)) {
|
|
6621
|
+
value = unformattedStringNumberToNumber(value, obj ? obj.p : '');
|
|
6622
|
+
let valueNumber = stringToNumber(value);
|
|
6623
|
+
if (from != '') {
|
|
6624
|
+
if (isNumber(from)) {
|
|
6625
|
+
checkByRegularExpression = false;
|
|
6626
|
+
let fromNumber = stringToNumber(from);
|
|
6627
|
+
if (valueNumber < fromNumber) {
|
|
6628
|
+
return false;
|
|
6629
|
+
}
|
|
6630
|
+
}
|
|
6631
|
+
else {
|
|
6632
|
+
filterValue = from;
|
|
6633
|
+
}
|
|
6634
|
+
}
|
|
6635
|
+
if (to != '') {
|
|
6636
|
+
if (isNumber(to)) {
|
|
6637
|
+
checkByRegularExpression = false;
|
|
6638
|
+
let toNumber = stringToNumber(to);
|
|
6639
|
+
if (valueNumber > toNumber) {
|
|
6640
|
+
return false;
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6643
|
+
else {
|
|
6644
|
+
filterValue = to;
|
|
6645
|
+
}
|
|
6646
|
+
}
|
|
6647
|
+
}
|
|
6648
|
+
if (dom$8.ketchup.objects.isDate(obj) ||
|
|
6649
|
+
dom$8.ketchup.objects.isTime(obj) ||
|
|
6650
|
+
dom$8.ketchup.objects.isTimestamp(obj)) {
|
|
6651
|
+
let valueDate = null;
|
|
6652
|
+
let defaultFormat = exports.KupDatesFormats.ISO_DATE;
|
|
6653
|
+
if (dom$8.ketchup.objects.isDate(obj)) {
|
|
6654
|
+
defaultFormat = exports.KupDatesFormats.ISO_DATE;
|
|
6655
|
+
}
|
|
6656
|
+
else if (dom$8.ketchup.objects.isTime(obj)) {
|
|
6657
|
+
defaultFormat = dom$8.ketchup.objects.isTimeWithSeconds(obj)
|
|
6658
|
+
? exports.KupDatesFormats.ISO_TIME
|
|
6659
|
+
: exports.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS;
|
|
6660
|
+
}
|
|
6661
|
+
else if (dom$8.ketchup.objects.isTimestamp(obj)) {
|
|
6662
|
+
defaultFormat = exports.KupDatesFormats.ISO_DATE_TIME;
|
|
6663
|
+
}
|
|
6664
|
+
if (dom$8.ketchup.dates.isValid(value, defaultFormat, true)) {
|
|
6665
|
+
valueDate = dom$8.ketchup.dates.toDate(value, defaultFormat);
|
|
6666
|
+
}
|
|
6667
|
+
if (from != '') {
|
|
6668
|
+
if (valueDate != null &&
|
|
6669
|
+
dom$8.ketchup.dates.isValid(from, defaultFormat, true)) {
|
|
6670
|
+
checkByRegularExpression = false;
|
|
6671
|
+
let fromDate = dom$8.ketchup.dates.toDate(from, defaultFormat);
|
|
6672
|
+
if (valueDate < fromDate) {
|
|
6673
|
+
return false;
|
|
6674
|
+
}
|
|
6675
|
+
}
|
|
6676
|
+
else {
|
|
6677
|
+
filterValue = from;
|
|
6678
|
+
}
|
|
6679
|
+
}
|
|
6680
|
+
if (to != '') {
|
|
6681
|
+
if (valueDate != null &&
|
|
6682
|
+
dom$8.ketchup.dates.isValid(to, defaultFormat, true)) {
|
|
6683
|
+
checkByRegularExpression = false;
|
|
6684
|
+
let toDate = dom$8.ketchup.dates.toDate(to, defaultFormat);
|
|
6685
|
+
if (valueDate > toDate) {
|
|
6686
|
+
return false;
|
|
6687
|
+
}
|
|
6688
|
+
}
|
|
6689
|
+
else {
|
|
6690
|
+
filterValue = to;
|
|
6691
|
+
}
|
|
6692
|
+
}
|
|
6693
|
+
if (!dom$8.ketchup.dates.isValid(filterValue, defaultFormat) &&
|
|
6694
|
+
!dom$8.ketchup.dates.isValid(filterValue)) {
|
|
6695
|
+
value = dom$8.ketchup.dates.format(value);
|
|
6696
|
+
}
|
|
6697
|
+
}
|
|
6698
|
+
if (checkByRegularExpression) {
|
|
6699
|
+
return this.isFilterCompliantForValue(value, filterValue);
|
|
6700
|
+
}
|
|
6701
|
+
return true;
|
|
6702
|
+
}
|
|
6703
|
+
static valuesArrayContainsValue(values, value) {
|
|
6704
|
+
return Filters.indexOfValueInValuesArray(values, value) >= 0;
|
|
6705
|
+
}
|
|
6706
|
+
static indexOfValueInValuesArray(values, value) {
|
|
6707
|
+
if (values == null || values.length < 1) {
|
|
6708
|
+
return -1;
|
|
6709
|
+
}
|
|
6710
|
+
for (let i = 0; i < values.length; i++) {
|
|
6711
|
+
if (values[i].value == value) {
|
|
6712
|
+
return i;
|
|
6713
|
+
}
|
|
6714
|
+
}
|
|
6715
|
+
return -1;
|
|
6716
|
+
}
|
|
6717
|
+
}
|
|
6718
|
+
|
|
6719
|
+
const dom$7 = document.documentElement;
|
|
6720
|
+
const kupObjects = dom$7.ketchup
|
|
6721
|
+
? dom$7.ketchup.objects
|
|
6722
|
+
: new KupObjects();
|
|
6723
|
+
/**
|
|
6724
|
+
* Finds all the cells matching the filters criteria in the input dataset.
|
|
6725
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
6726
|
+
* @param {KupDataFindCellFilters} filters - Filters of the research.
|
|
6727
|
+
* @returns {KupDataCell[]} Array of cells fetched after applying the filters.
|
|
6728
|
+
*/
|
|
6729
|
+
function findCell(dataset, filters) {
|
|
6730
|
+
return dom$7.ketchup.data.finder(dataset, filters).cells;
|
|
6731
|
+
}
|
|
6732
|
+
/**
|
|
6733
|
+
* Returns all the cells values of the specified column, sorted if required.
|
|
6734
|
+
* @param {Array<KupDataRow>} dataset - Input dataset.
|
|
6735
|
+
* @param {KupDataColumn} column - Column included in the search. When missing, returns empty array.
|
|
6736
|
+
* @returns {ValueDisplayedValue[]} Values of the cells, sorted.
|
|
6737
|
+
*/
|
|
6738
|
+
function getCellValue(dataset, column, sorted, univocal) {
|
|
6739
|
+
const rows = dataset.rows;
|
|
6740
|
+
const values = new Array();
|
|
6741
|
+
const result = new Array();
|
|
6742
|
+
if (!rows || rows.length == 0 || !column) {
|
|
6743
|
+
return result;
|
|
6744
|
+
}
|
|
6745
|
+
extractColumnValues(rows, column, values, univocal);
|
|
6746
|
+
if (sorted == true) {
|
|
6747
|
+
values.sort((n1, n2) => {
|
|
6748
|
+
return compareValues(null, kupObjects.isDate(n1.obj)
|
|
6749
|
+
? n1.value
|
|
6750
|
+
: getValueForDisplay2(n1, column), null, kupObjects.isDate(n2.obj)
|
|
6751
|
+
? n2.value
|
|
6752
|
+
: getValueForDisplay2(n2, column), exports.SortMode.A);
|
|
6753
|
+
});
|
|
6754
|
+
}
|
|
6755
|
+
for (let i = 0; i < values.length; i++) {
|
|
6756
|
+
let v = values[i];
|
|
6757
|
+
result.push({ value: v.value, displayedValue: v.displayedValue });
|
|
6758
|
+
}
|
|
6759
|
+
return result;
|
|
6760
|
+
}
|
|
6761
|
+
function extractColumnValues(rows, column, values, univocal) {
|
|
6762
|
+
/** il valore delle righe attualmente filtrate, formattato */
|
|
6763
|
+
rows.forEach((row) => addColumnValueFromRow(values, column, row.cells[column.name], univocal));
|
|
6764
|
+
return values;
|
|
6765
|
+
}
|
|
6766
|
+
function addColumnValueFromRow(values, column, cell, univocal) {
|
|
6767
|
+
if (cell) {
|
|
6768
|
+
let item = {
|
|
6769
|
+
value: cell.value,
|
|
6770
|
+
displayedValue: getCellValueForDisplay(column, cell),
|
|
6771
|
+
obj: cell.obj ? cell.obj : column.obj,
|
|
6772
|
+
};
|
|
6773
|
+
if (univocal != true ||
|
|
6774
|
+
!Filters.valuesArrayContainsValue(values, cell.value)) {
|
|
6775
|
+
values.push(item);
|
|
6776
|
+
}
|
|
6777
|
+
}
|
|
6778
|
+
}
|
|
6779
|
+
/**
|
|
6780
|
+
* Overrides the given cell attributes for the specified columns.
|
|
6781
|
+
* If no columns are provided, the value will be applied to every column of the dataset.
|
|
6782
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
6783
|
+
* @param {KupDataCell} cell - New cell.
|
|
6784
|
+
* @param {string[]} columns - Columns to be handled.
|
|
6785
|
+
* @returns {KupDataCell[]} Replaced cells.
|
|
6786
|
+
*/
|
|
6787
|
+
function replaceCell(dataset, cell, columns) {
|
|
6788
|
+
const replaced = [];
|
|
6789
|
+
for (let index = 0; index < dataset.rows.length; index++) {
|
|
6790
|
+
const row = dataset.rows[index];
|
|
6791
|
+
const cells = row.cells;
|
|
6792
|
+
for (const key in cells) {
|
|
6793
|
+
if (!columns || !columns.length || columns.includes(key)) {
|
|
6794
|
+
cells[key] = Object.assign({}, cell);
|
|
6795
|
+
replaced.push(cells[key]);
|
|
6796
|
+
}
|
|
6797
|
+
}
|
|
6798
|
+
}
|
|
6799
|
+
return replaced;
|
|
6800
|
+
}
|
|
6801
|
+
|
|
6802
|
+
const dom$6 = document.documentElement;
|
|
6803
|
+
/**
|
|
6804
|
+
* Finds the columns matching the criteria specified in the filters argument.
|
|
6805
|
+
* @param {KupDataDataset | Column[]} dataset - Input dataset or array of columns.
|
|
6806
|
+
* @param {Partial<Column>} filters - Column interface containing the filters to match.
|
|
6807
|
+
* @returns {Column[]} Columns matching the criteria.
|
|
6808
|
+
*/
|
|
6809
|
+
function findColumns(dataset, filters) {
|
|
6810
|
+
const columns = dataset.columns
|
|
6811
|
+
? dataset.columns
|
|
6812
|
+
: dataset;
|
|
6813
|
+
const result = [];
|
|
6814
|
+
for (let index = 0; index < columns.length; index++) {
|
|
6815
|
+
const column = columns[index];
|
|
6816
|
+
for (const key in filters) {
|
|
6817
|
+
const filter = filters[key];
|
|
6818
|
+
if (column[key] === filter) {
|
|
6819
|
+
result.push(column);
|
|
6820
|
+
}
|
|
5630
6821
|
else if (dom$6.ketchup.objects.deepEqual(column[key], filter)) {
|
|
5631
6822
|
result.push(column);
|
|
5632
6823
|
}
|
|
@@ -6094,154 +7285,6 @@ function _getNode(nodes, node, index) {
|
|
|
6094
7285
|
}
|
|
6095
7286
|
}
|
|
6096
7287
|
|
|
6097
|
-
/**
|
|
6098
|
-
* Props of the kup-data-table component.
|
|
6099
|
-
* Used to export every prop in an object.
|
|
6100
|
-
*/
|
|
6101
|
-
exports.KupDataTableProps = void 0;
|
|
6102
|
-
(function (KupDataTableProps) {
|
|
6103
|
-
KupDataTableProps["autoFillMissingCells"] = "When true and when a row is missing some columns, the missing cells will be autogenerated.";
|
|
6104
|
-
KupDataTableProps["customStyle"] = "Custom style of the component.";
|
|
6105
|
-
KupDataTableProps["data"] = "The data of the table.";
|
|
6106
|
-
KupDataTableProps["density"] = "The density of the rows, defaults at 'medium' and can be also set to 'large' or 'small'.";
|
|
6107
|
-
KupDataTableProps["dragEnabled"] = "Enables drag.";
|
|
6108
|
-
KupDataTableProps["dropEnabled"] = "Enables drop.";
|
|
6109
|
-
KupDataTableProps["editableData"] = "When set to true, editable cells will be rendered using input components.";
|
|
6110
|
-
KupDataTableProps["emptyDataLabel"] = "Defines the label to show when the table is empty.";
|
|
6111
|
-
KupDataTableProps["enableColumnsFormula"] = "Enables the choice to set formulas on columns by dragging them into different columns.";
|
|
6112
|
-
KupDataTableProps["enableMergeColumns"] = "Enables the merging of columns by dragging them into different columns.";
|
|
6113
|
-
KupDataTableProps["enableExtraColumns"] = "Enables adding extra columns.";
|
|
6114
|
-
KupDataTableProps["enableSortableColumns"] = "Enables the sorting of columns by dragging them into different columns.";
|
|
6115
|
-
KupDataTableProps["expandGroups"] = "Expands groups when set to true.";
|
|
6116
|
-
KupDataTableProps["filters"] = "List of filters set by the user.";
|
|
6117
|
-
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.";
|
|
6118
|
-
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.";
|
|
6119
|
-
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.";
|
|
6120
|
-
KupDataTableProps["globalFilter"] = "When set to true it activates the global filter.";
|
|
6121
|
-
KupDataTableProps["globalFilterValue"] = "The value of the global filter.";
|
|
6122
|
-
KupDataTableProps["groupLabelDisplay"] = "How the label of a group must be displayed. For available values";
|
|
6123
|
-
KupDataTableProps["groups"] = "The list of groups.";
|
|
6124
|
-
KupDataTableProps["headerIsPersistent"] = "When set to true the header will stick on top of the table when scrolling.";
|
|
6125
|
-
KupDataTableProps["isFocusable"] = "When set to true, clicked-on rows will have a visual feedback.";
|
|
6126
|
-
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.";
|
|
6127
|
-
KupDataTableProps["lineBreakCharacter"] = "Defines the placeholder character which will be replaced by a line break inside table header cells, normal or sticky.";
|
|
6128
|
-
KupDataTableProps["loadMoreLimit"] = "Sets a maximum limit of new records which can be required by the load more functionality.";
|
|
6129
|
-
KupDataTableProps["loadMoreMode"] = "Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.";
|
|
6130
|
-
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.";
|
|
6131
|
-
KupDataTableProps["multiSelection"] = "When set to true enables rows multi selection.";
|
|
6132
|
-
KupDataTableProps["pageSelected"] = "Current selected page set on component load";
|
|
6133
|
-
KupDataTableProps["paginatorPos"] = "Sets the position of the paginator. Available positions: top, bottom or both.";
|
|
6134
|
-
KupDataTableProps["removableColumns"] = "Sets the possibility to remove the selected column.";
|
|
6135
|
-
KupDataTableProps["resizableColumns"] = "Gives the possibility to resize columns by dragging on their right edge.";
|
|
6136
|
-
KupDataTableProps["rowActions"] = "Sets the actions of the rows.";
|
|
6137
|
-
KupDataTableProps["rowsPerPage"] = "Sets the number of rows per page to display.";
|
|
6138
|
-
KupDataTableProps["scrollOnHover"] = "Activates the scroll on hover function.";
|
|
6139
|
-
KupDataTableProps["showCustomization"] = "If set to true, displays the button to open the customization panel.";
|
|
6140
|
-
KupDataTableProps["showFilters"] = "When set to true enables the column filters.";
|
|
6141
|
-
KupDataTableProps["showFooter"] = "When set to true shows the footer.";
|
|
6142
|
-
KupDataTableProps["showGrid"] = "Can be used to customize the grid view of the table.";
|
|
6143
|
-
KupDataTableProps["showGroups"] = "When set to true enables the column grouping.";
|
|
6144
|
-
KupDataTableProps["showHeader"] = "Enables rendering of the table header.";
|
|
6145
|
-
KupDataTableProps["showLoadMore"] = "If set to true, displays the button to load more records.";
|
|
6146
|
-
KupDataTableProps["sort"] = "Defines the current sorting options.";
|
|
6147
|
-
KupDataTableProps["stateId"] = "";
|
|
6148
|
-
KupDataTableProps["store"] = "";
|
|
6149
|
-
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";
|
|
6150
|
-
KupDataTableProps["sortEnabled"] = "When set to true enables the sorting of the columns by clicking on the column header.";
|
|
6151
|
-
KupDataTableProps["tableHeight"] = "Sets the height of the table.";
|
|
6152
|
-
KupDataTableProps["tableWidth"] = "Sets the width of the table.";
|
|
6153
|
-
KupDataTableProps["totals"] = "Defines the current totals options.";
|
|
6154
|
-
KupDataTableProps["transpose"] = "Transposes the data of the data table.";
|
|
6155
|
-
})(exports.KupDataTableProps || (exports.KupDataTableProps = {}));
|
|
6156
|
-
exports.SortMode = void 0;
|
|
6157
|
-
(function (SortMode) {
|
|
6158
|
-
SortMode["A"] = "A";
|
|
6159
|
-
SortMode["D"] = "D";
|
|
6160
|
-
})(exports.SortMode || (exports.SortMode = {}));
|
|
6161
|
-
exports.TotalMode = void 0;
|
|
6162
|
-
(function (TotalMode) {
|
|
6163
|
-
TotalMode["COUNT"] = "Count";
|
|
6164
|
-
TotalMode["SUM"] = "Sum";
|
|
6165
|
-
TotalMode["MIN"] = "Min";
|
|
6166
|
-
TotalMode["MAX"] = "Max";
|
|
6167
|
-
TotalMode["DISTINCT"] = "Distinct";
|
|
6168
|
-
TotalMode["AVERAGE"] = "Average";
|
|
6169
|
-
TotalMode["MATH"] = "MATH";
|
|
6170
|
-
})(exports.TotalMode || (exports.TotalMode = {}));
|
|
6171
|
-
exports.TotalLabel = void 0;
|
|
6172
|
-
(function (TotalLabel) {
|
|
6173
|
-
TotalLabel["COUNT"] = "Count";
|
|
6174
|
-
TotalLabel["SUM"] = "Sum";
|
|
6175
|
-
TotalLabel["MIN"] = "Min";
|
|
6176
|
-
TotalLabel["MAX"] = "Max";
|
|
6177
|
-
TotalLabel["DISTINCT"] = "Distinct";
|
|
6178
|
-
TotalLabel["AVERAGE"] = "Average";
|
|
6179
|
-
TotalLabel["MATH"] = "Formula";
|
|
6180
|
-
TotalLabel["CANC"] = "Cancel";
|
|
6181
|
-
TotalLabel["CALC"] = "Calculate";
|
|
6182
|
-
})(exports.TotalLabel || (exports.TotalLabel = {}));
|
|
6183
|
-
exports.PaginatorPos = void 0;
|
|
6184
|
-
(function (PaginatorPos) {
|
|
6185
|
-
PaginatorPos["TOP"] = "Top";
|
|
6186
|
-
PaginatorPos["BOTTOM"] = "Bottom";
|
|
6187
|
-
PaginatorPos["BOTH"] = "Both";
|
|
6188
|
-
})(exports.PaginatorPos || (exports.PaginatorPos = {}));
|
|
6189
|
-
exports.ShowGrid = void 0;
|
|
6190
|
-
(function (ShowGrid) {
|
|
6191
|
-
ShowGrid["NONE"] = "None";
|
|
6192
|
-
ShowGrid["ROW"] = "Row";
|
|
6193
|
-
ShowGrid["COL"] = "Col";
|
|
6194
|
-
ShowGrid["COMPLETE"] = "Complete";
|
|
6195
|
-
})(exports.ShowGrid || (exports.ShowGrid = {}));
|
|
6196
|
-
// export enum RowActionType {
|
|
6197
|
-
// DEFAULT = 'Default',
|
|
6198
|
-
// VARIABLE = 'Variable',
|
|
6199
|
-
// }
|
|
6200
|
-
//---- *NEXT functionality AKA load more ----
|
|
6201
|
-
exports.LoadMoreMode = void 0;
|
|
6202
|
-
(function (LoadMoreMode) {
|
|
6203
|
-
LoadMoreMode["CONSTANT"] = "constant";
|
|
6204
|
-
LoadMoreMode["CONSTANT_INCREMENT"] = "constant_increment";
|
|
6205
|
-
LoadMoreMode["PROGRESSIVE_THRESHOLD"] = "progressive_threshold";
|
|
6206
|
-
})(exports.LoadMoreMode || (exports.LoadMoreMode = {}));
|
|
6207
|
-
//---- Group label display functionality ----
|
|
6208
|
-
/**
|
|
6209
|
-
* The possible values the display property can have.
|
|
6210
|
-
* @enum
|
|
6211
|
-
* @property {string} BOTH - Shows both the column label and the value. This is the default.
|
|
6212
|
-
* @property {string} LABEL - Shows only the columns label.
|
|
6213
|
-
* @property {string} VALUE - Shows only the value.
|
|
6214
|
-
* @readonly
|
|
6215
|
-
*/
|
|
6216
|
-
exports.GroupLabelDisplayMode = void 0;
|
|
6217
|
-
(function (GroupLabelDisplayMode) {
|
|
6218
|
-
GroupLabelDisplayMode["BOTH"] = "Both";
|
|
6219
|
-
GroupLabelDisplayMode["LABEL"] = "Label";
|
|
6220
|
-
GroupLabelDisplayMode["VALUE"] = "Value";
|
|
6221
|
-
})(exports.GroupLabelDisplayMode || (exports.GroupLabelDisplayMode = {}));
|
|
6222
|
-
//---- Fixed rows and cells classes ----
|
|
6223
|
-
const FixedCellsClasses = {
|
|
6224
|
-
columns: 'fixed-column',
|
|
6225
|
-
rows: 'fixed-row',
|
|
6226
|
-
};
|
|
6227
|
-
const FixedCellsCSSVarsBase = {
|
|
6228
|
-
columns: '--ddt_column-left-',
|
|
6229
|
-
rows: '--ddt_row-top-',
|
|
6230
|
-
};
|
|
6231
|
-
/**
|
|
6232
|
-
* Constants for mocked/premade columns created by data mutations.
|
|
6233
|
-
*/
|
|
6234
|
-
const fieldColumn = 'Field';
|
|
6235
|
-
const iconColumn = 'Icon';
|
|
6236
|
-
const keyColumn = 'Key';
|
|
6237
|
-
exports.SelectionMode = void 0;
|
|
6238
|
-
(function (SelectionMode) {
|
|
6239
|
-
SelectionMode["SINGLE"] = "single";
|
|
6240
|
-
SelectionMode["MULTIPLE_CHECKBOX"] = "multiple-checkbox";
|
|
6241
|
-
SelectionMode["MULTIPLE"] = "multiple";
|
|
6242
|
-
SelectionMode["NONE"] = "none";
|
|
6243
|
-
})(exports.SelectionMode || (exports.SelectionMode = {}));
|
|
6244
|
-
|
|
6245
7288
|
const autoCenterComps = [exports.KupTagNames.DATA_TABLE, exports.KupTagNames.TREE];
|
|
6246
7289
|
const fullWidthFieldsComps = [exports.KupTagNames.DATA_TABLE, exports.KupTagNames.TREE];
|
|
6247
7290
|
/**
|
|
@@ -6402,8 +7445,11 @@ class KupData {
|
|
|
6402
7445
|
find(dataset, filters) {
|
|
6403
7446
|
return findCell(dataset, filters);
|
|
6404
7447
|
},
|
|
6405
|
-
getValue(dataset,
|
|
6406
|
-
return getCellValue(dataset,
|
|
7448
|
+
getValue(dataset, column, sorted) {
|
|
7449
|
+
return getCellValue(dataset, column, sorted, false);
|
|
7450
|
+
},
|
|
7451
|
+
getUnivocalValue(dataset, column, sorted) {
|
|
7452
|
+
return getCellValue(dataset, column, sorted, true);
|
|
6407
7453
|
},
|
|
6408
7454
|
replace(dataset, cell, columns) {
|
|
6409
7455
|
return replaceCell(dataset, cell, columns);
|
|
@@ -6758,23 +7804,18 @@ class KupData {
|
|
|
6758
7804
|
columns: JSON.parse(JSON.stringify(dataset.columns)),
|
|
6759
7805
|
rows: [],
|
|
6760
7806
|
};
|
|
6761
|
-
const length = dataset.rows.length;
|
|
6762
7807
|
// sort all columns values by descending
|
|
6763
|
-
let values = getCellValue(dataset, [
|
|
6764
|
-
values.sort(function (a, b) {
|
|
6765
|
-
return Number(a) - Number(b);
|
|
6766
|
-
});
|
|
7808
|
+
let values = getCellValue(dataset, this.column.find(dataset, { name: headerColumn })[0], true, true);
|
|
6767
7809
|
values.reverse();
|
|
6768
|
-
|
|
6769
|
-
values = [...new Set(values)];
|
|
7810
|
+
const length = dataset.rows.length;
|
|
6770
7811
|
// calculating middle index
|
|
6771
7812
|
const idx = Math.floor(length / 2);
|
|
6772
7813
|
let lastIdx = idx - 1;
|
|
6773
7814
|
let leftIdx = idx - 1;
|
|
6774
7815
|
let rightIdx = idx + 1;
|
|
6775
7816
|
// sort the rows like a "mountain", the greatest is in the middle and the other ones are splitted left and right
|
|
6776
|
-
for (let i = 0; i < length; i++) {
|
|
6777
|
-
const value = values[i];
|
|
7817
|
+
for (let i = 0; i < values.length; i++) {
|
|
7818
|
+
const value = values[i].value;
|
|
6778
7819
|
// looping the rows because we have many rows with same value.
|
|
6779
7820
|
this.finder(dataset, {
|
|
6780
7821
|
columns: [headerColumn],
|
|
@@ -6917,39 +7958,6 @@ createCommonjsModule(function (module, exports) {
|
|
|
6917
7958
|
!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}));
|
|
6918
7959
|
});
|
|
6919
7960
|
|
|
6920
|
-
/**
|
|
6921
|
-
* Normalization types.
|
|
6922
|
-
*/
|
|
6923
|
-
exports.KupDatesNormalize = void 0;
|
|
6924
|
-
(function (KupDatesNormalize) {
|
|
6925
|
-
KupDatesNormalize["DATE"] = "date";
|
|
6926
|
-
KupDatesNormalize["TIME"] = "time";
|
|
6927
|
-
KupDatesNormalize["TIMESTAMP"] = "timestamp";
|
|
6928
|
-
})(exports.KupDatesNormalize || (exports.KupDatesNormalize = {}));
|
|
6929
|
-
/**
|
|
6930
|
-
* Common use formats
|
|
6931
|
-
*/
|
|
6932
|
-
exports.KupDatesFormats = void 0;
|
|
6933
|
-
(function (KupDatesFormats) {
|
|
6934
|
-
KupDatesFormats["ISO_DATE"] = "YYYY-MM-DD";
|
|
6935
|
-
KupDatesFormats["ISO_DATE_TIME"] = "YYYY-MM-DD HH:mm:ss";
|
|
6936
|
-
KupDatesFormats["ISO_TIME"] = "HH:mm:ss";
|
|
6937
|
-
KupDatesFormats["ISO_TIME_WITHOUT_SECONDS"] = "HH:mm";
|
|
6938
|
-
})(exports.KupDatesFormats || (exports.KupDatesFormats = {}));
|
|
6939
|
-
/**
|
|
6940
|
-
* Supported locales.
|
|
6941
|
-
*/
|
|
6942
|
-
exports.KupDatesLocales = void 0;
|
|
6943
|
-
(function (KupDatesLocales) {
|
|
6944
|
-
KupDatesLocales["CHINESE"] = "cn";
|
|
6945
|
-
KupDatesLocales["ENGLISH"] = "en";
|
|
6946
|
-
KupDatesLocales["FRENCH"] = "fr";
|
|
6947
|
-
KupDatesLocales["ITALIAN"] = "it";
|
|
6948
|
-
KupDatesLocales["POLISH"] = "pl";
|
|
6949
|
-
KupDatesLocales["RUSSIAN"] = "ru";
|
|
6950
|
-
KupDatesLocales["SPANISH"] = "es";
|
|
6951
|
-
})(exports.KupDatesLocales || (exports.KupDatesLocales = {}));
|
|
6952
|
-
|
|
6953
7961
|
/**
|
|
6954
7962
|
* Handles operations and formatting of dates.
|
|
6955
7963
|
* @module KupDates
|
|
@@ -6986,6 +7994,20 @@ class KupDates {
|
|
|
6986
7994
|
this.locale = navLangs[0]
|
|
6987
7995
|
.split('-')[0]
|
|
6988
7996
|
.toLowerCase();
|
|
7997
|
+
let found = false;
|
|
7998
|
+
for (const key in exports.KupDatesLocales) {
|
|
7999
|
+
if (Object.prototype.hasOwnProperty.call(exports.KupDatesLocales, key)) {
|
|
8000
|
+
const localeItem = exports.KupDatesLocales[key];
|
|
8001
|
+
if (localeItem == this.locale) {
|
|
8002
|
+
found = true;
|
|
8003
|
+
break;
|
|
8004
|
+
}
|
|
8005
|
+
}
|
|
8006
|
+
}
|
|
8007
|
+
if (!found) {
|
|
8008
|
+
console.log('set forced locale: en');
|
|
8009
|
+
this.locale = exports.KupDatesLocales.ENGLISH;
|
|
8010
|
+
}
|
|
6989
8011
|
}
|
|
6990
8012
|
dayjs_min.locale(this.locale);
|
|
6991
8013
|
this.managedComponents.forEach(function (comp) {
|
|
@@ -17081,17 +18103,34 @@ function kupManagerInstance() {
|
|
|
17081
18103
|
return dom.ketchup;
|
|
17082
18104
|
}
|
|
17083
18105
|
|
|
18106
|
+
exports.Filters = Filters;
|
|
17084
18107
|
exports.FixedCellsCSSVarsBase = FixedCellsCSSVarsBase;
|
|
17085
18108
|
exports.FixedCellsClasses = FixedCellsClasses;
|
|
18109
|
+
exports.KupData = KupData;
|
|
17086
18110
|
exports.KupDates = KupDates;
|
|
17087
18111
|
exports.KupObjects = KupObjects;
|
|
18112
|
+
exports.addColumnValueFromRow = addColumnValueFromRow;
|
|
17088
18113
|
exports.autoCenterComps = autoCenterComps;
|
|
18114
|
+
exports.compareCell = compareCell;
|
|
17089
18115
|
exports.createCommonjsModule = createCommonjsModule;
|
|
17090
18116
|
exports.editableTypes = editableTypes;
|
|
17091
18117
|
exports.fieldColumn = fieldColumn;
|
|
18118
|
+
exports.formatTime = formatTime;
|
|
18119
|
+
exports.formatToNumber = formatToNumber;
|
|
18120
|
+
exports.formattedStringToCustomUnformattedStringTime = formattedStringToCustomUnformattedStringTime;
|
|
17092
18121
|
exports.fullWidthFieldsComps = fullWidthFieldsComps;
|
|
18122
|
+
exports.getCellValueForDisplay = getCellValueForDisplay;
|
|
18123
|
+
exports.getColumnByName = getColumnByName;
|
|
18124
|
+
exports.getDecimalSeparator = getDecimalSeparator;
|
|
17093
18125
|
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
18126
|
+
exports.getMonthsAsStringByLocale = getMonthsAsStringByLocale;
|
|
18127
|
+
exports.getProps = getProps;
|
|
18128
|
+
exports.getValueForDisplay = getValueForDisplay;
|
|
18129
|
+
exports.getValueForDisplay2 = getValueForDisplay2;
|
|
17094
18130
|
exports.iconColumn = iconColumn;
|
|
18131
|
+
exports.identify = identify;
|
|
18132
|
+
exports.isNumber = isNumber;
|
|
18133
|
+
exports.isValidFormattedStringTime = isValidFormattedStringTime;
|
|
17095
18134
|
exports.keyColumn = keyColumn;
|
|
17096
18135
|
exports.kupDragActiveAttr = kupDragActiveAttr;
|
|
17097
18136
|
exports.kupDraggableCellAttr = kupDraggableCellAttr;
|
|
@@ -17101,3 +18140,8 @@ exports.kupDropEvent = kupDropEvent;
|
|
|
17101
18140
|
exports.kupDynamicPositionAttribute = kupDynamicPositionAttribute;
|
|
17102
18141
|
exports.kupManagerInstance = kupManagerInstance;
|
|
17103
18142
|
exports.kupTypes = kupTypes;
|
|
18143
|
+
exports.numberToFormattedStringNumber = numberToFormattedStringNumber;
|
|
18144
|
+
exports.setProps = setProps;
|
|
18145
|
+
exports.stringToNumber = stringToNumber;
|
|
18146
|
+
exports.unformattedStringToFormattedStringNumber = unformattedStringToFormattedStringNumber;
|
|
18147
|
+
exports.unformattedStringToFormattedStringTime = unformattedStringToFormattedStringTime;
|