@sme.up/ketchup 4.0.0 → 4.2.0-SNAPSHOT
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/README.md +3 -3
- package/dist/cjs/cell-utils-1d44a3f0.js +168 -0
- package/dist/cjs/f-button-a5788453.js +105 -0
- package/dist/cjs/f-cell-eba6f39e.js +727 -0
- package/dist/cjs/f-chip-ce69b7d2.js +141 -0
- package/dist/cjs/{f-image-5f4f29ca.js → f-image-e03842eb.js} +4 -5
- package/dist/cjs/{index-3c471303.js → index-0416afab.js} +73 -64
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +6 -8
- package/dist/cjs/{kup-autocomplete_29.cjs.entry.js → kup-autocomplete_28.cjs.entry.js} +1678 -2558
- package/dist/cjs/kup-calendar.cjs.entry.js +30 -30
- package/dist/cjs/kup-cell.cjs.entry.js +201 -0
- package/dist/cjs/kup-dash-list.cjs.entry.js +15 -7
- package/dist/cjs/kup-dash_2.cjs.entry.js +104 -62
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -6
- package/dist/cjs/kup-field.cjs.entry.js +3 -5
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -4
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -6
- package/dist/cjs/kup-magic-box.cjs.entry.js +21 -31
- package/dist/cjs/kup-manager-75f1a2cd.js +5794 -0
- package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -6
- package/dist/cjs/kup-probe.cjs.entry.js +3 -4
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -3
- package/dist/cjs/kup-snackbar.cjs.entry.js +152 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-2af73538.js → utils-b3ec89fe.js} +18 -26
- package/dist/collection/assets/cell.js +51 -0
- package/dist/collection/assets/data-table.js +518 -45
- package/dist/collection/assets/index.js +8 -0
- package/dist/collection/assets/snackbar.js +32 -0
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/kup-accordion/kup-accordion.css +0 -213
- package/dist/collection/components/kup-accordion/kup-accordion.js +15 -16
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +2 -2
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.css +5 -2381
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +83 -111
- package/dist/collection/components/kup-badge/kup-badge.css +1 -35
- package/dist/collection/components/kup-badge/kup-badge.js +13 -14
- package/dist/collection/components/kup-box/kup-box.css +47 -780
- package/dist/collection/components/kup-box/kup-box.js +240 -366
- package/dist/collection/components/kup-button/kup-button.css +0 -333
- package/dist/collection/components/kup-button/kup-button.js +27 -28
- package/dist/collection/components/kup-button-list/kup-button-list.css +0 -332
- package/dist/collection/components/kup-button-list/kup-button-list.js +19 -20
- package/dist/collection/components/kup-calendar/kup-calendar.css +0 -517
- package/dist/collection/components/kup-calendar/kup-calendar.js +47 -45
- package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +18 -0
- package/dist/collection/components/kup-card/kup-card-helper.js +19 -1
- package/dist/collection/components/kup-card/kup-card.css +147 -216
- package/dist/collection/components/kup-card/kup-card.js +80 -29
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +75 -0
- package/dist/collection/components/kup-cell/kup-cell-declarations.js +11 -0
- package/dist/collection/components/kup-cell/kup-cell.css +20 -0
- package/dist/collection/components/kup-cell/kup-cell.js +413 -0
- package/dist/collection/components/kup-chart/kup-chart.js +41 -42
- package/dist/collection/components/kup-checkbox/kup-checkbox.css +0 -214
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +19 -20
- package/dist/collection/components/kup-chip/kup-chip.css +0 -217
- package/dist/collection/components/kup-chip/kup-chip.js +15 -16
- package/dist/collection/components/kup-color-picker/kup-color-picker.css +7 -2380
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +41 -41
- package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.css +5 -2381
- package/dist/collection/components/kup-combobox/kup-combobox.js +68 -28
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +13 -4
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +3 -1
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +61 -102
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.css +127 -3203
- package/dist/collection/components/kup-data-table/kup-data-table.js +568 -1085
- package/dist/collection/components/kup-date-picker/kup-date-picker.css +6 -8
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +77 -106
- package/dist/collection/components/kup-drawer/kup-drawer.js +9 -10
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +12 -340
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +56 -45
- package/dist/collection/components/kup-field/kup-field.js +21 -22
- package/dist/collection/components/kup-gauge/kup-gauge.js +17 -18
- package/dist/collection/components/kup-grid/kup-grid.css +2 -1
- package/dist/collection/components/kup-grid/kup-grid.js +13 -14
- package/dist/collection/components/kup-iframe/kup-iframe.js +4 -4
- package/dist/collection/components/kup-image/assets/svg/ketchup.svg +74 -0
- package/dist/collection/components/kup-image/assets/svg/smeup.svg +59 -0
- package/dist/collection/components/kup-image/kup-image.css +0 -32
- package/dist/collection/components/kup-image/kup-image.js +25 -26
- package/dist/collection/components/kup-lazy/kup-lazy.js +17 -18
- package/dist/collection/components/kup-list/kup-list-declarations.js +1 -1
- package/dist/collection/components/kup-list/kup-list.css +4 -260
- package/dist/collection/components/kup-list/kup-list.js +39 -49
- package/dist/collection/components/kup-magic-box/kup-magic-box.css +13 -39
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +29 -38
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +11 -12
- package/dist/collection/components/kup-paginator/kup-paginator.css +0 -332
- package/dist/collection/components/kup-paginator/kup-paginator.js +44 -12
- package/dist/collection/components/kup-probe/kup-probe.js +9 -9
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +21 -22
- package/dist/collection/components/kup-radio/kup-radio.js +17 -18
- package/dist/collection/components/kup-rating/kup-rating.js +15 -16
- package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +13 -0
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +75 -0
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +390 -0
- package/dist/collection/components/kup-spinner/kup-spinner.js +23 -24
- package/dist/collection/components/kup-switch/kup-switch.css +0 -156
- package/dist/collection/components/kup-switch/kup-switch.js +17 -18
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +0 -199
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +13 -14
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +1 -0
- package/dist/collection/components/kup-text-field/kup-text-field.css +3 -2371
- package/dist/collection/components/kup-text-field/kup-text-field.js +77 -51
- package/dist/collection/components/kup-time-picker/kup-time-picker.css +6 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +55 -85
- package/dist/collection/components/kup-tooltip/kup-tooltip.js +24 -14
- package/dist/collection/components/kup-tree/kup-tree.css +27 -371
- package/dist/collection/components/kup-tree/kup-tree.js +158 -383
- package/dist/collection/f-components/f-button/f-button.js +4 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +143 -0
- package/dist/collection/f-components/f-cell/f-cell.js +467 -0
- package/dist/collection/f-components/f-checkbox/f-checkbox.js +1 -1
- package/dist/collection/f-components/f-chip/f-chip.js +2 -2
- package/dist/collection/f-components/f-image/f-image.js +2 -3
- package/dist/collection/f-components/f-switch/f-switch.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field.js +25 -21
- package/dist/collection/utils/cell-utils.js +18 -222
- package/dist/collection/utils/filters/filters.js +31 -37
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +15 -3
- package/dist/collection/utils/kup-dates/kup-dates.js +14 -2
- package/dist/collection/utils/kup-debug/kup-debug-browser-utils.js +3 -3
- package/dist/collection/utils/kup-debug/kup-debug.js +57 -29
- package/dist/collection/utils/kup-dynamic-position/kup-dynamic-position.js +5 -7
- package/dist/collection/utils/kup-interact/kup-interact-declarations.js +48 -0
- package/dist/collection/utils/kup-interact/kup-interact.js +379 -0
- package/dist/collection/utils/kup-language/kup-language-declarations.js +2 -0
- package/dist/collection/utils/kup-language/kup-language.js +1 -1
- package/dist/collection/utils/kup-manager/kup-manager.js +47 -10
- package/dist/collection/utils/kup-objects/kup-objects.js +9 -33
- package/dist/collection/utils/kup-scroll-on-hover/kup-scroll-on-hover.js +60 -62
- package/dist/collection/utils/kup-search/kup-search-declarations.js +1 -0
- package/dist/collection/utils/kup-search/kup-search.js +76 -0
- package/dist/collection/utils/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/utils/kup-theme/kup-theme.js +4 -3
- package/dist/collection/utils/kup-toolbar/kup-toolbar.js +16 -18
- package/dist/collection/utils/utils.js +15 -23
- package/dist/esm/cell-utils-9a2914fc.js +160 -0
- package/dist/esm/f-button-55a9ed88.js +103 -0
- package/dist/esm/f-cell-ac520cb2.js +723 -0
- package/dist/esm/f-chip-babf1740.js +139 -0
- package/dist/esm/{f-image-68b34fab.js → f-image-70ca9dfe.js} +4 -5
- package/dist/esm/{index-bf2824a6.js → index-e0e67c23.js} +74 -65
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +6 -8
- package/dist/esm/{kup-autocomplete_29.entry.js → kup-autocomplete_28.entry.js} +1451 -2330
- package/dist/esm/kup-calendar.entry.js +10 -10
- package/dist/esm/kup-cell.entry.js +197 -0
- package/dist/esm/kup-dash-list.entry.js +15 -7
- package/dist/esm/kup-dash_2.entry.js +104 -62
- package/dist/esm/kup-drawer.entry.js +4 -6
- package/dist/esm/kup-field.entry.js +3 -5
- package/dist/esm/kup-iframe.entry.js +3 -4
- package/dist/esm/kup-lazy.entry.js +4 -6
- package/dist/esm/kup-magic-box.entry.js +21 -31
- package/dist/esm/kup-manager-bba32828.js +5781 -0
- package/dist/esm/kup-nav-bar.entry.js +4 -6
- package/dist/esm/kup-probe.entry.js +3 -4
- package/dist/esm/kup-qlik.entry.js +2 -3
- package/dist/esm/kup-snackbar.entry.js +148 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-13dd007a.js → utils-cfcbe33f.js} +16 -23
- package/dist/ketchup/assets/svg/ketchup.svg +74 -0
- package/dist/ketchup/assets/svg/smeup.svg +59 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-03ae1be9.entry.js +1 -0
- package/dist/ketchup/p-06c209a5.js +1 -0
- package/dist/ketchup/p-1ce9a037.js +1 -0
- package/dist/ketchup/p-1e2c3497.js +1 -0
- package/dist/ketchup/p-40df35de.entry.js +1 -0
- package/dist/ketchup/{p-c7ee1fbc.js → p-4748be4b.js} +2 -2
- package/dist/ketchup/p-52038ccb.js +1 -0
- package/dist/ketchup/p-5db41fae.entry.js +45 -0
- package/dist/ketchup/p-5faf7715.entry.js +1 -0
- package/dist/ketchup/p-62208488.entry.js +1 -0
- package/dist/ketchup/p-69a705ae.entry.js +1 -0
- package/dist/ketchup/p-6cc8264d.entry.js +1 -0
- package/dist/ketchup/p-74259992.entry.js +1 -0
- package/dist/ketchup/p-756aa8b1.entry.js +1 -0
- package/dist/ketchup/p-a7687c0e.entry.js +27 -0
- package/dist/ketchup/p-cb5f4994.js +1 -0
- package/dist/ketchup/p-d58dbf0e.js +1 -0
- package/dist/ketchup/p-d6ce1ac6.entry.js +1 -0
- package/dist/ketchup/p-daf03877.entry.js +1 -0
- package/dist/ketchup/p-e90934b5.entry.js +1 -0
- package/dist/ketchup/p-ea387b49.entry.js +1 -0
- package/dist/ketchup/p-f6bff949.js +1 -0
- package/dist/ketchup/p-ff7d590e.entry.js +1 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +2 -6
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +7 -13
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +13 -4
- package/dist/types/components/kup-box/kup-box.d.ts +13 -6
- package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +6 -0
- package/dist/types/components/kup-card/kup-card.d.ts +9 -0
- package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +6 -0
- package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +10 -0
- package/dist/types/components/kup-cell/kup-cell.d.ts +67 -0
- package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +1 -1
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +3 -2
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +5 -0
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +4 -0
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +21 -32
- package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +1 -15
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +32 -81
- package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +12 -14
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -4
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +1 -1
- package/dist/types/components/kup-list/kup-list.d.ts +2 -3
- package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +1 -0
- package/dist/types/components/kup-paginator/kup-paginator.d.ts +6 -0
- package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +12 -0
- package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +79 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +2 -1
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +8 -11
- package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +1 -0
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +4 -4
- package/dist/types/components/kup-tree/kup-tree.d.ts +12 -23
- package/dist/types/components.d.ts +346 -174
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +153 -0
- package/dist/types/f-components/f-cell/f-cell.d.ts +3 -0
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/f-components/f-text-field/f-text-field-mdc.d.ts +1 -1
- package/dist/types/utils/cell-utils.d.ts +0 -19
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +2 -0
- package/dist/types/utils/kup-dates/kup-dates.d.ts +9 -4
- package/dist/types/utils/kup-debug/kup-debug.d.ts +1 -1
- package/dist/types/utils/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -1
- package/dist/types/utils/kup-dynamic-position/kup-dynamic-position.d.ts +2 -2
- package/dist/types/utils/kup-interact/kup-interact-declarations.d.ts +127 -0
- package/dist/types/utils/kup-interact/kup-interact.d.ts +93 -0
- package/dist/types/utils/kup-language/kup-language-declarations.d.ts +2 -0
- package/dist/types/utils/kup-language/kup-language.d.ts +1 -1
- package/dist/types/utils/kup-manager/kup-manager-declarations.d.ts +28 -8
- package/dist/types/utils/kup-manager/kup-manager.d.ts +18 -5
- package/dist/types/utils/kup-objects/kup-objects.d.ts +1 -7
- package/dist/types/utils/kup-search/kup-search-declarations.d.ts +7 -0
- package/dist/types/utils/kup-search/kup-search.d.ts +20 -0
- package/dist/types/utils/kup-theme/kup-theme-declarations.d.ts +2 -0
- package/dist/types/utils/kup-theme/kup-theme.d.ts +2 -2
- package/dist/types/utils/utils.d.ts +0 -1
- package/package.json +4 -6
- package/dist/cjs/cell-utils-1f89a299.js +0 -1527
- package/dist/cjs/drag-and-drop-4787ff6f.js +0 -281
- package/dist/cjs/f-chip-2d58c8f7.js +0 -239
- package/dist/cjs/kup-grid.cjs.entry.js +0 -130
- package/dist/cjs/kup-manager-59ad8bdc.js +0 -4845
- package/dist/cjs/kup-objects-59ea949c.js +0 -717
- package/dist/collection/assets/images/drag-multiple.js +0 -1
- package/dist/collection/components/kup-editor/kup-editor.css +0 -5
- package/dist/collection/components/kup-editor/kup-editor.js +0 -59
- package/dist/collection/components/kup-layout/kup-layout.css +0 -53
- package/dist/collection/components/kup-layout/kup-layout.js +0 -156
- package/dist/collection/utils/drag-and-drop.js +0 -109
- package/dist/collection/utils/kup-dialog/kup-dialog-declarations.js +0 -36
- package/dist/collection/utils/kup-dialog/kup-dialog.js +0 -310
- package/dist/esm/cell-utils-cb612463.js +0 -1510
- package/dist/esm/drag-and-drop-321cb4ca.js +0 -265
- package/dist/esm/f-chip-125d5dd6.js +0 -236
- package/dist/esm/kup-grid.entry.js +0 -126
- package/dist/esm/kup-manager-e7d7b353.js +0 -4842
- package/dist/esm/kup-objects-d38d2fa2.js +0 -711
- package/dist/ketchup/p-00fe1e3e.js +0 -1
- package/dist/ketchup/p-0320e24e.entry.js +0 -1
- package/dist/ketchup/p-08c7a092.js +0 -1
- package/dist/ketchup/p-1165f4ea.entry.js +0 -1
- package/dist/ketchup/p-170d3cba.js +0 -1
- package/dist/ketchup/p-18cb3ba3.js +0 -1
- package/dist/ketchup/p-23541a97.entry.js +0 -45
- package/dist/ketchup/p-64ea7e37.entry.js +0 -1
- package/dist/ketchup/p-7896031c.entry.js +0 -1
- package/dist/ketchup/p-876da4c2.entry.js +0 -1
- package/dist/ketchup/p-8fb9d9b2.entry.js +0 -1
- package/dist/ketchup/p-940ab57a.entry.js +0 -1
- package/dist/ketchup/p-9c858a38.entry.js +0 -1
- package/dist/ketchup/p-a12a5690.entry.js +0 -1
- package/dist/ketchup/p-a5424073.js +0 -1
- package/dist/ketchup/p-b0724035.entry.js +0 -1
- package/dist/ketchup/p-b14e77f0.js +0 -1
- package/dist/ketchup/p-d24cfdea.entry.js +0 -1
- package/dist/ketchup/p-ee89966f.entry.js +0 -27
- package/dist/ketchup/p-fcd2fd8f.js +0 -1
- package/dist/ketchup/p-fce3b9d8.entry.js +0 -1
- package/dist/types/assets/images/drag-multiple.d.ts +0 -1
- package/dist/types/components/kup-editor/kup-editor.d.ts +0 -16
- package/dist/types/components/kup-layout/kup-layout.d.ts +0 -25
- package/dist/types/utils/drag-and-drop.d.ts +0 -53
- package/dist/types/utils/kup-dialog/kup-dialog-declarations.d.ts +0 -43
- package/dist/types/utils/kup-dialog/kup-dialog.d.ts +0 -50
|
@@ -3,19 +3,22 @@ import { TotalLabel, TotalMode, } from './../kup-data-table/kup-data-table-decla
|
|
|
3
3
|
import { KupTreeProps, treeExpandedPropName, treeMainColumnName, KupTreeExpansionMode, } from './kup-tree-declarations';
|
|
4
4
|
import { MDCRipple } from '@material/ripple';
|
|
5
5
|
import { kupManagerInstance, } from '../../utils/kup-manager/kup-manager';
|
|
6
|
-
import { calcTotals, normalizeRows,
|
|
6
|
+
import { calcTotals, normalizeRows, } from '../kup-data-table/kup-data-table-helper';
|
|
7
7
|
import { KupTreeState } from './kup-tree-state';
|
|
8
8
|
import { setTooltip, unsetTooltip } from '../../utils/helpers';
|
|
9
|
-
import {
|
|
10
|
-
import { deepEqual, getProps, numberToFormattedStringNumber, setProps,
|
|
9
|
+
import { getColumnByName } from '../../utils/cell-utils';
|
|
10
|
+
import { deepEqual, getProps, numberToFormattedStringNumber, setProps, } from '../../utils/utils';
|
|
11
11
|
import { KupColumnMenu } from '../../utils/kup-column-menu/kup-column-menu';
|
|
12
12
|
import { FiltersColumnMenu } from '../../utils/filters/filters-column-menu';
|
|
13
13
|
import { KupGlobalFilterMode, } from '../../utils/filters/filters-declarations';
|
|
14
14
|
import { FiltersTreeItems } from '../../utils/filters/filters-tree-items';
|
|
15
|
-
import { kupDynamicPositionAttribute,
|
|
15
|
+
import { kupDynamicPositionAttribute, } from '../../utils/kup-dynamic-position/kup-dynamic-position-declarations';
|
|
16
16
|
import { KupLanguageGeneric, KupLanguageSearch, KupLanguageTotals, } from '../../utils/kup-language/kup-language-declarations';
|
|
17
17
|
import { componentWrapperId } from '../../variables/GenericVariables';
|
|
18
18
|
import { KupThemeIconValues } from '../../utils/kup-theme/kup-theme-declarations';
|
|
19
|
+
import { KupPointerEventTypes } from '../../utils/kup-interact/kup-interact-declarations';
|
|
20
|
+
import { FCellPadding, } from '../../f-components/f-cell/f-cell-declarations';
|
|
21
|
+
import { FCell } from '../../f-components/f-cell/f-cell';
|
|
19
22
|
export class KupTree {
|
|
20
23
|
constructor() {
|
|
21
24
|
/*-------------------------------------------------*/
|
|
@@ -55,7 +58,7 @@ export class KupTree {
|
|
|
55
58
|
/**
|
|
56
59
|
* The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.
|
|
57
60
|
*/
|
|
58
|
-
this.density =
|
|
61
|
+
this.density = FCellPadding.MEDIUM;
|
|
59
62
|
/**
|
|
60
63
|
* Function that gets invoked when a new set of nodes must be loaded as children of a node.
|
|
61
64
|
*
|
|
@@ -68,6 +71,11 @@ export class KupTree {
|
|
|
68
71
|
* @see useDynamicExpansion
|
|
69
72
|
*/
|
|
70
73
|
this.dynamicExpansionCallback = undefined;
|
|
74
|
+
/**
|
|
75
|
+
* When set to true, editable cells will be rendered using input components.
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
this.editableData = false;
|
|
71
79
|
/**
|
|
72
80
|
* Enables the extracolumns add buttons.
|
|
73
81
|
*/
|
|
@@ -175,13 +183,15 @@ export class KupTree {
|
|
|
175
183
|
this.columnMenuCard = null;
|
|
176
184
|
this.selectedColumn = '';
|
|
177
185
|
this.clickTimeout = [];
|
|
178
|
-
this.iconPaths = undefined;
|
|
179
186
|
this.sizedColumns = undefined;
|
|
180
187
|
this.filtersColumnMenuInstance = new FiltersColumnMenu();
|
|
181
188
|
this.filtersTreeItemsInstance = new FiltersTreeItems();
|
|
182
189
|
this.totalMenuCoords = null;
|
|
183
190
|
this.contentRefs = [];
|
|
184
191
|
this.oldWidth = null;
|
|
192
|
+
this.hold = false;
|
|
193
|
+
this.interactableTouch = [];
|
|
194
|
+
this.clickCb = null;
|
|
185
195
|
}
|
|
186
196
|
initWithPersistedState() {
|
|
187
197
|
if (this.store && this.stateId) {
|
|
@@ -341,16 +351,6 @@ export class KupTree {
|
|
|
341
351
|
this.columnMenuCard.layoutNumber = 12;
|
|
342
352
|
this.columnMenuCard.sizeX = 'auto';
|
|
343
353
|
this.columnMenuCard.sizeY = 'auto';
|
|
344
|
-
this.columnMenuCard.tabIndex = -1;
|
|
345
|
-
this.columnMenuCard.onblur = () => {
|
|
346
|
-
if (this.kupManager.utilities.lastPointerDownPath.includes(this.columnMenuCard)) {
|
|
347
|
-
this.columnMenuCard.focus();
|
|
348
|
-
}
|
|
349
|
-
else {
|
|
350
|
-
this.closeColumnMenu();
|
|
351
|
-
}
|
|
352
|
-
};
|
|
353
|
-
this.columnMenuCard.onclick = (e) => e.stopPropagation();
|
|
354
354
|
this.columnMenuCard.addEventListener('kup-card-click', (e) => {
|
|
355
355
|
this.kupTreeColumnMenu.emit({
|
|
356
356
|
comp: this,
|
|
@@ -597,19 +597,6 @@ export class KupTree {
|
|
|
597
597
|
}
|
|
598
598
|
return details;
|
|
599
599
|
}
|
|
600
|
-
onJ4btnClicked(treeNodeData, treeNodePath, column, auto) {
|
|
601
|
-
this.kupTreeNodeButtonClick.emit({
|
|
602
|
-
comp: this,
|
|
603
|
-
id: this.rootElement.id,
|
|
604
|
-
treeNodePath: treeNodePath
|
|
605
|
-
.split(',')
|
|
606
|
-
.map((treeNodeIndex) => parseInt(treeNodeIndex)),
|
|
607
|
-
treeNode: treeNodeData,
|
|
608
|
-
column: column,
|
|
609
|
-
columnName: column.name,
|
|
610
|
-
auto: auto,
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
600
|
// When a TreeNode can be selected
|
|
614
601
|
hdlTreeNodeClick(e, treeNodeData, treeNodePath, auto) {
|
|
615
602
|
unsetTooltip(this.tooltip);
|
|
@@ -819,85 +806,6 @@ export class KupTree {
|
|
|
819
806
|
return h("span", { style: iconStyle, class: CSSClass });
|
|
820
807
|
}
|
|
821
808
|
}
|
|
822
|
-
/**
|
|
823
|
-
* Factory function for cells.
|
|
824
|
-
* @param cell - cell object
|
|
825
|
-
* @param previousRowCellValue - An optional value of the previous cell on the same column. If set and equal to the value of the current cell, makes the value of the current cell go blank.
|
|
826
|
-
* @param cellData - Additional data for the current cell.
|
|
827
|
-
* @param cellData.column - The column object to which the cell belongs.
|
|
828
|
-
* @param cellData.treeNode - The treeNode object to which the cell belongs.
|
|
829
|
-
* @param cellData.treeNodePath - The treeNodePath to which the cell belongs.
|
|
830
|
-
*/
|
|
831
|
-
renderCell(cell, cellData, previousRowCellValue) {
|
|
832
|
-
const classObj = {
|
|
833
|
-
'cell-content': true,
|
|
834
|
-
clickable: !!cellData.column.clickable,
|
|
835
|
-
};
|
|
836
|
-
// When the previous row value is different from the current value, we can show the current value.
|
|
837
|
-
const valueToDisplay = previousRowCellValue !== cell.value ? cell.value : '';
|
|
838
|
-
// Sets the default value
|
|
839
|
-
let content = valueToDisplay;
|
|
840
|
-
let cellType = this.getCellType(cell);
|
|
841
|
-
let props = Object.assign({}, cell.data);
|
|
842
|
-
classObj[cellType + '-cell'] = true;
|
|
843
|
-
if (cell.data) {
|
|
844
|
-
this.setCellSize(cellType, props, cell);
|
|
845
|
-
content = this.setKupCell(cellType, classObj, props, cell, cellData);
|
|
846
|
-
}
|
|
847
|
-
else {
|
|
848
|
-
content = this.setCell(cellType, content, classObj, cell, cellData.column);
|
|
849
|
-
}
|
|
850
|
-
// Elements of the cell
|
|
851
|
-
let cellElements = [];
|
|
852
|
-
let tdStyle = undefined;
|
|
853
|
-
let style = undefined;
|
|
854
|
-
if (styleHasBorderRadius(cell) || styleHasWritingMode(cell)) {
|
|
855
|
-
style = cell.style;
|
|
856
|
-
if (styleHasBorderRadius(cell) && !style['padding']) {
|
|
857
|
-
style['padding'] = '5px';
|
|
858
|
-
}
|
|
859
|
-
if (style['text-align']) {
|
|
860
|
-
style['float'] = style['text-align'];
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
else {
|
|
864
|
-
tdStyle = cell.style;
|
|
865
|
-
}
|
|
866
|
-
tdStyle = this.getCellStyle(cellData.column.name, tdStyle);
|
|
867
|
-
let icon = undefined;
|
|
868
|
-
if ((cellData.column.icon || cell.icon) && content) {
|
|
869
|
-
let svg = '';
|
|
870
|
-
if (cell.icon) {
|
|
871
|
-
svg = cell.icon;
|
|
872
|
-
}
|
|
873
|
-
else {
|
|
874
|
-
svg = cellData.column.icon;
|
|
875
|
-
}
|
|
876
|
-
svg = this.getIconPath(svg);
|
|
877
|
-
let iconStyle = {
|
|
878
|
-
mask: svg,
|
|
879
|
-
webkitMask: svg,
|
|
880
|
-
};
|
|
881
|
-
icon = h("span", { style: iconStyle, class: "kup-icon obj-icon" });
|
|
882
|
-
}
|
|
883
|
-
const _hasTooltip = this.kupManager.objects.hasTooltip(cell.obj);
|
|
884
|
-
let title = undefined;
|
|
885
|
-
if (_hasTooltip) {
|
|
886
|
-
classObj['is-obj'] = true;
|
|
887
|
-
if (this.kupManager.debug.isDebug()) {
|
|
888
|
-
title =
|
|
889
|
-
cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
let cellClass = undefined;
|
|
893
|
-
if (cell.cssClass) {
|
|
894
|
-
cellClass = cell.cssClass;
|
|
895
|
-
}
|
|
896
|
-
cellElements.push(h("span", { title: title, style: style, class: classObj },
|
|
897
|
-
icon,
|
|
898
|
-
content));
|
|
899
|
-
return (h("td", Object.assign({ class: cellClass, onClick: () => (this.selectedColumn = cellData.column.name), style: tdStyle }, this.getToolTipEventHandlers(cellData.treeNode, cell, _hasTooltip)), cellElements));
|
|
900
|
-
}
|
|
901
809
|
/**
|
|
902
810
|
* Controls if current cell needs a tooltip and eventually adds it.
|
|
903
811
|
* @todo When the option forceOneLine is active, there is a problem with the current implementation of the tooltip. See documentation in the mauer wiki for better understanding.
|
|
@@ -926,214 +834,6 @@ export class KupTree {
|
|
|
926
834
|
}
|
|
927
835
|
return eventHandlers;
|
|
928
836
|
}
|
|
929
|
-
getIconPath(icon) {
|
|
930
|
-
let svg = '';
|
|
931
|
-
if (this.iconPaths) {
|
|
932
|
-
for (let index = 0; index < this.iconPaths.length || svg !== ''; index++) {
|
|
933
|
-
if (this.iconPaths[index].icon === icon) {
|
|
934
|
-
return this.iconPaths[index].path;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
svg = `url('${getAssetPath(`./assets/svg/${icon}.svg`)}') no-repeat center`;
|
|
939
|
-
if (!this.iconPaths) {
|
|
940
|
-
this.iconPaths = [
|
|
941
|
-
{
|
|
942
|
-
icon: icon,
|
|
943
|
-
path: svg,
|
|
944
|
-
},
|
|
945
|
-
];
|
|
946
|
-
}
|
|
947
|
-
else {
|
|
948
|
-
this.iconPaths.push({ icon: icon, path: svg });
|
|
949
|
-
}
|
|
950
|
-
return svg;
|
|
951
|
-
}
|
|
952
|
-
// TODO: cell type can depend also from shape (see isRating)
|
|
953
|
-
// NOTE: keep care to change conditions order... shape wins on object .. -> so if isNumber after shape checks.. ->
|
|
954
|
-
// TODO: more clear conditions when refactoring...
|
|
955
|
-
getCellType(cell) {
|
|
956
|
-
return getCellType(cell);
|
|
957
|
-
}
|
|
958
|
-
setCellSize(cellType, props, cell) {
|
|
959
|
-
switch (cellType) {
|
|
960
|
-
case 'bar':
|
|
961
|
-
if (!props.sizeY) {
|
|
962
|
-
props['sizeY'] = '26px';
|
|
963
|
-
if (this.density === 'medium') {
|
|
964
|
-
props['sizeY'] = '36px';
|
|
965
|
-
}
|
|
966
|
-
if (this.density === 'wide') {
|
|
967
|
-
props['sizeY'] = '50px';
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
break;
|
|
971
|
-
case 'button':
|
|
972
|
-
let height = '';
|
|
973
|
-
if (props.label) {
|
|
974
|
-
height = '36px';
|
|
975
|
-
}
|
|
976
|
-
else {
|
|
977
|
-
height = '48px';
|
|
978
|
-
}
|
|
979
|
-
if (cell.style) {
|
|
980
|
-
if (!cell.style.height) {
|
|
981
|
-
cell.style['minHeight'] = height;
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
else {
|
|
985
|
-
cell.style = { minHeight: height };
|
|
986
|
-
}
|
|
987
|
-
break;
|
|
988
|
-
case 'chart':
|
|
989
|
-
if (!props.sizeX) {
|
|
990
|
-
props['sizeX'] = '100%';
|
|
991
|
-
}
|
|
992
|
-
if (!props.sizeY) {
|
|
993
|
-
props['sizeY'] = '100%';
|
|
994
|
-
}
|
|
995
|
-
break;
|
|
996
|
-
case 'checkbox':
|
|
997
|
-
if (cell.style) {
|
|
998
|
-
if (!cell.style.height) {
|
|
999
|
-
cell.style['minHeight'] = '40px';
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
else {
|
|
1003
|
-
cell.style = { minHeight: '40px' };
|
|
1004
|
-
}
|
|
1005
|
-
break;
|
|
1006
|
-
case 'chips':
|
|
1007
|
-
if (cell.style) {
|
|
1008
|
-
if (!cell.style.height) {
|
|
1009
|
-
cell.style['minHeight'] = '53px';
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
else {
|
|
1013
|
-
cell.style = { minHeight: '53px' };
|
|
1014
|
-
}
|
|
1015
|
-
break;
|
|
1016
|
-
case 'icon':
|
|
1017
|
-
if (!props.sizeX) {
|
|
1018
|
-
props['sizeX'] = '18px';
|
|
1019
|
-
}
|
|
1020
|
-
if (!props.sizeY) {
|
|
1021
|
-
props['sizeY'] = '18px';
|
|
1022
|
-
}
|
|
1023
|
-
if (cell.style) {
|
|
1024
|
-
if (!cell.style.height) {
|
|
1025
|
-
cell.style['minHeight'] = props['sizeY'];
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
else {
|
|
1029
|
-
cell.style = {
|
|
1030
|
-
minHeight: props['sizeY'],
|
|
1031
|
-
};
|
|
1032
|
-
}
|
|
1033
|
-
break;
|
|
1034
|
-
case 'image':
|
|
1035
|
-
if (!props.sizeX) {
|
|
1036
|
-
props['sizeX'] = 'auto';
|
|
1037
|
-
}
|
|
1038
|
-
if (!props.sizeY) {
|
|
1039
|
-
props['sizeY'] = '64px';
|
|
1040
|
-
}
|
|
1041
|
-
break;
|
|
1042
|
-
case 'radio':
|
|
1043
|
-
if (cell.style) {
|
|
1044
|
-
if (!cell.style.height) {
|
|
1045
|
-
cell.style['minHeight'] = '40px';
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
else {
|
|
1049
|
-
cell.style = { minHeight: '40px' };
|
|
1050
|
-
}
|
|
1051
|
-
break;
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
setCell(cellType, content, classObj, cell, column) {
|
|
1055
|
-
switch (cellType) {
|
|
1056
|
-
case 'link':
|
|
1057
|
-
return (h("a", { class: "cell-link", href: content, target: "_blank" }, content));
|
|
1058
|
-
case 'number':
|
|
1059
|
-
if (content && content != '') {
|
|
1060
|
-
const cellValueNumber = stringToNumber(cell.value);
|
|
1061
|
-
const cellValue = getCellValueForDisplay(column, cell);
|
|
1062
|
-
if (cellValueNumber < 0) {
|
|
1063
|
-
classObj['negative-number'] = true;
|
|
1064
|
-
}
|
|
1065
|
-
return h("span", { class: "text" }, cellValue);
|
|
1066
|
-
}
|
|
1067
|
-
return content;
|
|
1068
|
-
case 'date':
|
|
1069
|
-
if (content && content != '') {
|
|
1070
|
-
const cellValue = getCellValueForDisplay(column, cell);
|
|
1071
|
-
return h("span", { class: "text" }, cellValue);
|
|
1072
|
-
}
|
|
1073
|
-
return content;
|
|
1074
|
-
case 'datetime':
|
|
1075
|
-
if (content && content != '') {
|
|
1076
|
-
const cellValue = getCellValueForDisplay(column, cell);
|
|
1077
|
-
return h("span", { class: "text" }, cellValue);
|
|
1078
|
-
}
|
|
1079
|
-
return content;
|
|
1080
|
-
case 'time':
|
|
1081
|
-
if (content && content != '') {
|
|
1082
|
-
const cellValue = getCellValueForDisplay(column, cell);
|
|
1083
|
-
return h("span", { class: "text" }, cellValue);
|
|
1084
|
-
}
|
|
1085
|
-
return content;
|
|
1086
|
-
case 'string':
|
|
1087
|
-
default:
|
|
1088
|
-
return h("span", { class: "text" }, content);
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
setKupCell(cellType, classObj, props, cell, cellData) {
|
|
1092
|
-
switch (cellType) {
|
|
1093
|
-
case 'bar':
|
|
1094
|
-
return h("kup-image", Object.assign({}, props));
|
|
1095
|
-
case 'button':
|
|
1096
|
-
classObj['is-centered'] = true;
|
|
1097
|
-
props['disabled'] = cellData.treeNode.readOnly;
|
|
1098
|
-
props['onkup-button-click'] = this.onJ4btnClicked.bind(cellData.treeNode, cellData.treeNodePath, cellData.column, false);
|
|
1099
|
-
return h("kup-button", Object.assign({}, props));
|
|
1100
|
-
case 'chart':
|
|
1101
|
-
classObj['is-centered'] = true;
|
|
1102
|
-
return h("kup-chart", Object.assign({}, props));
|
|
1103
|
-
case 'checkbox':
|
|
1104
|
-
classObj['is-centered'] = true;
|
|
1105
|
-
if (props) {
|
|
1106
|
-
props['disabled'] = cellData.treeNode.readOnly;
|
|
1107
|
-
}
|
|
1108
|
-
else {
|
|
1109
|
-
props = { disabled: cellData.treeNode.readOnly };
|
|
1110
|
-
}
|
|
1111
|
-
return h("kup-checkbox", Object.assign({}, props));
|
|
1112
|
-
case 'chips':
|
|
1113
|
-
return h("kup-chip", Object.assign({}, props));
|
|
1114
|
-
case 'color-picker':
|
|
1115
|
-
return (h("kup-color-picker", Object.assign({ value: cell.value }, props, { disabled: true })));
|
|
1116
|
-
case 'gauge':
|
|
1117
|
-
return (h("kup-gauge", Object.assign({ value: stringToNumber(cell.value), "width-component": "100%" }, props)));
|
|
1118
|
-
case 'knob':
|
|
1119
|
-
return (h("kup-progress-bar", Object.assign({ class: "cell-progress-bar", value: stringToNumber(cell.value) }, props)));
|
|
1120
|
-
case 'icon':
|
|
1121
|
-
case 'image':
|
|
1122
|
-
classObj['is-centered'] = true;
|
|
1123
|
-
if (props.badgeData) {
|
|
1124
|
-
classObj['has-padding'] = true;
|
|
1125
|
-
}
|
|
1126
|
-
return h("kup-image", Object.assign({}, props));
|
|
1127
|
-
case 'progress-bar':
|
|
1128
|
-
return h("kup-progress-bar", Object.assign({}, props));
|
|
1129
|
-
case 'rating':
|
|
1130
|
-
return (h("kup-rating", Object.assign({ value: stringToNumber(cell.value) }, props, { disabled: true })));
|
|
1131
|
-
case 'radio':
|
|
1132
|
-
classObj['is-centered'] = true;
|
|
1133
|
-
props['disabled'] = cellData.treeNode.readOnly;
|
|
1134
|
-
return h("kup-radio", Object.assign({}, props));
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
837
|
getCellStyle(colName, cellStyle) {
|
|
1138
838
|
// Controls if there are columns with a specified width
|
|
1139
839
|
if (this.sizedColumns) {
|
|
@@ -1304,14 +1004,24 @@ export class KupTree {
|
|
|
1304
1004
|
// Renders all the cells
|
|
1305
1005
|
for (let j = 0; j < visibleCols.length; j++) {
|
|
1306
1006
|
const column = visibleCols[j];
|
|
1307
|
-
|
|
1308
|
-
column
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1007
|
+
const cell = treeNodeData.cells[column.name]
|
|
1008
|
+
? treeNodeData.cells[column.name]
|
|
1009
|
+
: null;
|
|
1010
|
+
const cellProps = {
|
|
1011
|
+
cell: cell,
|
|
1012
|
+
column: column,
|
|
1013
|
+
component: this,
|
|
1014
|
+
density: this.density,
|
|
1015
|
+
editable: this.editableData,
|
|
1016
|
+
renderKup: true,
|
|
1017
|
+
row: treeNodeData,
|
|
1018
|
+
setSizes: true,
|
|
1019
|
+
};
|
|
1020
|
+
treeNodeCells.push(h("td", { class: `grid-cell` },
|
|
1021
|
+
h(FCell, Object.assign({}, cellProps))));
|
|
1312
1022
|
}
|
|
1313
1023
|
}
|
|
1314
|
-
const _hasTooltip = this.kupManager.objects.
|
|
1024
|
+
const _hasTooltip = !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj);
|
|
1315
1025
|
let title = undefined;
|
|
1316
1026
|
if (_hasTooltip && this.kupManager.debug.isDebug()) {
|
|
1317
1027
|
title =
|
|
@@ -1340,7 +1050,7 @@ export class KupTree {
|
|
|
1340
1050
|
'mdc-ripple-surface': this.ripple &&
|
|
1341
1051
|
!this.showColumns &&
|
|
1342
1052
|
!treeNodeData.disabled,
|
|
1343
|
-
'is-obj': this.kupManager.objects.
|
|
1053
|
+
'is-obj': !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj),
|
|
1344
1054
|
}, style: treeNodeData.style || null, title: title, onDblClick: () => {
|
|
1345
1055
|
this.onKupTreeNodeDblClick(treeNodeData, treeNodePath);
|
|
1346
1056
|
} }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip)), this.asAccordion && !treeNodeDepth
|
|
@@ -1364,6 +1074,7 @@ export class KupTree {
|
|
|
1364
1074
|
}
|
|
1365
1075
|
closeTotalMenu() {
|
|
1366
1076
|
this.openedTotalMenu = null;
|
|
1077
|
+
this.kupManager.removeClickCallback(this.clickCb);
|
|
1367
1078
|
}
|
|
1368
1079
|
isOpenedTotalMenuForColumn(column) {
|
|
1369
1080
|
return this.openedTotalMenu === column;
|
|
@@ -1480,7 +1191,7 @@ export class KupTree {
|
|
|
1480
1191
|
separator: true,
|
|
1481
1192
|
});
|
|
1482
1193
|
}
|
|
1483
|
-
totalMenu = (h("kup-list", { class: `
|
|
1194
|
+
totalMenu = (h("kup-list", { class: `total-menu`, data: listData, id: "totals-menu", "is-menu": true, keyboardNavigation: true, "menu-visible": true, "onkup-list-click": (event) => this.onTotalsChange(event, column) }));
|
|
1484
1195
|
}
|
|
1485
1196
|
let value;
|
|
1486
1197
|
if (menuLabel === TotalLabel.COUNT ||
|
|
@@ -1499,14 +1210,54 @@ export class KupTree {
|
|
|
1499
1210
|
nodesCell,
|
|
1500
1211
|
footerCells)));
|
|
1501
1212
|
}
|
|
1213
|
+
didLoadInteractables() {
|
|
1214
|
+
this.interactableTouch.push(this.treeWrapperRef);
|
|
1215
|
+
const tapCb = (e) => {
|
|
1216
|
+
if (this.hold) {
|
|
1217
|
+
this.hold = false;
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
1220
|
+
switch (e.button) {
|
|
1221
|
+
// right click
|
|
1222
|
+
case 2:
|
|
1223
|
+
this.kupTreeContextMenu.emit({
|
|
1224
|
+
comp: this,
|
|
1225
|
+
id: this.rootElement.id,
|
|
1226
|
+
details: this.contextMenuHandler(e),
|
|
1227
|
+
});
|
|
1228
|
+
break;
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
const holdCb = (e) => {
|
|
1232
|
+
if (e.pointerType === 'pen' || e.pointerType === 'touch') {
|
|
1233
|
+
this.hold = true;
|
|
1234
|
+
this.kupTreeContextMenu.emit({
|
|
1235
|
+
comp: this,
|
|
1236
|
+
id: this.rootElement.id,
|
|
1237
|
+
details: this.contextMenuHandler(e),
|
|
1238
|
+
});
|
|
1239
|
+
}
|
|
1240
|
+
};
|
|
1241
|
+
this.kupManager.interact.on(this.treeWrapperRef, KupPointerEventTypes.TAP, tapCb);
|
|
1242
|
+
this.kupManager.interact.on(this.treeWrapperRef, KupPointerEventTypes.HOLD, holdCb);
|
|
1243
|
+
}
|
|
1502
1244
|
totalMenuPosition() {
|
|
1503
1245
|
if (this.rootElement.shadowRoot) {
|
|
1504
|
-
|
|
1246
|
+
const menu = this.rootElement.shadowRoot.querySelector('#totals-menu');
|
|
1505
1247
|
if (menu) {
|
|
1506
|
-
this.kupManager.dynamicPosition.register(menu, this.totalMenuCoords
|
|
1248
|
+
this.kupManager.dynamicPosition.register(menu, this.totalMenuCoords);
|
|
1249
|
+
if (!this.clickCb) {
|
|
1250
|
+
this.clickCb = {
|
|
1251
|
+
cb: () => {
|
|
1252
|
+
this.closeTotalMenu();
|
|
1253
|
+
this.kupManager.dynamicPosition.stop(menu);
|
|
1254
|
+
},
|
|
1255
|
+
el: menu,
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
this.kupManager.addClickCallback(this.clickCb, true);
|
|
1507
1259
|
this.kupManager.dynamicPosition.start(menu);
|
|
1508
|
-
menu.
|
|
1509
|
-
setTimeout(() => menu.focus(), 0);
|
|
1260
|
+
menu.menuVisible = true;
|
|
1510
1261
|
}
|
|
1511
1262
|
}
|
|
1512
1263
|
}
|
|
@@ -1587,6 +1338,7 @@ export class KupTree {
|
|
|
1587
1338
|
this.hdlTreeNodeClick(null, tn, this.selectedNodeString, true);
|
|
1588
1339
|
}
|
|
1589
1340
|
}
|
|
1341
|
+
this.didLoadInteractables();
|
|
1590
1342
|
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
1591
1343
|
this.kupManager.resize.observe(this.rootElement);
|
|
1592
1344
|
this.kupManager.debug.logLoad(this, true);
|
|
@@ -1626,10 +1378,10 @@ export class KupTree {
|
|
|
1626
1378
|
this.sizedColumns = this.getSizedColumns();
|
|
1627
1379
|
let wrapperClass = 'density-medium';
|
|
1628
1380
|
switch (this.density) {
|
|
1629
|
-
case
|
|
1381
|
+
case FCellPadding.DENSE:
|
|
1630
1382
|
wrapperClass = 'density-dense';
|
|
1631
1383
|
break;
|
|
1632
|
-
case
|
|
1384
|
+
case FCellPadding.WIDE:
|
|
1633
1385
|
wrapperClass = 'density-wide';
|
|
1634
1386
|
break;
|
|
1635
1387
|
}
|
|
@@ -1658,18 +1410,15 @@ export class KupTree {
|
|
|
1658
1410
|
this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
|
|
1659
1411
|
} })));
|
|
1660
1412
|
}
|
|
1661
|
-
const customStyle = this.kupManager.theme.setCustomStyle(this.rootElement);
|
|
1662
1413
|
return (h(Host, null,
|
|
1663
|
-
|
|
1414
|
+
h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)),
|
|
1664
1415
|
h("div", { id: componentWrapperId, class: wrapperClass },
|
|
1665
1416
|
h("div", { class: "wrapper", ref: (el) => (this.treeWrapperRef =
|
|
1666
1417
|
el) },
|
|
1667
1418
|
filterField,
|
|
1668
|
-
h("table", { class: "kup-tree", "data-show-columns": this.showColumns, onContextMenu: (e) =>
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
details: this.contextMenuHandler(e),
|
|
1672
|
-
}) },
|
|
1419
|
+
h("table", { class: "kup-tree", "data-show-columns": this.showColumns, onContextMenu: (e) => {
|
|
1420
|
+
e.preventDefault();
|
|
1421
|
+
} },
|
|
1673
1422
|
h("thead", { class: {
|
|
1674
1423
|
'header--is-visible': visibleHeader,
|
|
1675
1424
|
} },
|
|
@@ -1718,8 +1467,8 @@ export class KupTree {
|
|
|
1718
1467
|
"optional": false,
|
|
1719
1468
|
"docs": {
|
|
1720
1469
|
"tags": [{
|
|
1721
|
-
"
|
|
1722
|
-
"
|
|
1470
|
+
"name": "default",
|
|
1471
|
+
"text": "false"
|
|
1723
1472
|
}],
|
|
1724
1473
|
"text": "When enabled, the first level of depth will give an accordion look to nodes."
|
|
1725
1474
|
},
|
|
@@ -1777,11 +1526,11 @@ export class KupTree {
|
|
|
1777
1526
|
"optional": false,
|
|
1778
1527
|
"docs": {
|
|
1779
1528
|
"tags": [{
|
|
1780
|
-
"
|
|
1781
|
-
"
|
|
1529
|
+
"name": "default",
|
|
1530
|
+
"text": "\"\""
|
|
1782
1531
|
}, {
|
|
1783
|
-
"
|
|
1784
|
-
"
|
|
1532
|
+
"name": "see",
|
|
1533
|
+
"text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
|
|
1785
1534
|
}],
|
|
1786
1535
|
"text": "Custom style of the component."
|
|
1787
1536
|
},
|
|
@@ -1814,9 +1563,14 @@ export class KupTree {
|
|
|
1814
1563
|
"type": "string",
|
|
1815
1564
|
"mutable": false,
|
|
1816
1565
|
"complexType": {
|
|
1817
|
-
"original": "
|
|
1818
|
-
"resolved": "
|
|
1819
|
-
"references": {
|
|
1566
|
+
"original": "FCellPadding",
|
|
1567
|
+
"resolved": "FCellPadding.DENSE | FCellPadding.MEDIUM | FCellPadding.NONE | FCellPadding.WIDE",
|
|
1568
|
+
"references": {
|
|
1569
|
+
"FCellPadding": {
|
|
1570
|
+
"location": "import",
|
|
1571
|
+
"path": "../../f-components/f-cell/f-cell-declarations"
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1820
1574
|
},
|
|
1821
1575
|
"required": false,
|
|
1822
1576
|
"optional": false,
|
|
@@ -1826,7 +1580,7 @@ export class KupTree {
|
|
|
1826
1580
|
},
|
|
1827
1581
|
"attribute": "density",
|
|
1828
1582
|
"reflect": false,
|
|
1829
|
-
"defaultValue": "
|
|
1583
|
+
"defaultValue": "FCellPadding.MEDIUM"
|
|
1830
1584
|
},
|
|
1831
1585
|
"dynamicExpansionCallback": {
|
|
1832
1586
|
"type": "unknown",
|
|
@@ -1852,13 +1606,34 @@ export class KupTree {
|
|
|
1852
1606
|
"optional": false,
|
|
1853
1607
|
"docs": {
|
|
1854
1608
|
"tags": [{
|
|
1855
|
-
"
|
|
1856
|
-
"
|
|
1609
|
+
"name": "see",
|
|
1610
|
+
"text": "useDynamicExpansion"
|
|
1857
1611
|
}],
|
|
1858
1612
|
"text": "Function that gets invoked when a new set of nodes must be loaded as children of a node.\n\nWhen useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop.\n1 - If this prop is set to null, no callback to download data is available:\n the component will emit an event requiring the parent to load the children of the given node.\n2 - If this prop is set to have a callback, then the component will automatically make requests to load children of\n a given node. After the load has been completed, a different event will be fired to alert the parent of the change."
|
|
1859
1613
|
},
|
|
1860
1614
|
"defaultValue": "undefined"
|
|
1861
1615
|
},
|
|
1616
|
+
"editableData": {
|
|
1617
|
+
"type": "boolean",
|
|
1618
|
+
"mutable": false,
|
|
1619
|
+
"complexType": {
|
|
1620
|
+
"original": "boolean",
|
|
1621
|
+
"resolved": "boolean",
|
|
1622
|
+
"references": {}
|
|
1623
|
+
},
|
|
1624
|
+
"required": false,
|
|
1625
|
+
"optional": false,
|
|
1626
|
+
"docs": {
|
|
1627
|
+
"tags": [{
|
|
1628
|
+
"name": "default",
|
|
1629
|
+
"text": "false"
|
|
1630
|
+
}],
|
|
1631
|
+
"text": "When set to true, editable cells will be rendered using input components."
|
|
1632
|
+
},
|
|
1633
|
+
"attribute": "editable-data",
|
|
1634
|
+
"reflect": false,
|
|
1635
|
+
"defaultValue": "false"
|
|
1636
|
+
},
|
|
1862
1637
|
"enableExtraColumns": {
|
|
1863
1638
|
"type": "boolean",
|
|
1864
1639
|
"mutable": false,
|
|
@@ -1912,8 +1687,8 @@ export class KupTree {
|
|
|
1912
1687
|
"optional": false,
|
|
1913
1688
|
"docs": {
|
|
1914
1689
|
"tags": [{
|
|
1915
|
-
"
|
|
1916
|
-
"
|
|
1690
|
+
"name": "default",
|
|
1691
|
+
"text": "KupTreeExpansionMode.DROPDOWN"
|
|
1917
1692
|
}],
|
|
1918
1693
|
"text": "Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node."
|
|
1919
1694
|
},
|
|
@@ -2013,8 +1788,8 @@ export class KupTree {
|
|
|
2013
1788
|
"optional": false,
|
|
2014
1789
|
"docs": {
|
|
2015
1790
|
"tags": [{
|
|
2016
|
-
"
|
|
2017
|
-
"
|
|
1791
|
+
"name": "default",
|
|
1792
|
+
"text": "false;"
|
|
2018
1793
|
}],
|
|
2019
1794
|
"text": "Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells.\nIt works only on cells of the main column."
|
|
2020
1795
|
},
|
|
@@ -2052,8 +1827,8 @@ export class KupTree {
|
|
|
2052
1827
|
"optional": false,
|
|
2053
1828
|
"docs": {
|
|
2054
1829
|
"tags": [{
|
|
2055
|
-
"
|
|
2056
|
-
"
|
|
1830
|
+
"name": "default",
|
|
1831
|
+
"text": "true"
|
|
2057
1832
|
}],
|
|
2058
1833
|
"text": "When enabled displays Material's ripple effect on nodes (only when no columns are displayed)."
|
|
2059
1834
|
},
|
|
@@ -2166,8 +1941,8 @@ export class KupTree {
|
|
|
2166
1941
|
"optional": false,
|
|
2167
1942
|
"docs": {
|
|
2168
1943
|
"tags": [{
|
|
2169
|
-
"
|
|
2170
|
-
"
|
|
1944
|
+
"name": "see",
|
|
1945
|
+
"text": "showColumns"
|
|
2171
1946
|
}],
|
|
2172
1947
|
"text": "Flag: shows the header of the tree when the tree is displayed as a table."
|
|
2173
1948
|
},
|
|
@@ -2243,8 +2018,8 @@ export class KupTree {
|
|
|
2243
2018
|
"optional": false,
|
|
2244
2019
|
"docs": {
|
|
2245
2020
|
"tags": [{
|
|
2246
|
-
"
|
|
2247
|
-
"
|
|
2021
|
+
"name": "see",
|
|
2022
|
+
"text": "dynamicExpansionCallback"
|
|
2248
2023
|
}],
|
|
2249
2024
|
"text": "When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the\ntree have been passed inside the data property.\n\nTherefore, when expanding a node, the tree must emit an event (or run a given callback)\nand wait for the child nodes to be downloaded from the server.\n\nFor more information:"
|
|
2250
2025
|
},
|
|
@@ -2378,32 +2153,32 @@ export class KupTree {
|
|
|
2378
2153
|
"composed": true,
|
|
2379
2154
|
"docs": {
|
|
2380
2155
|
"tags": [{
|
|
2381
|
-
"
|
|
2382
|
-
"
|
|
2156
|
+
"name": "event",
|
|
2157
|
+
"text": "kup-tree-nodeexpand"
|
|
2383
2158
|
}, {
|
|
2384
|
-
"
|
|
2385
|
-
"
|
|
2159
|
+
"name": "type",
|
|
2160
|
+
"text": "{object}"
|
|
2386
2161
|
}, {
|
|
2387
|
-
"
|
|
2388
|
-
"
|
|
2162
|
+
"name": "property",
|
|
2163
|
+
"text": "{TreeNodePath} treeNodePath - The array of indexes to retrieve the current treeNode inside the data prop."
|
|
2389
2164
|
}, {
|
|
2390
|
-
"
|
|
2391
|
-
"
|
|
2165
|
+
"name": "property",
|
|
2166
|
+
"text": "{TreeNode} treeNode - Reference to the TreeNode data object which is being expanded (passed through the data prop)."
|
|
2392
2167
|
}, {
|
|
2393
|
-
"
|
|
2394
|
-
"
|
|
2168
|
+
"name": "property",
|
|
2169
|
+
"text": "{boolean} usesDynamicExpansion - Flag to notify that the component is running in dynamicExpansion mode."
|
|
2395
2170
|
}, {
|
|
2396
|
-
"
|
|
2397
|
-
"
|
|
2171
|
+
"name": "property",
|
|
2172
|
+
"text": "{boolean} dynamicExpansionRequireChildren - Flag to notify that the current dynamicExpansion event\nrequires the parent component to add TreeNode children to the given TreeNode."
|
|
2398
2173
|
}, {
|
|
2399
|
-
"
|
|
2400
|
-
"
|
|
2174
|
+
"name": "see",
|
|
2175
|
+
"text": "useDynamicExpansion *"
|
|
2401
2176
|
}, {
|
|
2402
|
-
"
|
|
2403
|
-
"
|
|
2177
|
+
"name": "see",
|
|
2178
|
+
"text": "dynamicExpansionCallback *"
|
|
2404
2179
|
}, {
|
|
2405
|
-
"
|
|
2406
|
-
"
|
|
2180
|
+
"name": "since",
|
|
2181
|
+
"text": "1.0.0"
|
|
2407
2182
|
}],
|
|
2408
2183
|
"text": "Fired when a node expansion ion has been triggered.\nContains additional data when the tree is using the dynamicExpansion feature."
|
|
2409
2184
|
},
|
|
@@ -2648,8 +2423,8 @@ export class KupTree {
|
|
|
2648
2423
|
"signature": "(descriptions?: boolean) => Promise<GenericObject>",
|
|
2649
2424
|
"parameters": [{
|
|
2650
2425
|
"tags": [{
|
|
2651
|
-
"
|
|
2652
|
-
"
|
|
2426
|
+
"name": "param",
|
|
2427
|
+
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
2653
2428
|
}],
|
|
2654
2429
|
"text": "- When provided and true, the result will be the list of props with their description."
|
|
2655
2430
|
}],
|
|
@@ -2680,8 +2455,8 @@ export class KupTree {
|
|
|
2680
2455
|
"signature": "(column: string) => Promise<void>",
|
|
2681
2456
|
"parameters": [{
|
|
2682
2457
|
"tags": [{
|
|
2683
|
-
"
|
|
2684
|
-
"
|
|
2458
|
+
"name": "param",
|
|
2459
|
+
"text": "column - Name of the column."
|
|
2685
2460
|
}],
|
|
2686
2461
|
"text": "- Name of the column."
|
|
2687
2462
|
}],
|
|
@@ -2748,8 +2523,8 @@ export class KupTree {
|
|
|
2748
2523
|
"signature": "(props: GenericObject) => Promise<void>",
|
|
2749
2524
|
"parameters": [{
|
|
2750
2525
|
"tags": [{
|
|
2751
|
-
"
|
|
2752
|
-
"
|
|
2526
|
+
"name": "param",
|
|
2527
|
+
"text": "props - Object containing props that will be set to the component."
|
|
2753
2528
|
}],
|
|
2754
2529
|
"text": "- Object containing props that will be set to the component."
|
|
2755
2530
|
}],
|