@sme.up/ketchup 6.1.0-SNAPSHOT → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-button-ac179257.js → f-button-94cb5f35.js} +4 -4
- package/dist/cjs/f-cell-76830a0d.js +416 -0
- package/dist/cjs/f-checkbox-cd977193.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-68d45fd3.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-0e71df7e.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-46689c0a.js} +80 -403
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-b4229cef.js} +11 -3
- package/dist/cjs/{index-eb556444.js → index-31125378.js} +15 -8
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +5 -6
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +331 -299
- package/dist/cjs/kup-box.cjs.entry.js +1304 -0
- package/dist/cjs/kup-calendar.cjs.entry.js +9 -11
- package/dist/cjs/kup-cell.cjs.entry.js +10 -11
- package/dist/cjs/kup-dash-list.cjs.entry.js +5 -7
- package/dist/cjs/kup-dash_2.cjs.entry.js +5 -9
- package/dist/cjs/kup-dashboard.cjs.entry.js +438 -0
- package/dist/cjs/kup-drawer.cjs.entry.js +5 -6
- package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +66 -1353
- package/dist/cjs/kup-family-tree.cjs.entry.js +486 -0
- package/dist/cjs/kup-form.cjs.entry.js +478 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -5
- package/dist/cjs/kup-image-list.cjs.entry.js +73 -13
- package/dist/cjs/kup-lazy.cjs.entry.js +5 -6
- package/dist/cjs/kup-magic-box.cjs.entry.js +5 -6
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-7c514a30.js} +1787 -356
- package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -5
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +6 -7
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +6 -7
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/assets/dashboard.js +161 -0
- package/dist/collection/assets/data-table.js +59 -0
- package/dist/collection/assets/family-tree.js +2654 -0
- package/dist/collection/assets/form.js +433 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +18 -6
- package/dist/collection/assets/kupinteract.js +68 -0
- package/dist/collection/collection-manifest.json +8 -7
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
- package/dist/collection/components/kup-box/kup-box.js +13 -2
- package/dist/collection/components/kup-button/kup-button.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +14 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +211 -152
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +42 -30
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
- package/dist/collection/components/kup-echart/kup-echart.js +9 -9
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +14 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +171 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +854 -0
- package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
- package/dist/collection/components/kup-form/kup-form.css +99 -0
- package/dist/collection/components/kup-form/kup-form.js +647 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
- package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
- package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +4 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +54 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +26 -9
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +9 -1
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +48 -15
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
- package/dist/collection/managers/kup-data/kup-data.js +114 -6
- package/dist/collection/managers/kup-interact/kup-interact.js +3 -5
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +2 -0
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +131 -45
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
- package/dist/collection/types/GenericTypes.js +3 -2
- package/dist/collection/utils/filters/filters-rows.js +4 -23
- package/dist/collection/utils/filters/filters-tree-items.js +2 -1
- package/dist/esm/{f-button-871a544b.js → f-button-cd948e50.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-474dd282.js} +46 -283
- package/dist/esm/f-checkbox-e06cf07b.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-d6f2eb94.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-914a03ef.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-a4a52732.js} +44 -366
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-76341fe3.js} +11 -3
- package/dist/esm/{index-baeab1ac.js → index-e41330a5.js} +15 -8
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +3 -4
- package/dist/esm/kup-autocomplete_25.entry.js +222 -190
- package/dist/esm/kup-box.entry.js +1300 -0
- package/dist/esm/kup-calendar.entry.js +5 -7
- package/dist/esm/kup-cell.entry.js +7 -8
- package/dist/esm/kup-dash-list.entry.js +2 -4
- package/dist/esm/kup-dash_2.entry.js +3 -7
- package/dist/esm/kup-dashboard.entry.js +434 -0
- package/dist/esm/kup-drawer.entry.js +3 -4
- package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +61 -1347
- package/dist/esm/kup-family-tree.entry.js +482 -0
- package/dist/esm/kup-form.entry.js +474 -0
- package/dist/esm/kup-iframe.entry.js +2 -3
- package/dist/esm/kup-image-list.entry.js +70 -10
- package/dist/esm/kup-lazy.entry.js +3 -4
- package/dist/esm/kup-magic-box.entry.js +3 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-86f440c7.js} +1762 -357
- package/dist/esm/kup-nav-bar.entry.js +2 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +4 -5
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +4 -5
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-00e1133d.entry.js +9 -0
- package/dist/ketchup/p-066f344a.entry.js +1 -0
- package/dist/ketchup/p-0c6e0647.entry.js +1 -0
- package/dist/ketchup/p-151f7c17.entry.js +27 -0
- package/dist/ketchup/p-1e9c03b0.entry.js +1 -0
- package/dist/ketchup/p-21ea11cb.js +30 -0
- package/dist/ketchup/{p-fac1a08b.entry.js → p-2f4e6c50.entry.js} +1 -1
- package/dist/ketchup/p-3586f59c.js +1 -0
- package/dist/ketchup/p-359fd90d.entry.js +1 -0
- package/dist/ketchup/p-389fd0bf.js +1 -0
- package/dist/ketchup/p-5552f156.js +1 -0
- package/dist/ketchup/{p-f09f2f98.entry.js → p-77aff9c1.entry.js} +1 -1
- package/dist/ketchup/p-7cfdf53c.entry.js +39 -0
- package/dist/ketchup/p-853a5178.entry.js +1 -0
- package/dist/ketchup/{p-44ec4f03.js → p-8673bd4e.js} +1 -1
- package/dist/ketchup/p-8b55b786.entry.js +1 -0
- package/dist/ketchup/p-95f5834b.entry.js +1 -0
- package/dist/ketchup/p-a2c595c4.js +1 -0
- package/dist/ketchup/p-ae91f27e.entry.js +1 -0
- package/dist/ketchup/p-af664379.js +1 -0
- package/dist/ketchup/p-b0b3989b.js +2 -0
- package/dist/ketchup/p-b3b65a61.entry.js +1 -0
- package/dist/ketchup/p-bc306a53.entry.js +1 -0
- package/dist/ketchup/{p-f71a1675.entry.js → p-c3783b77.entry.js} +1 -1
- package/dist/ketchup/{p-7eff4eee.js → p-cd4fc3fb.js} +1 -1
- package/dist/ketchup/p-cee76b14.entry.js +1 -0
- package/dist/ketchup/p-cfaea29b.entry.js +1 -0
- package/dist/ketchup/p-d2f51e7b.entry.js +1 -0
- package/dist/ketchup/p-df8e6a4d.entry.js +1 -0
- package/dist/ketchup/p-e60a1170.entry.js +1 -0
- package/dist/ketchup/p-e9a1ba04.entry.js +1 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
- package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
- package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +17 -9
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +37 -0
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +82 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
- package/dist/types/components/kup-form/kup-form.d.ts +63 -0
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +4 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +10 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components/kup-tree/kup-tree.d.ts +0 -1
- package/dist/types/components.d.ts +492 -231
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +2 -0
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +13 -6
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +9 -2
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +9 -1
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +7 -5
- package/dist/types/types/GenericTypes.d.ts +3 -2
- package/dist/types/utils/filters/filters-rows.d.ts +0 -2
- package/package.json +2 -2
- package/dist/cjs/cell-utils-a78d6fac.js +0 -168
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/cjs/kup-field.cjs.entry.js +0 -241
- package/dist/cjs/kup-form-editor.cjs.entry.js +0 -404
- package/dist/cjs/utils-6287d878.js +0 -447
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
- package/dist/collection/components/kup-field/kup-field.css +0 -48
- package/dist/collection/components/kup-field/kup-field.js +0 -514
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/esm/cell-utils-964da6b5.js +0 -160
- package/dist/esm/kup-field.entry.js +0 -237
- package/dist/esm/kup-form-editor.entry.js +0 -400
- package/dist/esm/utils-d7e4b3c2.js +0 -428
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-3c11e615.entry.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-65974e48.entry.js +0 -1
- package/dist/ketchup/p-65b46587.entry.js +0 -40
- package/dist/ketchup/p-6dff70f8.entry.js +0 -1
- package/dist/ketchup/p-7454cb92.js +0 -1
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-8cdf61a4.js +0 -1
- package/dist/ketchup/p-954cc340.entry.js +0 -1
- package/dist/ketchup/p-976244f9.entry.js +0 -9
- package/dist/ketchup/p-99e0d768.entry.js +0 -1
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-a615a92b.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-c5ce8951.entry.js +0 -1
- package/dist/ketchup/p-d2ee56dd.entry.js +0 -1
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e0035c58.js +0 -1
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
- package/dist/ketchup/p-ea10176c.entry.js +0 -1
- package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
- package/dist/types/components/kup-field/kup-field.d.ts +0 -90
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SortMode, TotalMode, } from './kup-data-table-declarations';
|
|
2
|
-
import { stringToNumber } from '../../utils/utils';
|
|
2
|
+
import { isNumber, stringToNumber } from '../../utils/utils';
|
|
3
3
|
import { getCellValueForDisplay, getColumnByName, compareCell, } from '../../utils/cell-utils';
|
|
4
4
|
import { FiltersRows } from '../../utils/filters/filters-rows';
|
|
5
|
+
import { KupDatesFormats } from '../../managers/kup-dates/kup-dates-declarations';
|
|
5
6
|
const dom = document.documentElement;
|
|
6
7
|
export function sortRows(rows = [], sort = []) {
|
|
7
8
|
if (!rows || rows.length === 0) {
|
|
@@ -567,8 +568,9 @@ export function calcTotals(rows = [], totals = {}) {
|
|
|
567
568
|
}
|
|
568
569
|
const keys = Object.keys(totals);
|
|
569
570
|
const footerRow = {};
|
|
571
|
+
const dateColumns = new Array();
|
|
570
572
|
// if there are only COUNT, no need to loop on rows
|
|
571
|
-
let onlyCount = keys.length === 0
|
|
573
|
+
let onlyCount = keys.length === 0 ||
|
|
572
574
|
keys.every((key) => totals[key] === TotalMode.COUNT);
|
|
573
575
|
if (onlyCount) {
|
|
574
576
|
keys.forEach((columnName) => (footerRow[columnName] = rows.length));
|
|
@@ -631,35 +633,40 @@ export function calcTotals(rows = [], totals = {}) {
|
|
|
631
633
|
// TODO DRY the MIN and MAX functions
|
|
632
634
|
}
|
|
633
635
|
else if (dom.ketchup.objects.isDate(cell.obj)) {
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
636
|
+
if (dateColumns.indexOf(key) == -1) {
|
|
637
|
+
dateColumns.push(key);
|
|
638
|
+
}
|
|
639
|
+
const momentValue = dom.ketchup.dates.toDayjs(cell.value);
|
|
637
640
|
if (dom.ketchup.dates.isValid(momentValue)) {
|
|
638
641
|
const cellValue = dom.ketchup.dates.toDate(momentValue);
|
|
639
|
-
const currentFooterValue = footerRow[key]
|
|
642
|
+
const currentFooterValue = footerRow[key]
|
|
643
|
+
? dom.ketchup.dates.toDate(dom.ketchup.dates.toDayjs(footerRow[key]))
|
|
644
|
+
: null;
|
|
640
645
|
switch (true) {
|
|
641
646
|
case totals[key] === TotalMode.MIN:
|
|
642
647
|
if (currentFooterValue) {
|
|
643
648
|
let moments = [];
|
|
644
649
|
moments.push(cellValue);
|
|
645
|
-
moments.push(
|
|
650
|
+
moments.push(currentFooterValue);
|
|
646
651
|
footerRow[key] =
|
|
647
|
-
dom.ketchup.dates.format(dom.ketchup.dates.min(moments));
|
|
652
|
+
dom.ketchup.dates.format(dom.ketchup.dates.min(moments), KupDatesFormats.ISO_DATE);
|
|
648
653
|
}
|
|
649
654
|
else {
|
|
650
|
-
footerRow[key] =
|
|
655
|
+
footerRow[key] =
|
|
656
|
+
dom.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
651
657
|
}
|
|
652
658
|
break;
|
|
653
659
|
case totals[key] === TotalMode.MAX:
|
|
654
660
|
if (currentFooterValue) {
|
|
655
661
|
let moments = [];
|
|
656
662
|
moments.push(cellValue);
|
|
657
|
-
moments.push(
|
|
663
|
+
moments.push(currentFooterValue);
|
|
658
664
|
footerRow[key] =
|
|
659
|
-
dom.ketchup.dates.format(dom.ketchup.dates.max(moments));
|
|
665
|
+
dom.ketchup.dates.format(dom.ketchup.dates.max(moments), KupDatesFormats.ISO_DATE);
|
|
660
666
|
}
|
|
661
667
|
else {
|
|
662
|
-
footerRow[key] =
|
|
668
|
+
footerRow[key] =
|
|
669
|
+
dom.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
663
670
|
}
|
|
664
671
|
break;
|
|
665
672
|
default:
|
|
@@ -676,25 +683,30 @@ export function calcTotals(rows = [], totals = {}) {
|
|
|
676
683
|
}
|
|
677
684
|
});
|
|
678
685
|
});
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
686
|
+
}
|
|
687
|
+
// fixing MATH, AVERAGE and COUNT
|
|
688
|
+
for (let key of keys) {
|
|
689
|
+
switch (true) {
|
|
690
|
+
case totals[key] === TotalMode.AVERAGE:
|
|
691
|
+
const sum = footerRow[key];
|
|
692
|
+
if (sum && rows.length > 0) {
|
|
693
|
+
footerRow[key] = sum / rows.length;
|
|
694
|
+
}
|
|
695
|
+
break;
|
|
696
|
+
case totals[key] === TotalMode.COUNT:
|
|
697
|
+
footerRow[key] = rows.length;
|
|
698
|
+
break;
|
|
699
|
+
case totals[key].indexOf(TotalMode.MATH) == 0:
|
|
700
|
+
footerRow[key] = dom.ketchup.math.formulas.custom(totals[key].substring(TotalMode.MATH.length), footerRow);
|
|
701
|
+
break;
|
|
702
|
+
default:
|
|
703
|
+
break;
|
|
704
|
+
}
|
|
705
|
+
if (footerRow[key]) {
|
|
706
|
+
if (dateColumns.indexOf(key) != -1) {
|
|
707
|
+
footerRow[key] = dom.ketchup.dates.format(footerRow[key]);
|
|
696
708
|
}
|
|
697
|
-
if (footerRow[key]) {
|
|
709
|
+
else if (isNumber(footerRow[key])) {
|
|
698
710
|
footerRow[key] = +footerRow[key].toFixed(2);
|
|
699
711
|
}
|
|
700
712
|
}
|
|
@@ -5,8 +5,8 @@ export class KupDataTableState {
|
|
|
5
5
|
this.expandGroups = false;
|
|
6
6
|
this.groupLabelDisplay = GroupLabelDisplayMode.BOTH;
|
|
7
7
|
this.density = 'small';
|
|
8
|
-
this.enableSortableColumns = false;
|
|
9
8
|
this.enableExtraColumns = true;
|
|
9
|
+
this.enableSortableColumns = false;
|
|
10
10
|
this.forceOneLine = false;
|
|
11
11
|
this.globalFilter = false;
|
|
12
12
|
this.globalFilterValue = '';
|
|
@@ -3338,20 +3338,21 @@ export class KupDataTable {
|
|
|
3338
3338
|
}
|
|
3339
3339
|
let groupChips = null;
|
|
3340
3340
|
if (this.isGrouping()) {
|
|
3341
|
-
const chipsData =
|
|
3341
|
+
const chipsData = [];
|
|
3342
|
+
for (let index = 0; index < this.groups.length; index++) {
|
|
3343
|
+
const group = this.groups[index];
|
|
3342
3344
|
const column = getColumnByName(this.getColumns(), group.column);
|
|
3343
3345
|
if (column) {
|
|
3344
|
-
|
|
3346
|
+
chipsData.push({
|
|
3345
3347
|
value: column.title,
|
|
3346
3348
|
id: column.name,
|
|
3347
3349
|
checked: true,
|
|
3348
|
-
};
|
|
3349
|
-
return a;
|
|
3350
|
+
});
|
|
3350
3351
|
}
|
|
3351
3352
|
else {
|
|
3352
|
-
|
|
3353
|
+
this.kupManager.debug.logMessage(this, "Grouped for a non-existent column! (" + group.column + ")", KupDebugCategory.WARNING);
|
|
3353
3354
|
}
|
|
3354
|
-
}
|
|
3355
|
+
}
|
|
3355
3356
|
if (chipsData.length > 0) {
|
|
3356
3357
|
const props = {
|
|
3357
3358
|
data: chipsData,
|
|
@@ -37,15 +37,13 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.backdrop {
|
|
40
|
+
background: var(--kup_drawer_backdrop);
|
|
41
|
+
display: none;
|
|
42
|
+
height: 100%;
|
|
43
|
+
left: 0;
|
|
40
44
|
position: fixed;
|
|
41
45
|
top: 0;
|
|
42
|
-
left: 0;
|
|
43
46
|
width: 100%;
|
|
44
|
-
height: 100%;
|
|
45
|
-
background: var(--kup_drawer_backdrop);
|
|
46
|
-
opacity: 0;
|
|
47
|
-
pointer-events: none;
|
|
48
|
-
transition: opacity var(--kup_drawer_transition) ease-in;
|
|
49
47
|
z-index: var(--kup-drawer-zindex);
|
|
50
48
|
}
|
|
51
49
|
|
|
@@ -87,8 +85,7 @@
|
|
|
87
85
|
left: 0;
|
|
88
86
|
}
|
|
89
87
|
:host([kup-opened]) .backdrop {
|
|
90
|
-
|
|
91
|
-
pointer-events: all;
|
|
88
|
+
display: block;
|
|
92
89
|
}
|
|
93
90
|
|
|
94
91
|
/*-------------------------------------------------*/
|
|
@@ -326,6 +326,7 @@ export class KupDropdownButton {
|
|
|
326
326
|
? true
|
|
327
327
|
: false,
|
|
328
328
|
styling: this.styling ? this.styling : FButtonStyling.RAISED,
|
|
329
|
+
title: this.rootElement.title,
|
|
329
330
|
};
|
|
330
331
|
if (!this.dropdownOnly) {
|
|
331
332
|
buttons.push(h(FButton, Object.assign({}, props, { icon: this.icon ? this.icon : null, label: this.label ? this.label : null, trailingIcon: this.trailingIcon ? true : false, wrapperClass: "dropdown-button__primary-action", onClick: () => this.onKupClick(), onBlur: () => this.onKupBlur(), onFocus: () => this.onKupFocus() })));
|
|
@@ -1063,29 +1063,29 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
|
|
|
1063
1063
|
if (type == KupEchartTypes.GAUSSIAN) {
|
|
1064
1064
|
if (!__classPrivateFieldGet(this, _KupEchart_kupManager, "f").objects.isNumber(column.obj)) {
|
|
1065
1065
|
const newDataset = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.distinct(this.data, [column.name]);
|
|
1066
|
-
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(newDataset,
|
|
1067
|
-
column.name,
|
|
1068
|
-
]);
|
|
1066
|
+
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(newDataset, column);
|
|
1069
1067
|
__classPrivateFieldGet(this, _KupEchart_gaussianDatasets, "f")[column.name] = newDataset;
|
|
1070
1068
|
}
|
|
1071
1069
|
else {
|
|
1072
|
-
values = y[key];
|
|
1070
|
+
values = [{ value: y[key] }];
|
|
1073
1071
|
}
|
|
1074
1072
|
}
|
|
1075
1073
|
else {
|
|
1076
1074
|
if (needSortDataset) {
|
|
1077
1075
|
// if there is only one series other than the Gaussian then I apply the sorting algorithm that arranges the data in "mountain"
|
|
1078
1076
|
__classPrivateFieldSet(this, _KupEchart_sortedDataset, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.sort(this.data, 'normalDistribution', column.name), "f");
|
|
1079
|
-
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(__classPrivateFieldGet(this, _KupEchart_sortedDataset, "f"),
|
|
1077
|
+
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(__classPrivateFieldGet(this, _KupEchart_sortedDataset, "f"), column);
|
|
1080
1078
|
x = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_createX).call(this, __classPrivateFieldGet(this, _KupEchart_sortedDataset, "f"));
|
|
1081
1079
|
}
|
|
1082
1080
|
else {
|
|
1083
|
-
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(this.data,
|
|
1084
|
-
column.name,
|
|
1085
|
-
]);
|
|
1081
|
+
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(this.data, column);
|
|
1086
1082
|
}
|
|
1087
1083
|
}
|
|
1088
|
-
|
|
1084
|
+
const justValues = new Array();
|
|
1085
|
+
for (let i = 0; i < values.length; i++) {
|
|
1086
|
+
justValues.push(values[i].value);
|
|
1087
|
+
}
|
|
1088
|
+
__classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_addSeries).call(this, type, series, justValues, key, mixedSeries, needSortDataset);
|
|
1089
1089
|
i++;
|
|
1090
1090
|
}
|
|
1091
1091
|
// "any" because type is mismanaged inside echarts library
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props of the kup-family-tree component.
|
|
3
|
+
* Used to export every prop in an object.
|
|
4
|
+
*/
|
|
5
|
+
export var KupFamilyTreeProps;
|
|
6
|
+
(function (KupFamilyTreeProps) {
|
|
7
|
+
KupFamilyTreeProps["autofitOnExpand"] = "The component will autofit everytime a node is expanded.";
|
|
8
|
+
KupFamilyTreeProps["autofitOnLoad"] = "The component's initial render will fit the container by invoking the runAutofit method.";
|
|
9
|
+
KupFamilyTreeProps["collapsible"] = "Nodes can be expanded/collapsed.";
|
|
10
|
+
KupFamilyTreeProps["customStyle"] = "Custom style of the component.";
|
|
11
|
+
KupFamilyTreeProps["data"] = "Actual data of the component";
|
|
12
|
+
KupFamilyTreeProps["layout"] = "Layout of the boxes.";
|
|
13
|
+
KupFamilyTreeProps["stackedLeaves"] = "Child nodes that have no children are arranged vertically.";
|
|
14
|
+
})(KupFamilyTreeProps || (KupFamilyTreeProps = {}));
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* //TODO: Handle height properly once understood whether to use kup-box or not
|
|
3
|
+
* @prop --kup-familytree-item-background-color: Sets the background color of the items.
|
|
4
|
+
* @prop --kup-familytree-item-color: Sets the color of the items.
|
|
5
|
+
* @prop --kup-familytree-item-height: Sets the height of the items.
|
|
6
|
+
* @prop --kup-familytree-item-h-padding: Sets the horizontal padding of items.
|
|
7
|
+
* @prop --kup-familytree-item-v-padding: Sets the vertical padding of items.
|
|
8
|
+
* @prop --kup-familytree-item-width: Sets the width of the items.
|
|
9
|
+
* @prop --kup-familytree-lines-color: Sets the color of the lines.
|
|
10
|
+
*/
|
|
11
|
+
:host {
|
|
12
|
+
--kup_familytree_item_background_color: var(
|
|
13
|
+
--kup-familytree-item-background-color,
|
|
14
|
+
var(--kup-background-color)
|
|
15
|
+
);
|
|
16
|
+
--kup_familytree_item_color: var(
|
|
17
|
+
--kup-familytree-item-color,
|
|
18
|
+
var(--kup-text-color)
|
|
19
|
+
);
|
|
20
|
+
--kup_familytree_item_height: var(--kup-familytree-item-height, 80px);
|
|
21
|
+
--kup_familytree_item_h_padding: var(--kup-familytree-item-h-padding, 8px);
|
|
22
|
+
--kup_familytree_item_v_padding: var(--kup-familytree-item-v-padding, 10px);
|
|
23
|
+
--kup_familytree_item_width: var(--kup-familytree-item-width, 280px);
|
|
24
|
+
--kup_familytree_lines_color: var(
|
|
25
|
+
--kup-familytree-lines-color,
|
|
26
|
+
var(--kup-border-color)
|
|
27
|
+
);
|
|
28
|
+
display: block;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.family-tree {
|
|
33
|
+
cursor: grab;
|
|
34
|
+
display: flex;
|
|
35
|
+
transform: scale(var(--kup_familytree_scale, 1));
|
|
36
|
+
transform-origin: 0px 0px;
|
|
37
|
+
}
|
|
38
|
+
.family-tree--dragging {
|
|
39
|
+
cursor: grabbing;
|
|
40
|
+
}
|
|
41
|
+
.family-tree__node {
|
|
42
|
+
border-collapse: collapse;
|
|
43
|
+
margin: auto;
|
|
44
|
+
}
|
|
45
|
+
.family-tree__node--stacked {
|
|
46
|
+
margin-bottom: 4px;
|
|
47
|
+
}
|
|
48
|
+
.family-tree__node__staff {
|
|
49
|
+
align-items: center;
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
height: 0;
|
|
53
|
+
transform: translateX(calc( ( var(--kup_familytree_item_width) + (var(--kup_familytree_item_h_padding) * 2) ) / 2 )) translateY(calc( 0px - ( var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * (var(--kup_familytree_item_v_padding) * 2) ) ));
|
|
54
|
+
}
|
|
55
|
+
.family-tree__node__staff__item {
|
|
56
|
+
padding: var(--kup_familytree_item_v_padding);
|
|
57
|
+
text-align: left;
|
|
58
|
+
}
|
|
59
|
+
.family-tree__node__staff__item:before {
|
|
60
|
+
border-top: 2px solid var(--kup_familytree_lines_color);
|
|
61
|
+
content: "";
|
|
62
|
+
position: absolute;
|
|
63
|
+
transform: translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));
|
|
64
|
+
width: var(--kup_familytree_item_h_padding);
|
|
65
|
+
}
|
|
66
|
+
.family-tree__node td {
|
|
67
|
+
vertical-align: top;
|
|
68
|
+
padding: 0;
|
|
69
|
+
}
|
|
70
|
+
.family-tree__line--left {
|
|
71
|
+
border-left: 2px solid var(--kup_familytree_lines_color);
|
|
72
|
+
}
|
|
73
|
+
.family-tree__line--placeholder {
|
|
74
|
+
height: calc(var(--kup_familytree_item_height) / 2);
|
|
75
|
+
}
|
|
76
|
+
.family-tree__line--staff {
|
|
77
|
+
height: calc( var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * (var(--kup_familytree_item_v_padding) * 2) );
|
|
78
|
+
}
|
|
79
|
+
.family-tree__line--right {
|
|
80
|
+
border-right: 2px solid var(--kup_familytree_lines_color);
|
|
81
|
+
}
|
|
82
|
+
.family-tree__line--top {
|
|
83
|
+
border-top: 2px solid var(--kup_familytree_lines_color);
|
|
84
|
+
}
|
|
85
|
+
.family-tree__line--vertical {
|
|
86
|
+
background-color: var(--kup_familytree_lines_color);
|
|
87
|
+
margin-left: auto;
|
|
88
|
+
margin-right: auto;
|
|
89
|
+
width: 2px;
|
|
90
|
+
}
|
|
91
|
+
.family-tree__item {
|
|
92
|
+
display: flex;
|
|
93
|
+
}
|
|
94
|
+
.family-tree__item__wrapper {
|
|
95
|
+
margin: auto;
|
|
96
|
+
}
|
|
97
|
+
.family-tree__item__wrapper kup-box {
|
|
98
|
+
margin: 0 auto;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
padding: 0 18px;
|
|
101
|
+
width: var(--kup_familytree_item_width);
|
|
102
|
+
z-index: 1;
|
|
103
|
+
}
|
|
104
|
+
.family-tree__item__wrapper .f-button {
|
|
105
|
+
--kup-button-primary-color: var(--kup-text-color);
|
|
106
|
+
--kup-button-primary-color-rgb: var(--kup-text-color-rgb);
|
|
107
|
+
--kup-button-primary-color-h: var(--kup-text-color-h);
|
|
108
|
+
--kup-button-primary-color-s: var(--kup-text-color-s);
|
|
109
|
+
--kup-button-primary-color-l: var(--kup-text-color-l);
|
|
110
|
+
margin: 0 auto;
|
|
111
|
+
width: max-content;
|
|
112
|
+
}
|
|
113
|
+
.family-tree__item__wrapper .f-button button {
|
|
114
|
+
height: 32px;
|
|
115
|
+
width: 32px;
|
|
116
|
+
}
|
|
117
|
+
.family-tree__item__layout {
|
|
118
|
+
background-color: var(--kup_familytree_item_background_color);
|
|
119
|
+
border: 1px solid var(--kup_familytree_lines_color);
|
|
120
|
+
border-radius: 8px;
|
|
121
|
+
box-sizing: border-box;
|
|
122
|
+
display: flex;
|
|
123
|
+
height: var(--kup_familytree_item_height);
|
|
124
|
+
margin: 0 18px;
|
|
125
|
+
width: var(--kup_familytree_item_width);
|
|
126
|
+
}
|
|
127
|
+
.family-tree__item__layout--1 {
|
|
128
|
+
justify-content: center;
|
|
129
|
+
color: var(--kup_familytree_item_color);
|
|
130
|
+
}
|
|
131
|
+
.family-tree__item__layout--1 > .family-tree__item__layout__text__title {
|
|
132
|
+
margin-top: auto;
|
|
133
|
+
margin-bottom: auto;
|
|
134
|
+
}
|
|
135
|
+
.family-tree__item__layout--2 {
|
|
136
|
+
background-color: var(--kup_familytree_item_background_color);
|
|
137
|
+
justify-content: flex-start;
|
|
138
|
+
}
|
|
139
|
+
.family-tree__item__layout__color {
|
|
140
|
+
background-color: var(--kup-secondary-color);
|
|
141
|
+
border-bottom-left-radius: 8px;
|
|
142
|
+
border-top-left-radius: 8px;
|
|
143
|
+
height: 100%;
|
|
144
|
+
width: 10px;
|
|
145
|
+
}
|
|
146
|
+
.family-tree__item__layout__image {
|
|
147
|
+
display: flex;
|
|
148
|
+
margin: auto 10px;
|
|
149
|
+
}
|
|
150
|
+
.family-tree__item__layout__image img {
|
|
151
|
+
border-radius: 50px;
|
|
152
|
+
object-fit: cover;
|
|
153
|
+
}
|
|
154
|
+
.family-tree__item__layout__text {
|
|
155
|
+
display: flex;
|
|
156
|
+
flex-direction: column;
|
|
157
|
+
justify-content: center;
|
|
158
|
+
}
|
|
159
|
+
.family-tree__item__layout__text__title {
|
|
160
|
+
font-size: 18px;
|
|
161
|
+
margin-bottom: 5px;
|
|
162
|
+
}
|
|
163
|
+
.family-tree__item__layout__text__subtitle {
|
|
164
|
+
font-size: 14px;
|
|
165
|
+
}
|
|
166
|
+
.family-tree__item__layout__text__title, .family-tree__item__layout__text__subtitle {
|
|
167
|
+
max-width: calc(var(--kup_familytree_item_width) - 30%);
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
text-overflow: ellipsis;
|
|
170
|
+
white-space: nowrap;
|
|
171
|
+
}
|