@sme.up/ketchup 8.0.1 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-button-c0ede055.js → f-button-9524bbf7.js} +1 -1
- package/dist/cjs/{f-cell-1c17dbac.js → f-cell-bcb75ade.js} +10 -8
- package/dist/cjs/{f-chip-bace36bb.js → f-chip-2249b386.js} +2 -2
- package/dist/cjs/{f-image-22174590.js → f-image-47d74999.js} +1 -1
- package/dist/cjs/{f-paginator-utils-e21e1f06.js → f-paginator-utils-b0a9ae5f.js} +63 -62
- package/dist/cjs/{f-text-field-503f2bb0.js → f-text-field-579c0fc0.js} +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +32 -87
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-b994cf71.js → kup-manager-85b2a756.js} +679 -531
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +2 -2
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
- package/dist/collection/assets/data-table.js +0 -44
- package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +5 -61
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +7 -8
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +5 -4
- package/dist/collection/components/kup-gauge/kup-gauge.js +4 -4
- package/dist/collection/components/kup-text-field/kup-text-field.js +4 -5
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +7 -7
- package/dist/collection/components/kup-tree/kup-tree.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell.js +6 -5
- package/dist/collection/f-components/f-paginator/f-paginator-utils.js +3 -3
- package/dist/collection/managers/kup-data/kup-data.js +3 -1
- package/dist/collection/managers/kup-dates/kup-dates-declarations.js +21 -10
- package/dist/collection/managers/kup-dates/kup-dates.js +312 -1
- package/dist/collection/managers/kup-math/kup-math.js +180 -9
- package/dist/collection/utils/cell-utils.js +5 -6
- package/dist/collection/utils/filters/filters.js +11 -13
- package/dist/collection/utils/utils.js +18 -435
- package/dist/components/kup-autocomplete2.js +915 -810
- package/dist/components/kup-box2.js +1 -1
- package/dist/components/kup-calendar.js +1 -1
- package/dist/components/kup-cell.js +1 -1
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-echart2.js +1 -1
- package/dist/components/kup-family-tree.js +1 -1
- package/dist/components/kup-grid2.js +1 -1
- package/dist/components/kup-iframe.js +1 -1
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-magic-box.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-planner.js +1 -1
- package/dist/esm/{f-button-c377973d.js → f-button-024f0cfe.js} +1 -1
- package/dist/esm/{f-cell-e5a98bc8.js → f-cell-90240a8c.js} +10 -8
- package/dist/esm/{f-chip-c8a18c48.js → f-chip-2238ad43.js} +2 -2
- package/dist/esm/{f-image-5cbdf39d.js → f-image-f2e9bf79.js} +1 -1
- package/dist/esm/{f-paginator-utils-a1dab059.js → f-paginator-utils-8cb3c023.js} +63 -62
- package/dist/esm/{f-text-field-dafb7c8b.js → f-text-field-d231982c.js} +1 -1
- package/dist/esm/kup-accordion.entry.js +2 -2
- package/dist/esm/kup-autocomplete_27.entry.js +26 -81
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +4 -4
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dash-list.entry.js +1 -1
- package/dist/esm/kup-dash_2.entry.js +1 -1
- package/dist/esm/kup-dashboard.entry.js +4 -4
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +3 -3
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +6 -6
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-3594cde8.js → kup-manager-d1da769e.js} +679 -522
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +2 -2
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-31abf4b6.entry.js → p-063d4c27.entry.js} +1 -1
- package/dist/ketchup/{p-9fc6a9a8.entry.js → p-0bcda0e2.entry.js} +1 -1
- package/dist/ketchup/{p-473d2bea.entry.js → p-0d7d59c7.entry.js} +1 -1
- package/dist/ketchup/{p-b718af72.entry.js → p-163b18b9.entry.js} +1 -1
- package/dist/ketchup/{p-37ada0f0.entry.js → p-1ad628fb.entry.js} +1 -1
- package/dist/ketchup/{p-5205286a.entry.js → p-33aff1ca.entry.js} +1 -1
- package/dist/ketchup/p-3432ebaf.entry.js +9 -0
- package/dist/ketchup/{p-80815edf.entry.js → p-35b29b22.entry.js} +1 -1
- package/dist/ketchup/{p-acaa171f.js → p-36dac88e.js} +3 -3
- package/dist/ketchup/{p-22e72f06.entry.js → p-37067ee6.entry.js} +1 -1
- package/dist/ketchup/p-39a55c47.js +1 -0
- package/dist/ketchup/{p-8b248655.js → p-3cf64473.js} +1 -1
- package/dist/ketchup/p-410c102a.js +1 -0
- package/dist/ketchup/{p-d76be079.entry.js → p-43b67de4.entry.js} +1 -1
- package/dist/ketchup/{p-ef0b4f19.entry.js → p-489d55ff.entry.js} +1 -1
- package/dist/ketchup/{p-2d32e3cd.js → p-5f3680f2.js} +1 -1
- package/dist/ketchup/{p-cf322853.entry.js → p-651d89c8.entry.js} +1 -1
- package/dist/ketchup/{p-4c56e199.entry.js → p-73c8d651.entry.js} +1 -1
- package/dist/ketchup/{p-d1164680.entry.js → p-83435e6c.entry.js} +1 -1
- package/dist/ketchup/{p-7f4f5f0f.entry.js → p-89743989.entry.js} +1 -1
- package/dist/ketchup/{p-6762d447.js → p-8b46e7ce.js} +1 -1
- package/dist/ketchup/p-a84f1d24.entry.js +1 -0
- package/dist/ketchup/{p-ed7e118e.entry.js → p-b2fd2dbf.entry.js} +1 -1
- package/dist/ketchup/{p-ce5b6ce7.entry.js → p-c42b80c1.entry.js} +1 -1
- package/dist/ketchup/p-d1b050d0.entry.js +27 -0
- package/dist/ketchup/{p-d4eb9a76.entry.js → p-d6ea709e.entry.js} +1 -1
- package/dist/ketchup/{p-7be5ef32.entry.js → p-e1f1e661.entry.js} +1 -1
- package/dist/ketchup/p-eda7f130.js +1 -0
- package/dist/ketchup/{p-afff7a6e.entry.js → p-f876125d.entry.js} +1 -1
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/managers/kup-dates/kup-dates-declarations.d.ts +19 -9
- package/dist/types/managers/kup-dates/kup-dates.d.ts +94 -1
- package/dist/types/managers/kup-math/kup-math.d.ts +68 -7
- package/dist/types/utils/utils.d.ts +13 -102
- package/package.json +1 -1
- package/dist/ketchup/p-017418e7.entry.js +0 -27
- package/dist/ketchup/p-38f16697.entry.js +0 -9
- package/dist/ketchup/p-4638fbff.js +0 -1
- package/dist/ketchup/p-61319cfa.js +0 -1
- package/dist/ketchup/p-6c726886.entry.js +0 -1
- package/dist/ketchup/p-bf4a881b.js +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-1f177abc.js');
|
|
4
4
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
5
|
-
const fImage = require('./f-image-
|
|
5
|
+
const fImage = require('./f-image-47d74999.js');
|
|
6
6
|
|
|
7
7
|
/*-------------------------------------------------*/
|
|
8
8
|
/* C o m p o n e n t */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const kupManager = require('./kup-manager-
|
|
3
|
+
const kupManager = require('./kup-manager-85b2a756.js');
|
|
4
4
|
const index = require('./index-1f177abc.js');
|
|
5
5
|
const fCheckbox = require('./f-checkbox-1148e791.js');
|
|
6
|
-
const fTextField = require('./f-text-field-
|
|
7
|
-
const fImage = require('./f-image-
|
|
8
|
-
const fChip = require('./f-chip-
|
|
6
|
+
const fTextField = require('./f-text-field-579c0fc0.js');
|
|
7
|
+
const fImage = require('./f-image-47d74999.js');
|
|
8
|
+
const fChip = require('./f-chip-2249b386.js');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Props of the kup-list component.
|
|
@@ -281,7 +281,9 @@ function setEditableCell(cellType, classObj, cell, column, props) {
|
|
|
281
281
|
case kupManager.FCellTypes.LINK:
|
|
282
282
|
case kupManager.FCellTypes.STRING:
|
|
283
283
|
return (index.h(fTextField.FTextField, Object.assign({ inputType: cellType === kupManager.FCellTypes.NUMBER ? 'number' : null, fullWidth: isFullWidth(props) ? true : false }, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, value: cellType === kupManager.FCellTypes.NUMBER
|
|
284
|
-
?
|
|
284
|
+
? dom.ketchup.math
|
|
285
|
+
.numberifySafe(cell.value)
|
|
286
|
+
.toString()
|
|
285
287
|
: cell.value, onChange: (e) => cellEvent(e, props, cellType, kupManager.FCellEvents.UPDATE), onInput: (e) => cellEvent(e, props, cellType, kupManager.FCellEvents.INPUT), onIconClick: (e) => cellEvent(e, props, cellType, kupManager.FCellEvents.ICON_CLICK) })));
|
|
286
288
|
}
|
|
287
289
|
}
|
|
@@ -319,7 +321,7 @@ function setCell(cellType, subcomponentProps, content, classObj, cell, column, p
|
|
|
319
321
|
return (index.h("a", { href: content, target: "_blank" }, cell.value));
|
|
320
322
|
case kupManager.FCellTypes.NUMBER:
|
|
321
323
|
if (content && content != '') {
|
|
322
|
-
const cellValueNumber =
|
|
324
|
+
const cellValueNumber = dom.ketchup.math.numberifySafe(cell.value);
|
|
323
325
|
const cellValue = kupManager.getCellValueForDisplay(column, cell);
|
|
324
326
|
if (cellValueNumber < 0) {
|
|
325
327
|
classObj[kupManager.FCellClasses.TEXT_DANGER] = true;
|
|
@@ -379,7 +381,7 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
379
381
|
case kupManager.FCellTypes.COLOR_PICKER:
|
|
380
382
|
return (index.h("kup-color-picker", Object.assign({ key: column.name + props.row.id }, subcomponentProps, { class: isFullWidth(props) ? 'kup-full-width' : '', disabled: true })));
|
|
381
383
|
case kupManager.FCellTypes.GAUGE:
|
|
382
|
-
return (index.h("kup-gauge", Object.assign({ key: column.name + props.row.id, value:
|
|
384
|
+
return (index.h("kup-gauge", Object.assign({ key: column.name + props.row.id, value: dom.ketchup.math.numberifySafe(cell.value), "width-component": "280px" }, subcomponentProps)));
|
|
383
385
|
case kupManager.FCellTypes.KNOB:
|
|
384
386
|
case kupManager.FCellTypes.PROGRESS_BAR:
|
|
385
387
|
return (index.h("kup-progress-bar", Object.assign({ key: column.name + props.row.id }, subcomponentProps)));
|
|
@@ -464,7 +466,7 @@ function getValueFromEventTaget(e, cellType) {
|
|
|
464
466
|
? e.target.value
|
|
465
467
|
: e.detail.value;
|
|
466
468
|
if (cellType === kupManager.FCellTypes.NUMBER && isInputEvent) {
|
|
467
|
-
value =
|
|
469
|
+
value = dom.ketchup.math.formattedStringToNumberString(value, '');
|
|
468
470
|
}
|
|
469
471
|
return value;
|
|
470
472
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-1f177abc.js');
|
|
4
|
-
const fImage = require('./f-image-
|
|
5
|
-
const kupManager = require('./kup-manager-
|
|
4
|
+
const fImage = require('./f-image-47d74999.js');
|
|
5
|
+
const kupManager = require('./kup-manager-85b2a756.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Types of the f-chip component.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const kupManager = require('./kup-manager-
|
|
3
|
+
const kupManager = require('./kup-manager-85b2a756.js');
|
|
4
4
|
const index = require('./index-1f177abc.js');
|
|
5
|
-
const fButton = require('./f-button-
|
|
5
|
+
const fButton = require('./f-button-9524bbf7.js');
|
|
6
6
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -407,11 +407,11 @@ exports.KupTreeExpansionMode = void 0;
|
|
|
407
407
|
KupTreeExpansionMode["NODE"] = "node";
|
|
408
408
|
})(exports.KupTreeExpansionMode || (exports.KupTreeExpansionMode = {}));
|
|
409
409
|
|
|
410
|
-
const dom$
|
|
411
|
-
const kupObjects = dom$
|
|
412
|
-
? dom$
|
|
410
|
+
const dom$3 = document.documentElement;
|
|
411
|
+
const kupObjects = dom$3.ketchup
|
|
412
|
+
? dom$3.ketchup.objects
|
|
413
413
|
: new kupManager.KupObjects();
|
|
414
|
-
const kupData = dom$
|
|
414
|
+
const kupData = dom$3.ketchup ? dom$3.ketchup.data : new kupManager.KupData();
|
|
415
415
|
/**
|
|
416
416
|
* Filtering algorithms related to data-table rows.
|
|
417
417
|
* @module FiltersRows
|
|
@@ -640,7 +640,7 @@ class FiltersRows extends kupManager.Filters {
|
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
642
|
|
|
643
|
-
const dom$
|
|
643
|
+
const dom$2 = document.documentElement;
|
|
644
644
|
function sortRows(rows = [], sort = []) {
|
|
645
645
|
if (!rows || rows.length === 0) {
|
|
646
646
|
return [];
|
|
@@ -871,10 +871,10 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
871
871
|
return;
|
|
872
872
|
}
|
|
873
873
|
keys.forEach((key) => {
|
|
874
|
-
const currentTotalValue = dom$
|
|
874
|
+
const currentTotalValue = dom$2.ketchup.math.numberify(groupRow.group.totals[key] || 0);
|
|
875
875
|
const cell = addedRow.cells[key];
|
|
876
876
|
if (cell) {
|
|
877
|
-
let _isNumber = dom$
|
|
877
|
+
let _isNumber = dom$2.ketchup.objects.isNumber(cell.obj);
|
|
878
878
|
const totalMode = totals[key];
|
|
879
879
|
switch (totalMode) {
|
|
880
880
|
case kupManager.TotalMode.COUNT:
|
|
@@ -890,7 +890,7 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
890
890
|
case kupManager.TotalMode.DISTINCT:
|
|
891
891
|
let cellValue;
|
|
892
892
|
if (_isNumber) {
|
|
893
|
-
cellValue = dom$
|
|
893
|
+
cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
894
894
|
}
|
|
895
895
|
else {
|
|
896
896
|
cellValue = cell.value;
|
|
@@ -942,13 +942,13 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
942
942
|
case kupManager.TotalMode.SUM:
|
|
943
943
|
case kupManager.TotalMode.AVERAGE:
|
|
944
944
|
if (_isNumber) {
|
|
945
|
-
const cellValue = dom$
|
|
945
|
+
const cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
946
946
|
groupRow.group.totals[key] =
|
|
947
947
|
cellValue + currentTotalValue;
|
|
948
948
|
// updating parents
|
|
949
949
|
let parent = groupRow.group.parent;
|
|
950
950
|
while (parent != null) {
|
|
951
|
-
const currentParentSum = dom$
|
|
951
|
+
const currentParentSum = dom$2.ketchup.math.numberify(parent.group.totals[key] || 0);
|
|
952
952
|
parent.group.totals[key] =
|
|
953
953
|
cellValue + currentParentSum;
|
|
954
954
|
parent = parent.group.parent;
|
|
@@ -959,7 +959,7 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
959
959
|
case kupManager.TotalMode.MIN:
|
|
960
960
|
if (_isNumber) {
|
|
961
961
|
const currentTotalValue = groupRow.group.totals[key];
|
|
962
|
-
const cellValue = dom$
|
|
962
|
+
const cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
963
963
|
if (currentTotalValue) {
|
|
964
964
|
groupRow.group.totals[key] = Math.min(currentTotalValue, cellValue);
|
|
965
965
|
}
|
|
@@ -981,19 +981,19 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
981
981
|
parent = parent.group.parent;
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
|
-
else if (dom$
|
|
984
|
+
else if (dom$2.ketchup.objects.isDate(cell.obj)) {
|
|
985
985
|
const momentValue = cell.obj
|
|
986
|
-
? dom$
|
|
987
|
-
: dom$
|
|
988
|
-
if (dom$
|
|
989
|
-
const cellValue = dom$
|
|
986
|
+
? dom$2.ketchup.objects.parseDate(cell.obj)
|
|
987
|
+
: dom$2.ketchup.dates.toDayjs(cell.value);
|
|
988
|
+
if (dom$2.ketchup.dates.isValid(momentValue)) {
|
|
989
|
+
const cellValue = dom$2.ketchup.dates.toDate(momentValue);
|
|
990
990
|
const currentTotalValue = groupRow.group.totals[key];
|
|
991
991
|
if (currentTotalValue) {
|
|
992
992
|
let moments = [];
|
|
993
993
|
moments.push(cellValue);
|
|
994
|
-
moments.push(dom$
|
|
994
|
+
moments.push(dom$2.ketchup.dates.format(currentTotalValue));
|
|
995
995
|
groupRow.group.totals[key] =
|
|
996
|
-
dom$
|
|
996
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments));
|
|
997
997
|
}
|
|
998
998
|
else {
|
|
999
999
|
groupRow.group.totals[key] = cellValue;
|
|
@@ -1005,9 +1005,9 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
1005
1005
|
if (currentParentMin) {
|
|
1006
1006
|
let moments = [];
|
|
1007
1007
|
moments.push(cellValue);
|
|
1008
|
-
moments.push(dom$
|
|
1008
|
+
moments.push(dom$2.ketchup.dates.format(currentParentMin));
|
|
1009
1009
|
parent.group.totals[key] =
|
|
1010
|
-
dom$
|
|
1010
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments));
|
|
1011
1011
|
}
|
|
1012
1012
|
else {
|
|
1013
1013
|
// first round
|
|
@@ -1022,7 +1022,7 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
1022
1022
|
case kupManager.TotalMode.MAX:
|
|
1023
1023
|
if (_isNumber) {
|
|
1024
1024
|
const currentTotalValue = groupRow.group.totals[key];
|
|
1025
|
-
const cellValue = dom$
|
|
1025
|
+
const cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
1026
1026
|
if (currentTotalValue) {
|
|
1027
1027
|
groupRow.group.totals[key] = Math.max(currentTotalValue, cellValue);
|
|
1028
1028
|
}
|
|
@@ -1044,19 +1044,19 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
1044
1044
|
parent = parent.group.parent;
|
|
1045
1045
|
}
|
|
1046
1046
|
}
|
|
1047
|
-
else if (dom$
|
|
1047
|
+
else if (dom$2.ketchup.objects.isDate(cell.obj)) {
|
|
1048
1048
|
const momentValue = cell.obj
|
|
1049
|
-
? dom$
|
|
1050
|
-
: dom$
|
|
1051
|
-
if (dom$
|
|
1052
|
-
const cellValue = dom$
|
|
1049
|
+
? dom$2.ketchup.objects.parseDate(cell.obj)
|
|
1050
|
+
: dom$2.ketchup.dates.toDayjs(cell.value);
|
|
1051
|
+
if (dom$2.ketchup.dates.isValid(momentValue)) {
|
|
1052
|
+
const cellValue = dom$2.ketchup.dates.toDate(momentValue);
|
|
1053
1053
|
const currentTotalValue = groupRow.group.totals[key];
|
|
1054
1054
|
if (currentTotalValue) {
|
|
1055
1055
|
let moments = [];
|
|
1056
1056
|
moments.push(cellValue);
|
|
1057
|
-
moments.push(dom$
|
|
1057
|
+
moments.push(dom$2.ketchup.dates.format(currentTotalValue));
|
|
1058
1058
|
groupRow.group.totals[key] =
|
|
1059
|
-
dom$
|
|
1059
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments));
|
|
1060
1060
|
}
|
|
1061
1061
|
else {
|
|
1062
1062
|
groupRow.group.totals[key] = cellValue;
|
|
@@ -1068,9 +1068,9 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
1068
1068
|
if (currentParentMin) {
|
|
1069
1069
|
let moments = [];
|
|
1070
1070
|
moments.push(cellValue);
|
|
1071
|
-
moments.push(dom$
|
|
1071
|
+
moments.push(dom$2.ketchup.dates.format(currentParentMin));
|
|
1072
1072
|
parent.group.totals[key] =
|
|
1073
|
-
dom$
|
|
1073
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments));
|
|
1074
1074
|
}
|
|
1075
1075
|
else {
|
|
1076
1076
|
// first round
|
|
@@ -1164,12 +1164,12 @@ function adjustGroupAverageOrFormula(row, type, toAdjustKeys, totals) {
|
|
|
1164
1164
|
toAdjustKeys.forEach((key) => {
|
|
1165
1165
|
if (type == kupManager.TotalMode.AVERAGE) {
|
|
1166
1166
|
row.group.totals[key] =
|
|
1167
|
-
dom$
|
|
1167
|
+
dom$2.ketchup.math.numberify(row.group.totals[key]) /
|
|
1168
1168
|
numberOfLeaf;
|
|
1169
1169
|
}
|
|
1170
1170
|
if (type == kupManager.TotalMode.MATH) {
|
|
1171
1171
|
let formula = totals[key].substring(kupManager.TotalMode.MATH.length);
|
|
1172
|
-
row.group.totals[key] = dom$
|
|
1172
|
+
row.group.totals[key] = dom$2.ketchup.math.formulas.custom(formula, row.group.totals);
|
|
1173
1173
|
}
|
|
1174
1174
|
});
|
|
1175
1175
|
return numberOfLeaf;
|
|
@@ -1199,8 +1199,8 @@ function normalizeRows(columns, rows) {
|
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
1201
1201
|
function calcTotals(rows = [], totals = {}) {
|
|
1202
|
-
if (dom$
|
|
1203
|
-
dom$
|
|
1202
|
+
if (dom$2.ketchup.objects.isEmptyJsObject(rows) ||
|
|
1203
|
+
dom$2.ketchup.objects.isEmptyJsObject(totals)) {
|
|
1204
1204
|
return {};
|
|
1205
1205
|
}
|
|
1206
1206
|
const keys = Object.keys(totals);
|
|
@@ -1222,8 +1222,8 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
1222
1222
|
if (cell) {
|
|
1223
1223
|
if (totals[key] === kupManager.TotalMode.DISTINCT) {
|
|
1224
1224
|
let cellValue;
|
|
1225
|
-
if (dom$
|
|
1226
|
-
cellValue = dom$
|
|
1225
|
+
if (dom$2.ketchup.objects.isNumber(cell.obj)) {
|
|
1226
|
+
cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
1227
1227
|
}
|
|
1228
1228
|
else {
|
|
1229
1229
|
cellValue = cell.value;
|
|
@@ -1239,8 +1239,8 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
1239
1239
|
distinctList.push(cellValue);
|
|
1240
1240
|
}
|
|
1241
1241
|
}
|
|
1242
|
-
else if (dom$
|
|
1243
|
-
const cellValue = dom$
|
|
1242
|
+
else if (dom$2.ketchup.objects.isNumber(cell.obj)) {
|
|
1243
|
+
const cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
1244
1244
|
let currentFooterValue = footerRow[key];
|
|
1245
1245
|
switch (true) {
|
|
1246
1246
|
// TODO DRY the MIN and MAX functions
|
|
@@ -1265,19 +1265,19 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
1265
1265
|
currentFooterValue = footerRow[key] || 0;
|
|
1266
1266
|
footerRow[key] =
|
|
1267
1267
|
cellValue +
|
|
1268
|
-
dom$
|
|
1268
|
+
dom$2.ketchup.math.numberify(currentFooterValue);
|
|
1269
1269
|
}
|
|
1270
1270
|
// TODO DRY the MIN and MAX functions
|
|
1271
1271
|
}
|
|
1272
|
-
else if (dom$
|
|
1272
|
+
else if (dom$2.ketchup.objects.isDate(cell.obj)) {
|
|
1273
1273
|
if (dateColumns.indexOf(key) == -1) {
|
|
1274
1274
|
dateColumns.push(key);
|
|
1275
1275
|
}
|
|
1276
|
-
const momentValue = dom$
|
|
1277
|
-
if (dom$
|
|
1278
|
-
const cellValue = dom$
|
|
1276
|
+
const momentValue = dom$2.ketchup.dates.toDayjs(cell.value);
|
|
1277
|
+
if (dom$2.ketchup.dates.isValid(momentValue)) {
|
|
1278
|
+
const cellValue = dom$2.ketchup.dates.toDate(momentValue);
|
|
1279
1279
|
const currentFooterValue = footerRow[key]
|
|
1280
|
-
? dom$
|
|
1280
|
+
? dom$2.ketchup.dates.toDate(dom$2.ketchup.dates.toDayjs(footerRow[key]))
|
|
1281
1281
|
: null;
|
|
1282
1282
|
switch (true) {
|
|
1283
1283
|
case totals[key] === kupManager.TotalMode.MIN:
|
|
@@ -1286,11 +1286,11 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
1286
1286
|
moments.push(cellValue);
|
|
1287
1287
|
moments.push(currentFooterValue);
|
|
1288
1288
|
footerRow[key] =
|
|
1289
|
-
dom$
|
|
1289
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments), kupManager.KupDatesFormats.ISO_DATE);
|
|
1290
1290
|
}
|
|
1291
1291
|
else {
|
|
1292
1292
|
footerRow[key] =
|
|
1293
|
-
dom$
|
|
1293
|
+
dom$2.ketchup.dates.format(cellValue, kupManager.KupDatesFormats.ISO_DATE);
|
|
1294
1294
|
}
|
|
1295
1295
|
break;
|
|
1296
1296
|
case totals[key] === kupManager.TotalMode.MAX:
|
|
@@ -1299,11 +1299,11 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
1299
1299
|
moments.push(cellValue);
|
|
1300
1300
|
moments.push(currentFooterValue);
|
|
1301
1301
|
footerRow[key] =
|
|
1302
|
-
dom$
|
|
1302
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments), kupManager.KupDatesFormats.ISO_DATE);
|
|
1303
1303
|
}
|
|
1304
1304
|
else {
|
|
1305
1305
|
footerRow[key] =
|
|
1306
|
-
dom$
|
|
1306
|
+
dom$2.ketchup.dates.format(cellValue, kupManager.KupDatesFormats.ISO_DATE);
|
|
1307
1307
|
}
|
|
1308
1308
|
break;
|
|
1309
1309
|
}
|
|
@@ -1332,14 +1332,14 @@ function calcTotals(rows = [], totals = {}) {
|
|
|
1332
1332
|
footerRow[key] = rows.length;
|
|
1333
1333
|
break;
|
|
1334
1334
|
case totals[key].indexOf(kupManager.TotalMode.MATH) == 0:
|
|
1335
|
-
footerRow[key] = dom$
|
|
1335
|
+
footerRow[key] = dom$2.ketchup.math.formulas.custom(totals[key].substring(kupManager.TotalMode.MATH.length), footerRow);
|
|
1336
1336
|
break;
|
|
1337
1337
|
}
|
|
1338
1338
|
if (footerRow[key]) {
|
|
1339
1339
|
if (dateColumns.indexOf(key) != -1) {
|
|
1340
|
-
footerRow[key] = dom$
|
|
1340
|
+
footerRow[key] = dom$2.ketchup.dates.format(footerRow[key]);
|
|
1341
1341
|
}
|
|
1342
|
-
else if (
|
|
1342
|
+
else if (dom$2.ketchup.math.isNumber(footerRow[key])) {
|
|
1343
1343
|
footerRow[key] = +footerRow[key].toFixed(2);
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
@@ -1447,7 +1447,7 @@ exports.FPaginatorMode = void 0;
|
|
|
1447
1447
|
FPaginatorMode["FULL"] = "full";
|
|
1448
1448
|
})(exports.FPaginatorMode || (exports.FPaginatorMode = {}));
|
|
1449
1449
|
|
|
1450
|
-
const dom = document.documentElement;
|
|
1450
|
+
const dom$1 = document.documentElement;
|
|
1451
1451
|
/*-------------------------------------------------*/
|
|
1452
1452
|
/* C o m p o n e n t */
|
|
1453
1453
|
/*-------------------------------------------------*/
|
|
@@ -1460,8 +1460,8 @@ const FPaginator = (props) => {
|
|
|
1460
1460
|
data: pageItems,
|
|
1461
1461
|
},
|
|
1462
1462
|
'kup-text-field': {
|
|
1463
|
-
label: dom.ketchup.language.translate(kupManager.KupLanguagePage.PAGE),
|
|
1464
|
-
helper: dom.ketchup.language.translate(kupManager.KupLanguagePage.TOTAL) +
|
|
1463
|
+
label: dom$1.ketchup.language.translate(kupManager.KupLanguagePage.PAGE),
|
|
1464
|
+
helper: dom$1.ketchup.language.translate(kupManager.KupLanguagePage.TOTAL) +
|
|
1465
1465
|
`: ${maxNumberOfPage}`,
|
|
1466
1466
|
helperWhenFocused: true,
|
|
1467
1467
|
inputType: 'number',
|
|
@@ -1474,10 +1474,10 @@ const FPaginator = (props) => {
|
|
|
1474
1474
|
data: rowsPerPageItems,
|
|
1475
1475
|
},
|
|
1476
1476
|
'kup-text-field': {
|
|
1477
|
-
label: dom.ketchup.language.translate(kupManager.KupLanguageRow.ROWS) +
|
|
1477
|
+
label: dom$1.ketchup.language.translate(kupManager.KupLanguageRow.ROWS) +
|
|
1478
1478
|
' / ' +
|
|
1479
|
-
dom.ketchup.language.translate(kupManager.KupLanguagePage.PAGE),
|
|
1480
|
-
helper: dom.ketchup.language.translate(kupManager.KupLanguageRow.TOTAL) +
|
|
1479
|
+
dom$1.ketchup.language.translate(kupManager.KupLanguagePage.PAGE),
|
|
1480
|
+
helper: dom$1.ketchup.language.translate(kupManager.KupLanguageRow.TOTAL) +
|
|
1481
1481
|
`: ${props.max}`,
|
|
1482
1482
|
helperWhenFocused: true,
|
|
1483
1483
|
inputType: 'number',
|
|
@@ -1490,7 +1490,7 @@ const FPaginator = (props) => {
|
|
|
1490
1490
|
index.h("kup-combobox", { class: "page-selector", data: dataPageSelector, initialValue: props.currentPage.toString(), "onkup-combobox-change": props.onPageChange }),
|
|
1491
1491
|
props.mode !== exports.FPaginatorMode.SIMPLE ? (index.h(fButton.FButton, { icon: "chevron_right", disabled: isNextPageDisabled(props), onClick: props.onNextPage, wrapperClass: "next-page" })) : null,
|
|
1492
1492
|
index.h("kup-combobox", { class: "rows-selector", data: dataRowsSelector, initialValue: props.perPage.toString(), "onkup-combobox-change": props.onRowsChange }),
|
|
1493
|
-
props.onLoadMore ? (index.h(fButton.FButton, { icon: "plus", onClick: props.onLoadMore, label: dom.ketchup.language.translate(kupManager.KupLanguageGeneric.LOAD_MORE), styling: fButtonDeclarations.FButtonStyling.FLAT, wrapperClass: "load-more-button" })) : null));
|
|
1493
|
+
props.onLoadMore ? (index.h(fButton.FButton, { icon: "plus", onClick: props.onLoadMore, label: dom$1.ketchup.language.translate(kupManager.KupLanguageGeneric.LOAD_MORE), styling: fButtonDeclarations.FButtonStyling.FLAT, wrapperClass: "load-more-button" })) : null));
|
|
1494
1494
|
};
|
|
1495
1495
|
function getPageItems(props, maxNumberOfPage) {
|
|
1496
1496
|
const pageItems = [];
|
|
@@ -1534,8 +1534,9 @@ function isPrevPageDisabled(props) {
|
|
|
1534
1534
|
return props.currentPage == 1;
|
|
1535
1535
|
}
|
|
1536
1536
|
|
|
1537
|
+
const dom = document.documentElement;
|
|
1537
1538
|
function pageChange(pageNumber, max, perPage) {
|
|
1538
|
-
if (
|
|
1539
|
+
if (dom.ketchup.math.isNumber(pageNumber)) {
|
|
1539
1540
|
const numberOfPages = Math.ceil(max / perPage);
|
|
1540
1541
|
let tmpNewPage = pageNumber;
|
|
1541
1542
|
if (tmpNewPage > numberOfPages) {
|
|
@@ -1549,7 +1550,7 @@ function pageChange(pageNumber, max, perPage) {
|
|
|
1549
1550
|
return null;
|
|
1550
1551
|
}
|
|
1551
1552
|
function rowsPerPageChange(rowsNumber, max) {
|
|
1552
|
-
if (
|
|
1553
|
+
if (dom.ketchup.math.isNumber(rowsNumber)) {
|
|
1553
1554
|
let tmpRowsPerPage = rowsNumber;
|
|
1554
1555
|
if (tmpRowsPerPage > max) {
|
|
1555
1556
|
tmpRowsPerPage = max;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-1f177abc.js');
|
|
4
|
-
const kupManager = require('./kup-manager-
|
|
4
|
+
const kupManager = require('./kup-manager-85b2a756.js');
|
|
5
5
|
|
|
6
6
|
const dom = document.documentElement;
|
|
7
7
|
/*-------------------------------------------------*/
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1f177abc.js');
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const fImage = require('./f-image-
|
|
6
|
+
const kupManager = require('./kup-manager-85b2a756.js');
|
|
7
|
+
const fImage = require('./f-image-47d74999.js');
|
|
8
8
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
9
|
const component = require('./component-85c2bd4d.js');
|
|
10
10
|
require('./tslib.es6-386654de.js');
|