@sme.up/ketchup 10.3.2 → 10.3.4
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-7a2faf7a.js → f-cell-2d3d1fb1.js} +17 -9
- package/dist/cjs/{f-chip-f2d6124b.js → f-chip-9ac0d065.js} +11 -2
- package/dist/cjs/{f-object-field-3810f288.js → f-object-field-e0c83ebd.js} +2 -2
- package/dist/cjs/{f-paginator-utils-3855e84c.js → f-paginator-utils-d61b2fc7.js} +1 -1
- package/dist/cjs/{f-text-field-a34a5979.js → f-text-field-6c373c74.js} +1 -1
- package/dist/cjs/index-c7d441d8.js +2 -6
- 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_29.cjs.entry.js → kup-autocomplete_30.cjs.entry.js} +1505 -1076
- package/dist/cjs/kup-box.cjs.entry.js +8 -8
- 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 +5 -5
- 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-f53032e7.js → kup-data-table-helper-f4e3958d.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 +44 -34
- package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
- 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-input-panel.cjs.entry.js +22 -13
- 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-c70d3188.js → kup-manager-587e54f5.js} +13 -4
- 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 +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/editor-example-1.js +27 -0
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +54 -8
- package/dist/collection/components/kup-box/kup-box.css +19 -3
- package/dist/collection/components/kup-chip/kup-chip.js +6 -4
- package/dist/collection/components/kup-combobox/kup-combobox.js +23 -1
- package/dist/collection/components/kup-data-table/kup-data-table.css +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +48 -27
- package/dist/collection/components/kup-editor/kup-editor-declarations.js +1 -1
- package/dist/collection/components/kup-editor/kup-editor.js +44 -34
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +2 -2
- package/dist/collection/components/kup-file-upload/kup-file-upload.js +2 -2
- 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.css +4 -0
- package/dist/collection/components/kup-image-list/kup-image-list.js +68 -7
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +18 -8
- 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-tree/kup-tree.js +7 -7
- package/dist/collection/components/kup-txt/kup-txt.js +1 -1
- package/dist/collection/components/kup-typography/kup-typography.js +2 -2
- package/dist/collection/components/kup-typography-list/kup-typography-list.js +1 -1
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +2 -0
- package/dist/collection/f-components/f-cell/f-cell.js +13 -5
- package/dist/collection/f-components/f-chip/f-chip-declarations.js +1 -0
- package/dist/collection/f-components/f-chip/f-chip.js +8 -2
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +2 -2
- package/dist/collection/managers/kup-data/kup-data-declarations.js +5 -0
- package/dist/collection/managers/kup-data/kup-data.js +2 -0
- package/dist/collection/utils/filters/filters.js +1 -1
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +3 -4
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +25 -20
- package/dist/components/kup-activity-timeline.js +25 -20
- 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 +25 -20
- package/dist/components/kup-card-list.js +27 -22
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +25 -20
- 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 +25 -20
- 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 +25 -20
- 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 +29 -24
- package/dist/components/kup-file-upload.js +1 -1
- 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 +26 -21
- package/dist/components/kup-iframe.js +25 -20
- package/dist/components/kup-image-list.js +1 -565
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +44 -30
- package/dist/components/kup-lazy.js +36 -31
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +32 -27
- package/dist/components/kup-nav-bar.js +26 -21
- package/dist/components/kup-numeric-picker.js +26 -21
- package/dist/components/kup-object-field.js +26 -21
- package/dist/components/kup-pdf.js +26 -21
- package/dist/components/kup-planner-renderer.js +1 -1
- package/dist/components/kup-planner.js +47 -42
- package/dist/components/kup-probe.js +26 -21
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +26 -21
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +26 -21
- 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 +26 -21
- package/dist/components/kup-typography-list.js +26 -21
- package/dist/components/kup-typography.js +27 -22
- package/dist/components/kup-vertical-scroll.js +1 -1
- package/dist/components/{p-c325da75.js → p-0ca0b3b7.js} +2 -2
- package/dist/components/{p-de04aef6.js → p-1ac3dd8e.js} +15 -15
- package/dist/components/{p-d0e33e04.js → p-206f0986.js} +13 -13
- package/dist/components/{p-6992b96f.js → p-28774fba.js} +4 -4
- package/dist/components/{p-6bfda249.js → p-33cf89e0.js} +1 -1
- package/dist/components/{p-8472facf.js → p-34ed7a73.js} +2 -2
- package/dist/components/{p-a22e5ee4.js → p-36397daa.js} +25 -20
- package/dist/components/{p-0e85ab66.js → p-394a36af.js} +3 -3
- package/dist/components/{p-55542b47.js → p-46ec5845.js} +1 -1
- package/dist/components/{p-3ba7c133.js → p-4b555010.js} +26 -21
- package/dist/components/{p-c7c7f760.js → p-57a120a5.js} +1 -1
- package/dist/components/{p-3b4cdace.js → p-7aa9d49d.js} +7 -7
- package/dist/components/{p-55fda958.js → p-9b35cce9.js} +1361 -588
- package/dist/components/{p-286915d4.js → p-ad93796a.js} +25 -20
- package/dist/components/{p-97053b4d.js → p-af0a6cfe.js} +2 -2
- package/dist/components/{p-9859e801.js → p-af2d3d26.js} +14 -5
- package/dist/components/{p-f2e153e3.js → p-b87bd975.js} +5 -5
- package/dist/components/{p-d7136d08.js → p-d3a8c2ba.js} +2 -2
- package/dist/components/{p-bd3047ee.js → p-daa07bb7.js} +1 -1
- package/dist/components/{p-7bdb5142.js → p-f976f7ae.js} +69 -54
- package/dist/esm/{f-cell-ae0c965d.js → f-cell-e08c0b3c.js} +17 -9
- package/dist/esm/{f-chip-29242e70.js → f-chip-a030d384.js} +11 -2
- package/dist/esm/{f-object-field-75069ac2.js → f-object-field-badf11fe.js} +2 -2
- package/dist/esm/{f-paginator-utils-212f93c3.js → f-paginator-utils-e1e23a7e.js} +1 -1
- package/dist/esm/{f-text-field-ebe023fb.js → f-text-field-188fd143.js} +1 -1
- package/dist/esm/index-9b0f4a0d.js +2 -6
- 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_29.entry.js → kup-autocomplete_30.entry.js} +1505 -1077
- package/dist/esm/kup-box.entry.js +8 -8
- 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 +5 -5
- 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-ca11e6e9.js → kup-data-table-helper-1c128c4b.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 +44 -34
- package/dist/esm/kup-family-tree.entry.js +3 -3
- 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-input-panel.entry.js +22 -13
- package/dist/esm/kup-lazy.entry.js +12 -12
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-63a8048f.js → kup-manager-fbf034b0.js} +14 -5
- 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 +3 -3
- 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-00e65c8b.entry.js +1 -0
- package/dist/ketchup/p-0b47c2e3.js +1 -0
- package/dist/ketchup/{p-6f1dec16.entry.js → p-100446c4.entry.js} +1 -1
- package/dist/ketchup/{p-b91e3bae.entry.js → p-14b668f6.entry.js} +1 -1
- package/dist/ketchup/{p-fb7c0958.entry.js → p-14e878e9.entry.js} +1 -1
- package/dist/ketchup/{p-c8cd012e.entry.js → p-15c1ed53.entry.js} +1 -1
- package/dist/ketchup/{p-260587c5.entry.js → p-19de01e7.entry.js} +1 -1
- package/dist/ketchup/{p-bc789017.entry.js → p-2032b357.entry.js} +1 -1
- package/dist/ketchup/{p-a2d40711.entry.js → p-4bef80af.entry.js} +1 -1
- package/dist/ketchup/{p-e705eb4a.js → p-515c59b6.js} +1 -1
- package/dist/ketchup/{p-9baa1d6d.entry.js → p-58196a26.entry.js} +1 -1
- package/dist/ketchup/{p-11e54526.entry.js → p-5bdc3f74.entry.js} +1 -1
- package/dist/ketchup/{p-7dfc42f0.entry.js → p-64c7546a.entry.js} +1 -1
- package/dist/ketchup/{p-8ba1d444.entry.js → p-66b6d56b.entry.js} +1 -1
- package/dist/ketchup/{p-fe42ae2d.entry.js → p-6782ea5b.entry.js} +1 -1
- package/dist/ketchup/p-679a76b6.entry.js +8 -0
- package/dist/ketchup/{p-610faea9.js → p-69c806c5.js} +1 -1
- package/dist/ketchup/{p-434f2c39.entry.js → p-6e4e479b.entry.js} +1 -1
- package/dist/ketchup/p-6fe18ae9.js +1 -0
- package/dist/ketchup/p-7b5c4ec1.entry.js +1 -0
- package/dist/ketchup/{p-eb090acd.entry.js → p-83d15d86.entry.js} +2 -2
- package/dist/ketchup/{p-e7293ae8.entry.js → p-85835e52.entry.js} +1 -1
- package/dist/ketchup/{p-43f12940.entry.js → p-8ee44f57.entry.js} +1 -1
- package/dist/ketchup/{p-5bf3d60d.entry.js → p-8fad681d.entry.js} +1 -1
- package/dist/ketchup/{p-f87b7768.entry.js → p-91743bb0.entry.js} +1 -1
- package/dist/ketchup/{p-9b200a90.entry.js → p-982d4b01.entry.js} +1 -1
- package/dist/ketchup/{p-8610d5b5.js → p-a9a2f8c7.js} +3 -3
- package/dist/ketchup/{p-3533879b.entry.js → p-af99fb41.entry.js} +1 -1
- package/dist/ketchup/{p-4677cfd1.entry.js → p-b71d58a8.entry.js} +1 -1
- package/dist/ketchup/{p-81743364.entry.js → p-bf3bbbe5.entry.js} +1 -1
- package/dist/ketchup/p-c3595114.js +1 -0
- package/dist/ketchup/{p-d84e4e90.entry.js → p-d52f2836.entry.js} +1 -1
- package/dist/ketchup/{p-7b326bde.entry.js → p-ddfe8edb.entry.js} +1 -1
- package/dist/ketchup/{p-6c41cd20.entry.js → p-e4687067.entry.js} +1 -1
- package/dist/ketchup/{p-6b529a6f.entry.js → p-ec382a7d.entry.js} +2 -2
- package/dist/ketchup/{p-4365fbd3.entry.js → p-f17369c3.entry.js} +3 -3
- package/dist/ketchup/{p-da694791.js → p-f6eba414.js} +1 -1
- package/dist/ketchup/{p-b6beace3.entry.js → p-f738c370.entry.js} +1 -1
- package/dist/ketchup/{p-b068a383.entry.js → p-fe3f5f09.entry.js} +1 -1
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +6 -1
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +4 -0
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +1 -1
- package/dist/types/components/kup-editor/kup-editor-declarations.d.ts +2 -2
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +12 -0
- package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +1 -4
- package/dist/types/components.d.ts +39 -1
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +3 -1
- package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +3 -0
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +5 -1
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +2 -2
- package/package.json +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +0 -404
- package/dist/esm/kup-image-list.entry.js +0 -400
- package/dist/ketchup/p-102d35b1.js +0 -1
- package/dist/ketchup/p-4a64f9f2.entry.js +0 -1
- package/dist/ketchup/p-4cfa35bc.js +0 -1
- package/dist/ketchup/p-5d28e8e0.entry.js +0 -8
- package/dist/ketchup/p-7375d456.js +0 -1
- package/dist/ketchup/p-93541362.entry.js +0 -1
- package/dist/ketchup/p-fb82cad9.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,H as t,D as n,ah as l,x as o,z as r,ai as i,aj as s,N as a,O as u,F as c,ak as f,al as h,am as d,an as b,ao as m,a7 as p}from"./p-8610d5b5.js";import{K as v}from"./p-1ee561ba.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,n){let l="";if(null==e)return l;let o=e[t];return null==o||(l=n?o.textFieldTmp:o.textField),l}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,n){if(!t)return!1;let l=this._getTextFilterValue(e,t.name,n);if(null!=l&&""!=l.trim())return!0;let o=this.getCheckBoxFilterValues(e,t.name);return!(null==o||o.length<1)}getCheckBoxFilterValues(e={},t){let n=[];if(null==e)return n;let l=e[t];return null==l||null==l.checkBoxes||(n=l.checkBoxes),n}addCheckboxFilter(t={},n,l){if(null==t)return;let o=t[n];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},t[n]=o),null==o.checkBoxes&&(o.checkBoxes=[]),null==l||null==l.value?o.checkBoxes=[]:e.valuesArrayContainsValue(o.checkBoxes,l.value)||(o.checkBoxes[o.checkBoxes.length]=l)}removeCheckboxFilter(e={},t,n){var l;if(!e||null==n||!e[t])return;const o=e[t];o.checkBoxes=null!==(l=o.checkBoxes)&&void 0!==l?l:[],o.checkBoxes=o.checkBoxes.filter((e=>e.value!==n)),0===o.checkBoxes.length&&delete e[t]}isColumnNumeric(e){return this.isObjNumeric(e.obj)}setTextFieldFilterValue(e={},t,n){this._setTextFieldFilterValue(e,t,n,!0)}_setTextFieldFilterValue(e={},t,n,l){if(null==e)return;let o=e[t];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},e[t]=o),l?o.textFieldTmp=null!=n?n.trim():n:o.textField=null!=n?n.trim():n}saveTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0)}getFilterValueForTooltip(e={},l){let o=this.getTextFilterValue(e,l.name),r=this.getCheckBoxFilterValues(e,l.name),i="",s=t(o,l.obj,l.decimals);""!=o&&(i=" AND "),i="";let a="";return r.forEach((e=>{a+=i+n(e,l),i=" OR "})),""!=a&&(a="("+a+")",""!=s&&(a=" AND "+a)),a=s+a,a}removeFilter(e={},t){delete e[t]}}var F;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(F||(F={}));const x="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const j=document.documentElement,k=j.ketchup?j.ketchup.objects:new r,O=j.ketchup?j.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t,n){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,n)}isFilterCompliantForCellObj(e,t,n){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,n)}isRowCompliant(e,t={},n="",l=!1,o=[],r,i){return this.areCellsCompliant(e.cells,t,n,l,o,r,i)}areCellsCompliant(e,t={},n="",r=!1,i=[],s,a){if(r){let t=!0;if(i&&null!=i&&i.length>0){t=!1;let o=this.filterIsNegative(n);for(let s=0;s<i.length;s++){if(!1===i[s].visible&&!a||(null==a?void 0:a.length)>0&&!a.includes(i[s].name))continue;const u=e[i[s].name];if(null==u)continue;t=this.isFilterCompliantForValue(u.value,n,r);let c=l(i[s],u);if(c!=u.value&&(t=t||this.isFilterCompliantForValue(c,n,r)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}return null==s&&(s=new w),!this.hasFilters(t,i,s)||Object.keys(t).every((n=>{const l=e[n],r=o(i,n);if(!l)return!1;let a=s.getTextFilterValue(t,n),u=s.getCheckBoxFilterValues(t,n);const c=this.filterIsNegative(a);let f=""!==a&&this.isFilterCompliantForCell(l,a,!0)||u.some((e=>this.isFilterCompliantForCell(l,e.value)))||u.some((e=>this.isFilterCompliantForCell(l,e.displayedValue)))||!s.hasFiltersForColumn(t,r),h=c;return k.isNumber(l.obj)||k.isDate(l.obj)||k.isTime(l.obj)||k.isTimestamp(l.obj)||(h=""!==a&&this.isFilterCompliantForCellObj(l,a,!0)||u.some((e=>this.isFilterCompliantForCellObj(l,e.value)))||!s.hasFiltersForColumn(t,r)),c?f&&h:f||h}))}hasFilters(e={},t,n){if(null==e)return!1;let l=Object.keys(e);if(null==l||l.length<1)return!1;null==n&&(n=new w);for(let r=0;r<l.length;r++){let i=l[r],s=null;if(s=i===x?{name:x,title:""}:o(t,i),n.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},n="",l=[],o,r){if(!e||null==e)return[];let i=[];const s=!(!n||!l);if(this.hasFilters(t,l,o)||s)for(let a=0;a<e.length;a++){let u=e[a];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,s,l,o,r))&&(i[i.length]=u)}else i=[...e];return i}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),a=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(a,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let u=Object.assign({},n.filters);u[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),u,o,n.getVisibleColumns(),r);for(let e=0;e<a.length;e++)i.push(a[e]);return O.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r,i){return null==r&&(r=new y),r.filterRows(e,t,n,l,o,i)}function N(e=[],t=[],n=[],r={}){if(!t)return[];if(!n||0===n.length||!e||0===e.length)return t;const i={},s=n.filter((({column:t})=>{for(let{name:n,title:l}of e)if(n===t)return i[n]=l,!0;return!1}));if(0===s.length)return t;const u=[];let c={};return t.forEach((t=>{const n=s[0].column,f=t.cells[n];if(f){const h=o(e,n),d=l(h,f),b=f.value;let m=null;for(let e of u)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:n,columnLabel:i[n],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},u.push(m));for(let n=1;n<s.length;n++){const r=s[n],a=t.cells[r.column];if(a){const t=o(e,r.column),n=l(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===n){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:a.obj}},L(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case a.COUNT:let t=e.group.totals[o]||0;e.group.totals[o]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[o]||0;s.group.totals[o]=++e,s=s.group.parent}break;case a.DISTINCT:let u;if(u=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(u):(l[e.group.id][o]=[],l[e.group.id][o].push(u))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(u);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(u):(l[c.group.id][o]=[],l[c.group.id][o].push(u))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(u);c=c.group.parent}break;case a.SUM:case a.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case a.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;case a.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(a.MATH)&&console.warn(`invalid total mode: ${i}`)}}}))}(m,r,t,c)}})),function(e,t,n){if(!e||!t)return;const l=Object.keys(t);if(0===e.length||!e[0].group||0===l.length)return;let o=l.filter((e=>a.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,o,n)))}(u,r,c),W(u,a.AVERAGE,r),W(u,a.MATH,r),u}function W(e,t,n){if(!e||!n)return;const l=Object.keys(n);if(0===e.length||!e[0].group||0===l.length)return;let o;t==a.AVERAGE&&(o=l.filter((e=>a.AVERAGE===n[e]))),t==a.MATH&&(o=l.filter((e=>0==n[e].indexOf(a.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,o,n)))}function D(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{D(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function E(e,t,n,l){const o=e.group.children;if(0===o.length)return 0;let r=0;return o[0].group?o.forEach((e=>{r+=E(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==a.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==a.MATH){let t=l[n].substring(a.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function A(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p,k:n.value})}}))})),n}}function B(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===a.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(a.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===a.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(u(a.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],a=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=_(s.group.children,a.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=a)}else o>=n&&(t[t.length]=a,r=!0),o++;if(o>=n+l)break}return{ci:o,added:r}}function R(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:I(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function z(e){if(null==e)return null;let t=[];for(let n=0;n<e.length;n++)t[t.length]=R(e[n]);return t}function I(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:z(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function $(e,t,n=!1){const l={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const o of t.rows){const t={cells:{},id:o.id};for(const n of l.columns){const l=n.name,r=o.cells[l],i=e.rows.find((e=>e.id===o.id)),s=i?i.cells[l]:null;(!s&&r.value||s&&r.value!==s.value)&&(t.cells[l]=r)}(Object.keys(t.cells).length>0||n)&&l.rows.push(t)}return l}function q(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var n;let l=e.cells[t];const o=l.value,r=l.decode,i=l.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const s={[c.AUTOCOMPLETE]:()=>f(o,"",i),[c.COMBOBOX]:()=>f(o,"",i),[c.RADIO]:()=>h(o,i),[c.CHECKBOX]:()=>d(o,""),[c.CHIP]:()=>b(o,r),[c.SWITCH]:()=>m(o,""),[c.MULTI_AUTOCOMPLETE]:()=>b(o,r),[c.MULTI_COMBOBOX]:()=>b(o,r)}[l.shape];s&&(l.data=Object.assign(Object.assign({},s()),l.data))}))}))}export{w as F,g as K,y as a,N as b,B as c,q as d,F as e,M as f,$ as g,A as n,S as p,C as s,x as t}
|
|
1
|
+
import{E as e,H as t,D as n,ai as l,x as o,z as r,aj as i,ak as s,N as a,O as u,F as c,al as f,am as h,an as d,ao as b,ap as m,a8 as p}from"./p-a9a2f8c7.js";import{K as v}from"./p-1ee561ba.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,n){let l="";if(null==e)return l;let o=e[t];return null==o||(l=n?o.textFieldTmp:o.textField),l}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,n){if(!t)return!1;let l=this._getTextFilterValue(e,t.name,n);if(null!=l&&""!=l.trim())return!0;let o=this.getCheckBoxFilterValues(e,t.name);return!(null==o||o.length<1)}getCheckBoxFilterValues(e={},t){let n=[];if(null==e)return n;let l=e[t];return null==l||null==l.checkBoxes||(n=l.checkBoxes),n}addCheckboxFilter(t={},n,l){if(null==t)return;let o=t[n];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},t[n]=o),null==o.checkBoxes&&(o.checkBoxes=[]),null==l||null==l.value?o.checkBoxes=[]:e.valuesArrayContainsValue(o.checkBoxes,l.value)||(o.checkBoxes[o.checkBoxes.length]=l)}removeCheckboxFilter(e={},t,n){var l;if(!e||null==n||!e[t])return;const o=e[t];o.checkBoxes=null!==(l=o.checkBoxes)&&void 0!==l?l:[],o.checkBoxes=o.checkBoxes.filter((e=>e.value!==n)),0===o.checkBoxes.length&&delete e[t]}isColumnNumeric(e){return this.isObjNumeric(e.obj)}setTextFieldFilterValue(e={},t,n){this._setTextFieldFilterValue(e,t,n,!0)}_setTextFieldFilterValue(e={},t,n,l){if(null==e)return;let o=e[t];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},e[t]=o),l?o.textFieldTmp=null!=n?n.trim():n:o.textField=null!=n?n.trim():n}saveTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0)}getFilterValueForTooltip(e={},l){let o=this.getTextFilterValue(e,l.name),r=this.getCheckBoxFilterValues(e,l.name),i="",s=t(o,l.obj,l.decimals);""!=o&&(i=" AND "),i="";let a="";return r.forEach((e=>{a+=i+n(e,l),i=" OR "})),""!=a&&(a="("+a+")",""!=s&&(a=" AND "+a)),a=s+a,a}removeFilter(e={},t){delete e[t]}}var F;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(F||(F={}));const x="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const j=document.documentElement,k=j.ketchup?j.ketchup.objects:new r,O=j.ketchup?j.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t,n){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,n)}isFilterCompliantForCellObj(e,t,n){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,n)}isRowCompliant(e,t={},n="",l=!1,o=[],r,i){return this.areCellsCompliant(e.cells,t,n,l,o,r,i)}areCellsCompliant(e,t={},n="",r=!1,i=[],s,a){if(r){let t=!0;if(i&&null!=i&&i.length>0){t=!1;let o=this.filterIsNegative(n);for(let s=0;s<i.length;s++){if(!1===i[s].visible&&!a||(null==a?void 0:a.length)>0&&!a.includes(i[s].name))continue;const u=e[i[s].name];if(null==u)continue;t=this.isFilterCompliantForValue(u.value,n,r);let c=l(i[s],u);if(c!=u.value&&(t=t||this.isFilterCompliantForValue(c,n,r)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}return null==s&&(s=new w),!this.hasFilters(t,i,s)||Object.keys(t).every((n=>{const l=e[n],r=o(i,n);if(!l)return!1;let a=s.getTextFilterValue(t,n),u=s.getCheckBoxFilterValues(t,n);const c=this.filterIsNegative(a);let f=""!==a&&this.isFilterCompliantForCell(l,a,!0)||u.some((e=>this.isFilterCompliantForCell(l,e.value)))||u.some((e=>this.isFilterCompliantForCell(l,e.displayedValue)))||!s.hasFiltersForColumn(t,r),h=c;return k.isNumber(l.obj)||k.isDate(l.obj)||k.isTime(l.obj)||k.isTimestamp(l.obj)||(h=""!==a&&this.isFilterCompliantForCellObj(l,a,!0)||u.some((e=>this.isFilterCompliantForCellObj(l,e.value)))||!s.hasFiltersForColumn(t,r)),c?f&&h:f||h}))}hasFilters(e={},t,n){if(null==e)return!1;let l=Object.keys(e);if(null==l||l.length<1)return!1;null==n&&(n=new w);for(let r=0;r<l.length;r++){let i=l[r],s=null;if(s=i===x?{name:x,title:""}:o(t,i),n.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},n="",l=[],o,r){if(!e||null==e)return[];let i=[];const s=!(!n||!l);if(this.hasFilters(t,l,o)||s)for(let a=0;a<e.length;a++){let u=e[a];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,s,l,o,r))&&(i[i.length]=u)}else i=[...e];return i}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),a=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(a,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let u=Object.assign({},n.filters);u[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),u,o,n.getVisibleColumns(),r);for(let e=0;e<a.length;e++)i.push(a[e]);return O.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r,i){return null==r&&(r=new y),r.filterRows(e,t,n,l,o,i)}function N(e=[],t=[],n=[],r={}){if(!t)return[];if(!n||0===n.length||!e||0===e.length)return t;const i={},s=n.filter((({column:t})=>{for(let{name:n,title:l}of e)if(n===t)return i[n]=l,!0;return!1}));if(0===s.length)return t;const u=[];let c={};return t.forEach((t=>{const n=s[0].column,f=t.cells[n];if(f){const h=o(e,n),d=l(h,f),b=f.value;let m=null;for(let e of u)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:n,columnLabel:i[n],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},u.push(m));for(let n=1;n<s.length;n++){const r=s[n],a=t.cells[r.column];if(a){const t=o(e,r.column),n=l(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===n){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:a.obj}},L(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case a.COUNT:let t=e.group.totals[o]||0;e.group.totals[o]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[o]||0;s.group.totals[o]=++e,s=s.group.parent}break;case a.DISTINCT:let u;if(u=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(u):(l[e.group.id][o]=[],l[e.group.id][o].push(u))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(u);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(u):(l[c.group.id][o]=[],l[c.group.id][o].push(u))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(u);c=c.group.parent}break;case a.SUM:case a.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case a.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;case a.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(a.MATH)&&console.warn(`invalid total mode: ${i}`)}}}))}(m,r,t,c)}})),function(e,t,n){if(!e||!t)return;const l=Object.keys(t);if(0===e.length||!e[0].group||0===l.length)return;let o=l.filter((e=>a.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,o,n)))}(u,r,c),W(u,a.AVERAGE,r),W(u,a.MATH,r),u}function W(e,t,n){if(!e||!n)return;const l=Object.keys(n);if(0===e.length||!e[0].group||0===l.length)return;let o;t==a.AVERAGE&&(o=l.filter((e=>a.AVERAGE===n[e]))),t==a.MATH&&(o=l.filter((e=>0==n[e].indexOf(a.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,o,n)))}function D(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{D(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function E(e,t,n,l){const o=e.group.children;if(0===o.length)return 0;let r=0;return o[0].group?o.forEach((e=>{r+=E(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==a.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==a.MATH){let t=l[n].substring(a.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function A(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p,k:n.value})}}))})),n}}function B(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===a.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(a.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===a.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(u(a.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],a=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=_(s.group.children,a.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=a)}else o>=n&&(t[t.length]=a,r=!0),o++;if(o>=n+l)break}return{ci:o,added:r}}function R(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:I(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function z(e){if(null==e)return null;let t=[];for(let n=0;n<e.length;n++)t[t.length]=R(e[n]);return t}function I(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:z(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function $(e,t,n=!1){const l={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const o of t.rows){const t={cells:{},id:o.id};for(const n of l.columns){const l=n.name,r=o.cells[l],i=e.rows.find((e=>e.id===o.id)),s=i?i.cells[l]:null;(!s&&r.value||s&&r.value!==s.value)&&(t.cells[l]=r)}(Object.keys(t.cells).length>0||n)&&l.rows.push(t)}return l}function q(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var n;let l=e.cells[t];const o=l.value,r=l.decode,i=l.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const s={[c.AUTOCOMPLETE]:()=>f(o,"",i),[c.COMBOBOX]:()=>f(o,"",i),[c.RADIO]:()=>h(o,i),[c.CHECKBOX]:()=>d(o,""),[c.CHIP]:()=>b(o,r),[c.SWITCH]:()=>m(o,""),[c.MULTI_AUTOCOMPLETE]:()=>b(o,r),[c.MULTI_COMBOBOX]:()=>b(o,r)}[l.shape];s&&(l.data=Object.assign(Object.assign({},s()),l.data))}))}))}export{w as F,g as K,y as a,N as b,B as c,q as d,F as e,M as f,$ as g,A as n,S as p,C as s,x as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as n,H as o,d as a}from"./p-710d0a7d.js";import{k as p,g as s,s as h,h as f}from"./p-
|
|
1
|
+
import{r as t,c as i,f as e,h as n,H as o,d as a}from"./p-710d0a7d.js";import{k as p,g as s,s as h,h as f}from"./p-a9a2f8c7.js";import"./p-1ee561ba.js";var r;!function(t){t.buttonData="Props of the button (when isButton is set to true).",t.isButton="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.",t.src="The address the iframe should be referencing to."}(r||(r={}));const l=class{constructor(e){t(this,e),this.kupIframeError=i(this,"kup-iframe-error",6),this.kupIframeLoad=i(this,"kup-iframe-load",6),this.kupManager=p(),this.buttonData={},this.isButton=!1,this.src=void 0}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return s(this,r,t)}async refresh(){e(this)}async setProps(t){h(this,r,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){if(null!=this.src&&""!==this.src)return this.buttonData.icon||(this.buttonData.icon="open_in_new"),this.buttonData.label||(this.buttonData.label="Open in new tab"),this.isButton?n(o,{"is-button":!0},n("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()}))):n(o,{"is-iframe":!0},n("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src}));this.kupManager.debug.logMessage(this,"Resource undefined, not rendering!",f.WARNING)}get rootElement(){return a(this)}};l.style=".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:var(--kup-label-01-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:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-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}iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";export{l as kup_iframe}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,F as n}from"./p-710d0a7d.js";import{aq as a,ar as o,R as c,ad as t,f as l,ao as i,am as r,al as s,as as u,F as d,ai as p,a as b,at as k,I as v,au as f,av as m,aw as h,ax as g,ay as j,h as O}from"./p-a9a2f8c7.js";import{F as x}from"./p-c4224227.js";import{F as w}from"./p-9f9428d1.js";import{F as _,d as y}from"./p-0b47c2e3.js";import{F as C}from"./p-3cab6420.js";import{F as $}from"./p-f6eba414.js";import{F}from"./p-515c59b6.js";var I;!function(e){e.RADIO="radio",e.CHEVRON="chevron"}(I||(I={}));const E=a=>{var o;const c=!!a.columns,t=[],l=a.type||I.RADIO;for(let c=0;c<(null===(o=a.data)||void 0===o?void 0:o.length);c++){const o=a.data[c],i={radio:!0,"radio--checked":!!o.checked,"radio--disabled":!!a.disabled,[`radio--${a.type}`]:!!a.type};t.push(e("div",{class:`form-field \n ${a.leadingLabel?" form-field--align-end":""} ${a.disabled?"radio--disabled":""} ${l===I.CHEVRON?"form--chevron":""}`,onClick:a.onChange?a.onChange.bind(a.onChange,c):null},e("div",{class:i},l===I.RADIO?e("input",{class:"radio__native-control",type:"radio",name:"radio-element",value:o.value,checked:o.checked,disabled:a.disabled,onBlur:a.onBlur,onChange:e=>{a.onChange&&a.onChange(c,e),e.stopPropagation()},onFocus:a.onFocus}):e(n,null,e(C,o.checked?{resource:"check",sizeX:"14px",sizeY:"14px"}:{sizeX:"14px",sizeY:"14px",onClick:e=>{a.onChange&&a.onChange(c,e),e.stopPropagation()}})),l===I.RADIO&&e("div",{class:"radio__background"},e("div",{class:"radio__outer-circle"}),e("div",{class:"radio__inner-circle"}))),e("div",{class:"label-wrapper",onClick:e=>{a.onChange&&a.onChange(c,e),e.stopPropagation()}},l===I.CHEVRON&&e(C,{resource:o.icon,sizeX:"14px",sizeY:"14px"}),e("label",{htmlFor:"radio-element"},o.label?o.label:""),o.shortcutLabel&&e("div",{class:"shortcut"},o.shortcutLabel))))}return e("div",{class:`f-radio radio-wrapper\n ${c?"radio-wrapper-grid":""} ${a.danger?"kup-danger":""} ${a.info?"kup-info":""} ${a.secondary?"kup-secondary":""} ${a.success?"kup-success":""} ${a.warning?"kup-warning":""} ${a.wrapperClass?a.wrapperClass:""} ${a.horizontal?"kup-horizontal":""}`,style:{"--kup_radio_columns":c?`repeat(${a.columns}, 1fr)`:""}},t)},A=n=>(n.maxValue||(n.maxValue=5),e("div",{class:`f-rating ${n.disabled?"disabled":""} ${n.danger?"kup-danger":""} ${n.info?"kup-info":""} ${n.secondary?"kup-secondary":""} ${n.success?"kup-success":""} ${n.warning?"kup-warning":""} ${n.wrapperClass?n.wrapperClass:""}`},function(n){const a=[];for(let o=1;o<=n.maxValue;o++)a.push(e("span",{class:"rating",onClick:n.onClick?n.onClick.bind(n.onClick,o):null},o<=n.value?"★":"☆"));return a}(n)));var B;!function(e){e.SMALL="small",e.MEDIUM="medium"}(B||(B={}));const D=n=>{n.sizing||(n.sizing=B.MEDIUM),n.sizing.toLowerCase();const a={switch:!0,"switch--checked":n.checked,"switch--disabled":n.disabled,[`switch--${n.sizing}`]:!!n.sizing};return e("div",Object.assign({class:`f-switch ${n.danger?"kup-danger":""} ${n.info?"kup-info":""} ${n.secondary?"kup-secondary":""} ${n.success?"kup-success":""} ${n.warning?"kup-warning":""} ${n.wrapperClass?n.wrapperClass:""}`},n.dataSet,{id:n.id,title:n.title}),e("div",{class:"form-field "+(n.leadingLabel?"form-field--align-end":"")},e("div",{class:a},e("div",{class:"switch__track"}),e("div",{class:"switch__thumb-underlay"},e("div",{class:"switch__thumb"},e("input",{type:"checkbox",class:"switch__native-control",role:"switch",checked:n.checked,disabled:n.disabled,value:n.checked?"on":"off",onBlur:n.onBlur,onChange:n.onChange,onFocus:n.onFocus})))),e("label",{onClick:n.onChange},n.label)))},N={"*BOLD":"font-weight: bold; !important;","*ERROR":"color: white !important; background: red !important;","*UNDERLINE":"text-decoration: underline !important;","*ITALIC":"font-style: italic !important;"};function z(e){let n;switch(e){case"0":n="color: #000000 !important;";break;case"1":n="color: #6C7A89 !important;";break;case"2":n="color: #3A539B !important;";break;case"3":n="color: var(--kup-danger-color-60) !important;";break;case"4":n="color: #C0C0C0 !important;";break;case"5":n="color: #FFFFFF !important;";break;case"6":n="color: var(--kup-success-color-60) !important;";break;case"7":n="color: #9B59B6 !important;";break;default:n=""}return n}function R(e){let n;switch(e){case"1":n="font-weight: bold !important;";break;case"2":n="font-style: italic !important;";break;case"3":n="text-decoration: underline !important;";break;default:n=""}return n}function K(e){let n;switch(e){case"0":n="background: transparent;";break;case"1":n="background: #D5ECF7;";break;case"2":n="background: #59ABE3;";break;case"3":n="background: #446CB3;";break;case"4":n="background: #9B59B6;";break;case"5":n="background: #F1A9A0;";break;case"6":n="background: #E74C3C;";break;case"7":n="background: #CF000F;";break;case"8":n="background: #C0392B;";break;case"9":n="background: #95A5A6;";break;case"A":n="background: #F5D76E;";break;case"B":case"C":n="background: #F7CA18;";break;case"D":n="background: #F39C12;";break;case"E":n="background: #90C695;";break;case"F":n="background: #26A65B;";break;case"G":n="background: #019875;";break;case"H":n="background: #36D7B7;";break;default:n=""}return n}function L(e){let n;switch(e){case"1":n='font-family: "Courier New", Courier, monospace !important;';break;case"2":n='font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif !important;';break;case"3":n="font-family: Arial, Helvetica, sans-serif !important;";break;default:n=""}return n}const M=({text:a,classes:o})=>{const c=function(e){const n=[];let a=null;return function(e,n){const a=/((_G\d{2}[A-Z0-9]\d{2}_|_G\*(BOLD|ERROR|ITALIC|UNDERLINE)_)|_n_)/g;let o,c=0;for(;null!==(o=a.exec(e));)o.index>c&&n.onContent(e.slice(c,o.index)),"_n_"===o[1]?n.onEndTag(o[1]):n.onStartTag(o[2]),c=a.lastIndex;c<e.length&&n.onContent(e.slice(c))}(e,{onStartTag(e){(null==a?void 0:a.tag)&&(a.closed=!0),n.push(a={tag:e,content:""})},onEndTag(e){a?a.tag?(a.closed=!0,a=null):this.onContent(e):n.push(a={content:e})},onContent(e){a?a.content+=e:n.push(a={content:e})}}),a&&a.tag&&(a.closed=!0),n}(a);return c.find((e=>void 0!==e.tag))?e("span",{class:o},function(n){return n.map((n=>{var a,o;const c=function(e){const n=function(e){let n="";if((null==e?void 0:e.match(/\d{2}[A-Z0-9]\d{2}|\*(BOLD|ERROR|ITALIC|UNDERLINE)/))&&(n=N[e],!n)){n="";for(let a=0;a<e.length;a++)switch(a){case 0:n+=z(e.charAt(a));break;case 1:n+=R(e.charAt(a));break;case 2:n+=K(e.charAt(a));break;case 3:n+=L(e.charAt(a))}}return n}(e);return n.split(";").filter((e=>e.trim())).reduce(((e,n)=>{const[a,o]=n.split(":").map((e=>e.trim()));if(a&&o){const n=o.replace(/!important/g,"").trim();e[a.replace(/-([a-z])/g,((e,n)=>n.toUpperCase()))]=n}return e}),{})}(null===(a=n.tag)||void 0===a?void 0:a.replace(/[_]/g,"").slice(1));return n.closed?e("span",{style:c},n.content):e("span",null,`${null!==(o=n.tag)&&void 0!==o?o:""}${n.content}`)}))}(c)):e(n,null,a)},T=document.documentElement,V=(n,i)=>{var r,s,k,f,O;const I=n.cell,B=n.column,N=n.row,z=n.shape?n.shape:I.shape?I.shape:B.shape?B.shape:null,R=!T.ketchup.objects.isEmptyKupObj(I.obj);let K=!1;I.hasOwnProperty("isEditable")?K=I.isEditable:B.hasOwnProperty("isEditable")&&(K=B.isEditable),K=K&&n.editable,I.data=null!==(r=X(I,B))&&void 0!==r?r:I.data;const L=n.previousValue!==I.value?I.value:"",V=T.ketchup.data.cell.getType(I,z),G="extra_dense"===n.density?"extra-small":null===(s=I.data)||void 0===s?void 0:s.sizing,Y=Object.assign(Object.assign(Object.assign(Object.assign({},I.data),(null==I?void 0:I.icon)?{resource:I.icon}:{}),(null==I?void 0:I.placeholderIcon)?{placeholderResource:I.placeholderIcon}:{}),G?{sizing:G}:{});let U=I.cssClass?I.cssClass:(null==B?void 0:B.cssClass)?null==B?void 0:B.cssClass:"";const W={"f-cell":!0,[c.OBJ]:!!R,[V+"-cell"]:!0,[n.wrapperClass]:!!n.wrapperClass,[n.density]:!(!n.density||V===t.BAR),[U]:!!U,"c-input-uppercase":g(I),"c-input-lowercase":j(I),"monospace c-pre":null===(k=I.data)||void 0===k?void 0:k.legacyLook};let P=L;I.data||function(e,n){function a(e){return e.toUpperCase().startsWith("SHAPE;BAR")}function o(e){return e.toUpperCase().startsWith("SHAPE;")}function c(e){return e.toUpperCase().startsWith("BCOLOR;")}function l(e){return e.toUpperCase().startsWith("HEIGHT;")}function i(e){return e.toUpperCase().startsWith("SEP;")||e.toUpperCase().startsWith("DIV;")||e.toUpperCase().startsWith("ARW;")||e.toUpperCase().startsWith("GRID;")}function r(e){const n={},t=e.split("\\\\"),r=[];for(const e of t){if(e){if(i(e))return null;if(o(e)){if(!a(e))return null;{const a=e.split(";");if(3===a.length){const e=a[2].replace(",",".");isNaN(parseFloat(e))||(n.width=`${e}%`)}}}else if(c(e));else if(l(e)){const a=e.substring(7).replace(",",".");isNaN(parseFloat(a))||(n.height=`${a}%`)}else r.push(s(e,n))}return r.length?r:null}function s(e,n){const a=Object.assign({},n),o=e.split(";");if(o.length>=1){const e=/R(\d+)G(\d+)B(\d+)/.exec(o[0]);if(e){const[,n,o,c]=e;isNaN(parseInt(n,10))||isNaN(parseInt(o,10))||isNaN(parseInt(c,10))||(a.color=`rgb(${parseInt(n)},${parseInt(o)},${parseInt(c)})`)}if(o.length>=2){const e=o[1].replace(",",".");isNaN(parseFloat(e))||(a.width=`${e}%`)}}return a}}n.data={};switch(e){case t.CHECKBOX:case t.SWITCH:n.data.checked="1"===n.value;break;case t.BAR:o(n.value)?(n.data.isCanvas=!0,n.data.resource=n.value):n.data.data=function(e){if(!e)return null;const n=e.split("\\\\AND\\"),a=[];for(const e of n){const n=r(e);if(!n)return null;a.push(...n)}return a}(n.value);break;case t.BUTTON:n.data.label=n.value;break;case t.CHART:Object.assign(n.data,{sizeX:"100px",sizeY:"100px",offlineMode:{value:n.value,shape:"pie"}});break;case t.BUTTON_LIST:case t.CHIP:case t.MULTI_AUTOCOMPLETE:case t.MULTI_COMBOBOX:case t.RADIO:(()=>{var e;const a=null===(e=n.value)||void 0===e?void 0:e.split(";");if(""===(null==a?void 0:a[a.length-1].trim())&&a.pop(),a&&a.length){n.data.data=[];for(let e of a)n.data.data.push({id:e,value:e})}})();break;case t.COLOR_PICKER:n.data.initialValue=n.value;break;case t.GAUGE:case t.KNOB:case t.PROGRESS_BAR:case t.RATING:n.data.value=parseInt(n.value);break;case t.ICON:case t.IMAGE:n.data.resource=n.value}}(V,I),K&&a.includes(V)?(I.data.showMarker=null!==(f=I.tooltip)&&void 0!==f&&f,P=function(n,a,o,l,i){var r,s,u,k,f,m,g,j,O,x,y,C,I,A;switch(n){case t.AUTOCOMPLETE:return e("kup-autocomplete",Object.assign({key:l.name+i.row.id,initialValue:o.value,initialValueDecode:o.decode},o.data,{class:te(i)?"kup-full-width":"","onkup-autocomplete-change":e=>oe(e,i,n,h.UPDATE),"onkup-autocomplete-input":e=>oe(e,i,n,h.INPUT),"onkup-autocomplete-iconclick":e=>oe(e,i,n,h.ICON_CLICK),"onKup-autocomplete-blur":e=>oe(e,i,n,h.BLUR),"onKup-autocomplete-itemclick":e=>oe(e,i,n,h.ITEMCLICK)}));case t.CHECKBOX:return ce(i)&&(a[c.C_CENTERED]=!0),o.shape===d.INPUT_CHECKBOX?e("input",{checked:"on"===o.value.toLowerCase()||"1"===o.value,class:"input-checkbox",onChange:e=>oe(e,i,n,h.UPDATE),type:"checkbox",onBlur:e=>oe(e,i,n,h.BLUR)}):e(w,Object.assign({},o.data,{onChange:e=>oe(e,i,n,h.UPDATE),onBlur:e=>oe(e,i,n,h.BLUR)}));case t.CHIP:return e("kup-chip",Object.assign({},o.data,{type:_.INPUT,enableInput:!0,"onKup-chip-change":e=>oe(e,i,n,h.UPDATE)}),e("kup-text-field",Object.assign({fullWidth:!0,slot:"field"},o.slotData,{error:o.data.error,"onKup-textfield-blur":e=>oe(e,i,n,h.BLUR)})));case t.COLOR_PICKER:return e("kup-color-picker",Object.assign({key:l.name+i.row.id,initialValue:o.value},o.data,{class:te(i)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":e=>oe(e,i,n,h.UPDATE)}));case t.COMBOBOX:return e("kup-combobox",Object.assign({key:l.name+i.row.id,initialValue:o.value,initialValueDecode:o.decode},o.data,{class:te(i)?"kup-full-width":"","onkup-combobox-change":e=>oe(e,i,n,h.UPDATE),"onkup-combobox-input":e=>oe(e,i,n,h.INPUT),"onkup-combobox-iconclick":e=>oe(e,i,n,h.ICON_CLICK),"onKup-combobox-blur":e=>oe(e,i,n,h.BLUR),"onKup-combobox-itemclick":e=>oe(e,i,n,h.ITEMCLICK)}));case t.DATE:return e("kup-date-picker",Object.assign({key:l.name+i.row.id,initialValue:o.value},o.data,{class:te(i)?"kup-full-width":"","onkup-datepicker-change":e=>oe(e,i,n,h.UPDATE),"onkup-datepicker-input":e=>oe(e,i,n,h.INPUT),"onKup-datepicker-blur":e=>oe(e,i,n,h.BLUR),"onkup-datepicker-textfieldsubmit":e=>oe(e,i,n,h.UPDATE)}));case t.EDITOR:const B=e=>{"Enter"!==e.key||e.ctrlKey?("Enter"===e.key&&e.ctrlKey||/^F[1-9]|F1[0-2]$/.test(e.key))&&oe(e,i,n,h.UPDATE):e.stopPropagation()};return e(F,Object.assign({},o.data,{textArea:!0,sizing:b.EXTRA_LARGE,label:l.title,fullWidth:!!te(i),maxLength:o.data.maxLength,value:o.value,onChange:e=>{oe(e,i,n,h.UPDATE)},onInput:e=>{var a,c;null===(c=null===(a=o.data)||void 0===a?void 0:a.onInput)||void 0===c||c.call(a,e),oe(e,i,n,h.INPUT)},onBlur:e=>oe(e,i,n,h.BLUR),onKeyDown:B}));case t.FILE_UPLOAD:return e("kup-file-upload",Object.assign({},o.data));case t.MULTI_AUTOCOMPLETE:return e("kup-chip",Object.assign({displayMode:null!==(r=o.data.displayMode)&&void 0!==r?r:v.DESCRIPTION},o.data,{label:null!==(u=null===(s=o.slotData)||void 0===s?void 0:s.label)&&void 0!==u?u:"",type:_.INPUT,enableInput:!0,"onKup-chip-change":e=>oe(e,i,n,h.UPDATE)}),e("kup-autocomplete",{class:"kup-full-width",slot:"field",displayMode:v.CODE_AND_DESC,sizing:b.EXTRA_SMALL,"onKup-autocomplete-blur":e=>oe(e,i,n,h.BLUR),"onkup-autocomplete-input":e=>oe(e,i,n,h.INPUT),"onkup-autocomplete-iconclick":e=>oe(e,i,n,h.ICON_CLICK),data:null===(k=o.slotData)||void 0===k?void 0:k.data,initialValue:null===(f=o.slotData)||void 0===f?void 0:f.initialValue,showDropDownIcon:null===(m=o.slotData)||void 0===m?void 0:m.showDropDownIcon,style:null===(g=o.slotData)||void 0===g?void 0:g.style,disabled:null===(j=o.slotData)||void 0===j?void 0:j.disabled,id:null===(O=o.slotData)||void 0===O?void 0:O.id,error:o.data.error,showMarker:null!==(x=o.tooltip)&&void 0!==x&&x,listDisplayMode:o.data.listDisplayMode}));case t.MULTI_COMBOBOX:return e("kup-chip",Object.assign({displayMode:null!==(y=o.data.displayMode)&&void 0!==y?y:v.DESCRIPTION},o.data,{type:_.INPUT,enableInput:!0,"onKup-chip-change":e=>oe(e,i,n,h.UPDATE)}),e("kup-combobox",Object.assign({class:"kup-full-width",slot:"field",displayMode:v.CODE_AND_DESC,sizing:b.EXTRA_SMALL,"onKup-combobox-blur":e=>oe(e,i,n,h.BLUR),"onkup-combobox-input":e=>oe(e,i,n,h.INPUT),"onkup-combobox-iconclick":e=>oe(e,i,n,h.ICON_CLICK)},o.slotData,{error:o.data.error,showMarker:null!==(C=o.tooltip)&&void 0!==C&&C})));case t.RADIO:return e(E,Object.assign({},o.data,{disabled:!1,onChange:(e,a)=>{const c=o.data.data;for(let n=0;n<c.length;n++){c[n].checked=n===e}oe(a,i,n,h.UPDATE)},onBlur:e=>oe(e,i,n,h.BLUR)}));case t.RATING:return e("kup-rating",Object.assign({key:l.name+i.row.id},o.data,{disabled:!1,"onkup-rating-click":e=>oe(e,i,n,h.UPDATE)}));case t.SWITCH:return e(D,Object.assign({},o.data,{disabled:!1,onChange:e=>oe(e,i,n,h.UPDATE),onBlur:e=>oe(e,i,n,h.BLUR)}));case t.TIME:return e("kup-time-picker",Object.assign({key:l.name+i.row.id,initialValue:o.value},o.data,{class:te(i)?"kup-full-width":"","onkup-timepicker-change":e=>oe(e,i,n,h.UPDATE),"onkup-timepicker-input":e=>oe(e,i,n,h.INPUT),"onKup-timepicker-blur":e=>oe(e,i,n,h.BLUR)}));case t.OBJECT:return e($,{cell:o,column:i.column,row:i.row,inputValue:o.value,onChange:e=>oe(e,i,n,h.UPDATE)});case t.NUMBER:a[c.C_RIGHT_ALIGNED]=!0;case t.LINK:case t.MEMO:case t.STRING:const N=e=>oe(e,i,n,h.UPDATE),z=e=>{var a,c;null===(c=null===(a=o.data)||void 0===a?void 0:a.onInput)||void 0===c||c.call(a,e),oe(e,i,n,h.INPUT)},R=e=>{var a,c,l;null===(c=null===(a=o.data)||void 0===a?void 0:a.onKeyDown)||void 0===c||c.call(a,e);const r="MEMO"===o.shape||(null===(l=o.data)||void 0===l?void 0:l.maxLength)>=256||n===t.MEMO,s="Enter"===e.key&&e.ctrlKey;r&&"Enter"===e.key&&!e.ctrlKey?e.stopPropagation():(s||/^F[1-9]|F1[0-2]$/.test(e.key))&&oe(e,i,n,h.UPDATE)},K=n===t.NUMBER?"number":null;if(o.shape===d.INPUT_FIELD){const a=n===t.NUMBER&&o.value?p(l,o):o.value;return e("input",{class:"input-field",onChange:N,onInput:z,onKeyDown:R,type:K,value:a,maxLength:null!==(A=null===(I=l.cellData)||void 0===I?void 0:I.maxLength)&&void 0!==A?A:-1})}{const a=!!o.shape&&o.shape===d.MEMO||!!n&&n===t.MEMO;return e(F,Object.assign({},o.data,{textArea:a,sizing:o.data.sizing?o.data.sizing:a?b.EXTRA_LARGE:b.SMALL,inputType:K,fullWidth:!!te(i),maxLength:n==t.NUMBER&&(i.column.decimals&&i.column.decimals>0||i.column.group)||i.column.integers&&i.column.integers>0?-1:o.data.maxLength,icon:o.data&&o.data.icon?o.data.icon:o.icon?o.icon:l.icon?l.icon:null,decimals:i.column.decimals,integers:i.column.integers,group:i.column.group,value:o.value,label:l.title,onChange:N,onInput:z,onKeyDown:R,onIconClick:e=>oe(e,i,n,h.ICON_CLICK),onBlur:e=>oe(e,i,n,h.BLUR)}))}}}(V,W,I,B,n)):I.data&&o.includes(V)?(n.setSizes&&function(e,n,a){switch(e){case t.BAR:n.sizeY||(n.sizeY="26px");break;case t.BUTTON:let e="";n.label&&(e="36px"),a.style?a.style.height||(a.style.minHeight=e):a.style={minHeight:e};break;case t.CHART:n.sizeX||(n.sizeX="100%"),n.sizeY||(n.sizeY="100%");break;case t.CHIP:a.style?a.style.height||(a.style.minHeight="18px"):a.style={minHeight:"18px"};break;case t.RADIO:a.style?a.style.height||(a.style.minHeight="40px"):a.style={minHeight:"40px"}}}(V,Y,I),P=n.renderKup?function(n,a,o,l,i,r,s){switch(n){case t.BAR:return o.data?e("div",{style:{height:o.sizeY,width:"100%"}},e(C,Object.assign({},o))):e("kup-image",Object.assign({key:r.name+s.row.id,sizeX:"250px"},o));case t.BUTTON:ce(s)&&(a[c.C_CENTERED]=!0);const u=Object.assign({label:l.value,icon:l.icon,placeholderIcon:l.placeholderIcon},o);return e(x,Object.assign({},u,{onClick:e=>oe(e,s,n,h.CLICK)}));case t.BUTTON_LIST:return ce(s)&&(a[c.C_CENTERED]=!0),o["data-storage"]={cell:l,row:i,column:r},e("kup-button-list",Object.assign({key:r.name+s.row.id},o));case t.CHART:return ce(s)&&(a[c.C_CENTERED]=!0),e("kup-chart",Object.assign({key:r.name+s.row.id},o));case t.MULTI_AUTOCOMPLETE:case t.MULTI_COMBOBOX:case t.CHIP:return e(y,Object.assign({},o));case t.COLOR_PICKER:return e("kup-color-picker",Object.assign({key:r.name+s.row.id},o,{class:te(s)?"kup-full-width":"",disabled:!0}));case t.GAUGE:return e("kup-gauge",Object.assign({key:r.name+s.row.id,value:T.ketchup.math.numberifySafe(l.value),"width-component":"280px"},o));case t.KNOB:case t.PROGRESS_BAR:return e("kup-progress-bar",Object.assign({key:r.name+s.row.id},o,{value:T.ketchup.math.numberifySafe(l.value)}));case t.RADIO:return ce(s)&&(a[c.C_CENTERED]=!0),o.disabled=i.readOnly,e(E,Object.assign({},o));case t.RATING:return e(A,Object.assign({},o,{disabled:!0}));case t.OBJECT:return e(F,Object.assign({icon:"table"},o,{disabled:!0}))}}(V,W,Y,I,N,B,n):e("span",{class:"cell-"+V+" placeholder"})):(n.setSizes&&function(e,n,a,o){var c;switch(e){case t.CHECKBOX:case t.ICON:n.sizeX||(n.sizeX="18px"),n.sizeY||(n.sizeY="18px"),a.style?a.style.height||(a.style.minHeight=n.sizeY):a.style={minHeight:n.sizeY};break;case t.IMAGE:const e=(null===(c=o.cell)||void 0===c?void 0:c.value)||"",l=e.indexOf(".")>-1||e.indexOf("/")>-1||e.indexOf("\\")>-1;o.component.rootElement.tagName!==u.DATA_TABLE||l||(n.sizeX||n.sizeY?(n.sizeX||(n.sizeX="100%",n.wrapperClass="noWidth"),n.sizeY||(n.sizeY="auto")):(n.sizeX="100%",n.sizeY="64px",n.wrapperClass="noWidth")),o.component.rootElement.tagName===u.BOX?(n.sizeY||(n.sizeY="auto"),void 0===n.fit&&(n.fit=!0)):n.sizeX||(n.sizeX="auto"),n.sizeY||(n.sizeY="64px")}}(V,Y,I,n),W[c.INDICATOR_TOPRIGHT]=null!==(O=I.tooltip)&&void 0!==O&&O,P=function(n,a,o,l,i,r,s){switch(n){case t.AUTOCOMPLETE:case t.COMBOBOX:return o&&""!=o?e("div",{class:"f-cell__text"},m(i,o," - ")):o;case t.DATE:case t.DATETIME:case t.TIME:if(o&&""!=o){const n=p(r,i);return e("div",{class:"f-cell__text"},n)}return o;case t.CHECKBOX:return ce(s)&&(l[c.C_CENTERED]=!0),e(C,{resource:a.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case t.EDITOR:case t.MEMO:return e("div",{innerHTML:i.value});case t.ICON:case t.IMAGE:return ce(s)&&(l[c.C_CENTERED]=!0),a.badgeData&&(l[c.C_PADDED]=!0),e(C,Object.assign({},a));case t.LINK:return e("a",{href:o,target:"_blank"},i.value);case t.NUMBER:if(o&&""!=o){const n=T.ketchup.math.numberifySafe(i.value),a=p(r,i);return n<0&&(l[c.TEXT_DANGER]=!0),ce(s)&&(l[c.C_RIGHT_ALIGNED]=!0),e("div",{class:"f-cell__text"},a)}return e("div",{class:"f-cell__text"},o);case t.SWITCH:return ce(s)&&(l[c.C_CENTERED]=!0),a.disabled=!0,e(D,Object.assign({},a));case t.LABEL:return e(M,{text:i.value,classes:"f-cell__text"});case t.IMAGE_LIST:const u=i.data.data.find((e=>e.value===i.value))||null;return e("kup-image-list",Object.assign({ripple:!0},i.data,{"onKup-imagelist-click":e=>oe(e,s,n,h.UPDATE),activeNode:u}));default:return e("div",{class:"f-cell__text"},i.data.displayMode?m(i,o,"-"):o)}}(V,Y,P,W,I,B,n));let Z=null;!K&&(B.icon||I.icon)&&P&&V!=t.BUTTON&&V!=t.BUTTON_LIST&&V!=t.IMAGE&&V!=t.ICON&&(Z=e(C,Object.assign({},{color:`rgba(var(${l.TEXT}-rgb), 0.375)`,resource:I.icon?I.icon:B.icon,placeholderResource:I.placeholderIcon?I.placeholderIcon:B.placeholderIcon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let q=null;T.ketchup.debug.isDebug()&&R?q=I.obj.t+"; "+I.obj.p+"; "+I.obj.k+";":null!=I.title&&""!=I.title.trim()&&(q=I.title);let J=null;if(I.info){const n=Object.assign({},I.info);n.color||(n.color=`var(${l.INFO})`),n.icon||(n.icon="info"),J=e(C,Object.assign({},{color:n.color,resource:n.icon,placeholderResource:n.placeholderIcon,sizeX:"1.25em",sizeY:"1.25em",title:n.message?n.message:"",wrapperClass:"cell-info"}))}return e("div",{onKeyUp:e=>oe(e,n,V,h.KEYUP),class:W,"kup-get-cell-props":()=>n,ref:e=>I.element=e,style:I.style},e("div",{class:"f-cell__content",style:I.styleContent,title:q,onMouseEnter:e=>H(e,n,V),onMouseLeave:e=>S(e)},i&&i.length>0?i:[n.indents,J,Z,P]))},H=(e,n,a)=>{var o;if(n.cellActionIcon){const c=e.currentTarget,l=document.createElement("kup-image");l.resource="more_vert",l.sizeX="16px",l.sizeY="16px",l.tabIndex=0,l.className="f-cell__iconfunction "+(a===t.NUMBER?"left":"right"),(null===(o=n.cellActionIcon)||void 0===o?void 0:o.onClick)&&l.addEventListener("click",n.cellActionIcon.onClick),c.appendChild(l)}},S=e=>{const n=e.currentTarget.querySelector("kup-image");n&&n.remove()},X=(e,n)=>{var a;if(!e)return null;const o=e.options,c=(null===(a=e.data)||void 0===a?void 0:a.hasOwnProperty("label"))?e.data.label:n.title,l=e.value,i=T.ketchup.data.cell.getType(e,e.shape),r=new Map([[t.BUTTON_LIST,W.bind(void 0)],[t.STRING,P.bind(void 0)],[t.RADIO,Z.bind(void 0)],[t.AUTOCOMPLETE,q.bind(void 0)],[t.COMBOBOX,q.bind(void 0)],[t.CHECKBOX,U.bind(void 0)],[t.OBJECT,Y.bind(void 0)],[t.CHIP,G.bind(void 0)]]).get(i);return r?r(o,c,l,e):null},G=(e,n,a,o)=>{var c;return(null===(c=o.data)||void 0===c?void 0:c.data)?Object.assign({},o.data):i(o.value,o.decode)},Y=(e,n,a,o)=>Object.assign(Object.assign({},o.data),{data:{initialValue:a||"",label:n||"",value:a||""}}),U=(e,n,a,o)=>Object.assign(Object.assign({},o.data),{checked:"on"===a||"1"===a,label:n}),W=(e,n,a,o)=>({data:[Object.assign(Object.assign({},o.data),{icon:o.icon,placeholderIcon:o.placeholderIcon,value:a})]}),P=(e,n,a,o)=>Object.assign(Object.assign({},o.data),{label:n}),Z=(e,n,a,o)=>{const c=r(a,e);return Object.assign(Object.assign({},o.data),c)},q=(e,n,a,o)=>{if(e){const c=s(a,n,[]);return c.data["kup-list"].data=J(e,a),o.data?Object.assign(Object.assign({},c),o.data):c}},J=(e,n)=>{const a=ae.get(e.type);return a?a(e,n):e.map((e=>({value:e.label,id:e.id,selected:n===e.id})))},Q=(e,n)=>e.children.map((e=>{var a;return{id:e.content.codice,value:e.content.testo,selected:n===e.content.codice,children:(null===(a=e.children)||void 0===a?void 0:a.length)?Q(e,n):[]}})),ee=(e,n)=>e.children.map((e=>{var a;return{id:e.obj.k,value:e.value,selected:n===e.obj.k,children:(null===(a=e.children)||void 0===a?void 0:a.length)?ee(e,n):[]}})),ne=(e,n)=>e.rows.map((e=>{var a;const o=e.fields||e.cells,[c,t]=Object.keys(o);return{id:o[c].value,value:(null===(a=o[t])||void 0===a?void 0:a.value)||o[c].value,selected:n===o[c].value}})),ae=new Map([["SmeupTreeNode",Q.bind(void 0)],["SmeupDataTree",ee.bind(void 0)],["SmeupTable",ne.bind(void 0)],["SmeupDataTable",ne.bind(void 0)]]);function oe(e,n,a,o){var c,l,i,r,s,u,d,b;const k=n.cell,v=n.column,f=n.component,m=n.row;if(o===h.UPDATE){let n=function(e,n){var a;const o=!("INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName);let c=o?e.target.value:e.detail.value;return n===t.CHECKBOX&&o&&(c=e.target.checked?"off":"on"),n===t.DATE&&o&&(c=null===(a=e.detail)||void 0===a?void 0:a.value),n===t.NUMBER&&o&&(c=T.ketchup.math.formattedStringToNumberString(c,"")),c}(e,a);switch(g(k)?n=null==n?void 0:n.toUpperCase():j(k)&&(n=null==n?void 0:n.toLowerCase()),a){case t.AUTOCOMPLETE:k.decode=null===(l=null===(c=e.detail)||void 0===c?void 0:c.node)||void 0===l?void 0:l.value,k.data&&(k.data.initialValue=n,k.data.initialValueDecode=null===(r=null===(i=e.detail)||void 0===i?void 0:i.node)||void 0===r?void 0:r.value);break;case t.COMBOBOX:k.decode=null===(u=null===(s=e.detail)||void 0===s?void 0:s.node)||void 0===u?void 0:u.value;case t.DATE:case t.TIME:k.data&&(k.data.initialValue=n);break;case t.CHECKBOX:case t.SWITCH:n="on"===n.toLowerCase()?"0":"1",k.data&&(k.data.checked="0"!==n);break;case t.RADIO:if(k.data.data){const e=k.data.data.find((e=>e.checked));e&&(n=e.value)}break;case t.CHIP:case t.MULTI_AUTOCOMPLETE:case t.MULTI_COMBOBOX:n=e.detail.stringifiedValues,k.data&&(k.data.data=e.detail.comp.data);break;case t.IMAGE_LIST:n=e.detail.details.cell.value}k.obj&&(k.obj.k=null==n?void 0:n.toString()),k.value=null==n?void 0:n.toString(),k.displayedValue=null,k.displayedValue=p(v,k)}if(f&&f.rootElement){const n=new CustomEvent(o,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:f,id:f.rootElement.id,cell:k,column:v,event:e,row:m,type:a,inputValue:(null===(b=null===(d=k.element)||void 0===d?void 0:d.querySelector("input"))||void 0===b?void 0:b.value)||null}});if(f.rootElement.dispatchEvent(n),o===h.UPDATE)try{f.refresh()}catch(e){T.ketchup.debug.logMessage(f,e,O.ERROR)}}}function ce(e){var n;return f.includes(null===(n=e.component)||void 0===n?void 0:n.rootElement.tagName)}function te(e){var n;return k.includes(null===(n=e.component)||void 0===n?void 0:n.rootElement.tagName)}export{V as F,E as a,A as b,B as c,D as d,M as e}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,f as e,h as s,H as a,d as o}from"./p-710d0a7d.js";import{F as i}from"./p-f6eba414.js";import{k as r,g as n}from"./p-a9a2f8c7.js";import{c}from"./p-635bb4b3.js";import"./p-c4224227.js";import"./p-e3062c19.js";import"./p-3cab6420.js";import"./p-515c59b6.js";import"./p-1ee561ba.js";var f;!function(t){t.customStyle="Custom style of the component.",t.data="Actual data of the component."}(f||(f={}));var d,h=function(t,e,s,a){if("a"===s&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?a:"a"===s?a.call(t):a?a.value:e.get(t)};const p=class{constructor(e){t(this,e),d.set(this,r()),this.inputValue="",this.customStyle="",this.data={}}async getValue(){return this.inputValue}async getProps(t){return n(this,f,t)}async refresh(){e(this)}async setValue(t){this.inputValue=t}componentWillLoad(){h(this,d,"f").debug.logLoad(this,!1),h(this,d,"f").theme.register(this)}componentDidLoad(){h(this,d,"f").debug.logLoad(this,!0)}componentWillRender(){h(this,d,"f").debug.logRender(this,!1)}componentDidRender(){h(this,d,"f").debug.logRender(this,!0)}render(){var t;const e={data:null!==(t=this.data)&&void 0!==t?t:{},inputValue:this.inputValue,onChange:null};return s(a,{key:"9d2ae70b4dfe89598f331bf72c94db5c5e33242b"},s("style",{key:"1b21373f4e2d1784498ce119526cd07f4c376cfb"},h(this,d,"f").theme.setKupStyle(this.rootElement)),s("div",{key:"1c295a24a8d61f7059e9b7c242069da2b856c50d",id:c},s(i,Object.assign({key:"5386f17afed1cda623bd6a82acafb0e0bfbdbc63"},e))))}disconnectedCallback(){h(this,d,"f").theme.unregister(this)}get rootElement(){return o(this)}};d=new WeakMap,p.style="";export{p as kup_object_field}
|