@sme.up/ketchup 11.0.0-SNAPSHOT-20250204102909 → 11.0.0-SNAPSHOT-20250204113836
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-cell-f0ab65b9.js → f-cell-bc053135.js} +6 -4
- package/dist/cjs/{f-chip-35f8c5a9.js → f-chip-a913f6db.js} +1 -1
- package/dist/cjs/{f-object-field-5fc4341f.js → f-object-field-eabecff2.js} +2 -2
- package/dist/cjs/{f-paginator-utils-0c423047.js → f-paginator-utils-de023500.js} +1 -1
- package/dist/cjs/{f-text-field-cb62a970.js → f-text-field-8a765845.js} +1 -1
- package/dist/cjs/index-e8aa3c73.js +2 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
- package/dist/cjs/{kup-autocomplete_28.cjs.entry.js → kup-autocomplete_29.cjs.entry.js} +1071 -876
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +12 -7
- package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +7 -7
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-675f75cd.js → kup-data-table-helper-1da4e593.js} +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
- package/dist/cjs/kup-gantt_10.cjs.entry.js +23 -23
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-htm.cjs.entry.js +2 -2
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- package/dist/cjs/kup-input-panel.cjs.entry.js +7 -7
- package/dist/cjs/kup-lazy.cjs.entry.js +12 -12
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-80148a95.js → kup-manager-3b86b8d0.js} +25 -2
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-object-field.cjs.entry.js +4 -4
- package/dist/cjs/kup-pdf.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner-renderer.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +3 -3
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +2 -2
- package/dist/cjs/kup-txt.cjs.entry.js +2 -2
- package/dist/cjs/kup-typography-list.cjs.entry.js +2 -2
- package/dist/cjs/kup-typography.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/kup-cell/kup-cell.js +27 -2
- package/dist/collection/components/kup-data-table/kup-data-table.js +23 -10
- package/dist/collection/components/kup-file-upload/kup-file-upload-declarations.js +5 -0
- package/dist/collection/components/kup-file-upload/kup-file-upload.css +203 -0
- package/dist/collection/components/kup-file-upload/kup-file-upload.js +423 -0
- package/dist/collection/components/kup-form/kup-form.js +2 -2
- package/dist/collection/components/kup-htm/kup-htm.js +1 -1
- package/dist/collection/components/kup-image-list/kup-image-list.js +3 -3
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +2 -2
- package/dist/collection/components/kup-lazy/kup-lazy.js +11 -11
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +1 -1
- package/dist/collection/components/kup-object-field/kup-object-field.js +1 -1
- package/dist/collection/components/kup-pdf/kup-pdf.js +1 -1
- package/dist/collection/components/kup-planner/kup-planner.js +1 -1
- package/dist/collection/components/kup-planner/utils/custom-task-list-header.js +2 -2
- package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +2 -2
- package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +2 -2
- package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +3 -3
- package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +5 -5
- package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +2 -2
- package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +2 -2
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
- package/dist/collection/components/kup-probe/kup-probe.js +1 -1
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
- package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
- package/dist/collection/components/kup-rating/kup-rating.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
- package/dist/collection/components/kup-spinner/kup-spinner.js +34 -34
- package/dist/collection/components/kup-switch/kup-switch.js +1 -1
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
- package/dist/collection/components/kup-txt/kup-txt.js +1 -1
- package/dist/collection/components/kup-typography/kup-typography.js +1 -1
- package/dist/collection/components/kup-typography-list/kup-typography-list.js +1 -1
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +3 -0
- package/dist/collection/f-components/f-cell/f-cell.js +2 -0
- package/dist/collection/managers/kup-data/kup-data.js +2 -0
- package/dist/collection/managers/kup-language/kup-language-declarations.js +9 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +2 -0
- package/dist/collection/types/GenericTypes.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +21 -16
- package/dist/components/kup-activity-timeline.js +21 -16
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +21 -16
- package/dist/components/kup-card-list.js +22 -17
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +28 -18
- 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-custom-task-list-header.js +1 -1
- package/dist/components/kup-dashboard.js +21 -16
- 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 +21 -16
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +23 -18
- package/dist/components/kup-file-upload.d.ts +11 -0
- package/dist/components/kup-file-upload.js +6 -0
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gantt-calendar.js +1 -1
- package/dist/components/kup-gantt.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid-renderer.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-horizontal-scroll.js +1 -1
- package/dist/components/kup-htm.js +22 -17
- package/dist/components/kup-iframe.js +21 -16
- package/dist/components/kup-image-list.js +24 -19
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +25 -20
- package/dist/components/kup-lazy.js +32 -27
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +28 -23
- package/dist/components/kup-nav-bar.js +22 -17
- package/dist/components/kup-numeric-picker.js +22 -17
- package/dist/components/kup-object-field.js +22 -17
- package/dist/components/kup-pdf.js +22 -17
- package/dist/components/kup-planner-renderer.js +1 -1
- package/dist/components/kup-planner.js +39 -34
- package/dist/components/kup-probe.js +22 -17
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +22 -17
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +22 -17
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-standard-tooltip.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-switcher.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-task-gantt.js +1 -1
- package/dist/components/kup-task-list-header.js +1 -1
- package/dist/components/kup-task-list-table.js +1 -1
- package/dist/components/kup-task-list.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-toolbar.js +1 -1
- package/dist/components/kup-tooltip.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +22 -17
- package/dist/components/kup-typography-list.js +22 -17
- package/dist/components/kup-typography.js +22 -17
- package/dist/components/kup-vertical-scroll.js +1 -1
- package/dist/components/{p-a37e6312.js → p-00fe03b5.js} +7 -7
- package/dist/components/{p-d9d60a18.js → p-010ce0fe.js} +13 -13
- package/dist/components/{p-b57801f3.js → p-22538c02.js} +15 -15
- package/dist/components/{p-63ddd73a.js → p-2865ea51.js} +4 -4
- package/dist/components/{p-fb9ca494.js → p-443b5e15.js} +1 -1
- package/dist/components/{p-f3104d30.js → p-5b63178f.js} +21 -16
- package/dist/components/{p-74dce0e5.js → p-6924a70f.js} +2 -2
- package/dist/components/{p-23d7e632.js → p-7646ccdd.js} +2 -2
- package/dist/components/{p-5fa3e60f.js → p-8204c90e.js} +1 -1
- package/dist/components/{p-00a46ffd.js → p-8f77f6d8.js} +21 -16
- package/dist/components/{p-3aff545d.js → p-98aafbf3.js} +26 -3
- package/dist/components/{p-3bde4660.js → p-9e0b916d.js} +1 -1
- package/dist/components/{p-d7931d3a.js → p-a0a94cd3.js} +21 -16
- package/dist/components/{p-000af163.js → p-c528b477.js} +5 -5
- package/dist/components/{p-1f13e420.js → p-cb58e44a.js} +1 -1
- package/dist/components/{p-52d321c0.js → p-d339381c.js} +21 -16
- package/dist/components/{p-15078d74.js → p-dd07188b.js} +1089 -589
- package/dist/components/{p-cd2db6f6.js → p-e4277d58.js} +3 -3
- package/dist/components/{p-20771aa1.js → p-ec1762ee.js} +2 -2
- package/dist/components/{p-0d3f38e3.js → p-fd8fe6d0.js} +2 -2
- package/dist/esm/{f-cell-fa00b8ef.js → f-cell-2b1c1919.js} +6 -4
- package/dist/esm/{f-chip-05355daa.js → f-chip-b42af349.js} +1 -1
- package/dist/esm/{f-object-field-c9d54642.js → f-object-field-2bfc470c.js} +2 -2
- package/dist/esm/{f-paginator-utils-bf93d7d4.js → f-paginator-utils-541bc197.js} +1 -1
- package/dist/esm/{f-text-field-b75996bd.js → f-text-field-04f701fb.js} +1 -1
- package/dist/esm/index-c9246a86.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +1 -1
- package/dist/esm/kup-activity-timeline.entry.js +2 -2
- package/dist/esm/{kup-autocomplete_28.entry.js → kup-autocomplete_29.entry.js} +1071 -877
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +2 -2
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +12 -7
- package/dist/esm/kup-custom-task-list-header_4.entry.js +7 -7
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-e3846302.js → kup-data-table-helper-0dbc3495.js} +1 -1
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +1 -1
- package/dist/esm/kup-gantt_10.entry.js +23 -23
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-htm.entry.js +2 -2
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-input-panel.entry.js +7 -7
- package/dist/esm/kup-lazy.entry.js +12 -12
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-2d8f4f18.js → kup-manager-89189705.js} +26 -3
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-object-field.entry.js +4 -4
- package/dist/esm/kup-pdf.entry.js +2 -2
- package/dist/esm/kup-planner-renderer.entry.js +2 -2
- package/dist/esm/kup-planner.entry.js +3 -3
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +2 -2
- package/dist/esm/kup-txt.entry.js +2 -2
- package/dist/esm/kup-typography-list.entry.js +2 -2
- package/dist/esm/kup-typography.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-36d3870e.entry.js → p-069fe9e1.entry.js} +1 -1
- package/dist/ketchup/p-0dd57f34.js +1 -0
- package/dist/ketchup/{p-72e25927.entry.js → p-0e644cb7.entry.js} +1 -1
- package/dist/ketchup/{p-6b76cc4c.entry.js → p-0ea4179b.entry.js} +1 -1
- package/dist/ketchup/{p-fe9db498.js → p-15491541.js} +1 -1
- package/dist/ketchup/{p-04915720.js → p-285c28ae.js} +1 -1
- package/dist/ketchup/{p-cbe1e4a5.entry.js → p-2e789d5f.entry.js} +1 -1
- package/dist/ketchup/{p-960b5246.entry.js → p-43159582.entry.js} +1 -1
- package/dist/ketchup/{p-b0f1b21d.entry.js → p-47545e56.entry.js} +1 -1
- package/dist/ketchup/{p-4d899ee9.entry.js → p-4b1eb87d.entry.js} +1 -1
- package/dist/ketchup/{p-31304076.entry.js → p-4ceb2da3.entry.js} +1 -1
- package/dist/ketchup/{p-b75e663b.entry.js → p-54a54f0d.entry.js} +1 -1
- package/dist/ketchup/{p-4da163e9.entry.js → p-595f3fd8.entry.js} +1 -1
- package/dist/ketchup/{p-85cbe3fc.entry.js → p-5a015f10.entry.js} +1 -1
- package/dist/ketchup/{p-b9dd4ebe.entry.js → p-5a345165.entry.js} +1 -1
- package/dist/ketchup/{p-b2cb221e.js → p-5d7a9987.js} +1 -1
- package/dist/ketchup/{p-ed90bf43.entry.js → p-6b11fc72.entry.js} +1 -1
- package/dist/ketchup/{p-a74fe69d.entry.js → p-6b771a9b.entry.js} +1 -1
- package/dist/ketchup/{p-bb757c4b.entry.js → p-7819480d.entry.js} +1 -1
- package/dist/ketchup/p-86f75374.entry.js +1 -0
- package/dist/ketchup/{p-66ccba95.entry.js → p-8afe1504.entry.js} +1 -1
- package/dist/ketchup/{p-ab8b13ac.entry.js → p-8bc2f0b6.entry.js} +1 -1
- package/dist/ketchup/p-98797821.entry.js +1 -0
- package/dist/ketchup/{p-a7123dc1.entry.js → p-9f51f081.entry.js} +1 -1
- package/dist/ketchup/p-a00e1a17.entry.js +9 -0
- package/dist/ketchup/{p-b84093fc.entry.js → p-a50b3050.entry.js} +1 -1
- package/dist/ketchup/{p-a8a3291d.entry.js → p-af7c5f4d.entry.js} +2 -2
- package/dist/ketchup/{p-317b3e3a.entry.js → p-b59ba2e0.entry.js} +1 -1
- package/dist/ketchup/{p-1d9a31fc.entry.js → p-c1b293a7.entry.js} +1 -1
- package/dist/ketchup/{p-bfe12bd6.entry.js → p-ccb2296a.entry.js} +1 -1
- package/dist/ketchup/{p-cb88c213.entry.js → p-d1389486.entry.js} +1 -1
- package/dist/ketchup/{p-72c85164.entry.js → p-d47f322d.entry.js} +1 -1
- package/dist/ketchup/{p-479ef0dc.entry.js → p-dd65ab87.entry.js} +2 -2
- package/dist/ketchup/{p-714609da.entry.js → p-e1683cf1.entry.js} +1 -1
- package/dist/ketchup/p-e202be52.js +1 -0
- package/dist/ketchup/p-e527cae5.entry.js +1 -0
- package/dist/ketchup/{p-bdfde4e7.entry.js → p-f0c7071a.entry.js} +1 -1
- package/dist/ketchup/p-f51f2af6.js +21 -0
- package/dist/ketchup/{p-162a169f.entry.js → p-f5e50e78.entry.js} +1 -1
- package/dist/ketchup/p-fc645b13.js +1 -0
- package/dist/types/components/kup-cell/kup-cell.d.ts +3 -0
- package/dist/types/components/kup-file-upload/kup-file-upload-declarations.d.ts +8 -0
- package/dist/types/components/kup-file-upload/kup-file-upload.d.ts +62 -0
- package/dist/types/components.d.ts +85 -0
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +2 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +10 -2
- package/dist/types/types/GenericTypes.d.ts +2 -1
- package/package.json +1 -1
- package/dist/ketchup/p-0f25c7c6.js +0 -21
- package/dist/ketchup/p-3d927559.entry.js +0 -1
- package/dist/ketchup/p-51d6eb71.js +0 -1
- package/dist/ketchup/p-64e7493c.js +0 -1
- package/dist/ketchup/p-7fff3f5f.entry.js +0 -1
- package/dist/ketchup/p-c7caa9ab.entry.js +0 -1
- package/dist/ketchup/p-d27a5f1f.js +0 -1
- package/dist/ketchup/p-de8b7f56.entry.js +0 -9
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-e8aa3c73.js');
|
|
6
|
-
const kupManager$1 = require('./kup-manager-
|
|
7
|
-
const fTextField = require('./f-text-field-
|
|
6
|
+
const kupManager$1 = require('./kup-manager-3b86b8d0.js');
|
|
7
|
+
const fTextField = require('./f-text-field-8a765845.js');
|
|
8
8
|
const fTextFieldMdc = require('./f-text-field-mdc-29aae9c9.js');
|
|
9
9
|
const GenericVariables = require('./GenericVariables-1d52ba57.js');
|
|
10
10
|
const fImage = require('./f-image-d22b012f.js');
|
|
11
11
|
const fButton = require('./f-button-c3ae141e.js');
|
|
12
12
|
const fButtonDeclarations = require('./f-button-declarations-76ef9f87.js');
|
|
13
|
-
const fCell = require('./f-cell-
|
|
13
|
+
const fCell = require('./f-cell-bc053135.js');
|
|
14
14
|
const kupDates = require('./kup-dates-bc4cf9d0.js');
|
|
15
|
-
const fChip = require('./f-chip-
|
|
15
|
+
const fChip = require('./f-chip-a913f6db.js');
|
|
16
16
|
const component = require('./component-a6dd6c14.js');
|
|
17
17
|
const fCheckbox = require('./f-checkbox-59fb7aa5.js');
|
|
18
|
-
const kupDataTableHelper = require('./kup-data-table-helper-
|
|
19
|
-
const fPaginatorUtils = require('./f-paginator-utils-
|
|
20
|
-
require('./f-object-field-
|
|
18
|
+
const kupDataTableHelper = require('./kup-data-table-helper-1da4e593.js');
|
|
19
|
+
const fPaginatorUtils = require('./f-paginator-utils-de023500.js');
|
|
20
|
+
require('./f-object-field-eabecff2.js');
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Props of the kup-autocomplete component.
|
|
@@ -174,7 +174,7 @@ function getItemByDisplayMode(listData, id, displayMode, setSelected) {
|
|
|
174
174
|
const kupAutocompleteCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block;width:max-content}.kup-icon{transition:transform 0.15s}.toggled .kup-icon.kup-dropdown-icon{transform:rotate(-180deg)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color-60);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color-50);--kup-textfield-primary-color-rgb:var(--kup-warning-color-50-rgb)}";
|
|
175
175
|
const KupAutocompleteStyle0 = kupAutocompleteCss;
|
|
176
176
|
|
|
177
|
-
var __classPrivateFieldGet$
|
|
177
|
+
var __classPrivateFieldGet$a = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
178
178
|
if (kind === "a" && !f)
|
|
179
179
|
throw new TypeError("Private accessor was defined without a getter");
|
|
180
180
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -243,25 +243,25 @@ const KupAutocomplete = class {
|
|
|
243
243
|
this.placeholder = 'Type code or description';
|
|
244
244
|
}
|
|
245
245
|
onKupBlur() {
|
|
246
|
-
if (!__classPrivateFieldGet$
|
|
246
|
+
if (!__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_isListOpened).call(this)) {
|
|
247
247
|
this.kupBlur.emit({
|
|
248
248
|
comp: this,
|
|
249
249
|
id: this.rootElement.id,
|
|
250
250
|
value: this.value,
|
|
251
|
-
inputValue: __classPrivateFieldGet$
|
|
251
|
+
inputValue: __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
onKupChange(value) {
|
|
256
256
|
__classPrivateFieldSet$5(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
257
257
|
if (value) {
|
|
258
|
-
const ret = __classPrivateFieldGet$
|
|
258
|
+
const ret = __classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, undefined, true);
|
|
259
259
|
if (ret.exists || this.allowInconsistentValues) {
|
|
260
260
|
this.kupChange.emit({
|
|
261
261
|
comp: this,
|
|
262
262
|
id: this.rootElement.id,
|
|
263
263
|
value: this.value,
|
|
264
|
-
inputValue: __classPrivateFieldGet$
|
|
264
|
+
inputValue: __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
265
265
|
node: ret.node,
|
|
266
266
|
});
|
|
267
267
|
}
|
|
@@ -273,7 +273,7 @@ const KupAutocomplete = class {
|
|
|
273
273
|
comp: this,
|
|
274
274
|
id: this.rootElement.id,
|
|
275
275
|
value: this.value,
|
|
276
|
-
inputValue: __classPrivateFieldGet$
|
|
276
|
+
inputValue: __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
277
277
|
node: { value: '' },
|
|
278
278
|
});
|
|
279
279
|
}
|
|
@@ -283,7 +283,7 @@ const KupAutocomplete = class {
|
|
|
283
283
|
comp: this,
|
|
284
284
|
id: this.rootElement.id,
|
|
285
285
|
value: this.value,
|
|
286
|
-
inputValue: __classPrivateFieldGet$
|
|
286
|
+
inputValue: __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
onKupFocus() {
|
|
@@ -291,53 +291,53 @@ const KupAutocomplete = class {
|
|
|
291
291
|
comp: this,
|
|
292
292
|
id: this.rootElement.id,
|
|
293
293
|
value: this.value,
|
|
294
|
-
inputValue: __classPrivateFieldGet$
|
|
294
|
+
inputValue: __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
onKupInput() {
|
|
298
298
|
__classPrivateFieldSet$5(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
299
|
-
const ret = __classPrivateFieldGet$
|
|
299
|
+
const ret = __classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value, undefined, false);
|
|
300
300
|
setTimeout(() => {
|
|
301
|
-
__classPrivateFieldGet$
|
|
302
|
-
if (__classPrivateFieldGet$
|
|
301
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
302
|
+
if (__classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value.length >= this.minimumChars) {
|
|
303
303
|
this.kupInput.emit({
|
|
304
304
|
comp: this,
|
|
305
305
|
id: this.rootElement.id,
|
|
306
306
|
value: this.value,
|
|
307
|
-
inputValue: __classPrivateFieldGet$
|
|
307
|
+
inputValue: __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
308
308
|
node: ret.node,
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
}, 400);
|
|
312
312
|
}
|
|
313
313
|
onKupIconClick() {
|
|
314
|
-
if (__classPrivateFieldGet$
|
|
315
|
-
__classPrivateFieldGet$
|
|
314
|
+
if (__classPrivateFieldGet$a(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
315
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
316
316
|
}
|
|
317
317
|
else {
|
|
318
318
|
if (this.showDropDownIcon) {
|
|
319
|
-
__classPrivateFieldGet$
|
|
319
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, true);
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
this.kupIconClick.emit({
|
|
323
323
|
comp: this,
|
|
324
324
|
id: this.rootElement.id,
|
|
325
325
|
value: this.value,
|
|
326
|
-
inputValue: __classPrivateFieldGet$
|
|
327
|
-
open: __classPrivateFieldGet$
|
|
326
|
+
inputValue: __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
327
|
+
open: __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled'),
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
330
|
onKupItemClick(e) {
|
|
331
331
|
this.onKupChange(e.detail.selected.id);
|
|
332
|
-
__classPrivateFieldGet$
|
|
333
|
-
if (__classPrivateFieldGet$
|
|
334
|
-
__classPrivateFieldGet$
|
|
332
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
333
|
+
if (__classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f")) {
|
|
334
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
335
335
|
}
|
|
336
336
|
this.kupItemClick.emit({
|
|
337
337
|
comp: this,
|
|
338
338
|
id: this.rootElement.id,
|
|
339
339
|
value: this.value,
|
|
340
|
-
inputValue: __classPrivateFieldGet$
|
|
340
|
+
inputValue: __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
341
341
|
node: e.detail.selected,
|
|
342
342
|
});
|
|
343
343
|
}
|
|
@@ -345,30 +345,30 @@ const KupAutocomplete = class {
|
|
|
345
345
|
/* L i s t e n e r s */
|
|
346
346
|
/*-------------------------------------------------*/
|
|
347
347
|
listenKeydown(e) {
|
|
348
|
-
if (__classPrivateFieldGet$
|
|
348
|
+
if (__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_isListOpened).call(this)) {
|
|
349
349
|
switch (e.key) {
|
|
350
350
|
case 'ArrowDown':
|
|
351
351
|
e.preventDefault();
|
|
352
352
|
e.stopPropagation();
|
|
353
|
-
__classPrivateFieldGet$
|
|
353
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
354
354
|
break;
|
|
355
355
|
case 'ArrowUp':
|
|
356
356
|
e.preventDefault();
|
|
357
357
|
e.stopPropagation();
|
|
358
|
-
__classPrivateFieldGet$
|
|
358
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
359
359
|
break;
|
|
360
360
|
case 'Enter':
|
|
361
361
|
e.preventDefault();
|
|
362
362
|
e.stopPropagation();
|
|
363
|
-
__classPrivateFieldGet$
|
|
364
|
-
__classPrivateFieldGet$
|
|
365
|
-
__classPrivateFieldGet$
|
|
363
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").select().then(() => {
|
|
364
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
365
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
366
366
|
});
|
|
367
367
|
break;
|
|
368
368
|
case 'Escape':
|
|
369
369
|
e.preventDefault();
|
|
370
370
|
e.stopPropagation();
|
|
371
|
-
__classPrivateFieldGet$
|
|
371
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
372
372
|
break;
|
|
373
373
|
}
|
|
374
374
|
}
|
|
@@ -377,14 +377,14 @@ const KupAutocomplete = class {
|
|
|
377
377
|
case 'ArrowDown':
|
|
378
378
|
e.preventDefault();
|
|
379
379
|
e.stopPropagation();
|
|
380
|
-
__classPrivateFieldGet$
|
|
381
|
-
__classPrivateFieldGet$
|
|
380
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
381
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
382
382
|
break;
|
|
383
383
|
case 'ArrowUp':
|
|
384
384
|
e.preventDefault();
|
|
385
385
|
e.stopPropagation();
|
|
386
|
-
__classPrivateFieldGet$
|
|
387
|
-
__classPrivateFieldGet$
|
|
386
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
387
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
388
388
|
break;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
@@ -417,7 +417,7 @@ const KupAutocomplete = class {
|
|
|
417
417
|
* Sets the focus to the component.
|
|
418
418
|
*/
|
|
419
419
|
async setFocus() {
|
|
420
|
-
__classPrivateFieldGet$
|
|
420
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
421
421
|
}
|
|
422
422
|
/**
|
|
423
423
|
* Sets the props to the component.
|
|
@@ -432,21 +432,21 @@ const KupAutocomplete = class {
|
|
|
432
432
|
*/
|
|
433
433
|
async setValue(value, valueDecode) {
|
|
434
434
|
__classPrivateFieldSet$5(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
435
|
-
__classPrivateFieldGet$
|
|
435
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, valueDecode, true);
|
|
436
436
|
}
|
|
437
437
|
/**
|
|
438
438
|
* Calls closeList method (acts like a reset).
|
|
439
439
|
* @param {string} value - Value to be set.
|
|
440
440
|
*/
|
|
441
441
|
async reset() {
|
|
442
|
-
__classPrivateFieldGet$
|
|
442
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
443
443
|
}
|
|
444
444
|
/*-------------------------------------------------*/
|
|
445
445
|
/* L i f e c y c l e H o o k s */
|
|
446
446
|
/*-------------------------------------------------*/
|
|
447
447
|
componentWillLoad() {
|
|
448
|
-
__classPrivateFieldGet$
|
|
449
|
-
__classPrivateFieldGet$
|
|
448
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, false);
|
|
449
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").theme.register(this);
|
|
450
450
|
__classPrivateFieldSet$5(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
451
451
|
this.value = this.initialValue;
|
|
452
452
|
if (!this.data) {
|
|
@@ -457,11 +457,11 @@ const KupAutocomplete = class {
|
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
componentDidLoad() {
|
|
460
|
-
__classPrivateFieldGet$
|
|
461
|
-
__classPrivateFieldGet$
|
|
460
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, this.value, this.initialValueDecode, true);
|
|
461
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, true);
|
|
462
462
|
}
|
|
463
463
|
componentWillRender() {
|
|
464
|
-
__classPrivateFieldGet$
|
|
464
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, false);
|
|
465
465
|
}
|
|
466
466
|
componentDidRender() {
|
|
467
467
|
const root = this.rootElement.shadowRoot;
|
|
@@ -473,7 +473,7 @@ const KupAutocomplete = class {
|
|
|
473
473
|
fTextFieldMdc.FTextFieldMDC(f);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
__classPrivateFieldGet$
|
|
476
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, true);
|
|
477
477
|
}
|
|
478
478
|
render() {
|
|
479
479
|
const props = {
|
|
@@ -501,67 +501,67 @@ const KupAutocomplete = class {
|
|
|
501
501
|
? true
|
|
502
502
|
: false,
|
|
503
503
|
showMarker: this.showMarker,
|
|
504
|
-
size: __classPrivateFieldGet$
|
|
504
|
+
size: __classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_calcSize).call(this),
|
|
505
505
|
};
|
|
506
506
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
507
507
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
508
|
-
return (index.h(index.Host, { key: '43ab465068f2721631e669c1f8d8c65a21e819dc', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$
|
|
508
|
+
return (index.h(index.Host, { key: '43ab465068f2721631e669c1f8d8c65a21e819dc', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$a(this, _KupAutocomplete_elStyle, "f") }, index.h("style", { key: '28f1d7b14f8054029912b38e680e46b8ebdbc0f6' }, __classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { key: 'dfbfac1e4096d35c64ce817b8d3fa6a3dcc4a2af', id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$a(this, _KupAutocomplete_elStyle, "f") }, index.h(fTextField.FTextField, Object.assign({ key: '660a532f84a72967b9742359cd070a3e058b63ce' }, props, { icon: this.showDropDownIcon
|
|
509
509
|
? kupManager$1.KupThemeIconValues.SEARCH
|
|
510
510
|
: null, trailingIcon: true }, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => {
|
|
511
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
511
|
+
window.clearTimeout(__classPrivateFieldGet$a(this, _KupAutocomplete_inputTimeout, "f"));
|
|
512
512
|
__classPrivateFieldSet$5(this, _KupAutocomplete_inputTimeout, window.setTimeout(() => this.onKupInput(), this.inputDelay), "f");
|
|
513
|
-
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$
|
|
513
|
+
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_prepList).call(this)));
|
|
514
514
|
}
|
|
515
515
|
disconnectedCallback() {
|
|
516
|
-
if (__classPrivateFieldGet$
|
|
517
|
-
__classPrivateFieldGet$
|
|
518
|
-
__classPrivateFieldGet$
|
|
516
|
+
if (__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f")) {
|
|
517
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f")]);
|
|
518
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").remove();
|
|
519
519
|
}
|
|
520
|
-
__classPrivateFieldGet$
|
|
520
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").theme.unregister(this);
|
|
521
521
|
}
|
|
522
522
|
get rootElement() { return index.getElement(this); }
|
|
523
523
|
};
|
|
524
524
|
_KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle = new WeakMap(), _KupAutocomplete_listEl = new WeakMap(), _KupAutocomplete_kupManager = new WeakMap(), _KupAutocomplete_textfieldWrapper = new WeakMap(), _KupAutocomplete_textfieldEl = new WeakMap(), _KupAutocomplete_clickCb = new WeakMap(), _KupAutocomplete_inputTimeout = new WeakMap(), _KupAutocomplete_instances = new WeakSet(), _KupAutocomplete_openList = function _KupAutocomplete_openList(forceOpen) {
|
|
525
525
|
var _a, _b;
|
|
526
526
|
if (forceOpen != true &&
|
|
527
|
-
__classPrivateFieldGet$
|
|
528
|
-
__classPrivateFieldGet$
|
|
527
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_textfieldEl, "f").value.length < this.minimumChars) {
|
|
528
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
529
529
|
return false;
|
|
530
530
|
}
|
|
531
531
|
const hasError = ((_a = this.error) === null || _a === void 0 ? void 0 : _a.trim().length) > 0;
|
|
532
532
|
const hasAlert = ((_b = this.alert) === null || _b === void 0 ? void 0 : _b.trim().length) > 0;
|
|
533
533
|
const topOffset = hasError || hasAlert ? -20 : 0;
|
|
534
|
-
__classPrivateFieldGet$
|
|
535
|
-
__classPrivateFieldGet$
|
|
536
|
-
const elStyle = __classPrivateFieldGet$
|
|
534
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_textfieldWrapper, "f").classList.add('toggled');
|
|
535
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").menuVisible = true;
|
|
536
|
+
const elStyle = __classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").style;
|
|
537
537
|
elStyle.height = 'auto';
|
|
538
|
-
elStyle.minWidth = __classPrivateFieldGet$
|
|
539
|
-
if (__classPrivateFieldGet$
|
|
540
|
-
__classPrivateFieldGet$
|
|
538
|
+
elStyle.minWidth = __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldWrapper, "f").clientWidth + 'px';
|
|
539
|
+
if (__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f"))) {
|
|
540
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldWrapper, "f"));
|
|
541
541
|
}
|
|
542
542
|
else {
|
|
543
|
-
__classPrivateFieldGet$
|
|
543
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$a(this, _KupAutocomplete_textfieldWrapper, "f"), topOffset, kupManager$1.KupDynamicPositionPlacement.AUTO, true);
|
|
544
544
|
}
|
|
545
|
-
__classPrivateFieldGet$
|
|
546
|
-
if (!__classPrivateFieldGet$
|
|
545
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f"));
|
|
546
|
+
if (!__classPrivateFieldGet$a(this, _KupAutocomplete_clickCb, "f")) {
|
|
547
547
|
__classPrivateFieldSet$5(this, _KupAutocomplete_clickCb, {
|
|
548
548
|
cb: () => {
|
|
549
|
-
__classPrivateFieldGet$
|
|
549
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
550
550
|
},
|
|
551
|
-
el: __classPrivateFieldGet$
|
|
551
|
+
el: __classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f"),
|
|
552
552
|
}, "f");
|
|
553
553
|
}
|
|
554
|
-
__classPrivateFieldGet$
|
|
554
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").addClickCallback(__classPrivateFieldGet$a(this, _KupAutocomplete_clickCb, "f"), true);
|
|
555
555
|
return true;
|
|
556
556
|
}, _KupAutocomplete_closeList = function _KupAutocomplete_closeList() {
|
|
557
|
-
__classPrivateFieldGet$
|
|
558
|
-
__classPrivateFieldGet$
|
|
559
|
-
__classPrivateFieldGet$
|
|
560
|
-
__classPrivateFieldGet$
|
|
557
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_textfieldWrapper, "f").classList.remove('toggled');
|
|
558
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").menuVisible = false;
|
|
559
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f"));
|
|
560
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet$a(this, _KupAutocomplete_clickCb, "f"));
|
|
561
561
|
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
562
|
-
return __classPrivateFieldGet$
|
|
562
|
+
return __classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
563
563
|
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, idInDecode, eventShouldSetValue) {
|
|
564
|
-
if (!__classPrivateFieldGet$
|
|
564
|
+
if (!__classPrivateFieldGet$a(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
565
565
|
return;
|
|
566
566
|
}
|
|
567
567
|
if (idIn && idInDecode) {
|
|
@@ -569,7 +569,7 @@ _KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle =
|
|
|
569
569
|
}
|
|
570
570
|
else {
|
|
571
571
|
__classPrivateFieldSet$5(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
572
|
-
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$
|
|
572
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
573
573
|
if ((ret.exists || this.allowInconsistentValues) &&
|
|
574
574
|
eventShouldSetValue) {
|
|
575
575
|
this.value = ret.value;
|
|
@@ -578,8 +578,8 @@ _KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle =
|
|
|
578
578
|
else {
|
|
579
579
|
this.displayedValue = idIn;
|
|
580
580
|
}
|
|
581
|
-
if (__classPrivateFieldGet$
|
|
582
|
-
__classPrivateFieldGet$
|
|
581
|
+
if (__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
582
|
+
__classPrivateFieldGet$a(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
583
583
|
}
|
|
584
584
|
return ret;
|
|
585
585
|
}
|
|
@@ -6932,7 +6932,7 @@ var KupChipProps;
|
|
|
6932
6932
|
const kupChipCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block}";
|
|
6933
6933
|
const KupChipStyle0 = kupChipCss;
|
|
6934
6934
|
|
|
6935
|
-
var __classPrivateFieldGet$
|
|
6935
|
+
var __classPrivateFieldGet$9 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
6936
6936
|
if (kind === "a" && !f)
|
|
6937
6937
|
throw new TypeError("Private accessor was defined without a getter");
|
|
6938
6938
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -7003,7 +7003,7 @@ const KupChip = class {
|
|
|
7003
7003
|
this.kupChange.emit({
|
|
7004
7004
|
comp: this,
|
|
7005
7005
|
id: this.rootElement.id,
|
|
7006
|
-
stringifiedValues: __classPrivateFieldGet$
|
|
7006
|
+
stringifiedValues: __classPrivateFieldGet$9(this, _KupChip_instances, "m", _KupChip_stringifiedValues).call(this),
|
|
7007
7007
|
});
|
|
7008
7008
|
this.refresh();
|
|
7009
7009
|
}
|
|
@@ -7125,11 +7125,11 @@ const KupChip = class {
|
|
|
7125
7125
|
props.onIconClick.push((chip) => this.onKupIconClick(chip));
|
|
7126
7126
|
}
|
|
7127
7127
|
return (index.h(index.Host, { key: 'fd39e30a24a2fb700fa5355cd14fe0c35d006402', "onKup-autocomplete-itemclick": (e) => {
|
|
7128
|
-
__classPrivateFieldGet$
|
|
7128
|
+
__classPrivateFieldGet$9(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
7129
7129
|
}, "onKup-combobox-itemclick": (e) => {
|
|
7130
|
-
__classPrivateFieldGet$
|
|
7130
|
+
__classPrivateFieldGet$9(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
7131
7131
|
}, "onKup-textfield-change": (e) => {
|
|
7132
|
-
__classPrivateFieldGet$
|
|
7132
|
+
__classPrivateFieldGet$9(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
7133
7133
|
} }, index.h("style", { key: 'f3d1b7eb69084838c733e4cb5debd79df8e7a8e5' }, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { key: 'f843a641880ed5011bc2e3114aec1a78adbdc552', id: GenericVariables.componentWrapperId }, ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 ? index.h(fChip.FChip, Object.assign({}, props)) : null, index.h("slot", { key: 'd121ecf6db2c7b5288b4697eaf3817a9f915f0f6', name: "field" }))));
|
|
7134
7134
|
}
|
|
7135
7135
|
disconnectedCallback() {
|
|
@@ -7167,7 +7167,7 @@ _KupChip_instances = new WeakSet(), _KupChip_changeHandler =
|
|
|
7167
7167
|
this.kupChange.emit({
|
|
7168
7168
|
comp: this,
|
|
7169
7169
|
id: this.rootElement.id,
|
|
7170
|
-
stringifiedValues: __classPrivateFieldGet$
|
|
7170
|
+
stringifiedValues: __classPrivateFieldGet$9(this, _KupChip_instances, "m", _KupChip_stringifiedValues).call(this),
|
|
7171
7171
|
});
|
|
7172
7172
|
}
|
|
7173
7173
|
}
|
|
@@ -7464,7 +7464,7 @@ var KupComboboxProps;
|
|
|
7464
7464
|
const kupComboboxCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block;font-size:var(--kup-font-size);width:max-content}:host([is-select]) #kup-component{transition:background-color 0.2s}:host([is-select]) .mdc-text-field:not(.mdc-text-field--disabled) input{cursor:pointer}.kup-icon{transition:transform 0.15s}.toggled .kup-icon.kup-dropdown-icon{transform:rotate(-180deg)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon);order:2}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color-60);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color-50);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}:host(.page-selector) .f-text-field .mdc-text-field,:host(.rows-selector) .f-text-field .mdc-text-field{border-bottom:none !important;width:max-content !important}:host(.page-selector) .f-text-field .mdc-text-field-container,:host(.rows-selector) .f-text-field .mdc-text-field-container{flex-direction:row !important}:host(.page-selector) .f-text-field .mdc-text-field-container .mdc-text-field__label-container,:host(.rows-selector) .f-text-field .mdc-text-field-container .mdc-text-field__label-container{white-space:nowrap;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}:host(.page-selector) .f-text-field .mdc-text-field-helper-line,:host(.rows-selector) .f-text-field .mdc-text-field-helper-line{display:none}";
|
|
7465
7465
|
const KupComboboxStyle0 = kupComboboxCss;
|
|
7466
7466
|
|
|
7467
|
-
var __classPrivateFieldGet$
|
|
7467
|
+
var __classPrivateFieldGet$8 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
7468
7468
|
if (kind === "a" && !f)
|
|
7469
7469
|
throw new TypeError("Private accessor was defined without a getter");
|
|
7470
7470
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -7525,41 +7525,41 @@ const KupCombobox = class {
|
|
|
7525
7525
|
this.showMarker = false;
|
|
7526
7526
|
}
|
|
7527
7527
|
onKupBlur() {
|
|
7528
|
-
if (!__classPrivateFieldGet$
|
|
7528
|
+
if (!__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7529
7529
|
this.kupBlur.emit({
|
|
7530
7530
|
comp: this,
|
|
7531
7531
|
id: this.rootElement.id,
|
|
7532
7532
|
value: this.value,
|
|
7533
|
-
inputValue: __classPrivateFieldGet$
|
|
7533
|
+
inputValue: __classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f").value,
|
|
7534
7534
|
});
|
|
7535
7535
|
}
|
|
7536
7536
|
}
|
|
7537
7537
|
onKupChange(value) {
|
|
7538
|
-
let ret = __classPrivateFieldGet$
|
|
7538
|
+
let ret = __classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, undefined, true);
|
|
7539
7539
|
this.kupChange.emit({
|
|
7540
7540
|
comp: this,
|
|
7541
7541
|
id: this.rootElement.id,
|
|
7542
7542
|
value: this.value,
|
|
7543
|
-
inputValue: __classPrivateFieldGet$
|
|
7543
|
+
inputValue: __classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f").value,
|
|
7544
7544
|
node: ret.node,
|
|
7545
7545
|
});
|
|
7546
|
-
__classPrivateFieldGet$
|
|
7546
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7547
7547
|
}
|
|
7548
7548
|
onKupClick() {
|
|
7549
7549
|
this.onKupIconClick();
|
|
7550
7550
|
}
|
|
7551
7551
|
onKupIconClick() {
|
|
7552
|
-
if (__classPrivateFieldGet$
|
|
7553
|
-
__classPrivateFieldGet$
|
|
7552
|
+
if (__classPrivateFieldGet$8(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
7553
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7554
7554
|
}
|
|
7555
7555
|
else {
|
|
7556
|
-
__classPrivateFieldGet$
|
|
7556
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7557
7557
|
this.kupIconClick.emit({
|
|
7558
7558
|
comp: this,
|
|
7559
7559
|
id: this.rootElement.id,
|
|
7560
7560
|
value: this.value,
|
|
7561
|
-
inputValue: __classPrivateFieldGet$
|
|
7562
|
-
open: __classPrivateFieldGet$
|
|
7561
|
+
inputValue: __classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f").value,
|
|
7562
|
+
open: __classPrivateFieldGet$8(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled'),
|
|
7563
7563
|
});
|
|
7564
7564
|
}
|
|
7565
7565
|
}
|
|
@@ -7568,32 +7568,32 @@ const KupCombobox = class {
|
|
|
7568
7568
|
comp: this,
|
|
7569
7569
|
id: this.rootElement.id,
|
|
7570
7570
|
value: this.value,
|
|
7571
|
-
inputValue: __classPrivateFieldGet$
|
|
7571
|
+
inputValue: __classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f").value,
|
|
7572
7572
|
});
|
|
7573
7573
|
}
|
|
7574
7574
|
onKupInput() {
|
|
7575
|
-
let ret = __classPrivateFieldGet$
|
|
7576
|
-
__classPrivateFieldGet$
|
|
7575
|
+
let ret = __classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, __classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f").value, undefined, false);
|
|
7576
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7577
7577
|
this.kupInput.emit({
|
|
7578
7578
|
comp: this,
|
|
7579
7579
|
id: this.rootElement.id,
|
|
7580
7580
|
value: this.value,
|
|
7581
|
-
inputValue: __classPrivateFieldGet$
|
|
7581
|
+
inputValue: __classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f").value,
|
|
7582
7582
|
node: ret.node,
|
|
7583
7583
|
});
|
|
7584
7584
|
}
|
|
7585
7585
|
onKupItemClick(e) {
|
|
7586
7586
|
this.onKupChange(e.detail.selected.id);
|
|
7587
|
-
__classPrivateFieldGet$
|
|
7588
|
-
if (__classPrivateFieldGet$
|
|
7589
|
-
__classPrivateFieldGet$
|
|
7587
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7588
|
+
if (__classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f")) {
|
|
7589
|
+
__classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7590
7590
|
}
|
|
7591
7591
|
this.kupItemClick.emit({
|
|
7592
7592
|
comp: this,
|
|
7593
7593
|
id: this.rootElement.id,
|
|
7594
7594
|
node: e.detail.selected,
|
|
7595
7595
|
value: this.value,
|
|
7596
|
-
inputValue: __classPrivateFieldGet$
|
|
7596
|
+
inputValue: __classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f").value,
|
|
7597
7597
|
});
|
|
7598
7598
|
}
|
|
7599
7599
|
/*-------------------------------------------------*/
|
|
@@ -7610,30 +7610,30 @@ const KupCombobox = class {
|
|
|
7610
7610
|
/* L i s t e n e r s */
|
|
7611
7611
|
/*-------------------------------------------------*/
|
|
7612
7612
|
listenKeydown(e) {
|
|
7613
|
-
if (__classPrivateFieldGet$
|
|
7613
|
+
if (__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7614
7614
|
switch (e.key) {
|
|
7615
7615
|
case 'ArrowDown':
|
|
7616
7616
|
e.preventDefault();
|
|
7617
7617
|
e.stopPropagation();
|
|
7618
|
-
__classPrivateFieldGet$
|
|
7618
|
+
__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").focusNext();
|
|
7619
7619
|
break;
|
|
7620
7620
|
case 'ArrowUp':
|
|
7621
7621
|
e.preventDefault();
|
|
7622
7622
|
e.stopPropagation();
|
|
7623
|
-
__classPrivateFieldGet$
|
|
7623
|
+
__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").focusPrevious();
|
|
7624
7624
|
break;
|
|
7625
7625
|
case 'Enter':
|
|
7626
7626
|
e.preventDefault();
|
|
7627
7627
|
e.stopPropagation();
|
|
7628
|
-
__classPrivateFieldGet$
|
|
7629
|
-
__classPrivateFieldGet$
|
|
7630
|
-
__classPrivateFieldGet$
|
|
7628
|
+
__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").select().then(() => {
|
|
7629
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7630
|
+
__classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7631
7631
|
});
|
|
7632
7632
|
break;
|
|
7633
7633
|
case 'Escape':
|
|
7634
7634
|
e.preventDefault();
|
|
7635
7635
|
e.stopPropagation();
|
|
7636
|
-
__classPrivateFieldGet$
|
|
7636
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7637
7637
|
break;
|
|
7638
7638
|
}
|
|
7639
7639
|
}
|
|
@@ -7643,13 +7643,13 @@ const KupCombobox = class {
|
|
|
7643
7643
|
e.preventDefault();
|
|
7644
7644
|
e.stopPropagation();
|
|
7645
7645
|
this.onKupIconClick();
|
|
7646
|
-
__classPrivateFieldGet$
|
|
7646
|
+
__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").focusNext();
|
|
7647
7647
|
break;
|
|
7648
7648
|
case 'ArrowUp':
|
|
7649
7649
|
e.preventDefault();
|
|
7650
7650
|
e.stopPropagation();
|
|
7651
7651
|
this.onKupIconClick();
|
|
7652
|
-
__classPrivateFieldGet$
|
|
7652
|
+
__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").focusPrevious();
|
|
7653
7653
|
break;
|
|
7654
7654
|
}
|
|
7655
7655
|
}
|
|
@@ -7682,7 +7682,7 @@ const KupCombobox = class {
|
|
|
7682
7682
|
* Sets the focus to the component.
|
|
7683
7683
|
*/
|
|
7684
7684
|
async setFocus() {
|
|
7685
|
-
__classPrivateFieldGet$
|
|
7685
|
+
__classPrivateFieldGet$8(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7686
7686
|
}
|
|
7687
7687
|
/**
|
|
7688
7688
|
* Sets the props to the component.
|
|
@@ -7696,21 +7696,21 @@ const KupCombobox = class {
|
|
|
7696
7696
|
* @param {string} value - Value to be set.
|
|
7697
7697
|
*/
|
|
7698
7698
|
async setValue(value, valueDecode) {
|
|
7699
|
-
__classPrivateFieldGet$
|
|
7699
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, valueDecode, true);
|
|
7700
7700
|
}
|
|
7701
7701
|
/**
|
|
7702
7702
|
* Calls closeList method (acts like a reset).
|
|
7703
7703
|
* @param {string} value - Value to be set.
|
|
7704
7704
|
*/
|
|
7705
7705
|
async reset() {
|
|
7706
|
-
__classPrivateFieldGet$
|
|
7706
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7707
7707
|
}
|
|
7708
7708
|
/*-------------------------------------------------*/
|
|
7709
7709
|
/* L i f e c y c l e H o o k s */
|
|
7710
7710
|
/*-------------------------------------------------*/
|
|
7711
7711
|
componentWillLoad() {
|
|
7712
|
-
__classPrivateFieldGet$
|
|
7713
|
-
__classPrivateFieldGet$
|
|
7712
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").debug.logLoad(this, false);
|
|
7713
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").theme.register(this);
|
|
7714
7714
|
this.value = this.initialValue;
|
|
7715
7715
|
if (!this.data) {
|
|
7716
7716
|
this.data = {
|
|
@@ -7720,11 +7720,11 @@ const KupCombobox = class {
|
|
|
7720
7720
|
}
|
|
7721
7721
|
}
|
|
7722
7722
|
componentDidLoad() {
|
|
7723
|
-
__classPrivateFieldGet$
|
|
7724
|
-
__classPrivateFieldGet$
|
|
7723
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, this.value, this.initialValueDecode, true);
|
|
7724
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").debug.logLoad(this, true);
|
|
7725
7725
|
}
|
|
7726
7726
|
componentWillRender() {
|
|
7727
|
-
__classPrivateFieldGet$
|
|
7727
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").debug.logRender(this, false);
|
|
7728
7728
|
}
|
|
7729
7729
|
componentDidRender() {
|
|
7730
7730
|
const root = this.rootElement.shadowRoot;
|
|
@@ -7736,7 +7736,7 @@ const KupCombobox = class {
|
|
|
7736
7736
|
fTextFieldMdc.FTextFieldMDC(f);
|
|
7737
7737
|
}
|
|
7738
7738
|
}
|
|
7739
|
-
__classPrivateFieldGet$
|
|
7739
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").debug.logRender(this, true);
|
|
7740
7740
|
}
|
|
7741
7741
|
render() {
|
|
7742
7742
|
const props = {
|
|
@@ -7767,16 +7767,16 @@ const KupCombobox = class {
|
|
|
7767
7767
|
};
|
|
7768
7768
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
7769
7769
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
7770
|
-
return (index.h(index.Host, { key: '965196cce5ab2bddb2d9c5968a8da8f973cf2ba2', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$
|
|
7770
|
+
return (index.h(index.Host, { key: '965196cce5ab2bddb2d9c5968a8da8f973cf2ba2', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$8(this, _KupCombobox_elStyle, "f") }, index.h("style", { key: '523c9c38f6382ae6a135e52ad22dd0fb134af9b1' }, __classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { key: 'c4ec398690b5f8150643babcf926a00da4b7412e', id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$8(this, _KupCombobox_elStyle, "f") }, index.h(fTextField.FTextField, Object.assign({ key: '97f6487594acef605c236902627c199386f0b5c8' }, props, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, trailingIcon: true, icon: this.showDropDownIcon
|
|
7771
7771
|
? kupManager$1.KupThemeIconValues.DROPDOWN
|
|
7772
|
-
: null, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupIconClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$
|
|
7772
|
+
: null, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupIconClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
7773
7773
|
}
|
|
7774
7774
|
disconnectedCallback() {
|
|
7775
|
-
if (__classPrivateFieldGet$
|
|
7776
|
-
__classPrivateFieldGet$
|
|
7777
|
-
__classPrivateFieldGet$
|
|
7775
|
+
if (__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f")) {
|
|
7776
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f")]);
|
|
7777
|
+
__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").remove();
|
|
7778
7778
|
}
|
|
7779
|
-
__classPrivateFieldGet$
|
|
7779
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").theme.unregister(this);
|
|
7780
7780
|
}
|
|
7781
7781
|
get rootElement() { return index.getElement(this); }
|
|
7782
7782
|
static get watchers() { return {
|
|
@@ -7786,50 +7786,50 @@ const KupCombobox = class {
|
|
|
7786
7786
|
};
|
|
7787
7787
|
_KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _KupCombobox_listEl = new WeakMap(), _KupCombobox_textfieldWrapper = new WeakMap(), _KupCombobox_textfieldEl = new WeakMap(), _KupCombobox_clickCb = new WeakMap(), _KupCombobox_componentTriggered = new WeakMap(), _KupCombobox_instances = new WeakSet(), _KupCombobox_openList = function _KupCombobox_openList() {
|
|
7788
7788
|
var _a, _b;
|
|
7789
|
-
if (__classPrivateFieldGet$
|
|
7789
|
+
if (__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7790
7790
|
return;
|
|
7791
7791
|
}
|
|
7792
7792
|
// Manage list open while helperline is displayed
|
|
7793
7793
|
const hasError = ((_a = this.error) === null || _a === void 0 ? void 0 : _a.trim().length) > 0;
|
|
7794
7794
|
const hasAlert = ((_b = this.alert) === null || _b === void 0 ? void 0 : _b.trim().length) > 0;
|
|
7795
7795
|
const topOffset = hasError || hasAlert ? -20 : 0;
|
|
7796
|
-
__classPrivateFieldGet$
|
|
7797
|
-
__classPrivateFieldGet$
|
|
7798
|
-
__classPrivateFieldGet$
|
|
7799
|
-
const elStyle = __classPrivateFieldGet$
|
|
7796
|
+
__classPrivateFieldGet$8(this, _KupCombobox_textfieldWrapper, "f").classList.add('toggled');
|
|
7797
|
+
__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").menuVisible = true;
|
|
7798
|
+
__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").filter = '';
|
|
7799
|
+
const elStyle = __classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").style;
|
|
7800
7800
|
elStyle.height = 'auto';
|
|
7801
|
-
elStyle.minWidth = __classPrivateFieldGet$
|
|
7802
|
-
if (__classPrivateFieldGet$
|
|
7803
|
-
__classPrivateFieldGet$
|
|
7801
|
+
elStyle.minWidth = __classPrivateFieldGet$8(this, _KupCombobox_textfieldWrapper, "f").clientWidth + 'px';
|
|
7802
|
+
if (__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f"))) {
|
|
7803
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f"), __classPrivateFieldGet$8(this, _KupCombobox_textfieldWrapper, "f"));
|
|
7804
7804
|
}
|
|
7805
7805
|
else {
|
|
7806
|
-
__classPrivateFieldGet$
|
|
7806
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f"), __classPrivateFieldGet$8(this, _KupCombobox_textfieldWrapper, "f"), topOffset, kupManager$1.KupDynamicPositionPlacement.AUTO, true);
|
|
7807
7807
|
}
|
|
7808
|
-
__classPrivateFieldGet$
|
|
7809
|
-
if (!__classPrivateFieldGet$
|
|
7808
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f"));
|
|
7809
|
+
if (!__classPrivateFieldGet$8(this, _KupCombobox_clickCb, "f")) {
|
|
7810
7810
|
__classPrivateFieldSet$4(this, _KupCombobox_clickCb, {
|
|
7811
7811
|
cb: () => {
|
|
7812
|
-
__classPrivateFieldGet$
|
|
7812
|
+
__classPrivateFieldGet$8(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7813
7813
|
},
|
|
7814
|
-
el: __classPrivateFieldGet$
|
|
7814
|
+
el: __classPrivateFieldGet$8(this, _KupCombobox_listEl, "f"),
|
|
7815
7815
|
}, "f");
|
|
7816
7816
|
}
|
|
7817
|
-
__classPrivateFieldGet$
|
|
7818
|
-
window.setTimeout(() => __classPrivateFieldGet$
|
|
7817
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").addClickCallback(__classPrivateFieldGet$8(this, _KupCombobox_clickCb, "f"), true);
|
|
7818
|
+
window.setTimeout(() => __classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").setFocus(), 100);
|
|
7819
7819
|
}, _KupCombobox_closeList = function _KupCombobox_closeList() {
|
|
7820
|
-
__classPrivateFieldGet$
|
|
7821
|
-
__classPrivateFieldGet$
|
|
7822
|
-
__classPrivateFieldGet$
|
|
7823
|
-
__classPrivateFieldGet$
|
|
7824
|
-
window.setTimeout(() => __classPrivateFieldGet$
|
|
7820
|
+
__classPrivateFieldGet$8(this, _KupCombobox_textfieldWrapper, "f").classList.remove('toggled');
|
|
7821
|
+
__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").menuVisible = false;
|
|
7822
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f"));
|
|
7823
|
+
__classPrivateFieldGet$8(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$8(this, _KupCombobox_clickCb, "f"));
|
|
7824
|
+
window.setTimeout(() => __classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").setBlur(), 100);
|
|
7825
7825
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
7826
|
-
return __classPrivateFieldGet$
|
|
7826
|
+
return __classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
7827
7827
|
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, idInDecode, eventShouldSetValue) {
|
|
7828
7828
|
if (idIn != null && idInDecode != null) {
|
|
7829
7829
|
this.displayedValue = getIdOfItemByDisplayMode({ id: idIn, value: idInDecode }, this.displayMode, ' - ');
|
|
7830
7830
|
}
|
|
7831
7831
|
else {
|
|
7832
|
-
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$
|
|
7832
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$8(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
7833
7833
|
if (ret.exists && eventShouldSetValue) {
|
|
7834
7834
|
this.value = ret.value;
|
|
7835
7835
|
this.displayedValue = ret.displayedValue;
|
|
@@ -7837,8 +7837,8 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
7837
7837
|
else {
|
|
7838
7838
|
this.displayedValue = idIn;
|
|
7839
7839
|
}
|
|
7840
|
-
if (__classPrivateFieldGet$
|
|
7841
|
-
__classPrivateFieldGet$
|
|
7840
|
+
if (__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f") != null) {
|
|
7841
|
+
__classPrivateFieldGet$8(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7842
7842
|
}
|
|
7843
7843
|
return ret;
|
|
7844
7844
|
}
|
|
@@ -8560,7 +8560,7 @@ class KupColumnMenu {
|
|
|
8560
8560
|
const kupDataTableCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_datatable_background_color:var(\n --kup-datatable-background-color,\n var(--kup-layer-1)\n );--kup_datatable_th_background_color:var(\n --kup-datatable-th-background-color,\n var(--kup-layer-2)\n );--kup_datatable_background_color_selected:var(\n --kup-datatable-background-color-selected,\n var(--kup-layer-1-selected)\n );--kup_datatable_border:var(\n --kup-datatable-border-color,\n 1px solid var(--kup-border-subtle)\n );--kup_datatable_font_family:var(\n --kup-datatable-font-family,\n var(--kup-font-family)\n );--kup_datatable_font_family_monospace:var(\n --kup-datatable-font-family-monospace,\n var(--kup-font-family-monospace)\n );--kup_datatable_font_size:var(\n --kup-datatable-font-size,\n var(--kup-font-size)\n );--kup_datatable_th_border:var(\n --kup-datatable-th-border,\n 1px solid var(--kup-gray-color-30)\n );--kup_datatable_th_resize_handle_width:var(\n --kup-datatable-th-resize-handle-width,\n 3px\n );--kup_datatable_background_color_hover:var(\n --kup-datatable-background-color-hover,\n var(--kup-layer-1-hover)\n );--kup_datatable_text_color_hover:var(\n --kup-datatable-background-color-hover,\n var(--kup-text-primary)\n );--kup_card_text_color:var(--kup-card-text-color, var(--kup-text-secondary));--kup_fcell_padding_dense:var(\n --kup-fcell-padding-dense,\n var(--kup-space-01) var(--kup-space-03)\n );--kup_fcell_padding_medium:var(\n --kup-fcell-padding-medium,\n var(--kup-space-02) var(--kup-space-03)\n );--kup_fcell_padding_wide:var(\n --kup-fcell-padding-wide,\n var(--kup-space-04) var(--kup-space-03)\n );display:block;font-family:var(--kup_datatable_font_family);font-size:var(--kup_datatable_font_size);position:relative}:host([kup-toolbar]) .settings-trigger{height:12px}:host([kup-toolbar]) .customize-panel{visibility:visible}:host([force-one-line]) .f-cell__text{white-space:nowrap}#kup-component.auto-width{width:fit-content}table{background-color:var(--kup_datatable_background_color);border-spacing:0;border-collapse:separate;color:var(--kup_card_text_color);min-width:intrinsic;min-width:-moz-max-content;min-width:-webkit-max-content;text-align:left;width:100%}table.auto-width{min-width:auto;width:0}table>tbody>tr.focus td:first-of-type,table>tbody>tr[kup-drag-over] td:first-of-type{box-shadow:inset 4px 0px 0px 0px var(--kup_datatable_th_border)}table>tbody>tr:last-of-type>td{border-bottom:var(--kup_datatable_border)}table.border-top>tbody>tr:first-of-type>td{border-top:var(--kup_datatable_border)}table.row-separation>tbody>tr>td{border-bottom:var(--kup_datatable_border)}table.column-separation>tbody>tr>td{border-right:var(--kup_datatable_border)}table.noGrid,table.noGrid td{border:none}table tfoot tr td{background-color:var(--kup_datatable_background_color);border-bottom:var(--kup_datatable_border);border-right:var(--kup_datatable_border);box-sizing:border-box;height:36px;text-align:right;font-weight:bold;padding:0.5em var(--kup-space-03)}table tfoot tr td:hover{background-color:var(--kup_datatable_background_color)}table tfoot tr td:last-of-type{border-right:none}#global-filter{min-width:140px;width:100%;flex:1}#global-filter .f-text-field .mdc-text-field-container .mdc-text-field{border-bottom:none}.kup-icon:not(.f-image){background-color:var(--kup-title-color);margin:0 0.25em;height:1.25em;width:1.25em}.kup-icon:not(.f-image).kup-ascending-icon,.kup-icon:not(.f-image).kup-descending-icon,.kup-icon:not(.f-image).kup-key-icon,.kup-icon:not(.f-image).kup-filter-remove-icon{height:auto}.kup-icon:not(.f-image).kup-collapsed-icon,.kup-icon:not(.f-image).kup-expanded-icon{float:left}.kup-icon:not(.f-image).kup-filter-remove-icon,.kup-icon:not(.f-image).kup-key-icon{margin:0 0.25em}.below-wrapper{backface-visibility:hidden;height:auto;overflow:auto}.below-wrapper.custom-size{overflow:unset}.below-wrapper.custom-size table{overflow:auto}.below-wrapper:not(.custom-size){overflow-x:auto}.density-dense .header-cell__content{padding:var(--kup-fcell-padding-dense, var(--kup_fcell_padding_dense))}.density-dense tbody>tr.group td{padding-top:0.25em;padding-bottom:0.25em}.density-medium .header-cell__content{padding:var(--kup-fcell-padding-medium, var(--kup_fcell_padding_medium))}.density-medium tbody>tr.group>td{padding-top:0.5em;padding-bottom:0.5em}.density-wide .header-cell__content{padding:var(--kup-fcell-padding-wide, var(--kup_fcell_padding_wide))}.density-wide tbody>tr.group>td{padding-top:0.75em;padding-bottom:0.75em}.fontsize-small{font-size:calc(var(--kup_datatable_font_size) * 0.75);transition:font-size 0.1s}.fontsize-small .group-cell-content>span:before{font-size:calc(var(--kup_datatable_font_size) * 1) !important}.fontsize-big{font-size:calc(var(--kup_datatable_font_size) * 1.25);transition:font-size 0.1s}.fontsize-big .group-cell-content>span:before{font-size:calc(var(--kup_datatable_font_size) * 1.5) !important}th{background-color:var(--kup_datatable_th_background_color);border:var(--kup_datatable_th_border);border-left:0 none;box-sizing:border-box;top:0;touch-action:none;transition:background-color 0.25s ease;user-select:none}th:last-of-type{border-right:none}.header-cell__content{color:var(--kup-text-primary);display:flex;justify-content:space-between;padding:0.5em var(--kup-space-03);text-overflow:ellipsis;white-space:nowrap;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.header-cell--centered .header-cell__content{justify-content:center}.header-cell--is-number .header-cell__content{justify-content:flex-end}.header-cell__title{overflow:hidden;text-overflow:ellipsis;user-select:none}.header-cell__icons{display:flex}.header-cell__icons .kup-icon{background-color:var(--kup-text-primary)}.header-cell__drag-handler{background:var(--kup-border-strong);height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:var(--kup-space-01)}.header-cell__drag-handler:hover{background:var(--kup-border-strong-hover)}.header-cell--sortable{cursor:pointer}.header-cell--is-icon{width:30px}tbody{cursor:auto}tbody td{height:0;padding:0;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px;font-size:13px}tbody td>*{border:none !important}tbody tr kup-button{max-width:max-content}tbody tr[kup-draggable]{opacity:0.5}tbody tr.selected td{background-color:var(--kup_datatable_background_color_selected)}tbody tr:hover:not(.group):not(.selected) td{color:var(--kup_datatable_text_color_hover);background-color:var(--kup_datatable_background_color_hover)}tbody tr.group{background:var(--kup-layer-1-selected);border-top:var(--kup_datatable_border);color:var(--kup-text-secondary);font-weight:bold;cursor:pointer}tbody tr.group.group-label{border-bottom:none}tbody tr.group.group-total{border-top:none;line-height:0.5em}tbody tr.group>td{padding:0.5em 0}tbody tr.group>td .group-cell-content .indent{float:left;margin-left:0.25em}tbody tr.group>td .group-cell-content>span{display:inline-flex;outline:none;margin-left:0.25em;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}tbody tr.group>td .group-cell-content .kup-icon{background-color:var(--kup-text-secondary)}tbody tr.group>td.total{border-bottom:1px solid var(--kup-border-subtle-selected);text-align:right;padding:0.5em var(--kup-space-03);font-family:var(--kup_datatable_font_family_monospace)}tbody tr.group>td.total.negative-number{color:var(--kup-danger-color-60)}tbody tr>td{box-sizing:border-box;transition:box-shadow 0.1s}tbody tr>td .row-expander{margin-right:0.5em}tbody tr>td .row-action{margin-right:0.2em}tbody tr [row-select-cell]{min-height:40px}tbody tr td[row-action-cell]{width:calc(3em * var(--kup_datatable_row_actions))}tbody tr td[row-action-cell] .f-image{cursor:pointer;margin-left:0.75em;display:inline-block;opacity:1;transition:0.25s ease-in-out}tbody tr td[row-action-cell] .f-image:hover{opacity:0.5}.kup-icon.overlay-action{display:none;position:absolute;top:0.5em;left:calc(50% - 0.625em)}th:hover .kup-icon.overlay-action{display:block}thead th{position:relative}th.obj:hover span:not(.overlay-action){opacity:0.5}.hidden span{color:transparent;position:relative;text-overflow:ellipsis;transition:color 200ms}.hidden span:hover{color:var(--kup-text-secondary)}.group-wrapper{--kup-chip-margin:0 4px}.totals-value{font-weight:bold;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px;font-size:13px;font-family:var(--kup_datatable_font_family_monospace)}.totals-value.danger-text{color:var(--kup-danger-color-60) !important}.settings-trigger{cursor:pointer;display:block;width:32px;height:0;border-top-left-radius:25px 30px;border-top-right-radius:25px 30px;background-color:var(--kup-border-subtle);transition:height 0.25s}.settings-trigger.toggled{background-color:var(--kup-primary-color)}.settings-trigger.toggled .f-image__icon{background:var(--kup-text-on-primary-color) !important}.indent{display:inline-block;height:1em;width:2em}.indent~kup-image,.indent~kup-button{margin:0;vertical-align:middle}.indent~kup-image{display:inline-block}.indent~kup-button,.indent~kup-checkbox{display:inline-block}.actions-wrapper{display:flex;justify-content:flex-end;background-color:var(--kup-layer-1)}.actions-wrapper .insert-button .f-button .icon-button,.actions-wrapper .delete-button .f-button .icon-button,.actions-wrapper .history-button .f-button .icon-button,.actions-wrapper .save-button .f-button .icon-button{padding:0.55em}.actions-wrapper.paginator-top{border-left:var(--kup_datatable_border)}.kup-icon.kup-ascending-icon{-webkit-mask:var(--kup-ascending-icon);mask:var(--kup-ascending-icon)}.kup-icon.kup-collapsed-icon{-webkit-mask:var(--kup-collapsed-icon);mask:var(--kup-collapsed-icon)}.kup-icon.kup-descending-icon{-webkit-mask:var(--kup-descending-icon);mask:var(--kup-descending-icon)}.kup-icon.kup-expanded-icon{-webkit-mask:var(--kup-expanded-icon);mask:var(--kup-expanded-icon)}.kup-icon.kup-filter-remove-icon{-webkit-mask:var(--kup-filter-remove-icon);mask:var(--kup-filter-remove-icon)}.kup-icon.kup-key-icon{-webkit-mask:var(--kup-key-icon);mask:var(--kup-key-icon)}@media (max-width: 678px){.actions-wrapper{flex-direction:column-reverse}#kup-component.auto-width{width:auto}}:host([legacy-look]){--kup-textfield-background-color:transparent;--kup-fcell-width:100%;--kup-fcell-padding-dense:0px;--kup-dense-legacy-look-padding:var(--kup-space-00) var(--kup-space-03);--kup-textfield-extrasmall-padding:var(--kup-dense-legacy-look-padding)}:host([legacy-look]) th .header-cell__content{font-family:var(--kup_datatable_font_family_monospace);white-space:pre !important;font-size:11px;padding:var(--kup-dense-legacy-look-padding)}:host([legacy-look]) .f-cell__text{padding:var(--kup-dense-legacy-look-padding)}:host([legacy-look]) .f-cell.dense{min-height:var(--kup_fcell_dense_min_height)}:host([legacy-look]) .f-cell.medium{min-height:var(--kup_fcell_medium_min_height)}:host([legacy-look]) .f-cell.wide{min-height:var(--kup_fcell_wide_min_height)}.paginator-wrapper{display:flex;flex-flow:wrap}.paginator-tabs{width:100%}.paginator-tabs kup-paginator{display:inline-flex}.paginator-tabs kup-button{position:relative;height:100%;margin-left:0.25em;float:right}@media (max-width: 500px){.paginator-wrapper{min-width:fit-content}.above-wrapper.paginator-top{border-bottom:1px solid var(--kup-border-subtle)}}sticky-header{display:none}.persistent-header~sticky-header{background:var(--kup-gray-color-20);color:var(--kup-title-color);display:block;opacity:0;overflow:hidden;pointer-events:none;position:fixed;top:0;transition:opacity 0.25s ease-in-out;z-index:10}.persistent-header~sticky-header.activated{opacity:1;pointer-events:all}.persistent-header~sticky-header[hidden]{display:none}.persistent-header~sticky-header tr-sticky{display:inline-flex}.persistent-header~sticky-header th-sticky{box-sizing:border-box;display:inline-flex;padding:0 0.3125em}.persistent-header~sticky-header th-sticky .header-cell__content{width:100%}.fixed-column-r,.fixed-column,.fixed-row{background-color:var(--kup_datatable_background_color);color:var(--kup-text-color);position:sticky}thead .fixed-column-r,thead .fixed-column,thead .fixed-row,tfoot .fixed-column-r,tfoot .fixed-column,tfoot .fixed-row{z-index:10}table.custom-size th{position:sticky;inset-block-start:0;z-index:10}table.custom-size th.fixed-column,table.custom-size th.fixed-column-r{z-index:11}table.custom-size tfoot td{position:sticky;inset-block-end:0;z-index:10}table.custom-size tfoot td.fixed-column{z-index:11}tr:hover .fixed-row,tr:hover .fixed-column,tr:hover .fixed-column-r{background-color:var(--kup-gray-color-20)}tr.selected .fixed-column,tr.selected .fixed-row,tr.selected .fixed-row-r{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-primary-color-rgb), 0.175) 0%, rgba(var(--kup-primary-color-rgb), 0.175) 0.1%, rgba(var(--kup-primary-color-rgb), 0.175))}.fixed-row{top:0;z-index:4}.fixed-column{left:0;z-index:6}.fixed-column.fixed-row{z-index:8}.fixed-column-r{right:0;z-index:6}.fixed-column-r.fixed-row{z-index:8}thead tr .fixed-column,thead tr:hover:not(.group):not(.selected) .fixed-column,thead tr .fixed-column-r,thead tr:hover:not(.group):not(.selected) .fixed-column-r{background-color:var(--kup-gray-color-20)}tfoot tr:hover:not(.group):not(.selected) .fixed-row,tfoot tr:hover:not(.group):not(.selected) .fixed-column,tfoot tr:hover:not(.group):not(.selected) .fixed-column-r{background-color:var(--kup-gray-color-20)}:host([drag-enabled]) tr{touch-action:none}th[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}th[kup-draggable]{cursor:grabbing !important;opacity:0.5}.droparea{animation:fade-in 0.25s ease-out;background:var(--kup_datatable_background_color);border-radius:8px;box-shadow:var(--kup-box-shadow);display:none;padding:1em 0.5em}.droparea--visible{display:flex}.droparea__groups{border:2px dashed var(--kup-text-color)}.droparea__remove{border:2px dashed var(--kup-danger-color-60)}.droparea__groups,.droparea__remove{background:var(--kup_datatable_background_color);box-shadow:var(--kup-box-shadow);display:block;height:50px;margin:0 0.5em;opacity:0.5;position:relative;transition:opacity 0.25s;width:50px}.droparea__groups .f-image,.droparea__remove .f-image{width:100%;position:absolute}.droparea__groups .f-image:first-of-type,.droparea__remove .f-image:first-of-type{opacity:1}.droparea__groups .f-image:last-of-type,.droparea__remove .f-image:last-of-type{opacity:0}.droparea__groups[kup-drag-over],.droparea__remove[kup-drag-over]{opacity:1}.droparea__groups[kup-drag-over] .f-image:first-of-type,.droparea__remove[kup-drag-over] .f-image:first-of-type{opacity:0}.droparea__groups[kup-drag-over] .f-image:last-of-type,.droparea__remove[kup-drag-over] .f-image:last-of-type{opacity:1}:host(.kup-cross-selection) #kup-component th.selected{box-shadow:inset 0px 4px 0px 0px var(--kup-secondary-color)}:host(.kup-cross-selection) #kup-component tbody td.selected{background-color:rgba(var(--kup-text-color-rgb), 0.075)}:host(.kup-cross-selection) #kup-component tbody td.selected.fixed-column,:host(.kup-cross-selection) #kup-component tbody td.selected.fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.075) 0%, rgba(var(--kup-text-color-rgb), 0.075) 0.1%, rgba(var(--kup-text-color-rgb), 0.075))}:host(.kup-cross-selection) #kup-component tr.selected td{background-color:var(--kup-gray-color-20)}:host(.kup-cross-selection) #kup-component tr.selected td:first-of-type{box-shadow:inset 4px 0px 0px 0px var(--kup-secondary-color)}:host(.kup-cross-selection) #kup-component tr.selected td.selected{background-color:rgba(var(--kup-text-color-rgb), 0.15)}:host(.kup-cross-selection) #kup-component tr.selected td.fixed-column,:host(.kup-cross-selection) #kup-component tr.selected td.fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.075) 0%, rgba(var(--kup-text-color-rgb), 0.075) 0.1%, rgba(var(--kup-text-color-rgb), 0.075))}:host(.kup-cross-selection) #kup-component tr.selected td.fixed-column.selected,:host(.kup-cross-selection) #kup-component tr.selected td.fixed-row.selected{background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.15) 0%, rgba(var(--kup-text-color-rgb), 0.15) 0.1%, rgba(var(--kup-text-color-rgb), 0.15))}:host(.kup-layout-fixed) #kup-component table{table-layout:fixed;width:100%}tr.clickable{cursor:pointer}.commands{display:flex;gap:1px}";
|
|
8561
8561
|
const KupDataTableStyle0 = kupDataTableCss;
|
|
8562
8562
|
|
|
8563
|
-
var __classPrivateFieldGet$
|
|
8563
|
+
var __classPrivateFieldGet$7 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8564
8564
|
if (kind === "a" && !f)
|
|
8565
8565
|
throw new TypeError("Private accessor was defined without a getter");
|
|
8566
8566
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -8705,18 +8705,18 @@ const KupDataTable = class {
|
|
|
8705
8705
|
_KupDataTable_INSERT_PREFIX.set(this, 'insert_');
|
|
8706
8706
|
_KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER.set(this, 50);
|
|
8707
8707
|
_KupDataTable_stickyHeaderPosition.set(this, () => {
|
|
8708
|
-
if (__classPrivateFieldGet$
|
|
8709
|
-
if (__classPrivateFieldGet$
|
|
8710
|
-
if (!__classPrivateFieldGet$
|
|
8711
|
-
__classPrivateFieldGet$
|
|
8712
|
-
__classPrivateFieldGet$
|
|
8708
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f")) {
|
|
8709
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_tableIntersecting, "f")) {
|
|
8710
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_theadIntersecting, "f")) {
|
|
8711
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_updateStickyHeaderSize).call(this);
|
|
8712
|
+
__classPrivateFieldGet$7(this, _KupDataTable_stickyTheadRef, "f").classList.add('activated');
|
|
8713
8713
|
}
|
|
8714
8714
|
else {
|
|
8715
|
-
__classPrivateFieldGet$
|
|
8715
|
+
__classPrivateFieldGet$7(this, _KupDataTable_stickyTheadRef, "f").classList.remove('activated');
|
|
8716
8716
|
}
|
|
8717
8717
|
}
|
|
8718
8718
|
else {
|
|
8719
|
-
__classPrivateFieldGet$
|
|
8719
|
+
__classPrivateFieldGet$7(this, _KupDataTable_stickyTheadRef, "f").classList.remove('activated');
|
|
8720
8720
|
}
|
|
8721
8721
|
}
|
|
8722
8722
|
});
|
|
@@ -8724,8 +8724,8 @@ const KupDataTable = class {
|
|
|
8724
8724
|
this.kupUpdate.emit({
|
|
8725
8725
|
comp: this,
|
|
8726
8726
|
id: this.rootElement.id,
|
|
8727
|
-
originalData: __classPrivateFieldGet$
|
|
8728
|
-
updatedData: kupDataTableHelper.getDiffData(__classPrivateFieldGet$
|
|
8727
|
+
originalData: __classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f"),
|
|
8728
|
+
updatedData: kupDataTableHelper.getDiffData(__classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f"), this.data, true),
|
|
8729
8729
|
command: command,
|
|
8730
8730
|
});
|
|
8731
8731
|
});
|
|
@@ -8827,7 +8827,7 @@ const KupDataTable = class {
|
|
|
8827
8827
|
if (this.store && this.stateId) {
|
|
8828
8828
|
const state = this.store.getState(this.stateId);
|
|
8829
8829
|
if (state != null) {
|
|
8830
|
-
__classPrivateFieldGet$
|
|
8830
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Initializing stateId ' + this.stateId);
|
|
8831
8831
|
// *** PROPS ***
|
|
8832
8832
|
this.filters = Object.assign({}, state.filters);
|
|
8833
8833
|
this.groups = [...state.groups];
|
|
@@ -8867,120 +8867,120 @@ const KupDataTable = class {
|
|
|
8867
8867
|
persistState() {
|
|
8868
8868
|
if (this.store && this.stateId) {
|
|
8869
8869
|
let somethingChanged = false;
|
|
8870
|
-
if (!__classPrivateFieldGet$
|
|
8870
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.filters, this.filters)) {
|
|
8871
8871
|
this.state.filters = Object.assign({}, this.filters);
|
|
8872
8872
|
somethingChanged = true;
|
|
8873
8873
|
}
|
|
8874
|
-
if (!__classPrivateFieldGet$
|
|
8874
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.groups, this.groups)) {
|
|
8875
8875
|
this.state.groups = [...this.groups];
|
|
8876
8876
|
somethingChanged = true;
|
|
8877
8877
|
}
|
|
8878
|
-
if (!__classPrivateFieldGet$
|
|
8878
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sort, this.sort)) {
|
|
8879
8879
|
this.state.sort = [...this.sort];
|
|
8880
8880
|
somethingChanged = true;
|
|
8881
8881
|
}
|
|
8882
|
-
if (!__classPrivateFieldGet$
|
|
8882
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.expandGroups, this.expandGroups)) {
|
|
8883
8883
|
this.state.expandGroups = this.expandGroups;
|
|
8884
8884
|
somethingChanged = true;
|
|
8885
8885
|
}
|
|
8886
|
-
if (!__classPrivateFieldGet$
|
|
8886
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.groupLabelDisplay, this.groupLabelDisplay)) {
|
|
8887
8887
|
this.state.groupLabelDisplay = this.groupLabelDisplay;
|
|
8888
8888
|
somethingChanged = true;
|
|
8889
8889
|
}
|
|
8890
|
-
if (!__classPrivateFieldGet$
|
|
8890
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.density, this.density)) {
|
|
8891
8891
|
this.state.density = this.density;
|
|
8892
8892
|
somethingChanged = true;
|
|
8893
8893
|
}
|
|
8894
|
-
if (!__classPrivateFieldGet$
|
|
8894
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.enableExtraColumns, this.enableExtraColumns)) {
|
|
8895
8895
|
this.state.enableExtraColumns = this.enableExtraColumns;
|
|
8896
8896
|
somethingChanged = true;
|
|
8897
8897
|
}
|
|
8898
|
-
if (!__classPrivateFieldGet$
|
|
8898
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.enableSortableColumns, this.enableSortableColumns)) {
|
|
8899
8899
|
this.state.enableSortableColumns = this.enableSortableColumns;
|
|
8900
8900
|
somethingChanged = true;
|
|
8901
8901
|
}
|
|
8902
|
-
if (!__classPrivateFieldGet$
|
|
8902
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.forceOneLine, this.forceOneLine)) {
|
|
8903
8903
|
this.state.forceOneLine = this.forceOneLine;
|
|
8904
8904
|
somethingChanged = true;
|
|
8905
8905
|
}
|
|
8906
|
-
if (!__classPrivateFieldGet$
|
|
8906
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.globalFilter, this.globalFilter)) {
|
|
8907
8907
|
this.state.globalFilter = this.globalFilter;
|
|
8908
8908
|
somethingChanged = true;
|
|
8909
8909
|
}
|
|
8910
|
-
if (!__classPrivateFieldGet$
|
|
8910
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
8911
8911
|
this.state.globalFilterValue = this.globalFilterValue;
|
|
8912
8912
|
somethingChanged = true;
|
|
8913
8913
|
}
|
|
8914
|
-
if (!__classPrivateFieldGet$
|
|
8914
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.headerIsPersistent, this.headerIsPersistent)) {
|
|
8915
8915
|
this.state.headerIsPersistent = this.headerIsPersistent;
|
|
8916
8916
|
somethingChanged = true;
|
|
8917
8917
|
}
|
|
8918
|
-
if (!__classPrivateFieldGet$
|
|
8918
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.lazyLoadRows, this.lazyLoadRows)) {
|
|
8919
8919
|
this.state.lazyLoadRows = this.lazyLoadRows;
|
|
8920
8920
|
somethingChanged = true;
|
|
8921
8921
|
}
|
|
8922
|
-
if (!__classPrivateFieldGet$
|
|
8922
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.loadMoreLimit, this.loadMoreLimit)) {
|
|
8923
8923
|
this.state.loadMoreLimit = this.loadMoreLimit;
|
|
8924
8924
|
somethingChanged = true;
|
|
8925
8925
|
}
|
|
8926
|
-
if (!__classPrivateFieldGet$
|
|
8926
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.selection, this.selection)) {
|
|
8927
8927
|
this.state.selection = this.selection;
|
|
8928
8928
|
somethingChanged = true;
|
|
8929
8929
|
}
|
|
8930
|
-
if (!__classPrivateFieldGet$
|
|
8930
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
|
|
8931
8931
|
this.state.rowsPerPage = this.currentRowsPerPage;
|
|
8932
8932
|
somethingChanged = true;
|
|
8933
8933
|
}
|
|
8934
|
-
if (!__classPrivateFieldGet$
|
|
8934
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showFilters, this.showFilters)) {
|
|
8935
8935
|
this.state.showFilters = this.showFilters;
|
|
8936
8936
|
somethingChanged = true;
|
|
8937
8937
|
}
|
|
8938
|
-
if (!__classPrivateFieldGet$
|
|
8938
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showGroups, this.showGroups)) {
|
|
8939
8939
|
this.state.showGroups = this.showGroups;
|
|
8940
8940
|
somethingChanged = true;
|
|
8941
8941
|
}
|
|
8942
|
-
if (!__classPrivateFieldGet$
|
|
8942
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showHeader, this.showHeader)) {
|
|
8943
8943
|
this.state.showHeader = this.showHeader;
|
|
8944
8944
|
somethingChanged = true;
|
|
8945
8945
|
}
|
|
8946
|
-
if (!__classPrivateFieldGet$
|
|
8946
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showLoadMore, this.showLoadMore)) {
|
|
8947
8947
|
this.state.showLoadMore = this.showLoadMore;
|
|
8948
8948
|
somethingChanged = true;
|
|
8949
8949
|
}
|
|
8950
|
-
if (!__classPrivateFieldGet$
|
|
8950
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showPaginator, this.showPaginator)) {
|
|
8951
8951
|
this.state.showPaginator = this.showPaginator;
|
|
8952
8952
|
somethingChanged = true;
|
|
8953
8953
|
}
|
|
8954
|
-
if (!__classPrivateFieldGet$
|
|
8954
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sortEnabled, this.sortEnabled)) {
|
|
8955
8955
|
this.state.sortEnabled = this.sortEnabled;
|
|
8956
8956
|
somethingChanged = true;
|
|
8957
8957
|
}
|
|
8958
|
-
if (!__classPrivateFieldGet$
|
|
8958
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sortableColumnsMutateData, this.sortableColumnsMutateData)) {
|
|
8959
8959
|
this.state.sortableColumnsMutateData =
|
|
8960
8960
|
this.sortableColumnsMutateData;
|
|
8961
8961
|
somethingChanged = true;
|
|
8962
8962
|
}
|
|
8963
|
-
if (!__classPrivateFieldGet$
|
|
8963
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.pageSelected, this.currentPage)) {
|
|
8964
8964
|
this.state.pageSelected = this.currentPage;
|
|
8965
8965
|
somethingChanged = true;
|
|
8966
8966
|
}
|
|
8967
|
-
if (!__classPrivateFieldGet$
|
|
8967
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.dragEnabled, this.dragEnabled)) {
|
|
8968
8968
|
this.state.dragEnabled = this.dragEnabled;
|
|
8969
8969
|
somethingChanged = true;
|
|
8970
8970
|
}
|
|
8971
|
-
if (!__classPrivateFieldGet$
|
|
8971
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.dropEnabled, this.dropEnabled)) {
|
|
8972
8972
|
this.state.dropEnabled = this.dropEnabled;
|
|
8973
8973
|
somethingChanged = true;
|
|
8974
8974
|
}
|
|
8975
|
-
if (!__classPrivateFieldGet$
|
|
8975
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showFooter, this.showFooter)) {
|
|
8976
8976
|
this.state.showFooter = this.showFooter;
|
|
8977
8977
|
somethingChanged = true;
|
|
8978
8978
|
}
|
|
8979
|
-
if (!__classPrivateFieldGet$
|
|
8979
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.totals, this.totals)) {
|
|
8980
8980
|
this.state.totals = Object.assign({}, this.totals);
|
|
8981
8981
|
somethingChanged = true;
|
|
8982
8982
|
}
|
|
8983
|
-
if (!__classPrivateFieldGet$
|
|
8983
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.selectRowsById, this.selectedRows.reduce((accumulator, row, currentIndex) => {
|
|
8984
8984
|
const prefix = currentIndex > 0 ? ';' : '';
|
|
8985
8985
|
return accumulator + prefix + row.id;
|
|
8986
8986
|
}, ''))) {
|
|
@@ -8990,7 +8990,7 @@ const KupDataTable = class {
|
|
|
8990
8990
|
}, '');
|
|
8991
8991
|
somethingChanged = true;
|
|
8992
8992
|
}
|
|
8993
|
-
if (!__classPrivateFieldGet$
|
|
8993
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.visibleColumns, this.visibleColumns)) {
|
|
8994
8994
|
this.state.visibleColumns = [...this.visibleColumns];
|
|
8995
8995
|
somethingChanged = true;
|
|
8996
8996
|
}
|
|
@@ -8999,7 +8999,7 @@ const KupDataTable = class {
|
|
|
8999
8999
|
return;
|
|
9000
9000
|
}
|
|
9001
9001
|
if (somethingChanged) {
|
|
9002
|
-
__classPrivateFieldGet$
|
|
9002
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
|
|
9003
9003
|
this.store.persistState(this.stateId, this.state);
|
|
9004
9004
|
}
|
|
9005
9005
|
}
|
|
@@ -9008,19 +9008,19 @@ const KupDataTable = class {
|
|
|
9008
9008
|
this.currentRowsPerPage = newValue;
|
|
9009
9009
|
}
|
|
9010
9010
|
expandGroupsHandler() {
|
|
9011
|
-
if (!__classPrivateFieldGet$
|
|
9011
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_isRestoringState, "f")) {
|
|
9012
9012
|
this.recalculateRows();
|
|
9013
9013
|
// reset group state
|
|
9014
9014
|
this.groupState = {};
|
|
9015
|
-
__classPrivateFieldGet$
|
|
9015
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_forceGroupExpansion).call(this);
|
|
9016
9016
|
}
|
|
9017
9017
|
}
|
|
9018
9018
|
filtersChanged() {
|
|
9019
9019
|
this.expandGroupsHandler();
|
|
9020
9020
|
}
|
|
9021
9021
|
recalculateRows() {
|
|
9022
|
-
if (!__classPrivateFieldGet$
|
|
9023
|
-
__classPrivateFieldGet$
|
|
9022
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_isRestoringState, "f")) {
|
|
9023
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
9024
9024
|
}
|
|
9025
9025
|
}
|
|
9026
9026
|
identifyAndInitRows() {
|
|
@@ -9028,7 +9028,7 @@ const KupDataTable = class {
|
|
|
9028
9028
|
kupManager$1.identify(this.getRows());
|
|
9029
9029
|
}
|
|
9030
9030
|
this.expandGroupsHandler();
|
|
9031
|
-
__classPrivateFieldGet$
|
|
9031
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
9032
9032
|
}
|
|
9033
9033
|
decorateAndInitForUpdTable() {
|
|
9034
9034
|
var _a, _b, _c;
|
|
@@ -9042,8 +9042,8 @@ const KupDataTable = class {
|
|
|
9042
9042
|
? kupManager$1.SelectionMode.MULTIPLE_CHECKBOX
|
|
9043
9043
|
: this.selection;
|
|
9044
9044
|
__classPrivateFieldSet$3(this, _KupDataTable_insertedRowIds, [], "f");
|
|
9045
|
-
__classPrivateFieldSet$3(this, _KupDataTable_originalDataLoadedMaxId, ((_c = __classPrivateFieldGet$
|
|
9046
|
-
? Math.max(...__classPrivateFieldGet$
|
|
9045
|
+
__classPrivateFieldSet$3(this, _KupDataTable_originalDataLoadedMaxId, ((_c = __classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f").rows) === null || _c === void 0 ? void 0 : _c.length) > 0
|
|
9046
|
+
? Math.max(...__classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f").rows.map((r) => parseInt(r.id)))
|
|
9047
9047
|
: -1, "f");
|
|
9048
9048
|
}
|
|
9049
9049
|
}
|
|
@@ -9052,22 +9052,22 @@ const KupDataTable = class {
|
|
|
9052
9052
|
if (((_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.columns) === null || _b === void 0 ? void 0 : _b.length) > 0 && ((_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c.rows) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
9053
9053
|
const columnsNumber = this.data.columns.length;
|
|
9054
9054
|
const cellsNumber = this.data.rows.reduce((acc, r) => acc + Object.keys(r.cells).length, 0);
|
|
9055
|
-
const maxCellsNumberPerPage = __classPrivateFieldGet$
|
|
9055
|
+
const maxCellsNumberPerPage = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").perfTuning.data.maxCellsPerPage;
|
|
9056
9056
|
if (cellsNumber > maxCellsNumberPerPage) {
|
|
9057
9057
|
// Rounds a number up to the nearest multiple of ten.
|
|
9058
9058
|
__classPrivateFieldSet$3(this, _KupDataTable_maxRowsPerPage, Math.ceil(maxCellsNumberPerPage / columnsNumber / 10) * 10, "f");
|
|
9059
9059
|
}
|
|
9060
|
-
if (this.rowsPerPage > __classPrivateFieldGet$
|
|
9061
|
-
this.rowsPerPage = __classPrivateFieldGet$
|
|
9060
|
+
if (this.rowsPerPage > __classPrivateFieldGet$7(this, _KupDataTable_maxRowsPerPage, "f"))
|
|
9061
|
+
this.rowsPerPage = __classPrivateFieldGet$7(this, _KupDataTable_maxRowsPerPage, "f");
|
|
9062
9062
|
}
|
|
9063
9063
|
}
|
|
9064
9064
|
recalculateRowsAndUndoSelections() {
|
|
9065
|
-
if (!__classPrivateFieldGet$
|
|
9065
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_isRestoringState, "f")) {
|
|
9066
9066
|
this.recalculateRows();
|
|
9067
9067
|
// reset group state
|
|
9068
9068
|
this.groupState = {};
|
|
9069
|
-
__classPrivateFieldGet$
|
|
9070
|
-
__classPrivateFieldGet$
|
|
9069
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_forceGroupExpansion).call(this);
|
|
9070
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
9071
9071
|
}
|
|
9072
9072
|
}
|
|
9073
9073
|
controlFixedRowsColumns() {
|
|
@@ -9086,8 +9086,8 @@ const KupDataTable = class {
|
|
|
9086
9086
|
}
|
|
9087
9087
|
}
|
|
9088
9088
|
recalculateData() {
|
|
9089
|
-
if (__classPrivateFieldGet$
|
|
9090
|
-
__classPrivateFieldGet$
|
|
9089
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_initialized, "f")) {
|
|
9090
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_calculateData).call(this);
|
|
9091
9091
|
}
|
|
9092
9092
|
}
|
|
9093
9093
|
/**
|
|
@@ -9095,14 +9095,14 @@ const KupDataTable = class {
|
|
|
9095
9095
|
*/
|
|
9096
9096
|
async closeColumnMenu() {
|
|
9097
9097
|
this.columnMenuAnchor = null;
|
|
9098
|
-
if (__classPrivateFieldGet$
|
|
9099
|
-
__classPrivateFieldGet$
|
|
9098
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f")) {
|
|
9099
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").data = null;
|
|
9100
9100
|
}
|
|
9101
|
-
__classPrivateFieldGet$
|
|
9101
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuInstance, "f").close(__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f"));
|
|
9102
9102
|
this.kupDataTableColumnMenu.emit({
|
|
9103
9103
|
comp: this,
|
|
9104
9104
|
id: this.rootElement.id,
|
|
9105
|
-
card: __classPrivateFieldGet$
|
|
9105
|
+
card: __classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f"),
|
|
9106
9106
|
event: null,
|
|
9107
9107
|
open: false,
|
|
9108
9108
|
});
|
|
@@ -9145,8 +9145,8 @@ const KupDataTable = class {
|
|
|
9145
9145
|
* Closes the insert new record card (called by backend, on success)
|
|
9146
9146
|
*/
|
|
9147
9147
|
async closeInsertCard() {
|
|
9148
|
-
if (__classPrivateFieldGet$
|
|
9149
|
-
__classPrivateFieldGet$
|
|
9148
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f")) {
|
|
9149
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").remove();
|
|
9150
9150
|
__classPrivateFieldSet$3(this, _KupDataTable_insertCard, null, "f");
|
|
9151
9151
|
}
|
|
9152
9152
|
}
|
|
@@ -9154,8 +9154,8 @@ const KupDataTable = class {
|
|
|
9154
9154
|
* Closes the delete confirm card (called by backend, on success)
|
|
9155
9155
|
*/
|
|
9156
9156
|
async closeConfirmDeleteCard() {
|
|
9157
|
-
if (__classPrivateFieldGet$
|
|
9158
|
-
__classPrivateFieldGet$
|
|
9157
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteDialog, "f")) {
|
|
9158
|
+
__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteDialog, "f").close();
|
|
9159
9159
|
__classPrivateFieldSet$3(this, _KupDataTable_confirmDeleteCard, null, "f");
|
|
9160
9160
|
__classPrivateFieldSet$3(this, _KupDataTable_confirmDeleteDialog, null, "f");
|
|
9161
9161
|
}
|
|
@@ -9165,23 +9165,23 @@ const KupDataTable = class {
|
|
|
9165
9165
|
*/
|
|
9166
9166
|
async getCards() {
|
|
9167
9167
|
const obj = {};
|
|
9168
|
-
if (__classPrivateFieldGet$
|
|
9168
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f")) {
|
|
9169
9169
|
obj['insertCard'] = {
|
|
9170
|
-
el: __classPrivateFieldGet$
|
|
9171
|
-
messageWrapper: __classPrivateFieldGet$
|
|
9172
|
-
message: __classPrivateFieldGet$
|
|
9173
|
-
submitButton: __classPrivateFieldGet$
|
|
9174
|
-
cancelButton: __classPrivateFieldGet$
|
|
9175
|
-
form: __classPrivateFieldGet$
|
|
9170
|
+
el: __classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f"),
|
|
9171
|
+
messageWrapper: __classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$7(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f")),
|
|
9172
|
+
message: __classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$7(this, _KupDataTable_MESSAGE_ID, "f")),
|
|
9173
|
+
submitButton: __classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$7(this, _KupDataTable_BUTTON_SUBMIT_ID, "f")),
|
|
9174
|
+
cancelButton: __classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$7(this, _KupDataTable_BUTTON_CANCEL_ID, "f")),
|
|
9175
|
+
form: __classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$7(this, _KupDataTable_FIELDS_FORM_ID, "f")),
|
|
9176
9176
|
};
|
|
9177
9177
|
}
|
|
9178
|
-
if (__classPrivateFieldGet$
|
|
9178
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f")) {
|
|
9179
9179
|
obj['confirmDeleteCard'] = {
|
|
9180
|
-
el: __classPrivateFieldGet$
|
|
9181
|
-
messageWrapper: __classPrivateFieldGet$
|
|
9182
|
-
message: __classPrivateFieldGet$
|
|
9183
|
-
submitButton: __classPrivateFieldGet$
|
|
9184
|
-
cancelButton: __classPrivateFieldGet$
|
|
9180
|
+
el: __classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f"),
|
|
9181
|
+
messageWrapper: __classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$7(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f")),
|
|
9182
|
+
message: __classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$7(this, _KupDataTable_MESSAGE_ID, "f")),
|
|
9183
|
+
submitButton: __classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$7(this, _KupDataTable_BUTTON_SUBMIT_ID, "f")),
|
|
9184
|
+
cancelButton: __classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$7(this, _KupDataTable_BUTTON_CANCEL_ID, "f")),
|
|
9185
9185
|
};
|
|
9186
9186
|
}
|
|
9187
9187
|
/*
|
|
@@ -9241,7 +9241,7 @@ const KupDataTable = class {
|
|
|
9241
9241
|
*/
|
|
9242
9242
|
async hideColumn(column) {
|
|
9243
9243
|
var _a;
|
|
9244
|
-
__classPrivateFieldGet$
|
|
9244
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.column.hide(this.data, [column.name]);
|
|
9245
9245
|
if ((_a = this.visibleColumns) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9246
9246
|
this.visibleColumns = this.visibleColumns.filter((colName) => colName != column.name);
|
|
9247
9247
|
}
|
|
@@ -9258,8 +9258,8 @@ const KupDataTable = class {
|
|
|
9258
9258
|
async setGroupExpansionByDepth(modifier) {
|
|
9259
9259
|
const toStream = () => {
|
|
9260
9260
|
const streamlined = [];
|
|
9261
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9262
|
-
const row = __classPrivateFieldGet$
|
|
9261
|
+
for (let index = 0; index < __classPrivateFieldGet$7(this, _KupDataTable_paginatedRows, "f").length; index++) {
|
|
9262
|
+
const row = __classPrivateFieldGet$7(this, _KupDataTable_paginatedRows, "f")[index];
|
|
9263
9263
|
const group = row.group;
|
|
9264
9264
|
if (group) {
|
|
9265
9265
|
recursive(row);
|
|
@@ -9294,7 +9294,7 @@ const KupDataTable = class {
|
|
|
9294
9294
|
}
|
|
9295
9295
|
};
|
|
9296
9296
|
const getGroupDepth = () => {
|
|
9297
|
-
const firstGroup = __classPrivateFieldGet$
|
|
9297
|
+
const firstGroup = __classPrivateFieldGet$7(this, _KupDataTable_rows, "f")[0];
|
|
9298
9298
|
let maxDepth = 0;
|
|
9299
9299
|
const traverseGroup = (row, currentDepth) => {
|
|
9300
9300
|
const group = row.group;
|
|
@@ -9313,14 +9313,14 @@ const KupDataTable = class {
|
|
|
9313
9313
|
};
|
|
9314
9314
|
const paginatedStream = toStream();
|
|
9315
9315
|
let maxDepth = getGroupDepth() + modifier;
|
|
9316
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9317
|
-
const row = __classPrivateFieldGet$
|
|
9316
|
+
for (let index = 0; index < __classPrivateFieldGet$7(this, _KupDataTable_rows, "f").length; index++) {
|
|
9317
|
+
const row = __classPrivateFieldGet$7(this, _KupDataTable_rows, "f")[index];
|
|
9318
9318
|
const group = row.group;
|
|
9319
9319
|
if (group) {
|
|
9320
9320
|
handleChildren(row, false, maxDepth, 0);
|
|
9321
9321
|
}
|
|
9322
9322
|
}
|
|
9323
|
-
__classPrivateFieldGet$
|
|
9323
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupState).call(this);
|
|
9324
9324
|
this.refresh();
|
|
9325
9325
|
}
|
|
9326
9326
|
/**
|
|
@@ -9330,7 +9330,7 @@ const KupDataTable = class {
|
|
|
9330
9330
|
* @returns {string|KupDataColumn} Returns the new column created or a string containing the error message if something went wrong.
|
|
9331
9331
|
*/
|
|
9332
9332
|
async newColumn(type, options) {
|
|
9333
|
-
const result = __classPrivateFieldGet$
|
|
9333
|
+
const result = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.column.new(this.data, type, options);
|
|
9334
9334
|
this.refresh();
|
|
9335
9335
|
return result;
|
|
9336
9336
|
}
|
|
@@ -9339,49 +9339,49 @@ const KupDataTable = class {
|
|
|
9339
9339
|
* @param {string} column - Name of the column.
|
|
9340
9340
|
*/
|
|
9341
9341
|
async openColumnMenu(column) {
|
|
9342
|
-
if (__classPrivateFieldGet$
|
|
9343
|
-
__classPrivateFieldGet$
|
|
9342
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f")) {
|
|
9343
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeColumnMenuCard).call(this);
|
|
9344
9344
|
}
|
|
9345
9345
|
this.columnMenuAnchor = column;
|
|
9346
9346
|
__classPrivateFieldSet$3(this, _KupDataTable_columnMenuCard, document.createElement('kup-card'), "f");
|
|
9347
|
-
__classPrivateFieldGet$
|
|
9348
|
-
__classPrivateFieldGet$
|
|
9349
|
-
__classPrivateFieldGet$
|
|
9350
|
-
__classPrivateFieldGet$
|
|
9351
|
-
__classPrivateFieldGet$
|
|
9347
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").isMenu = true;
|
|
9348
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").layoutNumber = 12;
|
|
9349
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").sizeX = 'auto';
|
|
9350
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").sizeY = 'auto';
|
|
9351
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").addEventListener('kup-card-click', (e) => {
|
|
9352
9352
|
this.kupDataTableColumnMenu.emit({
|
|
9353
9353
|
comp: this,
|
|
9354
9354
|
id: this.rootElement.id,
|
|
9355
|
-
card: __classPrivateFieldGet$
|
|
9355
|
+
card: __classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f"),
|
|
9356
9356
|
event: e,
|
|
9357
|
-
open: __classPrivateFieldGet$
|
|
9357
|
+
open: __classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").menuVisible,
|
|
9358
9358
|
});
|
|
9359
9359
|
});
|
|
9360
|
-
__classPrivateFieldGet$
|
|
9361
|
-
__classPrivateFieldGet$
|
|
9360
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").addEventListener('kup-card-event', (e) => {
|
|
9361
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuInstance, "f").eventHandlers(e, this);
|
|
9362
9362
|
this.kupDataTableColumnMenu.emit({
|
|
9363
9363
|
comp: this,
|
|
9364
9364
|
id: this.rootElement.id,
|
|
9365
|
-
card: __classPrivateFieldGet$
|
|
9365
|
+
card: __classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f"),
|
|
9366
9366
|
event: e,
|
|
9367
|
-
open: __classPrivateFieldGet$
|
|
9367
|
+
open: __classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").menuVisible,
|
|
9368
9368
|
});
|
|
9369
9369
|
});
|
|
9370
9370
|
__classPrivateFieldSet$3(this, _KupDataTable_clickCbDropCard, {
|
|
9371
9371
|
cb: () => {
|
|
9372
|
-
__classPrivateFieldGet$
|
|
9372
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeColumnMenuCard).call(this);
|
|
9373
9373
|
},
|
|
9374
|
-
el: __classPrivateFieldGet$
|
|
9374
|
+
el: __classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f"),
|
|
9375
9375
|
}, "f");
|
|
9376
|
-
__classPrivateFieldGet$
|
|
9377
|
-
__classPrivateFieldGet$
|
|
9378
|
-
__classPrivateFieldGet$
|
|
9379
|
-
__classPrivateFieldGet$
|
|
9380
|
-
__classPrivateFieldGet$
|
|
9376
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$7(this, _KupDataTable_clickCbDropCard, "f"), true);
|
|
9377
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").setAttribute('data-column', column);
|
|
9378
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").data = __classPrivateFieldGet$7(this, _KupDataTable_columnMenuInstance, "f").prepData(this, kupManager$1.getColumnByName(this.getVisibleColumns(), column));
|
|
9379
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuInstance, "f").open(this, column);
|
|
9380
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuInstance, "f").reposition(this, __classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f"));
|
|
9381
9381
|
this.kupDataTableColumnMenu.emit({
|
|
9382
9382
|
comp: this,
|
|
9383
9383
|
id: this.rootElement.id,
|
|
9384
|
-
card: __classPrivateFieldGet$
|
|
9384
|
+
card: __classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f"),
|
|
9385
9385
|
event: null,
|
|
9386
9386
|
open: true,
|
|
9387
9387
|
});
|
|
@@ -9391,7 +9391,7 @@ const KupDataTable = class {
|
|
|
9391
9391
|
*/
|
|
9392
9392
|
async refresh(recalcRows) {
|
|
9393
9393
|
if (recalcRows) {
|
|
9394
|
-
__classPrivateFieldGet$
|
|
9394
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
9395
9395
|
}
|
|
9396
9396
|
index.forceUpdate(this);
|
|
9397
9397
|
}
|
|
@@ -9400,8 +9400,8 @@ const KupDataTable = class {
|
|
|
9400
9400
|
*/
|
|
9401
9401
|
async resizeCallback() {
|
|
9402
9402
|
if (this.lazyLoadCells &&
|
|
9403
|
-
this.rootElement.clientWidth !== __classPrivateFieldGet$
|
|
9404
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
9403
|
+
this.rootElement.clientWidth !== __classPrivateFieldGet$7(this, _KupDataTable_oldWidth, "f")) {
|
|
9404
|
+
window.clearTimeout(__classPrivateFieldGet$7(this, _KupDataTable_resizeTimeout, "f"));
|
|
9405
9405
|
__classPrivateFieldSet$3(this, _KupDataTable_resizeTimeout, window.setTimeout(() => this.refresh(), 300), "f");
|
|
9406
9406
|
}
|
|
9407
9407
|
}
|
|
@@ -9416,7 +9416,7 @@ const KupDataTable = class {
|
|
|
9416
9416
|
if (!column) {
|
|
9417
9417
|
return;
|
|
9418
9418
|
}
|
|
9419
|
-
const row = __classPrivateFieldGet$
|
|
9419
|
+
const row = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, rowId);
|
|
9420
9420
|
if (!row) {
|
|
9421
9421
|
return;
|
|
9422
9422
|
}
|
|
@@ -9476,7 +9476,7 @@ const KupDataTable = class {
|
|
|
9476
9476
|
this.selectedRows = [];
|
|
9477
9477
|
for (let index = 0; index < rowsIdentifiers.length; index++) {
|
|
9478
9478
|
const id = rowsIdentifiers[index];
|
|
9479
|
-
const row = __classPrivateFieldGet$
|
|
9479
|
+
const row = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, id);
|
|
9480
9480
|
if (row) {
|
|
9481
9481
|
if (!firstRowSelectedId) {
|
|
9482
9482
|
firstRowSelectedId = id;
|
|
@@ -9504,11 +9504,11 @@ const KupDataTable = class {
|
|
|
9504
9504
|
async scrollToRow(rowIdentifier) {
|
|
9505
9505
|
var _a;
|
|
9506
9506
|
const id = rowIdentifier;
|
|
9507
|
-
const row = __classPrivateFieldGet$
|
|
9507
|
+
const row = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, id);
|
|
9508
9508
|
if (row) {
|
|
9509
|
-
const idx = __classPrivateFieldGet$
|
|
9509
|
+
const idx = __classPrivateFieldGet$7(this, _KupDataTable_rows, "f").indexOf(row) - 1;
|
|
9510
9510
|
if (idx >= 1) {
|
|
9511
|
-
(_a = __classPrivateFieldGet$
|
|
9511
|
+
(_a = __classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f")[idx]) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
|
|
9512
9512
|
}
|
|
9513
9513
|
}
|
|
9514
9514
|
}
|
|
@@ -9516,13 +9516,13 @@ const KupDataTable = class {
|
|
|
9516
9516
|
* Public method to wait until the component is fully ready.
|
|
9517
9517
|
*/
|
|
9518
9518
|
async waitForReady() {
|
|
9519
|
-
return __classPrivateFieldGet$
|
|
9519
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_readyPromise, "f");
|
|
9520
9520
|
}
|
|
9521
9521
|
/**
|
|
9522
9522
|
* This method is used to retrieve last focused row or the first if there's no row focused
|
|
9523
9523
|
*/
|
|
9524
9524
|
async getLastFocusedRow() {
|
|
9525
|
-
return __classPrivateFieldGet$
|
|
9525
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_lastFocusedRow, "f");
|
|
9526
9526
|
}
|
|
9527
9527
|
//---- Lifecycle hooks ----
|
|
9528
9528
|
connectedCallback() {
|
|
@@ -9531,12 +9531,12 @@ const KupDataTable = class {
|
|
|
9531
9531
|
}), "f");
|
|
9532
9532
|
}
|
|
9533
9533
|
componentWillLoad() {
|
|
9534
|
-
__classPrivateFieldGet$
|
|
9535
|
-
__classPrivateFieldGet$
|
|
9536
|
-
__classPrivateFieldGet$
|
|
9537
|
-
__classPrivateFieldGet$
|
|
9534
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logLoad(this, false);
|
|
9535
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.register(this);
|
|
9536
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").theme.register(this);
|
|
9537
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").toolbar.register(this.rootElement);
|
|
9538
9538
|
if (!this.emptyDataLabel) {
|
|
9539
|
-
this.emptyDataLabel = __classPrivateFieldGet$
|
|
9539
|
+
this.emptyDataLabel = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.EMPTY_DATA);
|
|
9540
9540
|
}
|
|
9541
9541
|
__classPrivateFieldSet$3(this, _KupDataTable_columnMenuInstance, new KupColumnMenu(), "f");
|
|
9542
9542
|
__classPrivateFieldSet$3(this, _KupDataTable_filtersColumnMenuInstance, new kupDataTableHelper.FiltersColumnMenu(), "f");
|
|
@@ -9561,19 +9561,19 @@ const KupDataTable = class {
|
|
|
9561
9561
|
__classPrivateFieldSet$3(this, _KupDataTable_navBarHeight, 0, "f");
|
|
9562
9562
|
}
|
|
9563
9563
|
if (document.querySelector('.topbar')) {
|
|
9564
|
-
__classPrivateFieldSet$3(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$
|
|
9564
|
+
__classPrivateFieldSet$3(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$7(this, _KupDataTable_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
|
|
9565
9565
|
}
|
|
9566
|
-
__classPrivateFieldGet$
|
|
9566
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_setObserver).call(this);
|
|
9567
9567
|
//this.recalculateRows();
|
|
9568
9568
|
// Detects is the browser is Safari. If needed, this function can be moved into an external file and then imported into components
|
|
9569
9569
|
__classPrivateFieldSet$3(this, _KupDataTable_isSafariBrowser, CSS.supports('position', '-webkit-sticky') ||
|
|
9570
9570
|
!!(window && window.safari), "f");
|
|
9571
|
-
__classPrivateFieldGet$
|
|
9571
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_calculateData).call(this);
|
|
9572
9572
|
__classPrivateFieldSet$3(this, _KupDataTable_initialized, true, "f");
|
|
9573
9573
|
this.decorateAndInitForUpdTable();
|
|
9574
9574
|
}
|
|
9575
9575
|
componentWillRender() {
|
|
9576
|
-
__classPrivateFieldGet$
|
|
9576
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logRender(this, false);
|
|
9577
9577
|
}
|
|
9578
9578
|
componentDidRender() {
|
|
9579
9579
|
// If the component is not connected this method must not be executed
|
|
@@ -9588,45 +9588,45 @@ const KupDataTable = class {
|
|
|
9588
9588
|
}
|
|
9589
9589
|
}
|
|
9590
9590
|
requestAnimationFrame(async () => {
|
|
9591
|
-
if (root && __classPrivateFieldGet$
|
|
9592
|
-
__classPrivateFieldGet$
|
|
9591
|
+
if (root && __classPrivateFieldGet$7(this, _KupDataTable_readyResolve, "f")) {
|
|
9592
|
+
__classPrivateFieldGet$7(this, _KupDataTable_readyResolve, "f").call(this);
|
|
9593
9593
|
__classPrivateFieldSet$3(this, _KupDataTable_readyResolve, null, "f");
|
|
9594
9594
|
}
|
|
9595
9595
|
});
|
|
9596
9596
|
if (this.showCustomization) {
|
|
9597
|
-
__classPrivateFieldGet$
|
|
9597
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_customizePanelPosition).call(this);
|
|
9598
9598
|
}
|
|
9599
|
-
__classPrivateFieldGet$
|
|
9600
|
-
__classPrivateFieldGet$
|
|
9601
|
-
__classPrivateFieldGet$
|
|
9602
|
-
__classPrivateFieldGet$
|
|
9603
|
-
__classPrivateFieldGet$
|
|
9599
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_totalMenuPosition).call(this);
|
|
9600
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_checkScrollOnHover).call(this);
|
|
9601
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_didRenderObservers).call(this);
|
|
9602
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_didRenderInteractables).call(this);
|
|
9603
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
9604
9604
|
if (this.headerIsPersistent &&
|
|
9605
9605
|
this.tableHeight === undefined &&
|
|
9606
9606
|
this.tableWidth === undefined) {
|
|
9607
|
-
__classPrivateFieldGet$
|
|
9607
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_updateStickyHeaderSize).call(this);
|
|
9608
9608
|
}
|
|
9609
|
-
setTimeout(() => __classPrivateFieldGet$
|
|
9609
|
+
setTimeout(() => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_updateFixedRowsAndColumnsCssVariables).call(this), 50);
|
|
9610
9610
|
// *** Store
|
|
9611
9611
|
if (this.lazyLoadCells) {
|
|
9612
9612
|
this.persistState();
|
|
9613
9613
|
}
|
|
9614
9614
|
// ***
|
|
9615
9615
|
__classPrivateFieldSet$3(this, _KupDataTable_oldWidth, this.rootElement.clientWidth, "f");
|
|
9616
|
-
__classPrivateFieldGet$
|
|
9616
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logRender(this, true);
|
|
9617
9617
|
}
|
|
9618
9618
|
componentDidLoad() {
|
|
9619
|
-
__classPrivateFieldGet$
|
|
9620
|
-
__classPrivateFieldGet$
|
|
9621
|
-
__classPrivateFieldGet$
|
|
9619
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_didLoadObservers).call(this);
|
|
9620
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_didLoadEventHandling).call(this);
|
|
9621
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_didLoadInteractables).call(this);
|
|
9622
9622
|
this.lazyLoadCells = true;
|
|
9623
9623
|
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
9624
|
-
__classPrivateFieldGet$
|
|
9625
|
-
__classPrivateFieldGet$
|
|
9624
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").resize.observe(this.rootElement);
|
|
9625
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logLoad(this, true);
|
|
9626
9626
|
}
|
|
9627
9627
|
resetCurrentPage() {
|
|
9628
9628
|
this.currentPage = 1;
|
|
9629
|
-
__classPrivateFieldGet$
|
|
9629
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
9630
9630
|
}
|
|
9631
9631
|
getColumns() {
|
|
9632
9632
|
return this.data && this.data.columns
|
|
@@ -9646,7 +9646,7 @@ const KupDataTable = class {
|
|
|
9646
9646
|
}
|
|
9647
9647
|
// Starting columns filter
|
|
9648
9648
|
let resultVisibleColumns = this.getColumns().filter((col) => {
|
|
9649
|
-
const isNotCodVer = !__classPrivateFieldGet$
|
|
9649
|
+
const isNotCodVer = !__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.column.isCodVer(col);
|
|
9650
9650
|
if (this.visibleColumns) {
|
|
9651
9651
|
// if visible columns is specified, include only those columns
|
|
9652
9652
|
return isNotCodVer && this.visibleColumns.includes(col.name);
|
|
@@ -9661,7 +9661,7 @@ const KupDataTable = class {
|
|
|
9661
9661
|
this.visibleColumns.indexOf(b.name));
|
|
9662
9662
|
}
|
|
9663
9663
|
// Check grouping e filter based on group visibility
|
|
9664
|
-
if (__classPrivateFieldGet$
|
|
9664
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
9665
9665
|
return resultVisibleColumns.filter((column) => {
|
|
9666
9666
|
let group = null;
|
|
9667
9667
|
for (let currentGroup of this.groups) {
|
|
@@ -9679,7 +9679,7 @@ const KupDataTable = class {
|
|
|
9679
9679
|
return resultVisibleColumns;
|
|
9680
9680
|
}
|
|
9681
9681
|
getGroupByName(column) {
|
|
9682
|
-
if (!__classPrivateFieldGet$
|
|
9682
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
9683
9683
|
return null;
|
|
9684
9684
|
}
|
|
9685
9685
|
for (let group of this.groups) {
|
|
@@ -9690,7 +9690,7 @@ const KupDataTable = class {
|
|
|
9690
9690
|
return null;
|
|
9691
9691
|
}
|
|
9692
9692
|
getColumnValues(column) {
|
|
9693
|
-
return __classPrivateFieldGet$
|
|
9693
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_filtersRowsInstance, "f").getColumnValues(this, column, this.globalFilterValue, __classPrivateFieldGet$7(this, _KupDataTable_filtersColumnMenuInstance, "f"));
|
|
9694
9694
|
}
|
|
9695
9695
|
getRows() {
|
|
9696
9696
|
return this.data && this.data.rows ? this.data.rows : [];
|
|
@@ -9705,7 +9705,7 @@ const KupDataTable = class {
|
|
|
9705
9705
|
}
|
|
9706
9706
|
async defaultSortingFunction(columns, receivingColumnIndex, sortedColumnIndex, useNewObject = false) {
|
|
9707
9707
|
const toSort = !useNewObject ? columns : [...columns];
|
|
9708
|
-
__classPrivateFieldGet$
|
|
9708
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_moveSortedColumns).call(this, toSort, receivingColumnIndex, sortedColumnIndex);
|
|
9709
9709
|
return toSort;
|
|
9710
9710
|
}
|
|
9711
9711
|
areTotalsSelected(column) {
|
|
@@ -9713,7 +9713,7 @@ const KupDataTable = class {
|
|
|
9713
9713
|
}
|
|
9714
9714
|
onTotalsChange(event, column) {
|
|
9715
9715
|
var _a;
|
|
9716
|
-
__classPrivateFieldGet$
|
|
9716
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
9717
9717
|
if (!column) {
|
|
9718
9718
|
return;
|
|
9719
9719
|
}
|
|
@@ -9736,15 +9736,15 @@ const KupDataTable = class {
|
|
|
9736
9736
|
let selectRowCell = null;
|
|
9737
9737
|
if (this.selection === kupManager$1.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
9738
9738
|
extraCells++;
|
|
9739
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
9739
|
+
const fixedCellStyle = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, extraCells, 0, 0, extraCells);
|
|
9740
9740
|
selectRowCell = (index.h("td", { class: fixedCellStyle ? fixedCellStyle.fixedCellClasses : null, style: fixedCellStyle ? fixedCellStyle.fixedCellStyle : null }));
|
|
9741
9741
|
}
|
|
9742
9742
|
// Action cell
|
|
9743
9743
|
let actionsCell = null;
|
|
9744
|
-
if (__classPrivateFieldGet$
|
|
9745
|
-
__classPrivateFieldGet$
|
|
9744
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ||
|
|
9745
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.column.hasCodVer(this.data.columns)) {
|
|
9746
9746
|
extraCells++;
|
|
9747
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
9747
|
+
const selectionStyleAndClass = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, extraCells, 0, 0, extraCells);
|
|
9748
9748
|
actionsCell = (index.h("td", { class: selectionStyleAndClass
|
|
9749
9749
|
? selectionStyleAndClass.fixedCellClasses
|
|
9750
9750
|
: {}, style: selectionStyleAndClass
|
|
@@ -9753,19 +9753,19 @@ const KupDataTable = class {
|
|
|
9753
9753
|
}
|
|
9754
9754
|
const footerCells = this.getVisibleColumns().map((column, columnIndex) => {
|
|
9755
9755
|
var _a;
|
|
9756
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
9756
|
+
const fixedCellStyle = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, columnIndex + 1 + extraCells, columnIndex + 1, 0, extraCells);
|
|
9757
9757
|
let totalMenu = undefined;
|
|
9758
9758
|
let menuLabel = kupManager$1.TotalLabel.CALC;
|
|
9759
9759
|
const translation = {
|
|
9760
|
-
[kupManager$1.TotalLabel.AVERAGE]: __classPrivateFieldGet$
|
|
9761
|
-
[kupManager$1.TotalLabel.CALC]: __classPrivateFieldGet$
|
|
9762
|
-
[kupManager$1.TotalLabel.CANC]: __classPrivateFieldGet$
|
|
9763
|
-
[kupManager$1.TotalLabel.COUNT]: __classPrivateFieldGet$
|
|
9764
|
-
[kupManager$1.TotalLabel.DISTINCT]: __classPrivateFieldGet$
|
|
9765
|
-
[kupManager$1.TotalLabel.MATH]: __classPrivateFieldGet$
|
|
9766
|
-
[kupManager$1.TotalLabel.MAX]: __classPrivateFieldGet$
|
|
9767
|
-
[kupManager$1.TotalLabel.MIN]: __classPrivateFieldGet$
|
|
9768
|
-
[kupManager$1.TotalLabel.SUM]: __classPrivateFieldGet$
|
|
9760
|
+
[kupManager$1.TotalLabel.AVERAGE]: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageTotals.AVERAGE),
|
|
9761
|
+
[kupManager$1.TotalLabel.CALC]: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageTotals.CALCULATE),
|
|
9762
|
+
[kupManager$1.TotalLabel.CANC]: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageTotals.CANCEL),
|
|
9763
|
+
[kupManager$1.TotalLabel.COUNT]: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageTotals.COUNT),
|
|
9764
|
+
[kupManager$1.TotalLabel.DISTINCT]: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageTotals.DISTINCT),
|
|
9765
|
+
[kupManager$1.TotalLabel.MATH]: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageTotals.FORMULA),
|
|
9766
|
+
[kupManager$1.TotalLabel.MAX]: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageTotals.MAXIMUM),
|
|
9767
|
+
[kupManager$1.TotalLabel.MIN]: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageTotals.MINIMUM),
|
|
9768
|
+
[kupManager$1.TotalLabel.SUM]: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageTotals.SUM),
|
|
9769
9769
|
};
|
|
9770
9770
|
if (this.totals) {
|
|
9771
9771
|
const totalValue = this.totals[column.name];
|
|
@@ -9797,7 +9797,7 @@ const KupDataTable = class {
|
|
|
9797
9797
|
}
|
|
9798
9798
|
}
|
|
9799
9799
|
}
|
|
9800
|
-
if (__classPrivateFieldGet$
|
|
9800
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isOpenedTotalMenuForColumn).call(this, column.name)) {
|
|
9801
9801
|
const getTotalsListElements = (formula = '') => {
|
|
9802
9802
|
return {
|
|
9803
9803
|
[kupManager$1.TotalMode.COUNT]: {
|
|
@@ -9842,11 +9842,11 @@ const KupDataTable = class {
|
|
|
9842
9842
|
const listData = [];
|
|
9843
9843
|
if (column.formula) {
|
|
9844
9844
|
/* Formula cloumn */
|
|
9845
|
-
const formula = (_a = ((__classPrivateFieldGet$
|
|
9845
|
+
const formula = (_a = ((__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this) && this.totals[column.name]) ||
|
|
9846
9846
|
column.formula)) === null || _a === void 0 ? void 0 : _a.replace(kupManager$1.getRegExpFromString(kupManager$1.TotalMode.MATH, 'g'), '');
|
|
9847
9847
|
const totalsListElements = getTotalsListElements(formula);
|
|
9848
9848
|
// Add formula
|
|
9849
|
-
listData.push(Object.assign(Object.assign({}, totalsListElements[kupManager$1.TotalMode.MATH]), { selected: __classPrivateFieldGet$
|
|
9849
|
+
listData.push(Object.assign(Object.assign({}, totalsListElements[kupManager$1.TotalMode.MATH]), { selected: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)
|
|
9850
9850
|
? !!this.totals[column.name]
|
|
9851
9851
|
: false }), Object.assign(Object.assign({}, totalsListElements[kupManager$1.TotalLabel.CANC]), { separator: true }));
|
|
9852
9852
|
}
|
|
@@ -9855,15 +9855,15 @@ const KupDataTable = class {
|
|
|
9855
9855
|
// Add default operations
|
|
9856
9856
|
const totalsListElements = getTotalsListElements();
|
|
9857
9857
|
listData.push(totalsListElements[kupManager$1.TotalMode.COUNT], totalsListElements[kupManager$1.TotalMode.DISTINCT]);
|
|
9858
|
-
if (__classPrivateFieldGet$
|
|
9858
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isNumber(column.obj)) {
|
|
9859
9859
|
// Add number operations
|
|
9860
9860
|
listData.push(Object.assign(Object.assign({}, totalsListElements[kupManager$1.TotalMode.SUM]), { separator: true }), totalsListElements[kupManager$1.TotalMode.AVERAGE], totalsListElements[kupManager$1.TotalMode.MIN], totalsListElements[kupManager$1.TotalMode.MAX]);
|
|
9861
9861
|
}
|
|
9862
|
-
else if (__classPrivateFieldGet$
|
|
9862
|
+
else if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
9863
9863
|
// Add date operations
|
|
9864
9864
|
listData.push(Object.assign(Object.assign({}, totalsListElements[kupManager$1.TotalMode.MIN]), { separator: true }), totalsListElements[kupManager$1.TotalMode.MAX]);
|
|
9865
9865
|
}
|
|
9866
|
-
if (__classPrivateFieldGet$
|
|
9866
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)) {
|
|
9867
9867
|
const selectedItem = listData.find((item) => item.id === this.totals[column.name]);
|
|
9868
9868
|
if (selectedItem) {
|
|
9869
9869
|
selectedItem.selected = true;
|
|
@@ -9873,10 +9873,10 @@ const KupDataTable = class {
|
|
|
9873
9873
|
}
|
|
9874
9874
|
totalMenu = (index.h("kup-list", { class: `total-menu`, data: listData, id: "totals-menu", "is-menu": true, keyboardNavigation: true, "menu-visible": true, "onkup-list-click": (event) => this.onTotalsChange(event, column), tabindex: 0 }));
|
|
9875
9875
|
}
|
|
9876
|
-
const totalValue = __classPrivateFieldGet$
|
|
9877
|
-
? kupManager$1.getValueForDisplay(__classPrivateFieldGet$
|
|
9876
|
+
const totalValue = __classPrivateFieldGet$7(this, _KupDataTable_footer, "f")[column.name] != null
|
|
9877
|
+
? kupManager$1.getValueForDisplay(__classPrivateFieldGet$7(this, _KupDataTable_footer, "f")[column.name], column.obj, column.decimals)
|
|
9878
9878
|
: '';
|
|
9879
|
-
const totalsClass = `totals-value ${kupManager$1.isNegativeNumber(__classPrivateFieldGet$
|
|
9879
|
+
const totalsClass = `totals-value ${kupManager$1.isNegativeNumber(__classPrivateFieldGet$7(this, _KupDataTable_footer, "f")[column.name])
|
|
9880
9880
|
? kupManager$1.FCellClasses.TEXT_DANGER
|
|
9881
9881
|
: ''}`;
|
|
9882
9882
|
return (index.h("td", { "data-column": column.name, class: fixedCellStyle && fixedCellStyle.fixedCellClasses
|
|
@@ -9895,37 +9895,37 @@ const KupDataTable = class {
|
|
|
9895
9895
|
let transpose = undefined;
|
|
9896
9896
|
let totalsMatrix = undefined;
|
|
9897
9897
|
if (this.openedCustomSettings) {
|
|
9898
|
-
density = __classPrivateFieldGet$
|
|
9899
|
-
fontsize = __classPrivateFieldGet$
|
|
9900
|
-
grid = __classPrivateFieldGet$
|
|
9901
|
-
transpose = __classPrivateFieldGet$
|
|
9898
|
+
density = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderDensityPanel).call(this);
|
|
9899
|
+
fontsize = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderFontSizePanel).call(this);
|
|
9900
|
+
grid = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderGridPanel).call(this);
|
|
9901
|
+
transpose = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderTransposeSwitch).call(this);
|
|
9902
9902
|
if (this.totals && this.groups.length > 0) {
|
|
9903
|
-
totalsMatrix = __classPrivateFieldGet$
|
|
9903
|
+
totalsMatrix = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderTotalsMatrix).call(this);
|
|
9904
9904
|
}
|
|
9905
9905
|
}
|
|
9906
9906
|
return (index.h("kup-card", { customStyle: "::slotted(kup-switch) { width: max-content !important; } ::slotted(*) { margin: auto !important; } ::slotted(.customize-element) { margin: auto !important; padding: 0 1em 1em 1em !important; width: max-content !important; } ::slotted(.customize-element):nth-child(1) { padding-top: 1em !important; }", isMenu: true, layoutFamily: kupManager$1.KupCardFamily.FREE, ref: (el) => {
|
|
9907
9907
|
__classPrivateFieldSet$3(this, _KupDataTable_customizeTopPanelRef, el, "f");
|
|
9908
|
-
}, sizeX: "360px", sizeY: "300px" }, density, grid, fontsize, transpose, index.h("kup-switch", { class: "customize-element", checked: this.dragEnabled, label: __classPrivateFieldGet$
|
|
9908
|
+
}, sizeX: "360px", sizeY: "300px" }, density, grid, fontsize, transpose, index.h("kup-switch", { class: "customize-element", checked: this.dragEnabled, label: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.DRAG_AND_DROP), leadingLabel: true, "onkup-switch-change": () => (this.dragEnabled = !this.dragEnabled) }), index.h("kup-switch", { class: "customize-element", checked: this.editableData, label: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.EDITABLE), leadingLabel: true, "onkup-switch-change": () => (this.editableData = !this.editableData) }), index.h("div", { style: {
|
|
9909
9909
|
display: 'grid',
|
|
9910
9910
|
'grid-template-columns': 'repeat(2, auto)',
|
|
9911
9911
|
width: 'max-content',
|
|
9912
|
-
} }, index.h("kup-button", { title: __classPrivateFieldGet$
|
|
9912
|
+
} }, index.h("kup-button", { title: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.TOGGLE) +
|
|
9913
9913
|
' Magic Box ' +
|
|
9914
9914
|
'(' +
|
|
9915
|
-
__classPrivateFieldGet$
|
|
9916
|
-
')', icon: "auto-fix", "onkup-button-click": () => __classPrivateFieldGet$
|
|
9917
|
-
__classPrivateFieldGet$
|
|
9918
|
-
__classPrivateFieldGet$
|
|
9915
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
9916
|
+
')', icon: "auto-fix", "onkup-button-click": () => __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").toggleMagicBox() }), __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").enableExperimentalFeatures &&
|
|
9917
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").openAI &&
|
|
9918
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").openAI.url ? (index.h("kup-button", { title: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.TOGGLE) +
|
|
9919
9919
|
' ' +
|
|
9920
|
-
__classPrivateFieldGet$
|
|
9920
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.AI_ASSISTANT) +
|
|
9921
9921
|
' (' +
|
|
9922
|
-
__classPrivateFieldGet$
|
|
9922
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
9923
9923
|
')', icon: "smeup-ai", "onkup-button-click": () => {
|
|
9924
|
-
__classPrivateFieldGet$
|
|
9924
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").openAI.show({
|
|
9925
9925
|
context: this.rootElement.tagName,
|
|
9926
9926
|
dataset: this.data,
|
|
9927
9927
|
});
|
|
9928
|
-
__classPrivateFieldGet$
|
|
9928
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
9929
9929
|
} })) : null), totalsMatrix));
|
|
9930
9930
|
}
|
|
9931
9931
|
render() {
|
|
@@ -9934,20 +9934,20 @@ const KupDataTable = class {
|
|
|
9934
9934
|
__classPrivateFieldSet$3(this, _KupDataTable_renderedRows, [], "f");
|
|
9935
9935
|
let elStyle = undefined;
|
|
9936
9936
|
let actionWrapperWidth = undefined;
|
|
9937
|
-
__classPrivateFieldSet$3(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$
|
|
9937
|
+
__classPrivateFieldSet$3(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
|
|
9938
9938
|
if (this.updatableData) {
|
|
9939
|
-
__classPrivateFieldGet$
|
|
9939
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").keysBinding.unregister('enter');
|
|
9940
9940
|
}
|
|
9941
9941
|
let rows = null;
|
|
9942
|
-
if (__classPrivateFieldGet$
|
|
9943
|
-
rows = (index.h("tr", { key: '
|
|
9942
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
|
|
9943
|
+
rows = (index.h("tr", { key: '43964b68259ee77d1eb2cc703fc4551c5ad085f8', ref: (el) => __classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f").push(el) }, index.h("td", { key: '4c8df8bc2924d6844a58ea329e34d03f2ecb5f9c', colSpan: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
|
|
9944
9944
|
}
|
|
9945
9945
|
else {
|
|
9946
9946
|
rows = [];
|
|
9947
|
-
__classPrivateFieldGet$
|
|
9947
|
+
__classPrivateFieldGet$7(this, _KupDataTable_paginatedRows, "f")
|
|
9948
9948
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
9949
9949
|
// When the column has specified the parameter hideValuesRepetitions
|
|
9950
|
-
.map((row, rowIndex, currentArray) => __classPrivateFieldGet$
|
|
9950
|
+
.map((row, rowIndex, currentArray) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, 0, rowIndex + 1, rowIndex > 0 ? currentArray[rowIndex - 1] : null))
|
|
9951
9951
|
.forEach((jsxRow) => {
|
|
9952
9952
|
if (Array.isArray(jsxRow)) {
|
|
9953
9953
|
jsxRow.forEach((jr) => rows.push(jr));
|
|
@@ -9959,25 +9959,25 @@ const KupDataTable = class {
|
|
|
9959
9959
|
}
|
|
9960
9960
|
// header
|
|
9961
9961
|
// for multi selection purposes, this should be called before this.renderedRows has been evaluated
|
|
9962
|
-
const header = __classPrivateFieldGet$
|
|
9963
|
-
const stickyHeader = __classPrivateFieldGet$
|
|
9962
|
+
const header = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderHeader).call(this);
|
|
9963
|
+
const stickyHeader = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderStickyHeader).call(this);
|
|
9964
9964
|
let paginatorTop = undefined;
|
|
9965
9965
|
let paginatorBottom = undefined;
|
|
9966
9966
|
if (this.showPaginator &&
|
|
9967
|
-
((!this.lazyLoadRows && __classPrivateFieldGet$
|
|
9967
|
+
((!this.lazyLoadRows && __classPrivateFieldGet$7(this, _KupDataTable_rowsLength, "f") > this.rowsPerPage) ||
|
|
9968
9968
|
this.showCustomization ||
|
|
9969
9969
|
this.showLoadMore)) {
|
|
9970
9970
|
if (kupManager$1.PaginatorPos.TOP === this.paginatorPos ||
|
|
9971
9971
|
kupManager$1.PaginatorPos.BOTH === this.paginatorPos) {
|
|
9972
|
-
paginatorTop = __classPrivateFieldGet$
|
|
9972
|
+
paginatorTop = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderPaginator).call(this, true);
|
|
9973
9973
|
}
|
|
9974
9974
|
if (kupManager$1.PaginatorPos.BOTTOM === this.paginatorPos ||
|
|
9975
9975
|
kupManager$1.PaginatorPos.BOTH === this.paginatorPos) {
|
|
9976
|
-
paginatorBottom = __classPrivateFieldGet$
|
|
9976
|
+
paginatorBottom = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderPaginator).call(this, false);
|
|
9977
9977
|
}
|
|
9978
9978
|
}
|
|
9979
9979
|
let groupChips = null;
|
|
9980
|
-
if (__classPrivateFieldGet$
|
|
9980
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
9981
9981
|
const chipsData = [];
|
|
9982
9982
|
for (let index = 0; index < this.groups.length; index++) {
|
|
9983
9983
|
const group = this.groups[index];
|
|
@@ -9990,7 +9990,7 @@ const KupDataTable = class {
|
|
|
9990
9990
|
});
|
|
9991
9991
|
}
|
|
9992
9992
|
else {
|
|
9993
|
-
__classPrivateFieldGet$
|
|
9993
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Grouped for a non-existent column! (' +
|
|
9994
9994
|
group.column +
|
|
9995
9995
|
')', kupManager$1.KupDebugCategory.WARNING);
|
|
9996
9996
|
}
|
|
@@ -10003,15 +10003,15 @@ const KupDataTable = class {
|
|
|
10003
10003
|
onIconClick: [],
|
|
10004
10004
|
};
|
|
10005
10005
|
for (let i = 0; i < chipsData.length; i++) {
|
|
10006
|
-
props.onIconClick.push(() => __classPrivateFieldGet$
|
|
10006
|
+
props.onIconClick.push(() => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_removeGroup).call(this, i));
|
|
10007
10007
|
}
|
|
10008
|
-
groupChips = index.h(fChip.FChip, Object.assign({ key: '
|
|
10008
|
+
groupChips = index.h(fChip.FChip, Object.assign({ key: '57d143c2c89aa93b7cccf8926201818f32f7666c' }, props));
|
|
10009
10009
|
}
|
|
10010
10010
|
}
|
|
10011
10011
|
const tableClass = {
|
|
10012
10012
|
// Class to specify whether the table should have width: auto or not.
|
|
10013
10013
|
// Mandatory to check with custom column size.
|
|
10014
|
-
'auto-width': __classPrivateFieldGet$
|
|
10014
|
+
'auto-width': __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_tableHasAutoWidth).call(this),
|
|
10015
10015
|
'column-separation': kupManager$1.ShowGrid.COMPLETE === this.showGrid ||
|
|
10016
10016
|
kupManager$1.ShowGrid.COL === this.showGrid,
|
|
10017
10017
|
// When there are columns with a specified width, we must add table-layout: fixed to force the table to respect them
|
|
@@ -10037,7 +10037,7 @@ const KupDataTable = class {
|
|
|
10037
10037
|
if (this.headerIsPersistent &&
|
|
10038
10038
|
this.tableHeight === undefined &&
|
|
10039
10039
|
this.tableWidth === undefined) {
|
|
10040
|
-
stickyEl = (index.h("sticky-header", { key: '
|
|
10040
|
+
stickyEl = (index.h("sticky-header", { key: '72143e2dd14c2ed457a8da40c41d88d0056ee11d', class: "hover-scrolling-child", hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$3(this, _KupDataTable_stickyTheadRef, el, "f")) }, index.h("thead-sticky", { key: '384803dc3e404b30e2b1bc5ad64f9d9e9e329b43' }, index.h("tr-sticky", { key: '1b9c1a17fc090a9f0c1bbcc964c54c4ecee962af' }, stickyHeader))));
|
|
10041
10041
|
}
|
|
10042
10042
|
let belowClass = 'below-wrapper';
|
|
10043
10043
|
if (!!this.tableHeight || !!this.tableWidth) {
|
|
@@ -10067,14 +10067,14 @@ const KupDataTable = class {
|
|
|
10067
10067
|
(((_a = e.detail.cell) === null || _a === void 0 ? void 0 : _a.shape) === kupManager$1.FCellShapes.CHECKBOX ||
|
|
10068
10068
|
((_b = e.detail.cell) === null || _b === void 0 ? void 0 : _b.shape) === kupManager$1.FCellShapes.SWITCH)) {
|
|
10069
10069
|
if (this.updateOnClick) {
|
|
10070
|
-
__classPrivateFieldGet$
|
|
10070
|
+
__classPrivateFieldGet$7(this, _KupDataTable_handleUpdateClick, "f").call(this);
|
|
10071
10071
|
}
|
|
10072
10072
|
else if ((_d = (_c = e.detail.cell) === null || _c === void 0 ? void 0 : _c.inputSettings) === null || _d === void 0 ? void 0 : _d.checkValueOnExit) {
|
|
10073
10073
|
this.kupCellCheck.emit({
|
|
10074
10074
|
comp: this,
|
|
10075
10075
|
id: this.rootElement.id,
|
|
10076
|
-
originalData: __classPrivateFieldGet$
|
|
10077
|
-
updatedData: kupDataTableHelper.getDiffData(__classPrivateFieldGet$
|
|
10076
|
+
originalData: __classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f"),
|
|
10077
|
+
updatedData: kupDataTableHelper.getDiffData(__classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f"), this.data, true),
|
|
10078
10078
|
cell: e.detail.cell,
|
|
10079
10079
|
});
|
|
10080
10080
|
}
|
|
@@ -10082,13 +10082,13 @@ const KupDataTable = class {
|
|
|
10082
10082
|
};
|
|
10083
10083
|
const useGlobalFilter = !this.legacyLook &&
|
|
10084
10084
|
(this.globalFilter ||
|
|
10085
|
-
this.getRows().length > __classPrivateFieldGet$
|
|
10086
|
-
const compCreated = (index.h(index.Host, { key: '
|
|
10085
|
+
this.getRows().length > __classPrivateFieldGet$7(this, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, "f"));
|
|
10086
|
+
const compCreated = (index.h(index.Host, { key: '4076ece2048ed51fa61f083a93ceb3888f9de8eb', "onKup-drop": (e) => {
|
|
10087
10087
|
this.kupDataTableDrop.emit(e.detail);
|
|
10088
10088
|
}, "onKup-cell-input": (e) => {
|
|
10089
10089
|
autoselectOnAction(e);
|
|
10090
10090
|
this.kupDataTableCellInput.emit(e.detail);
|
|
10091
|
-
}, "onKup-cell-update": autoselectOnAction, "onKup-cell-blur": __classPrivateFieldGet$
|
|
10091
|
+
}, "onKup-cell-update": autoselectOnAction, "onKup-cell-blur": __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onBlurHandler), "onKup-cell-click": (e) => {
|
|
10092
10092
|
this.kupDataTableCellClick.emit(e.detail);
|
|
10093
10093
|
}, "onKup-cell-iconclick": (e) => {
|
|
10094
10094
|
this.kupDataTableCellIconClick.emit(e.detail);
|
|
@@ -10098,11 +10098,11 @@ const KupDataTable = class {
|
|
|
10098
10098
|
this.kupDataTableObjectFieldOpenSearchMenu.emit(e.detail);
|
|
10099
10099
|
}, "onKup-objectfield-selectedmenuitem": (e) => {
|
|
10100
10100
|
this.kupDataTableObjectFieldSelectedMenuItem.emit(e.detail);
|
|
10101
|
-
} }, index.h("style", { key: '
|
|
10101
|
+
} }, index.h("style", { key: '675c3b5746de43ea52b8f97e07d7e03b94290494' }, __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), this.updatableData ? __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderUpdateButtons).call(this) : null, index.h("div", { key: '1ed5d580d217b720947c25f381ce247342057af7', id: GenericVariables.componentWrapperId, class: wrapClass }, index.h("div", { key: '84d8d0006e722229cc9d797f671db29bef09a0c8', class: "group-wrapper" }, groupChips), index.h("div", { key: '5c933f3495d308f993d77b6c9fe282cea4f517bc', class: "actions-wrapper", style: actionWrapperWidth }, useGlobalFilter ? (index.h("div", { id: "global-filter" }, index.h(fTextField.FTextField, { fullWidth: true, icon: kupManager$1.KupThemeIconValues.SEARCH, label: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageSearch.SEARCH), value: this.globalFilterValue, onInput: (event) => {
|
|
10102
10102
|
const t = event.target;
|
|
10103
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
10104
|
-
__classPrivateFieldSet$3(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$
|
|
10105
|
-
} }))) : null, index.h("div", { key: '
|
|
10103
|
+
window.clearTimeout(__classPrivateFieldGet$7(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
10104
|
+
__classPrivateFieldSet$3(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
10105
|
+
} }))) : null, index.h("div", { key: 'bb34804d5fc095b5bcc2bddd21801ffbdf4c74f3', class: "above-wrapper paginator-top" }, paginatorTop), this.insertMode !== '' &&
|
|
10106
10106
|
this.selectedRows.length > 0 ? (index.h(fButton.FButton, { icon: "save", onClick: () => {
|
|
10107
10107
|
this.kupSave.emit({
|
|
10108
10108
|
comp: this,
|
|
@@ -10111,7 +10111,7 @@ const KupDataTable = class {
|
|
|
10111
10111
|
});
|
|
10112
10112
|
}, styling: fButtonDeclarations.FButtonStyling.FLAT, sizing: kupManager$1.KupComponentSizing.MEDIUM, title: "Save", wrapperClass: "save-button" })) : null, this.showDeleteButton &&
|
|
10113
10113
|
this.selectedRows.length > 0 ? (index.h(fButton.FButton, { icon: "delete", onClick: () => {
|
|
10114
|
-
__classPrivateFieldGet$
|
|
10114
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_rowsDelete).call(this);
|
|
10115
10115
|
}, styling: fButtonDeclarations.FButtonStyling.FLAT, sizing: kupManager$1.KupComponentSizing.MEDIUM, title: "Delete selected rows", wrapperClass: "delete-button" })) : null, this.showHistoryButton ? (index.h(fButton.FButton, { icon: "history", onClick: () => {
|
|
10116
10116
|
this.kupHistory.emit({
|
|
10117
10117
|
comp: this,
|
|
@@ -10123,10 +10123,10 @@ const KupDataTable = class {
|
|
|
10123
10123
|
onClick: async () => {
|
|
10124
10124
|
var _a;
|
|
10125
10125
|
if (this.insertMode === 'form') {
|
|
10126
|
-
__classPrivateFieldGet$
|
|
10126
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_rowInsertForm).call(this);
|
|
10127
10127
|
}
|
|
10128
10128
|
else {
|
|
10129
|
-
__classPrivateFieldSet$3(this, _KupDataTable_insertCount, (_a = __classPrivateFieldGet$
|
|
10129
|
+
__classPrivateFieldSet$3(this, _KupDataTable_insertCount, (_a = __classPrivateFieldGet$7(this, _KupDataTable_insertCount, "f"), _a++, _a), "f");
|
|
10130
10130
|
const cells = {};
|
|
10131
10131
|
for (let index = 0; index < this.data.columns.length; index++) {
|
|
10132
10132
|
const column = this.data.columns[index];
|
|
@@ -10146,57 +10146,57 @@ const KupDataTable = class {
|
|
|
10146
10146
|
}
|
|
10147
10147
|
const row = {
|
|
10148
10148
|
cells,
|
|
10149
|
-
id: __classPrivateFieldGet$
|
|
10150
|
-
__classPrivateFieldGet$
|
|
10149
|
+
id: __classPrivateFieldGet$7(this, _KupDataTable_INSERT_PREFIX, "f") +
|
|
10150
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertCount, "f"),
|
|
10151
10151
|
};
|
|
10152
10152
|
this.data.rows.unshift(row);
|
|
10153
10153
|
await this.refresh(true);
|
|
10154
10154
|
}
|
|
10155
|
-
}, sizing: kupManager$1.KupComponentSizing.MEDIUM, styling: fButtonDeclarations.FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), index.h("div", { key: '
|
|
10156
|
-
? __classPrivateFieldGet$
|
|
10157
|
-
: null), index.h("div", { key: '
|
|
10155
|
+
}, sizing: kupManager$1.KupComponentSizing.MEDIUM, styling: fButtonDeclarations.FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), index.h("div", { key: '8f342239d3aa4d1c7c5fce166a2b60909685d0e2', class: "droparea", ref: (el) => (__classPrivateFieldSet$3(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
|
|
10156
|
+
? __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
|
|
10157
|
+
: null), index.h("div", { key: 'c91e64e42b858a644c29b107fd9cb233d39a970f', style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet$3(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
|
|
10158
10158
|
? [
|
|
10159
10159
|
index.h("div", { class: "settings-trigger", onClick: () => {
|
|
10160
|
-
__classPrivateFieldGet$
|
|
10160
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
|
|
10161
10161
|
}, ref: (el) => {
|
|
10162
10162
|
__classPrivateFieldSet$3(this, _KupDataTable_customizeTopButtonRef, el, "f");
|
|
10163
10163
|
} }, index.h(fImage.FImage, { color: `var(${kupManager$1.KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
|
|
10164
10164
|
this.renderCustomizePanel(),
|
|
10165
10165
|
]
|
|
10166
|
-
: null, index.h("table", { key: '
|
|
10166
|
+
: null, index.h("table", { key: '2ab7c7256505b8326502f3a0c8f0e162a0c4f8e9', class: tableClass, ref: (el) => (__classPrivateFieldSet$3(this, _KupDataTable_tableRef, el, "f")), onMouseLeave: (ev) => {
|
|
10167
10167
|
ev.stopPropagation();
|
|
10168
10168
|
}, onPointerDown: (e) => {
|
|
10169
|
-
__classPrivateFieldSet$3(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet$
|
|
10169
|
+
__classPrivateFieldSet$3(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
|
|
10170
10170
|
}, onPointerUp: (e) => {
|
|
10171
|
-
__classPrivateFieldSet$3(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet$
|
|
10171
|
+
__classPrivateFieldSet$3(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
|
|
10172
10172
|
}, onContextMenu: (e) => {
|
|
10173
10173
|
e.preventDefault();
|
|
10174
|
-
} }, index.h("thead", { key: '
|
|
10174
|
+
} }, index.h("thead", { key: '43664e89ccde104c0c41dd1449e1c89d441757aa', hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$3(this, _KupDataTable_theadRef, el, "f")) }, index.h("tr", { key: '522d372292fd65339de510b1b9cd9c5174f450a3' }, header)), index.h("tbody", { key: '8447665b521befe969818f94cb0abab27f4c0da4' }, rows), this.showFooter && this.renderFooter()), stickyEl), paginatorBottom)));
|
|
10175
10175
|
return compCreated;
|
|
10176
10176
|
}
|
|
10177
10177
|
disconnectedCallback() {
|
|
10178
|
-
__classPrivateFieldGet$
|
|
10179
|
-
__classPrivateFieldGet$
|
|
10180
|
-
__classPrivateFieldGet$
|
|
10181
|
-
__classPrivateFieldGet$
|
|
10182
|
-
if (__classPrivateFieldGet$
|
|
10183
|
-
__classPrivateFieldGet$
|
|
10184
|
-
__classPrivateFieldGet$
|
|
10178
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.unregister(__classPrivateFieldGet$7(this, _KupDataTable_interactableDrag, "f").concat(__classPrivateFieldGet$7(this, _KupDataTable_interactableDrop, "f"), __classPrivateFieldGet$7(this, _KupDataTable_interactableResize, "f"), __classPrivateFieldGet$7(this, _KupDataTable_interactableTouch, "f")));
|
|
10179
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.unregister(this);
|
|
10180
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").theme.unregister(this);
|
|
10181
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").toolbar.unregister([this.rootElement]);
|
|
10182
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f"))
|
|
10183
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.unregister([
|
|
10184
|
+
__classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f"),
|
|
10185
10185
|
]);
|
|
10186
10186
|
const dynamicPositionElements = this.rootElement.shadowRoot.querySelectorAll('[' + kupManager$1.kupDynamicPositionAttribute + ']');
|
|
10187
10187
|
if (dynamicPositionElements.length > 0) {
|
|
10188
|
-
__classPrivateFieldGet$
|
|
10188
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.unregister(Array.prototype.slice.call(dynamicPositionElements));
|
|
10189
10189
|
}
|
|
10190
|
-
if (__classPrivateFieldGet$
|
|
10191
|
-
__classPrivateFieldGet$
|
|
10190
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f")) {
|
|
10191
|
+
__classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f").remove();
|
|
10192
10192
|
}
|
|
10193
|
-
if (__classPrivateFieldGet$
|
|
10194
|
-
__classPrivateFieldGet$
|
|
10193
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f")) {
|
|
10194
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").remove();
|
|
10195
10195
|
}
|
|
10196
10196
|
if (this.scrollOnHover) {
|
|
10197
|
-
__classPrivateFieldGet$
|
|
10197
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").scrollOnHover.unregister(__classPrivateFieldGet$7(this, _KupDataTable_tableAreaRef, "f"));
|
|
10198
10198
|
}
|
|
10199
|
-
__classPrivateFieldGet$
|
|
10199
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").resize.unobserve(this.rootElement);
|
|
10200
10200
|
this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
|
|
10201
10201
|
}
|
|
10202
10202
|
get rootElement() { return index.getElement(this); }
|
|
@@ -10218,16 +10218,16 @@ const KupDataTable = class {
|
|
|
10218
10218
|
}; }
|
|
10219
10219
|
};
|
|
10220
10220
|
_KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _KupDataTable_rowsLength = new WeakMap(), _KupDataTable_paginatedRows = new WeakMap(), _KupDataTable_paginatedRowsLength = new WeakMap(), _KupDataTable_footer = new WeakMap(), _KupDataTable_kupManager = new WeakMap(), _KupDataTable_renderedRows = new WeakMap(), _KupDataTable_loadMoreEventCounter = new WeakMap(), _KupDataTable_loadMoreEventPreviousQuantity = new WeakMap(), _KupDataTable_theadRef = new WeakMap(), _KupDataTable_tableRef = new WeakMap(), _KupDataTable_originalData = new WeakMap(), _KupDataTable_originalDataLoaded = new WeakMap(), _KupDataTable_originalDataLoadedMaxId = new WeakMap(), _KupDataTable_insertedRowIds = new WeakMap(), _KupDataTable_tableAreaRef = new WeakMap(), _KupDataTable_stickyTheadRef = new WeakMap(), _KupDataTable_lastPointerDetails = new WeakMap(), _KupDataTable_customizeTopButtonRef = new WeakMap(), _KupDataTable_customizeTopPanelRef = new WeakMap(), _KupDataTable_sizedColumns = new WeakMap(), _KupDataTable_intObserver = new WeakMap(), _KupDataTable_navBarHeight = new WeakMap(), _KupDataTable_theadIntersecting = new WeakMap(), _KupDataTable_tableIntersecting = new WeakMap(), _KupDataTable_isSafariBrowser = new WeakMap(), _KupDataTable_isRestoringState = new WeakMap(), _KupDataTable_globalFilterTimeout = new WeakMap(), _KupDataTable_totalMenuCoords = new WeakMap(), _KupDataTable_clickTimeout = new WeakMap(), _KupDataTable_thRefs = new WeakMap(), _KupDataTable_rowsRefs = new WeakMap(), _KupDataTable_oldWidth = new WeakMap(), _KupDataTable_hold = new WeakMap(), _KupDataTable_interactableDrag = new WeakMap(), _KupDataTable_interactableDrop = new WeakMap(), _KupDataTable_interactableResize = new WeakMap(), _KupDataTable_interactableTouch = new WeakMap(), _KupDataTable_dropareaRef = new WeakMap(), _KupDataTable_removeDropareaRef = new WeakMap(), _KupDataTable_groupsDropareaRef = new WeakMap(), _KupDataTable_clickCb = new WeakMap(), _KupDataTable_clickCbCustomPanel = new WeakMap(), _KupDataTable_clickCbDropCard = new WeakMap(), _KupDataTable_resizeTimeout = new WeakMap(), _KupDataTable_columnMenuInstance = new WeakMap(), _KupDataTable_filtersColumnMenuInstance = new WeakMap(), _KupDataTable_filtersRowsInstance = new WeakMap(), _KupDataTable_detailCard = new WeakMap(), _KupDataTable_insertCard = new WeakMap(), _KupDataTable_actionsCard = new WeakMap(), _KupDataTable_confirmDeleteCard = new WeakMap(), _KupDataTable_confirmDeleteDialog = new WeakMap(), _KupDataTable_columnMenuCard = new WeakMap(), _KupDataTable_columnDropCard = new WeakMap(), _KupDataTable_columnDropCardAnchor = new WeakMap(), _KupDataTable_dropDownActionCardAnchor = new WeakMap(), _KupDataTable_insertCount = new WeakMap(), _KupDataTable_lastFocusedRow = new WeakMap(), _KupDataTable_maxRowsPerPage = new WeakMap(), _KupDataTable_readyPromise = new WeakMap(), _KupDataTable_readyResolve = new WeakMap(), _KupDataTable_BUTTON_CANCEL_ID = new WeakMap(), _KupDataTable_BUTTON_SUBMIT_ID = new WeakMap(), _KupDataTable_FIELDS_FORM_ID = new WeakMap(), _KupDataTable_MESSAGE_ID = new WeakMap(), _KupDataTable_MESSAGE_WRAPPER_ID = new WeakMap(), _KupDataTable_INSERT_PREFIX = new WeakMap(), _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER = new WeakMap(), _KupDataTable_stickyHeaderPosition = new WeakMap(), _KupDataTable_handleUpdateClick = new WeakMap(), _KupDataTable_FONTSIZE_CODES = new WeakMap(), _KupDataTable_FONTSIZE_DECODES = new WeakMap(), _KupDataTable_FONTSIZE_ICONS = new WeakMap(), _KupDataTable_DENSITY_DECODES = new WeakMap(), _KupDataTable_DENSITY_ICONS = new WeakMap(), _KupDataTable_GRID_CODES = new WeakMap(), _KupDataTable_GRID_DECODES = new WeakMap(), _KupDataTable_GRID_ICONS = new WeakMap(), _KupDataTable_instances = new WeakSet(), _KupDataTable_closeDropCard = function _KupDataTable_closeDropCard() {
|
|
10221
|
-
__classPrivateFieldGet$
|
|
10222
|
-
__classPrivateFieldGet$
|
|
10223
|
-
__classPrivateFieldGet$
|
|
10221
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f"));
|
|
10222
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$7(this, _KupDataTable_clickCbDropCard, "f"));
|
|
10223
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f").remove();
|
|
10224
10224
|
__classPrivateFieldSet$3(this, _KupDataTable_columnDropCard, null, "f");
|
|
10225
10225
|
}, _KupDataTable_createDropCard = function _KupDataTable_createDropCard(starter, receiving) {
|
|
10226
|
-
if (__classPrivateFieldGet$
|
|
10227
|
-
__classPrivateFieldGet$
|
|
10226
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f")) {
|
|
10227
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
10228
10228
|
}
|
|
10229
10229
|
__classPrivateFieldSet$3(this, _KupDataTable_columnDropCard, document.createElement('kup-card'), "f");
|
|
10230
|
-
__classPrivateFieldGet$
|
|
10230
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f").data = {
|
|
10231
10231
|
options: {
|
|
10232
10232
|
data: this.data,
|
|
10233
10233
|
enableFormula: this.enableColumnsFormula,
|
|
@@ -10236,53 +10236,53 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10236
10236
|
receivingColumn: receiving,
|
|
10237
10237
|
starterColumn: starter,
|
|
10238
10238
|
formulaCb: () => {
|
|
10239
|
-
__classPrivateFieldGet$
|
|
10239
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
10240
10240
|
this.refresh();
|
|
10241
10241
|
},
|
|
10242
10242
|
mergeCb: () => {
|
|
10243
10243
|
this.newColumn(kupManager$1.KupDataNewColumnTypes.CONCATENATE, {
|
|
10244
10244
|
columns: [receiving.name, starter.name],
|
|
10245
10245
|
});
|
|
10246
|
-
__classPrivateFieldGet$
|
|
10246
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
10247
10247
|
},
|
|
10248
10248
|
moveCb: () => {
|
|
10249
|
-
__classPrivateFieldGet$
|
|
10250
|
-
__classPrivateFieldGet$
|
|
10249
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnSort).call(this, receiving, starter);
|
|
10250
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
10251
10251
|
},
|
|
10252
10252
|
},
|
|
10253
10253
|
};
|
|
10254
|
-
__classPrivateFieldGet$
|
|
10255
|
-
__classPrivateFieldGet$
|
|
10256
|
-
__classPrivateFieldGet$
|
|
10257
|
-
__classPrivateFieldGet$
|
|
10258
|
-
__classPrivateFieldGet$
|
|
10259
|
-
__classPrivateFieldGet$
|
|
10260
|
-
__classPrivateFieldGet$
|
|
10254
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f").layoutFamily = kupManager$1.KupCardFamily.BUILT_IN;
|
|
10255
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f").layoutNumber = 3;
|
|
10256
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f").isMenu = true;
|
|
10257
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f").sizeX = '280px';
|
|
10258
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f").sizeY = 'auto';
|
|
10259
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f"), __classPrivateFieldGet$7(this, _KupDataTable_columnDropCardAnchor, "f"), 0, kupManager$1.KupDynamicPositionPlacement.AUTO, true);
|
|
10260
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f"));
|
|
10261
10261
|
__classPrivateFieldSet$3(this, _KupDataTable_clickCbDropCard, {
|
|
10262
10262
|
cb: () => {
|
|
10263
|
-
__classPrivateFieldGet$
|
|
10263
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
10264
10264
|
},
|
|
10265
|
-
el: __classPrivateFieldGet$
|
|
10265
|
+
el: __classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f"),
|
|
10266
10266
|
}, "f");
|
|
10267
|
-
__classPrivateFieldGet$
|
|
10268
|
-
__classPrivateFieldGet$
|
|
10267
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$7(this, _KupDataTable_clickCbDropCard, "f"), true);
|
|
10268
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnDropCard, "f").menuVisible = true;
|
|
10269
10269
|
}, _KupDataTable_calculateData = function _KupDataTable_calculateData() {
|
|
10270
10270
|
if (!this.transpose) {
|
|
10271
10271
|
// restore
|
|
10272
|
-
if (__classPrivateFieldGet$
|
|
10273
|
-
this.data = Object.assign({}, __classPrivateFieldGet$
|
|
10272
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_originalData, "f")) {
|
|
10273
|
+
this.data = Object.assign({}, __classPrivateFieldGet$7(this, _KupDataTable_originalData, "f"));
|
|
10274
10274
|
}
|
|
10275
10275
|
}
|
|
10276
10276
|
else {
|
|
10277
10277
|
// transpose
|
|
10278
|
-
__classPrivateFieldGet$
|
|
10278
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_setTransposedData).call(this);
|
|
10279
10279
|
}
|
|
10280
10280
|
}, _KupDataTable_getRow = function _KupDataTable_getRow(id) {
|
|
10281
|
-
if (__classPrivateFieldGet$
|
|
10282
|
-
return __classPrivateFieldGet$
|
|
10281
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) && typeof id === 'string') {
|
|
10282
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable__getRow).call(this, id, __classPrivateFieldGet$7(this, _KupDataTable_paginatedRows, "f"));
|
|
10283
10283
|
}
|
|
10284
10284
|
else {
|
|
10285
|
-
return __classPrivateFieldGet$
|
|
10285
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable__getRow).call(this, id, __classPrivateFieldGet$7(this, _KupDataTable_rows, "f"));
|
|
10286
10286
|
}
|
|
10287
10287
|
}, _KupDataTable__getRow = function _KupDataTable__getRow(id, rows) {
|
|
10288
10288
|
if (!rows || rows.length == 0) {
|
|
@@ -10298,7 +10298,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10298
10298
|
return r;
|
|
10299
10299
|
}
|
|
10300
10300
|
if (r.group) {
|
|
10301
|
-
r = __classPrivateFieldGet$
|
|
10301
|
+
r = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable__getRow).call(this, id, r.group.children);
|
|
10302
10302
|
if (r) {
|
|
10303
10303
|
return r;
|
|
10304
10304
|
}
|
|
@@ -10310,15 +10310,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10310
10310
|
if (column) {
|
|
10311
10311
|
this.filters = {};
|
|
10312
10312
|
}
|
|
10313
|
-
return __classPrivateFieldGet$
|
|
10313
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.transpose(this.data, column);
|
|
10314
10314
|
}, _KupDataTable_setTransposedData = function _KupDataTable_setTransposedData() {
|
|
10315
10315
|
// transpose
|
|
10316
10316
|
__classPrivateFieldSet$3(this, _KupDataTable_originalData, Object.assign({}, this.data), "f");
|
|
10317
10317
|
if (this.data.columns.length > 0) {
|
|
10318
|
-
this.data = __classPrivateFieldGet$
|
|
10318
|
+
this.data = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getTransposedData).call(this, this.data.columns[0].name);
|
|
10319
10319
|
}
|
|
10320
10320
|
}, _KupDataTable_switchToTotalsMatrix = function _KupDataTable_switchToTotalsMatrix() {
|
|
10321
|
-
if (__classPrivateFieldGet$
|
|
10321
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_rows, "f").length === 0 || !__classPrivateFieldGet$7(this, _KupDataTable_rows, "f")[0].group)
|
|
10322
10322
|
return;
|
|
10323
10323
|
// calc totals matrix data
|
|
10324
10324
|
const totalsMatrixData = {};
|
|
@@ -10326,9 +10326,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10326
10326
|
// note that the sorting of the columns depends on the totals selection
|
|
10327
10327
|
// the first column is the one that is selected first in the totals, and so on...
|
|
10328
10328
|
const ids = [];
|
|
10329
|
-
ids.push(__classPrivateFieldGet$
|
|
10330
|
-
Object.keys(__classPrivateFieldGet$
|
|
10331
|
-
if (__classPrivateFieldGet$
|
|
10329
|
+
ids.push(__classPrivateFieldGet$7(this, _KupDataTable_rows, "f")[0].group.column);
|
|
10330
|
+
Object.keys(__classPrivateFieldGet$7(this, _KupDataTable_rows, "f")[0].group.totals).forEach((columnKey) => {
|
|
10331
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_rows, "f")[0].group.column !== columnKey)
|
|
10332
10332
|
ids.push(columnKey);
|
|
10333
10333
|
});
|
|
10334
10334
|
// calc columns
|
|
@@ -10358,7 +10358,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10358
10358
|
totalMode + ' ' + currentColumn.title;
|
|
10359
10359
|
}
|
|
10360
10360
|
}
|
|
10361
|
-
__classPrivateFieldGet$
|
|
10361
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_setObjForTotalsMatrix).call(this, currentColumn, this.totals);
|
|
10362
10362
|
}
|
|
10363
10363
|
totalsMatrixColumns.push(currentColumn);
|
|
10364
10364
|
}
|
|
@@ -10369,15 +10369,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10369
10369
|
// calc rows
|
|
10370
10370
|
const totalsMatrixRows = [];
|
|
10371
10371
|
let index = 0;
|
|
10372
|
-
__classPrivateFieldGet$
|
|
10372
|
+
__classPrivateFieldGet$7(this, _KupDataTable_rows, "f").forEach((row) => {
|
|
10373
10373
|
const cells = {};
|
|
10374
10374
|
ids.forEach((id) => {
|
|
10375
10375
|
let totalValue = row.group.totals[id];
|
|
10376
10376
|
if (!totalValue) {
|
|
10377
10377
|
totalValue = row.group.id;
|
|
10378
10378
|
}
|
|
10379
|
-
if (__classPrivateFieldGet$
|
|
10380
|
-
totalValue = __classPrivateFieldGet$
|
|
10379
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dates.isIsoDate(totalValue)) {
|
|
10380
|
+
totalValue = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dates.format(totalValue);
|
|
10381
10381
|
}
|
|
10382
10382
|
cells[id] = {
|
|
10383
10383
|
value: String(totalValue),
|
|
@@ -10417,13 +10417,13 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10417
10417
|
}, _KupDataTable_setObjForTotalsMatrix = function _KupDataTable_setObjForTotalsMatrix(column, totals) {
|
|
10418
10418
|
const obj = column.obj;
|
|
10419
10419
|
const totalMode = totals[column.name];
|
|
10420
|
-
if (__classPrivateFieldGet$
|
|
10420
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isDate(obj)) {
|
|
10421
10421
|
// check if min or max totals mode
|
|
10422
10422
|
if (totalMode === kupManager$1.TotalMode.MAX || totalMode === kupManager$1.TotalMode.MIN) {
|
|
10423
10423
|
return;
|
|
10424
10424
|
}
|
|
10425
10425
|
}
|
|
10426
|
-
else if (__classPrivateFieldGet$
|
|
10426
|
+
else if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isNumber(obj)) {
|
|
10427
10427
|
// check if percentage
|
|
10428
10428
|
if (obj.p && obj.p.toUpperCase() === 'P') {
|
|
10429
10429
|
if (totalMode !== kupManager$1.TotalMode.COUNT &&
|
|
@@ -10451,14 +10451,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10451
10451
|
__classPrivateFieldSet$3(this, _KupDataTable_navBarHeight, 0, "f");
|
|
10452
10452
|
}
|
|
10453
10453
|
if (topBar) {
|
|
10454
|
-
__classPrivateFieldSet$3(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$
|
|
10455
|
-
}
|
|
10456
|
-
if (__classPrivateFieldGet$
|
|
10457
|
-
__classPrivateFieldGet$
|
|
10458
|
-
const widthTable = __classPrivateFieldGet$
|
|
10459
|
-
__classPrivateFieldGet$
|
|
10460
|
-
const thCollection = __classPrivateFieldGet$
|
|
10461
|
-
const thStickyCollection = __classPrivateFieldGet$
|
|
10454
|
+
__classPrivateFieldSet$3(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$7(this, _KupDataTable_navBarHeight, "f") + topBar.clientHeight, "f");
|
|
10455
|
+
}
|
|
10456
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
10457
|
+
__classPrivateFieldGet$7(this, _KupDataTable_stickyTheadRef, "f").style.top = __classPrivateFieldGet$7(this, _KupDataTable_navBarHeight, "f") + 'px';
|
|
10458
|
+
const widthTable = __classPrivateFieldGet$7(this, _KupDataTable_tableAreaRef, "f").offsetWidth;
|
|
10459
|
+
__classPrivateFieldGet$7(this, _KupDataTable_stickyTheadRef, "f").style.maxWidth = widthTable + 'px';
|
|
10460
|
+
const thCollection = __classPrivateFieldGet$7(this, _KupDataTable_theadRef, "f").querySelectorAll('th');
|
|
10461
|
+
const thStickyCollection = __classPrivateFieldGet$7(this, _KupDataTable_stickyTheadRef, "f").querySelectorAll('th-sticky');
|
|
10462
10462
|
for (let i = 0; i < thCollection.length; i++) {
|
|
10463
10463
|
const widthTH = thCollection[i].offsetWidth;
|
|
10464
10464
|
thStickyCollection[i].style.width = widthTH + 'px';
|
|
@@ -10469,8 +10469,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10469
10469
|
entries.forEach((entry) => {
|
|
10470
10470
|
if (entry.target.tagName === 'TR') {
|
|
10471
10471
|
if (entry.isIntersecting) {
|
|
10472
|
-
__classPrivateFieldGet$
|
|
10473
|
-
const delta = __classPrivateFieldGet$
|
|
10472
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
|
|
10473
|
+
const delta = __classPrivateFieldGet$7(this, _KupDataTable_rows, "f").length - this.currentRowsPerPage;
|
|
10474
10474
|
if (delta < this.loadMoreStep) {
|
|
10475
10475
|
this.currentRowsPerPage += delta;
|
|
10476
10476
|
}
|
|
@@ -10484,7 +10484,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10484
10484
|
if (entry.isIntersecting) {
|
|
10485
10485
|
__classPrivateFieldSet$3(this, _KupDataTable_theadIntersecting, true, "f");
|
|
10486
10486
|
}
|
|
10487
|
-
else if (entry.boundingClientRect.bottom > __classPrivateFieldGet$
|
|
10487
|
+
else if (entry.boundingClientRect.bottom > __classPrivateFieldGet$7(this, _KupDataTable_navBarHeight, "f")) {
|
|
10488
10488
|
//If the thead is not intersecting but it still is inside the viewport, is to be considered intersected
|
|
10489
10489
|
__classPrivateFieldSet$3(this, _KupDataTable_theadIntersecting, true, "f");
|
|
10490
10490
|
}
|
|
@@ -10503,20 +10503,20 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10503
10503
|
if (this.tableHeight === undefined &&
|
|
10504
10504
|
this.tableWidth === undefined &&
|
|
10505
10505
|
this.headerIsPersistent) {
|
|
10506
|
-
__classPrivateFieldGet$
|
|
10506
|
+
__classPrivateFieldGet$7(this, _KupDataTable_stickyHeaderPosition, "f").call(this);
|
|
10507
10507
|
}
|
|
10508
10508
|
});
|
|
10509
10509
|
};
|
|
10510
10510
|
const options = {
|
|
10511
10511
|
threshold: 0,
|
|
10512
|
-
rootMargin: '-' + __classPrivateFieldGet$
|
|
10512
|
+
rootMargin: '-' + __classPrivateFieldGet$7(this, _KupDataTable_navBarHeight, "f") + 'px 0px 0px 0px',
|
|
10513
10513
|
};
|
|
10514
10514
|
__classPrivateFieldSet$3(this, _KupDataTable_intObserver, new IntersectionObserver(callback, options), "f");
|
|
10515
10515
|
}, _KupDataTable_didLoadInteractables = function _KupDataTable_didLoadInteractables() {
|
|
10516
|
-
__classPrivateFieldGet$
|
|
10516
|
+
__classPrivateFieldGet$7(this, _KupDataTable_interactableTouch, "f").push(__classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f"));
|
|
10517
10517
|
const tapCb = (e) => {
|
|
10518
10518
|
var _a, _b, _c, _d;
|
|
10519
|
-
if (__classPrivateFieldGet$
|
|
10519
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_hold, "f")) {
|
|
10520
10520
|
__classPrivateFieldSet$3(this, _KupDataTable_hold, false, "f");
|
|
10521
10521
|
return;
|
|
10522
10522
|
}
|
|
@@ -10531,18 +10531,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10531
10531
|
}
|
|
10532
10532
|
// in case an icon is clicked
|
|
10533
10533
|
if (e.target.classList.contains('f-image__icon')) {
|
|
10534
|
-
const details = __classPrivateFieldGet$
|
|
10534
|
+
const details = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10535
10535
|
// in case a cell action icon is clicked
|
|
10536
10536
|
if (((_b = (_a = details === null || details === void 0 ? void 0 : details.cell) === null || _a === void 0 ? void 0 : _a.obj) === null || _b === void 0 ? void 0 : _b.t) !== 'J4' &&
|
|
10537
10537
|
((_d = (_c = details === null || details === void 0 ? void 0 : details.cell) === null || _c === void 0 ? void 0 : _c.obj) === null || _d === void 0 ? void 0 : _d.p) !== 'ICO') {
|
|
10538
10538
|
break;
|
|
10539
10539
|
}
|
|
10540
10540
|
}
|
|
10541
|
-
__classPrivateFieldGet$
|
|
10541
|
+
__classPrivateFieldGet$7(this, _KupDataTable_clickTimeout, "f").push(setTimeout(() => {
|
|
10542
10542
|
this.kupDataTableClick.emit({
|
|
10543
10543
|
comp: this,
|
|
10544
10544
|
id: this.rootElement.id,
|
|
10545
|
-
details: __classPrivateFieldGet$
|
|
10545
|
+
details: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_clickHandler).call(this, clone),
|
|
10546
10546
|
});
|
|
10547
10547
|
}, 300));
|
|
10548
10548
|
break;
|
|
@@ -10551,7 +10551,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10551
10551
|
this.kupDataTableContextMenu.emit({
|
|
10552
10552
|
comp: this,
|
|
10553
10553
|
id: this.rootElement.id,
|
|
10554
|
-
details: __classPrivateFieldGet$
|
|
10554
|
+
details: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_contextMenuHandler).call(this, e),
|
|
10555
10555
|
});
|
|
10556
10556
|
break;
|
|
10557
10557
|
}
|
|
@@ -10560,17 +10560,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10560
10560
|
switch (e.button) {
|
|
10561
10561
|
// left click
|
|
10562
10562
|
case 0:
|
|
10563
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
10564
|
-
clearTimeout(__classPrivateFieldGet$
|
|
10565
|
-
__classPrivateFieldGet$
|
|
10566
|
-
__classPrivateFieldGet$
|
|
10563
|
+
for (let index = 0; index < __classPrivateFieldGet$7(this, _KupDataTable_clickTimeout, "f").length; index++) {
|
|
10564
|
+
clearTimeout(__classPrivateFieldGet$7(this, _KupDataTable_clickTimeout, "f")[index]);
|
|
10565
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Cleared clickHandler timeout(' +
|
|
10566
|
+
__classPrivateFieldGet$7(this, _KupDataTable_clickTimeout, "f")[index] +
|
|
10567
10567
|
').');
|
|
10568
10568
|
}
|
|
10569
10569
|
__classPrivateFieldSet$3(this, _KupDataTable_clickTimeout, [], "f");
|
|
10570
10570
|
this.kupDataTableDblClick.emit({
|
|
10571
10571
|
comp: this,
|
|
10572
10572
|
id: this.rootElement.id,
|
|
10573
|
-
details: __classPrivateFieldGet$
|
|
10573
|
+
details: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_dblClickHandler).call(this, e),
|
|
10574
10574
|
});
|
|
10575
10575
|
break;
|
|
10576
10576
|
}
|
|
@@ -10581,40 +10581,40 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10581
10581
|
this.kupDataTableContextMenu.emit({
|
|
10582
10582
|
comp: this,
|
|
10583
10583
|
id: this.rootElement.id,
|
|
10584
|
-
details: __classPrivateFieldGet$
|
|
10584
|
+
details: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_contextMenuHandler).call(this, e),
|
|
10585
10585
|
});
|
|
10586
10586
|
}
|
|
10587
10587
|
};
|
|
10588
|
-
__classPrivateFieldGet$
|
|
10589
|
-
__classPrivateFieldGet$
|
|
10590
|
-
__classPrivateFieldGet$
|
|
10588
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f"), kupManager$1.KupPointerEventTypes.TAP, tapCb);
|
|
10589
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f"), kupManager$1.KupPointerEventTypes.DOUBLETAP, doubletapCb);
|
|
10590
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f"), kupManager$1.KupPointerEventTypes.HOLD, holdCb);
|
|
10591
10591
|
}, _KupDataTable_didRenderInteractables = function _KupDataTable_didRenderInteractables() {
|
|
10592
10592
|
if (this.showGroups) {
|
|
10593
|
-
if (!__classPrivateFieldGet$
|
|
10594
|
-
__classPrivateFieldGet$
|
|
10595
|
-
__classPrivateFieldGet$
|
|
10593
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_interactableDrop, "f").includes(__classPrivateFieldGet$7(this, _KupDataTable_groupsDropareaRef, "f"))) {
|
|
10594
|
+
__classPrivateFieldGet$7(this, _KupDataTable_interactableDrop, "f").push(__classPrivateFieldGet$7(this, _KupDataTable_groupsDropareaRef, "f"));
|
|
10595
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.dropzone(__classPrivateFieldGet$7(this, _KupDataTable_groupsDropareaRef, "f"), {
|
|
10596
10596
|
accept: `[${kupManager$1.kupDraggableColumnAttr}]`,
|
|
10597
10597
|
}, null, {
|
|
10598
10598
|
drop: (e) => {
|
|
10599
10599
|
const draggedTh = e.relatedTarget;
|
|
10600
10600
|
const grouped = kupManager$1.getColumnByName(this.getColumns(), draggedTh.dataset.column);
|
|
10601
|
-
__classPrivateFieldGet$
|
|
10602
|
-
__classPrivateFieldGet$
|
|
10601
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnGroup).call(this, grouped);
|
|
10602
|
+
__classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager$1.kupDragActiveAttr);
|
|
10603
10603
|
},
|
|
10604
10604
|
});
|
|
10605
10605
|
}
|
|
10606
10606
|
}
|
|
10607
10607
|
if (this.removableColumns) {
|
|
10608
|
-
if (!__classPrivateFieldGet$
|
|
10609
|
-
__classPrivateFieldGet$
|
|
10610
|
-
__classPrivateFieldGet$
|
|
10608
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_interactableDrop, "f").includes(__classPrivateFieldGet$7(this, _KupDataTable_removeDropareaRef, "f"))) {
|
|
10609
|
+
__classPrivateFieldGet$7(this, _KupDataTable_interactableDrop, "f").push(__classPrivateFieldGet$7(this, _KupDataTable_removeDropareaRef, "f"));
|
|
10610
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.dropzone(__classPrivateFieldGet$7(this, _KupDataTable_removeDropareaRef, "f"), {
|
|
10611
10611
|
accept: `[${kupManager$1.kupDraggableColumnAttr}]`,
|
|
10612
10612
|
}, null, {
|
|
10613
10613
|
drop: (e) => {
|
|
10614
10614
|
const draggedTh = e.relatedTarget;
|
|
10615
10615
|
const deleted = kupManager$1.getColumnByName(this.getColumns(), draggedTh.dataset.column);
|
|
10616
10616
|
this.hideColumn(deleted);
|
|
10617
|
-
__classPrivateFieldGet$
|
|
10617
|
+
__classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager$1.kupDragActiveAttr);
|
|
10618
10618
|
},
|
|
10619
10619
|
});
|
|
10620
10620
|
}
|
|
@@ -10648,7 +10648,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10648
10648
|
__classPrivateFieldSet$3(this, _KupDataTable_columnDropCardAnchor, e.target, "f");
|
|
10649
10649
|
if (isSameComponent && receiving && starter) {
|
|
10650
10650
|
if (onlySort) {
|
|
10651
|
-
__classPrivateFieldGet$
|
|
10651
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnSort).call(this, receiving, starter);
|
|
10652
10652
|
}
|
|
10653
10653
|
else if (onlyMerge) {
|
|
10654
10654
|
this.newColumn(kupManager$1.KupDataNewColumnTypes.CONCATENATE, {
|
|
@@ -10656,17 +10656,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10656
10656
|
});
|
|
10657
10657
|
}
|
|
10658
10658
|
else {
|
|
10659
|
-
__classPrivateFieldGet$
|
|
10659
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_createDropCard).call(this, starter, receiving);
|
|
10660
10660
|
}
|
|
10661
10661
|
}
|
|
10662
|
-
__classPrivateFieldGet$
|
|
10662
|
+
__classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f").removeAttribute(kupManager$1.kupDragActiveAttr);
|
|
10663
10663
|
};
|
|
10664
10664
|
const startCb = (e) => {
|
|
10665
10665
|
const draggable = e.target;
|
|
10666
|
-
__classPrivateFieldGet$
|
|
10666
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, true, draggable);
|
|
10667
10667
|
};
|
|
10668
10668
|
const endCb = () => {
|
|
10669
|
-
__classPrivateFieldGet$
|
|
10669
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
10670
10670
|
};
|
|
10671
10671
|
const dropCallbacks = {
|
|
10672
10672
|
drop: dropCb,
|
|
@@ -10675,14 +10675,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10675
10675
|
start: startCb,
|
|
10676
10676
|
end: endCb,
|
|
10677
10677
|
};
|
|
10678
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
10679
|
-
const th = __classPrivateFieldGet$
|
|
10680
|
-
if (th && !__classPrivateFieldGet$
|
|
10681
|
-
__classPrivateFieldGet$
|
|
10682
|
-
__classPrivateFieldGet$
|
|
10678
|
+
for (let index = 0; index < __classPrivateFieldGet$7(this, _KupDataTable_thRefs, "f").length; index++) {
|
|
10679
|
+
const th = __classPrivateFieldGet$7(this, _KupDataTable_thRefs, "f")[index];
|
|
10680
|
+
if (th && !__classPrivateFieldGet$7(this, _KupDataTable_interactableDrag, "f").includes(th)) {
|
|
10681
|
+
__classPrivateFieldGet$7(this, _KupDataTable_interactableDrag, "f").push(th);
|
|
10682
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.dropzone(th, {
|
|
10683
10683
|
accept: `[${kupManager$1.kupDraggableColumnAttr}]`,
|
|
10684
10684
|
}, null, dropCallbacks);
|
|
10685
|
-
__classPrivateFieldGet$
|
|
10685
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.draggable(th, {
|
|
10686
10686
|
cursorChecker() {
|
|
10687
10687
|
return null;
|
|
10688
10688
|
},
|
|
@@ -10702,11 +10702,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10702
10702
|
const callbacks = {
|
|
10703
10703
|
move: moveCb,
|
|
10704
10704
|
};
|
|
10705
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
10706
|
-
const th = __classPrivateFieldGet$
|
|
10707
|
-
if (th && !__classPrivateFieldGet$
|
|
10708
|
-
__classPrivateFieldGet$
|
|
10709
|
-
__classPrivateFieldGet$
|
|
10705
|
+
for (let index = 0; index < __classPrivateFieldGet$7(this, _KupDataTable_thRefs, "f").length; index++) {
|
|
10706
|
+
const th = __classPrivateFieldGet$7(this, _KupDataTable_thRefs, "f")[index];
|
|
10707
|
+
if (th && !__classPrivateFieldGet$7(this, _KupDataTable_interactableResize, "f").includes(th)) {
|
|
10708
|
+
__classPrivateFieldGet$7(this, _KupDataTable_interactableResize, "f").push(th);
|
|
10709
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.resizable(th, {
|
|
10710
10710
|
allowFrom: '.header-cell__drag-handler',
|
|
10711
10711
|
edges: {
|
|
10712
10712
|
left: false,
|
|
@@ -10720,15 +10720,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10720
10720
|
}
|
|
10721
10721
|
}
|
|
10722
10722
|
if (this.dragEnabled) {
|
|
10723
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
10724
|
-
const row = __classPrivateFieldGet$
|
|
10723
|
+
for (let index = 0; index < __classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f").length; index++) {
|
|
10724
|
+
const row = __classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f")[index];
|
|
10725
10725
|
const dataCb = () => {
|
|
10726
10726
|
var _a, _b, _c;
|
|
10727
|
-
const cell = (_a = __classPrivateFieldGet$
|
|
10728
|
-
const column = (_b = __classPrivateFieldGet$
|
|
10729
|
-
const row = (_c = __classPrivateFieldGet$
|
|
10727
|
+
const cell = (_a = __classPrivateFieldGet$7(this, _KupDataTable_lastPointerDetails, "f")) === null || _a === void 0 ? void 0 : _a.cell;
|
|
10728
|
+
const column = (_b = __classPrivateFieldGet$7(this, _KupDataTable_lastPointerDetails, "f")) === null || _b === void 0 ? void 0 : _b.column;
|
|
10729
|
+
const row = (_c = __classPrivateFieldGet$7(this, _KupDataTable_lastPointerDetails, "f")) === null || _c === void 0 ? void 0 : _c.row;
|
|
10730
10730
|
if (!cell) {
|
|
10731
|
-
__classPrivateFieldGet$
|
|
10731
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logMessage(this, "Couldn't find cell to retrieve drag informations!", kupManager$1.KupDebugCategory.WARNING);
|
|
10732
10732
|
return;
|
|
10733
10733
|
}
|
|
10734
10734
|
return {
|
|
@@ -10741,9 +10741,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10741
10741
|
selectedRows: this.selectedRows,
|
|
10742
10742
|
};
|
|
10743
10743
|
};
|
|
10744
|
-
if (row && !__classPrivateFieldGet$
|
|
10745
|
-
__classPrivateFieldGet$
|
|
10746
|
-
__classPrivateFieldGet$
|
|
10744
|
+
if (row && !__classPrivateFieldGet$7(this, _KupDataTable_interactableDrag, "f").includes(row)) {
|
|
10745
|
+
__classPrivateFieldGet$7(this, _KupDataTable_interactableDrag, "f").push(row);
|
|
10746
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.draggable(row, {
|
|
10747
10747
|
allowFrom: 'td',
|
|
10748
10748
|
cursorChecker() {
|
|
10749
10749
|
return null;
|
|
@@ -10757,11 +10757,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10757
10757
|
if (this.dropEnabled) {
|
|
10758
10758
|
const dataCb = () => {
|
|
10759
10759
|
var _a, _b, _c;
|
|
10760
|
-
const cell = (_a = __classPrivateFieldGet$
|
|
10761
|
-
const column = (_b = __classPrivateFieldGet$
|
|
10762
|
-
const row = (_c = __classPrivateFieldGet$
|
|
10760
|
+
const cell = (_a = __classPrivateFieldGet$7(this, _KupDataTable_lastPointerDetails, "f")) === null || _a === void 0 ? void 0 : _a.cell;
|
|
10761
|
+
const column = (_b = __classPrivateFieldGet$7(this, _KupDataTable_lastPointerDetails, "f")) === null || _b === void 0 ? void 0 : _b.column;
|
|
10762
|
+
const row = (_c = __classPrivateFieldGet$7(this, _KupDataTable_lastPointerDetails, "f")) === null || _c === void 0 ? void 0 : _c.row;
|
|
10763
10763
|
if (!cell) {
|
|
10764
|
-
__classPrivateFieldGet$
|
|
10764
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logMessage(this, "Couldn't find cell to retrieve dropzone informations!", kupManager$1.KupDebugCategory.WARNING);
|
|
10765
10765
|
return;
|
|
10766
10766
|
}
|
|
10767
10767
|
return {
|
|
@@ -10771,11 +10771,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10771
10771
|
row,
|
|
10772
10772
|
};
|
|
10773
10773
|
};
|
|
10774
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
10775
|
-
const row = __classPrivateFieldGet$
|
|
10776
|
-
if (row && !__classPrivateFieldGet$
|
|
10777
|
-
__classPrivateFieldGet$
|
|
10778
|
-
__classPrivateFieldGet$
|
|
10774
|
+
for (let index = 0; index < __classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f").length; index++) {
|
|
10775
|
+
const row = __classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f")[index];
|
|
10776
|
+
if (row && !__classPrivateFieldGet$7(this, _KupDataTable_interactableDrop, "f").includes(row)) {
|
|
10777
|
+
__classPrivateFieldGet$7(this, _KupDataTable_interactableDrop, "f").push(row);
|
|
10778
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").interact.dropzone(row, {
|
|
10779
10779
|
accept: `[${kupManager$1.kupDraggableCellAttr}]`,
|
|
10780
10780
|
}, {
|
|
10781
10781
|
callback: dataCb,
|
|
@@ -10789,44 +10789,44 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10789
10789
|
if (this.headerIsPersistent &&
|
|
10790
10790
|
this.tableHeight === undefined &&
|
|
10791
10791
|
this.tableWidth === undefined) {
|
|
10792
|
-
__classPrivateFieldGet$
|
|
10793
|
-
__classPrivateFieldGet$
|
|
10792
|
+
__classPrivateFieldGet$7(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f"));
|
|
10793
|
+
__classPrivateFieldGet$7(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$7(this, _KupDataTable_theadRef, "f"));
|
|
10794
10794
|
}
|
|
10795
10795
|
}, _KupDataTable_didRenderObservers = function _KupDataTable_didRenderObservers() {
|
|
10796
|
-
if (__classPrivateFieldGet$
|
|
10797
|
-
__classPrivateFieldGet$
|
|
10796
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_paginatedRowsLength, "f") < __classPrivateFieldGet$7(this, _KupDataTable_rowsLength, "f") && this.lazyLoadRows) {
|
|
10797
|
+
__classPrivateFieldGet$7(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f")[__classPrivateFieldGet$7(this, _KupDataTable_paginatedRowsLength, "f") - 1]);
|
|
10798
10798
|
}
|
|
10799
10799
|
}, _KupDataTable_didLoadEventHandling = function _KupDataTable_didLoadEventHandling() {
|
|
10800
|
-
__classPrivateFieldGet$
|
|
10800
|
+
__classPrivateFieldGet$7(this, _KupDataTable_tableAreaRef, "f").addEventListener('scroll', () => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_scrollStickyHeader).call(this));
|
|
10801
10801
|
}, _KupDataTable_scrollStickyHeader = function _KupDataTable_scrollStickyHeader() {
|
|
10802
|
-
if (!__classPrivateFieldGet$
|
|
10802
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
10803
10803
|
return;
|
|
10804
10804
|
}
|
|
10805
|
-
__classPrivateFieldGet$
|
|
10805
|
+
__classPrivateFieldGet$7(this, _KupDataTable_stickyTheadRef, "f").scrollLeft = __classPrivateFieldGet$7(this, _KupDataTable_tableAreaRef, "f").scrollLeft;
|
|
10806
10806
|
}, _KupDataTable_checkScrollOnHover = function _KupDataTable_checkScrollOnHover() {
|
|
10807
|
-
if (!__classPrivateFieldGet$
|
|
10807
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").scrollOnHover.isRegistered(__classPrivateFieldGet$7(this, _KupDataTable_tableAreaRef, "f"))) {
|
|
10808
10808
|
if (this.scrollOnHover &&
|
|
10809
10809
|
this.tableHeight === undefined &&
|
|
10810
10810
|
this.tableWidth === undefined) {
|
|
10811
|
-
__classPrivateFieldGet$
|
|
10811
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").scrollOnHover.register(__classPrivateFieldGet$7(this, _KupDataTable_tableAreaRef, "f"));
|
|
10812
10812
|
}
|
|
10813
10813
|
}
|
|
10814
10814
|
else {
|
|
10815
10815
|
if (!this.scrollOnHover &&
|
|
10816
10816
|
(this.tableHeight !== undefined ||
|
|
10817
10817
|
this.tableWidth !== undefined)) {
|
|
10818
|
-
__classPrivateFieldGet$
|
|
10818
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").scrollOnHover.unregister(__classPrivateFieldGet$7(this, _KupDataTable_tableAreaRef, "f"));
|
|
10819
10819
|
}
|
|
10820
10820
|
}
|
|
10821
10821
|
}, _KupDataTable_customizePanelPosition = function _KupDataTable_customizePanelPosition() {
|
|
10822
|
-
if (__classPrivateFieldGet$
|
|
10823
|
-
!__classPrivateFieldGet$
|
|
10824
|
-
__classPrivateFieldGet$
|
|
10822
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_customizeTopButtonRef, "f") &&
|
|
10823
|
+
!__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f"))) {
|
|
10824
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f"), __classPrivateFieldGet$7(this, _KupDataTable_customizeTopButtonRef, "f"), 0, kupManager$1.KupDynamicPositionPlacement.BOTTOM, true);
|
|
10825
10825
|
}
|
|
10826
10826
|
}, _KupDataTable_rowsPointLength = function _KupDataTable_rowsPointLength() {
|
|
10827
|
-
return __classPrivateFieldGet$
|
|
10827
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, __classPrivateFieldGet$7(this, _KupDataTable_rows, "f"));
|
|
10828
10828
|
}, _KupDataTable_paginatedRowsPointLength = function _KupDataTable_paginatedRowsPointLength() {
|
|
10829
|
-
return __classPrivateFieldGet$
|
|
10829
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, __classPrivateFieldGet$7(this, _KupDataTable_paginatedRows, "f"));
|
|
10830
10830
|
}, _KupDataTable__rowsLength = function _KupDataTable__rowsLength(r) {
|
|
10831
10831
|
if (r == null) {
|
|
10832
10832
|
return 0;
|
|
@@ -10839,7 +10839,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10839
10839
|
}
|
|
10840
10840
|
count += 1;
|
|
10841
10841
|
if (row.group != null) {
|
|
10842
|
-
count += __classPrivateFieldGet$
|
|
10842
|
+
count += __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, row.group.children);
|
|
10843
10843
|
}
|
|
10844
10844
|
}
|
|
10845
10845
|
return count;
|
|
@@ -10865,7 +10865,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10865
10865
|
return undefined;
|
|
10866
10866
|
}
|
|
10867
10867
|
}, _KupDataTable_rowDetail = function _KupDataTable_rowDetail(row, x, y) {
|
|
10868
|
-
const transposedData = __classPrivateFieldGet$
|
|
10868
|
+
const transposedData = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getTransposedData).call(this);
|
|
10869
10869
|
const cardData = {
|
|
10870
10870
|
button: [
|
|
10871
10871
|
{
|
|
@@ -10894,7 +10894,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10894
10894
|
showHeader: false,
|
|
10895
10895
|
},
|
|
10896
10896
|
],
|
|
10897
|
-
text: [__classPrivateFieldGet$
|
|
10897
|
+
text: [__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageRow.DETAIL)],
|
|
10898
10898
|
};
|
|
10899
10899
|
const columns = cardData.datatable[0].data.columns;
|
|
10900
10900
|
const rows = cardData.datatable[0].data.rows;
|
|
@@ -10918,7 +10918,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10918
10918
|
currentColumn.visible = true;
|
|
10919
10919
|
}
|
|
10920
10920
|
else {
|
|
10921
|
-
__classPrivateFieldGet$
|
|
10921
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Invalid column name on row ID (' +
|
|
10922
10922
|
row.id +
|
|
10923
10923
|
"), couldn't set current record!", kupManager$1.KupDebugCategory.WARNING);
|
|
10924
10924
|
}
|
|
@@ -10927,7 +10927,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10927
10927
|
for (let index = 0; index < rows.length; index++) {
|
|
10928
10928
|
const column = this.data.columns.find((x) => x.name === rows[index].transposedColumnName);
|
|
10929
10929
|
if (!column) {
|
|
10930
|
-
__classPrivateFieldGet$
|
|
10930
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Column not found on row name (' + column + ')!', kupManager$1.KupDebugCategory.WARNING);
|
|
10931
10931
|
return;
|
|
10932
10932
|
}
|
|
10933
10933
|
const editable = rows[index].cells[row.id].isEditable
|
|
@@ -10951,8 +10951,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10951
10951
|
resource: editable ? 'edit-key' : 'key-variant',
|
|
10952
10952
|
},
|
|
10953
10953
|
title: editable
|
|
10954
|
-
? __classPrivateFieldGet$
|
|
10955
|
-
: __classPrivateFieldGet$
|
|
10954
|
+
? __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageRow.EDITABLE_KEY)
|
|
10955
|
+
: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageRow.KEY),
|
|
10956
10956
|
value: editable ? 'edit-key' : 'key-variant',
|
|
10957
10957
|
};
|
|
10958
10958
|
}
|
|
@@ -10967,7 +10967,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10967
10967
|
color: `var(${kupManager$1.KupThemeColorValues.TEXT})`,
|
|
10968
10968
|
resource: 'pencil',
|
|
10969
10969
|
},
|
|
10970
|
-
title: __classPrivateFieldGet$
|
|
10970
|
+
title: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.EDITABLE_FIELD),
|
|
10971
10971
|
value: 'pencil',
|
|
10972
10972
|
};
|
|
10973
10973
|
}
|
|
@@ -10989,64 +10989,64 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10989
10989
|
}
|
|
10990
10990
|
rows[index].cells[kupManager$1.iconColumn.toUpperCase()] = iconCell;
|
|
10991
10991
|
}
|
|
10992
|
-
if (!__classPrivateFieldGet$
|
|
10992
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f")) {
|
|
10993
10993
|
__classPrivateFieldSet$3(this, _KupDataTable_detailCard, document.createElement('kup-card'), "f");
|
|
10994
|
-
__classPrivateFieldGet$
|
|
10995
|
-
__classPrivateFieldGet$
|
|
10996
|
-
__classPrivateFieldGet$
|
|
10997
|
-
__classPrivateFieldGet$
|
|
10994
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").layoutFamily = kupManager$1.KupCardFamily.DIALOG;
|
|
10995
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").layoutNumber = 4;
|
|
10996
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").sizeX = 'auto';
|
|
10997
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").sizeY = 'auto';
|
|
10998
10998
|
}
|
|
10999
10999
|
else {
|
|
11000
|
-
const children = Array.prototype.slice.call(__classPrivateFieldGet$
|
|
11000
|
+
const children = Array.prototype.slice.call(__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").children, 0);
|
|
11001
11001
|
for (let index = 0; index < children.length; index++) {
|
|
11002
11002
|
children[index].remove();
|
|
11003
11003
|
}
|
|
11004
11004
|
}
|
|
11005
|
-
__classPrivateFieldGet$
|
|
11006
|
-
__classPrivateFieldGet$
|
|
11007
|
-
__classPrivateFieldGet$
|
|
11008
|
-
__classPrivateFieldGet$
|
|
11009
|
-
__classPrivateFieldGet$
|
|
11010
|
-
__classPrivateFieldGet$
|
|
11011
|
-
__classPrivateFieldGet$
|
|
11012
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
11005
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").data = cardData;
|
|
11006
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").style.position = 'fixed';
|
|
11007
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").style.left = '0';
|
|
11008
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").style.top = '0';
|
|
11009
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").setAttribute('data-x', x.toString());
|
|
11010
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").setAttribute('data-y', y.toString());
|
|
11011
|
+
__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f").style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
|
11012
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$7(this, _KupDataTable_detailCard, "f"));
|
|
11013
11013
|
}, _KupDataTable_dropDownActions = function _KupDataTable_dropDownActions(dropDownActions, row) {
|
|
11014
|
-
__classPrivateFieldGet$
|
|
11014
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_createDropDownActionsCard).call(this, dropDownActions, row);
|
|
11015
11015
|
}, _KupDataTable_createDropDownActionsCard = function _KupDataTable_createDropDownActionsCard(dropDownActions, row) {
|
|
11016
|
-
if (__classPrivateFieldGet$
|
|
11017
|
-
__classPrivateFieldGet$
|
|
11016
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f")) {
|
|
11017
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeRowActionsCard).call(this);
|
|
11018
11018
|
}
|
|
11019
11019
|
__classPrivateFieldSet$3(this, _KupDataTable_actionsCard, document.createElement('kup-card'), "f");
|
|
11020
|
-
__classPrivateFieldGet$
|
|
11021
|
-
__classPrivateFieldGet$
|
|
11022
|
-
__classPrivateFieldGet$
|
|
11023
|
-
__classPrivateFieldGet$
|
|
11024
|
-
__classPrivateFieldGet$
|
|
11025
|
-
__classPrivateFieldGet$
|
|
11026
|
-
__classPrivateFieldGet$
|
|
11020
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").layoutFamily = kupManager$1.KupCardFamily.STANDARD;
|
|
11021
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").layoutNumber = 17;
|
|
11022
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").menuVisible = true;
|
|
11023
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").sizeX = 'auto';
|
|
11024
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").sizeY = 'auto';
|
|
11025
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").data =
|
|
11026
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_prepareDataForActionsCard).call(this, dropDownActions);
|
|
11027
11027
|
__classPrivateFieldSet$3(this, _KupDataTable_clickCbDropCard, {
|
|
11028
11028
|
cb: () => {
|
|
11029
|
-
__classPrivateFieldGet$
|
|
11029
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeRowActionsCard).call(this);
|
|
11030
11030
|
},
|
|
11031
|
-
el: __classPrivateFieldGet$
|
|
11031
|
+
el: __classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f"),
|
|
11032
11032
|
}, "f");
|
|
11033
|
-
__classPrivateFieldGet$
|
|
11034
|
-
__classPrivateFieldGet$
|
|
11035
|
-
__classPrivateFieldGet$
|
|
11036
|
-
__classPrivateFieldGet$
|
|
11037
|
-
__classPrivateFieldGet$
|
|
11038
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
11039
|
-
__classPrivateFieldGet$
|
|
11033
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$7(this, _KupDataTable_clickCbDropCard, "f"), true);
|
|
11034
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").style.position = 'absolute';
|
|
11035
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").style.left = '0';
|
|
11036
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").style.top = '0';
|
|
11037
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").isMenu = true;
|
|
11038
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f"));
|
|
11039
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f"), __classPrivateFieldGet$7(this, _KupDataTable_dropDownActionCardAnchor, "f")
|
|
11040
11040
|
.parentElement, 0, kupManager$1.KupDynamicPositionPlacement.AUTO, true);
|
|
11041
|
-
__classPrivateFieldGet$
|
|
11042
|
-
__classPrivateFieldGet$
|
|
11041
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f"));
|
|
11042
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").addEventListener('kup-card-event', (e) => {
|
|
11043
11043
|
switch (e.detail.event.type) {
|
|
11044
11044
|
case 'kup-textfield-input':
|
|
11045
11045
|
const input = e.detail.event.detail.value;
|
|
11046
|
-
__classPrivateFieldGet$
|
|
11046
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_filterRowActionsCard).call(this, __classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f"), dropDownActions, input);
|
|
11047
11047
|
break;
|
|
11048
11048
|
case 'kup-textfield-cleariconclick':
|
|
11049
|
-
__classPrivateFieldGet$
|
|
11049
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_clearSearchActionsCard).call(this, __classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f"), dropDownActions);
|
|
11050
11050
|
break;
|
|
11051
11051
|
case 'kup-list-click':
|
|
11052
11052
|
const selectedObjectIndex = e.detail.event.detail.index;
|
|
@@ -11062,7 +11062,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11062
11062
|
column: selectedObject.column,
|
|
11063
11063
|
});
|
|
11064
11064
|
setTimeout(() => {
|
|
11065
|
-
__classPrivateFieldGet$
|
|
11065
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeRowActionsCard).call(this);
|
|
11066
11066
|
}, 0);
|
|
11067
11067
|
}
|
|
11068
11068
|
});
|
|
@@ -11082,14 +11082,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11082
11082
|
card.data.list[0].data = filteredList;
|
|
11083
11083
|
card.refresh();
|
|
11084
11084
|
}, _KupDataTable_closeRowActionsCard = function _KupDataTable_closeRowActionsCard() {
|
|
11085
|
-
__classPrivateFieldGet$
|
|
11086
|
-
__classPrivateFieldGet$
|
|
11087
|
-
__classPrivateFieldGet$
|
|
11085
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f"));
|
|
11086
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$7(this, _KupDataTable_clickCbDropCard, "f"));
|
|
11087
|
+
__classPrivateFieldGet$7(this, _KupDataTable_actionsCard, "f").remove();
|
|
11088
11088
|
__classPrivateFieldSet$3(this, _KupDataTable_actionsCard, null, "f");
|
|
11089
11089
|
}, _KupDataTable_closeColumnMenuCard = function _KupDataTable_closeColumnMenuCard() {
|
|
11090
|
-
__classPrivateFieldGet$
|
|
11091
|
-
__classPrivateFieldGet$
|
|
11092
|
-
__classPrivateFieldGet$
|
|
11090
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f"));
|
|
11091
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$7(this, _KupDataTable_clickCbDropCard, "f"));
|
|
11092
|
+
__classPrivateFieldGet$7(this, _KupDataTable_columnMenuCard, "f").remove();
|
|
11093
11093
|
__classPrivateFieldSet$3(this, _KupDataTable_columnMenuCard, null, "f");
|
|
11094
11094
|
}, _KupDataTable_prepareDataForActionsCard = function _KupDataTable_prepareDataForActionsCard(dropDownActions) {
|
|
11095
11095
|
const hasAlmostTenElements = dropDownActions.length >= 10;
|
|
@@ -11119,10 +11119,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11119
11119
|
const CARD_WIDTH = 400;
|
|
11120
11120
|
const CARD_HEIGHT = 400;
|
|
11121
11121
|
__classPrivateFieldSet$3(this, _KupDataTable_insertCard, document.createElement('kup-card'), "f");
|
|
11122
|
-
__classPrivateFieldGet$
|
|
11123
|
-
__classPrivateFieldGet$
|
|
11124
|
-
__classPrivateFieldGet$
|
|
11125
|
-
__classPrivateFieldGet$
|
|
11122
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").layoutFamily = kupManager$1.KupCardFamily.FREE;
|
|
11123
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").layoutNumber = 1;
|
|
11124
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").sizeX = CARD_WIDTH + 'px';
|
|
11125
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").sizeY = CARD_HEIGHT + 'px';
|
|
11126
11126
|
const style = document.createElement('style');
|
|
11127
11127
|
style.innerText =
|
|
11128
11128
|
'kup-form { max-height: 40vh; overflow: auto; } .page-wrapper { display: grid; } ' +
|
|
@@ -11130,24 +11130,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11130
11130
|
'.message-wrapper { display: none; justify-content: start; padding-top: 5px; padding-bottom: 5px; } ' +
|
|
11131
11131
|
'.errorIcon { --kup-icon-color: var(--kup-danger-color-60); } ' +
|
|
11132
11132
|
'.message { background-color: var(--kup-danger-color-60); color: white; padding: 3px; } ';
|
|
11133
|
-
__classPrivateFieldGet$
|
|
11133
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").append(style);
|
|
11134
11134
|
const pageWrapper = document.createElement('div');
|
|
11135
11135
|
pageWrapper.className = 'page-wrapper';
|
|
11136
11136
|
const buttonWrapper = document.createElement('div');
|
|
11137
11137
|
buttonWrapper.className = 'button-wrapper';
|
|
11138
11138
|
const cancel = document.createElement('kup-button');
|
|
11139
11139
|
const confirm = document.createElement('kup-button');
|
|
11140
|
-
cancel.id = __classPrivateFieldGet$
|
|
11140
|
+
cancel.id = __classPrivateFieldGet$7(this, _KupDataTable_BUTTON_CANCEL_ID, "f");
|
|
11141
11141
|
cancel.icon = 'clear';
|
|
11142
|
-
cancel.label = __classPrivateFieldGet$
|
|
11142
|
+
cancel.label = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.ABORT);
|
|
11143
11143
|
cancel.styling = fButtonDeclarations.FButtonStyling.FLAT;
|
|
11144
11144
|
cancel.addEventListener('kup-button-click', () => {
|
|
11145
|
-
__classPrivateFieldGet$
|
|
11145
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").remove();
|
|
11146
11146
|
__classPrivateFieldSet$3(this, _KupDataTable_insertCard, null, "f");
|
|
11147
11147
|
});
|
|
11148
|
-
confirm.id = __classPrivateFieldGet$
|
|
11148
|
+
confirm.id = __classPrivateFieldGet$7(this, _KupDataTable_BUTTON_SUBMIT_ID, "f");
|
|
11149
11149
|
confirm.icon = 'check';
|
|
11150
|
-
confirm.label = __classPrivateFieldGet$
|
|
11150
|
+
confirm.label = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.CONFIRM);
|
|
11151
11151
|
let innerComp = document.createElement('kup-spinner');
|
|
11152
11152
|
innerComp.slot = 'spinner';
|
|
11153
11153
|
innerComp.dimensions = '0.6em';
|
|
@@ -11166,7 +11166,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11166
11166
|
buttonWrapper.append(cancel);
|
|
11167
11167
|
buttonWrapper.append(confirm);
|
|
11168
11168
|
const form = document.createElement('kup-form');
|
|
11169
|
-
form.id = __classPrivateFieldGet$
|
|
11169
|
+
form.id = __classPrivateFieldGet$7(this, _KupDataTable_FIELDS_FORM_ID, "f");
|
|
11170
11170
|
const row = {
|
|
11171
11171
|
cells: {},
|
|
11172
11172
|
id: '0',
|
|
@@ -11186,7 +11186,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11186
11186
|
};
|
|
11187
11187
|
const messageWrapper = document.createElement('div');
|
|
11188
11188
|
messageWrapper.className = 'message-wrapper';
|
|
11189
|
-
messageWrapper.id = __classPrivateFieldGet$
|
|
11189
|
+
messageWrapper.id = __classPrivateFieldGet$7(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f");
|
|
11190
11190
|
const icon = document.createElement('kup-image');
|
|
11191
11191
|
icon.className = 'errorIcon';
|
|
11192
11192
|
icon.resource = 'cancel';
|
|
@@ -11195,43 +11195,43 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11195
11195
|
messageWrapper.append(icon);
|
|
11196
11196
|
const message = document.createElement('span');
|
|
11197
11197
|
message.className = 'message';
|
|
11198
|
-
message.id = __classPrivateFieldGet$
|
|
11198
|
+
message.id = __classPrivateFieldGet$7(this, _KupDataTable_MESSAGE_ID, "f");
|
|
11199
11199
|
let msg = '';
|
|
11200
11200
|
message.innerText = msg;
|
|
11201
11201
|
messageWrapper.append(message);
|
|
11202
11202
|
pageWrapper.append(messageWrapper);
|
|
11203
11203
|
pageWrapper.append(form);
|
|
11204
11204
|
pageWrapper.append(buttonWrapper);
|
|
11205
|
-
__classPrivateFieldGet$
|
|
11206
|
-
__classPrivateFieldGet$
|
|
11207
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
11205
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").append(pageWrapper);
|
|
11206
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f").data = {};
|
|
11207
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$7(this, _KupDataTable_insertCard, "f"));
|
|
11208
11208
|
}, _KupDataTable_rowsDelete = function _KupDataTable_rowsDelete() {
|
|
11209
11209
|
const createDeleteCard = () => {
|
|
11210
11210
|
__classPrivateFieldSet$3(this, _KupDataTable_confirmDeleteDialog, document.createElement('kup-dialog'), "f");
|
|
11211
11211
|
__classPrivateFieldSet$3(this, _KupDataTable_confirmDeleteCard, document.createElement('kup-card'), "f");
|
|
11212
|
-
__classPrivateFieldGet$
|
|
11213
|
-
__classPrivateFieldGet$
|
|
11214
|
-
__classPrivateFieldGet$
|
|
11215
|
-
__classPrivateFieldGet$
|
|
11212
|
+
__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").layoutFamily = kupManager$1.KupCardFamily.FREE;
|
|
11213
|
+
__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").layoutNumber = 1;
|
|
11214
|
+
__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").sizeX = 'auto';
|
|
11215
|
+
__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").sizeY = 'auto';
|
|
11216
11216
|
const style = document.createElement('style');
|
|
11217
11217
|
style.innerText =
|
|
11218
11218
|
'.button-wrapper, .message-wrapper { display: flex; justify-content: space-around; z-index: var(--kup-card-zindex); } .message-wrapper { padding-bottom: 20px; }';
|
|
11219
11219
|
const messageWrapper = document.createElement('div');
|
|
11220
11220
|
messageWrapper.className = 'message-wrapper';
|
|
11221
|
-
messageWrapper.id = __classPrivateFieldGet$
|
|
11221
|
+
messageWrapper.id = __classPrivateFieldGet$7(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f");
|
|
11222
11222
|
const message = document.createElement('span');
|
|
11223
11223
|
message.className = 'message';
|
|
11224
|
-
message.id = __classPrivateFieldGet$
|
|
11225
|
-
let msg = __classPrivateFieldGet$
|
|
11224
|
+
message.id = __classPrivateFieldGet$7(this, _KupDataTable_MESSAGE_ID, "f");
|
|
11225
|
+
let msg = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.CONFIRM_DELETE_X_ROWS);
|
|
11226
11226
|
msg = msg.replace('{0}', this.selectedRows.length + '');
|
|
11227
11227
|
message.innerText = msg;
|
|
11228
11228
|
messageWrapper.append(message);
|
|
11229
11229
|
const buttonWrapper = document.createElement('div');
|
|
11230
11230
|
buttonWrapper.className = 'button-wrapper';
|
|
11231
11231
|
const confirm = document.createElement('kup-button');
|
|
11232
|
-
confirm.id = __classPrivateFieldGet$
|
|
11232
|
+
confirm.id = __classPrivateFieldGet$7(this, _KupDataTable_BUTTON_SUBMIT_ID, "f");
|
|
11233
11233
|
confirm.icon = 'check';
|
|
11234
|
-
confirm.label = __classPrivateFieldGet$
|
|
11234
|
+
confirm.label = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.CONFIRM);
|
|
11235
11235
|
let innerComp = document.createElement('kup-spinner');
|
|
11236
11236
|
innerComp.slot = 'spinner';
|
|
11237
11237
|
innerComp.dimensions = '0.6em';
|
|
@@ -11246,17 +11246,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11246
11246
|
});
|
|
11247
11247
|
});
|
|
11248
11248
|
buttonWrapper.append(confirm);
|
|
11249
|
-
__classPrivateFieldGet$
|
|
11250
|
-
__classPrivateFieldGet$
|
|
11251
|
-
__classPrivateFieldGet$
|
|
11252
|
-
__classPrivateFieldGet$
|
|
11253
|
-
__classPrivateFieldGet$
|
|
11254
|
-
document.querySelector('body').append(__classPrivateFieldGet$
|
|
11249
|
+
__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").append(style);
|
|
11250
|
+
__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").append(messageWrapper);
|
|
11251
|
+
__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").append(buttonWrapper);
|
|
11252
|
+
__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f").data = {};
|
|
11253
|
+
__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteDialog, "f").append(__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteCard, "f"));
|
|
11254
|
+
document.querySelector('body').append(__classPrivateFieldGet$7(this, _KupDataTable_confirmDeleteDialog, "f"));
|
|
11255
11255
|
};
|
|
11256
11256
|
const insertRowsIds = [];
|
|
11257
11257
|
const startingRows = [];
|
|
11258
11258
|
this.selectedRows.forEach((row) => {
|
|
11259
|
-
if (row.id.indexOf(__classPrivateFieldGet$
|
|
11259
|
+
if (row.id.indexOf(__classPrivateFieldGet$7(this, _KupDataTable_INSERT_PREFIX, "f")) > -1) {
|
|
11260
11260
|
insertRowsIds.push(row.id);
|
|
11261
11261
|
}
|
|
11262
11262
|
else {
|
|
@@ -11361,15 +11361,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11361
11361
|
tr: tr ? tr : null,
|
|
11362
11362
|
};
|
|
11363
11363
|
}, _KupDataTable_clickHandler = function _KupDataTable_clickHandler(e) {
|
|
11364
|
-
const details = __classPrivateFieldGet$
|
|
11364
|
+
const details = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
11365
11365
|
if (details.area === 'header') {
|
|
11366
11366
|
if (details.th && details.column) {
|
|
11367
11367
|
if (details.filterRemove) {
|
|
11368
|
-
__classPrivateFieldGet$
|
|
11368
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onRemoveFilter).call(this, details.column);
|
|
11369
11369
|
return details;
|
|
11370
11370
|
}
|
|
11371
11371
|
else if (this.sortEnabled) {
|
|
11372
|
-
__classPrivateFieldGet$
|
|
11372
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onColumnSort).call(this, e, details.column.name);
|
|
11373
11373
|
return details;
|
|
11374
11374
|
}
|
|
11375
11375
|
}
|
|
@@ -11384,16 +11384,16 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11384
11384
|
}
|
|
11385
11385
|
details.tr.classList.add('focus');
|
|
11386
11386
|
if (e.ctrlKey || e.metaKey) {
|
|
11387
|
-
__classPrivateFieldGet$
|
|
11387
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_rowDetail).call(this, Object.assign({}, details.row), e.clientX, e.clientY);
|
|
11388
11388
|
return details;
|
|
11389
11389
|
}
|
|
11390
11390
|
}
|
|
11391
11391
|
if (details.tr && details.row && details.isGroupRow) {
|
|
11392
|
-
__classPrivateFieldGet$
|
|
11392
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onRowExpand).call(this, details.row);
|
|
11393
11393
|
return details;
|
|
11394
11394
|
}
|
|
11395
11395
|
if (details.td && details.row && !details.textfield) {
|
|
11396
|
-
__classPrivateFieldGet$
|
|
11396
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, details.row, details.td, true);
|
|
11397
11397
|
return details;
|
|
11398
11398
|
}
|
|
11399
11399
|
__classPrivateFieldSet$3(this, _KupDataTable_lastFocusedRow, details.row, "f");
|
|
@@ -11402,14 +11402,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11402
11402
|
}, _KupDataTable_cellActionsMenuHandler = function _KupDataTable_cellActionsMenuHandler(e) {
|
|
11403
11403
|
var _a;
|
|
11404
11404
|
e.stopPropagation();
|
|
11405
|
-
const details = __classPrivateFieldGet$
|
|
11405
|
+
const details = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
11406
11406
|
if (details.cell) {
|
|
11407
|
-
const cellActions = __classPrivateFieldGet$
|
|
11408
|
-
__classPrivateFieldGet$
|
|
11407
|
+
const cellActions = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.cell.buildCellActions(details.row, details.column, (_a = this.commands) !== null && _a !== void 0 ? _a : []);
|
|
11408
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onRowActionExpanderClick).call(this, e, details.row, cellActions);
|
|
11409
11409
|
}
|
|
11410
11410
|
return details;
|
|
11411
11411
|
}, _KupDataTable_contextMenuHandler = function _KupDataTable_contextMenuHandler(e) {
|
|
11412
|
-
const details = __classPrivateFieldGet$
|
|
11412
|
+
const details = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
11413
11413
|
if (details.area === kupManager$1.DataTableAreasEnum.HEADER) {
|
|
11414
11414
|
if (details.th && details.column) {
|
|
11415
11415
|
this.openColumnMenu(details.column.name);
|
|
@@ -11419,34 +11419,34 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11419
11419
|
else if (details.area === kupManager$1.DataTableAreasEnum.FOOTER) {
|
|
11420
11420
|
if (details.td && details.column) {
|
|
11421
11421
|
__classPrivateFieldSet$3(this, _KupDataTable_totalMenuCoords, { x: e.clientX, y: e.clientY }, "f");
|
|
11422
|
-
__classPrivateFieldGet$
|
|
11422
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onTotalMenuOpen).call(this, details.column);
|
|
11423
11423
|
return details;
|
|
11424
11424
|
}
|
|
11425
11425
|
}
|
|
11426
11426
|
return details;
|
|
11427
11427
|
}, _KupDataTable_dblClickHandler = function _KupDataTable_dblClickHandler(e) {
|
|
11428
|
-
const details = __classPrivateFieldGet$
|
|
11428
|
+
const details = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
11429
11429
|
if (details.area === 'body') {
|
|
11430
11430
|
if (this.selection == kupManager$1.SelectionMode.MULTIPLE) {
|
|
11431
|
-
__classPrivateFieldGet$
|
|
11431
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
11432
11432
|
}
|
|
11433
11433
|
if (this.selection == kupManager$1.SelectionMode.SINGLE ||
|
|
11434
11434
|
this.selection == kupManager$1.SelectionMode.MULTIPLE) {
|
|
11435
|
-
__classPrivateFieldGet$
|
|
11435
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, details.row, details.td, false);
|
|
11436
11436
|
}
|
|
11437
11437
|
}
|
|
11438
11438
|
return details;
|
|
11439
11439
|
}, _KupDataTable_initRows = function _KupDataTable_initRows() {
|
|
11440
|
-
__classPrivateFieldGet$
|
|
11441
|
-
__classPrivateFieldSet$3(this, _KupDataTable_footer, kupDataTableHelper.calcTotals(this.totals, this.getColumns(), kupDataTableHelper.normalizeRows(this.getColumns(), __classPrivateFieldGet$
|
|
11442
|
-
__classPrivateFieldGet$
|
|
11443
|
-
__classPrivateFieldGet$
|
|
11444
|
-
__classPrivateFieldGet$
|
|
11445
|
-
__classPrivateFieldSet$3(this, _KupDataTable_paginatedRows, kupDataTableHelper.paginateRows(__classPrivateFieldGet$
|
|
11446
|
-
__classPrivateFieldSet$3(this, _KupDataTable_paginatedRowsLength, __classPrivateFieldGet$
|
|
11440
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_filterRows).call(this);
|
|
11441
|
+
__classPrivateFieldSet$3(this, _KupDataTable_footer, kupDataTableHelper.calcTotals(this.totals, this.getColumns(), kupDataTableHelper.normalizeRows(this.getColumns(), __classPrivateFieldGet$7(this, _KupDataTable_rows, "f"))), "f");
|
|
11442
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_groupRows).call(this);
|
|
11443
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_sortRows).call(this);
|
|
11444
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
11445
|
+
__classPrivateFieldSet$3(this, _KupDataTable_paginatedRows, kupDataTableHelper.paginateRows(__classPrivateFieldGet$7(this, _KupDataTable_rows, "f"), this.currentPage, this.currentRowsPerPage, __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)), "f");
|
|
11446
|
+
__classPrivateFieldSet$3(this, _KupDataTable_paginatedRowsLength, __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_paginatedRowsPointLength).call(this), "f");
|
|
11447
11447
|
}, _KupDataTable_filterRows = function _KupDataTable_filterRows() {
|
|
11448
11448
|
__classPrivateFieldSet$3(this, _KupDataTable_rows, kupDataTableHelper.filterRows(this.getRows(), this.filters, this.globalFilterValue, this.getColumns()), "f");
|
|
11449
|
-
__classPrivateFieldSet$3(this, _KupDataTable_rowsLength, __classPrivateFieldGet$
|
|
11449
|
+
__classPrivateFieldSet$3(this, _KupDataTable_rowsLength, __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_rowsPointLength).call(this), "f");
|
|
11450
11450
|
}, _KupDataTable_isGrouping = function _KupDataTable_isGrouping() {
|
|
11451
11451
|
return this.groups && this.groups.length > 0;
|
|
11452
11452
|
}, _KupDataTable_hasRowActions = function _KupDataTable_hasRowActions() {
|
|
@@ -11460,19 +11460,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11460
11460
|
}, _KupDataTable_hasTotals = function _KupDataTable_hasTotals() {
|
|
11461
11461
|
return this.totals && Object.keys(this.totals).length > 0;
|
|
11462
11462
|
}, _KupDataTable_tableHasAutoWidth = function _KupDataTable_tableHasAutoWidth() {
|
|
11463
|
-
if (!__classPrivateFieldGet$
|
|
11463
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f")) {
|
|
11464
11464
|
return;
|
|
11465
11465
|
}
|
|
11466
11466
|
const visibleCols = this.getVisibleColumns();
|
|
11467
11467
|
// Before checking each column, controls that visible columns are as many as items with custom sizes.
|
|
11468
11468
|
// If there are more visible columns, it means that the width of the table will be set to auto.
|
|
11469
|
-
if (visibleCols.length <= __classPrivateFieldGet$
|
|
11469
|
+
if (visibleCols.length <= __classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f").length) {
|
|
11470
11470
|
let found = false;
|
|
11471
11471
|
// Each visible column must have its own width for the table to have a auto width
|
|
11472
11472
|
for (let i = 0; i < visibleCols.length; i++) {
|
|
11473
11473
|
found = false;
|
|
11474
|
-
for (let j = 0; j < __classPrivateFieldGet$
|
|
11475
|
-
if (visibleCols[i].name === __classPrivateFieldGet$
|
|
11474
|
+
for (let j = 0; j < __classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f").length; j++) {
|
|
11475
|
+
if (visibleCols[i].name === __classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f")[j].name) {
|
|
11476
11476
|
found = true;
|
|
11477
11477
|
break;
|
|
11478
11478
|
}
|
|
@@ -11485,8 +11485,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11485
11485
|
}
|
|
11486
11486
|
return false;
|
|
11487
11487
|
}, _KupDataTable_forceGroupExpansion = function _KupDataTable_forceGroupExpansion() {
|
|
11488
|
-
__classPrivateFieldGet$
|
|
11489
|
-
__classPrivateFieldGet$
|
|
11488
|
+
__classPrivateFieldGet$7(this, _KupDataTable_rows, "f").forEach((row) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, row));
|
|
11489
|
+
__classPrivateFieldGet$7(this, _KupDataTable_paginatedRows, "f").forEach((row) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, row));
|
|
11490
11490
|
}, _KupDataTable_forceRowGroupExpansion = function _KupDataTable_forceRowGroupExpansion(row) {
|
|
11491
11491
|
// check if row is group
|
|
11492
11492
|
if (!row.group) {
|
|
@@ -11507,10 +11507,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11507
11507
|
}
|
|
11508
11508
|
this.groupState[row.group.id] = groupState;
|
|
11509
11509
|
if (row.group.children) {
|
|
11510
|
-
row.group.children.forEach((childRow) => __classPrivateFieldGet$
|
|
11510
|
+
row.group.children.forEach((childRow) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, childRow));
|
|
11511
11511
|
}
|
|
11512
11512
|
}, _KupDataTable_adjustPaginator = function _KupDataTable_adjustPaginator() {
|
|
11513
|
-
const numberOfRows = __classPrivateFieldGet$
|
|
11513
|
+
const numberOfRows = __classPrivateFieldGet$7(this, _KupDataTable_rowsLength, "f");
|
|
11514
11514
|
// check if current page is valid
|
|
11515
11515
|
const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
|
|
11516
11516
|
if (this.currentPage > numberOfPages) {
|
|
@@ -11520,11 +11520,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11520
11520
|
}
|
|
11521
11521
|
}, _KupDataTable_setCellEditability = function _KupDataTable_setCellEditability(column, row, cell) {
|
|
11522
11522
|
if (column.useAs) {
|
|
11523
|
-
if (__classPrivateFieldGet$
|
|
11523
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_insertedRowIds, "f").includes(row.id) &&
|
|
11524
11524
|
column.useAs === 'Dec') {
|
|
11525
11525
|
return false;
|
|
11526
11526
|
}
|
|
11527
|
-
else if (!__classPrivateFieldGet$
|
|
11527
|
+
else if (!__classPrivateFieldGet$7(this, _KupDataTable_insertedRowIds, "f").includes(row.id) &&
|
|
11528
11528
|
(column.useAs === 'Dec' || column.useAs === 'Key')) {
|
|
11529
11529
|
return false;
|
|
11530
11530
|
}
|
|
@@ -11537,7 +11537,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11537
11537
|
}
|
|
11538
11538
|
return false;
|
|
11539
11539
|
}, _KupDataTable_composeFixedCellStyleAndClass = function _KupDataTable_composeFixedCellStyleAndClass(columnCssIndex, columnCssIndexR, rowCssIndex, extraCellsCount = 0) {
|
|
11540
|
-
if (__classPrivateFieldGet$
|
|
11540
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
11541
11541
|
return undefined;
|
|
11542
11542
|
}
|
|
11543
11543
|
//-- Controls if there are fixed rows or columns --
|
|
@@ -11589,20 +11589,20 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11589
11589
|
}, _KupDataTable_updateFixedRowsAndColumnsCssVariables = function _KupDataTable_updateFixedRowsAndColumnsCssVariables() {
|
|
11590
11590
|
// [ffbf] - Using getBoundingClientRect is mandatory since Firefox return a wrong value for ele.offsetHeight and witdh values
|
|
11591
11591
|
// When grouping, the fixed rows and columns are not sticky
|
|
11592
|
-
if (__classPrivateFieldGet$
|
|
11592
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) || !__classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f"))
|
|
11593
11593
|
return false;
|
|
11594
11594
|
let toRet = false;
|
|
11595
11595
|
if (this.fixedRows >= 1) {
|
|
11596
|
-
let currentRow = __classPrivateFieldGet$
|
|
11596
|
+
let currentRow = __classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type');
|
|
11597
11597
|
// The height must start from the height of the header. BUT not on Safari.
|
|
11598
11598
|
// Safari handles the sticky position on the tables in a different way, making it start from the tbody element
|
|
11599
11599
|
// and not on the table with a specified position of sticky. There fore in that case we must set initial height to 0.
|
|
11600
|
-
let previousHeight = !__classPrivateFieldGet$
|
|
11601
|
-
? __classPrivateFieldGet$
|
|
11600
|
+
let previousHeight = !__classPrivateFieldGet$7(this, _KupDataTable_isSafariBrowser, "f")
|
|
11601
|
+
? __classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f").querySelector('thead > tr:first-of-type > th:first-of-type').getBoundingClientRect().height // [ffbf]
|
|
11602
11602
|
: 0;
|
|
11603
11603
|
// [CSSCount] - I must start from 1 since we are referencing html elements e not array (with CSS selectors starting from 1)
|
|
11604
11604
|
for (let i = 1; i <= this.fixedRows && currentRow; i++) {
|
|
11605
|
-
__classPrivateFieldGet$
|
|
11605
|
+
__classPrivateFieldGet$7(this, _KupDataTable_tableAreaRef, "f").style.setProperty(kupManager$1.FixedCellsCSSVarsBase.rows + i, previousHeight + 'px');
|
|
11606
11606
|
previousHeight += currentRow.children[0].getBoundingClientRect().height; // [ffbf]
|
|
11607
11607
|
currentRow =
|
|
11608
11608
|
currentRow.nextElementSibling;
|
|
@@ -11610,17 +11610,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11610
11610
|
toRet = true;
|
|
11611
11611
|
}
|
|
11612
11612
|
if (this.fixedColumns >= 1) {
|
|
11613
|
-
let currentCell = __classPrivateFieldGet$
|
|
11613
|
+
let currentCell = __classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type > td:first-of-type');
|
|
11614
11614
|
let previousWidth = 0;
|
|
11615
11615
|
const totalFixedColumns = this.fixedColumns +
|
|
11616
|
-
(__classPrivateFieldGet$
|
|
11617
|
-
__classPrivateFieldGet$
|
|
11616
|
+
(__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ||
|
|
11617
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.column.hasCodVer(this.data.columns)
|
|
11618
11618
|
? 1
|
|
11619
11619
|
: 0) +
|
|
11620
11620
|
(this.selection === kupManager$1.SelectionMode.MULTIPLE_CHECKBOX ? 1 : 0);
|
|
11621
11621
|
// @See [CSSCount]
|
|
11622
11622
|
for (let i = 1; i <= totalFixedColumns && currentCell; i++) {
|
|
11623
|
-
__classPrivateFieldGet$
|
|
11623
|
+
__classPrivateFieldGet$7(this, _KupDataTable_tableAreaRef, "f").style.setProperty(kupManager$1.FixedCellsCSSVarsBase.columns + i, previousWidth + 'px');
|
|
11624
11624
|
previousWidth += currentCell.getBoundingClientRect().width; // [ffbf]
|
|
11625
11625
|
currentCell =
|
|
11626
11626
|
currentCell.nextElementSibling;
|
|
@@ -11628,10 +11628,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11628
11628
|
toRet = true;
|
|
11629
11629
|
}
|
|
11630
11630
|
if (this.fixedColumnsR >= 1) {
|
|
11631
|
-
let currentCell = __classPrivateFieldGet$
|
|
11631
|
+
let currentCell = __classPrivateFieldGet$7(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type > td:last-of-type');
|
|
11632
11632
|
let previousWidth = 0;
|
|
11633
11633
|
for (let i = 1; i <= this.fixedColumnsR && currentCell; i++) {
|
|
11634
|
-
__classPrivateFieldGet$
|
|
11634
|
+
__classPrivateFieldGet$7(this, _KupDataTable_tableAreaRef, "f").style.setProperty(kupManager$1.FixedCellsCSSVarsBase.columnsR + i, previousWidth + 'px');
|
|
11635
11635
|
previousWidth += currentCell.getBoundingClientRect().width;
|
|
11636
11636
|
currentCell =
|
|
11637
11637
|
currentCell.previousElementSibling;
|
|
@@ -11679,10 +11679,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11679
11679
|
// resetting current page
|
|
11680
11680
|
this.resetCurrentPage();
|
|
11681
11681
|
const newFilters = Object.assign({}, this.filters);
|
|
11682
|
-
__classPrivateFieldGet$
|
|
11682
|
+
__classPrivateFieldGet$7(this, _KupDataTable_filtersColumnMenuInstance, "f").removeFilter(newFilters, column.name);
|
|
11683
11683
|
this.filters = newFilters;
|
|
11684
11684
|
}, _KupDataTable_getFilterValueForTooltip = function _KupDataTable_getFilterValueForTooltip(column) {
|
|
11685
|
-
return __classPrivateFieldGet$
|
|
11685
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_filtersColumnMenuInstance, "f").getFilterValueForTooltip(this.filters, column);
|
|
11686
11686
|
}, _KupDataTable_onGlobalFilterChange = function _KupDataTable_onGlobalFilterChange(inputEl) {
|
|
11687
11687
|
this.resetCurrentPage();
|
|
11688
11688
|
if (inputEl) {
|
|
@@ -11693,15 +11693,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11693
11693
|
this.globalFilterValue = '';
|
|
11694
11694
|
}
|
|
11695
11695
|
}, _KupDataTable_handlePageChange = function _KupDataTable_handlePageChange(pageNumber) {
|
|
11696
|
-
const newPage = fPaginatorUtils.pageChange(pageNumber, __classPrivateFieldGet$
|
|
11696
|
+
const newPage = fPaginatorUtils.pageChange(pageNumber, __classPrivateFieldGet$7(this, _KupDataTable_rowsLength, "f"), this.currentRowsPerPage);
|
|
11697
11697
|
if (newPage) {
|
|
11698
11698
|
this.currentPage = newPage;
|
|
11699
11699
|
}
|
|
11700
11700
|
}, _KupDataTable_handleRowsPerPageChange = function _KupDataTable_handleRowsPerPageChange(rowsNumber) {
|
|
11701
|
-
const newRows = fPaginatorUtils.rowsPerPageChange(rowsNumber, __classPrivateFieldGet$
|
|
11701
|
+
const newRows = fPaginatorUtils.rowsPerPageChange(rowsNumber, __classPrivateFieldGet$7(this, _KupDataTable_rowsLength, "f"));
|
|
11702
11702
|
if (newRows) {
|
|
11703
11703
|
this.currentRowsPerPage = newRows;
|
|
11704
|
-
__classPrivateFieldGet$
|
|
11704
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
11705
11705
|
}
|
|
11706
11706
|
}, _KupDataTable_onRowClick = function _KupDataTable_onRowClick(row, td, emitEvent) {
|
|
11707
11707
|
// selecting row
|
|
@@ -11725,15 +11725,26 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11725
11725
|
break;
|
|
11726
11726
|
}
|
|
11727
11727
|
}
|
|
11728
|
+
// Manage row selection on rowAction click
|
|
11729
|
+
if (!td) {
|
|
11730
|
+
this.kupRowSelected.emit({
|
|
11731
|
+
comp: this,
|
|
11732
|
+
id: this.rootElement.id,
|
|
11733
|
+
selectedRows: this.selectedRows,
|
|
11734
|
+
clickedRow: row,
|
|
11735
|
+
clickedColumn: null,
|
|
11736
|
+
});
|
|
11737
|
+
return;
|
|
11738
|
+
}
|
|
11728
11739
|
// find clicked column
|
|
11729
11740
|
const clickedColumn = td.dataset.column;
|
|
11730
11741
|
// selecting clicked column
|
|
11731
11742
|
if (!row.unselectable &&
|
|
11732
11743
|
this.selection !== kupManager$1.SelectionMode.NONE &&
|
|
11733
11744
|
clickedColumn) {
|
|
11734
|
-
__classPrivateFieldGet$
|
|
11745
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_deselectColumn).call(this, this.selectedColumn);
|
|
11735
11746
|
this.selectedColumn = clickedColumn;
|
|
11736
|
-
__classPrivateFieldGet$
|
|
11747
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_selectColumn).call(this, this.selectedColumn);
|
|
11737
11748
|
if (emitEvent !== false) {
|
|
11738
11749
|
// emit event
|
|
11739
11750
|
this.kupRowSelected.emit({
|
|
@@ -11766,7 +11777,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11766
11777
|
}, _KupDataTable_onRowActionExpanderClick = function _KupDataTable_onRowActionExpanderClick(e, row, dropDownActions) {
|
|
11767
11778
|
e.stopPropagation();
|
|
11768
11779
|
__classPrivateFieldSet$3(this, _KupDataTable_dropDownActionCardAnchor, e.target, "f");
|
|
11769
|
-
__classPrivateFieldGet$
|
|
11780
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_dropDownActions).call(this, dropDownActions, row);
|
|
11770
11781
|
}, _KupDataTable_handleRowSelect = function _KupDataTable_handleRowSelect(row) {
|
|
11771
11782
|
const index = this.selectedRows.indexOf(row);
|
|
11772
11783
|
if (index < 0) {
|
|
@@ -11795,7 +11806,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11795
11806
|
}, _KupDataTable_onSelectAll = function _KupDataTable_onSelectAll({ target }) {
|
|
11796
11807
|
if (target.checked) {
|
|
11797
11808
|
// select all rows
|
|
11798
|
-
this.selectedRows = __classPrivateFieldGet$
|
|
11809
|
+
this.selectedRows = __classPrivateFieldGet$7(this, _KupDataTable_renderedRows, "f");
|
|
11799
11810
|
// triggering event
|
|
11800
11811
|
this.kupRowSelected.emit({
|
|
11801
11812
|
comp: this,
|
|
@@ -11807,21 +11818,21 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11807
11818
|
}
|
|
11808
11819
|
else {
|
|
11809
11820
|
// deselect all rows
|
|
11810
|
-
__classPrivateFieldGet$
|
|
11821
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
11811
11822
|
}
|
|
11812
11823
|
}, _KupDataTable_openTotalMenu = function _KupDataTable_openTotalMenu(column) {
|
|
11813
11824
|
this.openedTotalMenu = column.name;
|
|
11814
11825
|
}, _KupDataTable_closeTotalMenu = function _KupDataTable_closeTotalMenu() {
|
|
11815
11826
|
this.openedTotalMenu = null;
|
|
11816
|
-
__classPrivateFieldGet$
|
|
11827
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$7(this, _KupDataTable_clickCb, "f"));
|
|
11817
11828
|
}, _KupDataTable_isOpenedTotalMenuForColumn = function _KupDataTable_isOpenedTotalMenuForColumn(column) {
|
|
11818
11829
|
return this.openedTotalMenu === column;
|
|
11819
11830
|
}, _KupDataTable_groupRows = function _KupDataTable_groupRows() {
|
|
11820
|
-
if (!__classPrivateFieldGet$
|
|
11831
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
11821
11832
|
return;
|
|
11822
11833
|
}
|
|
11823
|
-
__classPrivateFieldSet$3(this, _KupDataTable_rows, kupDataTableHelper.groupRows(this.getColumns(), __classPrivateFieldGet$
|
|
11824
|
-
__classPrivateFieldGet$
|
|
11834
|
+
__classPrivateFieldSet$3(this, _KupDataTable_rows, kupDataTableHelper.groupRows(this.getColumns(), __classPrivateFieldGet$7(this, _KupDataTable_rows, "f"), this.groups, this.totals), "f");
|
|
11835
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupState).call(this);
|
|
11825
11836
|
}, _KupDataTable_onLoadMoreClick = function _KupDataTable_onLoadMoreClick() {
|
|
11826
11837
|
var _a;
|
|
11827
11838
|
let loadItems = 0;
|
|
@@ -11831,11 +11842,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11831
11842
|
break;
|
|
11832
11843
|
case kupManager$1.LoadMoreMode.CONSTANT_INCREMENT:
|
|
11833
11844
|
loadItems =
|
|
11834
|
-
this.loadMoreStep * (__classPrivateFieldGet$
|
|
11845
|
+
this.loadMoreStep * (__classPrivateFieldGet$7(this, _KupDataTable_loadMoreEventCounter, "f") + 1);
|
|
11835
11846
|
break;
|
|
11836
11847
|
case kupManager$1.LoadMoreMode.PROGRESSIVE_THRESHOLD:
|
|
11837
11848
|
loadItems =
|
|
11838
|
-
Math.max(__classPrivateFieldGet$
|
|
11849
|
+
Math.max(__classPrivateFieldGet$7(this, _KupDataTable_loadMoreEventPreviousQuantity, "f"), this.loadMoreStep) * Math.min(__classPrivateFieldGet$7(this, _KupDataTable_loadMoreEventCounter, "f") + 1, 2);
|
|
11839
11850
|
break;
|
|
11840
11851
|
}
|
|
11841
11852
|
if (loadItems > this.loadMoreLimit) {
|
|
@@ -11847,15 +11858,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11847
11858
|
loadItems: loadItems,
|
|
11848
11859
|
});
|
|
11849
11860
|
__classPrivateFieldSet$3(this, _KupDataTable_loadMoreEventPreviousQuantity, loadItems, "f");
|
|
11850
|
-
__classPrivateFieldSet$3(this, _KupDataTable_loadMoreEventCounter, (_a = __classPrivateFieldGet$
|
|
11861
|
+
__classPrivateFieldSet$3(this, _KupDataTable_loadMoreEventCounter, (_a = __classPrivateFieldGet$7(this, _KupDataTable_loadMoreEventCounter, "f"), _a++, _a), "f");
|
|
11851
11862
|
}, _KupDataTable_adjustGroupState = function _KupDataTable_adjustGroupState() {
|
|
11852
|
-
if (!__classPrivateFieldGet$
|
|
11853
|
-
__classPrivateFieldGet$
|
|
11854
|
-
!__classPrivateFieldGet$
|
|
11863
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_rows, "f") ||
|
|
11864
|
+
__classPrivateFieldGet$7(this, _KupDataTable_rowsLength, "f") === 0 ||
|
|
11865
|
+
!__classPrivateFieldGet$7(this, _KupDataTable_rows, "f")[0].hasOwnProperty('group')) {
|
|
11855
11866
|
// no grouping
|
|
11856
11867
|
return;
|
|
11857
11868
|
}
|
|
11858
|
-
__classPrivateFieldGet$
|
|
11869
|
+
__classPrivateFieldGet$7(this, _KupDataTable_rows, "f").forEach((r) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupStateFromRow).call(this, r));
|
|
11859
11870
|
}, _KupDataTable_adjustGroupStateFromRow = function _KupDataTable_adjustGroupStateFromRow(row) {
|
|
11860
11871
|
if (!row || !row.hasOwnProperty('group')) {
|
|
11861
11872
|
// not a groping row, nothing to do
|
|
@@ -11872,9 +11883,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11872
11883
|
// update expanded
|
|
11873
11884
|
group.expanded = groupFromState.expanded;
|
|
11874
11885
|
}
|
|
11875
|
-
group.children.forEach((child) => __classPrivateFieldGet$
|
|
11886
|
+
group.children.forEach((child) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupStateFromRow).call(this, child));
|
|
11876
11887
|
}, _KupDataTable_sortRows = function _KupDataTable_sortRows() {
|
|
11877
|
-
__classPrivateFieldSet$3(this, _KupDataTable_rows, kupDataTableHelper.sortRows(__classPrivateFieldGet$
|
|
11888
|
+
__classPrivateFieldSet$3(this, _KupDataTable_rows, kupDataTableHelper.sortRows(__classPrivateFieldGet$7(this, _KupDataTable_rows, "f"), this.sort), "f");
|
|
11878
11889
|
}, _KupDataTable_getSortIcon = function _KupDataTable_getSortIcon(columnName) {
|
|
11879
11890
|
// check if column in sort array
|
|
11880
11891
|
for (let sortObj of this.sort) {
|
|
@@ -11900,8 +11911,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11900
11911
|
if (this.selection === kupManager$1.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11901
11912
|
colSpan += 1;
|
|
11902
11913
|
}
|
|
11903
|
-
if (__classPrivateFieldGet$
|
|
11904
|
-
__classPrivateFieldGet$
|
|
11914
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ||
|
|
11915
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.column.hasCodVer(this.data.columns)) {
|
|
11905
11916
|
colSpan += 1;
|
|
11906
11917
|
}
|
|
11907
11918
|
return colSpan;
|
|
@@ -11931,7 +11942,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11931
11942
|
sourceColumn: this.data.columns[sortedColIndex],
|
|
11932
11943
|
targetColumn: this.data.columns[receivingColIndex],
|
|
11933
11944
|
});
|
|
11934
|
-
__classPrivateFieldGet$
|
|
11945
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_moveSortedColumns).call(this, this.data.columns, receivingColIndex, sortedColIndex);
|
|
11935
11946
|
}
|
|
11936
11947
|
// Rearrange visibleColumns to match the new sort order
|
|
11937
11948
|
if (this.visibleColumns) {
|
|
@@ -11951,12 +11962,12 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11951
11962
|
((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkValueOnExit) &&
|
|
11952
11963
|
cell.shape !== kupManager$1.FCellShapes.CHECKBOX &&
|
|
11953
11964
|
cell.shape !== kupManager$1.FCellShapes.SWITCH &&
|
|
11954
|
-
((_c = (_b = __classPrivateFieldGet$
|
|
11965
|
+
((_c = (_b = __classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f").rows.find((r) => r.id == row.id)) === null || _b === void 0 ? void 0 : _b.cells[column.name]) === null || _c === void 0 ? void 0 : _c.value) !== cell.value) {
|
|
11955
11966
|
this.kupCellCheck.emit({
|
|
11956
11967
|
comp: this,
|
|
11957
11968
|
id: this.rootElement.id,
|
|
11958
|
-
originalData: __classPrivateFieldGet$
|
|
11959
|
-
updatedData: kupDataTableHelper.getDiffData(__classPrivateFieldGet$
|
|
11969
|
+
originalData: __classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f"),
|
|
11970
|
+
updatedData: kupDataTableHelper.getDiffData(__classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f"), this.data, true),
|
|
11960
11971
|
cell: cell,
|
|
11961
11972
|
});
|
|
11962
11973
|
}
|
|
@@ -11970,25 +11981,25 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11970
11981
|
.map((chunk, index$1) => (index$1 !== 0 ? [index.h("br", null), chunk] : chunk));
|
|
11971
11982
|
}, _KupDataTable_composeHeaderCellClassAndStyle = function _KupDataTable_composeHeaderCellClassAndStyle(columnIndex, extraCells = 0, column) {
|
|
11972
11983
|
let columnClass = { ['header-cell']: true }, thStyle = column.style ? Object.assign({}, column.style) : {};
|
|
11973
|
-
if (__classPrivateFieldGet$
|
|
11974
|
-
__classPrivateFieldGet$
|
|
11975
|
-
__classPrivateFieldGet$
|
|
11976
|
-
__classPrivateFieldGet$
|
|
11977
|
-
__classPrivateFieldGet$
|
|
11978
|
-
__classPrivateFieldGet$
|
|
11979
|
-
__classPrivateFieldGet$
|
|
11980
|
-
__classPrivateFieldGet$
|
|
11981
|
-
__classPrivateFieldGet$
|
|
11984
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isBar(column.obj) ||
|
|
11985
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isButton(column.obj) ||
|
|
11986
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isChart(column.obj) ||
|
|
11987
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isCheckbox(column.obj) ||
|
|
11988
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isImage(column.obj) ||
|
|
11989
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isIcon(column.obj) ||
|
|
11990
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isProgressBar(column.obj) ||
|
|
11991
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isRadio(column.obj) ||
|
|
11992
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isVoCodver(column.obj)) {
|
|
11982
11993
|
columnClass['header-cell--centered'] = true;
|
|
11983
11994
|
}
|
|
11984
|
-
if (__classPrivateFieldGet$
|
|
11995
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isNumber(column.obj)) {
|
|
11985
11996
|
columnClass['header-cell--is-number'] = true;
|
|
11986
11997
|
}
|
|
11987
|
-
if (__classPrivateFieldGet$
|
|
11998
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isIcon(column.obj)) {
|
|
11988
11999
|
columnClass['header-cell--is-icon'] = true;
|
|
11989
12000
|
}
|
|
11990
12001
|
// For fixed cells styles and classes
|
|
11991
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
12002
|
+
const fixedCellStyle = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, columnIndex + 1 + extraCells, columnIndex + 1, 0, extraCells);
|
|
11992
12003
|
if (fixedCellStyle) {
|
|
11993
12004
|
columnClass = Object.assign(Object.assign({}, columnClass), fixedCellStyle.fixedCellClasses);
|
|
11994
12005
|
thStyle = Object.assign(Object.assign({}, thStyle), fixedCellStyle.fixedCellStyle);
|
|
@@ -12003,25 +12014,25 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12003
12014
|
let multiSelectColumn = null;
|
|
12004
12015
|
if (this.selection === kupManager$1.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
12005
12016
|
specialExtraCellsCount++;
|
|
12006
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
12017
|
+
const selectionStyleAndClass = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, 0, specialExtraCellsCount - 1);
|
|
12007
12018
|
const style = Object.assign({ width: '30px', margin: '0 auto' }, (selectionStyleAndClass
|
|
12008
12019
|
? selectionStyleAndClass.fixedCellStyle
|
|
12009
12020
|
: {}));
|
|
12010
12021
|
multiSelectColumn = (index.h("th", { class: selectionStyleAndClass
|
|
12011
12022
|
? selectionStyleAndClass.fixedCellClasses
|
|
12012
|
-
: {}, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$
|
|
12023
|
+
: {}, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onSelectAll).call(this, e), title: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageRow.SELECTED) +
|
|
12013
12024
|
`: ${this.selectedRows.length},` +
|
|
12014
|
-
__classPrivateFieldGet$
|
|
12015
|
-
`: ${__classPrivateFieldGet$
|
|
12025
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageRow.RENDERED) +
|
|
12026
|
+
`: ${__classPrivateFieldGet$7(this, _KupDataTable_renderedRows, "f").length}`, checked: this.selectedRows.length > 0 &&
|
|
12016
12027
|
this.selectedRows.length ===
|
|
12017
|
-
__classPrivateFieldGet$
|
|
12028
|
+
__classPrivateFieldGet$7(this, _KupDataTable_renderedRows, "f").length })));
|
|
12018
12029
|
}
|
|
12019
12030
|
// Renders action column
|
|
12020
12031
|
let actionsColumn = null;
|
|
12021
|
-
if (__classPrivateFieldGet$
|
|
12022
|
-
__classPrivateFieldGet$
|
|
12032
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ||
|
|
12033
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.column.hasCodVer(this.data.columns)) {
|
|
12023
12034
|
specialExtraCellsCount++;
|
|
12024
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
12035
|
+
const selectionStyleAndClass = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, 0, specialExtraCellsCount - 1);
|
|
12025
12036
|
actionsColumn = (index.h("th", { class: selectionStyleAndClass
|
|
12026
12037
|
? selectionStyleAndClass.fixedCellClasses
|
|
12027
12038
|
: {}, style: selectionStyleAndClass
|
|
@@ -12030,26 +12041,26 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12030
12041
|
}
|
|
12031
12042
|
// Renders normal cells
|
|
12032
12043
|
const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
|
|
12033
|
-
const { columnClass, thStyle } = __classPrivateFieldGet$
|
|
12044
|
+
const { columnClass, thStyle } = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeHeaderCellClassAndStyle).call(this, columnIndex, specialExtraCellsCount, column);
|
|
12034
12045
|
let filter = null;
|
|
12035
|
-
if (__classPrivateFieldGet$
|
|
12036
|
-
const svgLabel = __classPrivateFieldGet$
|
|
12046
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_filtersColumnMenuInstance, "f").hasFiltersForColumn(this.filters, column)) {
|
|
12047
|
+
const svgLabel = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.REMOVE_FILTERS) + `: '${__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getFilterValueForTooltip).call(this, column)}'`;
|
|
12037
12048
|
filter = (index.h("span", { title: svgLabel, class: `kup-icon ${kupManager$1.KupThemeIconValues.FILTER_REMOVE.replace('--', '')}` }));
|
|
12038
12049
|
}
|
|
12039
12050
|
let sortIcon = null;
|
|
12040
|
-
let iconClass = __classPrivateFieldGet$
|
|
12051
|
+
let iconClass = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getSortIcon).call(this, column.name);
|
|
12041
12052
|
if (iconClass !== '') {
|
|
12042
|
-
sortIcon = (index.h("span", { class: iconClass, title: __classPrivateFieldGet$
|
|
12053
|
+
sortIcon = (index.h("span", { class: iconClass, title: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getSortDecode).call(this, column.name) }));
|
|
12043
12054
|
}
|
|
12044
12055
|
columnClass['header-cell--sortable'] = true;
|
|
12045
12056
|
let keyIcon = null;
|
|
12046
12057
|
if (column.isKey) {
|
|
12047
|
-
keyIcon = (index.h("span", { class: `kup-icon ${kupManager$1.KupThemeIconValues.KEY.replace('--', '')}`, title: __classPrivateFieldGet$
|
|
12058
|
+
keyIcon = (index.h("span", { class: `kup-icon ${kupManager$1.KupThemeIconValues.KEY.replace('--', '')}`, title: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageRow.KEY) }));
|
|
12048
12059
|
}
|
|
12049
12060
|
// Sets custom columns width
|
|
12050
|
-
if (__classPrivateFieldGet$
|
|
12051
|
-
for (let i = 0; i < __classPrivateFieldGet$
|
|
12052
|
-
const currentCol = __classPrivateFieldGet$
|
|
12061
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f")) {
|
|
12062
|
+
for (let i = 0; i < __classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f").length; i++) {
|
|
12063
|
+
const currentCol = __classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f")[i];
|
|
12053
12064
|
if (currentCol.name === column.name) {
|
|
12054
12065
|
const width = currentCol.size + '';
|
|
12055
12066
|
if (width.indexOf('ch') < 1) {
|
|
@@ -12062,7 +12073,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12062
12073
|
}
|
|
12063
12074
|
}
|
|
12064
12075
|
}
|
|
12065
|
-
return (index.h("th", { ref: (el) => __classPrivateFieldGet$
|
|
12076
|
+
return (index.h("th", { ref: (el) => __classPrivateFieldGet$7(this, _KupDataTable_thRefs, "f").push(el), "data-cell": column, "data-column": column.name, class: columnClass, style: thStyle, title: column.name }, index.h("div", { class: "header-cell__content" }, index.h("span", { class: "header-cell__title" }, __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_applyLineBreaks).call(this, column.title)), index.h("span", { class: "header-cell__icons" }, keyIcon, sortIcon, filter)), this.resizableColumns ? (index.h("span", { class: "header-cell__drag-handler" })) : null));
|
|
12066
12077
|
});
|
|
12067
12078
|
return [multiSelectColumn, actionsColumn, ...dataColumns];
|
|
12068
12079
|
// return [multiSelectColumn, groupColumn, actionsColumn, ...dataColumns];
|
|
@@ -12071,25 +12082,25 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12071
12082
|
let multiSelectColumn = null;
|
|
12072
12083
|
if (this.selection === kupManager$1.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
12073
12084
|
specialExtraCellsCount++;
|
|
12074
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
12085
|
+
const selectionStyleAndClass = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, 0, specialExtraCellsCount - 1);
|
|
12075
12086
|
const style = Object.assign({ width: '30px', margin: '0 auto' }, (selectionStyleAndClass
|
|
12076
12087
|
? selectionStyleAndClass.fixedCellStyle
|
|
12077
12088
|
: {}));
|
|
12078
12089
|
multiSelectColumn = (index.h("th-sticky", { class: selectionStyleAndClass
|
|
12079
12090
|
? selectionStyleAndClass.fixedCellClasses
|
|
12080
|
-
: null, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$
|
|
12091
|
+
: null, style: style }, index.h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onSelectAll).call(this, e), title: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageRow.SELECTED) +
|
|
12081
12092
|
`: ${this.selectedRows.length},` +
|
|
12082
|
-
__classPrivateFieldGet$
|
|
12083
|
-
`: ${__classPrivateFieldGet$
|
|
12093
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageRow.RENDERED) +
|
|
12094
|
+
`: ${__classPrivateFieldGet$7(this, _KupDataTable_renderedRows, "f").length}`, checked: this.selectedRows.length > 0 &&
|
|
12084
12095
|
this.selectedRows.length ===
|
|
12085
|
-
__classPrivateFieldGet$
|
|
12096
|
+
__classPrivateFieldGet$7(this, _KupDataTable_renderedRows, "f").length })));
|
|
12086
12097
|
}
|
|
12087
12098
|
// Empty cell for the actions
|
|
12088
12099
|
let actionsColumn = null;
|
|
12089
|
-
if (__classPrivateFieldGet$
|
|
12090
|
-
__classPrivateFieldGet$
|
|
12100
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ||
|
|
12101
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.column.hasCodVer(this.data.columns)) {
|
|
12091
12102
|
specialExtraCellsCount++;
|
|
12092
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
12103
|
+
const selectionStyleAndClass = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, 0, specialExtraCellsCount - 1);
|
|
12093
12104
|
actionsColumn = (index.h("th-sticky", { class: selectionStyleAndClass
|
|
12094
12105
|
? selectionStyleAndClass.fixedCellClasses
|
|
12095
12106
|
: null, style: selectionStyleAndClass
|
|
@@ -12098,29 +12109,29 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12098
12109
|
}
|
|
12099
12110
|
// Composes normal header cells
|
|
12100
12111
|
const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
|
|
12101
|
-
const { columnClass, thStyle } = __classPrivateFieldGet$
|
|
12102
|
-
return (index.h("th-sticky", { class: columnClass, style: thStyle }, index.h("div", { class: "header-cell__content" }, index.h("span", { class: "header-cell__title" }, __classPrivateFieldGet$
|
|
12112
|
+
const { columnClass, thStyle } = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeHeaderCellClassAndStyle).call(this, columnIndex, specialExtraCellsCount, column);
|
|
12113
|
+
return (index.h("th-sticky", { class: columnClass, style: thStyle }, index.h("div", { class: "header-cell__content" }, index.h("span", { class: "header-cell__title" }, __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_applyLineBreaks).call(this, column.title)))));
|
|
12103
12114
|
});
|
|
12104
12115
|
return [multiSelectColumn, actionsColumn, ...dataColumns];
|
|
12105
12116
|
}, _KupDataTable_totalMenuPosition = function _KupDataTable_totalMenuPosition() {
|
|
12106
12117
|
if (this.rootElement.shadowRoot) {
|
|
12107
12118
|
const menu = this.rootElement.shadowRoot.querySelector('#totals-menu');
|
|
12108
12119
|
if (menu) {
|
|
12109
|
-
__classPrivateFieldGet$
|
|
12120
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.register(menu, __classPrivateFieldGet$7(this, _KupDataTable_totalMenuCoords, "f"), 0, undefined, true);
|
|
12110
12121
|
__classPrivateFieldSet$3(this, _KupDataTable_clickCb, {
|
|
12111
12122
|
cb: () => {
|
|
12112
|
-
__classPrivateFieldGet$
|
|
12123
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
12113
12124
|
},
|
|
12114
12125
|
el: menu,
|
|
12115
12126
|
}, "f");
|
|
12116
|
-
__classPrivateFieldGet$
|
|
12117
|
-
__classPrivateFieldGet$
|
|
12127
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$7(this, _KupDataTable_clickCb, "f"), true);
|
|
12128
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.start(menu);
|
|
12118
12129
|
menu.menuVisible = true;
|
|
12119
12130
|
}
|
|
12120
12131
|
}
|
|
12121
12132
|
}, _KupDataTable_onTotalMenuOpen = function _KupDataTable_onTotalMenuOpen(column) {
|
|
12122
|
-
__classPrivateFieldGet$
|
|
12123
|
-
__classPrivateFieldGet$
|
|
12133
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
12134
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_openTotalMenu).call(this, column);
|
|
12124
12135
|
}, _KupDataTable_renderRow = function _KupDataTable_renderRow(row, level = 0, rowCssIndex = 0, previousRow) {
|
|
12125
12136
|
var _b;
|
|
12126
12137
|
const visibleColumns = this.getVisibleColumns();
|
|
@@ -12152,18 +12163,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12152
12163
|
for (let i = 0; i < level; i++) {
|
|
12153
12164
|
indent.push(index.h("span", { class: "indent" }));
|
|
12154
12165
|
}
|
|
12155
|
-
if (__classPrivateFieldGet$
|
|
12166
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)) {
|
|
12156
12167
|
//const colSpan = this.multiSelection ? 2 : 1;
|
|
12157
12168
|
const cells = [];
|
|
12158
|
-
if (__classPrivateFieldGet$
|
|
12159
|
-
__classPrivateFieldGet$
|
|
12169
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ||
|
|
12170
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.column.hasCodVer(this.data.columns)) {
|
|
12160
12171
|
cells.push(index.h("td", null));
|
|
12161
12172
|
}
|
|
12162
12173
|
if (this.selection === kupManager$1.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
12163
12174
|
cells.push(index.h("td", null));
|
|
12164
12175
|
}
|
|
12165
12176
|
// adding 'grouping' cell
|
|
12166
|
-
const grouplabelcell = (index.h("td", { colSpan: __classPrivateFieldGet$
|
|
12177
|
+
const grouplabelcell = (index.h("td", { colSpan: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, index.h("span", { class: "group-cell-content" }, indent, index.h("span", { class: iconClass }), index.h("span", { class: "text" }, composedGroupLabel))));
|
|
12167
12178
|
// adding 'totals grouping' cells
|
|
12168
12179
|
for (let column of visibleColumns) {
|
|
12169
12180
|
let totalClass = 'total';
|
|
@@ -12178,11 +12189,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12178
12189
|
value = totalValue;
|
|
12179
12190
|
}
|
|
12180
12191
|
else {
|
|
12181
|
-
if (__classPrivateFieldGet$
|
|
12192
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
12182
12193
|
if (totalValue) {
|
|
12183
|
-
if (__classPrivateFieldGet$
|
|
12194
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dates.isIsoDate(totalValue)) {
|
|
12184
12195
|
value =
|
|
12185
|
-
__classPrivateFieldGet$
|
|
12196
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dates.format(totalValue);
|
|
12186
12197
|
}
|
|
12187
12198
|
else {
|
|
12188
12199
|
console.warn(`invalid date: ${totalValue}`);
|
|
@@ -12191,19 +12202,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12191
12202
|
}
|
|
12192
12203
|
else {
|
|
12193
12204
|
value =
|
|
12194
|
-
__classPrivateFieldGet$
|
|
12205
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").math.numberToFormattedString(totalValue, column.decimals, column.obj ? column.obj.p : '');
|
|
12195
12206
|
}
|
|
12196
12207
|
}
|
|
12197
12208
|
cells.push(index.h("td", { class: totalClass }, value));
|
|
12198
12209
|
}
|
|
12199
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
12200
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
12210
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group group-label" }, grouplabelcell));
|
|
12211
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group group-total" }, cells));
|
|
12201
12212
|
// if group is expanded, add children
|
|
12202
|
-
if (__classPrivateFieldGet$
|
|
12213
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isGroupExpanded).call(this, row)) {
|
|
12203
12214
|
row.group.children
|
|
12204
12215
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
12205
12216
|
// When the column has specified the parameter hideValuesRepetitions
|
|
12206
|
-
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$
|
|
12217
|
+
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, level + 1, groupRowIndex, groupRowIndex > 0
|
|
12207
12218
|
? currentArray[groupRowIndex - 1]
|
|
12208
12219
|
: undefined))
|
|
12209
12220
|
.forEach((jsxRow) => {
|
|
@@ -12217,12 +12228,12 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12217
12228
|
}
|
|
12218
12229
|
}
|
|
12219
12230
|
else {
|
|
12220
|
-
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
12221
|
-
if (__classPrivateFieldGet$
|
|
12231
|
+
jsxRows.push(index.h("tr", { ref: (el) => __classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f").push(el), "data-id": row.id, "data-row": row, class: "group" }, index.h("td", { colSpan: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, index.h("span", { class: "group-cell-content" }, indent, index.h("span", { class: iconClass }), index.h("span", { class: "text" }, composedGroupLabel)))));
|
|
12232
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_isGroupExpanded).call(this, row)) {
|
|
12222
12233
|
row.group.children
|
|
12223
12234
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
12224
12235
|
// When the column has specified the parameter hideValuesRepetitions
|
|
12225
|
-
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$
|
|
12236
|
+
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, level + 1, groupRowIndex, groupRowIndex > 0
|
|
12226
12237
|
? currentArray[groupRowIndex - 1]
|
|
12227
12238
|
: undefined))
|
|
12228
12239
|
.forEach((jsxRow) => {
|
|
@@ -12250,11 +12261,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12250
12261
|
let selectRowCell = null;
|
|
12251
12262
|
if (this.selection === kupManager$1.SelectionMode.MULTIPLE_CHECKBOX) {
|
|
12252
12263
|
specialExtraCellsCount++;
|
|
12253
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
12264
|
+
const selectionStyleAndClass = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, rowCssIndex, specialExtraCellsCount - 1);
|
|
12254
12265
|
const props = {
|
|
12255
12266
|
checked: this.selectedRows.includes(row),
|
|
12256
12267
|
onChange: () => {
|
|
12257
|
-
__classPrivateFieldGet$
|
|
12268
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_handleRowSelect).call(this, row);
|
|
12258
12269
|
},
|
|
12259
12270
|
};
|
|
12260
12271
|
selectRowCell = (index.h("td", { "row-select-cell": true, class: selectionStyleAndClass
|
|
@@ -12266,20 +12277,21 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12266
12277
|
// Renders action cell
|
|
12267
12278
|
// If active, this can be either the first or second cell
|
|
12268
12279
|
let rowActionsCell = null;
|
|
12269
|
-
if (__classPrivateFieldGet$
|
|
12270
|
-
__classPrivateFieldGet$
|
|
12280
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ||
|
|
12281
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.column.hasCodVer(this.data.columns)) {
|
|
12271
12282
|
// Increments
|
|
12272
12283
|
specialExtraCellsCount++;
|
|
12273
|
-
const actionsStyleAndClass = __classPrivateFieldGet$
|
|
12284
|
+
const actionsStyleAndClass = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, rowCssIndex, specialExtraCellsCount - 1);
|
|
12274
12285
|
const actionsOnRow = [];
|
|
12275
12286
|
if (row.actions) ;
|
|
12276
12287
|
else {
|
|
12277
|
-
const rowActions = __classPrivateFieldGet$
|
|
12278
|
-
if (__classPrivateFieldGet$
|
|
12288
|
+
const rowActions = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.row.buildRowActions(row, this.getVisibleColumns({ includeCodVer: true }), this.rowActions, (_b = this.commands) !== null && _b !== void 0 ? _b : []);
|
|
12289
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.action.checkEveryActionHasOnlyIcon(rowActions) ||
|
|
12279
12290
|
(rowActions.length === 1 && rowActions[0].icon)) {
|
|
12280
12291
|
rowActions.forEach((action, index) => {
|
|
12281
12292
|
var _a;
|
|
12282
|
-
const imageProp = __classPrivateFieldGet$
|
|
12293
|
+
const imageProp = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.action.buildImageProp(action.icon, action.text || ((_a = action.column) === null || _a === void 0 ? void 0 : _a.title) || '', 'action', () => {
|
|
12294
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, row, null, true);
|
|
12283
12295
|
this.kupRowActionItemClick.emit({
|
|
12284
12296
|
comp: this,
|
|
12285
12297
|
id: this.rootElement.id,
|
|
@@ -12295,9 +12307,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12295
12307
|
});
|
|
12296
12308
|
}
|
|
12297
12309
|
else {
|
|
12298
|
-
const textPopulatedRowActions = __classPrivateFieldGet$
|
|
12299
|
-
const imageProp = __classPrivateFieldGet$
|
|
12300
|
-
__classPrivateFieldGet$
|
|
12310
|
+
const textPopulatedRowActions = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.action.createActionsWithText(rowActions);
|
|
12311
|
+
const imageProp = __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.action.buildImageProp('chevron-down', __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.EXPAND), 'expander', (e) => {
|
|
12312
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, row, null, true);
|
|
12313
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onRowActionExpanderClick).call(this, e, row, textPopulatedRowActions);
|
|
12301
12314
|
});
|
|
12302
12315
|
actionsOnRow.push(imageProp);
|
|
12303
12316
|
}
|
|
@@ -12327,17 +12340,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12327
12340
|
return null;
|
|
12328
12341
|
}
|
|
12329
12342
|
}
|
|
12330
|
-
cell.isEditable = __classPrivateFieldGet$
|
|
12343
|
+
cell.isEditable = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_setCellEditability).call(this, currentColumn, row, cell);
|
|
12331
12344
|
cell.data = Object.assign(Object.assign({}, cell.data), { legacyLook: this.legacyLook });
|
|
12332
|
-
const fcell = Object.assign(Object.assign({}, __classPrivateFieldGet$
|
|
12345
|
+
const fcell = Object.assign(Object.assign({}, __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.cell.buildFCell(cell, currentColumn, row)), { component: this, density: this.density, editable: this.editableData || this.updatableData, indents: indend, previousValue: hideValuesRepetitions && previousRow
|
|
12333
12346
|
? previousRow.cells[name].value
|
|
12334
|
-
: undefined, renderKup: this.lazyLoadCells, cellActionIcon: __classPrivateFieldGet$
|
|
12347
|
+
: undefined, renderKup: this.lazyLoadCells, cellActionIcon: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").data.cell.hasActionCell(cell, (_a = this.commands) !== null && _a !== void 0 ? _a : [])
|
|
12335
12348
|
? {
|
|
12336
12349
|
onClick: (e) => {
|
|
12337
12350
|
this.kupCellActionIconClick.emit({
|
|
12338
12351
|
comp: this,
|
|
12339
12352
|
id: this.rootElement.id,
|
|
12340
|
-
details: __classPrivateFieldGet$
|
|
12353
|
+
details: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_cellActionsMenuHandler).call(this, e),
|
|
12341
12354
|
});
|
|
12342
12355
|
},
|
|
12343
12356
|
}
|
|
@@ -12347,18 +12360,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12347
12360
|
let cellClass = null;
|
|
12348
12361
|
let cellStyle = Object.assign({}, cell.style);
|
|
12349
12362
|
//-- For fixed cells --
|
|
12350
|
-
const fixedStyles = __classPrivateFieldGet$
|
|
12363
|
+
const fixedStyles = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, cellIndex + 1 + specialExtraCellsCount, cellIndex + 1, rowCssIndex, specialExtraCellsCount);
|
|
12351
12364
|
if (fixedStyles) {
|
|
12352
12365
|
cellStyle = Object.assign(cellStyle ? cellStyle : {}, fixedStyles.fixedCellStyle);
|
|
12353
12366
|
cellClass = Object.assign(Object.assign({}, cellClass), fixedStyles.fixedCellClasses);
|
|
12354
12367
|
}
|
|
12355
12368
|
// Controls if there are columns with a specified width
|
|
12356
|
-
if (__classPrivateFieldGet$
|
|
12369
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f")) {
|
|
12357
12370
|
let colWidth = '';
|
|
12358
12371
|
// Search if this column has a specified width
|
|
12359
|
-
for (let j = 0; j < __classPrivateFieldGet$
|
|
12360
|
-
if (name === __classPrivateFieldGet$
|
|
12361
|
-
colWidth = __classPrivateFieldGet$
|
|
12372
|
+
for (let j = 0; j < __classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f").length; j++) {
|
|
12373
|
+
if (name === __classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f")[j].name) {
|
|
12374
|
+
colWidth = __classPrivateFieldGet$7(this, _KupDataTable_sizedColumns, "f")[j].size;
|
|
12362
12375
|
break;
|
|
12363
12376
|
}
|
|
12364
12377
|
}
|
|
@@ -12380,70 +12393,70 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12380
12393
|
return (index.h("td", Object.assign({ title: title, colSpan: cell.span && cell.span.col ? cell.span.col : null, rowSpan: cell.span && cell.span.row ? cell.span.row : null, "data-cell": cell, "data-column": name, "data-row": row, style: cellStyle, class: cellClass }, eventHandlers), jsxCell));
|
|
12381
12394
|
});
|
|
12382
12395
|
// adding row to rendered rows
|
|
12383
|
-
__classPrivateFieldGet$
|
|
12396
|
+
__classPrivateFieldGet$7(this, _KupDataTable_renderedRows, "f").push(row);
|
|
12384
12397
|
const rowClass = {
|
|
12385
12398
|
selected: this.selectedRows.includes(row),
|
|
12386
12399
|
};
|
|
12387
12400
|
if (row.cssClass) {
|
|
12388
12401
|
rowClass[row.cssClass] = true;
|
|
12389
12402
|
}
|
|
12390
|
-
return (index.h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
12403
|
+
return (index.h("tr", { ref: (el) => __classPrivateFieldGet$7(this, _KupDataTable_rowsRefs, "f").push(el), "data-id": row.id, "data-row": row, class: rowClass }, selectRowCell, rowActionsCell, cells));
|
|
12391
12404
|
}
|
|
12392
12405
|
}, _KupDataTable_onCustomSettingsClick = function _KupDataTable_onCustomSettingsClick() {
|
|
12393
12406
|
if (!this.openedCustomSettings) {
|
|
12394
|
-
__classPrivateFieldGet$
|
|
12407
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_openCustomSettings).call(this);
|
|
12395
12408
|
}
|
|
12396
12409
|
else {
|
|
12397
|
-
__classPrivateFieldGet$
|
|
12410
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
12398
12411
|
}
|
|
12399
12412
|
}, _KupDataTable_openCustomSettings = function _KupDataTable_openCustomSettings() {
|
|
12400
|
-
__classPrivateFieldGet$
|
|
12401
|
-
__classPrivateFieldGet$
|
|
12402
|
-
__classPrivateFieldGet$
|
|
12413
|
+
__classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f").menuVisible = true;
|
|
12414
|
+
__classPrivateFieldGet$7(this, _KupDataTable_customizeTopButtonRef, "f").classList.add('toggled');
|
|
12415
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f"));
|
|
12403
12416
|
this.openedCustomSettings = true;
|
|
12404
|
-
if (!__classPrivateFieldGet$
|
|
12417
|
+
if (!__classPrivateFieldGet$7(this, _KupDataTable_clickCbCustomPanel, "f")) {
|
|
12405
12418
|
__classPrivateFieldSet$3(this, _KupDataTable_clickCbCustomPanel, {
|
|
12406
12419
|
cb: () => {
|
|
12407
|
-
__classPrivateFieldGet$
|
|
12420
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
12408
12421
|
},
|
|
12409
|
-
el: __classPrivateFieldGet$
|
|
12422
|
+
el: __classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f"),
|
|
12410
12423
|
}, "f");
|
|
12411
12424
|
}
|
|
12412
|
-
__classPrivateFieldGet$
|
|
12425
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$7(this, _KupDataTable_clickCbCustomPanel, "f"), true);
|
|
12413
12426
|
}, _KupDataTable_closeCustomSettings = function _KupDataTable_closeCustomSettings() {
|
|
12414
|
-
__classPrivateFieldGet$
|
|
12415
|
-
if (__classPrivateFieldGet$
|
|
12427
|
+
__classPrivateFieldGet$7(this, _KupDataTable_customizeTopButtonRef, "f").classList.remove('toggled');
|
|
12428
|
+
if (__classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f") == null) {
|
|
12416
12429
|
return;
|
|
12417
12430
|
}
|
|
12418
|
-
__classPrivateFieldGet$
|
|
12431
|
+
__classPrivateFieldGet$7(this, _KupDataTable_customizeTopPanelRef, "f").menuVisible = false;
|
|
12419
12432
|
this.openedCustomSettings = false;
|
|
12420
|
-
__classPrivateFieldGet$
|
|
12433
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$7(this, _KupDataTable_clickCbCustomPanel, "f"));
|
|
12421
12434
|
}, _KupDataTable_renderPaginator = function _KupDataTable_renderPaginator(top) {
|
|
12422
12435
|
var _a;
|
|
12423
12436
|
return (index.h("div", { class: "paginator-wrapper" }, index.h("div", { class: "paginator-tabs" }, this.showLoadMore ||
|
|
12424
12437
|
(!this.lazyLoadRows &&
|
|
12425
|
-
__classPrivateFieldGet$
|
|
12438
|
+
__classPrivateFieldGet$7(this, _KupDataTable_rowsLength, "f") > this.rowsPerPage) ? (index.h(fPaginatorUtils.FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: __classPrivateFieldGet$7(this, _KupDataTable_rowsLength, "f"), perPage: this.currentRowsPerPage
|
|
12426
12439
|
? this.currentRowsPerPage
|
|
12427
|
-
: this.rowsPerPage, maxRowsPerPage: (_a = __classPrivateFieldGet$
|
|
12440
|
+
: this.rowsPerPage, maxRowsPerPage: (_a = __classPrivateFieldGet$7(this, _KupDataTable_maxRowsPerPage, "f")) !== null && _a !== void 0 ? _a : __classPrivateFieldGet$7(this, _KupDataTable_rowsLength, "f"), onLoadMore: this.showLoadMore
|
|
12428
12441
|
? () => {
|
|
12429
|
-
__classPrivateFieldGet$
|
|
12442
|
+
__classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_onLoadMoreClick).call(this);
|
|
12430
12443
|
}
|
|
12431
|
-
: null, onNextPage: () => __classPrivateFieldGet$
|
|
12444
|
+
: null, onNextPage: () => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, this.currentPage + 1), onPrevPage: () => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, this.currentPage - 1), onPageChange: (e) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, e.detail.value), onRowsChange: (e) => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_handleRowsPerPageChange).call(this, e.detail.value) })) : null)));
|
|
12432
12445
|
}, _KupDataTable_columnRemoveArea = function _KupDataTable_columnRemoveArea() {
|
|
12433
12446
|
return (index.h("div", { class: "droparea__remove", ref: (el) => (__classPrivateFieldSet$3(this, _KupDataTable_removeDropareaRef, el, "f")) }, index.h(fImage.FImage, { resource: "delete", color: `var(${kupManager$1.KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" }), index.h(fImage.FImage, { resource: "delete-empty", color: `var(${kupManager$1.KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" })));
|
|
12434
12447
|
}, _KupDataTable_columnGroupArea = function _KupDataTable_columnGroupArea() {
|
|
12435
12448
|
return (index.h("div", { class: "droparea__groups", ref: (el) => (__classPrivateFieldSet$3(this, _KupDataTable_groupsDropareaRef, el, "f")) }, index.h(fImage.FImage, { resource: "bookmark", color: `var(${kupManager$1.KupThemeColorValues.TEXT})`, sizeX: "30px", sizeY: "50px" }), index.h(fImage.FImage, { resource: "book", color: `var(${kupManager$1.KupThemeColorValues.TEXT})`, sizeX: "30px", sizeY: "50px" })));
|
|
12436
12449
|
}, _KupDataTable_hideShowColumnDropArea = function _KupDataTable_hideShowColumnDropArea(show, th) {
|
|
12437
12450
|
if (show && th && (this.removableColumns || this.showGroups)) {
|
|
12438
|
-
__classPrivateFieldGet$
|
|
12439
|
-
__classPrivateFieldGet$
|
|
12440
|
-
__classPrivateFieldGet$
|
|
12441
|
-
__classPrivateFieldGet$
|
|
12442
|
-
th.clientWidth / 2 - __classPrivateFieldGet$
|
|
12451
|
+
__classPrivateFieldGet$7(this, _KupDataTable_dropareaRef, "f").classList.add('droparea--visible');
|
|
12452
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$7(this, _KupDataTable_dropareaRef, "f"), th, 10, kupManager$1.KupDynamicPositionPlacement.TOP);
|
|
12453
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$7(this, _KupDataTable_dropareaRef, "f"));
|
|
12454
|
+
__classPrivateFieldGet$7(this, _KupDataTable_dropareaRef, "f").style.marginLeft =
|
|
12455
|
+
th.clientWidth / 2 - __classPrivateFieldGet$7(this, _KupDataTable_dropareaRef, "f").clientWidth / 2 + 'px';
|
|
12443
12456
|
}
|
|
12444
12457
|
else {
|
|
12445
|
-
__classPrivateFieldGet$
|
|
12446
|
-
+__classPrivateFieldGet$
|
|
12458
|
+
__classPrivateFieldGet$7(this, _KupDataTable_dropareaRef, "f").classList.remove('droparea--visible');
|
|
12459
|
+
+__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$7(this, _KupDataTable_dropareaRef, "f"));
|
|
12447
12460
|
}
|
|
12448
12461
|
}, _KupDataTable_handleColumnGroup = function _KupDataTable_handleColumnGroup(column2group) {
|
|
12449
12462
|
// Get sorted column current position
|
|
@@ -12511,19 +12524,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12511
12524
|
icon: icons[i],
|
|
12512
12525
|
id: codes[i],
|
|
12513
12526
|
selected: selectedCode == codes[i],
|
|
12514
|
-
value: __classPrivateFieldGet$
|
|
12527
|
+
value: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(value),
|
|
12515
12528
|
};
|
|
12516
12529
|
}
|
|
12517
12530
|
}
|
|
12518
12531
|
return listItems;
|
|
12519
12532
|
}, _KupDataTable_getFontSizeCodeFromDecode = function _KupDataTable_getFontSizeCodeFromDecode(decode) {
|
|
12520
|
-
return __classPrivateFieldGet$
|
|
12533
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$7(this, _KupDataTable_FONTSIZE_DECODES, "f"), __classPrivateFieldGet$7(this, _KupDataTable_FONTSIZE_CODES, "f"));
|
|
12521
12534
|
}, _KupDataTable_renderFontSizePanel = function _KupDataTable_renderFontSizePanel() {
|
|
12522
|
-
const listItems = __classPrivateFieldGet$
|
|
12535
|
+
const listItems = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, __classPrivateFieldGet$7(this, _KupDataTable_FONTSIZE_CODES, "f"), __classPrivateFieldGet$7(this, _KupDataTable_FONTSIZE_ICONS, "f"), this.fontsize);
|
|
12523
12536
|
const listData = { data: listItems, showIcons: true };
|
|
12524
12537
|
const textfieldData = {
|
|
12525
12538
|
trailingIcon: true,
|
|
12526
|
-
label: __classPrivateFieldGet$
|
|
12539
|
+
label: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageFontsize.LABEL),
|
|
12527
12540
|
icon: 'arrow_drop_down',
|
|
12528
12541
|
};
|
|
12529
12542
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -12540,22 +12553,22 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12540
12553
|
text = kupManager$1.KupLanguageFontsize.SMALL;
|
|
12541
12554
|
break;
|
|
12542
12555
|
}
|
|
12543
|
-
return (index.h("div", { class: "customize-element fontsize-panel" }, index.h("kup-combobox", { isSelect: true, data: data, initialValue: __classPrivateFieldGet$
|
|
12556
|
+
return (index.h("div", { class: "customize-element fontsize-panel" }, index.h("kup-combobox", { isSelect: true, data: data, initialValue: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(text), "onkup-combobox-itemclick": (e) => {
|
|
12544
12557
|
e.stopPropagation();
|
|
12545
|
-
this.fontsize = __classPrivateFieldGet$
|
|
12558
|
+
this.fontsize = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getFontSizeCodeFromDecode).call(this, e.detail.node.id);
|
|
12546
12559
|
} })));
|
|
12547
12560
|
}, _KupDataTable_getDensityCodeFromDecode = function _KupDataTable_getDensityCodeFromDecode(decode) {
|
|
12548
|
-
return __classPrivateFieldGet$
|
|
12561
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$7(this, _KupDataTable_DENSITY_DECODES, "f"), [
|
|
12549
12562
|
'dense',
|
|
12550
12563
|
'medium',
|
|
12551
12564
|
'wide',
|
|
12552
12565
|
]);
|
|
12553
12566
|
}, _KupDataTable_renderDensityPanel = function _KupDataTable_renderDensityPanel() {
|
|
12554
|
-
const listItems = __classPrivateFieldGet$
|
|
12567
|
+
const listItems = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, ['dense', 'medium', 'wide'], __classPrivateFieldGet$7(this, _KupDataTable_DENSITY_ICONS, "f"), this.density);
|
|
12555
12568
|
const listData = { data: listItems, showIcons: true };
|
|
12556
12569
|
const textfieldData = {
|
|
12557
12570
|
trailingIcon: true,
|
|
12558
|
-
label: __classPrivateFieldGet$
|
|
12571
|
+
label: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageDensity.LABEL),
|
|
12559
12572
|
icon: 'arrow_drop_down',
|
|
12560
12573
|
};
|
|
12561
12574
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -12572,14 +12585,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12572
12585
|
text = kupManager$1.KupLanguageDensity.WIDE;
|
|
12573
12586
|
break;
|
|
12574
12587
|
}
|
|
12575
|
-
return (index.h("div", { class: "customize-element density-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$
|
|
12588
|
+
return (index.h("div", { class: "customize-element density-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(text), selectMode: kupManager$1.ItemsDisplayMode.DESCRIPTION, data: data, "onkup-combobox-itemclick": (e) => {
|
|
12576
12589
|
e.stopPropagation();
|
|
12577
|
-
this.density = __classPrivateFieldGet$
|
|
12590
|
+
this.density = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getDensityCodeFromDecode).call(this, e.detail.node.id);
|
|
12578
12591
|
} })));
|
|
12579
12592
|
}, _KupDataTable_getGridCodeFromDecode = function _KupDataTable_getGridCodeFromDecode(decode) {
|
|
12580
|
-
return __classPrivateFieldGet$
|
|
12593
|
+
return __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$7(this, _KupDataTable_GRID_DECODES, "f"), __classPrivateFieldGet$7(this, _KupDataTable_GRID_CODES, "f"));
|
|
12581
12594
|
}, _KupDataTable_renderTransposeSwitch = function _KupDataTable_renderTransposeSwitch() {
|
|
12582
|
-
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-switch", { checked: this.transpose, label: __classPrivateFieldGet$
|
|
12595
|
+
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-switch", { checked: this.transpose, label: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.TRANSPOSE_DATA), leadingLabel: true, "onkup-switch-change": (e) => {
|
|
12583
12596
|
e.stopPropagation();
|
|
12584
12597
|
if (e.detail.value === 'on') {
|
|
12585
12598
|
this.transpose = true;
|
|
@@ -12589,16 +12602,16 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12589
12602
|
}
|
|
12590
12603
|
} })));
|
|
12591
12604
|
}, _KupDataTable_renderTotalsMatrix = function _KupDataTable_renderTotalsMatrix() {
|
|
12592
|
-
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-button", { title: __classPrivateFieldGet$
|
|
12605
|
+
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-button", { title: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.TOTALS_TABLE) +
|
|
12593
12606
|
' (' +
|
|
12594
|
-
__classPrivateFieldGet$
|
|
12595
|
-
')', label: __classPrivateFieldGet$
|
|
12607
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
12608
|
+
')', label: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.TOTALS_TABLE), icon: "exposure", "onkup-button-click": () => __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_switchToTotalsMatrix).call(this) })));
|
|
12596
12609
|
}, _KupDataTable_renderGridPanel = function _KupDataTable_renderGridPanel() {
|
|
12597
|
-
const listItems = __classPrivateFieldGet$
|
|
12610
|
+
const listItems = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, __classPrivateFieldGet$7(this, _KupDataTable_GRID_CODES, "f"), __classPrivateFieldGet$7(this, _KupDataTable_GRID_ICONS, "f"), this.showGrid);
|
|
12598
12611
|
const listData = { data: listItems, showIcons: true };
|
|
12599
12612
|
const textfieldData = {
|
|
12600
12613
|
trailingIcon: true,
|
|
12601
|
-
label: __classPrivateFieldGet$
|
|
12614
|
+
label: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGrid.LABEL),
|
|
12602
12615
|
icon: 'arrow_drop_down',
|
|
12603
12616
|
};
|
|
12604
12617
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -12618,14 +12631,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12618
12631
|
text = kupManager$1.KupLanguageGrid.ROW;
|
|
12619
12632
|
break;
|
|
12620
12633
|
}
|
|
12621
|
-
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$
|
|
12634
|
+
return (index.h("div", { class: "customize-element grid-panel" }, index.h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(text), data: data, "onkup-combobox-itemclick": (e) => {
|
|
12622
12635
|
e.stopPropagation();
|
|
12623
|
-
const grid = __classPrivateFieldGet$
|
|
12636
|
+
const grid = __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_getGridCodeFromDecode).call(this, e.detail.value);
|
|
12624
12637
|
this.showGrid = grid;
|
|
12625
12638
|
} })));
|
|
12626
12639
|
}, _KupDataTable_renderCommandButton = function _KupDataTable_renderCommandButton(commandObj, styling) {
|
|
12627
12640
|
var _a;
|
|
12628
|
-
return (index.h("kup-button", { styling: styling, "onKup-button-click": () => __classPrivateFieldGet$
|
|
12641
|
+
return (index.h("kup-button", { styling: styling, "onKup-button-click": () => __classPrivateFieldGet$7(this, _KupDataTable_handleUpdateClick, "f").call(this, commandObj), keyShortcut: (_a = commandObj.data) === null || _a === void 0 ? void 0 : _a.keyShortcut, icon: commandObj.icon, label: commandObj.value }));
|
|
12629
12642
|
}, _KupDataTable_renderCommandDropDownButton = function _KupDataTable_renderCommandDropDownButton(commandObj, styling) {
|
|
12630
12643
|
const data = {
|
|
12631
12644
|
'kup-list': {
|
|
@@ -12636,14 +12649,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12636
12649
|
},
|
|
12637
12650
|
};
|
|
12638
12651
|
return (index.h("kup-dropdown-button", Object.assign({}, commandObj.data, { styling: styling, sizing: kupManager$1.KupComponentSizing.MEDIUM, label: commandObj.value, data: data, "onkup-dropdownbutton-itemclick": (e) => {
|
|
12639
|
-
__classPrivateFieldGet$
|
|
12652
|
+
__classPrivateFieldGet$7(this, _KupDataTable_handleUpdateClick, "f").call(this, e.detail.node);
|
|
12640
12653
|
} })));
|
|
12641
12654
|
}, _KupDataTable_renderUpdateButtons = function _KupDataTable_renderUpdateButtons() {
|
|
12642
12655
|
const styling = fButtonDeclarations.FButtonStyling.FLAT;
|
|
12643
12656
|
const createRowWithInputFields = () => {
|
|
12644
12657
|
var _a;
|
|
12645
12658
|
let row = { cells: {} };
|
|
12646
|
-
(_a = __classPrivateFieldGet$
|
|
12659
|
+
(_a = __classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f")) === null || _a === void 0 ? void 0 : _a.columns.forEach((c) => {
|
|
12647
12660
|
row.cells[c.name] = {
|
|
12648
12661
|
shape: kupManager$1.FCellShapes.INPUT_FIELD,
|
|
12649
12662
|
obj: Object.assign({}, c.obj),
|
|
@@ -12660,8 +12673,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12660
12673
|
if (selectedRows.length > 0) {
|
|
12661
12674
|
newRow = JSON.parse(JSON.stringify(selectedRows[0]));
|
|
12662
12675
|
}
|
|
12663
|
-
else if (((_b = (_a = __classPrivateFieldGet$
|
|
12664
|
-
newRow = JSON.parse(JSON.stringify(__classPrivateFieldGet$
|
|
12676
|
+
else if (((_b = (_a = __classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f")) === null || _a === void 0 ? void 0 : _a.rows) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
12677
|
+
newRow = JSON.parse(JSON.stringify(__classPrivateFieldGet$7(this, _KupDataTable_originalDataLoaded, "f").rows[0]));
|
|
12665
12678
|
}
|
|
12666
12679
|
else {
|
|
12667
12680
|
newRow = createRowWithInputFields();
|
|
@@ -12671,8 +12684,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12671
12684
|
cell.value = '';
|
|
12672
12685
|
}
|
|
12673
12686
|
});
|
|
12674
|
-
newRow.id = (__classPrivateFieldGet$
|
|
12675
|
-
__classPrivateFieldGet$
|
|
12687
|
+
newRow.id = (__classPrivateFieldGet$7(this, _KupDataTable_originalDataLoadedMaxId, "f") + __classPrivateFieldSet$3(this, _KupDataTable_insertCount, (_c = __classPrivateFieldGet$7(this, _KupDataTable_insertCount, "f"), ++_c), "f")).toString();
|
|
12688
|
+
__classPrivateFieldGet$7(this, _KupDataTable_insertedRowIds, "f").push(newRow.id);
|
|
12676
12689
|
this.insertNewRow(newRow, true);
|
|
12677
12690
|
};
|
|
12678
12691
|
const deleteRowHandler = async () => {
|
|
@@ -12680,22 +12693,22 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12680
12693
|
this.deleteRows(ids);
|
|
12681
12694
|
};
|
|
12682
12695
|
const addConfirmButton = () => {
|
|
12683
|
-
__classPrivateFieldGet$
|
|
12696
|
+
__classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").keysBinding.register('enter', () => {
|
|
12684
12697
|
const bc = this.rootElement.shadowRoot
|
|
12685
12698
|
.activeElement;
|
|
12686
12699
|
bc === null || bc === void 0 ? void 0 : bc.blur();
|
|
12687
|
-
__classPrivateFieldGet$
|
|
12700
|
+
__classPrivateFieldGet$7(this, _KupDataTable_handleUpdateClick, "f").call(this);
|
|
12688
12701
|
});
|
|
12689
12702
|
commandButtons.push(index.h("kup-button", { styling: styling, icon: "check", "onKup-button-click": () => {
|
|
12690
|
-
__classPrivateFieldGet$
|
|
12691
|
-
}, label: __classPrivateFieldGet$
|
|
12703
|
+
__classPrivateFieldGet$7(this, _KupDataTable_handleUpdateClick, "f").call(this);
|
|
12704
|
+
}, label: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.CONFIRM) }));
|
|
12692
12705
|
};
|
|
12693
12706
|
const addCommands = () => {
|
|
12694
12707
|
var _a, _b, _c;
|
|
12695
12708
|
(_c = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.setup) === null || _b === void 0 ? void 0 : _b.commands) === null || _c === void 0 ? void 0 : _c.forEach((commandObj) => {
|
|
12696
12709
|
commandButtons.push((commandObj === null || commandObj === void 0 ? void 0 : commandObj.children) && (commandObj === null || commandObj === void 0 ? void 0 : commandObj.children.length) > 0
|
|
12697
|
-
? __classPrivateFieldGet$
|
|
12698
|
-
: __classPrivateFieldGet$
|
|
12710
|
+
? __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderCommandDropDownButton).call(this, commandObj, styling)
|
|
12711
|
+
: __classPrivateFieldGet$7(this, _KupDataTable_instances, "m", _KupDataTable_renderCommandButton).call(this, commandObj, styling));
|
|
12699
12712
|
});
|
|
12700
12713
|
};
|
|
12701
12714
|
const addOperations = () => {
|
|
@@ -12705,13 +12718,13 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
12705
12718
|
insert: {
|
|
12706
12719
|
enabled: operationList === null || operationList === void 0 ? void 0 : operationList.insert,
|
|
12707
12720
|
icon: 'add',
|
|
12708
|
-
title: __classPrivateFieldGet$
|
|
12721
|
+
title: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.ROW_ADD),
|
|
12709
12722
|
onClickHandler: () => addRowHandler(),
|
|
12710
12723
|
},
|
|
12711
12724
|
delete: {
|
|
12712
12725
|
enabled: operationList === null || operationList === void 0 ? void 0 : operationList.delete,
|
|
12713
12726
|
icon: 'minus',
|
|
12714
|
-
title: __classPrivateFieldGet$
|
|
12727
|
+
title: __classPrivateFieldGet$7(this, _KupDataTable_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.ROW_DELETE),
|
|
12715
12728
|
onClickHandler: () => deleteRowHandler(),
|
|
12716
12729
|
},
|
|
12717
12730
|
};
|
|
@@ -13164,7 +13177,7 @@ var KupDialogProps;
|
|
|
13164
13177
|
const kupDialogCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_dialogheader_text_color:var(\n --kup-dialogheader-text-color,\n var(--kup-text-secondary)\n );--kup_dialog_background_color:var(\n --kup-dialog-background-color,\n var(--kup-layer-0)\n );--kup_dialog_header_background_color:var(\n --kup-dialog-header-background-color,\n var(--kup-layer-1)\n );--kup_dialog_header_height:var(\n --kup-dialog-header-height,\n var(--kup-space-09)\n );--kup_dialog_content_max_height:var(--kup-dialog-content-max-height, 85dvh);box-sizing:border-box;display:block;height:var(--kup_dialog_height);left:var(--kup_dialog_left, -100%);min-height:var(--kup_dialog_height);min-width:var(--kup_dialog_width);max-width:var(--kup_dialog_max_width);max-height:var(--kup_dialog_max_height);position:absolute;top:var(--kup_dialog_top, -100%);transition:opacity 0.25s ease-in;width:var(--kup_dialog_width);-webkit-box-shadow:rgba(0, 0, 0, 0.3) 0 1px 3px;-moz-box-shadow:rgba(0, 0, 0, 0.3) 0 1px 3px;box-shadow:rgba(0, 0, 0, 0.3) 0 1px 3px}#kup-component{height:100%;width:100%}:host([fade-in]){opacity:0}:host([fade-in]) ::slotted{opacity:0}.header{color:var(--kup_dialogheader_text_color);display:flex;flex-direction:row;height:var(--kup_dialog_header_height);position:relative;width:100%;min-height:var(--kup-space-09);background-color:var(--kup_dialog_header_background_color)}.header__title{padding:var(--kup-space-05);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.header__close.f-image{--kup-icon-color:var(--kup_dialogheader_text_color);cursor:pointer;margin-right:0;transition:opacity 0.25s;position:absolute;right:var(--kup-space-05)}.header__close.f-image:hover{opacity:0.5}.content{height:calc(100% - var(--kup_dialog_header_height) - var(--kup-space-05) * 2);padding:var(--kup-space-05);overflow:auto;user-select:text;background-color:var(--kup_dialog_background_color);max-height:var(--kup_dialog_content_max_height)}";
|
|
13165
13178
|
const KupDialogStyle0 = kupDialogCss;
|
|
13166
13179
|
|
|
13167
|
-
var __classPrivateFieldGet$
|
|
13180
|
+
var __classPrivateFieldGet$6 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
13168
13181
|
if (kind === "a" && !f)
|
|
13169
13182
|
throw new TypeError("Private accessor was defined without a getter");
|
|
13170
13183
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -13231,20 +13244,20 @@ const KupDialog = class {
|
|
|
13231
13244
|
var _a;
|
|
13232
13245
|
var _b;
|
|
13233
13246
|
if (!((_a = this.rootElement) === null || _a === void 0 ? void 0 : _a.isConnected)) {
|
|
13234
|
-
__classPrivateFieldGet$
|
|
13235
|
-
__classPrivateFieldGet$
|
|
13247
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").debug.logMessage(this, 'recalcPosition() ran after the component was disconnected. Aborting.', kupManager$1.KupDebugCategory.WARNING);
|
|
13248
|
+
__classPrivateFieldGet$6(this, _KupDialog_instances, "m", _KupDialog_disconnectedCallback).call(this);
|
|
13236
13249
|
return;
|
|
13237
13250
|
}
|
|
13238
13251
|
const rect = this.rootElement.getBoundingClientRect();
|
|
13239
13252
|
if (!rect.x && !rect.y && !rect.height && !rect.width) {
|
|
13240
|
-
__classPrivateFieldGet$
|
|
13241
|
-
if (__classPrivateFieldGet$
|
|
13242
|
-
__classPrivateFieldSet$2(this, _KupDialog_recalcSafeguard, (_b = __classPrivateFieldGet$
|
|
13253
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").debug.logMessage(this, `recalcPosition() ran before the component finished being drawn. Running again (attempt #${__classPrivateFieldGet$6(this, _KupDialog_recalcSafeguard, "f")}).`, kupManager$1.KupDebugCategory.INFO);
|
|
13254
|
+
if (__classPrivateFieldGet$6(this, _KupDialog_recalcSafeguard, "f") < 50) {
|
|
13255
|
+
__classPrivateFieldSet$2(this, _KupDialog_recalcSafeguard, (_b = __classPrivateFieldGet$6(this, _KupDialog_recalcSafeguard, "f"), _b++, _b), "f");
|
|
13243
13256
|
setTimeout(async () => this.recalcPosition(), 50);
|
|
13244
13257
|
return;
|
|
13245
13258
|
}
|
|
13246
13259
|
else {
|
|
13247
|
-
__classPrivateFieldGet$
|
|
13260
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").debug.logMessage(this, `Too many attempts centering the dialog.`, kupManager$1.KupDebugCategory.WARNING);
|
|
13248
13261
|
}
|
|
13249
13262
|
}
|
|
13250
13263
|
__classPrivateFieldSet$2(this, _KupDialog_recalcSafeguard, 0, "f");
|
|
@@ -13271,12 +13284,12 @@ const KupDialog = class {
|
|
|
13271
13284
|
/* L i f e c y c l e H o o k s */
|
|
13272
13285
|
/*-------------------------------------------------*/
|
|
13273
13286
|
componentWillLoad() {
|
|
13274
|
-
__classPrivateFieldGet$
|
|
13275
|
-
__classPrivateFieldGet$
|
|
13287
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").debug.logLoad(this, false);
|
|
13288
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").theme.register(this);
|
|
13276
13289
|
}
|
|
13277
13290
|
componentDidLoad() {
|
|
13278
13291
|
var _a;
|
|
13279
|
-
__classPrivateFieldGet$
|
|
13292
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").interact.dialogify(this.rootElement, __classPrivateFieldGet$6(this, _KupDialog_header, "f") ? __classPrivateFieldGet$6(this, _KupDialog_header, "f") : null, !this.resizable);
|
|
13280
13293
|
if ((_a = this.autoCenter) === null || _a === void 0 ? void 0 : _a.onReady) {
|
|
13281
13294
|
this.recalcPosition();
|
|
13282
13295
|
}
|
|
@@ -13284,7 +13297,7 @@ const KupDialog = class {
|
|
|
13284
13297
|
this.rootElement.removeAttribute('fade-in');
|
|
13285
13298
|
}
|
|
13286
13299
|
if (this.modal) {
|
|
13287
|
-
__classPrivateFieldGet$
|
|
13300
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").interact.showModalBackdrop(this.modal.closeOnBackdropClick
|
|
13288
13301
|
? () => {
|
|
13289
13302
|
this.close();
|
|
13290
13303
|
}
|
|
@@ -13294,13 +13307,13 @@ const KupDialog = class {
|
|
|
13294
13307
|
comp: this,
|
|
13295
13308
|
id: this.rootElement.id,
|
|
13296
13309
|
});
|
|
13297
|
-
__classPrivateFieldGet$
|
|
13310
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").debug.logLoad(this, true);
|
|
13298
13311
|
}
|
|
13299
13312
|
componentWillRender() {
|
|
13300
|
-
__classPrivateFieldGet$
|
|
13313
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").debug.logRender(this, false);
|
|
13301
13314
|
}
|
|
13302
13315
|
componentDidRender() {
|
|
13303
|
-
__classPrivateFieldGet$
|
|
13316
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").debug.logRender(this, true);
|
|
13304
13317
|
}
|
|
13305
13318
|
render() {
|
|
13306
13319
|
var _a;
|
|
@@ -13314,18 +13327,18 @@ const KupDialog = class {
|
|
|
13314
13327
|
if (headerSlot) {
|
|
13315
13328
|
__classPrivateFieldSet$2(this, _KupDialog_header, headerSlot, "f");
|
|
13316
13329
|
}
|
|
13317
|
-
return (index.h(index.Host, { key: '85b3008a0040995bdac981d0482852f53f696989', "fade-in": true, style: style }, index.h("style", { key: 'fe88280e675258f5604ee2abb4b944a4f8f11f17' }, __classPrivateFieldGet$
|
|
13330
|
+
return (index.h(index.Host, { key: '85b3008a0040995bdac981d0482852f53f696989', "fade-in": true, style: style }, index.h("style", { key: 'fe88280e675258f5604ee2abb4b944a4f8f11f17' }, __classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { key: '872122d576446bb73d501de1a5248c650c1c9268', id: GenericVariables.componentWrapperId }, this.header ? (index.h("div", { class: "header", ref: (el) => (__classPrivateFieldSet$2(this, _KupDialog_header, el, "f")) }, this.header.title ? (index.h("div", { class: "header__title" }, this.header.title)) : null, ((_a = this.header.icons) === null || _a === void 0 ? void 0 : _a.close) ? (index.h(fImage.FImage, { onClick: () => this.close(), sizeX: "1.25em", sizeY: "100%", resource: "clear", wrapperClass: "header__close" })) : null)) : headerSlot ? (index.h("slot", { name: "header" })) : null, index.h("div", { key: 'c367d4b6a2308ef03b6fb0440a27c77a396f6cb7', class: "content" }, index.h("slot", { key: '619582bc343d3cd073289a8261844d1fc5bd9fc4', name: "content" })))));
|
|
13318
13331
|
}
|
|
13319
13332
|
disconnectedCallback() {
|
|
13320
|
-
__classPrivateFieldGet$
|
|
13333
|
+
__classPrivateFieldGet$6(this, _KupDialog_instances, "m", _KupDialog_disconnectedCallback).call(this);
|
|
13321
13334
|
}
|
|
13322
13335
|
get rootElement() { return index.getElement(this); }
|
|
13323
13336
|
};
|
|
13324
13337
|
_KupDialog_header = new WeakMap(), _KupDialog_kupManager = new WeakMap(), _KupDialog_recalcSafeguard = new WeakMap(), _KupDialog_instances = new WeakSet(), _KupDialog_disconnectedCallback = function _KupDialog_disconnectedCallback() {
|
|
13325
13338
|
if (this.modal) {
|
|
13326
|
-
__classPrivateFieldGet$
|
|
13339
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").interact.hideModalBackdrop();
|
|
13327
13340
|
}
|
|
13328
|
-
__classPrivateFieldGet$
|
|
13341
|
+
__classPrivateFieldGet$6(this, _KupDialog_kupManager, "f").theme.unregister(this);
|
|
13329
13342
|
};
|
|
13330
13343
|
KupDialog.style = KupDialogStyle0;
|
|
13331
13344
|
|
|
@@ -13655,6 +13668,187 @@ const KupDropdownButton = class {
|
|
|
13655
13668
|
};
|
|
13656
13669
|
KupDropdownButton.style = KupDropdownButtonStyle0;
|
|
13657
13670
|
|
|
13671
|
+
var KupFileUploadProps;
|
|
13672
|
+
(function (KupFileUploadProps) {
|
|
13673
|
+
KupFileUploadProps["customStyle"] = "Custom style of the component.";
|
|
13674
|
+
KupFileUploadProps["data"] = "Actual data of the input file upload.";
|
|
13675
|
+
})(KupFileUploadProps || (KupFileUploadProps = {}));
|
|
13676
|
+
|
|
13677
|
+
const kupFileUploadCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_upload_icon_color:var(--kup-upload-icon-color, var(--kup-icon-color));--kup_upload_border_color:var(\n --kup-upload-border-color,\n var(--kup-gray-color-30)\n );flex:1}:host .file-upload-spinner>*{opacity:0.6;pointer-events:none}:host .file-upload-spinner>file-upload__spinner-container{opacity:1}:host .file-upload{display:flex;flex-direction:column;gap:1em;border:2px dashed var(--kup_upload_border_color);border-radius:4px;padding:1em;position:relative}:host .file-upload__buttons{display:flex;gap:1em;align-items:center;justify-content:center}:host .file-upload__buttons .spinner{height:48px;margin:auto;width:48px}:host .file-upload__list{display:flex;flex-direction:column;gap:1em}:host .file-upload__list__item{display:flex;gap:1em;align-items:center}:host .file-upload__list__item__preview{height:3em;width:3em;display:flex;align-items:center}:host .file-upload__list__item__desc{width:14em}:host .file-upload__list__item__clear{background-color:var(--kup_upload_icon_color);cursor:pointer;height:16px;width:16px;min-width:16px;min-height:16px;outline:none;pointer-events:all;-webkit-mask:var(--kup-clear-icon);mask:var(--kup-clear-icon)}:host .file-upload__list__item__clear:hover{background-color:var(--kup-danger-color-60)}:host .file-upload__spinner-container{height:calc(100% - 2em);width:20%;position:absolute;left:40%}";
|
|
13678
|
+
const KupFileUploadStyle0 = kupFileUploadCss;
|
|
13679
|
+
|
|
13680
|
+
var __classPrivateFieldGet$5 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
13681
|
+
if (kind === "a" && !f)
|
|
13682
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
13683
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
13684
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13685
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
13686
|
+
};
|
|
13687
|
+
var _KupFileUpload_instances, _KupFileUpload_kupManager, _KupFileUpload_previewMap, _KupFileUpload_handleClick, _KupFileUpload_handleFileChange, _KupFileUpload_handleFileRemove, _KupFileUpload_handleDrop, _KupFileUpload_handleCancel, _KupFileUpload_getPreview, _KupFileUpload_trimFileName, _KupFileUpload_uploadClick;
|
|
13688
|
+
const KupFileUpload = class {
|
|
13689
|
+
constructor(hostRef) {
|
|
13690
|
+
index.registerInstance(this, hostRef);
|
|
13691
|
+
this.kupReady = index.createEvent(this, "kup-file-upload-ready", 6);
|
|
13692
|
+
this.kupUpload = index.createEvent(this, "kup-file-upload-upload", 6);
|
|
13693
|
+
_KupFileUpload_instances.add(this);
|
|
13694
|
+
//#endregion
|
|
13695
|
+
//#region VARIABLES
|
|
13696
|
+
/*-------------------------------------------------*/
|
|
13697
|
+
/* I n t e r n a l V a r i a b l e s */
|
|
13698
|
+
/*-------------------------------------------------*/
|
|
13699
|
+
_KupFileUpload_kupManager.set(this, kupManager$1.kupManagerInstance());
|
|
13700
|
+
_KupFileUpload_previewMap.set(this, new Map([
|
|
13701
|
+
['application/pdf', 'file-pdf'],
|
|
13702
|
+
['application/vnd.ms-excel', 'file-excel'],
|
|
13703
|
+
[
|
|
13704
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
13705
|
+
'file-excel',
|
|
13706
|
+
],
|
|
13707
|
+
['application/msword', 'file-word'],
|
|
13708
|
+
[
|
|
13709
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
13710
|
+
'file-word',
|
|
13711
|
+
],
|
|
13712
|
+
]));
|
|
13713
|
+
this.customStyle = '';
|
|
13714
|
+
this.data = null;
|
|
13715
|
+
this.inputRef = undefined;
|
|
13716
|
+
this.files = [];
|
|
13717
|
+
this.uploadSuccess = false;
|
|
13718
|
+
this.showSpinner = false;
|
|
13719
|
+
}
|
|
13720
|
+
//#endregion
|
|
13721
|
+
//#region WATCHERS
|
|
13722
|
+
/*-------------------------------------------------*/
|
|
13723
|
+
/* W a t c h e r s */
|
|
13724
|
+
/*-------------------------------------------------*/
|
|
13725
|
+
onDataChanged() { }
|
|
13726
|
+
//#endregion
|
|
13727
|
+
//#region PUBLIC METHODS
|
|
13728
|
+
/*-------------------------------------------------*/
|
|
13729
|
+
/* P u b l i c M e t h o d s */
|
|
13730
|
+
/*-------------------------------------------------*/
|
|
13731
|
+
/**
|
|
13732
|
+
* Used to retrieve component's props values.
|
|
13733
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
13734
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
13735
|
+
*/
|
|
13736
|
+
async getProps(descriptions) {
|
|
13737
|
+
return kupManager$1.getProps(this, KupFileUploadProps, descriptions);
|
|
13738
|
+
}
|
|
13739
|
+
/**
|
|
13740
|
+
* This method is used to trigger a new render of the component.
|
|
13741
|
+
*/
|
|
13742
|
+
async refresh() {
|
|
13743
|
+
index.forceUpdate(this);
|
|
13744
|
+
}
|
|
13745
|
+
/**
|
|
13746
|
+
* Sets the props to the component.
|
|
13747
|
+
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
13748
|
+
*/
|
|
13749
|
+
async setProps(props) {
|
|
13750
|
+
kupManager$1.setProps(this, KupFileUploadProps, props);
|
|
13751
|
+
}
|
|
13752
|
+
/**
|
|
13753
|
+
* Sets upload has been successfull to show success message.
|
|
13754
|
+
* @param {boolean} success - Boolean to set if upload has been successfull.
|
|
13755
|
+
*/
|
|
13756
|
+
async setSuccess(success) {
|
|
13757
|
+
this.setLoading(false);
|
|
13758
|
+
if (success) {
|
|
13759
|
+
__classPrivateFieldGet$5(this, _KupFileUpload_instances, "m", _KupFileUpload_handleCancel).call(this);
|
|
13760
|
+
this.uploadSuccess = success;
|
|
13761
|
+
}
|
|
13762
|
+
}
|
|
13763
|
+
/**
|
|
13764
|
+
* Sets to show spinner during upload.
|
|
13765
|
+
* @param {boolean} loading - Boolean to set if is loading.
|
|
13766
|
+
*/
|
|
13767
|
+
async setLoading(loading) {
|
|
13768
|
+
this.showSpinner = loading;
|
|
13769
|
+
}
|
|
13770
|
+
//#endregion
|
|
13771
|
+
//#region LIFECYCLE HOOKS
|
|
13772
|
+
/*-------------------------------------------------*/
|
|
13773
|
+
/* L i f e c y c l e H o o k s */
|
|
13774
|
+
/*-------------------------------------------------*/
|
|
13775
|
+
componentWillLoad() {
|
|
13776
|
+
__classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").debug.logLoad(this, false);
|
|
13777
|
+
__classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").language.register(this);
|
|
13778
|
+
__classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").theme.register(this);
|
|
13779
|
+
}
|
|
13780
|
+
componentDidLoad() {
|
|
13781
|
+
this.kupReady.emit({ comp: this, id: this.rootElement.id });
|
|
13782
|
+
__classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").debug.logLoad(this, true);
|
|
13783
|
+
}
|
|
13784
|
+
componentWillRender() {
|
|
13785
|
+
__classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").debug.logRender(this, false);
|
|
13786
|
+
}
|
|
13787
|
+
componentDidRender() {
|
|
13788
|
+
__classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").debug.logRender(this, true);
|
|
13789
|
+
}
|
|
13790
|
+
render() {
|
|
13791
|
+
return (index.h(index.Host, { key: 'fe4bf368d35a09d537000b666c22b8a796e841d8' }, index.h("style", { key: '7f795ecba5c7187f2752051561545a27fdb4eb76' }, __classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { key: '6f998101815936c02246f56816f03e9d43c3ce8d', id: GenericVariables.componentWrapperId }, index.h("div", { key: 'aa518134c9ae9a1a3645e811c75b39da73c544b3', class: {
|
|
13792
|
+
'file-upload': true,
|
|
13793
|
+
'file-upload-spinner': this.showSpinner,
|
|
13794
|
+
}, onDrop: __classPrivateFieldGet$5(this, _KupFileUpload_instances, "m", _KupFileUpload_handleDrop).bind(this), onDragOver: (event) => event.preventDefault() }, index.h("input", { key: 'ed848e17a8e40fec4b5c119a316ab5a6c09c9085', type: "file", ref: (el) => (this.inputRef = el), onChange: __classPrivateFieldGet$5(this, _KupFileUpload_instances, "m", _KupFileUpload_handleFileChange).bind(this), multiple: true, hidden: true }), index.h("div", { key: 'c713ff2f83975080221437cca9ead4534dd4ef9b', class: "file-upload__buttons" }, index.h(fButton.FButton, { key: 'bad9df6fe8d6f45fc414b3c25559333e887d3273', icon: "upload", label: __classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.CHOOSE), onClick: __classPrivateFieldGet$5(this, _KupFileUpload_instances, "m", _KupFileUpload_handleClick).bind(this) }), index.h(fButton.FButton, { key: '3966f24556bce210cc2e84b0b34153ff7feb182c', icon: "save", disabled: !this.files.length, label: __classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.UPLOAD), onClick: __classPrivateFieldGet$5(this, _KupFileUpload_instances, "m", _KupFileUpload_uploadClick).bind(this), styling: fButtonDeclarations.FButtonStyling.FLAT }), index.h(fButton.FButton, { key: '4c538a64d604496d0d65a1c9dc3bb88ddc92df19', icon: "clear", disabled: !this.files.length, label: __classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").language.translate(kupManager$1.KupLanguageGeneric.ABORT), onClick: __classPrivateFieldGet$5(this, _KupFileUpload_instances, "m", _KupFileUpload_handleCancel).bind(this), styling: fButtonDeclarations.FButtonStyling.FLAT })), this.uploadSuccess ? (index.h("span", null, __classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").language.translate(kupManager$1.KupLanguageUpload.SUCCESS))) : (index.h("div", { class: "file-upload__list" }, this.files.map((file, i) => (index.h("div", { class: "file-upload__list__item" }, index.h("div", { class: "file-upload__list__item__preview" }, index.h(fImage.FImage, { resource: __classPrivateFieldGet$5(this, _KupFileUpload_instances, "m", _KupFileUpload_getPreview).call(this, file) })), index.h("span", { class: "file-upload__list__item__desc", title: file.name }, __classPrivateFieldGet$5(this, _KupFileUpload_instances, "m", _KupFileUpload_trimFileName).call(this, file.name)), index.h("span", { class: "file-upload__list__item__clear", onClick: __classPrivateFieldGet$5(this, _KupFileUpload_instances, "m", _KupFileUpload_handleFileRemove).bind(this, i) })))))), this.showSpinner && (index.h("div", { key: '54782b7a4ceb1a4626255256d4832ed24be43e36', class: "file-upload__spinner-container" }, index.h("kup-spinner", { key: '7da8a612be8f0a9a01e96308c7492650677f7b55', active: true, layout: 14, dimensions: "7px" })))))));
|
|
13795
|
+
}
|
|
13796
|
+
disconnectedCallback() {
|
|
13797
|
+
__classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").language.unregister(this);
|
|
13798
|
+
__classPrivateFieldGet$5(this, _KupFileUpload_kupManager, "f").theme.unregister(this);
|
|
13799
|
+
}
|
|
13800
|
+
get rootElement() { return index.getElement(this); }
|
|
13801
|
+
static get watchers() { return {
|
|
13802
|
+
"data": ["onDataChanged"]
|
|
13803
|
+
}; }
|
|
13804
|
+
};
|
|
13805
|
+
_KupFileUpload_kupManager = new WeakMap(), _KupFileUpload_previewMap = new WeakMap(), _KupFileUpload_instances = new WeakSet(), _KupFileUpload_handleClick = function _KupFileUpload_handleClick() {
|
|
13806
|
+
this.inputRef.click();
|
|
13807
|
+
}, _KupFileUpload_handleFileChange = function _KupFileUpload_handleFileChange(event) {
|
|
13808
|
+
this.uploadSuccess = false;
|
|
13809
|
+
const newFiles = Array.from(event.target.files);
|
|
13810
|
+
this.files = [...this.files, ...newFiles];
|
|
13811
|
+
}, _KupFileUpload_handleFileRemove = function _KupFileUpload_handleFileRemove(index) {
|
|
13812
|
+
this.files = [
|
|
13813
|
+
...this.files.splice(0, index),
|
|
13814
|
+
...this.files.splice(index + 1),
|
|
13815
|
+
];
|
|
13816
|
+
}, _KupFileUpload_handleDrop = function _KupFileUpload_handleDrop(event) {
|
|
13817
|
+
event.preventDefault();
|
|
13818
|
+
const droppedFiles = event.dataTransfer.files;
|
|
13819
|
+
if (droppedFiles.length > 0) {
|
|
13820
|
+
const newFiles = Array.from(droppedFiles);
|
|
13821
|
+
this.files = [...this.files, ...newFiles];
|
|
13822
|
+
}
|
|
13823
|
+
}, _KupFileUpload_handleCancel = function _KupFileUpload_handleCancel() {
|
|
13824
|
+
this.files = [];
|
|
13825
|
+
}, _KupFileUpload_getPreview = function _KupFileUpload_getPreview(file) {
|
|
13826
|
+
const previewIcon = __classPrivateFieldGet$5(this, _KupFileUpload_previewMap, "f").get(file.type);
|
|
13827
|
+
if (!previewIcon) {
|
|
13828
|
+
if (/^image\/.*/g.test(file.type)) {
|
|
13829
|
+
return URL.createObjectURL(file);
|
|
13830
|
+
}
|
|
13831
|
+
if (/^video\/.*/g.test(file.type)) {
|
|
13832
|
+
return 'video';
|
|
13833
|
+
}
|
|
13834
|
+
return 'file';
|
|
13835
|
+
}
|
|
13836
|
+
return previewIcon;
|
|
13837
|
+
}, _KupFileUpload_trimFileName = function _KupFileUpload_trimFileName(fileName) {
|
|
13838
|
+
return (fileName === null || fileName === void 0 ? void 0 : fileName.length) > 20
|
|
13839
|
+
? fileName.slice(0, 9) + '...' + fileName.slice(-10)
|
|
13840
|
+
: fileName;
|
|
13841
|
+
}, _KupFileUpload_uploadClick = function _KupFileUpload_uploadClick(e) {
|
|
13842
|
+
e.stopPropagation();
|
|
13843
|
+
this.kupUpload.emit({
|
|
13844
|
+
comp: this,
|
|
13845
|
+
id: this.rootElement.id,
|
|
13846
|
+
files: this.files,
|
|
13847
|
+
});
|
|
13848
|
+
this.setLoading(true);
|
|
13849
|
+
};
|
|
13850
|
+
KupFileUpload.style = KupFileUploadStyle0;
|
|
13851
|
+
|
|
13658
13852
|
/**
|
|
13659
13853
|
* Props of the kup-form component.
|
|
13660
13854
|
* Used to export every prop in an object.
|
|
@@ -14090,7 +14284,7 @@ const KupForm = class {
|
|
|
14090
14284
|
render() {
|
|
14091
14285
|
let formContent = null;
|
|
14092
14286
|
if (this.data.rows.length === 0) {
|
|
14093
|
-
formContent = (index.h("p", { key: '
|
|
14287
|
+
formContent = (index.h("p", { key: 'f749de74f0497b4be1fb554de9e3c9cb1464f16d' }, this.kupManager.language.translate(kupManager$1.KupLanguageGeneric.EMPTY_DATA)));
|
|
14094
14288
|
}
|
|
14095
14289
|
else {
|
|
14096
14290
|
const rows = this.data.rows;
|
|
@@ -14101,7 +14295,7 @@ const KupForm = class {
|
|
|
14101
14295
|
formContent.push(this.renderRow(rows[cnt++]));
|
|
14102
14296
|
}
|
|
14103
14297
|
}
|
|
14104
|
-
return (index.h(index.Host, { key: '
|
|
14298
|
+
return (index.h(index.Host, { key: 'f32e3c7318dd06b37dda2c66fc35188671fd5c2b' }, index.h("style", { key: 'bda0f827c81efc66666670b3da38b699921855cf' }, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { key: '07ba4ba3f36154ee5457b340993f3fd54b202b30', id: GenericVariables.componentWrapperId }, formContent)));
|
|
14105
14299
|
}
|
|
14106
14300
|
disconnectedCallback() {
|
|
14107
14301
|
this.kupManager.language.unregister(this);
|
|
@@ -16136,7 +16330,7 @@ const KupProgressBar = class {
|
|
|
16136
16330
|
? true
|
|
16137
16331
|
: false,
|
|
16138
16332
|
};
|
|
16139
|
-
return (index.h(index.Host, { key: '
|
|
16333
|
+
return (index.h(index.Host, { key: 'e67a7bd17e8f831ccb6e964053d3e9bcc4f3cf74' }, index.h("style", { key: '5568051629371fd5f95b9b51441879380e5a9d67' }, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { key: '65cffea374b2d2598a2e8debb8be1b4c5e6a0c41', id: GenericVariables.componentWrapperId }, index.h(fCell.FProgressBar, Object.assign({ key: '22522650b68cc7ec26d99f06c4d1f3af417ba9f0' }, props)))));
|
|
16140
16334
|
}
|
|
16141
16335
|
disconnectedCallback() {
|
|
16142
16336
|
this.kupManager.theme.unregister(this);
|
|
@@ -16397,7 +16591,7 @@ const KupRating = class {
|
|
|
16397
16591
|
: false,
|
|
16398
16592
|
onClick: (i) => this.onKupClick(i),
|
|
16399
16593
|
};
|
|
16400
|
-
return (index.h(index.Host, { key: '
|
|
16594
|
+
return (index.h(index.Host, { key: '879a6ae98190a2e1084def50d40d01ed821c9660' }, index.h("style", { key: '0fa9425c1dbce6d801647b70a32394063ccce065' }, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { key: '36bb228b8c86388fc981ebd556df4cad4e89d7bb', id: GenericVariables.componentWrapperId }, index.h(fCell.FRating, Object.assign({ key: '2177af857eaca72423e6d4d3a4babba73691de51' }, props)))));
|
|
16401
16595
|
}
|
|
16402
16596
|
disconnectedCallback() {
|
|
16403
16597
|
this.kupManager.theme.unregister(this);
|
|
@@ -16520,59 +16714,59 @@ const KupSpinner = class {
|
|
|
16520
16714
|
spinnerClass = 'spinner-v' + this.layout;
|
|
16521
16715
|
if (this.layout === 7) {
|
|
16522
16716
|
spinnerEl = [
|
|
16523
|
-
index.h("div", { key: '
|
|
16524
|
-
index.h("div", { key: '
|
|
16525
|
-
index.h("div", { key: '
|
|
16526
|
-
index.h("div", { key: '
|
|
16527
|
-
index.h("div", { key: '
|
|
16528
|
-
index.h("div", { key: '
|
|
16717
|
+
index.h("div", { key: 'd9e8be5e8b34f7f4a8a0434703bee6e157be1b63', class: "sk-spinner-v7-dot" }),
|
|
16718
|
+
index.h("div", { key: 'b1bdcad24453ff4f730b7c58af9f3f1f495a6eff', class: "sk-spinner-v7-dot" }),
|
|
16719
|
+
index.h("div", { key: 'da867e6a2d4a56b0bf5bddc134ed1027136ba064', class: "sk-spinner-v7-dot" }),
|
|
16720
|
+
index.h("div", { key: '82b30c602d8d4febbaf061c033ddc7e22642affc', class: "sk-spinner-v7-dot" }),
|
|
16721
|
+
index.h("div", { key: 'ffcdea64b3b4f0063444413c43349c35448ccfa2', class: "sk-spinner-v7-dot" }),
|
|
16722
|
+
index.h("div", { key: '3bf58b200418d7b3614a8e4ad9f10ca2f795aede', class: "sk-spinner-v7-dot" }),
|
|
16529
16723
|
];
|
|
16530
16724
|
}
|
|
16531
16725
|
if (this.layout === 9) {
|
|
16532
16726
|
spinnerEl = [
|
|
16533
|
-
index.h("div", { key: '
|
|
16534
|
-
index.h("div", { key: '
|
|
16727
|
+
index.h("div", { key: '7eb08ef8b31172fe3ba643aaa449ab5419e269ed', class: "sk-spinner-v9-bounce1" }),
|
|
16728
|
+
index.h("div", { key: 'd2b116c1526eb2a94dcbfa929e871809d3d3748f', class: "sk-spinner-v9-bounce2" }),
|
|
16535
16729
|
];
|
|
16536
16730
|
}
|
|
16537
16731
|
if (this.layout === 10) {
|
|
16538
16732
|
spinnerEl = [
|
|
16539
|
-
index.h("div", { key: '
|
|
16540
|
-
index.h("div", { key: '
|
|
16733
|
+
index.h("div", { key: '620f68c389d59a6a6cd4e1c6c29a6c2e9e7c55d8', class: "sk-spinner-v10-cube1" }),
|
|
16734
|
+
index.h("div", { key: '43da427d8379ee798eca33aa989fc53ca9edf6db', class: "sk-spinner-v10-cube2" }),
|
|
16541
16735
|
];
|
|
16542
16736
|
}
|
|
16543
16737
|
if (this.layout === 12) {
|
|
16544
16738
|
spinnerEl = [
|
|
16545
|
-
index.h("div", { key: '
|
|
16546
|
-
index.h("div", { key: '
|
|
16739
|
+
index.h("div", { key: '29628c208192c8e5a99f3aa1ca56770ec1271a51', class: "sk-spinner-v12-dot1" }),
|
|
16740
|
+
index.h("div", { key: '9bbab46f67ad2aad4779b0a403c32ca0a2972edf', class: "sk-spinner-v12-dot2" }),
|
|
16547
16741
|
];
|
|
16548
16742
|
}
|
|
16549
16743
|
if (this.layout === 13) {
|
|
16550
16744
|
spinnerEl = [
|
|
16551
|
-
index.h("div", { key: '
|
|
16552
|
-
index.h("div", { key: '
|
|
16553
|
-
index.h("div", { key: '
|
|
16554
|
-
index.h("div", { key: '
|
|
16555
|
-
index.h("div", { key: '
|
|
16556
|
-
index.h("div", { key: '
|
|
16557
|
-
index.h("div", { key: '
|
|
16558
|
-
index.h("div", { key: '
|
|
16559
|
-
index.h("div", { key: '
|
|
16745
|
+
index.h("div", { key: '7efa860923505f7285b5dbb58180b1a376aab300', class: "sk-spinner-v13-cube sk-spinner-v13-cube1" }),
|
|
16746
|
+
index.h("div", { key: '40550163fc379434f79e747fbd1bdfe53bc40fab', class: "sk-spinner-v13-cube sk-spinner-v13-cube2" }),
|
|
16747
|
+
index.h("div", { key: 'fddd2cf238b07e29c4a0cf61bc317434f6a11381', class: "sk-spinner-v13-cube sk-spinner-v13-cube3" }),
|
|
16748
|
+
index.h("div", { key: '198d810b5dde8b84c0a70b92fc5d1119fa1e9252', class: "sk-spinner-v13-cube sk-spinner-v13-cube4" }),
|
|
16749
|
+
index.h("div", { key: 'bf20ad081cb99c617bf341ab84562f7ff110c8eb', class: "sk-spinner-v13-cube sk-spinner-v13-cube5" }),
|
|
16750
|
+
index.h("div", { key: '947e8bd99e74f891424083c166741437a0523049', class: "sk-spinner-v13-cube sk-spinner-v13-cube6" }),
|
|
16751
|
+
index.h("div", { key: '9dfa58ef83f77871115c61956832b2c77e6f2b58', class: "sk-spinner-v13-cube sk-spinner-v13-cube7" }),
|
|
16752
|
+
index.h("div", { key: 'a0479158ef8e2cb8116ab5e04f62369f9234cb8c', class: "sk-spinner-v13-cube sk-spinner-v13-cube8" }),
|
|
16753
|
+
index.h("div", { key: '6d17905bd8f29755faa1f06b906f6038df60de39', class: "sk-spinner-v13-cube sk-spinner-v13-cube9" }),
|
|
16560
16754
|
];
|
|
16561
16755
|
}
|
|
16562
16756
|
if (this.layout === 14) {
|
|
16563
16757
|
spinnerEl = [
|
|
16564
|
-
index.h("div", { key: '
|
|
16565
|
-
index.h("div", { key: '
|
|
16566
|
-
index.h("div", { key: '
|
|
16567
|
-
index.h("div", { key: '
|
|
16568
|
-
index.h("div", { key: '
|
|
16569
|
-
index.h("div", { key: '
|
|
16570
|
-
index.h("div", { key: '
|
|
16571
|
-
index.h("div", { key: '
|
|
16572
|
-
index.h("div", { key: '
|
|
16573
|
-
index.h("div", { key: '
|
|
16574
|
-
index.h("div", { key: '
|
|
16575
|
-
index.h("div", { key: '
|
|
16758
|
+
index.h("div", { key: 'c7c54b017299889f97ffac724cc854df2f785d8d', class: "sk-spinner-v14-circle1 sk-spinner-v14-circle" }),
|
|
16759
|
+
index.h("div", { key: '6e0c491f023fa53aff13de97c536db976f8ad807', class: "sk-spinner-v14-circle2 sk-spinner-v14-circle" }),
|
|
16760
|
+
index.h("div", { key: '3eb9618dded82002c896955322102ab1c5edbed0', class: "sk-spinner-v14-circle3 sk-spinner-v14-circle" }),
|
|
16761
|
+
index.h("div", { key: 'ca5f55fc315d180e9df0d8a6bf7c0df52f9bc4fd', class: "sk-spinner-v14-circle4 sk-spinner-v14-circle" }),
|
|
16762
|
+
index.h("div", { key: 'f653627358a0d717dd109a44e9c2be5e0b42be16', class: "sk-spinner-v14-circle5 sk-spinner-v14-circle" }),
|
|
16763
|
+
index.h("div", { key: 'bbbca5db1d1885a88dd372619e45c9e213068408', class: "sk-spinner-v14-circle6 sk-spinner-v14-circle" }),
|
|
16764
|
+
index.h("div", { key: 'a685096d2c0c3bd0638b4efe18f267564afcc167', class: "sk-spinner-v14-circle7 sk-spinner-v14-circle" }),
|
|
16765
|
+
index.h("div", { key: '34d89964e41b9520d018f98f32ce6888864f2117', class: "sk-spinner-v14-circle8 sk-spinner-v14-circle" }),
|
|
16766
|
+
index.h("div", { key: '34e25080ba83cb4e382e45b8d74dd8805bc00bf9', class: "sk-spinner-v14-circle9 sk-spinner-v14-circle" }),
|
|
16767
|
+
index.h("div", { key: 'e2e454f8caa409d13743b4d526f9997a38b98bb7', class: "sk-spinner-v14-circle10 sk-spinner-v14-circle" }),
|
|
16768
|
+
index.h("div", { key: '31b2eabb2b348b0a8c3e6bb46e130a22c73371b4', class: "sk-spinner-v14-circle11 sk-spinner-v14-circle" }),
|
|
16769
|
+
index.h("div", { key: '6e05dfc6d58ec29ededbd3ffdbdddc3984c6345c', class: "sk-spinner-v14-circle12 sk-spinner-v14-circle" }),
|
|
16576
16770
|
];
|
|
16577
16771
|
}
|
|
16578
16772
|
}
|
|
@@ -16591,7 +16785,7 @@ const KupSpinner = class {
|
|
|
16591
16785
|
else {
|
|
16592
16786
|
elStyle = Object.assign(Object.assign({}, elStyle), { fontSize: '3px' });
|
|
16593
16787
|
}
|
|
16594
|
-
return (index.h(index.Host, { key: '
|
|
16788
|
+
return (index.h(index.Host, { key: '3c4ecb099a610627191bdb34a40c1b44d4a769b6', style: elStyle }, index.h("style", { key: 'c89628f8825d7cbc22b64cdeb1707baaae8d1d38' }, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { key: '3fd5ecca92397a1cc5b0c2dbc3843fe1403c1f42', id: GenericVariables.componentWrapperId, style: elStyle }, index.h("div", { key: 'f6dc141c459cc87da063c4f03c0609b1c295988b', id: "loading-wrapper-master", class: masterClass, style: elStyle }, index.h("div", { key: 'acb6bd40542676fb484e7ceb0e15fd6164401fc9', id: wrapperClass, style: elStyle }, index.h("div", { key: '3ae4b174167a0a8a07127d5e85d95438434c091a', class: spinnerClass }, spinnerEl))))));
|
|
16595
16789
|
}
|
|
16596
16790
|
disconnectedCallback() {
|
|
16597
16791
|
this.kupManager.theme.unregister(this);
|
|
@@ -16739,7 +16933,7 @@ const KupSwitch = class {
|
|
|
16739
16933
|
onChange: () => this.onKupChange(),
|
|
16740
16934
|
onFocus: () => this.onKupFocus(),
|
|
16741
16935
|
};
|
|
16742
|
-
return (index.h(index.Host, { key: '
|
|
16936
|
+
return (index.h(index.Host, { key: '2a170b39ec9bd03dd5c389f9eed702212ccc2825' }, index.h("style", { key: '6939e9e63441086335c0ce728bd3327e1c913411' }, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { key: '5a814af6cdce48541f7010282e89c0b7d2390cbb', id: GenericVariables.componentWrapperId }, index.h(fCell.FSwitch, Object.assign({ key: 'ef96c77675c6b65723061bf525f0f7e321e64b01' }, props)))));
|
|
16743
16937
|
}
|
|
16744
16938
|
disconnectedCallback() {
|
|
16745
16939
|
this.kupManager.theme.unregister(this);
|
|
@@ -17859,7 +18053,7 @@ const KupTimePicker = class {
|
|
|
17859
18053
|
this.kupManager.debug.logRender(this, true);
|
|
17860
18054
|
}
|
|
17861
18055
|
render() {
|
|
17862
|
-
return (index.h(index.Host, { key: '
|
|
18056
|
+
return (index.h(index.Host, { key: 'dffe33755a510ef42a3ed226b9f2e47724ccb37f' }, index.h("style", { key: '9ca27904a2544e8bb01d43627b4e6289963fd0ab' }, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { key: 'cff01fdcd8fdf77c1c047ad38e0e52009a907ab3', id: GenericVariables.componentWrapperId }, this.prepTextfield(this.getTimeForOutput()))));
|
|
17863
18057
|
}
|
|
17864
18058
|
disconnectedCallback() {
|
|
17865
18059
|
this.kupManager.dates.unregister(this);
|
|
@@ -19570,6 +19764,7 @@ exports.kup_data_table = KupDataTable;
|
|
|
19570
19764
|
exports.kup_date_picker = KupDatePicker;
|
|
19571
19765
|
exports.kup_dialog = KupDialog;
|
|
19572
19766
|
exports.kup_dropdown_button = KupDropdownButton;
|
|
19767
|
+
exports.kup_file_upload = KupFileUpload;
|
|
19573
19768
|
exports.kup_form = KupForm;
|
|
19574
19769
|
exports.kup_gauge = KupGauge;
|
|
19575
19770
|
exports.kup_image = KupImage;
|