@sme.up/ketchup 8.0.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-button-49b2c37c.js → f-button-c0ede055.js} +2 -2
- package/dist/cjs/{f-cell-9a6bc55c.js → f-cell-1c17dbac.js} +17 -10
- package/dist/cjs/{f-checkbox-593f72c3.js → f-checkbox-1148e791.js} +1 -1
- package/dist/cjs/{f-chip-dee84122.js → f-chip-bace36bb.js} +3 -3
- package/dist/cjs/{f-image-27f965ff.js → f-image-22174590.js} +2 -2
- package/dist/cjs/{f-paginator-utils-4a30189d.js → f-paginator-utils-e21e1f06.js} +3 -3
- package/dist/cjs/{f-text-field-04a663b4.js → f-text-field-503f2bb0.js} +83 -9
- package/dist/cjs/{index-74433248.js → index-1f177abc.js} +0 -3
- package/dist/cjs/ketchup.cjs.js +2 -2
- package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +778 -740
- package/dist/cjs/kup-box.cjs.entry.js +10 -10
- package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
- package/dist/cjs/kup-cell.cjs.entry.js +7 -7
- package/dist/cjs/kup-dash-list.cjs.entry.js +3 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +2 -2
- package/dist/cjs/kup-dashboard.cjs.entry.js +6 -6
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +2 -2
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
- package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
- package/dist/cjs/{kup-manager-2ff5d258.js → kup-manager-b994cf71.js} +88 -16
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +3 -3
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +12 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/data-table.js +44 -0
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +1 -3
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +27 -0
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +109 -10
- package/dist/collection/f-components/f-cell/f-cell.js +12 -5
- package/dist/collection/f-components/f-text-field/f-text-field.js +80 -6
- package/dist/collection/managers/kup-math/kup-math.js +85 -4
- package/dist/collection/utils/utils.js +1 -10
- package/dist/components/kup-autocomplete2.js +543 -349
- package/dist/components/kup-dash-list.js +2 -3
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +1 -1
- package/dist/components/kup-family-tree.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-planner.js +1 -1
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +8 -0
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/esm/{f-button-744cf1f6.js → f-button-c377973d.js} +2 -2
- package/dist/esm/{f-cell-b319c869.js → f-cell-e5a98bc8.js} +17 -10
- package/dist/esm/{f-checkbox-ec85b437.js → f-checkbox-9b3f5f5b.js} +1 -1
- package/dist/esm/{f-chip-7e3e4180.js → f-chip-c8a18c48.js} +3 -3
- package/dist/esm/{f-image-098c26ce.js → f-image-5cbdf39d.js} +2 -2
- package/dist/esm/{f-paginator-utils-674cb2ae.js → f-paginator-utils-a1dab059.js} +3 -3
- package/dist/esm/{f-text-field-c38ef113.js → f-text-field-dafb7c8b.js} +83 -9
- package/dist/esm/{index-b326ffc9.js → index-8bd38435.js} +1 -3
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +3 -3
- package/dist/esm/kup-autocomplete_27.entry.js +778 -740
- package/dist/esm/kup-box.entry.js +10 -10
- package/dist/esm/kup-calendar.entry.js +5 -5
- package/dist/esm/kup-cell.entry.js +7 -7
- package/dist/esm/kup-dash-list.entry.js +3 -4
- package/dist/esm/kup-dash_2.entry.js +2 -2
- package/dist/esm/kup-dashboard.entry.js +6 -6
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +2 -2
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-lazy.entry.js +2 -2
- package/dist/esm/kup-magic-box.entry.js +3 -3
- package/dist/esm/{kup-manager-b41eb2a8.js → kup-manager-3594cde8.js} +88 -16
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +2 -2
- package/dist/esm/kup-planner.entry.js +3 -3
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +12 -4
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-3efe7f43.entry.js → p-017418e7.entry.js} +1 -1
- package/dist/ketchup/{p-395e1960.entry.js → p-22e72f06.entry.js} +1 -1
- package/dist/ketchup/{p-77e3d537.js → p-2d32e3cd.js} +1 -1
- package/dist/ketchup/{p-5ce2b4fc.entry.js → p-31abf4b6.entry.js} +1 -1
- package/dist/ketchup/{p-b244f5ca.entry.js → p-37ada0f0.entry.js} +1 -1
- package/dist/ketchup/{p-a877a87b.entry.js → p-38f16697.entry.js} +2 -2
- package/dist/ketchup/{p-9700eb32.js → p-4638fbff.js} +1 -1
- package/dist/ketchup/{p-af82131e.entry.js → p-473d2bea.entry.js} +1 -1
- package/dist/ketchup/{p-da891093.entry.js → p-4c56e199.entry.js} +1 -1
- package/dist/ketchup/{p-a9b7533b.entry.js → p-5205286a.entry.js} +1 -1
- package/dist/ketchup/p-61319cfa.js +1 -0
- package/dist/ketchup/{p-ef614656.js → p-6762d447.js} +1 -1
- package/dist/ketchup/p-6c726886.entry.js +1 -0
- package/dist/ketchup/{p-0b91f5f8.entry.js → p-7be5ef32.entry.js} +1 -1
- package/dist/ketchup/{p-3b41aca7.entry.js → p-7f4f5f0f.entry.js} +1 -1
- package/dist/ketchup/{p-b032f47d.entry.js → p-80815edf.entry.js} +1 -1
- package/dist/ketchup/p-8b248655.js +1 -0
- package/dist/ketchup/{p-d4ece435.js → p-9dcfbb1e.js} +2 -2
- package/dist/ketchup/{p-c26975bf.js → p-9f9b6656.js} +1 -1
- package/dist/ketchup/{p-4325d965.entry.js → p-9fc6a9a8.entry.js} +1 -1
- package/dist/ketchup/{p-940a5feb.js → p-acaa171f.js} +3 -3
- package/dist/ketchup/{p-4ae2ca6f.entry.js → p-afff7a6e.entry.js} +1 -1
- package/dist/ketchup/{p-bd42562d.entry.js → p-b718af72.entry.js} +1 -1
- package/dist/ketchup/p-bf4a881b.js +1 -0
- package/dist/ketchup/{p-d739710a.entry.js → p-ce5b6ce7.entry.js} +1 -1
- package/dist/ketchup/p-cf322853.entry.js +1 -0
- package/dist/ketchup/{p-bb17c1ba.entry.js → p-d1164680.entry.js} +1 -1
- package/dist/ketchup/p-d4eb9a76.entry.js +1 -0
- package/dist/ketchup/p-d76be079.entry.js +1 -0
- package/dist/ketchup/{p-e02b5141.entry.js → p-ed7e118e.entry.js} +1 -1
- package/dist/ketchup/{p-a7e19620.entry.js → p-ef0b4f19.entry.js} +1 -1
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +5 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +20 -2
- package/dist/types/components.d.ts +34 -0
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +3 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +26 -2
- package/dist/types/utils/utils.d.ts +0 -1
- package/package.json +1 -1
- package/dist/ketchup/p-0b0b61cb.entry.js +0 -1
- package/dist/ketchup/p-5d398e42.js +0 -1
- package/dist/ketchup/p-c8b7790a.entry.js +0 -1
- package/dist/ketchup/p-c968e93d.entry.js +0 -1
- package/dist/ketchup/p-d98fdb9b.js +0 -1
- package/dist/ketchup/p-df316daf.entry.js +0 -1
- package/dist/ketchup/p-e714f4dc.js +0 -1
|
@@ -1434,13 +1434,13 @@ var __classPrivateFieldSet$8 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
1434
1434
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
1435
1435
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
1436
1436
|
};
|
|
1437
|
-
var __classPrivateFieldGet$
|
|
1437
|
+
var __classPrivateFieldGet$b = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
1438
1438
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
1439
1439
|
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");
|
|
1440
1440
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
1441
1441
|
};
|
|
1442
1442
|
var _KupDebug_debugWidget;
|
|
1443
|
-
const dom$
|
|
1443
|
+
const dom$y = document.documentElement;
|
|
1444
1444
|
/**
|
|
1445
1445
|
* Debugging suite, used to log messages and statuses from the Ketchup components.
|
|
1446
1446
|
* @module KupDebug
|
|
@@ -1463,7 +1463,7 @@ class KupDebug {
|
|
|
1463
1463
|
this.logs = [];
|
|
1464
1464
|
__classPrivateFieldSet$8(this, _KupDebug_debugWidget, null, "f");
|
|
1465
1465
|
document.addEventListener('kup-language-change', () => {
|
|
1466
|
-
if (this.active && __classPrivateFieldGet$
|
|
1466
|
+
if (this.active && __classPrivateFieldGet$b(this, _KupDebug_debugWidget, "f")) {
|
|
1467
1467
|
this.hideWidget();
|
|
1468
1468
|
this.showWidget();
|
|
1469
1469
|
}
|
|
@@ -1487,32 +1487,32 @@ class KupDebug {
|
|
|
1487
1487
|
*/
|
|
1488
1488
|
showWidget() {
|
|
1489
1489
|
const debugWidget = document.createElement('kup-card');
|
|
1490
|
-
const languages = dom$
|
|
1490
|
+
const languages = dom$y.ketchup.language.getLanguages();
|
|
1491
1491
|
const languagesListData = [];
|
|
1492
1492
|
for (let index = 0; index < languages.length; index++) {
|
|
1493
1493
|
languagesListData.push({
|
|
1494
1494
|
id: languages[index],
|
|
1495
|
-
selected: languages[index] === dom$
|
|
1495
|
+
selected: languages[index] === dom$y.ketchup.language.name
|
|
1496
1496
|
? true
|
|
1497
1497
|
: false,
|
|
1498
1498
|
value: languages[index],
|
|
1499
1499
|
});
|
|
1500
1500
|
}
|
|
1501
|
-
const themes = dom$
|
|
1501
|
+
const themes = dom$y.ketchup.theme.getThemes();
|
|
1502
1502
|
const themesListData = [];
|
|
1503
1503
|
for (let index = 0; index < themes.length; index++) {
|
|
1504
1504
|
themesListData.push({
|
|
1505
1505
|
id: themes[index],
|
|
1506
|
-
selected: themes[index] === dom$
|
|
1506
|
+
selected: themes[index] === dom$y.ketchup.theme.name ? true : false,
|
|
1507
1507
|
value: themes[index],
|
|
1508
1508
|
});
|
|
1509
1509
|
}
|
|
1510
|
-
const locales = dom$
|
|
1510
|
+
const locales = dom$y.ketchup.dates.getLocales();
|
|
1511
1511
|
const localesListData = [];
|
|
1512
1512
|
for (let index = 0; index < locales.length; index++) {
|
|
1513
1513
|
localesListData.push({
|
|
1514
1514
|
id: locales[index],
|
|
1515
|
-
selected: locales[index] === dom$
|
|
1515
|
+
selected: locales[index] === dom$y.ketchup.dates.locale ? true : false,
|
|
1516
1516
|
value: locales[index],
|
|
1517
1517
|
});
|
|
1518
1518
|
}
|
|
@@ -1522,13 +1522,13 @@ class KupDebug {
|
|
|
1522
1522
|
icon: 'power_settings_new',
|
|
1523
1523
|
id: 'kup-debug-off',
|
|
1524
1524
|
customStyle: ':host {--kup-font-size: 0.875em; border-left: 1px solid var(--kup-border-color); border-right: 1px solid var(--kup-border-color);}',
|
|
1525
|
-
title: dom$
|
|
1525
|
+
title: dom$y.ketchup.language.translate(KupLanguageDebug.OFF),
|
|
1526
1526
|
},
|
|
1527
1527
|
{
|
|
1528
1528
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
1529
1529
|
icon: 'print',
|
|
1530
1530
|
id: 'kup-debug-print',
|
|
1531
|
-
title: dom$
|
|
1531
|
+
title: dom$y.ketchup.language.translate(KupLanguageDebug.PRINT),
|
|
1532
1532
|
},
|
|
1533
1533
|
{
|
|
1534
1534
|
checked: this.autoPrint,
|
|
@@ -1536,20 +1536,20 @@ class KupDebug {
|
|
|
1536
1536
|
icon: 'speaker_notes',
|
|
1537
1537
|
iconOff: 'speaker_notes_off',
|
|
1538
1538
|
id: 'kup-debug-autoprint',
|
|
1539
|
-
title: dom$
|
|
1539
|
+
title: dom$y.ketchup.language.translate(KupLanguageDebug.AUTOPRINT),
|
|
1540
1540
|
toggable: true,
|
|
1541
1541
|
},
|
|
1542
1542
|
{
|
|
1543
1543
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
1544
1544
|
icon: 'broom',
|
|
1545
1545
|
id: 'kup-debug-clear',
|
|
1546
|
-
title: dom$
|
|
1546
|
+
title: dom$y.ketchup.language.translate(KupLanguageDebug.CLEAR),
|
|
1547
1547
|
},
|
|
1548
1548
|
{
|
|
1549
1549
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
1550
1550
|
icon: 'delete',
|
|
1551
1551
|
id: 'kup-debug-delete',
|
|
1552
|
-
title: dom$
|
|
1552
|
+
title: dom$y.ketchup.language.translate(KupLanguageDebug.DUMP),
|
|
1553
1553
|
},
|
|
1554
1554
|
{
|
|
1555
1555
|
className: 'kup-full-height',
|
|
@@ -1558,22 +1558,22 @@ class KupDebug {
|
|
|
1558
1558
|
id: 'kup-debug-dl-props',
|
|
1559
1559
|
label: 'Props',
|
|
1560
1560
|
styling: 'flat',
|
|
1561
|
-
title: dom$
|
|
1561
|
+
title: dom$y.ketchup.language.translate(KupLanguageDebug.DL_PROPS),
|
|
1562
1562
|
},
|
|
1563
1563
|
{
|
|
1564
1564
|
className: 'kup-full-height',
|
|
1565
1565
|
customStyle: ':host {border-right: 1px solid var(--kup-border-color);}',
|
|
1566
1566
|
icon: 'download',
|
|
1567
1567
|
id: 'kup-debug-dl-all',
|
|
1568
|
-
label: dom$
|
|
1568
|
+
label: dom$y.ketchup.language.translate(KupLanguageDebug.DL_ALL),
|
|
1569
1569
|
styling: 'flat',
|
|
1570
|
-
title: dom$
|
|
1570
|
+
title: dom$y.ketchup.language.translate(KupLanguageDebug.DL_ALL),
|
|
1571
1571
|
},
|
|
1572
1572
|
{
|
|
1573
1573
|
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
1574
1574
|
icon: 'auto-fix',
|
|
1575
1575
|
id: 'kup-debug-magic-box',
|
|
1576
|
-
title: dom$
|
|
1576
|
+
title: dom$y.ketchup.language.translate(KupLanguageDebug.MAGIC_BOX),
|
|
1577
1577
|
},
|
|
1578
1578
|
],
|
|
1579
1579
|
combobox: [
|
|
@@ -1588,11 +1588,11 @@ class KupDebug {
|
|
|
1588
1588
|
className: 'kup-full-height',
|
|
1589
1589
|
emitSubmitEventOnEnter: false,
|
|
1590
1590
|
inputType: 'text',
|
|
1591
|
-
label: dom$
|
|
1591
|
+
label: dom$y.ketchup.language.translate(KupLanguageDebug.THEME_CHANGER),
|
|
1592
1592
|
},
|
|
1593
1593
|
},
|
|
1594
1594
|
id: 'kup-debug-theme-changer',
|
|
1595
|
-
initialValue: dom$
|
|
1595
|
+
initialValue: dom$y.ketchup.theme.name,
|
|
1596
1596
|
isSelect: true,
|
|
1597
1597
|
},
|
|
1598
1598
|
{
|
|
@@ -1606,11 +1606,11 @@ class KupDebug {
|
|
|
1606
1606
|
className: 'kup-full-height',
|
|
1607
1607
|
emitSubmitEventOnEnter: false,
|
|
1608
1608
|
inputType: 'text',
|
|
1609
|
-
label: dom$
|
|
1609
|
+
label: dom$y.ketchup.language.translate(KupLanguageDebug.LANGUAGE_CHANGER),
|
|
1610
1610
|
},
|
|
1611
1611
|
},
|
|
1612
1612
|
id: 'kup-debug-language-changer',
|
|
1613
|
-
initialValue: dom$
|
|
1613
|
+
initialValue: dom$y.ketchup.language.name,
|
|
1614
1614
|
isSelect: true,
|
|
1615
1615
|
},
|
|
1616
1616
|
{
|
|
@@ -1624,11 +1624,11 @@ class KupDebug {
|
|
|
1624
1624
|
className: 'kup-full-height',
|
|
1625
1625
|
emitSubmitEventOnEnter: false,
|
|
1626
1626
|
inputType: 'text',
|
|
1627
|
-
label: dom$
|
|
1627
|
+
label: dom$y.ketchup.language.translate(KupLanguageDebug.LOCALE_CHANGER),
|
|
1628
1628
|
},
|
|
1629
1629
|
},
|
|
1630
1630
|
id: 'kup-debug-locale-changer',
|
|
1631
|
-
initialValue: dom$
|
|
1631
|
+
initialValue: dom$y.ketchup.dates.locale,
|
|
1632
1632
|
isSelect: true,
|
|
1633
1633
|
},
|
|
1634
1634
|
],
|
|
@@ -1636,7 +1636,7 @@ class KupDebug {
|
|
|
1636
1636
|
{
|
|
1637
1637
|
className: 'kup-full-height',
|
|
1638
1638
|
id: 'kup-debug-log-limit',
|
|
1639
|
-
label: dom$
|
|
1639
|
+
label: dom$y.ketchup.language.translate(KupLanguageDebug.LOG_LIMIT),
|
|
1640
1640
|
initialValue: this.logLimit,
|
|
1641
1641
|
emitSubmitEventOnEnter: false,
|
|
1642
1642
|
inputType: 'number',
|
|
@@ -1671,7 +1671,7 @@ class KupDebug {
|
|
|
1671
1671
|
break;
|
|
1672
1672
|
case 'kup-debug-clear':
|
|
1673
1673
|
kupDebug.widgetClear();
|
|
1674
|
-
__classPrivateFieldGet$
|
|
1674
|
+
__classPrivateFieldGet$b(kupDebug, _KupDebug_debugWidget, "f").refresh();
|
|
1675
1675
|
break;
|
|
1676
1676
|
case 'kup-debug-dl-props':
|
|
1677
1677
|
kupDebug.getProps().then((res) => {
|
|
@@ -1687,7 +1687,7 @@ class KupDebug {
|
|
|
1687
1687
|
kupDebug.dump();
|
|
1688
1688
|
break;
|
|
1689
1689
|
case 'kup-debug-magic-box':
|
|
1690
|
-
dom$
|
|
1690
|
+
dom$y.ketchup.toggleMagicBox();
|
|
1691
1691
|
break;
|
|
1692
1692
|
case 'kup-debug-off':
|
|
1693
1693
|
kupDebug.toggle();
|
|
@@ -1695,21 +1695,21 @@ class KupDebug {
|
|
|
1695
1695
|
case 'kup-debug-print':
|
|
1696
1696
|
kupDebug.widgetClear();
|
|
1697
1697
|
kupDebug.widgetPrint();
|
|
1698
|
-
__classPrivateFieldGet$
|
|
1698
|
+
__classPrivateFieldGet$b(kupDebug, _KupDebug_debugWidget, "f").refresh();
|
|
1699
1699
|
break;
|
|
1700
1700
|
}
|
|
1701
1701
|
break;
|
|
1702
1702
|
case 'kup-combobox-itemclick':
|
|
1703
1703
|
switch (compID) {
|
|
1704
1704
|
case 'kup-debug-language-changer':
|
|
1705
|
-
dom$
|
|
1705
|
+
dom$y.ketchup.language.set(compEvent.detail.value);
|
|
1706
1706
|
break;
|
|
1707
1707
|
case 'kup-debug-locale-changer':
|
|
1708
|
-
dom$
|
|
1709
|
-
dom$
|
|
1708
|
+
dom$y.ketchup.dates.setLocale(compEvent.detail.value);
|
|
1709
|
+
dom$y.ketchup.math.setLocale(compEvent.detail.value);
|
|
1710
1710
|
break;
|
|
1711
1711
|
case 'kup-debug-theme-changer':
|
|
1712
|
-
dom$
|
|
1712
|
+
dom$y.ketchup.theme.set(compEvent.detail.value);
|
|
1713
1713
|
break;
|
|
1714
1714
|
}
|
|
1715
1715
|
case 'kup-textfield-input':
|
|
@@ -1730,14 +1730,14 @@ class KupDebug {
|
|
|
1730
1730
|
* Closes the debug widget.
|
|
1731
1731
|
*/
|
|
1732
1732
|
hideWidget() {
|
|
1733
|
-
__classPrivateFieldGet$
|
|
1733
|
+
__classPrivateFieldGet$b(this, _KupDebug_debugWidget, "f").remove();
|
|
1734
1734
|
__classPrivateFieldSet$8(this, _KupDebug_debugWidget, null, "f");
|
|
1735
1735
|
}
|
|
1736
1736
|
/**
|
|
1737
1737
|
* Clears all the printed logs inside the debug widget.
|
|
1738
1738
|
*/
|
|
1739
1739
|
widgetClear() {
|
|
1740
|
-
const children = Array.prototype.slice.call(__classPrivateFieldGet$
|
|
1740
|
+
const children = Array.prototype.slice.call(__classPrivateFieldGet$b(this, _KupDebug_debugWidget, "f").children, 0);
|
|
1741
1741
|
for (let index = 0; index < children.length; index++) {
|
|
1742
1742
|
children[index].remove();
|
|
1743
1743
|
}
|
|
@@ -1771,7 +1771,7 @@ class KupDebug {
|
|
|
1771
1771
|
// If the log is tied to a KupComponent, on click its props will be downloaded.
|
|
1772
1772
|
// Also, a different style will be applied to distinguish it between the others.
|
|
1773
1773
|
if (typeof this.logs[index].element == 'object') {
|
|
1774
|
-
slot.title = dom$
|
|
1774
|
+
slot.title = dom$y.ketchup.language.translate(KupLanguageDebug.DL_PROPS_COMP);
|
|
1775
1775
|
slot.style.fontWeight = 'bold';
|
|
1776
1776
|
slot.style.cursor = 'pointer';
|
|
1777
1777
|
slot.onclick = () => {
|
|
@@ -1801,7 +1801,7 @@ class KupDebug {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
slots.reverse();
|
|
1803
1803
|
for (let index = 0; index < slots.length; index++) {
|
|
1804
|
-
__classPrivateFieldGet$
|
|
1804
|
+
__classPrivateFieldGet$b(this, _KupDebug_debugWidget, "f").append(slots[index]);
|
|
1805
1805
|
}
|
|
1806
1806
|
}
|
|
1807
1807
|
/**
|
|
@@ -1829,7 +1829,7 @@ class KupDebug {
|
|
|
1829
1829
|
printLog[type] = [];
|
|
1830
1830
|
}
|
|
1831
1831
|
printLog[type].push({
|
|
1832
|
-
date: dom$
|
|
1832
|
+
date: dom$y.ketchup.dates.format(this.logs[index].date, 'LLL:ms'),
|
|
1833
1833
|
element: isComponent
|
|
1834
1834
|
? this.logs[index].element
|
|
1835
1835
|
: this.logs[index].id,
|
|
@@ -1876,13 +1876,13 @@ class KupDebug {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
if (this.active) {
|
|
1878
1878
|
document.dispatchEvent(new CustomEvent('kup-debug-active'));
|
|
1879
|
-
if (!__classPrivateFieldGet$
|
|
1879
|
+
if (!__classPrivateFieldGet$b(this, _KupDebug_debugWidget, "f")) {
|
|
1880
1880
|
this.showWidget();
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
else {
|
|
1884
1884
|
document.dispatchEvent(new CustomEvent('kup-debug-inactive'));
|
|
1885
|
-
if (__classPrivateFieldGet$
|
|
1885
|
+
if (__classPrivateFieldGet$b(this, _KupDebug_debugWidget, "f")) {
|
|
1886
1886
|
this.hideWidget();
|
|
1887
1887
|
}
|
|
1888
1888
|
}
|
|
@@ -2009,7 +2009,7 @@ class KupDebug {
|
|
|
2009
2009
|
message: message,
|
|
2010
2010
|
};
|
|
2011
2011
|
if (this.logs.length > this.logLimit) {
|
|
2012
|
-
console.warn(dom$
|
|
2012
|
+
console.warn(dom$y.ketchup.dates.format(date, 'LLL:ms') +
|
|
2013
2013
|
' kup-debug => ' +
|
|
2014
2014
|
'Too many logs (> ' +
|
|
2015
2015
|
this.logLimit +
|
|
@@ -2017,22 +2017,22 @@ class KupDebug {
|
|
|
2017
2017
|
this.dump();
|
|
2018
2018
|
}
|
|
2019
2019
|
this.logs.push(log);
|
|
2020
|
-
if (this.autoPrint && __classPrivateFieldGet$
|
|
2020
|
+
if (this.autoPrint && __classPrivateFieldGet$b(this, _KupDebug_debugWidget, "f")) {
|
|
2021
2021
|
this.widgetClear();
|
|
2022
2022
|
this.widgetPrint();
|
|
2023
|
-
__classPrivateFieldGet$
|
|
2023
|
+
__classPrivateFieldGet$b(this, _KupDebug_debugWidget, "f").refresh();
|
|
2024
2024
|
}
|
|
2025
2025
|
}
|
|
2026
2026
|
switch (category) {
|
|
2027
2027
|
case KupDebugCategory.ERROR:
|
|
2028
|
-
console.error(dom$
|
|
2028
|
+
console.error(dom$y.ketchup.dates.format(date, 'LLL:ms') + id + message, obj);
|
|
2029
2029
|
window.dispatchEvent(new CustomEvent('kup-debug-error', {
|
|
2030
2030
|
bubbles: true,
|
|
2031
2031
|
detail: { comp, date, message },
|
|
2032
2032
|
}));
|
|
2033
2033
|
break;
|
|
2034
2034
|
case KupDebugCategory.WARNING:
|
|
2035
|
-
console.warn(dom$
|
|
2035
|
+
console.warn(dom$y.ketchup.dates.format(date, 'LLL:ms') + id + message, obj);
|
|
2036
2036
|
break;
|
|
2037
2037
|
}
|
|
2038
2038
|
}
|
|
@@ -2119,7 +2119,7 @@ var KupDynamicPositionPlacement;
|
|
|
2119
2119
|
KupDynamicPositionPlacement["TOP_RIGHT"] = "tr";
|
|
2120
2120
|
})(KupDynamicPositionPlacement || (KupDynamicPositionPlacement = {}));
|
|
2121
2121
|
|
|
2122
|
-
const dom$
|
|
2122
|
+
const dom$x = document.documentElement;
|
|
2123
2123
|
/**
|
|
2124
2124
|
* This class is used to dynamically reposition HTML elements.
|
|
2125
2125
|
* @module KupDynamicPosition
|
|
@@ -2187,7 +2187,7 @@ class KupDynamicPosition {
|
|
|
2187
2187
|
const target = mutations[0].target;
|
|
2188
2188
|
if (target.classList.contains(kupDynamicPositionActiveClass)) {
|
|
2189
2189
|
requestAnimationFrame(function () {
|
|
2190
|
-
dom$
|
|
2190
|
+
dom$x.ketchup.dynamicPosition.run(el);
|
|
2191
2191
|
});
|
|
2192
2192
|
}
|
|
2193
2193
|
});
|
|
@@ -2244,7 +2244,7 @@ class KupDynamicPosition {
|
|
|
2244
2244
|
*/
|
|
2245
2245
|
run(el) {
|
|
2246
2246
|
if (!el.isConnected) {
|
|
2247
|
-
dom$
|
|
2247
|
+
dom$x.ketchup.dynamicPosition.managedElements.delete(el);
|
|
2248
2248
|
cancelAnimationFrame(el.kupDynamicPosition.rAF);
|
|
2249
2249
|
return;
|
|
2250
2250
|
}
|
|
@@ -2352,7 +2352,7 @@ class KupDynamicPosition {
|
|
|
2352
2352
|
// Recursive
|
|
2353
2353
|
if (!el.kupDynamicPosition.detach) {
|
|
2354
2354
|
el.kupDynamicPosition.rAF = requestAnimationFrame(function () {
|
|
2355
|
-
dom$
|
|
2355
|
+
dom$x.ketchup.dynamicPosition.run(el);
|
|
2356
2356
|
});
|
|
2357
2357
|
}
|
|
2358
2358
|
else {
|
|
@@ -2440,7 +2440,7 @@ var KupDropEventTypes;
|
|
|
2440
2440
|
KupDropEventTypes["MAGICBOX"] = "text/kup-magic-box-drag";
|
|
2441
2441
|
})(KupDropEventTypes || (KupDropEventTypes = {}));
|
|
2442
2442
|
|
|
2443
|
-
const dom$
|
|
2443
|
+
const dom$w = document.documentElement;
|
|
2444
2444
|
/**
|
|
2445
2445
|
* This class handles elements as dialogs, making them resizable and movable.
|
|
2446
2446
|
* @module KupInteract
|
|
@@ -2554,7 +2554,7 @@ class KupInteract {
|
|
|
2554
2554
|
ghostImage.style.transition = 'none';
|
|
2555
2555
|
ghostImage.style.zIndex =
|
|
2556
2556
|
'calc(var(--kup-navbar-zindex) + 1)';
|
|
2557
|
-
dom$
|
|
2557
|
+
dom$w.ketchup.interact.container.appendChild(ghostImage);
|
|
2558
2558
|
draggable.kupDragDrop.ghostImage = ghostImage;
|
|
2559
2559
|
break;
|
|
2560
2560
|
case KupDragEffect.CLONE:
|
|
@@ -2715,7 +2715,7 @@ class KupInteract {
|
|
|
2715
2715
|
x += e.deltaRect.left;
|
|
2716
2716
|
y += e.deltaRect.top;
|
|
2717
2717
|
el.style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
|
2718
|
-
if (dom$
|
|
2718
|
+
if (dom$w.ketchup.interact.isInViewport(el, oldTransform, e.delta)) {
|
|
2719
2719
|
el.setAttribute('data-x', x.toString());
|
|
2720
2720
|
el.setAttribute('data-y', y.toString());
|
|
2721
2721
|
}
|
|
@@ -2767,7 +2767,7 @@ class KupInteract {
|
|
|
2767
2767
|
const callbacks = {
|
|
2768
2768
|
start(e) {
|
|
2769
2769
|
const el = e.currentTarget;
|
|
2770
|
-
el.style.zIndex = (dom$
|
|
2770
|
+
el.style.zIndex = (dom$w.ketchup.interact.zIndex++).toString();
|
|
2771
2771
|
},
|
|
2772
2772
|
};
|
|
2773
2773
|
this.draggable(el, {
|
|
@@ -2776,7 +2776,7 @@ class KupInteract {
|
|
|
2776
2776
|
interact.modifiers.restrictRect({
|
|
2777
2777
|
restriction: restrictContainer
|
|
2778
2778
|
? restrictContainer
|
|
2779
|
-
: dom$
|
|
2779
|
+
: dom$w.ketchup.interact.restrictContainer,
|
|
2780
2780
|
endOnly: true,
|
|
2781
2781
|
}),
|
|
2782
2782
|
],
|
|
@@ -3728,7 +3728,7 @@ const languages = {
|
|
|
3728
3728
|
spanish: spanish
|
|
3729
3729
|
};
|
|
3730
3730
|
|
|
3731
|
-
const dom$
|
|
3731
|
+
const dom$v = document.documentElement;
|
|
3732
3732
|
/**
|
|
3733
3733
|
* Handles the translation to different languages.
|
|
3734
3734
|
* @module KupLanguage
|
|
@@ -3782,7 +3782,7 @@ class KupLanguage {
|
|
|
3782
3782
|
return invalidKey(key);
|
|
3783
3783
|
}
|
|
3784
3784
|
function invalidKey(key) {
|
|
3785
|
-
dom$
|
|
3785
|
+
dom$v.ketchup.debug.logMessage('kup-language', 'Invalid translation for key (' + key + ')!', KupDebugCategory.WARNING);
|
|
3786
3786
|
return key;
|
|
3787
3787
|
}
|
|
3788
3788
|
}
|
|
@@ -3795,7 +3795,7 @@ class KupLanguage {
|
|
|
3795
3795
|
language = language.toLowerCase();
|
|
3796
3796
|
}
|
|
3797
3797
|
else {
|
|
3798
|
-
dom$
|
|
3798
|
+
dom$v.ketchup.debug.logMessage('kup-language', "Couldn't set language, invalid string received (" +
|
|
3799
3799
|
language +
|
|
3800
3800
|
')!', KupDebugCategory.WARNING);
|
|
3801
3801
|
return;
|
|
@@ -3805,12 +3805,12 @@ class KupLanguage {
|
|
|
3805
3805
|
const dVariant = decodedLanguage.variant;
|
|
3806
3806
|
if (this.list[dLanguage]) {
|
|
3807
3807
|
if (dVariant && !this.list[dLanguage].variants[dVariant]) {
|
|
3808
|
-
dom$
|
|
3808
|
+
dom$v.ketchup.debug.logMessage('kup-language', 'Variant not found (' + dVariant + ')!', KupDebugCategory.WARNING);
|
|
3809
3809
|
return;
|
|
3810
3810
|
}
|
|
3811
3811
|
}
|
|
3812
3812
|
else {
|
|
3813
|
-
dom$
|
|
3813
|
+
dom$v.ketchup.debug.logMessage('kup-language', 'Language not found (' + dLanguage + ')!', KupDebugCategory.WARNING);
|
|
3814
3814
|
return;
|
|
3815
3815
|
}
|
|
3816
3816
|
this.name = language;
|
|
@@ -3897,7 +3897,7 @@ const obj = {
|
|
|
3897
3897
|
types: types
|
|
3898
3898
|
};
|
|
3899
3899
|
|
|
3900
|
-
const dom$
|
|
3900
|
+
const dom$u = document.documentElement;
|
|
3901
3901
|
/**
|
|
3902
3902
|
* Handles objects definition and validation.
|
|
3903
3903
|
* @module KupObjects
|
|
@@ -4232,9 +4232,9 @@ class KupObjects {
|
|
|
4232
4232
|
*/
|
|
4233
4233
|
parseDate(obj) {
|
|
4234
4234
|
if (obj.t === 'D8' && obj.p === '*DMYY') {
|
|
4235
|
-
return dom$
|
|
4235
|
+
return dom$u.ketchup.dates.toDayjs(obj.k, 'DDMMYYYY');
|
|
4236
4236
|
}
|
|
4237
|
-
return dom$
|
|
4237
|
+
return dom$u.ketchup.dates.toDayjs(obj.k);
|
|
4238
4238
|
}
|
|
4239
4239
|
/**
|
|
4240
4240
|
* Check whether two JS objects are deeply equal. When the arguments aren't objects, they are tested directly for equity.
|
|
@@ -4301,13 +4301,13 @@ var __classPrivateFieldSet$7 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
4301
4301
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
4302
4302
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
4303
4303
|
};
|
|
4304
|
-
var __classPrivateFieldGet$
|
|
4304
|
+
var __classPrivateFieldGet$a = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
4305
4305
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4306
4306
|
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");
|
|
4307
4307
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
4308
4308
|
};
|
|
4309
4309
|
var _KupScrollOnHover_instances, _KupScrollOnHover_arrowsContainer, _KupScrollOnHover_leftArrows, _KupScrollOnHover_rightArrows, _KupScrollOnHover_scrollEvent, _KupScrollOnHover_mousemoveEvent, _KupScrollOnHover_mouseleaveEvent, _KupScrollOnHover_rAF, _KupScrollOnHover_timeout, _KupScrollOnHover_initArrows;
|
|
4310
|
-
const dom$
|
|
4310
|
+
const dom$t = document.documentElement;
|
|
4311
4311
|
/**
|
|
4312
4312
|
* Lets the user scroll an element's overflow by hovering with the mouse on its left/right edge.
|
|
4313
4313
|
* @module KupScrollOnHover
|
|
@@ -4346,8 +4346,8 @@ class KupScrollOnHover {
|
|
|
4346
4346
|
* @param {number} step - The amount in pixels for each scroll recursion.
|
|
4347
4347
|
*/
|
|
4348
4348
|
register(el, vertical, percentages, step) {
|
|
4349
|
-
if (!__classPrivateFieldGet$
|
|
4350
|
-
__classPrivateFieldGet$
|
|
4349
|
+
if (!__classPrivateFieldGet$a(this, _KupScrollOnHover_arrowsContainer, "f")) {
|
|
4350
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_instances, "m", _KupScrollOnHover_initArrows).call(this);
|
|
4351
4351
|
}
|
|
4352
4352
|
el.style.overflowX = 'auto';
|
|
4353
4353
|
el.scrollOnHover = {
|
|
@@ -4363,10 +4363,10 @@ class KupScrollOnHover {
|
|
|
4363
4363
|
y: 0,
|
|
4364
4364
|
};
|
|
4365
4365
|
if (el.scrollOnHover.children) {
|
|
4366
|
-
el.addEventListener('scroll', __classPrivateFieldGet$
|
|
4366
|
+
el.addEventListener('scroll', __classPrivateFieldGet$a(this, _KupScrollOnHover_scrollEvent, "f"));
|
|
4367
4367
|
}
|
|
4368
|
-
el.addEventListener('mousemove', __classPrivateFieldGet$
|
|
4369
|
-
el.addEventListener('mouseleave', __classPrivateFieldGet$
|
|
4368
|
+
el.addEventListener('mousemove', __classPrivateFieldGet$a(this, _KupScrollOnHover_mousemoveEvent, "f"));
|
|
4369
|
+
el.addEventListener('mouseleave', __classPrivateFieldGet$a(this, _KupScrollOnHover_mouseleaveEvent, "f"));
|
|
4370
4370
|
this.managedElements.add(el);
|
|
4371
4371
|
}
|
|
4372
4372
|
/**
|
|
@@ -4374,9 +4374,9 @@ class KupScrollOnHover {
|
|
|
4374
4374
|
* @param {KupScrollOnHoverElement} el - Element to unregister.
|
|
4375
4375
|
*/
|
|
4376
4376
|
unregister(el) {
|
|
4377
|
-
el.removeEventListener('scroll', __classPrivateFieldGet$
|
|
4378
|
-
el.removeEventListener('mousemove', __classPrivateFieldGet$
|
|
4379
|
-
el.removeEventListener('mouseleave', __classPrivateFieldGet$
|
|
4377
|
+
el.removeEventListener('scroll', __classPrivateFieldGet$a(this, _KupScrollOnHover_scrollEvent, "f"));
|
|
4378
|
+
el.removeEventListener('mousemove', __classPrivateFieldGet$a(this, _KupScrollOnHover_mousemoveEvent, "f"));
|
|
4379
|
+
el.removeEventListener('mouseleave', __classPrivateFieldGet$a(this, _KupScrollOnHover_mouseleaveEvent, "f"));
|
|
4380
4380
|
if (this.managedElements) {
|
|
4381
4381
|
this.managedElements.delete(el);
|
|
4382
4382
|
}
|
|
@@ -4398,9 +4398,9 @@ class KupScrollOnHover {
|
|
|
4398
4398
|
el.scrollOnHover.rect = el.getBoundingClientRect();
|
|
4399
4399
|
el.scrollOnHover.x = event.clientX;
|
|
4400
4400
|
el.scrollOnHover.y = event.clientY;
|
|
4401
|
-
__classPrivateFieldGet$
|
|
4402
|
-
__classPrivateFieldGet$
|
|
4403
|
-
if (el.scrollOnHover.active || __classPrivateFieldGet$
|
|
4401
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_arrowsContainer, "f").style.left = event.clientX + 'px';
|
|
4402
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_arrowsContainer, "f").style.top = event.clientY + 'px';
|
|
4403
|
+
if (el.scrollOnHover.active || __classPrivateFieldGet$a(this, _KupScrollOnHover_timeout, "f")) {
|
|
4404
4404
|
return;
|
|
4405
4405
|
}
|
|
4406
4406
|
let trueHeight = el.clientHeight;
|
|
@@ -4427,16 +4427,16 @@ class KupScrollOnHover {
|
|
|
4427
4427
|
if (direction) {
|
|
4428
4428
|
for (let i = 0; i < 3; i++) {
|
|
4429
4429
|
if (direction === ScrollOnHoverDirection.LEFT) {
|
|
4430
|
-
__classPrivateFieldGet$
|
|
4430
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_leftArrows, "f")[i].classList.add('kup-activated');
|
|
4431
4431
|
}
|
|
4432
4432
|
else {
|
|
4433
|
-
__classPrivateFieldGet$
|
|
4433
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_rightArrows, "f")[i].classList.add('kup-activated');
|
|
4434
4434
|
}
|
|
4435
4435
|
}
|
|
4436
4436
|
__classPrivateFieldSet$7(this, _KupScrollOnHover_timeout, setTimeout(() => {
|
|
4437
4437
|
el.scrollOnHover.active = true;
|
|
4438
4438
|
__classPrivateFieldSet$7(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
4439
|
-
dom$
|
|
4439
|
+
dom$t.ketchup.scrollOnHover.run(el, maxScrollLeft, percRight, percLeft, direction);
|
|
4440
4440
|
}), "f");
|
|
4441
4441
|
}, this.delay), "f");
|
|
4442
4442
|
}
|
|
@@ -4458,7 +4458,7 @@ class KupScrollOnHover {
|
|
|
4458
4458
|
__classPrivateFieldSet$7(this, _KupScrollOnHover_timeout, setTimeout(() => {
|
|
4459
4459
|
el.scrollOnHover.active = true;
|
|
4460
4460
|
__classPrivateFieldSet$7(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
4461
|
-
dom$
|
|
4461
|
+
dom$t.ketchup.scrollOnHover.run(el, maxScrollTop, percBottom, percTop, direction);
|
|
4462
4462
|
}), "f");
|
|
4463
4463
|
}, this.delay), "f");
|
|
4464
4464
|
}
|
|
@@ -4471,16 +4471,16 @@ class KupScrollOnHover {
|
|
|
4471
4471
|
*/
|
|
4472
4472
|
async stop(el) {
|
|
4473
4473
|
el.scrollOnHover.active = false;
|
|
4474
|
-
cancelAnimationFrame(__classPrivateFieldGet$
|
|
4475
|
-
clearTimeout(__classPrivateFieldGet$
|
|
4474
|
+
cancelAnimationFrame(__classPrivateFieldGet$a(this, _KupScrollOnHover_rAF, "f"));
|
|
4475
|
+
clearTimeout(__classPrivateFieldGet$a(this, _KupScrollOnHover_timeout, "f"));
|
|
4476
4476
|
__classPrivateFieldSet$7(this, _KupScrollOnHover_timeout, null, "f");
|
|
4477
|
-
for (let i = 0; i < __classPrivateFieldGet$
|
|
4478
|
-
__classPrivateFieldGet$
|
|
4479
|
-
__classPrivateFieldGet$
|
|
4477
|
+
for (let i = 0; i < __classPrivateFieldGet$a(this, _KupScrollOnHover_leftArrows, "f").length; i++) {
|
|
4478
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_leftArrows, "f")[i].classList.remove('kup-activated');
|
|
4479
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_leftArrows, "f")[i].classList.remove('kup-animated');
|
|
4480
4480
|
}
|
|
4481
|
-
for (let i = 0; i < __classPrivateFieldGet$
|
|
4482
|
-
__classPrivateFieldGet$
|
|
4483
|
-
__classPrivateFieldGet$
|
|
4481
|
+
for (let i = 0; i < __classPrivateFieldGet$a(this, _KupScrollOnHover_rightArrows, "f").length; i++) {
|
|
4482
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_rightArrows, "f")[i].classList.remove('kup-activated');
|
|
4483
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_rightArrows, "f")[i].classList.remove('kup-animated');
|
|
4484
4484
|
}
|
|
4485
4485
|
}
|
|
4486
4486
|
/**
|
|
@@ -4552,7 +4552,7 @@ class KupScrollOnHover {
|
|
|
4552
4552
|
break;
|
|
4553
4553
|
}
|
|
4554
4554
|
case ScrollOnHoverDirection.LEFT: {
|
|
4555
|
-
arrow = __classPrivateFieldGet$
|
|
4555
|
+
arrow = __classPrivateFieldGet$a(this, _KupScrollOnHover_leftArrows, "f");
|
|
4556
4556
|
if (el.scrollLeft === 0) {
|
|
4557
4557
|
this.stop(el);
|
|
4558
4558
|
return;
|
|
@@ -4563,7 +4563,7 @@ class KupScrollOnHover {
|
|
|
4563
4563
|
break;
|
|
4564
4564
|
}
|
|
4565
4565
|
case ScrollOnHoverDirection.RIGHT: {
|
|
4566
|
-
arrow = __classPrivateFieldGet$
|
|
4566
|
+
arrow = __classPrivateFieldGet$a(this, _KupScrollOnHover_rightArrows, "f");
|
|
4567
4567
|
if (el.scrollLeft === maxScrollLeft) {
|
|
4568
4568
|
this.stop(el);
|
|
4569
4569
|
return;
|
|
@@ -4589,7 +4589,7 @@ class KupScrollOnHover {
|
|
|
4589
4589
|
arrow[i].classList.add('kup-animated');
|
|
4590
4590
|
}
|
|
4591
4591
|
__classPrivateFieldSet$7(this, _KupScrollOnHover_rAF, requestAnimationFrame(function () {
|
|
4592
|
-
dom$
|
|
4592
|
+
dom$t.ketchup.scrollOnHover.run(el, maxScrollLeft, percForward, percBack, direction);
|
|
4593
4593
|
}), "f");
|
|
4594
4594
|
}
|
|
4595
4595
|
/**
|
|
@@ -4606,21 +4606,21 @@ _KupScrollOnHover_arrowsContainer = new WeakMap(), _KupScrollOnHover_leftArrows
|
|
|
4606
4606
|
__classPrivateFieldSet$7(this, _KupScrollOnHover_arrowsContainer, document.createElement('div'), "f");
|
|
4607
4607
|
__classPrivateFieldSet$7(this, _KupScrollOnHover_leftArrows, [], "f");
|
|
4608
4608
|
__classPrivateFieldSet$7(this, _KupScrollOnHover_rightArrows, [], "f");
|
|
4609
|
-
__classPrivateFieldGet$
|
|
4609
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_arrowsContainer, "f").id = 'kup-scrolling-arrows';
|
|
4610
4610
|
for (let index = 1; index < 4; index++) {
|
|
4611
4611
|
const arrow = document.createElement('div');
|
|
4612
4612
|
arrow.setAttribute('class', 'kup-left-scrolling-arrow kup-arrow-' + index);
|
|
4613
|
-
__classPrivateFieldGet$
|
|
4613
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_leftArrows, "f").push(arrow);
|
|
4614
4614
|
}
|
|
4615
4615
|
for (let index = 1; index < 4; index++) {
|
|
4616
4616
|
const arrow = document.createElement('div');
|
|
4617
4617
|
arrow.setAttribute('class', 'kup-right-scrolling-arrow kup-arrow-' + index);
|
|
4618
|
-
__classPrivateFieldGet$
|
|
4618
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_rightArrows, "f").push(arrow);
|
|
4619
4619
|
}
|
|
4620
|
-
__classPrivateFieldGet$
|
|
4620
|
+
__classPrivateFieldGet$a(this, _KupScrollOnHover_arrowsContainer, "f").append(__classPrivateFieldGet$a(this, _KupScrollOnHover_leftArrows, "f")[2], __classPrivateFieldGet$a(this, _KupScrollOnHover_leftArrows, "f")[1], __classPrivateFieldGet$a(this, _KupScrollOnHover_leftArrows, "f")[0], __classPrivateFieldGet$a(this, _KupScrollOnHover_rightArrows, "f")[0], __classPrivateFieldGet$a(this, _KupScrollOnHover_rightArrows, "f")[1], __classPrivateFieldGet$a(this, _KupScrollOnHover_rightArrows, "f")[2]);
|
|
4621
4621
|
this.container = document.createElement('div');
|
|
4622
4622
|
this.container.setAttribute('kup-scroll-on-hover', '');
|
|
4623
|
-
this.container.appendChild(__classPrivateFieldGet$
|
|
4623
|
+
this.container.appendChild(__classPrivateFieldGet$a(this, _KupScrollOnHover_arrowsContainer, "f"));
|
|
4624
4624
|
document.body.appendChild(this.container);
|
|
4625
4625
|
};
|
|
4626
4626
|
|
|
@@ -5827,7 +5827,7 @@ var KupThemeIconValues;
|
|
|
5827
5827
|
KupThemeIconValues["SEARCH"] = "--kup-search-icon";
|
|
5828
5828
|
})(KupThemeIconValues || (KupThemeIconValues = {}));
|
|
5829
5829
|
|
|
5830
|
-
const dom$
|
|
5830
|
+
const dom$s = document.documentElement;
|
|
5831
5831
|
/**
|
|
5832
5832
|
* Theme manager, handles everything about theming, customStyles and color utilities.
|
|
5833
5833
|
* @module KupTheme
|
|
@@ -5841,7 +5841,7 @@ class KupTheme {
|
|
|
5841
5841
|
this.list = list ? list : themes;
|
|
5842
5842
|
this.managedComponents = new Set();
|
|
5843
5843
|
this.name = name ? name : 'ketchup';
|
|
5844
|
-
this.styleTag = dom$
|
|
5844
|
+
this.styleTag = dom$s
|
|
5845
5845
|
.querySelector('head')
|
|
5846
5846
|
.appendChild(document.createElement('style'));
|
|
5847
5847
|
}
|
|
@@ -5928,9 +5928,9 @@ class KupTheme {
|
|
|
5928
5928
|
if (list) {
|
|
5929
5929
|
this.list = list;
|
|
5930
5930
|
}
|
|
5931
|
-
dom$
|
|
5931
|
+
dom$s.ketchup.debug.logMessage('theme manager', 'Setting theme to: ' + this.name + '.');
|
|
5932
5932
|
if (!this.list[this.name]) {
|
|
5933
|
-
dom$
|
|
5933
|
+
dom$s.ketchup.debug.logMessage('theme manager', 'Invalid theme name, falling back to default ("ketchup").');
|
|
5934
5934
|
this.name = 'ketchup';
|
|
5935
5935
|
}
|
|
5936
5936
|
this.cssVars = {};
|
|
@@ -5973,11 +5973,11 @@ class KupTheme {
|
|
|
5973
5973
|
this.icons() +
|
|
5974
5974
|
'}';
|
|
5975
5975
|
this.customStyle();
|
|
5976
|
-
dom$
|
|
5976
|
+
dom$s.ketchup.debug.logMessage('kup-theme', 'Theme ' + dom$s.getAttribute('kup-theme') + ' refreshed.');
|
|
5977
5977
|
document.dispatchEvent(new CustomEvent('kup-theme-refresh'));
|
|
5978
5978
|
}
|
|
5979
5979
|
catch (error) {
|
|
5980
|
-
dom$
|
|
5980
|
+
dom$s.ketchup.debug.logMessage('kup-theme', 'Theme not refreshed.', KupDebugCategory.WARNING);
|
|
5981
5981
|
}
|
|
5982
5982
|
}
|
|
5983
5983
|
/**
|
|
@@ -6096,7 +6096,7 @@ class KupTheme {
|
|
|
6096
6096
|
this.set(themes[index]);
|
|
6097
6097
|
}
|
|
6098
6098
|
else {
|
|
6099
|
-
dom$
|
|
6099
|
+
dom$s.ketchup.debug.logMessage('kup-theme', "Couldn't set a random theme: no themes available!", KupDebugCategory.WARNING);
|
|
6100
6100
|
}
|
|
6101
6101
|
}
|
|
6102
6102
|
/**
|
|
@@ -6108,7 +6108,7 @@ class KupTheme {
|
|
|
6108
6108
|
//Testing whether the color is transparent, if it is a fall back value will be returned matching the background-color
|
|
6109
6109
|
if (color === 'transparent') {
|
|
6110
6110
|
color = this.cssVars['--kup-background-color'];
|
|
6111
|
-
dom$
|
|
6111
|
+
dom$s.ketchup.debug.logMessage('theme manager', 'Received TRANSPARENT color, converted to ' +
|
|
6112
6112
|
color +
|
|
6113
6113
|
' (theme background).');
|
|
6114
6114
|
}
|
|
@@ -6126,7 +6126,7 @@ class KupTheme {
|
|
|
6126
6126
|
const oldColor = color;
|
|
6127
6127
|
color = this.codeToHex(color);
|
|
6128
6128
|
isHex = color.substring(0, 1) === '#' ? true : false;
|
|
6129
|
-
dom$
|
|
6129
|
+
dom$s.ketchup.debug.logMessage('theme manager', 'Received CODE NAME color ' +
|
|
6130
6130
|
oldColor +
|
|
6131
6131
|
', converted to ' +
|
|
6132
6132
|
color +
|
|
@@ -6180,14 +6180,14 @@ class KupTheme {
|
|
|
6180
6180
|
else {
|
|
6181
6181
|
hexColor = this.rgbToHex(rgbColorObj.r, rgbColorObj.g, rgbColorObj.b);
|
|
6182
6182
|
}
|
|
6183
|
-
dom$
|
|
6183
|
+
dom$s.ketchup.debug.logMessage('theme-manager', 'Received HEX color ' +
|
|
6184
6184
|
oldColor +
|
|
6185
6185
|
', converted to ' +
|
|
6186
6186
|
color +
|
|
6187
6187
|
'.');
|
|
6188
6188
|
}
|
|
6189
6189
|
catch (error) {
|
|
6190
|
-
dom$
|
|
6190
|
+
dom$s.ketchup.debug.logMessage('theme-manager', 'Invalid color: ' + color + '.');
|
|
6191
6191
|
}
|
|
6192
6192
|
}
|
|
6193
6193
|
let rgbValues = null;
|
|
@@ -6197,14 +6197,14 @@ class KupTheme {
|
|
|
6197
6197
|
rgbColor = color;
|
|
6198
6198
|
}
|
|
6199
6199
|
catch (error) {
|
|
6200
|
-
dom$
|
|
6200
|
+
dom$s.ketchup.debug.logMessage('theme-manager', 'Color not converted to rgb values: ' + color + '.');
|
|
6201
6201
|
}
|
|
6202
6202
|
if (!hexColor) {
|
|
6203
6203
|
try {
|
|
6204
6204
|
hexColor = this.rgbToHex(parseInt(values[1]), parseInt(values[2]), parseInt(values[3]));
|
|
6205
6205
|
}
|
|
6206
6206
|
catch (error) {
|
|
6207
|
-
dom$
|
|
6207
|
+
dom$s.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
|
|
6208
6208
|
}
|
|
6209
6209
|
}
|
|
6210
6210
|
if (!hslColor || !hslValues) {
|
|
@@ -6217,7 +6217,7 @@ class KupTheme {
|
|
|
6217
6217
|
hslColor = 'hsl(' + hsl.h + ',' + hsl.s + '%,' + hsl.l + '%)';
|
|
6218
6218
|
}
|
|
6219
6219
|
catch (error) {
|
|
6220
|
-
dom$
|
|
6220
|
+
dom$s.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
|
|
6221
6221
|
}
|
|
6222
6222
|
}
|
|
6223
6223
|
return {
|
|
@@ -6522,7 +6522,7 @@ class KupTheme {
|
|
|
6522
6522
|
return colorCodes[color.toLowerCase()];
|
|
6523
6523
|
}
|
|
6524
6524
|
else {
|
|
6525
|
-
dom$
|
|
6525
|
+
dom$s.ketchup.debug.logMessage('theme manager', 'Could not decode color ' + color + '!');
|
|
6526
6526
|
return color;
|
|
6527
6527
|
}
|
|
6528
6528
|
}
|
|
@@ -6544,13 +6544,13 @@ var __classPrivateFieldSet$6 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
6544
6544
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6545
6545
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6546
6546
|
};
|
|
6547
|
-
var __classPrivateFieldGet$
|
|
6547
|
+
var __classPrivateFieldGet$9 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
6548
6548
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
6549
6549
|
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");
|
|
6550
6550
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6551
6551
|
};
|
|
6552
6552
|
var _KupToolbar_keyEvent;
|
|
6553
|
-
const dom$
|
|
6553
|
+
const dom$r = document.documentElement;
|
|
6554
6554
|
/**
|
|
6555
6555
|
* Handles component's toolbar.
|
|
6556
6556
|
* @module KupToolbar
|
|
@@ -6568,7 +6568,7 @@ class KupToolbar {
|
|
|
6568
6568
|
KupToolbarModifierKeys.CTRL,
|
|
6569
6569
|
];
|
|
6570
6570
|
__classPrivateFieldSet$6(this, _KupToolbar_keyEvent, function (e) {
|
|
6571
|
-
const toolbar = dom$
|
|
6571
|
+
const toolbar = dom$r.ketchup.toolbar;
|
|
6572
6572
|
if (toolbar.managedElements) {
|
|
6573
6573
|
for (let index = 0; index < toolbar.modifiers.length; index++) {
|
|
6574
6574
|
if (toolbar.modifiers[index] ===
|
|
@@ -6590,8 +6590,8 @@ class KupToolbar {
|
|
|
6590
6590
|
toolbar.show();
|
|
6591
6591
|
}
|
|
6592
6592
|
}, "f");
|
|
6593
|
-
document.addEventListener('keydown', __classPrivateFieldGet$
|
|
6594
|
-
document.addEventListener('keyup', __classPrivateFieldGet$
|
|
6593
|
+
document.addEventListener('keydown', __classPrivateFieldGet$9(this, _KupToolbar_keyEvent, "f"));
|
|
6594
|
+
document.addEventListener('keyup', __classPrivateFieldGet$9(this, _KupToolbar_keyEvent, "f"));
|
|
6595
6595
|
}
|
|
6596
6596
|
/**
|
|
6597
6597
|
* Shows components' toolbar.
|
|
@@ -7099,7 +7099,7 @@ var KupDatesLocales;
|
|
|
7099
7099
|
KupDatesLocales["SPANISH"] = "es";
|
|
7100
7100
|
})(KupDatesLocales || (KupDatesLocales = {}));
|
|
7101
7101
|
|
|
7102
|
-
const dom$
|
|
7102
|
+
const dom$q = document.documentElement;
|
|
7103
7103
|
var DateTimeFormatOptionsMonth;
|
|
7104
7104
|
(function (DateTimeFormatOptionsMonth) {
|
|
7105
7105
|
DateTimeFormatOptionsMonth["NUMERIC"] = "numeric";
|
|
@@ -7115,12 +7115,6 @@ function identify(array) {
|
|
|
7115
7115
|
}
|
|
7116
7116
|
}
|
|
7117
7117
|
}
|
|
7118
|
-
function getSeparator(locale, separatorType) {
|
|
7119
|
-
const numberWithGroupAndDecimalSeparator = 1000.1;
|
|
7120
|
-
return Intl.NumberFormat(locale)
|
|
7121
|
-
.formatToParts(numberWithGroupAndDecimalSeparator)
|
|
7122
|
-
.find((part) => part.type === separatorType).value;
|
|
7123
|
-
}
|
|
7124
7118
|
function getCurrentTimeFormatFromBrowserLocale(manageSeconds) {
|
|
7125
7119
|
const options = {
|
|
7126
7120
|
hour: '2-digit',
|
|
@@ -7130,7 +7124,7 @@ function getCurrentTimeFormatFromBrowserLocale(manageSeconds) {
|
|
|
7130
7124
|
if (manageSeconds == true) {
|
|
7131
7125
|
options.second = '2-digit';
|
|
7132
7126
|
}
|
|
7133
|
-
const formatObj = new Intl.DateTimeFormat(dom$
|
|
7127
|
+
const formatObj = new Intl.DateTimeFormat(dom$q.ketchup.dates.getLocale() + '-u-hc-h23', options).formatToParts(new Date());
|
|
7134
7128
|
let timeFormat = formatObj
|
|
7135
7129
|
.map((obj) => {
|
|
7136
7130
|
switch (obj.type) {
|
|
@@ -7174,7 +7168,7 @@ function stringToNumber(input) {
|
|
|
7174
7168
|
if (!input || input == null || input.trim() == '') {
|
|
7175
7169
|
input = '0';
|
|
7176
7170
|
}
|
|
7177
|
-
return dom$
|
|
7171
|
+
return dom$q.ketchup.math.numberify(input);
|
|
7178
7172
|
}
|
|
7179
7173
|
/**
|
|
7180
7174
|
* @param input number
|
|
@@ -7185,7 +7179,7 @@ function numberToString(input, decimals) {
|
|
|
7185
7179
|
if (input == null) {
|
|
7186
7180
|
return '';
|
|
7187
7181
|
}
|
|
7188
|
-
return _numberToString(input, decimals, dom$
|
|
7182
|
+
return _numberToString(input, decimals, dom$q.ketchup.dates.getLocale(), true);
|
|
7189
7183
|
}
|
|
7190
7184
|
/**
|
|
7191
7185
|
* @param type - type of number for calculate suffix
|
|
@@ -7237,7 +7231,7 @@ function unformattedStringToFormattedStringNumber(input, decimals, type) {
|
|
|
7237
7231
|
* @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
|
|
7238
7232
|
**/
|
|
7239
7233
|
function formattedStringToUnformattedStringNumber(input, type) {
|
|
7240
|
-
return numberStringToNumberString(input, type,
|
|
7234
|
+
return numberStringToNumberString(input, type, dom$q.ketchup.math.decimalSeparator());
|
|
7241
7235
|
}
|
|
7242
7236
|
/**
|
|
7243
7237
|
* @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers), with group separator
|
|
@@ -7267,16 +7261,13 @@ function numberStringToNumberString(input, type, decFmt) {
|
|
|
7267
7261
|
if (decFmt != '.') {
|
|
7268
7262
|
input = input.replace(/,/g, '.');
|
|
7269
7263
|
}
|
|
7270
|
-
if (dom$
|
|
7271
|
-
isNaN(dom$
|
|
7264
|
+
if (dom$q.ketchup.math.numberify(input) == null ||
|
|
7265
|
+
isNaN(dom$q.ketchup.math.numberify(input))) {
|
|
7272
7266
|
return originalInputValue;
|
|
7273
7267
|
}
|
|
7274
7268
|
let unf = stringToNumber(input);
|
|
7275
7269
|
return _numberToString(unf, -1, 'en-US', false);
|
|
7276
7270
|
}
|
|
7277
|
-
function getDecimalSeparator(locale) {
|
|
7278
|
-
return getSeparator(locale, 'decimal');
|
|
7279
|
-
}
|
|
7280
7271
|
function countDecimals(value) {
|
|
7281
7272
|
if (Math.floor(value) === value)
|
|
7282
7273
|
return 0;
|
|
@@ -7319,7 +7310,7 @@ function formatTime(time, manageSeconds) {
|
|
|
7319
7310
|
if (manageSeconds == true) {
|
|
7320
7311
|
options.second = '2-digit';
|
|
7321
7312
|
}
|
|
7322
|
-
return time.toLocaleTimeString(dom$
|
|
7313
|
+
return time.toLocaleTimeString(dom$q.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
7323
7314
|
}
|
|
7324
7315
|
/**
|
|
7325
7316
|
* @param value time string, formatted by actual browser locale
|
|
@@ -7327,7 +7318,7 @@ function formatTime(time, manageSeconds) {
|
|
|
7327
7318
|
*/
|
|
7328
7319
|
function isValidFormattedStringTime(value, manageSeconds) {
|
|
7329
7320
|
let format = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
|
|
7330
|
-
return dom$
|
|
7321
|
+
return dom$q.ketchup.dates.isValid(value, format, true);
|
|
7331
7322
|
}
|
|
7332
7323
|
/**
|
|
7333
7324
|
* @param value date/time as string, formatted by actual browser locale
|
|
@@ -7344,8 +7335,8 @@ function formattedStringToDefaultUnformattedStringTimestamp(value) {
|
|
|
7344
7335
|
**/
|
|
7345
7336
|
function formattedStringToCustomUnformattedStringTime(value, outputFormat, manageSeconds) {
|
|
7346
7337
|
let inputFormat = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
|
|
7347
|
-
if (dom$
|
|
7348
|
-
return dom$
|
|
7338
|
+
if (dom$q.ketchup.dates.isValid(value, inputFormat)) {
|
|
7339
|
+
return dom$q.ketchup.dates.format(dom$q.ketchup.dates.normalize(value, KupDatesNormalize.TIME), outputFormat);
|
|
7349
7340
|
}
|
|
7350
7341
|
else {
|
|
7351
7342
|
return '';
|
|
@@ -7367,12 +7358,12 @@ function unformattedStringToFormattedStringTime(value, manageSeconds, customedFo
|
|
|
7367
7358
|
if (manageSeconds == true) {
|
|
7368
7359
|
options.second = '2-digit';
|
|
7369
7360
|
}
|
|
7370
|
-
let date = dom$
|
|
7361
|
+
let date = dom$q.ketchup.dates.toDate(dom$q.ketchup.dates.normalize(value, KupDatesNormalize.TIME));
|
|
7371
7362
|
return formatByCustomedOutputTimeFormat(value, date, options, customedFormat);
|
|
7372
7363
|
}
|
|
7373
7364
|
function formatByCustomedOutputTimeFormat(valueStr, date, options, customedFormat) {
|
|
7374
7365
|
if (customedFormat == null) {
|
|
7375
|
-
return date.toLocaleTimeString(dom$
|
|
7366
|
+
return date.toLocaleTimeString(dom$q.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
7376
7367
|
}
|
|
7377
7368
|
switch (customedFormat) {
|
|
7378
7369
|
case 'I13': {
|
|
@@ -7441,7 +7432,7 @@ function formatByCustomedOutputTimeFormat(valueStr, date, options, customedForma
|
|
|
7441
7432
|
return valueStr;
|
|
7442
7433
|
}
|
|
7443
7434
|
}
|
|
7444
|
-
return date.toLocaleTimeString(dom$
|
|
7435
|
+
return date.toLocaleTimeString(dom$q.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
7445
7436
|
}
|
|
7446
7437
|
/**
|
|
7447
7438
|
* @param value date/time as string, formatted ISO
|
|
@@ -7458,8 +7449,8 @@ function unformattedStringToFormattedStringTimestamp(value) {
|
|
|
7458
7449
|
second: '2-digit',
|
|
7459
7450
|
hour12: false,
|
|
7460
7451
|
};
|
|
7461
|
-
let date = dom$
|
|
7462
|
-
return date.toLocaleString(dom$
|
|
7452
|
+
let date = dom$q.ketchup.dates.toDate(dom$q.ketchup.dates.normalize(value, KupDatesNormalize.TIMESTAMP));
|
|
7453
|
+
return date.toLocaleString(dom$q.ketchup.dates.getLocale() + '-u-hc-h23', options);
|
|
7463
7454
|
}
|
|
7464
7455
|
function getMonthAsStringByLocale(month, format) {
|
|
7465
7456
|
if (month == null) {
|
|
@@ -7471,7 +7462,7 @@ function getMonthAsStringByLocale(month, format) {
|
|
|
7471
7462
|
const options = {
|
|
7472
7463
|
month: format,
|
|
7473
7464
|
};
|
|
7474
|
-
const dateTimeFormat = new Intl.DateTimeFormat(dom$
|
|
7465
|
+
const dateTimeFormat = new Intl.DateTimeFormat(dom$q.ketchup.dates.getLocale(), options);
|
|
7475
7466
|
return dateTimeFormat.format(dateTmp);
|
|
7476
7467
|
}
|
|
7477
7468
|
function getMonthsAsStringByLocale(format) {
|
|
@@ -7524,7 +7515,7 @@ function setProps(comp, list, props) {
|
|
|
7524
7515
|
}
|
|
7525
7516
|
}
|
|
7526
7517
|
|
|
7527
|
-
const dom$
|
|
7518
|
+
const dom$p = document.documentElement;
|
|
7528
7519
|
// -------------
|
|
7529
7520
|
// COMMONS
|
|
7530
7521
|
// -------------
|
|
@@ -7551,9 +7542,9 @@ function getValueForDisplay2(values, column) {
|
|
|
7551
7542
|
}
|
|
7552
7543
|
function formatToNumber(cell) {
|
|
7553
7544
|
if (cell.obj) {
|
|
7554
|
-
return dom$
|
|
7545
|
+
return dom$p.ketchup.math.numberify(cell.obj.k);
|
|
7555
7546
|
}
|
|
7556
|
-
return dom$
|
|
7547
|
+
return dom$p.ketchup.math.numberify(cell.value);
|
|
7557
7548
|
}
|
|
7558
7549
|
function _getCellValueForDisplay(value, column, cell) {
|
|
7559
7550
|
let obj = column != null ? column.obj : null;
|
|
@@ -7566,17 +7557,17 @@ function getValueForDisplay(value, obj, decimals) {
|
|
|
7566
7557
|
if (value == null || value.trim() == '') {
|
|
7567
7558
|
return value;
|
|
7568
7559
|
}
|
|
7569
|
-
if (dom$
|
|
7560
|
+
if (dom$p.ketchup.objects.isNumber(obj)) {
|
|
7570
7561
|
return unformattedStringToFormattedStringNumber(value, decimals ? decimals : -1, obj ? obj.p : '');
|
|
7571
7562
|
}
|
|
7572
|
-
if (dom$
|
|
7573
|
-
dom$
|
|
7574
|
-
return dom$
|
|
7563
|
+
if (dom$p.ketchup.objects.isDate(obj) &&
|
|
7564
|
+
dom$p.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
|
|
7565
|
+
return dom$p.ketchup.dates.format(value);
|
|
7575
7566
|
}
|
|
7576
|
-
if (dom$
|
|
7577
|
-
return unformattedStringToFormattedStringTime(value, dom$
|
|
7567
|
+
if (dom$p.ketchup.objects.isTime(obj)) {
|
|
7568
|
+
return unformattedStringToFormattedStringTime(value, dom$p.ketchup.objects.isTimeWithSeconds(obj), obj.t + obj.p);
|
|
7578
7569
|
}
|
|
7579
|
-
if (dom$
|
|
7570
|
+
if (dom$p.ketchup.objects.isTimestamp(obj)) {
|
|
7580
7571
|
return unformattedStringToFormattedStringTimestamp(value);
|
|
7581
7572
|
}
|
|
7582
7573
|
return value;
|
|
@@ -7621,26 +7612,26 @@ function compareValues(obj1, value1, obj2, value2, sortMode) {
|
|
|
7621
7612
|
}
|
|
7622
7613
|
let v1 = s1;
|
|
7623
7614
|
let v2 = s2;
|
|
7624
|
-
if (dom$
|
|
7615
|
+
if (dom$p.ketchup.objects.isNumber(obj1)) {
|
|
7625
7616
|
v1 = stringToNumber(s1);
|
|
7626
7617
|
v2 = stringToNumber(s2);
|
|
7627
7618
|
}
|
|
7628
|
-
else if (dom$
|
|
7629
|
-
v1 = dom$
|
|
7630
|
-
v2 = dom$
|
|
7619
|
+
else if (dom$p.ketchup.objects.isDate(obj1)) {
|
|
7620
|
+
v1 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s1, KupDatesFormats.ISO_DATE));
|
|
7621
|
+
v2 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s2, KupDatesFormats.ISO_DATE));
|
|
7631
7622
|
}
|
|
7632
|
-
else if (dom$
|
|
7633
|
-
let manageSeconds = dom$
|
|
7634
|
-
v1 = dom$
|
|
7623
|
+
else if (dom$p.ketchup.objects.isTime(obj1)) {
|
|
7624
|
+
let manageSeconds = dom$p.ketchup.objects.isTimeWithSeconds(obj1);
|
|
7625
|
+
v1 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s1, manageSeconds
|
|
7635
7626
|
? KupDatesFormats.ISO_TIME
|
|
7636
7627
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
|
|
7637
|
-
v2 = dom$
|
|
7628
|
+
v2 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s2, manageSeconds
|
|
7638
7629
|
? KupDatesFormats.ISO_TIME
|
|
7639
7630
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
|
|
7640
7631
|
}
|
|
7641
|
-
else if (dom$
|
|
7642
|
-
v1 = dom$
|
|
7643
|
-
v2 = dom$
|
|
7632
|
+
else if (dom$p.ketchup.objects.isTimestamp(obj1)) {
|
|
7633
|
+
v1 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s1, KupDatesFormats.ISO_DATE_TIME));
|
|
7634
|
+
v2 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s2, KupDatesFormats.ISO_DATE_TIME));
|
|
7644
7635
|
}
|
|
7645
7636
|
if (v1 > v2) {
|
|
7646
7637
|
return sm * 1;
|
|
@@ -7706,7 +7697,7 @@ var KupGlobalFilterMode;
|
|
|
7706
7697
|
KupGlobalFilterMode["HIGHLIGHT"] = "highlight";
|
|
7707
7698
|
})(KupGlobalFilterMode || (KupGlobalFilterMode = {}));
|
|
7708
7699
|
|
|
7709
|
-
const dom$
|
|
7700
|
+
const dom$o = document.documentElement;
|
|
7710
7701
|
/**
|
|
7711
7702
|
* Filtering algorithms.
|
|
7712
7703
|
* @module Filters
|
|
@@ -7722,16 +7713,16 @@ class Filters {
|
|
|
7722
7713
|
return comp.rootElement.tagName === KupTagNames.TREE;
|
|
7723
7714
|
}
|
|
7724
7715
|
isObjFiltrableByInterval(obj) {
|
|
7725
|
-
if (dom$
|
|
7716
|
+
if (dom$o.ketchup.objects.isDate(obj)) {
|
|
7726
7717
|
return true;
|
|
7727
7718
|
}
|
|
7728
|
-
if (dom$
|
|
7719
|
+
if (dom$o.ketchup.objects.isTime(obj)) {
|
|
7729
7720
|
return true;
|
|
7730
7721
|
}
|
|
7731
|
-
if (dom$
|
|
7722
|
+
if (dom$o.ketchup.objects.isTimestamp(obj)) {
|
|
7732
7723
|
return true;
|
|
7733
7724
|
}
|
|
7734
|
-
if (dom$
|
|
7725
|
+
if (dom$o.ketchup.objects.isNumber(obj)) {
|
|
7735
7726
|
return true;
|
|
7736
7727
|
}
|
|
7737
7728
|
return false;
|
|
@@ -7741,17 +7732,17 @@ class Filters {
|
|
|
7741
7732
|
if (newValue == null || newValue == '' || smeupObj == null) {
|
|
7742
7733
|
return newValue;
|
|
7743
7734
|
}
|
|
7744
|
-
if (dom$
|
|
7745
|
-
if (dom$
|
|
7735
|
+
if (dom$o.ketchup.objects.isDate(smeupObj)) {
|
|
7736
|
+
if (dom$o.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
|
|
7746
7737
|
return newValue;
|
|
7747
7738
|
}
|
|
7748
|
-
if (dom$
|
|
7749
|
-
return dom$
|
|
7739
|
+
if (dom$o.ketchup.dates.isValid(value)) {
|
|
7740
|
+
return dom$o.ketchup.dates.format(dom$o.ketchup.dates.normalize(value, KupDatesNormalize.DATE), KupDatesFormats.ISO_DATE);
|
|
7750
7741
|
}
|
|
7751
7742
|
}
|
|
7752
|
-
else if (dom$
|
|
7753
|
-
let manageSeconds = dom$
|
|
7754
|
-
if (dom$
|
|
7743
|
+
else if (dom$o.ketchup.objects.isTime(smeupObj)) {
|
|
7744
|
+
let manageSeconds = dom$o.ketchup.objects.isTimeWithSeconds(smeupObj);
|
|
7745
|
+
if (dom$o.ketchup.dates.isValid(value, manageSeconds
|
|
7755
7746
|
? KupDatesFormats.ISO_TIME
|
|
7756
7747
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS)) {
|
|
7757
7748
|
return newValue;
|
|
@@ -7762,15 +7753,15 @@ class Filters {
|
|
|
7762
7753
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, manageSeconds);
|
|
7763
7754
|
}
|
|
7764
7755
|
}
|
|
7765
|
-
else if (dom$
|
|
7766
|
-
if (dom$
|
|
7756
|
+
else if (dom$o.ketchup.objects.isTimestamp(smeupObj)) {
|
|
7757
|
+
if (dom$o.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE_TIME)) {
|
|
7767
7758
|
return newValue;
|
|
7768
7759
|
}
|
|
7769
7760
|
if (isValidFormattedStringTime(value, true)) {
|
|
7770
7761
|
return formattedStringToDefaultUnformattedStringTimestamp(value);
|
|
7771
7762
|
}
|
|
7772
7763
|
}
|
|
7773
|
-
else if (dom$
|
|
7764
|
+
else if (dom$o.ketchup.objects.isNumber(smeupObj)) {
|
|
7774
7765
|
if (isValidFormattedStringNumber(value, smeupObj ? smeupObj.p : '')) {
|
|
7775
7766
|
return formattedStringToUnformattedStringNumber(value, smeupObj ? smeupObj.p : '');
|
|
7776
7767
|
}
|
|
@@ -7893,7 +7884,7 @@ class Filters {
|
|
|
7893
7884
|
to = interval[FilterInterval.TO];
|
|
7894
7885
|
}
|
|
7895
7886
|
let checkByRegularExpression = true;
|
|
7896
|
-
if (dom$
|
|
7887
|
+
if (dom$o.ketchup.objects.isNumber(obj)) {
|
|
7897
7888
|
value = unformattedStringNumberToNumber(value, obj ? obj.p : '');
|
|
7898
7889
|
let valueNumber = stringToNumber(value);
|
|
7899
7890
|
if (from != '') {
|
|
@@ -7921,30 +7912,30 @@ class Filters {
|
|
|
7921
7912
|
}
|
|
7922
7913
|
}
|
|
7923
7914
|
}
|
|
7924
|
-
if (dom$
|
|
7925
|
-
dom$
|
|
7926
|
-
dom$
|
|
7915
|
+
if (dom$o.ketchup.objects.isDate(obj) ||
|
|
7916
|
+
dom$o.ketchup.objects.isTime(obj) ||
|
|
7917
|
+
dom$o.ketchup.objects.isTimestamp(obj)) {
|
|
7927
7918
|
let valueDate = null;
|
|
7928
7919
|
let defaultFormat = KupDatesFormats.ISO_DATE;
|
|
7929
|
-
if (dom$
|
|
7920
|
+
if (dom$o.ketchup.objects.isDate(obj)) {
|
|
7930
7921
|
defaultFormat = KupDatesFormats.ISO_DATE;
|
|
7931
7922
|
}
|
|
7932
|
-
else if (dom$
|
|
7933
|
-
defaultFormat = dom$
|
|
7923
|
+
else if (dom$o.ketchup.objects.isTime(obj)) {
|
|
7924
|
+
defaultFormat = dom$o.ketchup.objects.isTimeWithSeconds(obj)
|
|
7934
7925
|
? KupDatesFormats.ISO_TIME
|
|
7935
7926
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS;
|
|
7936
7927
|
}
|
|
7937
|
-
else if (dom$
|
|
7928
|
+
else if (dom$o.ketchup.objects.isTimestamp(obj)) {
|
|
7938
7929
|
defaultFormat = KupDatesFormats.ISO_DATE_TIME;
|
|
7939
7930
|
}
|
|
7940
|
-
if (dom$
|
|
7941
|
-
valueDate = dom$
|
|
7931
|
+
if (dom$o.ketchup.dates.isValid(value, defaultFormat, true)) {
|
|
7932
|
+
valueDate = dom$o.ketchup.dates.toDate(value, defaultFormat);
|
|
7942
7933
|
}
|
|
7943
7934
|
if (from != '') {
|
|
7944
7935
|
if (valueDate != null &&
|
|
7945
|
-
dom$
|
|
7936
|
+
dom$o.ketchup.dates.isValid(from, defaultFormat, true)) {
|
|
7946
7937
|
checkByRegularExpression = false;
|
|
7947
|
-
let fromDate = dom$
|
|
7938
|
+
let fromDate = dom$o.ketchup.dates.toDate(from, defaultFormat);
|
|
7948
7939
|
if (valueDate < fromDate) {
|
|
7949
7940
|
return false;
|
|
7950
7941
|
}
|
|
@@ -7955,9 +7946,9 @@ class Filters {
|
|
|
7955
7946
|
}
|
|
7956
7947
|
if (to != '') {
|
|
7957
7948
|
if (valueDate != null &&
|
|
7958
|
-
dom$
|
|
7949
|
+
dom$o.ketchup.dates.isValid(to, defaultFormat, true)) {
|
|
7959
7950
|
checkByRegularExpression = false;
|
|
7960
|
-
let toDate = dom$
|
|
7951
|
+
let toDate = dom$o.ketchup.dates.toDate(to, defaultFormat);
|
|
7961
7952
|
if (valueDate > toDate) {
|
|
7962
7953
|
return false;
|
|
7963
7954
|
}
|
|
@@ -7966,9 +7957,9 @@ class Filters {
|
|
|
7966
7957
|
filterValue = to;
|
|
7967
7958
|
}
|
|
7968
7959
|
}
|
|
7969
|
-
if (!dom$
|
|
7970
|
-
!dom$
|
|
7971
|
-
value = dom$
|
|
7960
|
+
if (!dom$o.ketchup.dates.isValid(filterValue, defaultFormat) &&
|
|
7961
|
+
!dom$o.ketchup.dates.isValid(filterValue)) {
|
|
7962
|
+
value = dom$o.ketchup.dates.format(value);
|
|
7972
7963
|
}
|
|
7973
7964
|
}
|
|
7974
7965
|
if (checkByRegularExpression) {
|
|
@@ -7992,9 +7983,9 @@ class Filters {
|
|
|
7992
7983
|
}
|
|
7993
7984
|
}
|
|
7994
7985
|
|
|
7995
|
-
const dom$
|
|
7996
|
-
const kupObjects$1 = dom$
|
|
7997
|
-
? dom$
|
|
7986
|
+
const dom$n = document.documentElement;
|
|
7987
|
+
const kupObjects$1 = dom$n.ketchup
|
|
7988
|
+
? dom$n.ketchup.objects
|
|
7998
7989
|
: new KupObjects();
|
|
7999
7990
|
/**
|
|
8000
7991
|
* Finds all the cells matching the filters criteria in the input dataset.
|
|
@@ -8003,7 +7994,7 @@ const kupObjects$1 = dom$m.ketchup
|
|
|
8003
7994
|
* @returns {KupDataCell[]} Array of cells fetched after applying the filters.
|
|
8004
7995
|
*/
|
|
8005
7996
|
function findCell(dataset, filters) {
|
|
8006
|
-
return dom$
|
|
7997
|
+
return dom$n.ketchup.data.finder(dataset, filters).cells;
|
|
8007
7998
|
}
|
|
8008
7999
|
/**
|
|
8009
8000
|
* Returns all the cells values of the specified column, sorted if required.
|
|
@@ -8075,7 +8066,7 @@ function replaceCell(dataset, cell, columns) {
|
|
|
8075
8066
|
return replaced;
|
|
8076
8067
|
}
|
|
8077
8068
|
|
|
8078
|
-
const dom$
|
|
8069
|
+
const dom$m = document.documentElement;
|
|
8079
8070
|
/**
|
|
8080
8071
|
* Finds the columns matching the criteria specified in the filters argument.
|
|
8081
8072
|
* @param {KupDataDataset | Column[]} dataset - Input dataset or array of columns.
|
|
@@ -8097,7 +8088,7 @@ function findColumns(dataset, filters) {
|
|
|
8097
8088
|
if (column[key] === filter) {
|
|
8098
8089
|
result.push(column);
|
|
8099
8090
|
}
|
|
8100
|
-
else if (dom$
|
|
8091
|
+
else if (dom$m.ketchup.objects.deepEqual(column[key], filter)) {
|
|
8101
8092
|
result.push(column);
|
|
8102
8093
|
}
|
|
8103
8094
|
}
|
|
@@ -8143,7 +8134,7 @@ function newColumn(dataset, type, options) {
|
|
|
8143
8134
|
return newColumnFromMerge(dataset, options.columns, options.newColumn);
|
|
8144
8135
|
default:
|
|
8145
8136
|
const message = 'Wrong type used to invoke new column creation!(' + type + ')';
|
|
8146
|
-
dom$
|
|
8137
|
+
dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
8147
8138
|
return message;
|
|
8148
8139
|
}
|
|
8149
8140
|
}
|
|
@@ -8157,7 +8148,7 @@ function newColumn(dataset, type, options) {
|
|
|
8157
8148
|
function newColumnFromConcatenate(dataset, columns, separator) {
|
|
8158
8149
|
if (!columns || columns.length === 0) {
|
|
8159
8150
|
const message = 'Invalid array, interrupting column merging!(' + columns + ')';
|
|
8160
|
-
dom$
|
|
8151
|
+
dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
8161
8152
|
return message;
|
|
8162
8153
|
}
|
|
8163
8154
|
let firstColumn = null;
|
|
@@ -8179,12 +8170,12 @@ function newColumnFromConcatenate(dataset, columns, separator) {
|
|
|
8179
8170
|
columns.toString() +
|
|
8180
8171
|
')';
|
|
8181
8172
|
col.visible = true;
|
|
8182
|
-
dom$
|
|
8173
|
+
dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
8183
8174
|
return message;
|
|
8184
8175
|
}
|
|
8185
8176
|
}
|
|
8186
8177
|
const newName = columns.join('_');
|
|
8187
|
-
const newObj = objs.length > 0 && dom$
|
|
8178
|
+
const newObj = objs.length > 0 && dom$m.ketchup.objects.isSameKupObj(objs)
|
|
8188
8179
|
? objs[0]
|
|
8189
8180
|
: null;
|
|
8190
8181
|
const newTitle = titles.join(separator);
|
|
@@ -8251,7 +8242,7 @@ function newColumnFromMath(dataset, operation, columns) {
|
|
|
8251
8242
|
}
|
|
8252
8243
|
if (columns.length === 0) {
|
|
8253
8244
|
const message = "Can't apply math formulas without columns!(" + columns + ')';
|
|
8254
|
-
dom$
|
|
8245
|
+
dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
8255
8246
|
return message;
|
|
8256
8247
|
}
|
|
8257
8248
|
const titles = [];
|
|
@@ -8278,11 +8269,11 @@ function newColumnFromMath(dataset, operation, columns) {
|
|
|
8278
8269
|
const col = dataset.columns[index];
|
|
8279
8270
|
if (columns.includes(col.name)) {
|
|
8280
8271
|
titles[columns.indexOf(col.name)] = col.title;
|
|
8281
|
-
if (!dom$
|
|
8272
|
+
if (!dom$m.ketchup.objects.isNumber(col.obj)) {
|
|
8282
8273
|
const message = "Can't apply math formulas on non-numerical columns!(" +
|
|
8283
8274
|
columns +
|
|
8284
8275
|
')';
|
|
8285
|
-
dom$
|
|
8276
|
+
dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
8286
8277
|
return message;
|
|
8287
8278
|
}
|
|
8288
8279
|
}
|
|
@@ -8293,7 +8284,7 @@ function newColumnFromMath(dataset, operation, columns) {
|
|
|
8293
8284
|
const message = 'This mathematical operation on these columns was already performed!(' +
|
|
8294
8285
|
formula +
|
|
8295
8286
|
')';
|
|
8296
|
-
dom$
|
|
8287
|
+
dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
8297
8288
|
return message;
|
|
8298
8289
|
}
|
|
8299
8290
|
}
|
|
@@ -8321,11 +8312,11 @@ function newColumnFromMath(dataset, operation, columns) {
|
|
|
8321
8312
|
if (!base) {
|
|
8322
8313
|
base = cell;
|
|
8323
8314
|
}
|
|
8324
|
-
formulaRow[column] = dom$
|
|
8315
|
+
formulaRow[column] = dom$m.ketchup.math.numberify(cell.value);
|
|
8325
8316
|
}
|
|
8326
8317
|
}
|
|
8327
8318
|
}
|
|
8328
|
-
const value = dom$
|
|
8319
|
+
const value = dom$m.ketchup.math.formulas
|
|
8329
8320
|
.custom(formula, formulaRow)
|
|
8330
8321
|
.toString();
|
|
8331
8322
|
cells[newName] = Object.assign(Object.assign({}, base), { displayedValue: null, obj: Object.assign(Object.assign({}, newObj), { k: value }), value: value });
|
|
@@ -8373,7 +8364,7 @@ function newColumnFromMerge(dataset, columns2merge, newColumn) {
|
|
|
8373
8364
|
return newColumn;
|
|
8374
8365
|
}
|
|
8375
8366
|
|
|
8376
|
-
const dom$
|
|
8367
|
+
const dom$l = document.documentElement;
|
|
8377
8368
|
/**
|
|
8378
8369
|
* Finds all the rows containing cells matching the filters criteria in the input dataset.
|
|
8379
8370
|
* @param {KupDataDataset} dataset - Input dataset.
|
|
@@ -8381,7 +8372,7 @@ const dom$k = document.documentElement;
|
|
|
8381
8372
|
* @returns {KupDataRow[]} Array of rows fetched after applying the filters.
|
|
8382
8373
|
*/
|
|
8383
8374
|
function findRow(dataset, filters) {
|
|
8384
|
-
return dom$
|
|
8375
|
+
return dom$l.ketchup.data.finder(dataset, filters).rows;
|
|
8385
8376
|
}
|
|
8386
8377
|
/**
|
|
8387
8378
|
* Converts the rows of the input dataset to tree nodes.
|
|
@@ -8723,7 +8714,7 @@ const kupTypes = [
|
|
|
8723
8714
|
FCellTypes.RATING,
|
|
8724
8715
|
];
|
|
8725
8716
|
|
|
8726
|
-
const dom$
|
|
8717
|
+
const dom$k = document.documentElement;
|
|
8727
8718
|
/**
|
|
8728
8719
|
* Handles data operations.
|
|
8729
8720
|
* @module KupData
|
|
@@ -8785,55 +8776,55 @@ class KupData {
|
|
|
8785
8776
|
return FCellTypes.STRING;
|
|
8786
8777
|
}
|
|
8787
8778
|
}
|
|
8788
|
-
if (dom$
|
|
8779
|
+
if (dom$k.ketchup.objects.isBar(obj)) {
|
|
8789
8780
|
return FCellTypes.BAR;
|
|
8790
8781
|
}
|
|
8791
|
-
else if (dom$
|
|
8782
|
+
else if (dom$k.ketchup.objects.isButton(obj)) {
|
|
8792
8783
|
return FCellTypes.BUTTON;
|
|
8793
8784
|
}
|
|
8794
|
-
else if (dom$
|
|
8785
|
+
else if (dom$k.ketchup.objects.isChart(obj)) {
|
|
8795
8786
|
return FCellTypes.CHART;
|
|
8796
8787
|
}
|
|
8797
|
-
else if (dom$
|
|
8788
|
+
else if (dom$k.ketchup.objects.isCheckbox(obj)) {
|
|
8798
8789
|
return FCellTypes.CHECKBOX;
|
|
8799
8790
|
}
|
|
8800
|
-
else if (dom$
|
|
8791
|
+
else if (dom$k.ketchup.objects.isColor(obj)) {
|
|
8801
8792
|
return FCellTypes.COLOR_PICKER;
|
|
8802
8793
|
}
|
|
8803
|
-
else if (dom$
|
|
8794
|
+
else if (dom$k.ketchup.objects.isIcon(obj)) {
|
|
8804
8795
|
return FCellTypes.ICON;
|
|
8805
8796
|
}
|
|
8806
|
-
else if (dom$
|
|
8797
|
+
else if (dom$k.ketchup.objects.isImage(obj)) {
|
|
8807
8798
|
return FCellTypes.IMAGE;
|
|
8808
8799
|
}
|
|
8809
|
-
else if (dom$
|
|
8800
|
+
else if (dom$k.ketchup.objects.isLink(obj)) {
|
|
8810
8801
|
return FCellTypes.LINK;
|
|
8811
8802
|
}
|
|
8812
|
-
else if (dom$
|
|
8803
|
+
else if (dom$k.ketchup.objects.isProgressBar(obj)) {
|
|
8813
8804
|
return FCellTypes.PROGRESS_BAR;
|
|
8814
8805
|
}
|
|
8815
|
-
else if (dom$
|
|
8806
|
+
else if (dom$k.ketchup.objects.isRadio(obj)) {
|
|
8816
8807
|
return FCellTypes.RADIO;
|
|
8817
8808
|
}
|
|
8818
|
-
else if (dom$
|
|
8809
|
+
else if (dom$k.ketchup.objects.isSwitch(obj)) {
|
|
8819
8810
|
return FCellTypes.SWITCH;
|
|
8820
8811
|
}
|
|
8821
|
-
else if (dom$
|
|
8812
|
+
else if (dom$k.ketchup.objects.isKupObjList(obj)) {
|
|
8822
8813
|
return FCellTypes.CHIP;
|
|
8823
8814
|
}
|
|
8824
|
-
else if (dom$
|
|
8815
|
+
else if (dom$k.ketchup.objects.isNumber(obj)) {
|
|
8825
8816
|
return FCellTypes.NUMBER;
|
|
8826
8817
|
}
|
|
8827
|
-
else if (dom$
|
|
8818
|
+
else if (dom$k.ketchup.objects.isDate(obj)) {
|
|
8828
8819
|
return FCellTypes.DATE;
|
|
8829
8820
|
}
|
|
8830
|
-
else if (dom$
|
|
8821
|
+
else if (dom$k.ketchup.objects.isTimestamp(obj)) {
|
|
8831
8822
|
return FCellTypes.DATETIME;
|
|
8832
8823
|
}
|
|
8833
|
-
else if (dom$
|
|
8824
|
+
else if (dom$k.ketchup.objects.isTime(obj)) {
|
|
8834
8825
|
return FCellTypes.TIME;
|
|
8835
8826
|
}
|
|
8836
|
-
else if (dom$
|
|
8827
|
+
else if (dom$k.ketchup.objects.isVoCodver(obj)) {
|
|
8837
8828
|
return FCellTypes.ICON;
|
|
8838
8829
|
}
|
|
8839
8830
|
else {
|
|
@@ -8913,10 +8904,10 @@ class KupData {
|
|
|
8913
8904
|
if (!columns || !columns.length || columns.includes(key)) {
|
|
8914
8905
|
if (min && max) {
|
|
8915
8906
|
let d = null, s = '', n = 0;
|
|
8916
|
-
if (dom$
|
|
8917
|
-
d = dom$
|
|
8918
|
-
const dMax = dom$
|
|
8919
|
-
const dMin = dom$
|
|
8907
|
+
if (dom$k.ketchup.objects.isDate(cell.obj)) {
|
|
8908
|
+
d = dom$k.ketchup.dates.toDate(cell.value);
|
|
8909
|
+
const dMax = dom$k.ketchup.dates.toDate(max instanceof String ? max.valueOf() : max);
|
|
8910
|
+
const dMin = dom$k.ketchup.dates.toDate(min instanceof String ? min.valueOf() : min);
|
|
8920
8911
|
if (d === dMax ||
|
|
8921
8912
|
d === dMin ||
|
|
8922
8913
|
(d < dMax && d > dMin)) {
|
|
@@ -8935,7 +8926,7 @@ class KupData {
|
|
|
8935
8926
|
}
|
|
8936
8927
|
}
|
|
8937
8928
|
else {
|
|
8938
|
-
n = dom$
|
|
8929
|
+
n = dom$k.ketchup.math.numberify(cell.value);
|
|
8939
8930
|
if (n === max ||
|
|
8940
8931
|
n === min ||
|
|
8941
8932
|
(n < max && n > min)) {
|
|
@@ -9092,7 +9083,7 @@ class KupData {
|
|
|
9092
9083
|
sort(dataset, sortType, headerColumn) {
|
|
9093
9084
|
if (sortType != 'normalDistribution') {
|
|
9094
9085
|
const message = 'Wrong sort type! (' + sortType + ')';
|
|
9095
|
-
dom$
|
|
9086
|
+
dom$k.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
9096
9087
|
return dataset;
|
|
9097
9088
|
}
|
|
9098
9089
|
const output = {
|
|
@@ -10888,7 +10879,7 @@ createCommonjsModule(function (module) {
|
|
|
10888
10879
|
}));
|
|
10889
10880
|
});
|
|
10890
10881
|
|
|
10891
|
-
const dom$
|
|
10882
|
+
const dom$j = document.documentElement;
|
|
10892
10883
|
/**
|
|
10893
10884
|
* Takes a mathematical formula as string in input, with column names between brackets, and returns the result as a number.
|
|
10894
10885
|
* @param {string} formula - Mathematical operation (i.e.: ([COL1] - [COL2]) * 100 / [COL3]).
|
|
@@ -10911,7 +10902,7 @@ function customFormula(formula, row) {
|
|
|
10911
10902
|
return result;
|
|
10912
10903
|
}
|
|
10913
10904
|
catch (e) {
|
|
10914
|
-
dom$
|
|
10905
|
+
dom$j.ketchup.debug.logMessage('kup-data', 'Error while evaluating the following formula!(' + formula + ')', KupDebugCategory.ERROR);
|
|
10915
10906
|
return NaN;
|
|
10916
10907
|
}
|
|
10917
10908
|
}
|
|
@@ -10927,7 +10918,7 @@ function normalDistributionFormula(average, variance, x) {
|
|
|
10927
10918
|
Math.exp(-Math.pow(x - average, 2) / (2 * variance)));
|
|
10928
10919
|
}
|
|
10929
10920
|
|
|
10930
|
-
const dom$
|
|
10921
|
+
const dom$i = document.documentElement;
|
|
10931
10922
|
/**
|
|
10932
10923
|
* Handles mathematical operations and number formatting/conversion.
|
|
10933
10924
|
* @module KupMath
|
|
@@ -10950,7 +10941,7 @@ class KupMath {
|
|
|
10950
10941
|
const maximumFractionDigits = 14;
|
|
10951
10942
|
if (value == null || value == '')
|
|
10952
10943
|
return value;
|
|
10953
|
-
return Number(value).toLocaleString(dom$
|
|
10944
|
+
return Number(value).toLocaleString(dom$i.ketchup.math.locale, {
|
|
10954
10945
|
maximumFractionDigits: maximumFractionDigits,
|
|
10955
10946
|
});
|
|
10956
10947
|
},
|
|
@@ -10967,7 +10958,7 @@ class KupMath {
|
|
|
10967
10958
|
setLocale(locale) {
|
|
10968
10959
|
if (!Object.values(KupMathLocales).includes(locale)) {
|
|
10969
10960
|
locale = KupMathLocales.en;
|
|
10970
|
-
dom$
|
|
10961
|
+
dom$i.ketchup.debug.logMessage('kup-math', 'Invalid locale (' + locale + ')! Defaulting to english.', KupDebugCategory.WARNING);
|
|
10971
10962
|
}
|
|
10972
10963
|
this.locale = locale;
|
|
10973
10964
|
this.numeral.locale(locale);
|
|
@@ -11021,10 +11012,11 @@ class KupMath {
|
|
|
11021
11012
|
* Formats the input number with the specified format of the currently set locale.
|
|
11022
11013
|
* @param {string | String | number} input - Input number which will be automatically "numberified".
|
|
11023
11014
|
* @param {string} format - Desired format. Defaults to '0,0.00' (i.e.: 2,000,000.51).
|
|
11015
|
+
* @param {boolean} inputIsLocalized Numberifies assuming the input string is in the current KupMath locale's format.
|
|
11024
11016
|
* @returns {string} Formatted number.
|
|
11025
11017
|
*/
|
|
11026
|
-
format(input, format) {
|
|
11027
|
-
const n = this.numberify(input);
|
|
11018
|
+
format(input, format, inputIsLocalized) {
|
|
11019
|
+
const n = this.numberify(input, inputIsLocalized);
|
|
11028
11020
|
if (!format) {
|
|
11029
11021
|
const positiveN = Math.abs(n);
|
|
11030
11022
|
const decimals = positiveN - Math.floor(positiveN);
|
|
@@ -11035,8 +11027,88 @@ class KupMath {
|
|
|
11035
11027
|
format = '0,0';
|
|
11036
11028
|
}
|
|
11037
11029
|
}
|
|
11038
|
-
|
|
11039
|
-
|
|
11030
|
+
return this.numeral(n).format(format);
|
|
11031
|
+
}
|
|
11032
|
+
/**
|
|
11033
|
+
* Created the string for format a number
|
|
11034
|
+
* @param {boolean} thousandPoint - show thousandPoint
|
|
11035
|
+
* @param {number} decimals - number of decimals
|
|
11036
|
+
*/
|
|
11037
|
+
createFormatPattern(thousandPoint, decimals) {
|
|
11038
|
+
var format = '0';
|
|
11039
|
+
if (thousandPoint) {
|
|
11040
|
+
format += ',000';
|
|
11041
|
+
}
|
|
11042
|
+
if (decimals && decimals > 0) {
|
|
11043
|
+
format += '.';
|
|
11044
|
+
for (let i = 0; i < decimals; i++) {
|
|
11045
|
+
format += '0';
|
|
11046
|
+
}
|
|
11047
|
+
}
|
|
11048
|
+
return format;
|
|
11049
|
+
}
|
|
11050
|
+
/**
|
|
11051
|
+
* Returns the decimal separator of current browser
|
|
11052
|
+
* @returns current decimal separator, by locale
|
|
11053
|
+
*/
|
|
11054
|
+
decimalSeparator() {
|
|
11055
|
+
const numberWithGroupAndDecimalSeparator = 1000.1;
|
|
11056
|
+
return Intl.NumberFormat(this.locale)
|
|
11057
|
+
.formatToParts(numberWithGroupAndDecimalSeparator)
|
|
11058
|
+
.find((part) => part.type === 'decimal').value;
|
|
11059
|
+
}
|
|
11060
|
+
/**
|
|
11061
|
+
* Returns the group separator of current browser
|
|
11062
|
+
* @returns current group separator, by locale
|
|
11063
|
+
*/
|
|
11064
|
+
groupSeparator() {
|
|
11065
|
+
const numberWithGroupAndDecimalSeparator = 1000.1;
|
|
11066
|
+
return Intl.NumberFormat(this.locale)
|
|
11067
|
+
.formatToParts(numberWithGroupAndDecimalSeparator)
|
|
11068
|
+
.find((part) => part.type === 'group').value;
|
|
11069
|
+
}
|
|
11070
|
+
/**
|
|
11071
|
+
* Checks if an input string matches options, for desired formatted decimal number (integer digits, decimal digits)
|
|
11072
|
+
* @param value the input value to check
|
|
11073
|
+
* @param options options for customize the check
|
|
11074
|
+
* @returns an object from applying the regular expression for check
|
|
11075
|
+
*/
|
|
11076
|
+
matchNumericValueWithOptions(value, options) {
|
|
11077
|
+
// see https://github.com/24eme/jquery-input-number-format.git
|
|
11078
|
+
let found = undefined;
|
|
11079
|
+
let integerPartSuffix = '+';
|
|
11080
|
+
if (options.integer && options.integer > 0) {
|
|
11081
|
+
integerPartSuffix = '{0,' + options.integer + '}';
|
|
11082
|
+
}
|
|
11083
|
+
let regexp = '^[0-9]' + integerPartSuffix;
|
|
11084
|
+
if (options.allowNegative) {
|
|
11085
|
+
regexp = '^-{0,1}[0-9]' + integerPartSuffix;
|
|
11086
|
+
}
|
|
11087
|
+
if (options.decimal && options.decimal > 0) {
|
|
11088
|
+
regexp +=
|
|
11089
|
+
'([' +
|
|
11090
|
+
this.decimalSeparator() +
|
|
11091
|
+
'][0-9]{0,' +
|
|
11092
|
+
options.decimal +
|
|
11093
|
+
'})?';
|
|
11094
|
+
let regexpObj = new RegExp(regexp + '$');
|
|
11095
|
+
found = value.match(regexpObj);
|
|
11096
|
+
if (!found) {
|
|
11097
|
+
regexp =
|
|
11098
|
+
'^[' +
|
|
11099
|
+
this.decimalSeparator() +
|
|
11100
|
+
'][0-9]{0,' +
|
|
11101
|
+
options.decimal +
|
|
11102
|
+
'}';
|
|
11103
|
+
regexpObj = new RegExp(regexp + '$');
|
|
11104
|
+
found = value.match(regexpObj);
|
|
11105
|
+
}
|
|
11106
|
+
}
|
|
11107
|
+
else {
|
|
11108
|
+
let regexpObj = new RegExp(regexp + '$');
|
|
11109
|
+
found = value.match(regexpObj);
|
|
11110
|
+
}
|
|
11111
|
+
return found;
|
|
11040
11112
|
}
|
|
11041
11113
|
/**
|
|
11042
11114
|
* Returns a number from a non-specified input type between string, number, or String.
|
|
@@ -11079,7 +11151,7 @@ class KupMath {
|
|
|
11079
11151
|
}
|
|
11080
11152
|
}
|
|
11081
11153
|
|
|
11082
|
-
var __classPrivateFieldGet$
|
|
11154
|
+
var __classPrivateFieldGet$8 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11083
11155
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
11084
11156
|
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");
|
|
11085
11157
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -11091,7 +11163,7 @@ var __classPrivateFieldSet$5 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
11091
11163
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11092
11164
|
};
|
|
11093
11165
|
var _KupTooltip_instances, _KupTooltip_clickCb, _KupTooltip_dynPos, _KupTooltip_create, _KupTooltip_setOptions;
|
|
11094
|
-
const dom$
|
|
11166
|
+
const dom$h = document.documentElement;
|
|
11095
11167
|
/**
|
|
11096
11168
|
* Handles application-wide tooltip using card component.
|
|
11097
11169
|
* @module KupTooltip
|
|
@@ -11204,8 +11276,8 @@ class KupTooltip {
|
|
|
11204
11276
|
hide() {
|
|
11205
11277
|
if (this.element) {
|
|
11206
11278
|
this.element.menuVisible = false;
|
|
11207
|
-
dom$
|
|
11208
|
-
dom$
|
|
11279
|
+
dom$h.ketchup.dynamicPosition.stop(this.element);
|
|
11280
|
+
dom$h.ketchup.removeClickCallback(__classPrivateFieldGet$8(this, _KupTooltip_clickCb, "f"));
|
|
11209
11281
|
}
|
|
11210
11282
|
}
|
|
11211
11283
|
/**
|
|
@@ -11216,26 +11288,26 @@ class KupTooltip {
|
|
|
11216
11288
|
show(anchor, options) {
|
|
11217
11289
|
// Creates the card or updates it with new options
|
|
11218
11290
|
if (!this.element) {
|
|
11219
|
-
__classPrivateFieldGet$
|
|
11291
|
+
__classPrivateFieldGet$8(this, _KupTooltip_instances, "m", _KupTooltip_create).call(this, options);
|
|
11220
11292
|
}
|
|
11221
11293
|
else if (options) {
|
|
11222
|
-
__classPrivateFieldGet$
|
|
11294
|
+
__classPrivateFieldGet$8(this, _KupTooltip_instances, "m", _KupTooltip_setOptions).call(this, options);
|
|
11223
11295
|
}
|
|
11224
11296
|
// If an anchor was provided, initializes or updates dynamic positioning
|
|
11225
11297
|
if (anchor) {
|
|
11226
|
-
__classPrivateFieldGet$
|
|
11298
|
+
__classPrivateFieldGet$8(this, _KupTooltip_instances, "m", _KupTooltip_dynPos).call(this, anchor);
|
|
11227
11299
|
}
|
|
11228
11300
|
// If the tooltip is already visible, it's pointless to go on
|
|
11229
11301
|
if (this.element.menuVisible) {
|
|
11230
11302
|
return;
|
|
11231
11303
|
}
|
|
11232
11304
|
// If the dynamic positioning is still to be registered, a warning is thrown
|
|
11233
|
-
if (!dom$
|
|
11234
|
-
dom$
|
|
11305
|
+
if (!dom$h.ketchup.dynamicPosition.isRegistered(this.element)) {
|
|
11306
|
+
dom$h.ketchup.debug.logMessage('kup-tooltip', 'Unable to display KupTooltip without specifying a valid anchor point.', KupDebugCategory.WARNING);
|
|
11235
11307
|
return;
|
|
11236
11308
|
}
|
|
11237
11309
|
this.element.menuVisible = true;
|
|
11238
|
-
dom$
|
|
11310
|
+
dom$h.ketchup.addClickCallback(__classPrivateFieldGet$8(this, _KupTooltip_clickCb, "f"), true);
|
|
11239
11311
|
}
|
|
11240
11312
|
/**
|
|
11241
11313
|
* Returns whether an element was previously registered or not.
|
|
@@ -11270,13 +11342,13 @@ class KupTooltip {
|
|
|
11270
11342
|
}
|
|
11271
11343
|
}
|
|
11272
11344
|
_KupTooltip_clickCb = new WeakMap(), _KupTooltip_instances = new WeakSet(), _KupTooltip_dynPos = function _KupTooltip_dynPos(anchor) {
|
|
11273
|
-
if (dom$
|
|
11274
|
-
dom$
|
|
11345
|
+
if (dom$h.ketchup.dynamicPosition.isRegistered(this.element)) {
|
|
11346
|
+
dom$h.ketchup.dynamicPosition.changeAnchor(this.element, anchor);
|
|
11275
11347
|
}
|
|
11276
11348
|
else {
|
|
11277
|
-
dom$
|
|
11349
|
+
dom$h.ketchup.dynamicPosition.register(this.element, anchor, null, null, true);
|
|
11278
11350
|
}
|
|
11279
|
-
dom$
|
|
11351
|
+
dom$h.ketchup.dynamicPosition.start(this.element);
|
|
11280
11352
|
}, _KupTooltip_create = function _KupTooltip_create(options) {
|
|
11281
11353
|
this.element = document.createElement('kup-card');
|
|
11282
11354
|
this.element.id = 'kup-tooltip';
|
|
@@ -11285,7 +11357,7 @@ _KupTooltip_clickCb = new WeakMap(), _KupTooltip_instances = new WeakSet(), _Kup
|
|
|
11285
11357
|
this.element.sizeX = 'auto';
|
|
11286
11358
|
this.element.sizeY = 'auto';
|
|
11287
11359
|
if (options) {
|
|
11288
|
-
__classPrivateFieldGet$
|
|
11360
|
+
__classPrivateFieldGet$8(this, _KupTooltip_instances, "m", _KupTooltip_setOptions).call(this, options);
|
|
11289
11361
|
}
|
|
11290
11362
|
document.body.appendChild(this.element);
|
|
11291
11363
|
__classPrivateFieldSet$5(this, _KupTooltip_clickCb, {
|
|
@@ -19131,7 +19203,7 @@ var html2canvas = createCommonjsModule(function (module, exports) {
|
|
|
19131
19203
|
//# sourceMappingURL=html2canvas.js.map
|
|
19132
19204
|
});
|
|
19133
19205
|
|
|
19134
|
-
const dom$
|
|
19206
|
+
const dom$g = document.documentElement;
|
|
19135
19207
|
/**
|
|
19136
19208
|
* This class controls every other Ketchup utility suite.
|
|
19137
19209
|
* @module KupManager
|
|
@@ -19393,26 +19465,26 @@ class KupManager {
|
|
|
19393
19465
|
*/
|
|
19394
19466
|
function kupManagerInstance() {
|
|
19395
19467
|
var _a;
|
|
19396
|
-
if (!dom$
|
|
19397
|
-
const overrides = (_a = dom$
|
|
19398
|
-
dom$
|
|
19399
|
-
dom$
|
|
19400
|
-
if (dom$
|
|
19401
|
-
dom$
|
|
19402
|
-
}
|
|
19403
|
-
globalThis.kupManager = dom$
|
|
19468
|
+
if (!dom$g.ketchup) {
|
|
19469
|
+
const overrides = (_a = dom$g.ketchupInit) !== null && _a !== void 0 ? _a : null;
|
|
19470
|
+
dom$g.ketchup = new KupManager(overrides);
|
|
19471
|
+
dom$g.ketchup.theme.set();
|
|
19472
|
+
if (dom$g.ketchup.debug.active) {
|
|
19473
|
+
dom$g.ketchup.debug.toggle(dom$g.ketchup.debug.active);
|
|
19474
|
+
}
|
|
19475
|
+
globalThis.kupManager = dom$g.ketchup;
|
|
19404
19476
|
if (overrides === null || overrides === void 0 ? void 0 : overrides.autoSetLocalization) {
|
|
19405
|
-
const locale = dom$
|
|
19477
|
+
const locale = dom$g.ketchup.dates.locale;
|
|
19406
19478
|
if (!overrides.language || !overrides.language.name) {
|
|
19407
|
-
dom$
|
|
19479
|
+
dom$g.ketchup.language.set(KupLanguageDefaults[locale]);
|
|
19408
19480
|
}
|
|
19409
19481
|
if (!overrides.math || !overrides.math.locale) {
|
|
19410
|
-
dom$
|
|
19482
|
+
dom$g.ketchup.math.setLocale(KupMathLocales[locale]);
|
|
19411
19483
|
}
|
|
19412
19484
|
}
|
|
19413
19485
|
document.dispatchEvent(new CustomEvent('kup-manager-ready'));
|
|
19414
19486
|
}
|
|
19415
|
-
return dom$
|
|
19487
|
+
return dom$g.ketchup;
|
|
19416
19488
|
}
|
|
19417
19489
|
|
|
19418
19490
|
/**
|
|
@@ -19529,6 +19601,7 @@ function createBar(data) {
|
|
|
19529
19601
|
*/
|
|
19530
19602
|
const componentWrapperId = 'kup-component';
|
|
19531
19603
|
|
|
19604
|
+
const dom$f = document.documentElement;
|
|
19532
19605
|
/*-------------------------------------------------*/
|
|
19533
19606
|
/* C o m p o n e n t */
|
|
19534
19607
|
/*-------------------------------------------------*/
|
|
@@ -19545,6 +19618,7 @@ const FTextField = (props, children) => {
|
|
|
19545
19618
|
/* M e t h o d s */
|
|
19546
19619
|
/*-------------------------------------------------*/
|
|
19547
19620
|
function setContent(props) {
|
|
19621
|
+
var _a, _b;
|
|
19548
19622
|
const isOutlined = props.textArea || props.outlined;
|
|
19549
19623
|
let labelEl;
|
|
19550
19624
|
let iconEl;
|
|
@@ -19578,23 +19652,85 @@ function setContent(props) {
|
|
|
19578
19652
|
'mdc-text-field--with-leading-icon': props.icon && !props.trailingIcon,
|
|
19579
19653
|
'mdc-text-field--with-trailing-icon': props.icon && props.trailingIcon,
|
|
19580
19654
|
};
|
|
19655
|
+
let value = props.value;
|
|
19656
|
+
let inputType = (_a = props.inputType) !== null && _a !== void 0 ? _a : 'text';
|
|
19657
|
+
let persManageForNumberFormat = false;
|
|
19658
|
+
if (props.inputType === 'number' && props.decimals && props.decimals > 0) {
|
|
19659
|
+
inputType = 'text';
|
|
19660
|
+
persManageForNumberFormat = true;
|
|
19661
|
+
}
|
|
19662
|
+
if (props.inputType === 'number') {
|
|
19663
|
+
const options = {
|
|
19664
|
+
allowNegative: (_b = props.allowNegative) !== null && _b !== void 0 ? _b : true,
|
|
19665
|
+
decimal: props.decimals,
|
|
19666
|
+
group: props.group,
|
|
19667
|
+
integer: props.integers,
|
|
19668
|
+
};
|
|
19669
|
+
value = formatValue(value, options, false);
|
|
19670
|
+
}
|
|
19581
19671
|
return (h("div", { class: classObj },
|
|
19582
19672
|
props.textArea && props.maxLength ? (h("div", { class: "mdc-text-field-character-counter" },
|
|
19583
19673
|
"'0 / ' + ",
|
|
19584
19674
|
props.maxLength)) : undefined,
|
|
19585
19675
|
!props.trailingIcon ? iconEl : undefined,
|
|
19586
19676
|
props.textArea ? (h("span", { class: "mdc-text-field__resizer" },
|
|
19587
|
-
h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value:
|
|
19677
|
+
h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { inputmode: props.inputMode ? props.inputMode : undefined, type: inputType, step: props.step, min: props.min, max: props.max, name: props.name, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth && !props.outlined
|
|
19588
19678
|
? props.label
|
|
19589
|
-
: undefined, maxlength: props.maxLength, value:
|
|
19590
|
-
|
|
19591
|
-
|
|
19592
|
-
|
|
19679
|
+
: undefined, maxlength: props.maxLength, value: value, onBlur: (e) => {
|
|
19680
|
+
var _a;
|
|
19681
|
+
if (persManageForNumberFormat) {
|
|
19682
|
+
const options = {
|
|
19683
|
+
allowNegative: (_a = props.allowNegative) !== null && _a !== void 0 ? _a : true,
|
|
19684
|
+
decimal: props.decimals,
|
|
19685
|
+
group: props.group,
|
|
19686
|
+
integer: props.integers,
|
|
19687
|
+
};
|
|
19688
|
+
e.target.value = formatValue(e.target.value, options, true);
|
|
19689
|
+
}
|
|
19690
|
+
if (props.onBlur) {
|
|
19691
|
+
props.onBlur(e);
|
|
19692
|
+
}
|
|
19693
|
+
}, onChange: (e) => {
|
|
19694
|
+
var _a;
|
|
19695
|
+
if (persManageForNumberFormat) {
|
|
19696
|
+
const options = {
|
|
19697
|
+
allowNegative: (_a = props.allowNegative) !== null && _a !== void 0 ? _a : true,
|
|
19698
|
+
decimal: props.decimals,
|
|
19699
|
+
group: props.group,
|
|
19700
|
+
integer: props.integers,
|
|
19701
|
+
};
|
|
19702
|
+
e.target.value = formatValue(e.target.value, options, true);
|
|
19593
19703
|
}
|
|
19594
19704
|
if (props.onChange) {
|
|
19595
19705
|
props.onChange(e);
|
|
19596
19706
|
}
|
|
19597
|
-
}, onClick: props.onClick, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown
|
|
19707
|
+
}, onClick: props.onClick, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown, onKeyPress: (e) => {
|
|
19708
|
+
var _a;
|
|
19709
|
+
if (!persManageForNumberFormat) {
|
|
19710
|
+
return;
|
|
19711
|
+
}
|
|
19712
|
+
if (e.ctrlKey) {
|
|
19713
|
+
return;
|
|
19714
|
+
}
|
|
19715
|
+
if (e.key.length > 1) {
|
|
19716
|
+
return;
|
|
19717
|
+
}
|
|
19718
|
+
const options = {
|
|
19719
|
+
allowNegative: (_a = props.allowNegative) !== null && _a !== void 0 ? _a : true,
|
|
19720
|
+
decimal: props.decimals,
|
|
19721
|
+
group: props.group,
|
|
19722
|
+
integer: props.integers,
|
|
19723
|
+
};
|
|
19724
|
+
let component = e.target;
|
|
19725
|
+
let value = component.value;
|
|
19726
|
+
let beginVal = value.substring(0, component.selectionStart);
|
|
19727
|
+
let endVal = value.substring(component.selectionEnd, component.selectionEnd + value.length - 1);
|
|
19728
|
+
let val = beginVal + e.key + endVal;
|
|
19729
|
+
if (!dom$f.ketchup.math.matchNumericValueWithOptions(val, options)) {
|
|
19730
|
+
e.preventDefault();
|
|
19731
|
+
return;
|
|
19732
|
+
}
|
|
19733
|
+
} })),
|
|
19598
19734
|
props.isClearable ? (h("span", { class: `mdc-text-field__icon kup-icon ${KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onClearIconClick })) : undefined,
|
|
19599
19735
|
props.trailingIcon ? iconEl : undefined,
|
|
19600
19736
|
!props.fullWidth && !isOutlined ? labelEl : undefined,
|
|
@@ -19625,7 +19761,17 @@ function setHelper(props) {
|
|
|
19625
19761
|
}
|
|
19626
19762
|
}
|
|
19627
19763
|
}
|
|
19628
|
-
}
|
|
19764
|
+
}
|
|
19765
|
+
const formatValue = function (value, options, inputIsLocalized) {
|
|
19766
|
+
let formatedValue = value;
|
|
19767
|
+
if (!formatedValue) {
|
|
19768
|
+
return formatedValue;
|
|
19769
|
+
}
|
|
19770
|
+
if (formatedValue == '-') {
|
|
19771
|
+
return '';
|
|
19772
|
+
}
|
|
19773
|
+
return dom$f.ketchup.math.format(formatedValue, dom$f.ketchup.math.createFormatPattern(options.group, options.decimal), inputIsLocalized);
|
|
19774
|
+
};
|
|
19629
19775
|
|
|
19630
19776
|
/**
|
|
19631
19777
|
* @license
|
|
@@ -23041,10 +23187,7 @@ function cellEvent(e, props, cellType, cellEventName) {
|
|
|
23041
23187
|
const column = props.column;
|
|
23042
23188
|
const comp = props.component;
|
|
23043
23189
|
const row = props.row;
|
|
23044
|
-
|
|
23045
|
-
let value = isInputEvent
|
|
23046
|
-
? e.target.value
|
|
23047
|
-
: e.detail.value;
|
|
23190
|
+
let value = getValueFromEventTaget(e, cellType);
|
|
23048
23191
|
if (cellEventName === FCellEvents.UPDATE) {
|
|
23049
23192
|
switch (cellType) {
|
|
23050
23193
|
case FCellTypes.AUTOCOMPLETE:
|
|
@@ -23104,6 +23247,16 @@ function cellEvent(e, props, cellType, cellEventName) {
|
|
|
23104
23247
|
}
|
|
23105
23248
|
}
|
|
23106
23249
|
}
|
|
23250
|
+
function getValueFromEventTaget(e, cellType) {
|
|
23251
|
+
const isInputEvent = !!(e.target.tagName === 'INPUT');
|
|
23252
|
+
let value = isInputEvent
|
|
23253
|
+
? e.target.value
|
|
23254
|
+
: e.detail.value;
|
|
23255
|
+
if (cellType === FCellTypes.NUMBER && isInputEvent) {
|
|
23256
|
+
value = formattedStringToUnformattedStringNumber(value, '');
|
|
23257
|
+
}
|
|
23258
|
+
return value;
|
|
23259
|
+
}
|
|
23107
23260
|
function isAutoCentered(props) {
|
|
23108
23261
|
var _a;
|
|
23109
23262
|
return autoCenterComps.includes((_a = props.component) === null || _a === void 0 ? void 0 : _a.rootElement.tagName);
|
|
@@ -28909,8 +29062,8 @@ class KupDataTableState {
|
|
|
28909
29062
|
this.expandGroups = false;
|
|
28910
29063
|
this.groupLabelDisplay = GroupLabelDisplayMode.BOTH;
|
|
28911
29064
|
this.density = 'small';
|
|
28912
|
-
this.enableSortableColumns = false;
|
|
28913
29065
|
this.enableExtraColumns = true;
|
|
29066
|
+
this.enableSortableColumns = false;
|
|
28914
29067
|
this.forceOneLine = false;
|
|
28915
29068
|
this.globalFilter = false;
|
|
28916
29069
|
this.globalFilterValue = '';
|
|
@@ -30787,11 +30940,13 @@ var KupTabBarProps;
|
|
|
30787
30940
|
*/
|
|
30788
30941
|
var KupTextFieldProps;
|
|
30789
30942
|
(function (KupTextFieldProps) {
|
|
30943
|
+
KupTextFieldProps["allowNegative"] = "When true, could be input negative numbers. It has effect only with number input type.";
|
|
30790
30944
|
KupTextFieldProps["customStyle"] = "Custom style of the component.";
|
|
30791
30945
|
KupTextFieldProps["decimals"] = "Number of decimals (should be used when inputType is number).";
|
|
30792
30946
|
KupTextFieldProps["disabled"] = "When set to true, the component is disabled.";
|
|
30793
30947
|
KupTextFieldProps["emitSubmitEventOnEnter"] = "When the text field is part of the autocomplete component and the list is opened, enter key selects the item and doesn't submit.";
|
|
30794
30948
|
KupTextFieldProps["fullWidth"] = "When set to true, the component will be rendered at full width.";
|
|
30949
|
+
KupTextFieldProps["group"] = "When true, the number will be formatted with group separator. It has effect only with number input type.";
|
|
30795
30950
|
KupTextFieldProps["helper"] = "When set, its content will be shown as a help text below the field.";
|
|
30796
30951
|
KupTextFieldProps["helperEnabled"] = "When true, the helper will be displayed.";
|
|
30797
30952
|
KupTextFieldProps["helperWhenFocused"] = "When set, the helper will be shown only when the field is focused.";
|
|
@@ -30799,6 +30954,7 @@ var KupTextFieldProps;
|
|
|
30799
30954
|
KupTextFieldProps["initialValue"] = "Sets the initial value of the component";
|
|
30800
30955
|
KupTextFieldProps["inputMode"] = "The HTML inputmode of the input element. It has no effect on text areas.";
|
|
30801
30956
|
KupTextFieldProps["inputType"] = "The HTML type of the input element. It has no effect on text areas.";
|
|
30957
|
+
KupTextFieldProps["integers"] = "Number of integers (should be used when inputType is number).";
|
|
30802
30958
|
KupTextFieldProps["isClearable"] = "Enables a clear trailing icon.";
|
|
30803
30959
|
KupTextFieldProps["label"] = "When set, its content will be shown as a label.";
|
|
30804
30960
|
KupTextFieldProps["leadingLabel"] = "When set to true, the label will be on the left of the component.";
|
|
@@ -30960,7 +31116,7 @@ class FiltersTreeItems extends FiltersRows {
|
|
|
30960
31116
|
|
|
30961
31117
|
const kupTreeCss = ":host{--kup_tree_border:var(--kup-tree-border, 1px solid var(--kup-border-color));--kup_tree_color:var(--kup-tree-color, var(--kup-text-color));--kup_tree_color_rgb:var(--kup-tree-color-rgb, var(--kup-text-color-rgb));--kup_tree_font_family:var(--kup-tree-font-family, var(--kup-font-family));--kup_tree_filter_background_color:var(--kup-tree-filter-background-color, var(--kup-background-color));--kup_tree_font_family_monospace:var(\n --kup-tree-font-family-monospace,\n var(--kup-font-family-monospace)\n );--kup_tree_font_size:var(--kup-tree-font-size, var(--kup-font-size));--kup_tree_hover_color:var(--kup-tree-hover-color, var(--kup-hover-color));--kup_tree_hover_background_color:var(\n --kup-tree-hover-background-color,\n var(--kup-hover-background-color)\n );--kup_tree_icon_color:var(--kup-tree-icon-color, var(--kup-icon-color));--kup_tree_primary_color:var(\n --kup-tree-primary-color,\n var(--kup-primary-color)\n );--kup_tree_primary_color_rgb:var(\n --kup-tree-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_tree_text_on_primary_color:var(\n --kup-tree-text-on-primary-color,\n var(--kup-text-on-primary-color)\n );display:block;font-family:var(--kup_tree_font_family);font-size:var(--kup_tree_font_size)}:host([prevent-x-scroll]) .wrapper{overflow-x:hidden}#kup-component{color:var(--kup_tree_color)}.density-dense .wrapper .kup-tree td:not(.grid-cell),.density-dense .wrapper .kup-tree th{padding:0 0.5em}.density-dense .wrapper .kup-tree td:not(.grid-cell) .kup-tree__icon~.cell-content,.density-dense .wrapper .kup-tree td:not(.grid-cell) .kup-tree__icon+.cell-content,.density-dense .wrapper .kup-tree th .kup-tree__icon~.cell-content,.density-dense .wrapper .kup-tree th .kup-tree__icon+.cell-content{vertical-align:0.4em}.density-wide .wrapper .kup-tree td:not(.grid-cell),.density-wide .wrapper .kup-tree th{padding:0.75em 0.5em}.wrapper{overflow-x:auto}.wrapper .kup-tree{border-collapse:collapse;width:max-content}.wrapper .kup-tree thead{display:none}.wrapper .kup-tree thead.header--is-visible{display:table-header-group}.wrapper .kup-tree thead.header--is-visible th{padding:0.8em 0.5em;font-size:1.1em}.wrapper .kup-tree thead th{text-align:left}.wrapper .kup-tree tr,.wrapper .kup-tree td{font-size:1em;line-height:1em}.wrapper .kup-tree tr.mdc-ripple-surface,.wrapper .kup-tree td.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.wrapper .kup-tree tr.mdc-ripple-surface:before,.wrapper .kup-tree tr.mdc-ripple-surface:after,.wrapper .kup-tree td.mdc-ripple-surface:before,.wrapper .kup-tree td.mdc-ripple-surface:after{background-color:var(--kup_tree_primary_color)}.wrapper .kup-tree tr .kup-tree__icon~.cell-content,.wrapper .kup-tree tr .kup-tree__icon+.cell-content,.wrapper .kup-tree td .kup-tree__icon~.cell-content,.wrapper .kup-tree td .kup-tree__icon+.cell-content{display:inline-block;vertical-align:0.3em}.wrapper .kup-tree td:not(.grid-cell),.wrapper .kup-tree th{padding:0.4em 0.5em}.wrapper .kup-tree td{padding:0;white-space:nowrap}.wrapper .kup-tree__indent{display:inline-block;width:calc(1.5em * var(--kup_tree_node_depth, 0))}.wrapper .kup-tree__icon{display:inline-block;margin-right:0.4em;height:1.5em;min-width:1.5em;width:1.5em}.wrapper .kup-tree__node__expander{transition:transform 0.1s}.wrapper .kup-tree__node{cursor:default}.wrapper .kup-tree__node.with-dyn:not(.kup-tree__node--disabled){cursor:pointer}.wrapper .kup-tree__node:not(.kup-tree__node--disabled) .wrapper .kup-tree__node__expander{cursor:pointer}.wrapper .kup-tree__node:not(.kup-tree__node--disabled) .kup-icon.kup-tree__node__expander{cursor:pointer}.wrapper .kup-tree__node--disabled{opacity:0.4}.wrapper .kup-tree__node--disabled__expander{pointer-events:none}.wrapper .kup-tree__node .kup-icon:not(.is-image){background-color:var(--kup_tree_icon_color)}.wrapper .kup-tree__node .kup-icon.kup-tree__node__expander:not(.is-image){background-color:var(--kup_tree_color)}.wrapper .kup-tree__node .kup-icon.is-image img{display:block;height:auto;width:100%}.wrapper .kup-tree__node:hover:not(.kup-tree__node--disabled):not(.kup-tree__node--selected) td{background-color:var(--kup_tree_hover_background_color);color:var(--kup_tree_hover_color)}.wrapper .kup-tree__node:hover:not(.kup-tree__node--disabled):not(.kup-tree__node--selected) td .kup-icon{background-color:var(--kup_tree_hover_color)}.wrapper .kup-tree__node--selected:not(.kup-tree__node--disabled) td{background-color:rgba(var(--kup_tree_primary_color_rgb), 0.175);color:var(--kup_tree_color)}.wrapper .kup-tree[data-show-columns] .kup-tree__node{border-bottom:solid 1px var(--kup-border-color)}#global-filter{background:var(--kup_tree_filter_background_color);margin-bottom:1em;position:sticky;top:0;z-index:1}.first-node .cell-content{font-weight:bold}.cell-content--ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--kup_tree_content_width, auto)}.cell-content--highlighted{color:var(--kup_tree_text_on_primary_color);background-color:var(--kup_tree_primary_color)}.kup-icon.kup-filter-remove-icon:not(.f-image){background-color:var(--kup_tree_color);margin:0 0.25em;height:1em;width:1em;cursor:pointer;float:right;margin:0 0.25em;opacity:0.5}.grid-cell{height:0}tfoot td{border-bottom:var(--kup_tree_border);border-right:var(--kup_tree_border);box-sizing:border-box;height:36px;text-align:right;font-weight:bold;padding:0.5em 0.3125em}tfoot td:hover{background-color:var(--kup-background-color)}tfoot td:first-of-type{border:none;border-right:var(--kup_tree_border)}.hidden span{color:transparent;position:relative;text-overflow:ellipsis;transition:color 200ms}.hidden span:hover{color:var(--kup_tree_color)}.totals-value{font-weight:bold}:host([as-accordion]) .wrapper .kup-tree thead{display:table-header-group}:host([as-accordion]) .wrapper .kup-tree thead tr{border-left:var(--kup_tree_border);border-right:var(--kup_tree_border)}:host([as-accordion]) .density-dense .first-node:not(.grid-cell){padding:0.5em 1em}:host([as-accordion]) .density-medium .first-node:not(.grid-cell){padding:1em 1.5em}:host([as-accordion]) .density-wide .first-node:not(.grid-cell){padding:1.75em 1.75em}:host([as-accordion]) .kup-tree__node--first{border:none;box-sizing:border-box;display:block}:host([as-accordion]) .kup-tree__node--first:hover,:host([as-accordion]) .kup-tree__node--first[data-is-expanded]{background-color:var(--kup_tree_hover_background_color)}:host([as-accordion]) .kup-tree__node--first:hover .cell-content,:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .cell-content{color:var(--kup_tree_hover_color)}:host([as-accordion]) .kup-tree__node--first:hover .kup-icon,:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .kup-icon{background-color:var(--kup_tree_hover_color)}:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .first-node{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .kup-dropdown-icon{transform:rotate(180deg)}:host([as-accordion]) .kup-tree__node--first:first-of-type .first-node{border-top-left-radius:4px;border-top-right-radius:4px;border-top:var(--kup_tree_border)}:host([as-accordion]) .kup-tree__node--first:last-of-type .first-node{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host([as-accordion]) .kup-tree__node--first .first-node{align-items:center;border-bottom:var(--kup_tree_border);border-left:var(--kup_tree_border);border-right:var(--kup_tree_border);box-sizing:border-box;color:var(--kup_tree_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;text-align:left;transition:background-color 80ms, color 80ms;width:100%}:host([as-accordion]) .kup-tree__node--first .kup-tree__icon{margin-left:0;margin-right:0.5em;min-width:1.5em}:host([as-accordion]) .kup-tree__node--first .cell-content{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}:host([as-accordion]) .kup-tree__node--first .kup-dropdown-icon{background-color:var(--kup_tree_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform 0.1s}:host([as-accordion]) .kup-tree__node:not(.kup-tree__node--first)+.kup-tree__node--first{border-top:var(--kup_tree_border);border-top-left-radius:4px;border-top-right-radius:4px}.kup-menu{animation:fade-in 0.25s ease-out;background-color:var(--kup-background-color);box-shadow:var(--kup-box-shadow);color:var(--kup-text-color);display:none;max-height:33vh;overflow:auto;position:relative;transform:none;transform-origin:unset;transition:height 0.2s;will-change:unset}.kup-menu.visible{display:block}.kup-icon.kup-collapsed-icon{-webkit-mask:var(--kup-collapsed-icon);mask:var(--kup-collapsed-icon)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.kup-icon.kup-expanded-icon{-webkit-mask:var(--kup-expanded-icon);mask:var(--kup-expanded-icon)}.kup-icon.kup-filter-remove-icon{-webkit-mask:var(--kup-filter-remove-icon);mask:var(--kup-filter-remove-icon)}:host(.kup-borderless) .first-node{border:none !important}:host(.kup-borderless) .kup-tree__node:not(.kup-tree__node--first)+.kup-tree__node--first{border:none !important}:host(.kup-full-width){min-width:100%}:host(.kup-full-width) table.kup-tree{min-width:100%}:host(.kup-layout-fixed) #kup-component table{table-layout:fixed;width:100%}:host(.kup-shaped) td.mdc-ripple-surface{border-radius:0 66px 66px 0}tr.clickable{cursor:pointer}";
|
|
30962
31118
|
|
|
30963
|
-
var __classPrivateFieldGet$
|
|
31119
|
+
var __classPrivateFieldGet$7 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
30964
31120
|
if (kind === "a" && !f)
|
|
30965
31121
|
throw new TypeError("Private accessor was defined without a getter");
|
|
30966
31122
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -31059,31 +31215,31 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31059
31215
|
persistState() {
|
|
31060
31216
|
if (this.store && this.stateId) {
|
|
31061
31217
|
let somethingChanged = false;
|
|
31062
|
-
if (!__classPrivateFieldGet$
|
|
31218
|
+
if (!__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.filters, this.filters)) {
|
|
31063
31219
|
this.state.filters = Object.assign({}, this.filters);
|
|
31064
31220
|
somethingChanged = true;
|
|
31065
31221
|
}
|
|
31066
|
-
if (!__classPrivateFieldGet$
|
|
31222
|
+
if (!__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.density, this.density)) {
|
|
31067
31223
|
this.state.density = this.density;
|
|
31068
31224
|
somethingChanged = true;
|
|
31069
31225
|
}
|
|
31070
|
-
if (!__classPrivateFieldGet$
|
|
31226
|
+
if (!__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.showFilters, this.showFilters)) {
|
|
31071
31227
|
this.state.showFilters = this.showFilters;
|
|
31072
31228
|
somethingChanged = true;
|
|
31073
31229
|
}
|
|
31074
|
-
if (!__classPrivateFieldGet$
|
|
31230
|
+
if (!__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.showFooter, this.showFooter)) {
|
|
31075
31231
|
this.state.showFooter = this.showFooter;
|
|
31076
31232
|
somethingChanged = true;
|
|
31077
31233
|
}
|
|
31078
|
-
if (!__classPrivateFieldGet$
|
|
31234
|
+
if (!__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.totals, this.totals)) {
|
|
31079
31235
|
this.state.totals = Object.assign({}, this.totals);
|
|
31080
31236
|
somethingChanged = true;
|
|
31081
31237
|
}
|
|
31082
|
-
if (!__classPrivateFieldGet$
|
|
31238
|
+
if (!__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.globalFilter, this.globalFilter)) {
|
|
31083
31239
|
this.state.globalFilter = this.globalFilter;
|
|
31084
31240
|
somethingChanged = true;
|
|
31085
31241
|
}
|
|
31086
|
-
if (!__classPrivateFieldGet$
|
|
31242
|
+
if (!__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
31087
31243
|
this.state.globalFilterValue = this.globalFilterValue;
|
|
31088
31244
|
somethingChanged = true;
|
|
31089
31245
|
}
|
|
@@ -31214,7 +31370,7 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31214
31370
|
* @param {KupDataColumn} column - Column to hide.
|
|
31215
31371
|
*/
|
|
31216
31372
|
async hideColumn(column) {
|
|
31217
|
-
__classPrivateFieldGet$
|
|
31373
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").data.column.hide(this.columns, [column.name]);
|
|
31218
31374
|
this.kupColumnRemove.emit({
|
|
31219
31375
|
comp: this,
|
|
31220
31376
|
id: this.rootElement.id,
|
|
@@ -31298,21 +31454,21 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31298
31454
|
return this.treeColumnVisible;
|
|
31299
31455
|
}
|
|
31300
31456
|
checkScrollOnHover() {
|
|
31301
|
-
if (!__classPrivateFieldGet$
|
|
31457
|
+
if (!__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").scrollOnHover.isRegistered(this.treeWrapperRef)) {
|
|
31302
31458
|
if (this.scrollOnHover) {
|
|
31303
|
-
__classPrivateFieldGet$
|
|
31459
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").scrollOnHover.register(this.treeWrapperRef);
|
|
31304
31460
|
}
|
|
31305
31461
|
}
|
|
31306
31462
|
else {
|
|
31307
31463
|
if (!this.scrollOnHover) {
|
|
31308
|
-
__classPrivateFieldGet$
|
|
31464
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").scrollOnHover.unregister(this.treeWrapperRef);
|
|
31309
31465
|
}
|
|
31310
31466
|
}
|
|
31311
31467
|
}
|
|
31312
31468
|
onKupTreeNodeDblClick(treeNodeData, treeNodePath) {
|
|
31313
31469
|
for (let index = 0; index < this.clickTimeout.length; index++) {
|
|
31314
31470
|
clearTimeout(this.clickTimeout[index]);
|
|
31315
|
-
__classPrivateFieldGet$
|
|
31471
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").debug.logMessage(this, 'Cleared hdlTreeNodeClick timeout(' +
|
|
31316
31472
|
this.clickTimeout[index] +
|
|
31317
31473
|
').');
|
|
31318
31474
|
}
|
|
@@ -31501,7 +31657,7 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31501
31657
|
}
|
|
31502
31658
|
contextMenuHandler(e) {
|
|
31503
31659
|
e.preventDefault();
|
|
31504
|
-
const details = this.getEventDetails(__classPrivateFieldGet$
|
|
31660
|
+
const details = this.getEventDetails(__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
31505
31661
|
if (details.area === 'header') {
|
|
31506
31662
|
if (details.th && details.column) {
|
|
31507
31663
|
this.openColumnMenu(details.column.name);
|
|
@@ -31524,7 +31680,7 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31524
31680
|
(this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE &&
|
|
31525
31681
|
!treeNodeData.expandable)) {
|
|
31526
31682
|
const td = e
|
|
31527
|
-
? __classPrivateFieldGet$
|
|
31683
|
+
? __classPrivateFieldGet$7(this, _KupTree_kupManager, "f")
|
|
31528
31684
|
.getEventPath(e.target, this.rootElement)
|
|
31529
31685
|
.find((el) => {
|
|
31530
31686
|
if (el.tagName === 'TD')
|
|
@@ -31718,10 +31874,10 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31718
31874
|
refreshStructureState() {
|
|
31719
31875
|
if (this.data) {
|
|
31720
31876
|
if (this.data.columns) {
|
|
31721
|
-
__classPrivateFieldGet$
|
|
31877
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").debug.logMessage(this, 'Detected KupDataDataset: setting up tree as grid.', KupDebugCategory.WARNING);
|
|
31722
31878
|
const data = this.data;
|
|
31723
31879
|
this.columns = data.columns;
|
|
31724
|
-
this.data = __classPrivateFieldGet$
|
|
31880
|
+
this.data = __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").data.row.toNode(data);
|
|
31725
31881
|
this.showColumns = true;
|
|
31726
31882
|
this.showHeader = true;
|
|
31727
31883
|
}
|
|
@@ -31784,7 +31940,7 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31784
31940
|
//---- Filter ----
|
|
31785
31941
|
let filter = null;
|
|
31786
31942
|
if (this.filtersColumnMenuInstance.hasFiltersForColumn(this.filters, column)) {
|
|
31787
|
-
const svgLabel = __classPrivateFieldGet$
|
|
31943
|
+
const svgLabel = __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageGeneric.REMOVE_FILTERS) + `: '${this.getFilterValueForTooltip(column)}'`;
|
|
31788
31944
|
/**
|
|
31789
31945
|
* When column has a filter but filters must not be displayed, shows an icon to remove the filter.
|
|
31790
31946
|
* Upon click, the filter gets removed.
|
|
@@ -31859,9 +32015,9 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31859
32015
|
expandClass += ` ${KupThemeIconValues.COLLAPSED.replace('--', '')}`;
|
|
31860
32016
|
}
|
|
31861
32017
|
}
|
|
31862
|
-
let treeExpandIcon = (h("span", { title: __classPrivateFieldGet$
|
|
32018
|
+
let treeExpandIcon = (h("span", { title: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageGeneric.EXPAND) +
|
|
31863
32019
|
'/' +
|
|
31864
|
-
__classPrivateFieldGet$
|
|
32020
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageGeneric.COLLAPSE) +
|
|
31865
32021
|
' (CTRL + Click)', class: expandClass, onClick: this.expansionMode.toLowerCase() ===
|
|
31866
32022
|
KupTreeExpansionMode.DROPDOWN && !treeNodeData.disabled
|
|
31867
32023
|
? (event) => {
|
|
@@ -31934,8 +32090,8 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31934
32090
|
}
|
|
31935
32091
|
}
|
|
31936
32092
|
let title = undefined;
|
|
31937
|
-
if (!__classPrivateFieldGet$
|
|
31938
|
-
__classPrivateFieldGet$
|
|
32093
|
+
if (!__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").objects.isEmptyKupObj(treeNodeData.obj) &&
|
|
32094
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").debug.isDebug()) {
|
|
31939
32095
|
title =
|
|
31940
32096
|
treeNodeData.obj.t +
|
|
31941
32097
|
'; ' +
|
|
@@ -31958,7 +32114,7 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31958
32114
|
'mdc-ripple-surface': this.ripple &&
|
|
31959
32115
|
!this.showColumns &&
|
|
31960
32116
|
!treeNodeData.disabled,
|
|
31961
|
-
'is-obj': !__classPrivateFieldGet$
|
|
32117
|
+
'is-obj': !__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").objects.isEmptyKupObj(treeNodeData.obj),
|
|
31962
32118
|
}, style: treeNodeData.style || null, title: title, onDblClick: () => {
|
|
31963
32119
|
this.onKupTreeNodeDblClick(treeNodeData, treeNodePath);
|
|
31964
32120
|
} }, this.asAccordion && !treeNodeDepth
|
|
@@ -31981,7 +32137,7 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
31981
32137
|
}
|
|
31982
32138
|
closeTotalMenu() {
|
|
31983
32139
|
this.openedTotalMenu = null;
|
|
31984
|
-
__classPrivateFieldGet$
|
|
32140
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").removeClickCallback(this.clickCb);
|
|
31985
32141
|
}
|
|
31986
32142
|
isOpenedTotalMenuForColumn(column) {
|
|
31987
32143
|
return this.openedTotalMenu === column;
|
|
@@ -32011,15 +32167,15 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
32011
32167
|
let totalMenu = undefined;
|
|
32012
32168
|
let menuLabel = TotalLabel.CALC;
|
|
32013
32169
|
const translation = {
|
|
32014
|
-
[TotalLabel.AVERAGE]: __classPrivateFieldGet$
|
|
32015
|
-
[TotalLabel.CALC]: __classPrivateFieldGet$
|
|
32016
|
-
[TotalLabel.CANC]: __classPrivateFieldGet$
|
|
32017
|
-
[TotalLabel.COUNT]: __classPrivateFieldGet$
|
|
32018
|
-
[TotalLabel.DISTINCT]: __classPrivateFieldGet$
|
|
32019
|
-
[TotalLabel.MATH]: __classPrivateFieldGet$
|
|
32020
|
-
[TotalLabel.MAX]: __classPrivateFieldGet$
|
|
32021
|
-
[TotalLabel.MIN]: __classPrivateFieldGet$
|
|
32022
|
-
[TotalLabel.SUM]: __classPrivateFieldGet$
|
|
32170
|
+
[TotalLabel.AVERAGE]: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.AVERAGE),
|
|
32171
|
+
[TotalLabel.CALC]: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.CALCULATE),
|
|
32172
|
+
[TotalLabel.CANC]: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.CANCEL),
|
|
32173
|
+
[TotalLabel.COUNT]: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.COUNT),
|
|
32174
|
+
[TotalLabel.DISTINCT]: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.DISTINCT),
|
|
32175
|
+
[TotalLabel.MATH]: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.FORMULA),
|
|
32176
|
+
[TotalLabel.MAX]: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.MAXIMUM),
|
|
32177
|
+
[TotalLabel.MIN]: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.MINIMUM),
|
|
32178
|
+
[TotalLabel.SUM]: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.SUM),
|
|
32023
32179
|
};
|
|
32024
32180
|
if (this.totals) {
|
|
32025
32181
|
const totalValue = this.totals[column.name];
|
|
@@ -32062,7 +32218,7 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
32062
32218
|
value: translation[TotalLabel.DISTINCT],
|
|
32063
32219
|
},
|
|
32064
32220
|
];
|
|
32065
|
-
if (__classPrivateFieldGet$
|
|
32221
|
+
if (__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").objects.isNumber(column.obj)) {
|
|
32066
32222
|
listData.push({
|
|
32067
32223
|
id: TotalMode.SUM,
|
|
32068
32224
|
value: translation[TotalLabel.SUM],
|
|
@@ -32128,25 +32284,25 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
32128
32284
|
});
|
|
32129
32285
|
}
|
|
32130
32286
|
};
|
|
32131
|
-
__classPrivateFieldGet$
|
|
32132
|
-
__classPrivateFieldGet$
|
|
32287
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").interact.on(this.treeWrapperRef, KupPointerEventTypes.TAP, tapCb);
|
|
32288
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").interact.on(this.treeWrapperRef, KupPointerEventTypes.HOLD, holdCb);
|
|
32133
32289
|
}
|
|
32134
32290
|
totalMenuPosition() {
|
|
32135
32291
|
if (this.rootElement.shadowRoot) {
|
|
32136
32292
|
const menu = this.rootElement.shadowRoot.querySelector('#totals-menu');
|
|
32137
32293
|
if (menu) {
|
|
32138
|
-
__classPrivateFieldGet$
|
|
32294
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").dynamicPosition.register(menu, this.totalMenuCoords);
|
|
32139
32295
|
if (!this.clickCb) {
|
|
32140
32296
|
this.clickCb = {
|
|
32141
32297
|
cb: () => {
|
|
32142
32298
|
this.closeTotalMenu();
|
|
32143
|
-
__classPrivateFieldGet$
|
|
32299
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").dynamicPosition.stop(menu);
|
|
32144
32300
|
},
|
|
32145
32301
|
el: menu,
|
|
32146
32302
|
};
|
|
32147
32303
|
}
|
|
32148
|
-
__classPrivateFieldGet$
|
|
32149
|
-
__classPrivateFieldGet$
|
|
32304
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").addClickCallback(this.clickCb, true);
|
|
32305
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").dynamicPosition.start(menu);
|
|
32150
32306
|
menu.menuVisible = true;
|
|
32151
32307
|
}
|
|
32152
32308
|
}
|
|
@@ -32204,20 +32360,20 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
32204
32360
|
/* L i f e c y c l e H o o k s */
|
|
32205
32361
|
/*-------------------------------------------------*/
|
|
32206
32362
|
componentWillLoad() {
|
|
32207
|
-
__classPrivateFieldGet$
|
|
32208
|
-
__classPrivateFieldGet$
|
|
32209
|
-
__classPrivateFieldGet$
|
|
32363
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").debug.logLoad(this, false);
|
|
32364
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.register(this);
|
|
32365
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").theme.register(this);
|
|
32210
32366
|
this.columnMenuInstance = new KupColumnMenu();
|
|
32211
32367
|
this.refreshStructureState();
|
|
32212
32368
|
}
|
|
32213
32369
|
componentDidLoad() {
|
|
32214
32370
|
this.didLoadInteractables();
|
|
32215
32371
|
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
32216
|
-
__classPrivateFieldGet$
|
|
32217
|
-
__classPrivateFieldGet$
|
|
32372
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").resize.observe(this.rootElement);
|
|
32373
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").debug.logLoad(this, true);
|
|
32218
32374
|
}
|
|
32219
32375
|
componentWillRender() {
|
|
32220
|
-
__classPrivateFieldGet$
|
|
32376
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").debug.logRender(this, false);
|
|
32221
32377
|
if (this.showFooter && this.columns) {
|
|
32222
32378
|
this.footer = calcTotals(normalizeRows(this.getColumns(), this.nodesToRows()), this.totals);
|
|
32223
32379
|
}
|
|
@@ -32249,7 +32405,7 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
32249
32405
|
this.persistState();
|
|
32250
32406
|
// ***
|
|
32251
32407
|
this.oldWidth = this.rootElement.clientWidth;
|
|
32252
|
-
__classPrivateFieldGet$
|
|
32408
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").debug.logRender(this, true);
|
|
32253
32409
|
}
|
|
32254
32410
|
render() {
|
|
32255
32411
|
this.contentRefs = [];
|
|
@@ -32272,7 +32428,7 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
32272
32428
|
}
|
|
32273
32429
|
else {
|
|
32274
32430
|
// There are no TreeNodes, so we print a single cell with a caption
|
|
32275
|
-
treeNodes.push(h("tr", null, h("td", null, __classPrivateFieldGet$
|
|
32431
|
+
treeNodes.push(h("tr", null, h("td", null, __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA))));
|
|
32276
32432
|
}
|
|
32277
32433
|
// Calculates if header must be shown or not
|
|
32278
32434
|
const visibleHeader = this.showHeader && this.showColumns;
|
|
@@ -32281,12 +32437,12 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
32281
32437
|
this.data &&
|
|
32282
32438
|
this.data.length &&
|
|
32283
32439
|
this.data.length > 0) {
|
|
32284
|
-
filterField = (h("div", { id: "global-filter" }, h("kup-text-field", { fullWidth: true, label: __classPrivateFieldGet$
|
|
32440
|
+
filterField = (h("div", { id: "global-filter" }, h("kup-text-field", { fullWidth: true, label: __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), icon: KupThemeIconValues.SEARCH, initialValue: this.globalFilterValue, "onkup-textfield-input": (event) => {
|
|
32285
32441
|
window.clearTimeout(this.globalFilterTimeout);
|
|
32286
32442
|
this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
|
|
32287
32443
|
} })));
|
|
32288
32444
|
}
|
|
32289
|
-
return (h(Host, null, h("style", null, __classPrivateFieldGet$
|
|
32445
|
+
return (h(Host, null, h("style", null, __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, class: wrapperClass }, filterField, h("div", { class: "wrapper", ref: (el) => (this.treeWrapperRef =
|
|
32290
32446
|
el) }, h("table", { class: "kup-tree", "data-show-columns": this.showColumns, onContextMenu: (e) => {
|
|
32291
32447
|
e.preventDefault();
|
|
32292
32448
|
} }, h("thead", { class: {
|
|
@@ -32297,18 +32453,18 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
32297
32453
|
: null)))));
|
|
32298
32454
|
}
|
|
32299
32455
|
disconnectedCallback() {
|
|
32300
|
-
__classPrivateFieldGet$
|
|
32301
|
-
__classPrivateFieldGet$
|
|
32302
|
-
__classPrivateFieldGet$
|
|
32456
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").language.register(this);
|
|
32457
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").resize.unobserve(this.rootElement);
|
|
32458
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").theme.unregister(this);
|
|
32303
32459
|
const dynamicPositionElements = this.rootElement.shadowRoot.querySelectorAll('[' + kupDynamicPositionAttribute + ']');
|
|
32304
32460
|
if (dynamicPositionElements.length > 0) {
|
|
32305
|
-
__classPrivateFieldGet$
|
|
32461
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").dynamicPosition.unregister(Array.prototype.slice.call(dynamicPositionElements));
|
|
32306
32462
|
}
|
|
32307
32463
|
if (this.columnMenuCard) {
|
|
32308
32464
|
this.columnMenuCard.remove();
|
|
32309
32465
|
}
|
|
32310
32466
|
if (this.scrollOnHover) {
|
|
32311
|
-
__classPrivateFieldGet$
|
|
32467
|
+
__classPrivateFieldGet$7(this, _KupTree_kupManager, "f").scrollOnHover.unregister(this.treeWrapperRef);
|
|
32312
32468
|
}
|
|
32313
32469
|
this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
|
|
32314
32470
|
}
|
|
@@ -33085,6 +33241,14 @@ function defineCustomElement$p() {
|
|
|
33085
33241
|
|
|
33086
33242
|
const kupTextFieldCss = ":host{display:block;font-size:var(--kup-font-size)}:host([full-width]){width:100%}:host([full-width]) #kup-component{width:100%}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{height:100%}:host(.kup-shaped) #kup-component .mdc-text-field.mdc-text-field--filled{border-radius:16px 16px 0 0}:host(.kup-shaped) #kup-component .mdc-text-field.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-radius:28px 0 0 28px;width:28px}:host(.kup-shaped) #kup-component .mdc-text-field.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-radius:0 28px 28px 0;width:28px}";
|
|
33087
33243
|
|
|
33244
|
+
var __classPrivateFieldGet$6 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
33245
|
+
if (kind === "a" && !f)
|
|
33246
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
33247
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
33248
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
33249
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
33250
|
+
};
|
|
33251
|
+
var _KupTextField_instances, _KupTextField_getValueForOutput, _KupTextField_setValueFromEventTaget;
|
|
33088
33252
|
const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
33089
33253
|
constructor() {
|
|
33090
33254
|
super();
|
|
@@ -33098,16 +33262,19 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33098
33262
|
this.kupIconClick = createEvent(this, "kup-textfield-iconclick", 6);
|
|
33099
33263
|
this.kupClearIconClick = createEvent(this, "kup-textfield-cleariconclick", 6);
|
|
33100
33264
|
this.kupTextFieldSubmit = createEvent(this, "kup-textfield-submit", 6);
|
|
33265
|
+
_KupTextField_instances.add(this);
|
|
33101
33266
|
/**
|
|
33102
33267
|
* Instance of the KupManager class.
|
|
33103
33268
|
*/
|
|
33104
33269
|
this.kupManager = kupManagerInstance();
|
|
33105
33270
|
this.value = '';
|
|
33271
|
+
this.allowNegative = false;
|
|
33106
33272
|
this.customStyle = '';
|
|
33107
33273
|
this.decimals = null;
|
|
33108
33274
|
this.disabled = false;
|
|
33109
33275
|
this.emitSubmitEventOnEnter = true;
|
|
33110
33276
|
this.fullWidth = false;
|
|
33277
|
+
this.group = false;
|
|
33111
33278
|
this.helper = null;
|
|
33112
33279
|
this.helperEnabled = true;
|
|
33113
33280
|
this.helperWhenFocused = false;
|
|
@@ -33115,6 +33282,7 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33115
33282
|
this.initialValue = '';
|
|
33116
33283
|
this.inputMode = null;
|
|
33117
33284
|
this.inputType = 'text';
|
|
33285
|
+
this.integers = null;
|
|
33118
33286
|
this.isClearable = false;
|
|
33119
33287
|
this.label = null;
|
|
33120
33288
|
this.leadingLabel = false;
|
|
@@ -33131,35 +33299,36 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33131
33299
|
}
|
|
33132
33300
|
onKupBlur(event) {
|
|
33133
33301
|
const { target } = event;
|
|
33302
|
+
__classPrivateFieldGet$6(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
33134
33303
|
this.kupBlur.emit({
|
|
33135
33304
|
comp: this,
|
|
33136
33305
|
id: this.rootElement.id,
|
|
33137
|
-
value:
|
|
33306
|
+
value: this.value,
|
|
33138
33307
|
});
|
|
33139
33308
|
}
|
|
33140
33309
|
onKupChange(event) {
|
|
33141
33310
|
const { target } = event;
|
|
33142
|
-
this.
|
|
33311
|
+
__classPrivateFieldGet$6(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
33143
33312
|
this.kupChange.emit({
|
|
33144
33313
|
comp: this,
|
|
33145
33314
|
id: this.rootElement.id,
|
|
33146
|
-
value:
|
|
33315
|
+
value: this.value,
|
|
33147
33316
|
});
|
|
33148
33317
|
}
|
|
33149
33318
|
onKupClick(event) {
|
|
33150
33319
|
const { target } = event;
|
|
33320
|
+
__classPrivateFieldGet$6(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
33151
33321
|
this.kupClick.emit({
|
|
33152
33322
|
comp: this,
|
|
33153
33323
|
id: this.rootElement.id,
|
|
33154
|
-
value:
|
|
33324
|
+
value: this.value,
|
|
33155
33325
|
});
|
|
33156
33326
|
}
|
|
33157
|
-
onKupFocus(
|
|
33158
|
-
const { target } = event;
|
|
33327
|
+
onKupFocus(_event) {
|
|
33159
33328
|
this.kupFocus.emit({
|
|
33160
33329
|
comp: this,
|
|
33161
33330
|
id: this.rootElement.id,
|
|
33162
|
-
value:
|
|
33331
|
+
value: this.value,
|
|
33163
33332
|
});
|
|
33164
33333
|
}
|
|
33165
33334
|
onKupInput(event) {
|
|
@@ -33187,12 +33356,14 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33187
33356
|
});
|
|
33188
33357
|
}
|
|
33189
33358
|
onKeyDown(event) {
|
|
33359
|
+
const { target } = event;
|
|
33190
33360
|
if (event.key === 'Enter') {
|
|
33191
33361
|
if (this.emitSubmitEventOnEnter == true) {
|
|
33362
|
+
__classPrivateFieldGet$6(this, _KupTextField_instances, "m", _KupTextField_setValueFromEventTaget).call(this, target);
|
|
33192
33363
|
this.kupTextFieldSubmit.emit({
|
|
33193
33364
|
comp: this,
|
|
33194
33365
|
id: this.rootElement.id,
|
|
33195
|
-
value: this.
|
|
33366
|
+
value: this.value,
|
|
33196
33367
|
});
|
|
33197
33368
|
}
|
|
33198
33369
|
}
|
|
@@ -33212,6 +33383,9 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33212
33383
|
* Returns the component's internal value.
|
|
33213
33384
|
*/
|
|
33214
33385
|
async getValue() {
|
|
33386
|
+
if (this.inputType == 'number') {
|
|
33387
|
+
return formattedStringToUnformattedStringNumber(this.value, '');
|
|
33388
|
+
}
|
|
33215
33389
|
return this.value;
|
|
33216
33390
|
}
|
|
33217
33391
|
/**
|
|
@@ -33239,7 +33413,7 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33239
33413
|
async setValue(value) {
|
|
33240
33414
|
this.value = value;
|
|
33241
33415
|
try {
|
|
33242
|
-
this.inputEl.value =
|
|
33416
|
+
this.inputEl.value = __classPrivateFieldGet$6(this, _KupTextField_instances, "m", _KupTextField_getValueForOutput).call(this);
|
|
33243
33417
|
}
|
|
33244
33418
|
catch (error) {
|
|
33245
33419
|
this.kupManager.debug.logMessage(this, "Couldn't set value on input element: '" + value + "'", KupDebugCategory.WARNING);
|
|
@@ -33275,6 +33449,7 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33275
33449
|
}
|
|
33276
33450
|
render() {
|
|
33277
33451
|
const props = {
|
|
33452
|
+
allowNegative: this.allowNegative,
|
|
33278
33453
|
danger: this.rootElement.classList.contains('kup-danger')
|
|
33279
33454
|
? true
|
|
33280
33455
|
: false,
|
|
@@ -33284,6 +33459,7 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33284
33459
|
? true
|
|
33285
33460
|
: false,
|
|
33286
33461
|
fullWidth: this.fullWidth,
|
|
33462
|
+
group: this.group,
|
|
33287
33463
|
helper: this.helper,
|
|
33288
33464
|
helperEnabled: this.helperEnabled,
|
|
33289
33465
|
helperWhenFocused: this.helperWhenFocused,
|
|
@@ -33293,6 +33469,7 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33293
33469
|
: false,
|
|
33294
33470
|
inputMode: this.inputMode,
|
|
33295
33471
|
inputType: this.inputType,
|
|
33472
|
+
integers: this.integers,
|
|
33296
33473
|
isClearable: this.isClearable,
|
|
33297
33474
|
label: this.label,
|
|
33298
33475
|
leadingLabel: this.leadingLabel,
|
|
@@ -33336,11 +33513,13 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33336
33513
|
get rootElement() { return this; }
|
|
33337
33514
|
static get style() { return kupTextFieldCss; }
|
|
33338
33515
|
}, [1, "kup-text-field", {
|
|
33516
|
+
"allowNegative": [4, "allow-negative"],
|
|
33339
33517
|
"customStyle": [1, "custom-style"],
|
|
33340
33518
|
"decimals": [2],
|
|
33341
33519
|
"disabled": [4],
|
|
33342
33520
|
"emitSubmitEventOnEnter": [4, "emit-submit-event-on-enter"],
|
|
33343
33521
|
"fullWidth": [516, "full-width"],
|
|
33522
|
+
"group": [4],
|
|
33344
33523
|
"helper": [1],
|
|
33345
33524
|
"helperEnabled": [4, "helper-enabled"],
|
|
33346
33525
|
"helperWhenFocused": [4, "helper-when-focused"],
|
|
@@ -33348,6 +33527,7 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33348
33527
|
"initialValue": [1, "initial-value"],
|
|
33349
33528
|
"inputMode": [1, "input-mode"],
|
|
33350
33529
|
"inputType": [1, "input-type"],
|
|
33530
|
+
"integers": [2],
|
|
33351
33531
|
"isClearable": [4, "is-clearable"],
|
|
33352
33532
|
"label": [1],
|
|
33353
33533
|
"leadingLabel": [4, "leading-label"],
|
|
@@ -33369,6 +33549,20 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
|
|
|
33369
33549
|
"setProps": [64],
|
|
33370
33550
|
"setValue": [64]
|
|
33371
33551
|
}]);
|
|
33552
|
+
_KupTextField_instances = new WeakSet(), _KupTextField_getValueForOutput = function _KupTextField_getValueForOutput() {
|
|
33553
|
+
if (this.value == null || this.value.trim() == '') {
|
|
33554
|
+
return '';
|
|
33555
|
+
}
|
|
33556
|
+
let v1 = unformattedStringToFormattedStringNumber(this.value, this.decimals, '');
|
|
33557
|
+
return v1;
|
|
33558
|
+
}, _KupTextField_setValueFromEventTaget = function _KupTextField_setValueFromEventTaget(target) {
|
|
33559
|
+
if (this.inputType == 'number') {
|
|
33560
|
+
this.value = formattedStringToUnformattedStringNumber(target.value, '');
|
|
33561
|
+
}
|
|
33562
|
+
else {
|
|
33563
|
+
this.value = target.value;
|
|
33564
|
+
}
|
|
33565
|
+
};
|
|
33372
33566
|
function defineCustomElement$o() {
|
|
33373
33567
|
if (typeof customElements === "undefined") {
|
|
33374
33568
|
return;
|
|
@@ -46597,4 +46791,4 @@ function defineCustomElement() {
|
|
|
46597
46791
|
} });
|
|
46598
46792
|
}
|
|
46599
46793
|
|
|
46600
|
-
export { FPaginatorMode as $, defineCustomElement$5 as A, defineCustomElement$4 as B, defineCustomElement$3 as C, defineCustomElement$2 as D, defineCustomElement$1 as E, FImage as F, defineCustomElement as G, KupAutocomplete as H, KupBadge as I, identify as J, KupThemeColorValues as K, filterRows as L, MDCRipple as M, paginateRows as N, sortRows as O, getColumnByName as P, KupLanguageGeneric as Q, FCell as R, KupDebugCategory as S, FChip as T, KupPointerEventTypes as U, KupDragEffect as V, kupDraggableCellAttr as W, KupDropEventTypes as X, FTextFieldMDC as Y, KupLanguageSearch as Z, FPaginator as _, KupThemeIconValues as a, pageChange as a0, rowsPerPageChange as a1, SortMode as a2, KupButton as a3, KupButtonList as a4, __extends as a5, __assign as a6, __spreadArray as a7, createCommonjsModule as a8, getDefaultExportFromCjs as a9,
|
|
46794
|
+
export { FPaginatorMode as $, defineCustomElement$5 as A, defineCustomElement$4 as B, defineCustomElement$3 as C, defineCustomElement$2 as D, defineCustomElement$1 as E, FImage as F, defineCustomElement as G, KupAutocomplete as H, KupBadge as I, identify as J, KupThemeColorValues as K, filterRows as L, MDCRipple as M, paginateRows as N, sortRows as O, getColumnByName as P, KupLanguageGeneric as Q, FCell as R, KupDebugCategory as S, FChip as T, KupPointerEventTypes as U, KupDragEffect as V, kupDraggableCellAttr as W, KupDropEventTypes as X, FTextFieldMDC as Y, KupLanguageSearch as Z, FPaginator as _, KupThemeIconValues as a, pageChange as a0, rowsPerPageChange as a1, SortMode as a2, KupButton as a3, KupButtonList as a4, __extends as a5, __assign as a6, __spreadArray as a7, createCommonjsModule as a8, getDefaultExportFromCjs as a9, kupDraggableRowAttr as aA, KupDynamicPositionPlacement as aB, KupCardFamily as aC, commonjsGlobal as aD, KupDatesFormats as aE, KupProgressBar as aF, KupRadio as aG, KupRating as aH, KupSpinner as aI, KupSwitch as aJ, KupTabBar as aK, KupTextField as aL, KupTimePicker as aM, KupTree as aN, KupDatesLocales as aa, FButton as ab, FChipType as ac, KupCard as ad, FCellPadding as ae, KupChart as af, KupCheckbox as ag, KupChip as ah, KupColorPicker as ai, KupCombobox as aj, getCellValueForDisplay as ak, KupLanguageDashboard as al, FTextField as am, FCheckbox as an, KupDataTable as ao, KupDatePicker as ap, KupDialog as aq, KupDropdownButton as ar, KupDataNewColumnTypes as as, FButtonStyling as at, KupForm as au, KupGauge as av, KupImage as aw, KupList as ax, kupDropEvent as ay, kupDraggableColumnAttr as az, defineCustomElement$p as b, componentWrapperId as c, defineCustomElement$q as d, defineCustomElement$o as e, defineCustomElement$n as f, getProps as g, defineCustomElement$m as h, defineCustomElement$l as i, defineCustomElement$k as j, kupManagerInstance as k, defineCustomElement$j as l, defineCustomElement$i as m, defineCustomElement$h as n, defineCustomElement$g as o, defineCustomElement$f as p, defineCustomElement$b as q, defineCustomElement$e as r, setProps as s, defineCustomElement$c as t, defineCustomElement$d as u, defineCustomElement$a as v, defineCustomElement$9 as w, defineCustomElement$8 as x, defineCustomElement$7 as y, defineCustomElement$6 as z };
|