@sme.up/ketchup 8.0.2 → 8.2.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/{GenericVariables-a9ed17ee.js → GenericVariables-9cd88034.js} +3 -3
- package/dist/cjs/{component-85c2bd4d.js → component-2c7ddef7.js} +91 -10
- package/dist/cjs/{f-button-9524bbf7.js → f-button-797c8e7f.js} +99 -99
- package/dist/cjs/{f-button-declarations-b611587f.js → f-button-declarations-76b4fb4c.js} +16 -16
- package/dist/cjs/{f-cell-bcb75ade.js → f-cell-9c8ed48b.js} +478 -472
- package/dist/cjs/{f-checkbox-1148e791.js → f-checkbox-cff77b2c.js} +23 -23
- package/dist/cjs/{f-chip-2249b386.js → f-chip-318863df.js} +125 -125
- package/dist/cjs/{f-image-47d74999.js → f-image-f10144e9.js} +107 -107
- package/dist/cjs/{f-paginator-utils-b0a9ae5f.js → f-paginator-utils-8c44a37b.js} +1548 -1548
- package/dist/cjs/{f-text-field-579c0fc0.js → f-text-field-9610c198.js} +172 -172
- package/dist/cjs/{f-text-field-mdc-0e22f3e3.js → f-text-field-mdc-d38d80b5.js} +59 -60
- package/dist/cjs/{index-1f177abc.js → index-a9a3b467.js} +93 -24
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +199 -200
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +17557 -17508
- package/dist/cjs/kup-box.cjs.entry.js +1289 -1232
- package/dist/cjs/kup-calendar.cjs.entry.js +9542 -10035
- package/dist/cjs/kup-cell.cjs.entry.js +172 -172
- package/dist/cjs/kup-dash-list.cjs.entry.js +106 -106
- package/dist/cjs/kup-dash_2.cjs.entry.js +162 -162
- package/dist/cjs/kup-dashboard.cjs.entry.js +400 -401
- package/dist/cjs/kup-drawer.cjs.entry.js +138 -138
- package/dist/cjs/kup-echart.cjs.entry.js +7228 -6598
- package/dist/cjs/kup-family-tree.cjs.entry.js +439 -439
- package/dist/cjs/kup-iframe.cjs.entry.js +94 -94
- package/dist/cjs/kup-image-list.cjs.entry.js +255 -256
- package/dist/cjs/kup-lazy.cjs.entry.js +186 -186
- package/dist/cjs/kup-magic-box.cjs.entry.js +298 -298
- package/dist/cjs/{kup-manager-85b2a756.js → kup-manager-7747decd.js} +7287 -7287
- package/dist/cjs/kup-nav-bar.cjs.entry.js +130 -130
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +367 -368
- package/dist/cjs/kup-photo-frame.cjs.entry.js +144 -144
- package/dist/cjs/kup-planner.cjs.entry.js +1185 -1027
- package/dist/cjs/kup-probe.cjs.entry.js +246 -246
- package/dist/cjs/kup-qlik.cjs.entry.js +138 -138
- package/dist/cjs/kup-snackbar.cjs.entry.js +116 -116
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/assets/dash-list.js +466 -293
- package/dist/collection/assets/data-table.js +45 -0
- package/dist/collection/assets/echart.js +176 -0
- package/dist/collection/assets/index.js +4 -0
- package/dist/collection/assets/planner.js +8189 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/kup-accordion/kup-accordion-declarations.js +10 -10
- package/dist/collection/components/kup-accordion/kup-accordion.js +445 -445
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +27 -27
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +908 -908
- package/dist/collection/components/kup-badge/kup-badge-declarations.js +10 -10
- package/dist/collection/components/kup-badge/kup-badge.js +276 -276
- package/dist/collection/components/kup-box/kup-box-declarations.js +33 -33
- package/dist/collection/components/kup-box/kup-box-state.js +15 -15
- package/dist/collection/components/kup-box/kup-box.js +2134 -2079
- package/dist/collection/components/kup-button/kup-button-declarations.js +18 -18
- package/dist/collection/components/kup-button/kup-button.js +580 -580
- package/dist/collection/components/kup-button-list/kup-button-list-declarations.js +13 -13
- package/dist/collection/components/kup-button-list/kup-button-list.e2e.js +144 -0
- package/dist/collection/components/kup-button-list/kup-button-list.js +527 -527
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +35 -35
- package/dist/collection/components/kup-calendar/kup-calendar.css +0 -4
- package/dist/collection/components/kup-calendar/kup-calendar.js +690 -690
- package/dist/collection/components/kup-card/box/kup-card-box.js +227 -227
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +56 -56
- package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +393 -393
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +308 -308
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +165 -165
- package/dist/collection/components/kup-card/built-in/kup-card-message-box.js +10 -10
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +118 -118
- package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +64 -64
- package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +217 -217
- package/dist/collection/components/kup-card/free/kup-card-free.js +22 -22
- package/dist/collection/components/kup-card/kup-card-declarations.js +98 -98
- package/dist/collection/components/kup-card/kup-card-helper.js +196 -196
- package/dist/collection/components/kup-card/kup-card.js +809 -809
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +251 -251
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +593 -593
- package/dist/collection/components/kup-cell/kup-cell-declarations.js +11 -11
- package/dist/collection/components/kup-cell/kup-cell.js +401 -401
- package/dist/collection/components/kup-chart/kup-chart-builder.js +93 -93
- package/dist/collection/components/kup-chart/kup-chart-declarations.js +49 -49
- package/dist/collection/components/kup-chart/kup-chart.js +1080 -1080
- package/dist/collection/components/kup-checkbox/kup-checkbox-declarations.js +13 -13
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +433 -433
- package/dist/collection/components/kup-chip/kup-chip-declarations.js +12 -12
- package/dist/collection/components/kup-chip/kup-chip.js +558 -558
- package/dist/collection/components/kup-color-picker/kup-color-picker-declarations.js +12 -12
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +546 -546
- package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +15 -15
- package/dist/collection/components/kup-combobox/kup-combobox.js +821 -821
- package/dist/collection/components/kup-dash/kup-dash.js +171 -171
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +327 -327
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -10
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +588 -588
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +157 -156
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +808 -808
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +36 -36
- package/dist/collection/components/kup-data-table/kup-data-table.css +1 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +5572 -5527
- package/dist/collection/components/kup-date-picker/kup-date-picker-declarations.js +18 -18
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +816 -816
- package/dist/collection/components/kup-dialog/kup-dialog-declarations.js +14 -14
- package/dist/collection/components/kup-dialog/kup-dialog.js +467 -467
- package/dist/collection/components/kup-drawer/kup-drawer-declarations.js +10 -10
- package/dist/collection/components/kup-drawer/kup-drawer.e2e.js +9 -0
- package/dist/collection/components/kup-drawer/kup-drawer.js +383 -383
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button-declarations.js +18 -18
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +800 -800
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +53 -52
- package/dist/collection/components/kup-echart/kup-echart.js +1519 -1437
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +15 -15
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +829 -829
- package/dist/collection/components/kup-form/kup-form-declarations.js +29 -29
- package/dist/collection/components/kup-form/kup-form.js +734 -731
- package/dist/collection/components/kup-gauge/kup-gauge-declarations.js +26 -26
- package/dist/collection/components/kup-gauge/kup-gauge.js +764 -764
- package/dist/collection/components/kup-grid/kup-grid-declarations.js +10 -10
- package/dist/collection/components/kup-grid/kup-grid.js +253 -253
- package/dist/collection/components/kup-iframe/kup-iframe-declarations.js +10 -10
- package/dist/collection/components/kup-iframe/kup-iframe.js +281 -281
- package/dist/collection/components/kup-image/canvas/kup-image-canvas-declarations.js +184 -184
- package/dist/collection/components/kup-image/canvas/kup-image-canvas-helper.js +19 -19
- package/dist/collection/components/kup-image/canvas/kup-image-canvas.js +225 -225
- package/dist/collection/components/kup-image/kup-image-declarations.js +16 -16
- package/dist/collection/components/kup-image/kup-image.js +491 -491
- package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +10 -10
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -9
- package/dist/collection/components/kup-image-list/kup-image-list.js +533 -533
- package/dist/collection/components/kup-lazy/kup-lazy-declarations.js +20 -20
- package/dist/collection/components/kup-lazy/kup-lazy.js +430 -430
- package/dist/collection/components/kup-list/kup-list-declarations.js +34 -34
- package/dist/collection/components/kup-list/kup-list-helper.js +121 -121
- package/dist/collection/components/kup-list/kup-list.js +949 -949
- package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +23 -23
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +431 -431
- package/dist/collection/components/kup-nav-bar/kup-nav-bar-declarations.js +21 -21
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +315 -315
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -16
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +864 -864
- package/dist/collection/components/kup-photo-frame/kup-photo-frame-declarations.js +10 -10
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +372 -372
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +83 -76
- package/dist/collection/components/kup-planner/kup-planner-helper.js +54 -54
- package/dist/collection/components/kup-planner/kup-planner-state.js +16 -0
- package/dist/collection/components/kup-planner/kup-planner.css +2 -2
- package/dist/collection/components/kup-planner/kup-planner.js +1732 -1352
- package/dist/collection/components/kup-probe/kup-probe.js +358 -358
- package/dist/collection/components/kup-progress-bar/kup-progress-bar-declarations.js +14 -14
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +405 -405
- package/dist/collection/components/kup-qlik/kup-qlik-declarations.js +1 -1
- package/dist/collection/components/kup-qlik/kup-qlik.js +326 -326
- package/dist/collection/components/kup-radio/kup-radio-declarations.js +12 -12
- package/dist/collection/components/kup-radio/kup-radio.js +398 -398
- package/dist/collection/components/kup-rating/kup-rating-declarations.js +11 -11
- package/dist/collection/components/kup-rating/kup-rating.js +332 -332
- package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +13 -13
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +389 -389
- package/dist/collection/components/kup-spinner/kup-spinner-declarations.js +15 -15
- package/dist/collection/components/kup-spinner/kup-spinner.js +468 -468
- package/dist/collection/components/kup-state/kup-state.js +1 -1
- package/dist/collection/components/kup-state/kup-store.js +1 -1
- package/dist/collection/components/kup-state/mock-store.js +13 -13
- package/dist/collection/components/kup-switch/kup-switch-declarations.js +12 -12
- package/dist/collection/components/kup-switch/kup-switch.js +402 -402
- package/dist/collection/components/kup-tab-bar/kup-tab-bar-declarations.js +10 -10
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +443 -443
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +35 -35
- package/dist/collection/components/kup-text-field/kup-text-field.js +1193 -1189
- package/dist/collection/components/kup-time-picker/kup-time-picker-declarations.js +14 -14
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +921 -921
- package/dist/collection/components/kup-tree/kup-tree-declarations.js +43 -43
- package/dist/collection/components/kup-tree/kup-tree-faker.js +305 -305
- package/dist/collection/components/kup-tree/kup-tree-state.js +15 -15
- package/dist/collection/components/kup-tree/kup-tree.js +2479 -2479
- package/dist/collection/f-components/f-button/f-button-declarations.js +17 -17
- package/dist/collection/f-components/f-button/f-button.js +91 -91
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +158 -158
- package/dist/collection/f-components/f-cell/f-cell.js +435 -429
- package/dist/collection/f-components/f-checkbox/f-checkbox-declarations.js +1 -1
- package/dist/collection/f-components/f-checkbox/f-checkbox.js +16 -16
- package/dist/collection/f-components/f-chip/f-chip-declarations.js +15 -15
- package/dist/collection/f-components/f-chip/f-chip.js +101 -101
- package/dist/collection/f-components/f-image/f-image-declarations.js +8 -8
- package/dist/collection/f-components/f-image/f-image.js +100 -100
- package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +5 -5
- package/dist/collection/f-components/f-paginator/f-paginator-utils.js +28 -28
- package/dist/collection/f-components/f-paginator/f-paginator.js +86 -86
- package/dist/collection/f-components/f-switch/f-switch-declarations.js +1 -1
- package/dist/collection/f-components/f-switch/f-switch.js +12 -12
- package/dist/collection/f-components/f-text-field/f-text-field-declarations.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +29 -29
- package/dist/collection/f-components/f-text-field/f-text-field.js +151 -151
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +86 -86
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +300 -300
- package/dist/collection/managers/kup-data/kup-data-declarations.js +10 -10
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +165 -165
- package/dist/collection/managers/kup-data/kup-data-row-helper.js +28 -28
- package/dist/collection/managers/kup-data/kup-data.js +499 -499
- package/dist/collection/managers/kup-dates/kup-dates-declarations.js +43 -43
- package/dist/collection/managers/kup-dates/kup-dates.js +654 -654
- package/dist/collection/managers/kup-debug/kup-debug-declarations.js +20 -20
- package/dist/collection/managers/kup-debug/kup-debug.js +670 -670
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position-declarations.js +27 -27
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +244 -244
- package/dist/collection/managers/kup-interact/kup-interact-declarations.js +49 -49
- package/dist/collection/managers/kup-interact/kup-interact.js +397 -397
- package/dist/collection/managers/kup-language/kup-language-declarations.js +211 -211
- package/dist/collection/managers/kup-language/kup-language.js +151 -151
- package/dist/collection/managers/kup-manager/kup-manager-declarations.js +1 -1
- package/dist/collection/managers/kup-manager/kup-manager.js +303 -303
- package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -13
- package/dist/collection/managers/kup-math/kup-math-helper.js +39 -39
- package/dist/collection/managers/kup-math/kup-math.js +413 -413
- package/dist/collection/managers/kup-objects/kup-objects-declarations.js +1 -1
- package/dist/collection/managers/kup-objects/kup-objects.js +387 -387
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +10 -10
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +334 -334
- package/dist/collection/managers/kup-search/kup-search-declarations.js +1 -1
- package/dist/collection/managers/kup-search/kup-search.js +75 -75
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +177 -177
- package/dist/collection/managers/kup-theme/kup-theme.js +715 -715
- package/dist/collection/managers/kup-toolbar/kup-toolbar-declarations.js +9 -9
- package/dist/collection/managers/kup-toolbar/kup-toolbar.js +111 -111
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -1
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +229 -229
- package/dist/collection/types/GenericTypes.js +54 -54
- package/dist/collection/utils/cell-utils.js +156 -156
- package/dist/collection/utils/filters/filters-column-menu.js +360 -360
- package/dist/collection/utils/filters/filters-declarations.js +25 -25
- package/dist/collection/utils/filters/filters-rows.js +238 -238
- package/dist/collection/utils/filters/filters-tree-items.js +117 -117
- package/dist/collection/utils/filters/filters.js +287 -287
- package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +20 -20
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +751 -751
- package/dist/collection/utils/utils.js +84 -80
- package/dist/collection/variables/GenericVariables.js +4 -4
- package/dist/components/kup-accordion.js +355 -355
- package/dist/components/kup-autocomplete2.js +31821 -31763
- package/dist/components/kup-box2.js +1463 -1405
- package/dist/components/kup-calendar.js +9788 -10280
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +325 -325
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dash-list.js +276 -276
- package/dist/components/kup-dash2.js +220 -220
- package/dist/components/kup-dashboard.js +549 -549
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +295 -295
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +7395 -6765
- package/dist/components/kup-family-tree.js +604 -604
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid2.js +251 -251
- package/dist/components/kup-iframe.js +249 -249
- package/dist/components/kup-image-list.js +407 -407
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-lazy.js +344 -344
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +461 -461
- package/dist/components/kup-nav-bar.js +284 -284
- package/dist/components/kup-numeric-picker.js +529 -529
- package/dist/components/kup-photo-frame.js +300 -300
- package/dist/components/kup-planner.js +1376 -1207
- package/dist/components/kup-probe.js +399 -399
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +296 -296
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +273 -273
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/esm/{GenericVariables-665de00a.js → GenericVariables-6dfdd433.js} +3 -3
- package/dist/esm/{component-120651a0.js → component-e86c51ea.js} +81 -2
- package/dist/esm/{f-button-declarations-b1b4cac4.js → f-button-declarations-fd4965d1.js} +16 -16
- package/dist/esm/{f-button-024f0cfe.js → f-button-e0e6f65f.js} +99 -99
- package/dist/esm/{f-cell-90240a8c.js → f-cell-359dfe28.js} +478 -472
- package/dist/esm/{f-checkbox-9b3f5f5b.js → f-checkbox-91358c27.js} +23 -23
- package/dist/esm/{f-chip-2238ad43.js → f-chip-0fd043b4.js} +125 -125
- package/dist/esm/{f-image-f2e9bf79.js → f-image-b853b0cc.js} +107 -107
- package/dist/esm/{f-paginator-utils-8cb3c023.js → f-paginator-utils-124c146a.js} +1548 -1548
- package/dist/esm/{f-text-field-d231982c.js → f-text-field-92bb3a1f.js} +172 -172
- package/dist/esm/{f-text-field-mdc-cee583ea.js → f-text-field-mdc-a1b4a919.js} +27 -28
- package/dist/esm/{index-8bd38435.js → index-bb15ce14.js} +93 -25
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +199 -200
- package/dist/esm/kup-autocomplete_27.entry.js +17557 -17508
- package/dist/esm/kup-box.entry.js +1289 -1232
- package/dist/esm/kup-calendar.entry.js +9557 -10050
- package/dist/esm/kup-cell.entry.js +172 -172
- package/dist/esm/kup-dash-list.entry.js +106 -106
- package/dist/esm/kup-dash_2.entry.js +162 -162
- package/dist/esm/kup-dashboard.entry.js +400 -401
- package/dist/esm/kup-drawer.entry.js +138 -138
- package/dist/esm/kup-echart.entry.js +7228 -6598
- package/dist/esm/kup-family-tree.entry.js +439 -439
- package/dist/esm/kup-iframe.entry.js +94 -94
- package/dist/esm/kup-image-list.entry.js +255 -256
- package/dist/esm/kup-lazy.entry.js +186 -186
- package/dist/esm/kup-magic-box.entry.js +298 -298
- package/dist/esm/{kup-manager-d1da769e.js → kup-manager-1e6ea451.js} +7288 -7287
- package/dist/esm/kup-nav-bar.entry.js +130 -130
- package/dist/esm/kup-numeric-picker.entry.js +367 -368
- package/dist/esm/kup-photo-frame.entry.js +144 -144
- package/dist/esm/kup-planner.entry.js +1185 -1027
- package/dist/esm/kup-probe.entry.js +246 -246
- package/dist/esm/kup-qlik.entry.js +138 -138
- package/dist/esm/kup-snackbar.entry.js +116 -116
- package/dist/esm/loader.js +4 -4
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-3cf64473.js → p-0143e942.js} +1 -1
- package/dist/ketchup/{p-5f3680f2.js → p-1ca9aece.js} +1 -1
- package/dist/ketchup/p-1cd5785e.entry.js +9 -0
- package/dist/ketchup/{p-410c102a.js → p-2ac2c05e.js} +1 -1
- package/dist/ketchup/{p-8b46e7ce.js → p-349d4715.js} +1 -1
- package/dist/ketchup/{p-83435e6c.entry.js → p-374f867e.entry.js} +1 -1
- package/dist/ketchup/{p-c42b80c1.entry.js → p-41c00681.entry.js} +1 -1
- package/dist/ketchup/p-5dbd4402.entry.js +1 -0
- package/dist/ketchup/{p-89743989.entry.js → p-620faa59.entry.js} +1 -1
- package/dist/ketchup/{p-10d84b1b.js → p-6507e9eb.js} +7 -6
- package/dist/ketchup/{p-a84f1d24.entry.js → p-6837f725.entry.js} +1 -1
- package/dist/ketchup/p-6d46cbb0.js +30 -0
- package/dist/ketchup/{p-e1f1e661.entry.js → p-6e79b764.entry.js} +1 -1
- package/dist/ketchup/{p-1ad628fb.entry.js → p-818a4a09.entry.js} +1 -1
- package/dist/ketchup/p-81e20baa.entry.js +1 -0
- package/dist/ketchup/p-85d6bb1f.entry.js +1 -0
- package/dist/ketchup/p-8c1804d7.entry.js +1 -0
- package/dist/ketchup/{p-163b18b9.entry.js → p-ad919f87.entry.js} +1 -1
- package/dist/ketchup/{p-651d89c8.entry.js → p-adad6804.entry.js} +1 -1
- package/dist/ketchup/{p-37067ee6.entry.js → p-adebe276.entry.js} +1 -1
- package/dist/ketchup/p-b5deb573.js +2 -0
- package/dist/ketchup/{p-f876125d.entry.js → p-b73b3b52.entry.js} +1 -1
- package/dist/ketchup/{p-0d7d59c7.entry.js → p-ba0c4019.entry.js} +1 -1
- package/dist/ketchup/p-c010483d.entry.js +25 -0
- package/dist/ketchup/p-c1b10c9c.entry.js +1 -0
- package/dist/ketchup/{p-063d4c27.entry.js → p-c28be862.entry.js} +1 -1
- package/dist/ketchup/p-c6088459.entry.js +39 -0
- package/dist/ketchup/{p-43b67de4.entry.js → p-cf24193b.entry.js} +1 -1
- package/dist/ketchup/p-e646523d.js +1 -0
- package/dist/ketchup/p-e8977116.entry.js +1 -0
- package/dist/ketchup/{p-27a56c87.js → p-fb03f2f5.js} +2 -2
- package/dist/ketchup/{p-eda7f130.js → p-fb29ba2a.js} +1 -1
- package/dist/ketchup/{p-9f9b6656.js → p-fd1323da.js} +1 -1
- package/dist/loader/index.d.ts +1 -1
- package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +20 -20
- package/dist/types/components/kup-accordion/kup-accordion.d.ts +80 -80
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +35 -35
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +119 -119
- package/dist/types/components/kup-badge/kup-badge-declarations.d.ts +9 -9
- package/dist/types/components/kup-badge/kup-badge.d.ts +51 -51
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +113 -113
- package/dist/types/components/kup-box/kup-box-state.d.ts +10 -10
- package/dist/types/components/kup-box/kup-box.d.ts +270 -270
- package/dist/types/components/kup-button/kup-button-declarations.d.ts +24 -24
- package/dist/types/components/kup-button/kup-button.d.ts +111 -111
- package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +24 -24
- package/dist/types/components/kup-button-list/kup-button-list.d.ts +82 -82
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +70 -70
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +100 -100
- package/dist/types/components/kup-card/box/kup-card-box.d.ts +50 -50
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +39 -39
- package/dist/types/components/kup-card/built-in/kup-card-calendar.d.ts +2 -2
- package/dist/types/components/kup-card/built-in/kup-card-clock.d.ts +2 -2
- package/dist/types/components/kup-card/built-in/kup-card-column-drop-menu.d.ts +3 -3
- package/dist/types/components/kup-card/built-in/kup-card-message-box.d.ts +3 -3
- package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -2
- package/dist/types/components/kup-card/collapsible/kup-card-collapsible.d.ts +14 -14
- package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +44 -44
- package/dist/types/components/kup-card/free/kup-card-free.d.ts +14 -14
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +236 -236
- package/dist/types/components/kup-card/kup-card-helper.d.ts +27 -27
- package/dist/types/components/kup-card/kup-card.d.ts +159 -159
- package/dist/types/components/kup-card/scalable/kup-card-scalable.d.ts +56 -56
- package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +92 -92
- package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +10 -10
- package/dist/types/components/kup-cell/kup-cell.d.ts +67 -67
- package/dist/types/components/kup-chart/kup-chart-builder.d.ts +7 -7
- package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +135 -135
- package/dist/types/components/kup-chart/kup-chart.d.ts +170 -170
- package/dist/types/components/kup-checkbox/kup-checkbox-declarations.d.ts +17 -17
- package/dist/types/components/kup-checkbox/kup-checkbox.d.ts +85 -85
- package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +22 -22
- package/dist/types/components/kup-chip/kup-chip.d.ts +89 -89
- package/dist/types/components/kup-color-picker/kup-color-picker-declarations.d.ts +15 -15
- package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +89 -89
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +24 -24
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +95 -95
- package/dist/types/components/kup-dash/kup-dash.d.ts +33 -33
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +22 -22
- package/dist/types/components/kup-dashboard/kup-dashboard-declarations.d.ts +61 -61
- package/dist/types/components/kup-dashboard/kup-dashboard.d.ts +80 -80
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +258 -254
- package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +25 -25
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +36 -36
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +452 -444
- package/dist/types/components/kup-date-picker/kup-date-picker-declarations.d.ts +20 -20
- package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +110 -110
- package/dist/types/components/kup-dialog/kup-dialog-declarations.d.ts +26 -26
- package/dist/types/components/kup-dialog/kup-dialog.d.ts +77 -77
- package/dist/types/components/kup-drawer/kup-drawer-declarations.d.ts +9 -9
- package/dist/types/components/kup-drawer/kup-drawer.d.ts +74 -74
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button-declarations.d.ts +21 -21
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +161 -161
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +63 -62
- package/dist/types/components/kup-echart/kup-echart.d.ts +111 -111
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +38 -38
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +87 -87
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +64 -64
- package/dist/types/components/kup-form/kup-form.d.ts +83 -83
- package/dist/types/components/kup-gauge/kup-gauge-declarations.d.ts +25 -25
- package/dist/types/components/kup-gauge/kup-gauge.d.ts +147 -147
- package/dist/types/components/kup-grid/kup-grid-declarations.d.ts +9 -9
- package/dist/types/components/kup-grid/kup-grid.d.ts +48 -48
- package/dist/types/components/kup-iframe/kup-iframe-declarations.d.ts +9 -9
- package/dist/types/components/kup-iframe/kup-iframe.d.ts +49 -49
- package/dist/types/components/kup-image/canvas/kup-image-canvas-declarations.d.ts +23 -23
- package/dist/types/components/kup-image/canvas/kup-image-canvas-helper.d.ts +2 -2
- package/dist/types/components/kup-image/canvas/kup-image-canvas.d.ts +28 -28
- package/dist/types/components/kup-image/kup-image-declarations.d.ts +19 -19
- package/dist/types/components/kup-image/kup-image.d.ts +103 -103
- package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +14 -14
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -6
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +73 -73
- package/dist/types/components/kup-lazy/kup-lazy-declarations.d.ts +18 -18
- package/dist/types/components/kup-lazy/kup-lazy.d.ts +78 -78
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +48 -48
- package/dist/types/components/kup-list/kup-list-helper.d.ts +6 -6
- package/dist/types/components/kup-list/kup-list.d.ts +128 -128
- package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +21 -21
- package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +65 -65
- package/dist/types/components/kup-nav-bar/kup-nav-bar-declarations.d.ts +19 -19
- package/dist/types/components/kup-nav-bar/kup-nav-bar.d.ts +65 -65
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -19
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -121
- package/dist/types/components/kup-photo-frame/kup-photo-frame-declarations.d.ts +9 -9
- package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +61 -61
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +127 -106
- package/dist/types/components/kup-planner/kup-planner-helper.d.ts +6 -6
- package/dist/types/components/kup-planner/kup-planner-state.d.ts +13 -0
- package/dist/types/components/kup-planner/kup-planner.d.ts +266 -212
- package/dist/types/components/kup-probe/kup-probe.d.ts +72 -72
- package/dist/types/components/kup-progress-bar/kup-progress-bar-declarations.d.ts +13 -13
- package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +69 -69
- package/dist/types/components/kup-qlik/kup-qlik-declarations.d.ts +19 -19
- package/dist/types/components/kup-qlik/kup-qlik.d.ts +100 -100
- package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +23 -23
- package/dist/types/components/kup-radio/kup-radio.d.ts +80 -80
- package/dist/types/components/kup-rating/kup-rating-declarations.d.ts +14 -14
- package/dist/types/components/kup-rating/kup-rating.d.ts +62 -62
- package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +12 -12
- package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +84 -84
- package/dist/types/components/kup-spinner/kup-spinner-declarations.d.ts +14 -14
- package/dist/types/components/kup-spinner/kup-spinner.d.ts +79 -79
- package/dist/types/components/kup-state/kup-state.d.ts +3 -3
- package/dist/types/components/kup-state/kup-store.d.ts +4 -4
- package/dist/types/components/kup-state/mock-store.d.ts +8 -8
- package/dist/types/components/kup-switch/kup-switch-declarations.d.ts +15 -15
- package/dist/types/components/kup-switch/kup-switch.d.ts +80 -80
- package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +21 -21
- package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +77 -77
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +38 -38
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +253 -253
- package/dist/types/components/kup-time-picker/kup-time-picker-declarations.d.ts +17 -17
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +125 -125
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +97 -97
- package/dist/types/components/kup-tree/kup-tree-faker.d.ts +54 -54
- package/dist/types/components/kup-tree/kup-tree-state.d.ts +14 -14
- package/dist/types/components/kup-tree/kup-tree.d.ts +362 -362
- package/dist/types/components.d.ts +112 -14
- package/dist/types/f-components/f-button/f-button-declarations.d.ts +41 -41
- package/dist/types/f-components/f-button/f-button.d.ts +3 -3
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +162 -162
- package/dist/types/f-components/f-cell/f-cell.d.ts +3 -3
- package/dist/types/f-components/f-checkbox/f-checkbox-declarations.d.ts +15 -15
- package/dist/types/f-components/f-checkbox/f-checkbox.d.ts +3 -3
- package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +29 -29
- package/dist/types/f-components/f-chip/f-chip.d.ts +3 -3
- package/dist/types/f-components/f-image/f-image-declarations.d.ts +36 -36
- package/dist/types/f-components/f-image/f-image.d.ts +3 -3
- package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +22 -22
- package/dist/types/f-components/f-paginator/f-paginator-utils.d.ts +2 -2
- package/dist/types/f-components/f-paginator/f-paginator.d.ts +3 -3
- package/dist/types/f-components/f-switch/f-switch-declarations.d.ts +14 -14
- package/dist/types/f-components/f-switch/f-switch.d.ts +3 -3
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +42 -42
- package/dist/types/f-components/f-text-field/f-text-field-mdc.d.ts +6 -6
- package/dist/types/f-components/f-text-field/f-text-field.d.ts +3 -3
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +31 -31
- package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +39 -39
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +173 -173
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +44 -44
- package/dist/types/managers/kup-data/kup-data-row-helper.d.ts +14 -14
- package/dist/types/managers/kup-data/kup-data.d.ts +86 -86
- package/dist/types/managers/kup-dates/kup-dates-declarations.d.ts +39 -39
- package/dist/types/managers/kup-dates/kup-dates.d.ts +207 -207
- package/dist/types/managers/kup-debug/kup-debug-declarations.d.ts +38 -38
- package/dist/types/managers/kup-debug/kup-debug.d.ts +95 -95
- package/dist/types/managers/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +50 -50
- package/dist/types/managers/kup-dynamic-position/kup-dynamic-position.d.ts +61 -61
- package/dist/types/managers/kup-interact/kup-interact-declarations.d.ts +128 -128
- package/dist/types/managers/kup-interact/kup-interact.d.ts +105 -105
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +225 -225
- package/dist/types/managers/kup-language/kup-language.d.ts +52 -52
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +162 -162
- package/dist/types/managers/kup-manager/kup-manager.d.ts +95 -95
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +33 -33
- package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -17
- package/dist/types/managers/kup-math/kup-math.d.ts +147 -146
- package/dist/types/managers/kup-objects/kup-objects-declarations.d.ts +15 -15
- package/dist/types/managers/kup-objects/kup-objects.d.ts +210 -210
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +28 -28
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +62 -62
- package/dist/types/managers/kup-search/kup-search-declarations.d.ts +7 -7
- package/dist/types/managers/kup-search/kup-search.d.ts +20 -20
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +185 -185
- package/dist/types/managers/kup-theme/kup-theme.d.ts +127 -127
- package/dist/types/managers/kup-toolbar/kup-toolbar-declarations.d.ts +8 -8
- package/dist/types/managers/kup-toolbar/kup-toolbar.d.ts +39 -39
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -8
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +51 -51
- package/dist/types/stencil-public-runtime.d.ts +3 -0
- package/dist/types/types/GenericTypes.d.ts +110 -110
- package/dist/types/utils/cell-utils.d.ts +10 -10
- package/dist/types/utils/filters/filters-column-menu.d.ts +96 -96
- package/dist/types/utils/filters/filters-declarations.d.ts +39 -39
- package/dist/types/utils/filters/filters-rows.d.ts +30 -30
- package/dist/types/utils/filters/filters-tree-items.d.ts +19 -19
- package/dist/types/utils/filters/filters.d.ts +72 -72
- package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +19 -19
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +142 -142
- package/dist/types/utils/utils.d.ts +37 -35
- package/dist/types/variables/GenericVariables.d.ts +4 -4
- package/package.json +21 -16
- package/dist/cjs/tslib.es6-386654de.js +0 -87
- package/dist/esm/tslib.es6-8c2af864.js +0 -82
- package/dist/ketchup/p-0bcda0e2.entry.js +0 -1
- package/dist/ketchup/p-33aff1ca.entry.js +0 -25
- package/dist/ketchup/p-3432ebaf.entry.js +0 -9
- package/dist/ketchup/p-35b29b22.entry.js +0 -1
- package/dist/ketchup/p-36dac88e.js +0 -30
- package/dist/ketchup/p-39a55c47.js +0 -1
- package/dist/ketchup/p-489d55ff.entry.js +0 -39
- package/dist/ketchup/p-73c8d651.entry.js +0 -1
- package/dist/ketchup/p-7f59211b.js +0 -1
- package/dist/ketchup/p-9dcfbb1e.js +0 -2
- package/dist/ketchup/p-b2fd2dbf.entry.js +0 -1
- package/dist/ketchup/p-d1b050d0.entry.js +0 -27
- package/dist/ketchup/p-d6ea709e.entry.js +0 -1
- /package/dist/ketchup/{p-6c77a36c.js → p-0fd98ab4.js} +0 -0
- /package/dist/ketchup/{p-97e8ea42.js → p-ad2e21d2.js} +0 -0
|
@@ -1,1242 +1,1299 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { k as kupManagerInstance, A as identify, g as getProps, s as setProps, v as getColumnByName, m as KupLanguageGeneric, K as KupThemeIconValues, c as KupDebugCategory, Q as KupPointerEventTypes, V as KupDragEffect, W as kupDraggableCellAttr, X as KupDropEventTypes, I as KupLanguageSearch, a2 as SortMode } from './kup-manager-
|
|
3
|
-
import { f as filterRows, p as paginateRows, s as sortRows, d as pageChange, r as rowsPerPageChange, h as FPaginatorMode, b as FPaginator } from './f-paginator-utils-
|
|
4
|
-
import { F as FImage } from './f-image-
|
|
5
|
-
import { a as FChip } from './f-chip-
|
|
6
|
-
import { c as componentWrapperId } from './GenericVariables-
|
|
7
|
-
import { F as FCell } from './f-cell-
|
|
8
|
-
import { F as FTextFieldMDC } from './f-text-field-mdc-
|
|
9
|
-
import './f-button-
|
|
10
|
-
import './f-button-declarations-
|
|
11
|
-
import './f-checkbox-
|
|
12
|
-
import './f-text-field-
|
|
13
|
-
import './
|
|
14
|
-
import './component-120651a0.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, e as H, h, H as Host, g as getElement } from './index-bb15ce14.js';
|
|
2
|
+
import { k as kupManagerInstance, A as identify, g as getProps, s as setProps, v as getColumnByName, m as KupLanguageGeneric, K as KupThemeIconValues, c as KupDebugCategory, Q as KupPointerEventTypes, V as KupDragEffect, W as kupDraggableCellAttr, X as KupDropEventTypes, I as KupLanguageSearch, a2 as SortMode } from './kup-manager-1e6ea451.js';
|
|
3
|
+
import { f as filterRows, p as paginateRows, s as sortRows, d as pageChange, r as rowsPerPageChange, h as FPaginatorMode, b as FPaginator } from './f-paginator-utils-124c146a.js';
|
|
4
|
+
import { F as FImage } from './f-image-b853b0cc.js';
|
|
5
|
+
import { a as FChip } from './f-chip-0fd043b4.js';
|
|
6
|
+
import { c as componentWrapperId } from './GenericVariables-6dfdd433.js';
|
|
7
|
+
import { F as FCell } from './f-cell-359dfe28.js';
|
|
8
|
+
import { F as FTextFieldMDC } from './f-text-field-mdc-a1b4a919.js';
|
|
9
|
+
import './f-button-e0e6f65f.js';
|
|
10
|
+
import './f-button-declarations-fd4965d1.js';
|
|
11
|
+
import './f-checkbox-91358c27.js';
|
|
12
|
+
import './f-text-field-92bb3a1f.js';
|
|
13
|
+
import './component-e86c51ea.js';
|
|
15
14
|
|
|
16
|
-
/**
|
|
17
|
-
* Props of the kup-box component.
|
|
18
|
-
* Used to export every prop in an object.
|
|
19
|
-
*/
|
|
20
|
-
var KupBoxProps;
|
|
21
|
-
(function (KupBoxProps) {
|
|
22
|
-
KupBoxProps["cardData"] = "Data of the card linked to the box when the latter's layout must be a premade template.";
|
|
23
|
-
KupBoxProps["columns"] = "Number of columns.";
|
|
24
|
-
KupBoxProps["customStyle"] = "Custom style of the component.";
|
|
25
|
-
KupBoxProps["data"] = "Actual data of the box.";
|
|
26
|
-
KupBoxProps["dragEnabled"] = "Enable dragging.";
|
|
27
|
-
KupBoxProps["dropEnabled"] = "Enable dropping.";
|
|
28
|
-
KupBoxProps["dropOnSection"] = "Drop can be done in section.";
|
|
29
|
-
KupBoxProps["enableRowActions"] = "If enabled, a button to load / display the row actions will be displayed on the right of every box.";
|
|
30
|
-
KupBoxProps["globalFilter"] = "When set to true it activates the global filter.";
|
|
31
|
-
KupBoxProps["globalFilterValue"] = "The value of the global filter.";
|
|
32
|
-
KupBoxProps["kanban"] = "Displays the boxlist as a Kanban.";
|
|
33
|
-
KupBoxProps["layout"] = "How the field will be displayed. If not present, a default one will be created.";
|
|
34
|
-
KupBoxProps["
|
|
35
|
-
KupBoxProps["
|
|
36
|
-
KupBoxProps["
|
|
37
|
-
KupBoxProps["pagination"] = "Enables pagination.";
|
|
38
|
-
KupBoxProps["rowsPerPage"] = "Number of current rows per page.";
|
|
39
|
-
KupBoxProps["scrollOnHover"] = "Activates the scroll on hover function.";
|
|
40
|
-
KupBoxProps["selectBox"] = "Automatically selects the box at the specified index.";
|
|
41
|
-
KupBoxProps["selectedRowsState"] = "Multiple selection.";
|
|
42
|
-
KupBoxProps["showSelection"] = "If enabled, highlights the selected box/boxes.";
|
|
43
|
-
KupBoxProps["sortBy"] = "If sorting is enabled, specifies which column to sort.";
|
|
44
|
-
KupBoxProps["sortEnabled"] = "Enable sorting.";
|
|
45
|
-
KupBoxProps["stateId"] = "";
|
|
46
|
-
KupBoxProps["store"] = "";
|
|
47
|
-
KupBoxProps["swipeDisabled"] = "Disable swipe.";
|
|
15
|
+
/**
|
|
16
|
+
* Props of the kup-box component.
|
|
17
|
+
* Used to export every prop in an object.
|
|
18
|
+
*/
|
|
19
|
+
var KupBoxProps;
|
|
20
|
+
(function (KupBoxProps) {
|
|
21
|
+
KupBoxProps["cardData"] = "Data of the card linked to the box when the latter's layout must be a premade template.";
|
|
22
|
+
KupBoxProps["columns"] = "Number of columns.";
|
|
23
|
+
KupBoxProps["customStyle"] = "Custom style of the component.";
|
|
24
|
+
KupBoxProps["data"] = "Actual data of the box.";
|
|
25
|
+
KupBoxProps["dragEnabled"] = "Enable dragging.";
|
|
26
|
+
KupBoxProps["dropEnabled"] = "Enable dropping.";
|
|
27
|
+
KupBoxProps["dropOnSection"] = "Drop can be done in section.";
|
|
28
|
+
KupBoxProps["enableRowActions"] = "If enabled, a button to load / display the row actions will be displayed on the right of every box.";
|
|
29
|
+
KupBoxProps["globalFilter"] = "When set to true it activates the global filter.";
|
|
30
|
+
KupBoxProps["globalFilterValue"] = "The value of the global filter.";
|
|
31
|
+
KupBoxProps["kanban"] = "Displays the boxlist as a Kanban.";
|
|
32
|
+
KupBoxProps["layout"] = "How the field will be displayed. If not present, a default one will be created.";
|
|
33
|
+
KupBoxProps["lazyLoadRows"] = "When set to true, extra rows will be automatically loaded once the last row enters the viewport.";
|
|
34
|
+
KupBoxProps["multiSelection"] = "Enable multi selection.";
|
|
35
|
+
KupBoxProps["pageSelected"] = "Current page number.";
|
|
36
|
+
KupBoxProps["pagination"] = "Enables pagination.";
|
|
37
|
+
KupBoxProps["rowsPerPage"] = "Number of current rows per page.";
|
|
38
|
+
KupBoxProps["scrollOnHover"] = "Activates the scroll on hover function.";
|
|
39
|
+
KupBoxProps["selectBox"] = "Automatically selects the box at the specified index.";
|
|
40
|
+
KupBoxProps["selectedRowsState"] = "Multiple selection.";
|
|
41
|
+
KupBoxProps["showSelection"] = "If enabled, highlights the selected box/boxes.";
|
|
42
|
+
KupBoxProps["sortBy"] = "If sorting is enabled, specifies which column to sort.";
|
|
43
|
+
KupBoxProps["sortEnabled"] = "Enable sorting.";
|
|
44
|
+
KupBoxProps["stateId"] = "";
|
|
45
|
+
KupBoxProps["store"] = "";
|
|
46
|
+
KupBoxProps["swipeDisabled"] = "Disable swipe.";
|
|
48
47
|
})(KupBoxProps || (KupBoxProps = {}));
|
|
49
48
|
|
|
50
|
-
class KupBoxState {
|
|
51
|
-
constructor() {
|
|
52
|
-
this.globalFilterValue = '';
|
|
53
|
-
this.sortBy = '';
|
|
54
|
-
this.selectedRowsState = '';
|
|
55
|
-
this.pageSelected = 1;
|
|
56
|
-
this.rowsPerPage = 0;
|
|
57
|
-
this.load = false;
|
|
58
|
-
}
|
|
59
|
-
/*Add attribute*/
|
|
60
|
-
toDebugString() {
|
|
61
|
-
// TODO
|
|
62
|
-
return 'box state';
|
|
63
|
-
}
|
|
49
|
+
class KupBoxState {
|
|
50
|
+
constructor() {
|
|
51
|
+
this.globalFilterValue = '';
|
|
52
|
+
this.sortBy = '';
|
|
53
|
+
this.selectedRowsState = '';
|
|
54
|
+
this.pageSelected = 1;
|
|
55
|
+
this.rowsPerPage = 0;
|
|
56
|
+
this.load = false;
|
|
57
|
+
}
|
|
58
|
+
/*Add attribute*/
|
|
59
|
+
toDebugString() {
|
|
60
|
+
// TODO
|
|
61
|
+
return 'box state';
|
|
62
|
+
}
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
const kupBoxCss = ":host{--kup_box_background_color:var(\n --kup-box-background-color,\n var(--kup-background-color)\n );--kup_box_color:var(--kup-box-color, var(--kup-text-color));--kup_box_font_family:var(--kup-box-font-family, var(--kup-font-family));--kup_box_font_size:var(--kup-box-font-size, var(--kup-font-size));--kup_box_grid_gap:var(--kup-box-grid-gap, 1em);--kup_box_hover_box_shadow:var(\n --kup-box-hover-box-shadow,\n 0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)\n );--kup_box_primary_color_rgb:var(\n --kup-box-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_box_transition:var(--kup-box-transition, 0.25s);display:block;font-family:var(--kup_box_font_family);font-size:var(--kup_box_font_size)}.box-component{background:var(--kup_box_background_color);transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup-border-color)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *{box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box:hover{box-shadow:var(--kup_box_hover_box_shadow)}#box-container .box-wrapper .box.selected{background-color:rgba(var(--kup_box_primary_color_rgb), 0.175)}#box-container .box-wrapper .box.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup-border-color);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-color);color:rgba(var(--kup-text-color-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-color);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 500ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-color)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(:not(.kup-borderless)) .box{border:1px solid var(--kup-border-color)}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box{padding:3px}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{margin:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
67
66
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
this
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
this.
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
93
|
-
this.
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
96
|
-
this
|
|
97
|
-
this.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this.
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
109
|
-
this.
|
|
110
|
-
this.
|
|
111
|
-
this.
|
|
112
|
-
this.
|
|
113
|
-
this.
|
|
114
|
-
this
|
|
115
|
-
this
|
|
116
|
-
this
|
|
117
|
-
this.
|
|
118
|
-
this.
|
|
119
|
-
this.
|
|
120
|
-
this.
|
|
121
|
-
this.
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
124
|
-
this.
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
127
|
-
this.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
if (
|
|
154
|
-
this.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
this.
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
/*-------------------------------------------------*/
|
|
208
|
-
/*
|
|
209
|
-
/*-------------------------------------------------*/
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
this.
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
//
|
|
314
|
-
this.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
return
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
this
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
if (
|
|
497
|
-
//
|
|
498
|
-
this.
|
|
499
|
-
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
for (let
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
};
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
this.kupManager.
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
this.
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
}
|
|
1142
|
-
this.
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
this.
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
:
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
'
|
|
1202
|
-
};
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
if (this.
|
|
1221
|
-
this.kupManager.
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
}
|
|
67
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
68
|
+
if (kind === "a" && !f)
|
|
69
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
70
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
71
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
72
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
73
|
+
};
|
|
74
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
75
|
+
if (kind === "m")
|
|
76
|
+
throw new TypeError("Private method is not writable");
|
|
77
|
+
if (kind === "a" && !f)
|
|
78
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
79
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
80
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
81
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
82
|
+
};
|
|
83
|
+
var _KupBox_instances, _KupBox_intObserver, _KupBox_rowsRefs, _KupBox_navBarHeight, _KupBox_didRenderObservers, _KupBox_setObserver;
|
|
84
|
+
const KupBox = class {
|
|
85
|
+
constructor(hostRef) {
|
|
86
|
+
registerInstance(this, hostRef);
|
|
87
|
+
this.kupBoxClick = createEvent(this, "kup-box-click", 6);
|
|
88
|
+
this.kupBoxSelected = createEvent(this, "kup-box-selected", 6);
|
|
89
|
+
this.kupAutoBoxSelect = createEvent(this, "kup-box-autoselect", 6);
|
|
90
|
+
this.kupRowActionMenuClick = createEvent(this, "kup-box-rowactionmenuclick", 6);
|
|
91
|
+
this.kupRowActionClick = createEvent(this, "kup-box-rowactionclick", 6);
|
|
92
|
+
this.kupDidLoad = createEvent(this, "kup-box-didload", 6);
|
|
93
|
+
this.kupDidUnload = createEvent(this, "kup-box-didunload", 6);
|
|
94
|
+
this.kupBoxContextMenu = createEvent(this, "kup-box-contextmenu", 6);
|
|
95
|
+
_KupBox_instances.add(this);
|
|
96
|
+
this.state = new KupBoxState();
|
|
97
|
+
/*-------------------------------------------------*/
|
|
98
|
+
/* I n t e r n a l V a r i a b l e s */
|
|
99
|
+
/*-------------------------------------------------*/
|
|
100
|
+
/**
|
|
101
|
+
* Instance of the KupManager class.
|
|
102
|
+
*/
|
|
103
|
+
this.kupManager = kupManagerInstance();
|
|
104
|
+
this.visibleColumns = [];
|
|
105
|
+
this.rows = [];
|
|
106
|
+
this.filteredRows = [];
|
|
107
|
+
this.sectionRef = null;
|
|
108
|
+
this.rowsRefs = [];
|
|
109
|
+
this.hold = false;
|
|
110
|
+
this.interactableDrag = [];
|
|
111
|
+
this.interactableDrop = [];
|
|
112
|
+
this.interactableTouch = [];
|
|
113
|
+
_KupBox_intObserver.set(this, undefined);
|
|
114
|
+
_KupBox_rowsRefs.set(this, []);
|
|
115
|
+
_KupBox_navBarHeight.set(this, 0);
|
|
116
|
+
this.collapsedSection = {};
|
|
117
|
+
this.selectedRows = [];
|
|
118
|
+
this.rowActionMenuOpened = undefined;
|
|
119
|
+
this.currentPage = 1;
|
|
120
|
+
this.currentRowsPerPage = 10;
|
|
121
|
+
this.cardData = null;
|
|
122
|
+
this.columns = 1;
|
|
123
|
+
this.customStyle = '';
|
|
124
|
+
this.data = null;
|
|
125
|
+
this.dragEnabled = false;
|
|
126
|
+
this.dropEnabled = false;
|
|
127
|
+
this.dropOnSection = false;
|
|
128
|
+
this.editableData = false;
|
|
129
|
+
this.enableRowActions = false;
|
|
130
|
+
this.globalFilter = false;
|
|
131
|
+
this.globalFilterValue = '';
|
|
132
|
+
this.kanban = null;
|
|
133
|
+
this.layout = undefined;
|
|
134
|
+
this.lazyLoadRows = false;
|
|
135
|
+
this.multiSelection = false;
|
|
136
|
+
this.pageSelected = 1;
|
|
137
|
+
this.pagination = false;
|
|
138
|
+
this.rowsPerPage = undefined;
|
|
139
|
+
this.scrollOnHover = false;
|
|
140
|
+
this.selectBox = undefined;
|
|
141
|
+
this.selectedRowsState = undefined;
|
|
142
|
+
this.showSelection = true;
|
|
143
|
+
this.sortBy = undefined;
|
|
144
|
+
this.sortEnabled = false;
|
|
145
|
+
this.stateId = '';
|
|
146
|
+
this.store = undefined;
|
|
147
|
+
this.swipeDisabled = false;
|
|
148
|
+
}
|
|
149
|
+
initWithPersistedState() {
|
|
150
|
+
if (this.store && this.stateId) {
|
|
151
|
+
const state = this.store.getState(this.stateId);
|
|
152
|
+
if (state != null) {
|
|
153
|
+
this.kupManager.debug.logMessage(this, 'Initialize with state for stateId ' +
|
|
154
|
+
this.stateId +
|
|
155
|
+
': ' +
|
|
156
|
+
state);
|
|
157
|
+
// *** PROPS ***
|
|
158
|
+
this.sortBy = this.state.sortBy;
|
|
159
|
+
this.globalFilterValue = this.state.globalFilterValue;
|
|
160
|
+
this.selectedRowsState = this.state.selectedRowsState;
|
|
161
|
+
this.pageSelected = this.state.pageSelected;
|
|
162
|
+
this.rowsPerPage = this.state.rowsPerPage;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
persistState() {
|
|
167
|
+
if (this.store && this.stateId) {
|
|
168
|
+
let somethingChanged = false;
|
|
169
|
+
if (!this.kupManager.objects.deepEqual(this.state.sortBy, this.sortBy)) {
|
|
170
|
+
this.state.sortBy = this.sortBy;
|
|
171
|
+
somethingChanged = true;
|
|
172
|
+
}
|
|
173
|
+
if (!this.kupManager.objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
174
|
+
this.state.globalFilterValue = this.globalFilterValue;
|
|
175
|
+
somethingChanged = true;
|
|
176
|
+
}
|
|
177
|
+
if (!this.kupManager.objects.deepEqual(this.state.pageSelected, this.currentPage)) {
|
|
178
|
+
this.state.pageSelected = this.currentPage;
|
|
179
|
+
somethingChanged = true;
|
|
180
|
+
}
|
|
181
|
+
if (!this.kupManager.objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
|
|
182
|
+
this.state.rowsPerPage = this.currentRowsPerPage;
|
|
183
|
+
somethingChanged = true;
|
|
184
|
+
}
|
|
185
|
+
const selectedRowsState = this.selectedRows.reduce((accumulator, row, currentIndex) => {
|
|
186
|
+
const prefix = currentIndex > 0 ? ';' : '';
|
|
187
|
+
return accumulator + prefix + row.id;
|
|
188
|
+
}, '');
|
|
189
|
+
if (!this.kupManager.objects.deepEqual(this.state.selectedRowsState, selectedRowsState)) {
|
|
190
|
+
this.state.selectedRowsState = selectedRowsState;
|
|
191
|
+
somethingChanged = true;
|
|
192
|
+
}
|
|
193
|
+
if (!this.state.load) {
|
|
194
|
+
this.state.load = true;
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (somethingChanged) {
|
|
198
|
+
this.kupManager.debug.logMessage(this, 'Persisting state for stateId ' +
|
|
199
|
+
this.stateId +
|
|
200
|
+
': ' +
|
|
201
|
+
this.state);
|
|
202
|
+
this.store.persistState(this.stateId, this.state);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
/*-------------------------------------------------*/
|
|
207
|
+
/* W a t c h e r s */
|
|
208
|
+
/*-------------------------------------------------*/
|
|
209
|
+
rowsPerPageHandler(newValue) {
|
|
210
|
+
this.currentRowsPerPage = newValue;
|
|
211
|
+
}
|
|
212
|
+
recalculateRows() {
|
|
213
|
+
this.initRows();
|
|
214
|
+
}
|
|
215
|
+
onDataChanged() {
|
|
216
|
+
identify(this.getRows());
|
|
217
|
+
this.initVisibleColumns();
|
|
218
|
+
this.initRows();
|
|
219
|
+
this.checkLayout();
|
|
220
|
+
}
|
|
221
|
+
onLayoutChanged() {
|
|
222
|
+
this.checkLayout();
|
|
223
|
+
}
|
|
224
|
+
onSelectBoxChanged() {
|
|
225
|
+
this.handleAutomaticBoxSelection();
|
|
226
|
+
}
|
|
227
|
+
/*-------------------------------------------------*/
|
|
228
|
+
/* P u b l i c M e t h o d s */
|
|
229
|
+
/*-------------------------------------------------*/
|
|
230
|
+
/**
|
|
231
|
+
* Used to retrieve component's props values.
|
|
232
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
233
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
234
|
+
*/
|
|
235
|
+
async getProps(descriptions) {
|
|
236
|
+
return getProps(this, KupBoxProps, descriptions);
|
|
237
|
+
}
|
|
238
|
+
async loadRowActions(row, actions) {
|
|
239
|
+
row.actions = actions;
|
|
240
|
+
// show menu
|
|
241
|
+
this.rowActionMenuOpened = row;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* This method is used to trigger a new render of the component.
|
|
245
|
+
*/
|
|
246
|
+
async refresh() {
|
|
247
|
+
forceUpdate(this);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Sets the props to the component.
|
|
251
|
+
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
252
|
+
*/
|
|
253
|
+
async setProps(props) {
|
|
254
|
+
setProps(this, KupBoxProps, props);
|
|
255
|
+
}
|
|
256
|
+
/*-------------------------------------------------*/
|
|
257
|
+
/* P r i v a t e M e t h o d s */
|
|
258
|
+
/*-------------------------------------------------*/
|
|
259
|
+
getColumns() {
|
|
260
|
+
return this.data && this.data.columns
|
|
261
|
+
? this.data.columns
|
|
262
|
+
: [{ title: '', name: '', size: undefined }];
|
|
263
|
+
}
|
|
264
|
+
initVisibleColumns() {
|
|
265
|
+
this.visibleColumns = this.getColumns().filter((column) => {
|
|
266
|
+
if (column.hasOwnProperty('visible')) {
|
|
267
|
+
return column.visible;
|
|
268
|
+
}
|
|
269
|
+
return true;
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
getRows() {
|
|
273
|
+
return this.data && this.data.rows ? this.data.rows : [];
|
|
274
|
+
}
|
|
275
|
+
initRows() {
|
|
276
|
+
this.filteredRows = this.getRows();
|
|
277
|
+
if (this.globalFilter && this.globalFilterValue) {
|
|
278
|
+
// filtering rows
|
|
279
|
+
this.filteredRows = filterRows(this.filteredRows, null, this.globalFilterValue, this.visibleColumns);
|
|
280
|
+
}
|
|
281
|
+
this.rows = this.sortRows(this.filteredRows);
|
|
282
|
+
if (this.pagination) {
|
|
283
|
+
this.rows = paginateRows(this.rows, this.currentPage, this.currentRowsPerPage, false);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
sortRows(rows) {
|
|
287
|
+
let sortedRows = rows;
|
|
288
|
+
if (this.sortBy) {
|
|
289
|
+
// create 'fake' sortObject
|
|
290
|
+
const sortObject = {
|
|
291
|
+
column: this.sortBy,
|
|
292
|
+
sortMode: SortMode.A,
|
|
293
|
+
};
|
|
294
|
+
sortedRows = sortRows(sortedRows, [sortObject]);
|
|
295
|
+
}
|
|
296
|
+
return sortedRows;
|
|
297
|
+
}
|
|
298
|
+
checkScrollOnHover() {
|
|
299
|
+
if (!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)) {
|
|
300
|
+
if (this.scrollOnHover) {
|
|
301
|
+
this.kupManager.scrollOnHover.register(this.boxContainer);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
if (!this.scrollOnHover) {
|
|
306
|
+
this.kupManager.scrollOnHover.unregister(this.boxContainer);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
checkLayout() {
|
|
311
|
+
// check if there is a layout.
|
|
312
|
+
// if not, create a default layout
|
|
313
|
+
if (this.layout) {
|
|
314
|
+
this.boxLayout = this.layout;
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
// only one section, containing all visible fields
|
|
318
|
+
const section = {
|
|
319
|
+
horizontal: false,
|
|
320
|
+
sections: [],
|
|
321
|
+
};
|
|
322
|
+
// adding box objects to section
|
|
323
|
+
const visibleColumns = this.visibleColumns;
|
|
324
|
+
let size = visibleColumns.length;
|
|
325
|
+
let content = [];
|
|
326
|
+
let cnt = 0;
|
|
327
|
+
while (size-- > 0) {
|
|
328
|
+
content.push({
|
|
329
|
+
column: visibleColumns[cnt++].name,
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
section.content = content;
|
|
333
|
+
// creating a new layout
|
|
334
|
+
this.boxLayout = {
|
|
335
|
+
sections: [section],
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
onSortChange(e) {
|
|
339
|
+
let column = getColumnByName(this.visibleColumns, e.detail.value);
|
|
340
|
+
this.sortBy = column.name;
|
|
341
|
+
}
|
|
342
|
+
onGlobalFilterChange({ detail }) {
|
|
343
|
+
let value = '';
|
|
344
|
+
if (detail && detail.value) {
|
|
345
|
+
value = detail.value;
|
|
346
|
+
}
|
|
347
|
+
this.globalFilterValue = value;
|
|
348
|
+
}
|
|
349
|
+
isSectionExpanded(row, section) {
|
|
350
|
+
if (!row.id || !section.id) {
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
return (this.collapsedSection[section.id] &&
|
|
354
|
+
this.collapsedSection[section.id][row.id]);
|
|
355
|
+
}
|
|
356
|
+
handleAutomaticBoxSelection() {
|
|
357
|
+
if (this.selectBox &&
|
|
358
|
+
this.selectBox > 0 &&
|
|
359
|
+
this.selectBox <= this.data.rows.length) {
|
|
360
|
+
this.selectedRows = [];
|
|
361
|
+
for (let boxRow of this.data.rows) {
|
|
362
|
+
if (boxRow.id === (this.selectBox - 1).toString()) {
|
|
363
|
+
this.selectedRows.push(boxRow);
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
this.kupAutoBoxSelect.emit({
|
|
368
|
+
comp: this,
|
|
369
|
+
id: this.rootElement.id,
|
|
370
|
+
row: this.selectedRows[0],
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
getEventDetails(el, e) {
|
|
375
|
+
let boxObject = null;
|
|
376
|
+
let cell = null;
|
|
377
|
+
let row = null;
|
|
378
|
+
let column = null;
|
|
379
|
+
if (el) {
|
|
380
|
+
boxObject =
|
|
381
|
+
el.closest('.box-object') ||
|
|
382
|
+
el.querySelector('.box-object') ||
|
|
383
|
+
el.closest('.f-cell');
|
|
384
|
+
}
|
|
385
|
+
if (boxObject) {
|
|
386
|
+
if (boxObject.classList.contains('f-cell')) {
|
|
387
|
+
const props = boxObject['kup-get-cell-props']();
|
|
388
|
+
cell = props.cell;
|
|
389
|
+
column = props.column;
|
|
390
|
+
row = props.row;
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
cell = boxObject['data-cell'];
|
|
394
|
+
row = boxObject['data-row'];
|
|
395
|
+
column = getColumnByName(this.visibleColumns, boxObject.dataset.column);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return {
|
|
399
|
+
boxObject: boxObject ? boxObject : null,
|
|
400
|
+
column: column ? column : null,
|
|
401
|
+
cell: cell ? cell : null,
|
|
402
|
+
originalEvent: e,
|
|
403
|
+
row: row ? row : null,
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
contextMenuHandler(e) {
|
|
407
|
+
const details = this.getEventDetails(e.target, e);
|
|
408
|
+
return details;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Checks if the element is the svg that opens the "row actions menu"
|
|
412
|
+
* @param element the element to check
|
|
413
|
+
*/
|
|
414
|
+
checkIfElementIsActionMenuIcon(element) {
|
|
415
|
+
if (element.tagName && element.parentElement) {
|
|
416
|
+
return (element.tagName === 'svg' &&
|
|
417
|
+
element.parentElement.classList.contains('row-actions-toggler'));
|
|
418
|
+
}
|
|
419
|
+
return false;
|
|
420
|
+
}
|
|
421
|
+
// event listeners
|
|
422
|
+
onBoxClick({ target }, row) {
|
|
423
|
+
if (!(target instanceof H)) {
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
// searching parent
|
|
427
|
+
let element = target;
|
|
428
|
+
let classList = element.classList;
|
|
429
|
+
while (!classList.contains('box-object') &&
|
|
430
|
+
!classList.contains('box-section') &&
|
|
431
|
+
!classList.contains('box')) {
|
|
432
|
+
element = element.parentElement;
|
|
433
|
+
if (element === null) {
|
|
434
|
+
break;
|
|
435
|
+
}
|
|
436
|
+
classList = element.classList;
|
|
437
|
+
}
|
|
438
|
+
// evaluating column
|
|
439
|
+
let column = null;
|
|
440
|
+
if (classList.contains('box-object')) {
|
|
441
|
+
column = element.dataset.column;
|
|
442
|
+
}
|
|
443
|
+
this.kupBoxClick.emit({
|
|
444
|
+
comp: this,
|
|
445
|
+
id: this.rootElement.id,
|
|
446
|
+
row,
|
|
447
|
+
column,
|
|
448
|
+
});
|
|
449
|
+
// selecting box
|
|
450
|
+
if (this.multiSelection) {
|
|
451
|
+
// triggering multi selection
|
|
452
|
+
this.onSelectionCheckChange(row);
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
this.selectedRows = [row];
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
onSelectionCheckChange(row) {
|
|
459
|
+
var index = -1;
|
|
460
|
+
for (let i = 0; i < this.selectedRows.length; i++) {
|
|
461
|
+
const select = this.selectedRows[i];
|
|
462
|
+
if (select.id === row.id) {
|
|
463
|
+
index = i;
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
if (index >= 0) {
|
|
468
|
+
// remove row
|
|
469
|
+
this.selectedRows.splice(index, 1);
|
|
470
|
+
this.selectedRows = [...this.selectedRows];
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
// add row
|
|
474
|
+
this.selectedRows = [...this.selectedRows, row];
|
|
475
|
+
}
|
|
476
|
+
this.kupBoxSelected.emit({
|
|
477
|
+
comp: this,
|
|
478
|
+
id: this.rootElement.id,
|
|
479
|
+
rows: this.selectedRows,
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
toggleSectionExpand(row, section) {
|
|
483
|
+
// check if section / row has id
|
|
484
|
+
if (!section.id) {
|
|
485
|
+
// error
|
|
486
|
+
console.error('cannot expand / collapse a section withoun an ID');
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
if (!row.id) {
|
|
490
|
+
// error
|
|
491
|
+
console.error('cannot expand / collapse a section of a row without ad id');
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
// check if section already in collapsedSection
|
|
495
|
+
if (!this.collapsedSection[section.id]) {
|
|
496
|
+
// adding element and row, setting it to expanded
|
|
497
|
+
this.collapsedSection[section.id] = {};
|
|
498
|
+
this.collapsedSection[section.id][row.id] = true;
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
const s = this.collapsedSection[section.id];
|
|
502
|
+
if (!s[row.id]) {
|
|
503
|
+
s[row.id] = true;
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
s[row.id] = !s[row.id];
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
// triggering rendering
|
|
510
|
+
this.collapsedSection = Object.assign({}, this.collapsedSection);
|
|
511
|
+
}
|
|
512
|
+
onRowAction(row) {
|
|
513
|
+
if (!row) {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (row === this.rowActionMenuOpened) {
|
|
517
|
+
// closing menu
|
|
518
|
+
this.rowActionMenuOpened = null;
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
if (row.actions) {
|
|
522
|
+
// actions already loaded -> show menu
|
|
523
|
+
this.rowActionMenuOpened = row;
|
|
524
|
+
}
|
|
525
|
+
else {
|
|
526
|
+
// no actions -> triggering event
|
|
527
|
+
this.kupRowActionMenuClick.emit({
|
|
528
|
+
comp: this,
|
|
529
|
+
id: this.rootElement.id,
|
|
530
|
+
row,
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
onRowActionClick(row, action, index) {
|
|
535
|
+
this.kupRowActionClick.emit({
|
|
536
|
+
comp: this,
|
|
537
|
+
id: this.rootElement.id,
|
|
538
|
+
row,
|
|
539
|
+
action,
|
|
540
|
+
index,
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* see onDocumentClick in kup-combo
|
|
545
|
+
*/
|
|
546
|
+
clickFunction(event) {
|
|
547
|
+
try {
|
|
548
|
+
const targets = event.composedPath();
|
|
549
|
+
for (let target of targets) {
|
|
550
|
+
if (this.checkIfElementIsActionMenuIcon(target)) {
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
catch (err) {
|
|
556
|
+
if (this.checkIfElementIsActionMenuIcon(event.target)) {
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
this.rowActionMenuOpened = null;
|
|
561
|
+
}
|
|
562
|
+
handlePageChange(pageNumber) {
|
|
563
|
+
const newPage = pageChange(pageNumber, this.filteredRows.length, this.currentRowsPerPage);
|
|
564
|
+
if (newPage) {
|
|
565
|
+
this.currentPage = newPage;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
handleRowsPerPageChange(rowsNumber) {
|
|
569
|
+
const newRows = rowsPerPageChange(rowsNumber, this.filteredRows.length);
|
|
570
|
+
if (newRows) {
|
|
571
|
+
this.currentRowsPerPage = newRows;
|
|
572
|
+
this.adjustPaginator();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
adjustPaginator() {
|
|
576
|
+
const numberOfRows = this.rows.length;
|
|
577
|
+
// check if current page is valid
|
|
578
|
+
const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
|
|
579
|
+
if (this.currentPage > numberOfPages) {
|
|
580
|
+
// reset page
|
|
581
|
+
this.currentPage = 1;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
// render methods
|
|
585
|
+
renderSectionAsCard(row) {
|
|
586
|
+
let skipPush = false;
|
|
587
|
+
const cardData = {
|
|
588
|
+
button: [],
|
|
589
|
+
cell: [],
|
|
590
|
+
columns: [],
|
|
591
|
+
image: [],
|
|
592
|
+
progressbar: [],
|
|
593
|
+
text: [],
|
|
594
|
+
};
|
|
595
|
+
for (let index = 0; index < this.data.columns.length; index++) {
|
|
596
|
+
const column = this.data.columns[index];
|
|
597
|
+
if (column.visible !== false) {
|
|
598
|
+
cardData.cell.push(row.cells[column.name]);
|
|
599
|
+
cardData.columns.push(column);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
//First cycle sets specific binds between cardIDs and cells
|
|
603
|
+
for (const key in row.cells) {
|
|
604
|
+
if (row.cells.hasOwnProperty(key)) {
|
|
605
|
+
const cell = row.cells[key];
|
|
606
|
+
if (cell.cardID !== undefined && cell.obj) {
|
|
607
|
+
switch (cell.obj.p) {
|
|
608
|
+
case 'BTN':
|
|
609
|
+
do {
|
|
610
|
+
cardData.button.push({});
|
|
611
|
+
} while (cardData.button.length < cell.cardID);
|
|
612
|
+
cardData.button[cell.cardID] = {
|
|
613
|
+
label: cell.value,
|
|
614
|
+
};
|
|
615
|
+
break;
|
|
616
|
+
case 'IMG':
|
|
617
|
+
do {
|
|
618
|
+
cardData.image.push({});
|
|
619
|
+
} while (cardData.image.length < cell.cardID);
|
|
620
|
+
cardData.image[cell.cardID] = {
|
|
621
|
+
resource: cell.value,
|
|
622
|
+
};
|
|
623
|
+
break;
|
|
624
|
+
case 'PGB':
|
|
625
|
+
do {
|
|
626
|
+
cardData.progressbar.push({});
|
|
627
|
+
} while (cardData.progressbar.length < cell.cardID);
|
|
628
|
+
cardData.progressbar[cell.cardID] = {
|
|
629
|
+
value: cell.value,
|
|
630
|
+
};
|
|
631
|
+
break;
|
|
632
|
+
default:
|
|
633
|
+
do {
|
|
634
|
+
cardData.text.push('');
|
|
635
|
+
} while (cardData.text.length < cell.cardID);
|
|
636
|
+
cardData.text[cell.cardID] = cell.value;
|
|
637
|
+
break;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
//Second cycle sets leftover binds automatically
|
|
643
|
+
for (const key in row.cells) {
|
|
644
|
+
if (row.cells.hasOwnProperty(key)) {
|
|
645
|
+
const cell = row.cells[key];
|
|
646
|
+
if (cell.cardID === undefined && cell.obj) {
|
|
647
|
+
skipPush = false;
|
|
648
|
+
switch (cell.obj.p) {
|
|
649
|
+
case 'BTN':
|
|
650
|
+
for (let index = 0; index < cardData.button.length; index++) {
|
|
651
|
+
//If there are empty elements, the first one will be used
|
|
652
|
+
if (!Object.keys(cardData.button[index]).length) {
|
|
653
|
+
cardData.button[index] = {
|
|
654
|
+
label: cell.value,
|
|
655
|
+
};
|
|
656
|
+
skipPush = true;
|
|
657
|
+
break;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
//Otherwise a new element will be pushed
|
|
661
|
+
if (!skipPush) {
|
|
662
|
+
cardData.button.push({
|
|
663
|
+
label: cell.value,
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
break;
|
|
667
|
+
case 'IMG':
|
|
668
|
+
for (let index = 0; index < cardData.image.length; index++) {
|
|
669
|
+
//If there are empty elements, the first one will be used
|
|
670
|
+
if (!Object.keys(cardData.image[index]).length) {
|
|
671
|
+
cardData.image[index] = {
|
|
672
|
+
resource: cell.value,
|
|
673
|
+
};
|
|
674
|
+
skipPush = true;
|
|
675
|
+
break;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
//Otherwise a new element will be pushed
|
|
679
|
+
if (!skipPush) {
|
|
680
|
+
cardData.image.push({
|
|
681
|
+
resource: cell.value,
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
break;
|
|
685
|
+
case 'PGB':
|
|
686
|
+
for (let index = 0; index < cardData.progressbar.length; index++) {
|
|
687
|
+
//If there are empty elements, the first one will be used
|
|
688
|
+
if (!Object.keys(cardData.progressbar[index])
|
|
689
|
+
.length) {
|
|
690
|
+
cardData.progressbar[index] = {
|
|
691
|
+
value: cell.value,
|
|
692
|
+
};
|
|
693
|
+
skipPush = true;
|
|
694
|
+
break;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
//Otherwise a new element will be pushed
|
|
698
|
+
if (!skipPush) {
|
|
699
|
+
cardData.progressbar.push({
|
|
700
|
+
value: cell.value,
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
break;
|
|
704
|
+
default:
|
|
705
|
+
for (let index = 0; index < cardData.text.length; index++) {
|
|
706
|
+
//If there are empty elements, the first one will be used
|
|
707
|
+
if (cardData.text[index] === '') {
|
|
708
|
+
cardData.text[index] = cell.value;
|
|
709
|
+
skipPush = true;
|
|
710
|
+
break;
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
//Otherwise a new element will be pushed
|
|
714
|
+
if (!skipPush) {
|
|
715
|
+
cardData.text.push(cell.value);
|
|
716
|
+
}
|
|
717
|
+
break;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
return h("kup-card", Object.assign({ data: cardData }, this.cardData));
|
|
723
|
+
}
|
|
724
|
+
renderRow(row) {
|
|
725
|
+
const visibleColumns = [...this.visibleColumns];
|
|
726
|
+
let boxContent = null;
|
|
727
|
+
// if layout in row, use that one
|
|
728
|
+
let rowLayout = row.layout;
|
|
729
|
+
if (!rowLayout) {
|
|
730
|
+
// otherwise, use 'default' layout
|
|
731
|
+
rowLayout = this.boxLayout;
|
|
732
|
+
}
|
|
733
|
+
let horizontal = false;
|
|
734
|
+
if (rowLayout) {
|
|
735
|
+
if (rowLayout.horizontal) {
|
|
736
|
+
horizontal = true;
|
|
737
|
+
}
|
|
738
|
+
const sections = rowLayout.sections;
|
|
739
|
+
let size = sections.length;
|
|
740
|
+
let cnt = 0;
|
|
741
|
+
if (size > 0) {
|
|
742
|
+
boxContent = [];
|
|
743
|
+
}
|
|
744
|
+
// create fake parent section
|
|
745
|
+
const parent = {
|
|
746
|
+
horizontal: horizontal,
|
|
747
|
+
};
|
|
748
|
+
while (size-- > 0) {
|
|
749
|
+
if (this.cardData !== null &&
|
|
750
|
+
this.cardData !== undefined &&
|
|
751
|
+
typeof this.cardData === 'object') {
|
|
752
|
+
boxContent.push(this.renderSectionAsCard(row));
|
|
753
|
+
}
|
|
754
|
+
else {
|
|
755
|
+
boxContent.push(this.renderSection(sections[cnt++], parent, row, visibleColumns));
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
var isSelected = false;
|
|
760
|
+
for (let select of this.selectedRows) {
|
|
761
|
+
if (select.id === row.id) {
|
|
762
|
+
isSelected = true;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
let multiSel = null;
|
|
766
|
+
if (this.multiSelection) {
|
|
767
|
+
multiSel = (h("div", { class: "box-selection" }, h("kup-checkbox", { checked: isSelected })));
|
|
768
|
+
}
|
|
769
|
+
let rowObject = null;
|
|
770
|
+
if (this.enableRowActions && !this.swipeDisabled) {
|
|
771
|
+
const menuClass = {
|
|
772
|
+
'row-action-menu': true,
|
|
773
|
+
open: row === this.rowActionMenuOpened,
|
|
774
|
+
};
|
|
775
|
+
let rowActionMenuContent = null;
|
|
776
|
+
if (row.actions) {
|
|
777
|
+
const actionItems = row.actions.map((item, index) => {
|
|
778
|
+
const iconClass = `icon ${item.icon}`;
|
|
779
|
+
return (h("li", { tabindex: "0", onClick: () => this.onRowActionClick(row, item, index) }, h("div", { class: iconClass }), h("div", { class: "text" }, item.text)));
|
|
780
|
+
});
|
|
781
|
+
rowActionMenuContent = h("ul", null, actionItems);
|
|
782
|
+
}
|
|
783
|
+
rowObject = (h("div", { class: "row-actions-wrapper" }, h("div", { class: "row-actions-toggler" }, h("svg", { version: "1.1", width: "24", height: "24", viewBox: "0 0 24 24", onClick: () => this.onRowAction(row) }, h("path", { d: "M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z" })), h("div", { class: menuClass }, rowActionMenuContent))));
|
|
784
|
+
}
|
|
785
|
+
let badges = null;
|
|
786
|
+
if (row.badgeData && row.badgeData.length > 0) {
|
|
787
|
+
badges = row.badgeData.map((badge) => (h("kup-badge", { text: badge.text, class: badge['className']
|
|
788
|
+
? `centered ${badge['className']}`
|
|
789
|
+
: 'centered', imageData: badge.imageData })));
|
|
790
|
+
}
|
|
791
|
+
const boxClass = {
|
|
792
|
+
box: true,
|
|
793
|
+
draggable: this.dragEnabled,
|
|
794
|
+
selected: this.showSelection && isSelected,
|
|
795
|
+
column: !horizontal,
|
|
796
|
+
};
|
|
797
|
+
const rowStyle = row.style || {};
|
|
798
|
+
return (h("div", { class: "box-wrapper", style: rowStyle, ref: (el) => __classPrivateFieldGet(this, _KupBox_rowsRefs, "f").push(el) }, h("div", { class: boxClass, onClick: (e) => this.onBoxClick(e, row), ref: (el) => this.rowsRefs.push(el) }, multiSel, boxContent, badges), rowObject));
|
|
799
|
+
}
|
|
800
|
+
renderSection(section, parent, row, visibleColumns) {
|
|
801
|
+
let sectionContent = null;
|
|
802
|
+
if (section.sections && section.sections.length > 0) {
|
|
803
|
+
// rendering child
|
|
804
|
+
const sections = section.sections;
|
|
805
|
+
let size = sections.length;
|
|
806
|
+
let cnt = 0;
|
|
807
|
+
if (size > 0) {
|
|
808
|
+
sectionContent = [];
|
|
809
|
+
}
|
|
810
|
+
while (size-- > 0) {
|
|
811
|
+
sectionContent.push(this.renderSection(sections[cnt++], section, row, visibleColumns));
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
else if (section.content) {
|
|
815
|
+
// rendering box objects
|
|
816
|
+
const content = section.content;
|
|
817
|
+
let size = content.length;
|
|
818
|
+
let cnt = 0;
|
|
819
|
+
if (size > 0) {
|
|
820
|
+
sectionContent = [];
|
|
821
|
+
}
|
|
822
|
+
while (size-- > 0) {
|
|
823
|
+
sectionContent.push(this.renderBoxObject({
|
|
824
|
+
boxObject: content[cnt++],
|
|
825
|
+
row,
|
|
826
|
+
visibleColumns,
|
|
827
|
+
}, true));
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
else if (visibleColumns.length > 0) {
|
|
831
|
+
const column = visibleColumns[0];
|
|
832
|
+
sectionContent = this.renderBoxObject({
|
|
833
|
+
boxObject: { column: column.name },
|
|
834
|
+
row,
|
|
835
|
+
visibleColumns,
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
const sectionExpanded = this.isSectionExpanded(row, section);
|
|
839
|
+
const isGrid = !!section.columns;
|
|
840
|
+
const sectionClass = {
|
|
841
|
+
'box-section': true,
|
|
842
|
+
open: sectionExpanded,
|
|
843
|
+
column: !isGrid && !section.horizontal,
|
|
844
|
+
grid: isGrid,
|
|
845
|
+
titled: !!section.title,
|
|
846
|
+
'last-child': !section.sections || section.sections.length === 0,
|
|
847
|
+
};
|
|
848
|
+
const sectionStyle = section.style || {};
|
|
849
|
+
if (section.dim && parent) {
|
|
850
|
+
sectionStyle.flex = `0 0 ${section.dim}`;
|
|
851
|
+
sectionStyle.overflow = 'hidden';
|
|
852
|
+
if (parent.horizontal) {
|
|
853
|
+
sectionStyle.maxWidth = section.dim;
|
|
854
|
+
}
|
|
855
|
+
else {
|
|
856
|
+
sectionStyle.maxHeight = section.dim;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
if (isGrid) {
|
|
860
|
+
sectionStyle['grid-template-columns'] = `repeat(${section.columns}, 1fr)`;
|
|
861
|
+
}
|
|
862
|
+
let sectionContainer = null;
|
|
863
|
+
if (section.collapsible) {
|
|
864
|
+
sectionClass['collapse-section'] = true;
|
|
865
|
+
const contentClass = {
|
|
866
|
+
content: true,
|
|
867
|
+
};
|
|
868
|
+
// TODO I18N
|
|
869
|
+
let headerTitle = '';
|
|
870
|
+
if (section.title) {
|
|
871
|
+
headerTitle = section.title;
|
|
872
|
+
}
|
|
873
|
+
else if (sectionExpanded) {
|
|
874
|
+
headerTitle = this.kupManager.language.translate(KupLanguageGeneric.COLLAPSE);
|
|
875
|
+
}
|
|
876
|
+
else {
|
|
877
|
+
headerTitle = this.kupManager.language.translate(KupLanguageGeneric.EXPAND);
|
|
878
|
+
}
|
|
879
|
+
sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, h("div", { class: contentClass }, sectionContent), h("div", { class: "header", role: "button", onClick: (e) => {
|
|
880
|
+
e.stopPropagation();
|
|
881
|
+
this.toggleSectionExpand(row, section);
|
|
882
|
+
} }, h("div", { class: "header-content" }, h("span", null, headerTitle), h(FImage, { resource: `${KupThemeIconValues.DROPDOWN}`, sizeX: "1.25em", sizeY: "1.25em", wrapperClass: sectionExpanded ? 'toggled' : '' })))));
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
const title = section.title ? h("h3", null, section.title) : null;
|
|
886
|
+
sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, title, sectionContent));
|
|
887
|
+
}
|
|
888
|
+
return sectionContainer;
|
|
889
|
+
}
|
|
890
|
+
renderBoxObject({ boxObject, row, visibleColumns, }, fromSection) {
|
|
891
|
+
const classObj = {
|
|
892
|
+
'box-object': true,
|
|
893
|
+
};
|
|
894
|
+
const boStyle = {};
|
|
895
|
+
let column = null;
|
|
896
|
+
let index = -1;
|
|
897
|
+
for (let i = 0; i < visibleColumns.length; i++) {
|
|
898
|
+
const c = visibleColumns[i];
|
|
899
|
+
if (c.name === boxObject.column) {
|
|
900
|
+
index = i;
|
|
901
|
+
break;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
if (index >= 0) {
|
|
905
|
+
column = visibleColumns[index];
|
|
906
|
+
visibleColumns.splice(index, 1);
|
|
907
|
+
}
|
|
908
|
+
else if (fromSection) {
|
|
909
|
+
column = this.data.columns.find((x) => x.name === boxObject.column);
|
|
910
|
+
}
|
|
911
|
+
const cell = row.cells[boxObject.column];
|
|
912
|
+
let title = undefined;
|
|
913
|
+
if (cell && !this.kupManager.objects.isEmptyKupObj(cell.obj)) {
|
|
914
|
+
classObj['is-obj'] = true;
|
|
915
|
+
if (this.kupManager.debug.isDebug()) {
|
|
916
|
+
title =
|
|
917
|
+
cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
const cellProps = {
|
|
921
|
+
cell: cell,
|
|
922
|
+
column: column,
|
|
923
|
+
component: this,
|
|
924
|
+
editable: this.editableData,
|
|
925
|
+
renderKup: true,
|
|
926
|
+
row: row,
|
|
927
|
+
setSizes: true,
|
|
928
|
+
shape: boxObject.shape,
|
|
929
|
+
};
|
|
930
|
+
return (h("div", { "data-cell": cell, "data-row": row, "data-column": boxObject.column, class: classObj, style: boStyle, title: title }, cell && column ? (h(FCell, Object.assign({}, cellProps))) : (h("span", null, boxObject.value))));
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* Prepares the kanban sections by sorting the boxlist's data.
|
|
934
|
+
* @returns {{jsx: VNode[], style: { [index: string]: string }}} jsx contains the virtual nodes of the Kanban sections, style contains the grid CSS settings.
|
|
935
|
+
*/
|
|
936
|
+
kanbanMode() {
|
|
937
|
+
// Testing whether there are columns to group by
|
|
938
|
+
if (!this.kanban.columns || this.kanban.columns.length === 0) {
|
|
939
|
+
this.kupManager.debug.logMessage(this, 'No columns to group by detected.', KupDebugCategory.ERROR);
|
|
940
|
+
return {
|
|
941
|
+
jsx: (h("div", { id: "empty-data-message", class: "box-wrapper" }, h("div", { ref: (el) => this.rowsRefs.push(el) }), this.kupManager.language.translate(KupLanguageGeneric.EMPTY_DATA))),
|
|
942
|
+
style: { 'grid-template-columns': `repeat(1, 1fr)` },
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
const kanbanSections = [];
|
|
946
|
+
// Creating empty sections from prop-defined labels
|
|
947
|
+
if (this.kanban.labels) {
|
|
948
|
+
for (let index = 0; index < this.kanban.labels.length; index++) {
|
|
949
|
+
const key = this.kanban.labels[index];
|
|
950
|
+
kanbanSections.push({ labels: key, nodes: [] });
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
// Browsing all rows
|
|
954
|
+
for (let index = 0; index < this.rows.length; index++) {
|
|
955
|
+
let key = [];
|
|
956
|
+
// Creating the key for the current row
|
|
957
|
+
for (let j = 0; j < this.kanban.columns.length; j++) {
|
|
958
|
+
try {
|
|
959
|
+
key.push(this.rows[index].cells[this.kanban.columns[j]].value);
|
|
960
|
+
}
|
|
961
|
+
catch (error) {
|
|
962
|
+
this.kupManager.debug.logMessage(this, error, KupDebugCategory.WARNING);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
const check = {
|
|
966
|
+
found: false,
|
|
967
|
+
index: null,
|
|
968
|
+
};
|
|
969
|
+
// Browsing key array to search whether the current key exists or not
|
|
970
|
+
for (let j = 0; j < kanbanSections.length; j++) {
|
|
971
|
+
let sortingKey = kanbanSections[j].labels;
|
|
972
|
+
let found = true;
|
|
973
|
+
for (let i = 0; i < sortingKey.length; i++) {
|
|
974
|
+
if (key[i] !== sortingKey[i]) {
|
|
975
|
+
found = false;
|
|
976
|
+
break;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
if (found) {
|
|
980
|
+
check.found = true;
|
|
981
|
+
check.index = j;
|
|
982
|
+
break;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
// If current key exists, box will be pushed into the existing array of virtual nodes
|
|
986
|
+
if (check.found) {
|
|
987
|
+
kanbanSections[check.index].nodes.push(this.renderRow(this.rows[index]));
|
|
988
|
+
}
|
|
989
|
+
else {
|
|
990
|
+
// Otherwise, a new section will be defined starting with just the current virtal node
|
|
991
|
+
kanbanSections.push({
|
|
992
|
+
labels: key,
|
|
993
|
+
nodes: [this.renderRow(this.rows[index])],
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
// Once the arrays are set, they need to be emptied into columns
|
|
998
|
+
const kanbanJSX = [];
|
|
999
|
+
for (let index = 0; index < kanbanSections.length; index++) {
|
|
1000
|
+
const sortingKey = kanbanSections[index].labels;
|
|
1001
|
+
const props = {
|
|
1002
|
+
data: [],
|
|
1003
|
+
};
|
|
1004
|
+
for (let index = 0; index < sortingKey.length; index++) {
|
|
1005
|
+
props.data.push({
|
|
1006
|
+
value: sortingKey[index],
|
|
1007
|
+
id: sortingKey[index],
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
kanbanJSX.push(h("div", { class: "kanban-section" }, h(FChip, Object.assign({}, props)), kanbanSections[index].nodes));
|
|
1011
|
+
}
|
|
1012
|
+
return {
|
|
1013
|
+
jsx: kanbanJSX,
|
|
1014
|
+
style: {
|
|
1015
|
+
'grid-template-columns': this.kanban.isStacked
|
|
1016
|
+
? 'repeat(1fr)'
|
|
1017
|
+
: this.kanban.size
|
|
1018
|
+
? `repeat(${Object.keys(kanbanSections).length}, ${this.kanban.size})`
|
|
1019
|
+
: `repeat(${Object.keys(kanbanSections).length}, 1fr)`,
|
|
1020
|
+
},
|
|
1021
|
+
};
|
|
1022
|
+
}
|
|
1023
|
+
didLoadInteractables() {
|
|
1024
|
+
this.interactableTouch.push(this.boxContainer);
|
|
1025
|
+
const tapCb = (e) => {
|
|
1026
|
+
if (this.hold) {
|
|
1027
|
+
this.hold = false;
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
switch (e.button) {
|
|
1031
|
+
case 2:
|
|
1032
|
+
this.kupBoxContextMenu.emit({
|
|
1033
|
+
comp: this,
|
|
1034
|
+
id: this.rootElement.id,
|
|
1035
|
+
details: this.contextMenuHandler(e),
|
|
1036
|
+
});
|
|
1037
|
+
break;
|
|
1038
|
+
}
|
|
1039
|
+
};
|
|
1040
|
+
const holdCb = (e) => {
|
|
1041
|
+
if (e.pointerType === 'pen' || e.pointerType === 'touch') {
|
|
1042
|
+
this.hold = true;
|
|
1043
|
+
this.kupBoxContextMenu.emit({
|
|
1044
|
+
comp: this,
|
|
1045
|
+
id: this.rootElement.id,
|
|
1046
|
+
details: this.contextMenuHandler(e),
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
};
|
|
1050
|
+
this.kupManager.interact.on(this.boxContainer, KupPointerEventTypes.TAP, tapCb);
|
|
1051
|
+
this.kupManager.interact.on(this.boxContainer, KupPointerEventTypes.HOLD, holdCb);
|
|
1052
|
+
}
|
|
1053
|
+
didRenderInteractables() {
|
|
1054
|
+
if (this.dragEnabled) {
|
|
1055
|
+
for (let index = 0; index < this.rowsRefs.length; index++) {
|
|
1056
|
+
const row = this.rowsRefs[index];
|
|
1057
|
+
const dataCb = () => {
|
|
1058
|
+
const cellEl = this.rootElement.shadowRoot.querySelector('.box-object:hover');
|
|
1059
|
+
return {
|
|
1060
|
+
cell: cellEl['data-cell'],
|
|
1061
|
+
column: getColumnByName(this.visibleColumns, cellEl.dataset.column),
|
|
1062
|
+
id: this.rootElement.id,
|
|
1063
|
+
multiple: this.multiSelection,
|
|
1064
|
+
row: cellEl['data-row'],
|
|
1065
|
+
selectedRows: this.selectedRows,
|
|
1066
|
+
};
|
|
1067
|
+
};
|
|
1068
|
+
if (row && !this.interactableDrag.includes(row)) {
|
|
1069
|
+
this.interactableDrag.push(row);
|
|
1070
|
+
this.kupManager.interact.draggable(row, {
|
|
1071
|
+
allowFrom: '.box-object',
|
|
1072
|
+
cursorChecker() {
|
|
1073
|
+
return null;
|
|
1074
|
+
},
|
|
1075
|
+
}, {
|
|
1076
|
+
callback: dataCb,
|
|
1077
|
+
}, KupDragEffect.BADGE);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
if (this.dropEnabled) {
|
|
1082
|
+
const dataCb = () => {
|
|
1083
|
+
const receivingDetails = this.getEventDetails(this.rootElement.shadowRoot.querySelector('.box:hover'));
|
|
1084
|
+
return {
|
|
1085
|
+
cell: receivingDetails.cell,
|
|
1086
|
+
column: receivingDetails.column,
|
|
1087
|
+
id: this.rootElement.id,
|
|
1088
|
+
row: receivingDetails.row,
|
|
1089
|
+
};
|
|
1090
|
+
};
|
|
1091
|
+
if (!this.interactableDrop.includes(this.sectionRef)) {
|
|
1092
|
+
this.interactableDrop.push(this.sectionRef);
|
|
1093
|
+
this.kupManager.interact.dropzone(this.sectionRef, {
|
|
1094
|
+
accept: `[${kupDraggableCellAttr}]`,
|
|
1095
|
+
}, {
|
|
1096
|
+
dispatcher: this.rootElement,
|
|
1097
|
+
type: KupDropEventTypes.BOX,
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
for (let index = 0; index < this.rowsRefs.length; index++) {
|
|
1101
|
+
const row = this.rowsRefs[index];
|
|
1102
|
+
if (row && !this.interactableDrop.includes(row)) {
|
|
1103
|
+
this.interactableDrop.push(row);
|
|
1104
|
+
this.kupManager.interact.dropzone(row, {
|
|
1105
|
+
accept: `[${kupDraggableCellAttr}]`,
|
|
1106
|
+
}, {
|
|
1107
|
+
callback: dataCb,
|
|
1108
|
+
dispatcher: this.rootElement,
|
|
1109
|
+
type: KupDropEventTypes.BOX,
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
/*-------------------------------------------------*/
|
|
1116
|
+
/* L i f e c y c l e H o o k s */
|
|
1117
|
+
/*-------------------------------------------------*/
|
|
1118
|
+
componentWillLoad() {
|
|
1119
|
+
this.kupManager.debug.logLoad(this, false);
|
|
1120
|
+
if (this.rowsPerPage) {
|
|
1121
|
+
this.currentRowsPerPage = this.rowsPerPage;
|
|
1122
|
+
}
|
|
1123
|
+
if (this.data &&
|
|
1124
|
+
this.data.rows &&
|
|
1125
|
+
this.currentRowsPerPage > this.data.rows.length) {
|
|
1126
|
+
this.currentRowsPerPage = this.data.rows.length;
|
|
1127
|
+
}
|
|
1128
|
+
this.kupManager.language.register(this);
|
|
1129
|
+
this.kupManager.theme.register(this);
|
|
1130
|
+
this.onDataChanged();
|
|
1131
|
+
this.adjustPaginator();
|
|
1132
|
+
if (document.querySelector('.header')) {
|
|
1133
|
+
__classPrivateFieldSet(this, _KupBox_navBarHeight, document.querySelector('.header').clientHeight, "f");
|
|
1134
|
+
}
|
|
1135
|
+
else {
|
|
1136
|
+
__classPrivateFieldSet(this, _KupBox_navBarHeight, 0, "f");
|
|
1137
|
+
}
|
|
1138
|
+
if (document.querySelector('.topbar')) {
|
|
1139
|
+
__classPrivateFieldSet(this, _KupBox_navBarHeight, __classPrivateFieldGet(this, _KupBox_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
|
|
1140
|
+
}
|
|
1141
|
+
__classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_setObserver).call(this);
|
|
1142
|
+
}
|
|
1143
|
+
componentDidLoad() {
|
|
1144
|
+
this.handleAutomaticBoxSelection();
|
|
1145
|
+
// When component is created, then the listener is set. @See clickFunction for more details
|
|
1146
|
+
document.addEventListener('click', this.clickFunction.bind(this));
|
|
1147
|
+
this.currentPage = this.pageSelected;
|
|
1148
|
+
if (this.multiSelection && this.selectedRowsState) {
|
|
1149
|
+
this.selectedRows = [];
|
|
1150
|
+
let selectedIds = this.selectedRowsState.split(';');
|
|
1151
|
+
this.selectedRows = this.data.rows.filter((r) => {
|
|
1152
|
+
return selectedIds.indexOf(r.id) >= 0;
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1155
|
+
this.didLoadInteractables();
|
|
1156
|
+
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
1157
|
+
this.kupManager.debug.logLoad(this, true);
|
|
1158
|
+
}
|
|
1159
|
+
componentWillRender() {
|
|
1160
|
+
this.kupManager.debug.logRender(this, false);
|
|
1161
|
+
}
|
|
1162
|
+
componentDidRender() {
|
|
1163
|
+
const root = this.rootElement.shadowRoot;
|
|
1164
|
+
if (root) {
|
|
1165
|
+
const fs = root.querySelectorAll('.f-text-field');
|
|
1166
|
+
for (let index = 0; index < fs.length; index++) {
|
|
1167
|
+
FTextFieldMDC(fs[index]);
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
this.checkScrollOnHover();
|
|
1171
|
+
this.persistState();
|
|
1172
|
+
this.didRenderInteractables();
|
|
1173
|
+
__classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_didRenderObservers).call(this);
|
|
1174
|
+
this.kupManager.debug.logRender(this, true);
|
|
1175
|
+
}
|
|
1176
|
+
render() {
|
|
1177
|
+
const isKanban = !!(typeof this.kanban === 'object' && this.kanban !== null);
|
|
1178
|
+
let sortPanel = null;
|
|
1179
|
+
if (this.sortEnabled) {
|
|
1180
|
+
// creating items
|
|
1181
|
+
const visibleColumnsItems = this.visibleColumns.map((column) => {
|
|
1182
|
+
const item = {
|
|
1183
|
+
value: column.title,
|
|
1184
|
+
id: column.name,
|
|
1185
|
+
selected: column.name === this.sortBy,
|
|
1186
|
+
};
|
|
1187
|
+
return item;
|
|
1188
|
+
});
|
|
1189
|
+
const items = [{ value: '', id: '' }, ...visibleColumnsItems];
|
|
1190
|
+
let textfieldData = {
|
|
1191
|
+
label: this.kupManager.language.translate(KupLanguageGeneric.SORT_BY),
|
|
1192
|
+
trailingIcon: true,
|
|
1193
|
+
};
|
|
1194
|
+
let listData = {
|
|
1195
|
+
data: items,
|
|
1196
|
+
selectable: true,
|
|
1197
|
+
};
|
|
1198
|
+
let data = {
|
|
1199
|
+
'kup-text-field': textfieldData,
|
|
1200
|
+
'kup-list': listData,
|
|
1201
|
+
};
|
|
1202
|
+
sortPanel = (h("div", { id: "sort-panel" }, h("kup-combobox", { data: data, initialValue: this.sortBy, "onkup-combobox-itemclick": (e) => this.onSortChange(e) })));
|
|
1203
|
+
}
|
|
1204
|
+
let filterPanel = null;
|
|
1205
|
+
if (this.globalFilter) {
|
|
1206
|
+
filterPanel = (h("div", { id: "global-filter" }, h("kup-text-field", { fullWidth: true, label: this.kupManager.language.translate(KupLanguageSearch.SEARCH), icon: KupThemeIconValues.SEARCH, initialValue: this.globalFilterValue, "onkup-textfield-input": (event) => {
|
|
1207
|
+
window.clearTimeout(this.globalFilterTimeout);
|
|
1208
|
+
this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
|
|
1209
|
+
} })));
|
|
1210
|
+
}
|
|
1211
|
+
let paginator = null;
|
|
1212
|
+
if (this.pagination) {
|
|
1213
|
+
paginator = (h(FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: this.filteredRows.length, mode: FPaginatorMode.SIMPLE, perPage: this.currentRowsPerPage
|
|
1214
|
+
? this.currentRowsPerPage
|
|
1215
|
+
: this.rowsPerPage, onPageChange: (e) => this.handlePageChange(e.detail.value), onRowsChange: (e) => this.handleRowsPerPageChange(e.detail.value) }));
|
|
1216
|
+
}
|
|
1217
|
+
let boxContent = null;
|
|
1218
|
+
let containerStyle = {};
|
|
1219
|
+
if (this.rows.length === 0) {
|
|
1220
|
+
boxContent = (h("div", { id: "empty-data-message", class: "box-wrapper" }, h("div", { class: "box", ref: (el) => this.rowsRefs.push(el) }, this.kupManager.language.translate(KupLanguageGeneric.EMPTY_DATA))));
|
|
1221
|
+
containerStyle = { 'grid-template-columns': `repeat(1, 1fr)` };
|
|
1222
|
+
}
|
|
1223
|
+
else if (isKanban) {
|
|
1224
|
+
const kanban = this.kanbanMode();
|
|
1225
|
+
boxContent = kanban.jsx;
|
|
1226
|
+
containerStyle = kanban.style;
|
|
1227
|
+
}
|
|
1228
|
+
else {
|
|
1229
|
+
containerStyle = {
|
|
1230
|
+
'grid-template-columns': `repeat(${this.columns}, 1fr)`,
|
|
1231
|
+
};
|
|
1232
|
+
const rows = this.rows;
|
|
1233
|
+
let size = rows.length;
|
|
1234
|
+
let cnt = 0;
|
|
1235
|
+
boxContent = [];
|
|
1236
|
+
while (size-- > 0) {
|
|
1237
|
+
boxContent.push(this.renderRow(rows[cnt++]));
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
return (h(Host, null, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h("div", { class: 'box-component', ref: (el) => (this.sectionRef = el) }, sortPanel, filterPanel, paginator, h("div", { class: isKanban ? 'is-kanban' : '', id: 'box-container', style: containerStyle, onContextMenu: (e) => {
|
|
1241
|
+
e.preventDefault();
|
|
1242
|
+
}, ref: (el) => (this.boxContainer =
|
|
1243
|
+
el) }, boxContent)))));
|
|
1244
|
+
}
|
|
1245
|
+
disconnectedCallback() {
|
|
1246
|
+
this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop));
|
|
1247
|
+
this.kupManager.language.unregister(this);
|
|
1248
|
+
this.kupManager.theme.unregister(this);
|
|
1249
|
+
if (this.scrollOnHover) {
|
|
1250
|
+
this.kupManager.scrollOnHover.unregister(this.boxContainer);
|
|
1251
|
+
}
|
|
1252
|
+
// When component is destroyed, then the listener is removed. @See clickFunction for more details
|
|
1253
|
+
document.removeEventListener('click', this.clickFunction.bind(this));
|
|
1254
|
+
this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
|
|
1255
|
+
}
|
|
1256
|
+
get rootElement() { return getElement(this); }
|
|
1257
|
+
static get watchers() { return {
|
|
1258
|
+
"rowsPerPage": ["rowsPerPageHandler", "recalculateRows"],
|
|
1259
|
+
"globalFilterValue": ["recalculateRows"],
|
|
1260
|
+
"sortBy": ["recalculateRows"],
|
|
1261
|
+
"pagination": ["recalculateRows"],
|
|
1262
|
+
"currentPage": ["recalculateRows"],
|
|
1263
|
+
"currentRowsPerPage": ["recalculateRows"],
|
|
1264
|
+
"data": ["onDataChanged"],
|
|
1265
|
+
"layout": ["onLayoutChanged"],
|
|
1266
|
+
"selectBox": ["onSelectBoxChanged"]
|
|
1267
|
+
}; }
|
|
1268
|
+
};
|
|
1269
|
+
_KupBox_intObserver = new WeakMap(), _KupBox_rowsRefs = new WeakMap(), _KupBox_navBarHeight = new WeakMap(), _KupBox_instances = new WeakSet(), _KupBox_didRenderObservers = function _KupBox_didRenderObservers() {
|
|
1270
|
+
if (this.lazyLoadRows &&
|
|
1271
|
+
this.currentRowsPerPage < this.data.rows.length) {
|
|
1272
|
+
__classPrivateFieldGet(this, _KupBox_intObserver, "f").observe(__classPrivateFieldGet(this, _KupBox_rowsRefs, "f")[__classPrivateFieldGet(this, _KupBox_rowsRefs, "f").length - 1]);
|
|
1273
|
+
}
|
|
1274
|
+
}, _KupBox_setObserver = function _KupBox_setObserver() {
|
|
1275
|
+
const callback = (entries) => {
|
|
1276
|
+
entries.forEach((entry) => {
|
|
1277
|
+
if (entry.isIntersecting) {
|
|
1278
|
+
this.kupManager.debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
|
|
1279
|
+
const delta = this.data.rows.length - this.currentRowsPerPage;
|
|
1280
|
+
if (delta < 10) {
|
|
1281
|
+
this.currentRowsPerPage += delta;
|
|
1282
|
+
}
|
|
1283
|
+
else {
|
|
1284
|
+
this.currentRowsPerPage += 10;
|
|
1285
|
+
}
|
|
1286
|
+
entry.target.classList.remove('last-row');
|
|
1287
|
+
__classPrivateFieldGet(this, _KupBox_intObserver, "f").unobserve(entry.target);
|
|
1288
|
+
}
|
|
1289
|
+
});
|
|
1290
|
+
};
|
|
1291
|
+
const options = {
|
|
1292
|
+
threshold: 0,
|
|
1293
|
+
rootMargin: '-' + __classPrivateFieldGet(this, _KupBox_navBarHeight, "f") + 'px 0px 0px 0px',
|
|
1294
|
+
};
|
|
1295
|
+
__classPrivateFieldSet(this, _KupBox_intObserver, new IntersectionObserver(callback, options), "f");
|
|
1296
|
+
};
|
|
1240
1297
|
KupBox.style = kupBoxCss;
|
|
1241
1298
|
|
|
1242
1299
|
export { KupBox as kup_box };
|