@sme.up/ketchup 11.0.0-SNAPSHOT-20241023072631 → 11.0.0-SNAPSHOT-20241023092659
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-95f965f3.js → f-cell-c5a85032.js} +64 -1
- package/dist/cjs/f-cell-c5a85032.js.map +1 -0
- package/dist/cjs/index-4e97f23f.js +4 -0
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +49 -49
- package/dist/cjs/kup-box.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +4 -19
- package/dist/cjs/kup-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +7 -7
- package/dist/cjs/kup-dashboard.cjs.entry.js +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/kup-gantt_10.cjs.entry.js +23 -23
- package/dist/cjs/kup-htm.cjs.entry.js +100 -0
- package/dist/cjs/kup-htm.cjs.entry.js.map +1 -0
- package/dist/cjs/kup-image-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-input-panel.cjs.entry.js +2 -2
- package/dist/cjs/kup-lazy.cjs.entry.js +11 -11
- package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +1 -1
- package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner-renderer.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +1 -1
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/htm.js +20 -0
- package/dist/collection/assets/index.js +4 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/kup-cell/kup-cell.js +4 -18
- package/dist/collection/components/kup-cell/kup-cell.js.map +1 -1
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +1 -1
- package/dist/collection/components/kup-chip/kup-chip.js +2 -2
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +2 -2
- package/dist/collection/components/kup-combobox/kup-combobox.js +1 -1
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +1 -1
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-dialog/kup-dialog.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.js +2 -2
- package/dist/collection/components/kup-echart/kup-echart.js +1 -1
- package/dist/collection/components/kup-editor/kup-editor.js +1 -1
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +2 -2
- package/dist/collection/components/kup-form/kup-form.js +2 -2
- package/dist/collection/components/kup-htm/kup-htm-declarations.js +9 -0
- package/dist/collection/components/kup-htm/kup-htm-declarations.js.map +1 -0
- package/dist/collection/components/kup-htm/kup-htm.css +147 -0
- package/dist/collection/components/kup-htm/kup-htm.js +225 -0
- package/dist/collection/components/kup-htm/kup-htm.js.map +1 -0
- package/dist/collection/components/kup-image-list/kup-image-list.js +3 -3
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +1 -1
- 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-pdf/kup-pdf.js +1 -1
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +2 -2
- 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-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.js +64 -1
- package/dist/collection/f-components/f-cell/f-cell.js.map +1 -1
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js +0 -1
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js.map +1 -1
- package/dist/components/custom-task-list-header.js +2 -2
- package/dist/components/kup-autocomplete2.js +112 -49
- package/dist/components/kup-autocomplete2.js.map +1 -1
- package/dist/components/kup-cell.js +4 -19
- package/dist/components/kup-cell.js.map +1 -1
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-drawer.js +2 -2
- package/dist/components/kup-echart2.js +1 -1
- package/dist/components/kup-editor2.js +1 -1
- package/dist/components/kup-family-tree.js +2 -2
- package/dist/components/kup-gantt-calendar2.js +2 -2
- package/dist/components/kup-gantt2.js +2 -2
- package/dist/components/kup-grid-renderer2.js +3 -3
- package/dist/components/kup-horizontal-scroll2.js +5 -5
- package/dist/components/kup-htm.d.ts +11 -0
- package/dist/components/kup-htm.js +253 -0
- package/dist/components/kup-htm.js.map +1 -0
- package/dist/components/kup-image-list.js +3 -3
- package/dist/components/kup-input-panel.js +2 -2
- package/dist/components/kup-lazy.js +11 -11
- package/dist/components/kup-magic-box.js +3 -3
- package/dist/components/kup-manager.js +1 -1
- package/dist/components/kup-nav-bar.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-pdf.js +1 -1
- package/dist/components/kup-photo-frame.js +2 -2
- package/dist/components/kup-planner-renderer2.js +2 -2
- package/dist/components/kup-planner.js +1 -1
- package/dist/components/kup-probe.js +1 -1
- package/dist/components/kup-qlik.js +1 -1
- package/dist/components/kup-snackbar.js +1 -1
- package/dist/components/kup-standard-tooltip2.js +1 -1
- package/dist/components/kup-switcher2.js +1 -1
- package/dist/components/kup-task-gantt2.js +2 -2
- package/dist/components/kup-task-list-header2.js +7 -7
- package/dist/components/kup-task-list-table2.js +1 -1
- package/dist/components/kup-task-list2.js +1 -1
- package/dist/components/kup-tooltip2.js +1 -1
- package/dist/components/kup-typography-list.js +1 -1
- package/dist/components/kup-typography.js +1 -1
- package/dist/components/kup-vertical-scroll2.js +2 -2
- package/dist/esm/{f-cell-c813c70c.js → f-cell-aea93e3a.js} +67 -4
- package/dist/esm/f-cell-aea93e3a.js.map +1 -0
- package/dist/esm/{f-chip-4a35f0f8.js → f-chip-4eb4d42d.js} +2 -2
- package/dist/esm/{f-chip-4a35f0f8.js.map → f-chip-4eb4d42d.js.map} +1 -1
- package/dist/esm/{f-paginator-utils-4e6a69f6.js → f-paginator-utils-ae1c08f2.js} +2 -2
- package/dist/esm/{f-paginator-utils-4e6a69f6.js.map → f-paginator-utils-ae1c08f2.js.map} +1 -1
- package/dist/esm/{f-text-field-a7ef5d61.js → f-text-field-5c7e1016.js} +2 -2
- package/dist/esm/{f-text-field-a7ef5d61.js.map → f-text-field-5c7e1016.js.map} +1 -1
- package/dist/esm/index-191ee7cb.js +4 -0
- 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_27.entry.js +54 -54
- package/dist/esm/kup-box.entry.js +6 -6
- 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 +7 -22
- package/dist/esm/kup-cell.entry.js.map +1 -1
- package/dist/esm/kup-custom-task-list-header_4.entry.js +7 -7
- package/dist/esm/kup-dashboard.entry.js +3 -3
- package/dist/esm/{kup-data-table-helper-9913aac7.js → kup-data-table-helper-77b091da.js} +2 -2
- package/dist/esm/{kup-data-table-helper-9913aac7.js.map → kup-data-table-helper-77b091da.js.map} +1 -1
- package/dist/esm/kup-drawer.entry.js +3 -3
- package/dist/esm/kup-echart.entry.js +2 -2
- package/dist/esm/kup-editor.entry.js +2 -2
- 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 +96 -0
- package/dist/esm/kup-htm.entry.js.map +1 -0
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +7 -7
- package/dist/esm/kup-input-panel.entry.js +5 -5
- package/dist/esm/kup-lazy.entry.js +12 -12
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-669cda17.js → kup-manager-7f0308ee.js} +2 -2
- package/dist/esm/{kup-manager-669cda17.js.map → kup-manager-7f0308ee.js.map} +1 -1
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-pdf.entry.js +2 -2
- package/dist/esm/kup-photo-frame.entry.js +3 -3
- 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-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/ketchup.esm.js.map +1 -1
- package/dist/ketchup/{p-ada5beae.entry.js → p-03885b8d.entry.js} +2 -2
- package/dist/ketchup/{p-42582605.entry.js → p-05a7120a.entry.js} +2 -2
- package/dist/ketchup/{p-cc1abfc4.js → p-1754ee9b.js} +2 -2
- package/dist/ketchup/{p-6f3846da.entry.js → p-202dfeee.entry.js} +3 -3
- package/dist/ketchup/p-20c22a22.entry.js +2 -0
- package/dist/ketchup/{p-1ac6a21a.entry.js.map → p-20c22a22.entry.js.map} +1 -1
- package/dist/ketchup/{p-19c0491c.entry.js → p-2227785a.entry.js} +2 -2
- package/dist/ketchup/{p-ce2c3d02.entry.js → p-26efe39b.entry.js} +2 -2
- package/dist/ketchup/{p-06651510.entry.js → p-2b47d837.entry.js} +2 -2
- package/dist/ketchup/{p-1460050d.entry.js → p-2c8d07af.entry.js} +2 -2
- package/dist/ketchup/{p-e8dc8c8f.entry.js → p-362a8b69.entry.js} +2 -2
- package/dist/ketchup/{p-68be312f.entry.js → p-3a8f5a76.entry.js} +2 -2
- package/dist/ketchup/{p-22d4016a.entry.js → p-3edff8e7.entry.js} +2 -2
- package/dist/ketchup/{p-aefbe2a4.entry.js → p-422e1c5d.entry.js} +2 -2
- package/dist/ketchup/{p-ac894b67.entry.js → p-44b6390c.entry.js} +2 -2
- package/dist/ketchup/{p-c85be66a.entry.js → p-48368d6a.entry.js} +2 -2
- package/dist/ketchup/{p-9586b234.entry.js → p-4b14b67b.entry.js} +2 -2
- package/dist/ketchup/p-544eca9d.js +2 -0
- package/dist/ketchup/p-5e889cbc.entry.js +2 -0
- package/dist/ketchup/p-5e889cbc.entry.js.map +1 -0
- package/dist/ketchup/{p-398b13ca.entry.js → p-6d51f043.entry.js} +2 -2
- package/dist/ketchup/{p-a0dce50f.js → p-802a4e44.js} +2 -2
- package/dist/ketchup/{p-9ab7218f.entry.js → p-87ff86ee.entry.js} +2 -2
- package/dist/ketchup/{p-26030fba.js → p-8c07fd42.js} +2 -2
- package/dist/ketchup/p-9394a966.entry.js +2 -0
- package/dist/ketchup/p-9394a966.entry.js.map +1 -0
- package/dist/ketchup/{p-a7e1edb6.entry.js → p-94099e24.entry.js} +3 -3
- package/dist/ketchup/{p-99de1bea.entry.js → p-9fa6808d.entry.js} +2 -2
- package/dist/ketchup/{p-ed400b83.entry.js → p-a33ea26d.entry.js} +2 -2
- package/dist/ketchup/{p-5fef2650.entry.js → p-afc92adf.entry.js} +2 -2
- package/dist/ketchup/{p-ac90237a.entry.js → p-b46a4d95.entry.js} +2 -2
- package/dist/ketchup/{p-fd60c779.entry.js → p-b6c07403.entry.js} +3 -3
- package/dist/ketchup/{p-07ab58b7.entry.js → p-b849ae30.entry.js} +2 -2
- package/dist/ketchup/p-bb4e26cb.entry.js +2 -0
- package/dist/ketchup/{p-07af0f44.entry.js.map → p-bb4e26cb.entry.js.map} +1 -1
- package/dist/ketchup/p-bbdf4a8f.js +2 -0
- package/dist/ketchup/p-bbdf4a8f.js.map +1 -0
- package/dist/ketchup/{p-13f4b18e.entry.js → p-c7dfed3a.entry.js} +3 -3
- package/dist/ketchup/{p-ca5d792d.entry.js → p-cdd29a6d.entry.js} +2 -2
- package/dist/ketchup/{p-547ce22c.entry.js → p-ce5a86e1.entry.js} +2 -2
- package/dist/ketchup/{p-13b2ca2d.js → p-df06309a.js} +2 -2
- package/dist/ketchup/{p-ecd177b6.entry.js → p-e01cb12b.entry.js} +2 -2
- package/dist/ketchup/{p-bd9b1a39.entry.js → p-e8c292e9.entry.js} +3 -3
- package/dist/types/components/kup-cell/kup-cell.d.ts +0 -1
- package/dist/types/components/kup-htm/kup-htm-declarations.d.ts +7 -0
- package/dist/types/components/kup-htm/kup-htm.d.ts +40 -0
- package/dist/types/components.d.ts +57 -0
- package/package.json +1 -1
- package/dist/cjs/f-cell-95f965f3.js.map +0 -1
- package/dist/esm/f-cell-c813c70c.js.map +0 -1
- package/dist/ketchup/p-07af0f44.entry.js +0 -2
- package/dist/ketchup/p-1ac6a21a.entry.js +0 -2
- package/dist/ketchup/p-50e5a990.js +0 -2
- package/dist/ketchup/p-7285b1b3.entry.js +0 -2
- package/dist/ketchup/p-7285b1b3.entry.js.map +0 -1
- package/dist/ketchup/p-812c59be.js +0 -2
- package/dist/ketchup/p-812c59be.js.map +0 -1
- /package/dist/ketchup/{p-ada5beae.entry.js.map → p-03885b8d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-42582605.entry.js.map → p-05a7120a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-cc1abfc4.js.map → p-1754ee9b.js.map} +0 -0
- /package/dist/ketchup/{p-6f3846da.entry.js.map → p-202dfeee.entry.js.map} +0 -0
- /package/dist/ketchup/{p-19c0491c.entry.js.map → p-2227785a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-ce2c3d02.entry.js.map → p-26efe39b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-06651510.entry.js.map → p-2b47d837.entry.js.map} +0 -0
- /package/dist/ketchup/{p-1460050d.entry.js.map → p-2c8d07af.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e8dc8c8f.entry.js.map → p-362a8b69.entry.js.map} +0 -0
- /package/dist/ketchup/{p-68be312f.entry.js.map → p-3a8f5a76.entry.js.map} +0 -0
- /package/dist/ketchup/{p-22d4016a.entry.js.map → p-3edff8e7.entry.js.map} +0 -0
- /package/dist/ketchup/{p-aefbe2a4.entry.js.map → p-422e1c5d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-ac894b67.entry.js.map → p-44b6390c.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c85be66a.entry.js.map → p-48368d6a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-9586b234.entry.js.map → p-4b14b67b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-50e5a990.js.map → p-544eca9d.js.map} +0 -0
- /package/dist/ketchup/{p-398b13ca.entry.js.map → p-6d51f043.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a0dce50f.js.map → p-802a4e44.js.map} +0 -0
- /package/dist/ketchup/{p-9ab7218f.entry.js.map → p-87ff86ee.entry.js.map} +0 -0
- /package/dist/ketchup/{p-26030fba.js.map → p-8c07fd42.js.map} +0 -0
- /package/dist/ketchup/{p-a7e1edb6.entry.js.map → p-94099e24.entry.js.map} +0 -0
- /package/dist/ketchup/{p-99de1bea.entry.js.map → p-9fa6808d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-ed400b83.entry.js.map → p-a33ea26d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-5fef2650.entry.js.map → p-afc92adf.entry.js.map} +0 -0
- /package/dist/ketchup/{p-ac90237a.entry.js.map → p-b46a4d95.entry.js.map} +0 -0
- /package/dist/ketchup/{p-fd60c779.entry.js.map → p-b6c07403.entry.js.map} +0 -0
- /package/dist/ketchup/{p-07ab58b7.entry.js.map → p-b849ae30.entry.js.map} +0 -0
- /package/dist/ketchup/{p-13f4b18e.entry.js.map → p-c7dfed3a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-ca5d792d.entry.js.map → p-cdd29a6d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-547ce22c.entry.js.map → p-ce5a86e1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-13b2ca2d.js.map → p-df06309a.js.map} +0 -0
- /package/dist/ketchup/{p-ecd177b6.entry.js.map → p-e01cb12b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-bd9b1a39.entry.js.map → p-e8c292e9.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as n,H as s,d as o}from"./p-d7c15b0e.js";import{F as l}from"./p-cc32b7a2.js";import{F as a}from"./p-812c59be.js";import{k as r,a5 as u,F as c,g as h,s as p,h as f,al as d,aj as m,ak as b,aa as v,am as k,e as g}from"./p-26030fba.js";import{F as y}from"./p-c4054aba.js";import{c as _}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-5d03c077.js";import"./p-cc1abfc4.js";import"./p-13b2ca2d.js";import"./p-029c7cbe.js";import"./p-d4a879fc.js";var x;(function(t){t["TAB"]="tab"})(x||(x={}));var w;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the input panel.";t["hiddenSubmitButton"]="Creates a hidden submit button in order to submit the form with enter.";t["submitCb"]="Sets the callback function on submit form";t["optionsHandler"]="Sets the callback function to recieve options"})(w||(w={}));const j=12;const O=22;const $=t=>{if(t==0){return j/2}if(!t){return null}if(t===1){return 1.5*j}return t*j};const z=t=>{if(!t){return null}return t*O};const S=t=>{if(!t){return null}return(t-1)*O};const M=t=>{if(!t){return null}return t*j};const T=".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_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:87ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";const W=T;var D=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)};var C=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var E=undefined&&undefined.__rest||function(t,e){var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0)i[n]=t[n];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++){if(e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s]))i[n[s]]=t[n[s]]}return i};var F,I,P,R,N,G,J,V,A,L,B,H,K,X,Y,q,Q,U,Z,tt,et,it,nt,st,ot,lt,at,rt,ut,ct,ht,pt,ft,dt,mt,bt,vt,kt,gt,yt,_t,xt,wt,jt,Ot,$t,zt,St,Mt,Tt,Wt;const Dt=document.documentElement;const Ct=class{constructor(i){t(this,i);this.kupReady=e(this,"kup-input-panel-ready",6);F.add(this);I.set(this,r());P.set(this,new Map([["SmeupTreeNode",D(this,F,"m",St).bind(this)],["SmeupDataTree",D(this,F,"m",Mt).bind(this)],["SmeupTable",D(this,F,"m",Tt).bind(this)],["SmeupDataTable",D(this,F,"m",Tt).bind(this)]]));R.set(this,null);N.set(this,new Map([[u.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.COMBOBOX,["kup-combobox-iconclick"]],[u.MULTI_COMBOBOX,["kup-combobox-iconclick"]]]));G.set(this,[]);J.set(this,new Map([[u.DATE,"kup-date-picker"],[u.TIME,"kup-time-picker"]]));V.set(this,new Map([[c.BUTTON_LIST,D(this,F,"m",K).bind(this)],[c.EDITOR,D(this,F,"m",X).bind(this)],[c.LABEL,D(this,F,"m",q).bind(this)],[c.TABLE,D(this,F,"m",Y).bind(this)]]));A.set(this,new Map([[x.TAB,D(this,F,"m",it).bind(this)]]));L.set(this,[]);this.customStyle="";this.data=null;this.hiddenSubmitButton=false;this.submitCb=null;this.optionsHandler=null;this.customButtonClickHandler=null;this.inputPanelCells=[];this.tabSelected=null}onDataChanged(){C(this,R,structuredClone(this.data),"f");if(D(this,G,"f").length){D(this,G,"f").map((({event:t,handler:e})=>{this.rootElement.removeEventListener(t,e)}));C(this,G,[],"f")}if(D(this,L,"f").length){D(this,L,"f").map((t=>{D(this,I,"f").keysBinding.unregister(t)}));C(this,L,[],"f")}D(this,F,"m",ot).call(this,this.data)}async getProps(t){return h(this,w,t)}async refresh(){i(this)}async setProps(t){p(this,w,t)}componentWillLoad(){D(this,I,"f").debug.logLoad(this,false);D(this,I,"f").language.register(this);D(this,I,"f").theme.register(this);this.onDataChanged()}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});D(this,I,"f").debug.logLoad(this,true)}componentWillRender(){D(this,I,"f").debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){y(e[t])}}D(this,I,"f").debug.logRender(this,true)}render(){const t=Boolean(!this.inputPanelCells.length);const e=t?[n("p",null,D(this,I,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>D(this,F,"m",B).call(this,t)));return n(s,{key:"250ba268db4da534592d16fab49275cf7ad0e61b"},n("style",{key:"a8d1c32a3342f1cb9a6b3bfbbcb16d42f1e875f9"},D(this,I,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"174fbec980e2fab7fa3f9d59de1d8038c04cff5f",id:_},e))}disconnectedCallback(){D(this,I,"f").language.unregister(this);D(this,I,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["onDataChanged"]}}};I=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,G=new WeakMap,J=new WeakMap,V=new WeakMap,A=new WeakMap,L=new WeakMap,F=new WeakSet,B=function t(e){var i;const s=e.row.layout;const o=(s===null||s===void 0?void 0:s.horizontal)||false;let a;if(!((i=s===null||s===void 0?void 0:s.sections)===null||i===void 0?void 0:i.length)){a=e.cells.map((t=>D(this,F,"m",H).call(this,t.cell,e.row,t.column)))}else{a=s.absolute?D(this,F,"m",Z).call(this,e,s):D(this,F,"m",U).call(this,e,s)}const r={"input-panel":true,"input-panel--column":!o,"input-panel--absolute":s===null||s===void 0?void 0:s.absolute};return n("form",{class:r,name:this.rootElement.id,onSubmit:t=>{t.preventDefault();this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)}})}},a,!this.hiddenSubmitButton?n(l,{buttonType:"submit",label:D(this,I,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit"}):null)},H=function t(e,i,s){if(!e){return}const o=D(this,V,"f").get(e.shape);if(o!==undefined){return o(e,s.name)}const l={cell:e,column:s,row:i,component:this,editable:true,renderKup:true,setSizes:true};const r=D(this,F,"m",Q).call(this,e,s.title);if(r){return n("div",{class:{"input-panel__label_container":true}},r,n(a,Object.assign({},l)))}return n(a,Object.assign({},l))},K=function t(e,i){return n(l,Object.assign({icon:e.icon,id:i},e.data,{wrapperClass:"form__submit"}))},X=function t(e,i){const s="kup-editor-save";const o=t=>{const e=this.inputPanelCells.reduce(((t,{cells:e})=>{if(!t){return e.find((({column:t})=>t.name===i)).cell}return t}),null);e.value=t.detail.htmlValue.replace(/\n/g,"<br>")};this.rootElement.addEventListener(s,o);D(this,G,"f").push({event:s,handler:o});return n("kup-editor",Object.assign({},e.data,{id:i,isReadOnly:!e.isEditable,showToolbar:true}))},Y=function t(e,i){return n("kup-data-table",Object.assign({id:i,editableData:true,showGroups:true,showFilters:true,showFooter:true},e.data))},q=function t(e,i){return n("span",{class:"input-panel-label",id:i},e.value)},Q=function t(e,i){if(!i){return null}const s=Dt.ketchup.data.cell.getType(e,e.shape);if(s===u.RADIO){return n("span",null,i)}return null},U=function t(e,i){const n=D(this,A,"f").get(i.sectionsType);return n?n(e,i.sections):i.sections.map((t=>D(this,F,"m",tt).call(this,e,t)))},Z=function t(e,i){return i.sections.map((t=>D(this,F,"m",et).call(this,e,t)))},tt=function t(e,i,s=false,o={}){var l,a;const r={"input-panel__section":!i.horizontal,"input-panel__horizontal-section":i.horizontal};o.gap=+i.gap>0?`${i.gap}rem`:"1rem";let u=[];if((l=i.sections)===null||l===void 0?void 0:l.length){u=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)));const n=i.sections.some((t=>t.dim));if(!i.gridCols&&i.horizontal){o.gridTemplateColumns=n?i.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${i.sections.length}, 1fr)`}if(!i.gridRows&&!i.horizontal){o.gridTemplateRows=n?i.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${i.sections.length}, 1fr)`}}else if((a=i.content)===null||a===void 0?void 0:a.length){u=i.content.map((t=>D(this,F,"m",nt).call(this,e,t)));o.gridTemplateColumns=+i.gridCols>0?`repeat(${i.gridCols}, 1fr)`:"";o.gridTemplateRows=+i.gridRows>0?`repeat(${i.gridRows}, 1fr)`:""}const c=n("div",{class:r,style:o},u);return i.title&&!s?n("div",{class:{"input-panel__section_label_container":true}},n("h3",null,i.title),c):c},et=function t(e,i){var s,o;let l=[];if((s=i.sections)===null||s===void 0?void 0:s.length){l=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((o=i.content)===null||o===void 0?void 0:o.length){l=i.content.map((t=>D(this,F,"m",st).call(this,e,t)))}const a=`${$(i.absoluteWidth)}px`;const r=`${z(i.absoluteHeight)}px`;const u=`${S(i.absoluteRow)}px`;const c=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:a,"min-width":a,"max-width":a,height:r,"min-height":r,"max-height":r,top:u,left:c,overflow:"auto"};return n("div",{style:h},l)},it=function t(e,i){if(!this.tabSelected){this.tabSelected=i[0].id||"0"}const s=i.map(((t,e)=>({active:(t.id||`${e}`)===this.tabSelected,value:t.title,icon:t.icon,id:t.id||`${e}`})));const o=i.map(((t,i)=>{const n=t.id||`${i}`;return D(this,F,"m",tt).call(this,e,t,true,{display:this.tabSelected!==n?"none":"grid"})}));const l=".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }";if(!D(this,G,"f").map((t=>t.event)).includes("kup-tabbar-click")){const t="kup-tabbar-click";const e=t=>{this.tabSelected=t.detail.node.id};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}return n("div",{class:{"input-panel__tabs_container":true}},n("kup-tab-bar",{data:s,customStyle:l}),o)},nt=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));const o=+i.colSpan>0?i.colSpan:!(+i.colSpan>0)&&!(+i.colStart>0)?1:null;const l=o?`span ${o}`:`${i.colStart}`;const a=+i.colEnd>0?`${i.colEnd}`:"";const r=+i.rowSpan>0?i.rowSpan:!(+i.rowSpan>0)&&!(+i.rowStart>0)?1:null;const u=r?`span ${r}`:`${i.rowStart}`;const c=+i.rowEnd>0?`${i.rowEnd}`:"";const h={"grid-column-start":l,"grid-column-end":a,"grid-row-start":u,"grid-row-end":c};if(!s||!s.cell){return}return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},st=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));if(!s||!s.cell){return}let o;if(s.cell.shape==c.DATE){o=i.absoluteLength>8?i.absoluteLength:8}else{o=i.absoluteLength}const l=`${$(o)}px`;const a=`${z(1)}px`;const r=`${S(i.absoluteRow)}px`;const u=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:l,"min-width":l,"max-width":l,height:a,"min-height":a,"max-height":a,top:r,left:u,overflow:"auto"};s.cell.data=Object.assign(Object.assign({},s.cell.data),{customStyle:(s.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}"});return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},ot=function t(e){var i;const n=((i=e===null||e===void 0?void 0:e.rows)===null||i===void 0?void 0:i.length)?e.rows.reduce(((t,i)=>{const n=e.columns.filter((t=>t.visible)).map((t=>{const e=structuredClone(i.cells[t.name]);const n=e?Object.assign(Object.assign({},e),{data:D(this,F,"m",lt).call(this,e,t),slotData:D(this,F,"m",ct).call(this,e,t),isEditable:true}):null;return{column:t,cell:n}}));return[...t,{cells:n,row:i}]}),[]):[];n.map((({cells:t})=>t.map((({cell:t,column:e})=>{const i=Dt.ketchup.data.cell.getType(t,t.shape);const n=D(this,J,"f").get(i);if(!n){return}const s=this.rootElement.shadowRoot.querySelector(`${n}[id=${e.name}]`);s===null||s===void 0?void 0:s.setValue(t.value)}))));this.inputPanelCells=n},lt=function t(e,i){const n=Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e,i)),{disabled:!e.editable,id:i.name});const s=Dt.ketchup.data.cell.getType(e,e.shape);const o=e.data||{},l=E(o,["data"]);return s!==u.MULTI_AUTOCOMPLETE&&s!==u.MULTI_COMBOBOX?D(this,F,"m",at).call(this,n,Object.assign({},e.data)):Object.assign(Object.assign({},n),l)},at=function t(e,i){for(const n in i){if(i[n]instanceof Object&&!Array.isArray(i[n])&&n in e){e[n]=D(this,F,"m",t).call(this,e[n],i[n])}else{e[n]=i[n]}}return e},rt=function t(){return this.inputPanelCells.reduce(((t,e)=>{const i=Object.keys(e.row.cells).reduce(((t,i)=>{var n;const s=(n=e.cells.find((t=>t.column.name===i)))===null||n===void 0?void 0:n.cell;let o=s===null||s===void 0?void 0:s.value;if((s===null||s===void 0?void 0:s.shape)===c.TABLE){o=JSON.stringify(D(this,F,"m",$t).call(this,s.data.data,i))}return Object.assign(Object.assign({},t),{[i]:Object.assign(Object.assign({},e.row.cells[i]),{value:o,obj:s===null||s===void 0?void 0:s.obj})})}),{});return{columns:[...t.columns,...e.cells.map((t=>t.column))],rows:[...t.rows,{cells:i,layout:e.row.layout}]}}),{columns:[],rows:[]})},ut=function t(e,i){if(!e){return null}const n=e.options;const s=i.title;const o=e.value;const l=Dt.ketchup.data.cell.getType(e,e.shape);const a=new Map([[u.AUTOCOMPLETE,D(this,F,"m",dt).bind(this)],[u.BUTTON_LIST,D(this,F,"m",ft).bind(this)],[u.CHART,D(this,F,"m",pt).bind(this)],[u.CHIP,D(this,F,"m",ht).bind(this)],[u.CHECKBOX,D(this,F,"m",mt).bind(this)],[u.COLOR_PICKER,D(this,F,"m",bt).bind(this)],[u.COMBOBOX,D(this,F,"m",dt).bind(this)],[u.EDITOR,D(this,F,"m",vt).bind(this)],[u.MULTI_AUTOCOMPLETE,D(this,F,"m",ht).bind(this)],[u.MULTI_COMBOBOX,D(this,F,"m",ht).bind(this)],[u.NUMBER,D(this,F,"m",jt).bind(this)],[u.DATE,D(this,F,"m",_t).bind(this)],[u.OBJECT,D(this,F,"m",xt).bind(this)],[u.RADIO,D(this,F,"m",gt).bind(this)],[u.STRING,D(this,F,"m",kt).bind(this)],[u.SWITCH,D(this,F,"m",yt).bind(this)],[u.TABLE,D(this,F,"m",Ot).bind(this)],[u.TIME,D(this,F,"m",wt).bind(this)]]);const r=a.get(l);return r?r(n,s,o,e,i.name):null},ct=function t(e,i){const n=Dt.ketchup.data.cell.getType(e,e.shape);if(!e.editable){return null}if(n===u.CHIP){return{trailingIcon:true,label:i.title,disabled:!e.editable,id:i.name,fullWidth:false}}if(n===u.MULTI_AUTOCOMPLETE||n===u.MULTI_COMBOBOX){return Object.assign(Object.assign({},D(this,F,"m",dt).call(this,e.options,i.title,null,e,i.name)),{showDropDownIcon:true,class:"",style:{width:"100%"},disabled:!e.editable,id:i.name})}return null},ht=function t(e,i,n){return d(n)},pt=function t(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},ft=function t(e,i,n,s,o){var l,a,r,u;s.data=s.data||{};s.data.onClick=()=>{s.fun?this.customButtonClickHandler({fun:s.fun,cellId:o,currentState:D(this,F,"m",rt).call(this)}):this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)},cell:o})};if(((l=s.data)===null||l===void 0?void 0:l.keyShortcut)&&!((a=s.data)===null||a===void 0?void 0:a.disabled)){D(this,L,"f").push((r=s.data)===null||r===void 0?void 0:r.keyShortcut);D(this,I,"f").keysBinding.register((u=s.data)===null||u===void 0?void 0:u.keyShortcut,s.data.onClick.bind(this))}return Object.assign({label:s.value,fun:s.fun},s.data)},dt=function t(e,i,n,s,o){const l=m(n,i,[]);if(s.fun){const t=Dt.ketchup.data.cell.getType(s,s.shape);const e=D(this,N,"f").get(t);if(!e){return}e.map((t=>{const e=t=>{D(this,F,"m",Wt).call(this,t.detail,s.fun,l,o,n)};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}))}else if(e){l.data["kup-list"].data=D(this,F,"m",zt).call(this,e,n)}return l},mt=function t(e,i,n){return b(n,i)},bt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},vt=function t(e,i,n){return{initialValue:n}},kt=function t(e,i,n){return{label:i}},gt=function t(e,i,n){return v(n,e)},yt=function t(e,i,n){return k(n,i)},_t=function t(e,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},xt=function t(e,i,n,s,o){return{initialValue:n||"",label:i||" ",value:n||""}},wt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},jt=function t(e,i,n){return{label:i}},Ot=function t(e,i,n,s,o){try{let t=JSON.parse(s.value);if(!t){D(this,I,"f").debug.logMessage(this,`Empty value for ${o} cell.`,g.WARNING);return null}if(t.type!=="SmeupDataTable"){D(this,I,"f").debug.logMessage(this,`Wrong data table type for ${o} cell. Type \`SmeupDataTable\` in value expected`,g.ERROR);return null}return{data:{columns:t.columns.map((e=>Object.assign(Object.assign({},e),{obj:t.rows[0].cells[e.name].obj}))),rows:t.rows.map((e=>Object.assign(Object.assign({},e),{cells:Object.keys(e.cells).reduce(((i,n)=>{const s=t.columns.find((t=>t.name===n));return Object.assign(Object.assign({},i),{[n]:Object.assign(Object.assign({},e.cells[n]),{data:Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e.cells[n],s)),{disabled:e.cells[n].editable===false,id:s.id})})})}),{})})))}}}catch(t){D(this,I,"f").debug.logMessage(this,`Invalid value for ${o} cell. Type \`SmeupDataTable\` expected`,g.ERROR);return null}},$t=function t(e,i){const n=Object.assign(Object.assign({},e),{rows:e.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))});const s=e.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!s.length){return n}try{const t=JSON.parse(D(this,R,"f").rows[0].cells[i].value);n.rows=e.rows.map(((e,i)=>s.reduce(((n,s)=>{const o=t.rows[i].cells[s]&&e.cells[s].value!==t.rows[i].cells[s].value;if(o){return Object.assign(Object.assign({},t.rows[i]),{cells:Object.assign(Object.assign({},n.cells),{[s]:Object.assign(Object.assign({},t.rows[i].cells[s]),{value:e.cells[s].value})})})}return Object.assign(Object.assign({},t.rows[i]),{cells:n.cells})}),Object.assign(Object.assign({},t.rows[i]),{cells:{}}))));return n}catch(t){return n}},zt=function t(e,i){const n=D(this,P,"f").get(e.type);if(n){return n(e,i)}else{return e.map((t=>({value:t.label,id:t.id,selected:i===t.id})))}},St=function t(e,i){return e.children.map((e=>{var n;return{id:e.content.codice,value:e.content.testo,selected:i===e.content.codice,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},Mt=function t(e,i){return e.children.map((e=>{var n;return{id:e.obj.k,value:e.value,selected:i===e.obj.k,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},Tt=function t(e,i){return e.rows.map((t=>{var e;const n=t.fields||t.cells;const[s,o]=Object.keys(n);return{id:n[s].value,value:((e=n[o])===null||e===void 0?void 0:e.value)||n[s].value,selected:i===n[s].value}}))},Wt=function t(e,i,n,s,o){if(e.id!==s||e.open===false){return}this.optionsHandler(i,e.inputValue,D(this,F,"m",rt).call(this),e.id).then((t=>{var i;n.data["kup-list"].data=(i=D(this,F,"m",zt).call(this,t,o))!==null&&i!==void 0?i:[];e.comp.refresh()}))};Ct.style=W;export{Ct as kup_input_panel};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as n,H as s,d as o}from"./p-d7c15b0e.js";import{F as l}from"./p-cc32b7a2.js";import{F as a}from"./p-bbdf4a8f.js";import{k as r,a5 as u,F as c,g as h,s as p,h as f,al as d,ab as m,ak as b,aa as v,am as k,e as g}from"./p-8c07fd42.js";import{F as y}from"./p-c4054aba.js";import{c as _}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-5d03c077.js";import"./p-1754ee9b.js";import"./p-df06309a.js";import"./p-029c7cbe.js";import"./p-d4a879fc.js";var x;(function(t){t["TAB"]="tab"})(x||(x={}));var w;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the input panel.";t["hiddenSubmitButton"]="Creates a hidden submit button in order to submit the form with enter.";t["submitCb"]="Sets the callback function on submit form";t["optionsHandler"]="Sets the callback function to recieve options"})(w||(w={}));const j=12;const O=22;const $=t=>{if(t==0){return j/2}if(!t){return null}if(t===1){return 1.5*j}return t*j};const z=t=>{if(!t){return null}return t*O};const S=t=>{if(!t){return null}return(t-1)*O};const M=t=>{if(!t){return null}return t*j};const T=".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_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:87ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";const W=T;var D=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)};var C=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var E=undefined&&undefined.__rest||function(t,e){var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0)i[n]=t[n];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++){if(e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s]))i[n[s]]=t[n[s]]}return i};var F,I,P,R,N,G,J,V,A,L,B,H,K,X,Y,q,Q,U,Z,tt,et,it,nt,st,ot,lt,at,rt,ut,ct,ht,pt,ft,dt,mt,bt,vt,kt,gt,yt,_t,xt,wt,jt,Ot,$t,zt,St,Mt,Tt,Wt;const Dt=document.documentElement;const Ct=class{constructor(i){t(this,i);this.kupReady=e(this,"kup-input-panel-ready",6);F.add(this);I.set(this,r());P.set(this,new Map([["SmeupTreeNode",D(this,F,"m",St).bind(this)],["SmeupDataTree",D(this,F,"m",Mt).bind(this)],["SmeupTable",D(this,F,"m",Tt).bind(this)],["SmeupDataTable",D(this,F,"m",Tt).bind(this)]]));R.set(this,null);N.set(this,new Map([[u.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.COMBOBOX,["kup-combobox-iconclick"]],[u.MULTI_COMBOBOX,["kup-combobox-iconclick"]]]));G.set(this,[]);J.set(this,new Map([[u.DATE,"kup-date-picker"],[u.TIME,"kup-time-picker"]]));V.set(this,new Map([[c.BUTTON_LIST,D(this,F,"m",K).bind(this)],[c.EDITOR,D(this,F,"m",X).bind(this)],[c.LABEL,D(this,F,"m",q).bind(this)],[c.TABLE,D(this,F,"m",Y).bind(this)]]));A.set(this,new Map([[x.TAB,D(this,F,"m",it).bind(this)]]));L.set(this,[]);this.customStyle="";this.data=null;this.hiddenSubmitButton=false;this.submitCb=null;this.optionsHandler=null;this.customButtonClickHandler=null;this.inputPanelCells=[];this.tabSelected=null}onDataChanged(){C(this,R,structuredClone(this.data),"f");if(D(this,G,"f").length){D(this,G,"f").map((({event:t,handler:e})=>{this.rootElement.removeEventListener(t,e)}));C(this,G,[],"f")}if(D(this,L,"f").length){D(this,L,"f").map((t=>{D(this,I,"f").keysBinding.unregister(t)}));C(this,L,[],"f")}D(this,F,"m",ot).call(this,this.data)}async getProps(t){return h(this,w,t)}async refresh(){i(this)}async setProps(t){p(this,w,t)}componentWillLoad(){D(this,I,"f").debug.logLoad(this,false);D(this,I,"f").language.register(this);D(this,I,"f").theme.register(this);this.onDataChanged()}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});D(this,I,"f").debug.logLoad(this,true)}componentWillRender(){D(this,I,"f").debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){y(e[t])}}D(this,I,"f").debug.logRender(this,true)}render(){const t=Boolean(!this.inputPanelCells.length);const e=t?[n("p",null,D(this,I,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>D(this,F,"m",B).call(this,t)));return n(s,{key:"62cdea4b11e55aaf3a71231851f798bee78bf60e"},n("style",{key:"de02343d1c662d98d2fb9acce6222072cf61e4fb"},D(this,I,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"76c0582d6e71eff483aa177d252eea61b7804f1b",id:_},e))}disconnectedCallback(){D(this,I,"f").language.unregister(this);D(this,I,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["onDataChanged"]}}};I=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,G=new WeakMap,J=new WeakMap,V=new WeakMap,A=new WeakMap,L=new WeakMap,F=new WeakSet,B=function t(e){var i;const s=e.row.layout;const o=(s===null||s===void 0?void 0:s.horizontal)||false;let a;if(!((i=s===null||s===void 0?void 0:s.sections)===null||i===void 0?void 0:i.length)){a=e.cells.map((t=>D(this,F,"m",H).call(this,t.cell,e.row,t.column)))}else{a=s.absolute?D(this,F,"m",Z).call(this,e,s):D(this,F,"m",U).call(this,e,s)}const r={"input-panel":true,"input-panel--column":!o,"input-panel--absolute":s===null||s===void 0?void 0:s.absolute};return n("form",{class:r,name:this.rootElement.id,onSubmit:t=>{t.preventDefault();this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)}})}},a,!this.hiddenSubmitButton?n(l,{buttonType:"submit",label:D(this,I,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit"}):null)},H=function t(e,i,s){if(!e){return}const o=D(this,V,"f").get(e.shape);if(o!==undefined){return o(e,s.name)}const l={cell:e,column:s,row:i,component:this,editable:true,renderKup:true,setSizes:true};const r=D(this,F,"m",Q).call(this,e,s.title);if(r){return n("div",{class:{"input-panel__label_container":true}},r,n(a,Object.assign({},l)))}return n(a,Object.assign({},l))},K=function t(e,i){return n(l,Object.assign({icon:e.icon,id:i},e.data,{wrapperClass:"form__submit"}))},X=function t(e,i){const s="kup-editor-save";const o=t=>{const e=this.inputPanelCells.reduce(((t,{cells:e})=>{if(!t){return e.find((({column:t})=>t.name===i)).cell}return t}),null);e.value=t.detail.htmlValue.replace(/\n/g,"<br>")};this.rootElement.addEventListener(s,o);D(this,G,"f").push({event:s,handler:o});return n("kup-editor",Object.assign({},e.data,{id:i,isReadOnly:!e.isEditable,showToolbar:true}))},Y=function t(e,i){return n("kup-data-table",Object.assign({id:i,editableData:true,showGroups:true,showFilters:true,showFooter:true},e.data))},q=function t(e,i){return n("span",{class:"input-panel-label",id:i},e.value)},Q=function t(e,i){if(!i){return null}const s=Dt.ketchup.data.cell.getType(e,e.shape);if(s===u.RADIO){return n("span",null,i)}return null},U=function t(e,i){const n=D(this,A,"f").get(i.sectionsType);return n?n(e,i.sections):i.sections.map((t=>D(this,F,"m",tt).call(this,e,t)))},Z=function t(e,i){return i.sections.map((t=>D(this,F,"m",et).call(this,e,t)))},tt=function t(e,i,s=false,o={}){var l,a;const r={"input-panel__section":!i.horizontal,"input-panel__horizontal-section":i.horizontal};o.gap=+i.gap>0?`${i.gap}rem`:"1rem";let u=[];if((l=i.sections)===null||l===void 0?void 0:l.length){u=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)));const n=i.sections.some((t=>t.dim));if(!i.gridCols&&i.horizontal){o.gridTemplateColumns=n?i.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${i.sections.length}, 1fr)`}if(!i.gridRows&&!i.horizontal){o.gridTemplateRows=n?i.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${i.sections.length}, 1fr)`}}else if((a=i.content)===null||a===void 0?void 0:a.length){u=i.content.map((t=>D(this,F,"m",nt).call(this,e,t)));o.gridTemplateColumns=+i.gridCols>0?`repeat(${i.gridCols}, 1fr)`:"";o.gridTemplateRows=+i.gridRows>0?`repeat(${i.gridRows}, 1fr)`:""}const c=n("div",{class:r,style:o},u);return i.title&&!s?n("div",{class:{"input-panel__section_label_container":true}},n("h3",null,i.title),c):c},et=function t(e,i){var s,o;let l=[];if((s=i.sections)===null||s===void 0?void 0:s.length){l=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((o=i.content)===null||o===void 0?void 0:o.length){l=i.content.map((t=>D(this,F,"m",st).call(this,e,t)))}const a=`${$(i.absoluteWidth)}px`;const r=`${z(i.absoluteHeight)}px`;const u=`${S(i.absoluteRow)}px`;const c=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:a,"min-width":a,"max-width":a,height:r,"min-height":r,"max-height":r,top:u,left:c,overflow:"auto"};return n("div",{style:h},l)},it=function t(e,i){if(!this.tabSelected){this.tabSelected=i[0].id||"0"}const s=i.map(((t,e)=>({active:(t.id||`${e}`)===this.tabSelected,value:t.title,icon:t.icon,id:t.id||`${e}`})));const o=i.map(((t,i)=>{const n=t.id||`${i}`;return D(this,F,"m",tt).call(this,e,t,true,{display:this.tabSelected!==n?"none":"grid"})}));const l=".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }";if(!D(this,G,"f").map((t=>t.event)).includes("kup-tabbar-click")){const t="kup-tabbar-click";const e=t=>{this.tabSelected=t.detail.node.id};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}return n("div",{class:{"input-panel__tabs_container":true}},n("kup-tab-bar",{data:s,customStyle:l}),o)},nt=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));const o=+i.colSpan>0?i.colSpan:!(+i.colSpan>0)&&!(+i.colStart>0)?1:null;const l=o?`span ${o}`:`${i.colStart}`;const a=+i.colEnd>0?`${i.colEnd}`:"";const r=+i.rowSpan>0?i.rowSpan:!(+i.rowSpan>0)&&!(+i.rowStart>0)?1:null;const u=r?`span ${r}`:`${i.rowStart}`;const c=+i.rowEnd>0?`${i.rowEnd}`:"";const h={"grid-column-start":l,"grid-column-end":a,"grid-row-start":u,"grid-row-end":c};if(!s||!s.cell){return}return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},st=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));if(!s||!s.cell){return}let o;if(s.cell.shape==c.DATE){o=i.absoluteLength>8?i.absoluteLength:8}else{o=i.absoluteLength}const l=`${$(o)}px`;const a=`${z(1)}px`;const r=`${S(i.absoluteRow)}px`;const u=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:l,"min-width":l,"max-width":l,height:a,"min-height":a,"max-height":a,top:r,left:u,overflow:"auto"};s.cell.data=Object.assign(Object.assign({},s.cell.data),{customStyle:(s.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}"});return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},ot=function t(e){var i;const n=((i=e===null||e===void 0?void 0:e.rows)===null||i===void 0?void 0:i.length)?e.rows.reduce(((t,i)=>{const n=e.columns.filter((t=>t.visible)).map((t=>{const e=structuredClone(i.cells[t.name]);const n=e?Object.assign(Object.assign({},e),{data:D(this,F,"m",lt).call(this,e,t),slotData:D(this,F,"m",ct).call(this,e,t),isEditable:true}):null;return{column:t,cell:n}}));return[...t,{cells:n,row:i}]}),[]):[];n.map((({cells:t})=>t.map((({cell:t,column:e})=>{const i=Dt.ketchup.data.cell.getType(t,t.shape);const n=D(this,J,"f").get(i);if(!n){return}const s=this.rootElement.shadowRoot.querySelector(`${n}[id=${e.name}]`);s===null||s===void 0?void 0:s.setValue(t.value)}))));this.inputPanelCells=n},lt=function t(e,i){const n=Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e,i)),{disabled:!e.editable,id:i.name});const s=Dt.ketchup.data.cell.getType(e,e.shape);const o=e.data||{},l=E(o,["data"]);return s!==u.MULTI_AUTOCOMPLETE&&s!==u.MULTI_COMBOBOX?D(this,F,"m",at).call(this,n,Object.assign({},e.data)):Object.assign(Object.assign({},n),l)},at=function t(e,i){for(const n in i){if(i[n]instanceof Object&&!Array.isArray(i[n])&&n in e){e[n]=D(this,F,"m",t).call(this,e[n],i[n])}else{e[n]=i[n]}}return e},rt=function t(){return this.inputPanelCells.reduce(((t,e)=>{const i=Object.keys(e.row.cells).reduce(((t,i)=>{var n;const s=(n=e.cells.find((t=>t.column.name===i)))===null||n===void 0?void 0:n.cell;let o=s===null||s===void 0?void 0:s.value;if((s===null||s===void 0?void 0:s.shape)===c.TABLE){o=JSON.stringify(D(this,F,"m",$t).call(this,s.data.data,i))}return Object.assign(Object.assign({},t),{[i]:Object.assign(Object.assign({},e.row.cells[i]),{value:o,obj:s===null||s===void 0?void 0:s.obj})})}),{});return{columns:[...t.columns,...e.cells.map((t=>t.column))],rows:[...t.rows,{cells:i,layout:e.row.layout}]}}),{columns:[],rows:[]})},ut=function t(e,i){if(!e){return null}const n=e.options;const s=i.title;const o=e.value;const l=Dt.ketchup.data.cell.getType(e,e.shape);const a=new Map([[u.AUTOCOMPLETE,D(this,F,"m",dt).bind(this)],[u.BUTTON_LIST,D(this,F,"m",ft).bind(this)],[u.CHART,D(this,F,"m",pt).bind(this)],[u.CHIP,D(this,F,"m",ht).bind(this)],[u.CHECKBOX,D(this,F,"m",mt).bind(this)],[u.COLOR_PICKER,D(this,F,"m",bt).bind(this)],[u.COMBOBOX,D(this,F,"m",dt).bind(this)],[u.EDITOR,D(this,F,"m",vt).bind(this)],[u.MULTI_AUTOCOMPLETE,D(this,F,"m",ht).bind(this)],[u.MULTI_COMBOBOX,D(this,F,"m",ht).bind(this)],[u.NUMBER,D(this,F,"m",jt).bind(this)],[u.DATE,D(this,F,"m",_t).bind(this)],[u.OBJECT,D(this,F,"m",xt).bind(this)],[u.RADIO,D(this,F,"m",gt).bind(this)],[u.STRING,D(this,F,"m",kt).bind(this)],[u.SWITCH,D(this,F,"m",yt).bind(this)],[u.TABLE,D(this,F,"m",Ot).bind(this)],[u.TIME,D(this,F,"m",wt).bind(this)]]);const r=a.get(l);return r?r(n,s,o,e,i.name):null},ct=function t(e,i){const n=Dt.ketchup.data.cell.getType(e,e.shape);if(!e.editable){return null}if(n===u.CHIP){return{trailingIcon:true,label:i.title,disabled:!e.editable,id:i.name,fullWidth:false}}if(n===u.MULTI_AUTOCOMPLETE||n===u.MULTI_COMBOBOX){return Object.assign(Object.assign({},D(this,F,"m",dt).call(this,e.options,i.title,null,e,i.name)),{showDropDownIcon:true,class:"",style:{width:"100%"},disabled:!e.editable,id:i.name})}return null},ht=function t(e,i,n){return d(n)},pt=function t(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},ft=function t(e,i,n,s,o){var l,a,r,u;s.data=s.data||{};s.data.onClick=()=>{s.fun?this.customButtonClickHandler({fun:s.fun,cellId:o,currentState:D(this,F,"m",rt).call(this)}):this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)},cell:o})};if(((l=s.data)===null||l===void 0?void 0:l.keyShortcut)&&!((a=s.data)===null||a===void 0?void 0:a.disabled)){D(this,L,"f").push((r=s.data)===null||r===void 0?void 0:r.keyShortcut);D(this,I,"f").keysBinding.register((u=s.data)===null||u===void 0?void 0:u.keyShortcut,s.data.onClick.bind(this))}return Object.assign({label:s.value,fun:s.fun},s.data)},dt=function t(e,i,n,s,o){const l=m(n,i,[]);if(s.fun){const t=Dt.ketchup.data.cell.getType(s,s.shape);const e=D(this,N,"f").get(t);if(!e){return}e.map((t=>{const e=t=>{D(this,F,"m",Wt).call(this,t.detail,s.fun,l,o,n)};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}))}else if(e){l.data["kup-list"].data=D(this,F,"m",zt).call(this,e,n)}return l},mt=function t(e,i,n){return b(n,i)},bt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},vt=function t(e,i,n){return{initialValue:n}},kt=function t(e,i,n){return{label:i}},gt=function t(e,i,n){return v(n,e)},yt=function t(e,i,n){return k(n,i)},_t=function t(e,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},xt=function t(e,i,n,s,o){return{initialValue:n||"",label:i||" ",value:n||""}},wt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},jt=function t(e,i,n){return{label:i}},Ot=function t(e,i,n,s,o){try{let t=JSON.parse(s.value);if(!t){D(this,I,"f").debug.logMessage(this,`Empty value for ${o} cell.`,g.WARNING);return null}if(t.type!=="SmeupDataTable"){D(this,I,"f").debug.logMessage(this,`Wrong data table type for ${o} cell. Type \`SmeupDataTable\` in value expected`,g.ERROR);return null}return{data:{columns:t.columns.map((e=>Object.assign(Object.assign({},e),{obj:t.rows[0].cells[e.name].obj}))),rows:t.rows.map((e=>Object.assign(Object.assign({},e),{cells:Object.keys(e.cells).reduce(((i,n)=>{const s=t.columns.find((t=>t.name===n));return Object.assign(Object.assign({},i),{[n]:Object.assign(Object.assign({},e.cells[n]),{data:Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e.cells[n],s)),{disabled:e.cells[n].editable===false,id:s.id})})})}),{})})))}}}catch(t){D(this,I,"f").debug.logMessage(this,`Invalid value for ${o} cell. Type \`SmeupDataTable\` expected`,g.ERROR);return null}},$t=function t(e,i){const n=Object.assign(Object.assign({},e),{rows:e.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))});const s=e.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!s.length){return n}try{const t=JSON.parse(D(this,R,"f").rows[0].cells[i].value);n.rows=e.rows.map(((e,i)=>s.reduce(((n,s)=>{const o=t.rows[i].cells[s]&&e.cells[s].value!==t.rows[i].cells[s].value;if(o){return Object.assign(Object.assign({},t.rows[i]),{cells:Object.assign(Object.assign({},n.cells),{[s]:Object.assign(Object.assign({},t.rows[i].cells[s]),{value:e.cells[s].value})})})}return Object.assign(Object.assign({},t.rows[i]),{cells:n.cells})}),Object.assign(Object.assign({},t.rows[i]),{cells:{}}))));return n}catch(t){return n}},zt=function t(e,i){const n=D(this,P,"f").get(e.type);if(n){return n(e,i)}else{return e.map((t=>({value:t.label,id:t.id,selected:i===t.id})))}},St=function t(e,i){return e.children.map((e=>{var n;return{id:e.content.codice,value:e.content.testo,selected:i===e.content.codice,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},Mt=function t(e,i){return e.children.map((e=>{var n;return{id:e.obj.k,value:e.value,selected:i===e.obj.k,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},Tt=function t(e,i){return e.rows.map((t=>{var e;const n=t.fields||t.cells;const[s,o]=Object.keys(n);return{id:n[s].value,value:((e=n[o])===null||e===void 0?void 0:e.value)||n[s].value,selected:i===n[s].value}}))},Wt=function t(e,i,n,s,o){if(e.id!==s||e.open===false){return}this.optionsHandler(i,e.inputValue,D(this,F,"m",rt).call(this),e.id).then((t=>{var i;n.data["kup-list"].data=(i=D(this,F,"m",zt).call(this,t,o))!==null&&i!==void 0?i:[];e.comp.refresh()}))};Ct.style=W;export{Ct as kup_input_panel};
|
|
2
|
+
//# sourceMappingURL=p-44b6390c.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-d7c15b0e.js";import{F as n}from"./p-cc32b7a2.js";import{a as o}from"./p-e3062c19.js";import{F as s}from"./p-2b519589.js";import{k as f,g as _,s as h,h as p,N as m}from"./p-26030fba.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["autofitOnExpand"]="The component will autofit everytime a node is expanded.";t["autofitOnLoad"]="The component's initial render will fit the container by invoking the runAutofit method.";t["cardData"]="Used to render the family tree boxes as kup-cards (through kup-box).";t["collapsible"]="Nodes can be expanded/collapsed.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the component";t["layout"]="Layout of the boxes.";t["stackedLeaves"]="Child nodes that have no children are arranged vertically."})(u||(u={}));const d='.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_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';const y=d;var k=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(t):a?a.value:e.get(t)};var g=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,a,l){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?l.call(t,i):l?l.value=i:e.set(t,i),i};var v,x,b,w,z,j,C,E,T,W,M,S,D,L,O,P,R,A,F,X,Y,H,N,$,B;const U=class{constructor(i){t(this,i);this.kupClick=e(this,"kup-familytree-click",6);this.kupContextMenu=e(this,"kup-familytree-contextmenu",6);this.kupDblClick=e(this,"kup-familytree-dblclick",6);v.add(this);x.set(this,[]);b.set(this,false);w.set(this,0);z.set(this,0);j.set(this,[]);C.set(this,f());E.set(this,(t=>{const e=t.clientX-k(this,w,"f");const i=t.clientY-k(this,z,"f");this.rootElement.scrollTop-=i;this.rootElement.scrollLeft-=e;g(this,w,t.clientX,"f");g(this,z,t.clientY,"f")}));T.set(this,false);W.set(this,null);this.autofitOnExpand=true;this.autofitOnLoad=true;this.cardData=null;this.collapsible=true;this.customStyle="";this.data=null;this.layout=null;this.stackedLeaves=false}async collapseAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:false},true);this.refresh()}async expandAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:true},true);this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=k(this,W,"f").clientWidth;const e=k(this,W,"f").children[0].clientWidth;const i=.01;const a=85/100*t;const l=95/100*t;let r=1;let n=2e3;let o=e;while((o<a||o>l)&&n>0&&r>i){n--;if(o<a){r=r+i}else if(o>l){r=r-i}else{n=0}o=e*r}k(this,W,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){h(this,u,t)}componentWillLoad(){k(this,C,"f").debug.logLoad(this,false);k(this,C,"f").language.register(this);k(this,C,"f").theme.register(this)}componentDidLoad(){k(this,v,"m",$).call(this);if(this.autofitOnLoad){this.runAutofit()}k(this,C,"f").debug.logLoad(this,true)}componentWillRender(){k(this,C,"f").debug.logRender(this,false)}componentDidRender(){if(k(this,T,"f")){g(this,T,false,"f");this.runAutofit()}k(this,C,"f").debug.logRender(this,true)}render(){return a(l,{key:"6788b54f8c964ddeda1e5c4a7922613eb2efd59f",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault();k(this,v,"m",F).call(this,t)},onWheel:t=>{k(this,v,"m",B).call(this,t)}},a("style",{key:"40f38048045b0c3726164c999dc9fa15ea778291"},k(this,C,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"9d4209faa777da38726d8113582cbba14ace1df7",id:c},k(this,v,"m",R).call(this)))}disconnectedCallback(){k(this,C,"f").language.unregister(this);k(this,C,"f").theme.unregister(this)}get rootElement(){return r(this)}};x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,C=new WeakMap,E=new WeakMap,T=new WeakMap,W=new WeakMap,v=new WeakSet,M=function t(e,i,l,r){const n=[];n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--right":!e,"family-tree__line--top":!e}},a("div",{class:"family-tree__line--placeholder"})));n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--left":e,"family-tree__line--top":e&&!l||r&&!i}},a("div",{class:"family-tree__line--placeholder"})));return n},S=function t(e){var i;let l=null;let r=null;if(!this.collapsible||this.collapsible&&e.isExpanded){(i=e.children)===null||i===void 0?void 0:i.forEach((t=>{if(t.isStaff){if(!r){r=[]}r.push(t)}else{if(!l){l=[]}l.push(t)}}))}const s=this.stackedLeaves&&l&&l.every((t=>!t.children||t.children.length==0));const f=l?l.length*2:1;const _={"family-tree__line":true,"family-tree__line--placeholder":!!(l||r),"family-tree__line--vertical":!!(l||r)};const h={columns:[{name:"*TREECOL",title:"Fake column",visible:false},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]};const m=e.layout||this.layout||1;const c={icon:e.isExpanded?"remove":"plus",shaped:true,slim:true,styling:o.OUTLINED,title:`${k(this,C,"f").language.translate(p.EXPAND)}/${k(this,C,"f").language.translate(p.COLLAPSE)} (CTRL + Click)`,onClick:t=>{if(t.ctrlKey&&e.children&&e.children.length>0){if(e.isExpanded){this.collapseAll(e.children)}else{this.expandAll(e.children)}}e.isExpanded=!e.isExpanded;if(this.autofitOnExpand){g(this,T,true,"f")}this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;if(k(this,v,"m",A).call(this,m)){u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:h,cardData:this.cardData,layout:this.cardData?null:m,showSelection:false})}const d=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},k(this,v,"m",A).call(this,m)?u:k(this,v,"m",D).call(this,e,m),this.collapsible&&e.children&&e.children.length>0?a(n,Object.assign({},c)):undefined));const y={["--kup_familytree_staffchildren"]:(r===null||r===void 0?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":true,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||e.children.length==0)}},a("tr",null,a("td",{"data-row":e,colSpan:f},d)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":true}),style:y}),a("div",{class:"family-tree__node__staff",style:y},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},k(this,v,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>k(this,v,"m",M).call(this,l.indexOf(t)==0,l.indexOf(t)==l.length-1,l.length==1,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>k(this,v,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},k(this,v,"m",t).call(this,e)))))]:undefined)},D=function t(e,i){switch(i){case 2:return k(this,v,"m",O).call(this,e);default:return k(this,v,"m",L).call(this,e)}},L=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--1`},a("div",{class:"family-tree__item__layout__text__title"},e.value))},O=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--2`},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:e.icon,placeholderResource:e.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},e.value),e.title?a("div",{class:"family-tree__item__layout__text__subtitle"},e.title):null))},P=function t(e){return e.map((t=>k(this,v,"m",S).call(this,t)))},R=function t(){const e=!this.data||!this.data.rows||!this.data.rows.length;return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>g(this,W,t,"f")},e?a("div",null,k(this,C,"f").language.translate(p.EMPTY_DATA)):k(this,v,"m",P).call(this,this.data.rows))},A=function t(e){const i=e;return!!this.cardData||i&&i.sections&&i.sections.length>0},F=function t(e){g(this,w,e.clientX,"f");g(this,z,e.clientY,"f");k(this,W,"f").classList.add("family-tree--dragging");const i=()=>{document.removeEventListener("pointermove",k(this,E,"f"));document.removeEventListener("pointerup",i);k(this,W,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",k(this,E,"f"));document.addEventListener("pointerup",i)},X=function t(e,i){let a;let l;if(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if(!i.tagName){continue}if(i.classList.contains("family-tree__item__expand")){a=i}switch(i.tagName.toUpperCase()){case"TD":{l=i;break}}}}let r=null,n=null,o=null;if(l){r=l["data-cell"];n=l["data-column"];o=l["data-row"]}return{cell:r?r:null,column:n?n:null,expandButton:a?a:null,originalEvent:i,row:o?o:null,td:l?l:null}},Y=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},H=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},N=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},$=function t(){k(this,j,"f").push(this.rootElement);const e=t=>{if(k(this,b,"f")){g(this,b,false,"f");return}switch(t.button){case 0:const e={};for(const i in t){e[i]=t[i]}k(this,x,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",Y).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)});break}};const i=t=>{switch(t.button){case 0:for(let t=0;t<k(this,x,"f").length;t++){clearTimeout(k(this,x,"f")[t]);k(this,C,"f").debug.logMessage(this,"Cleared clickHandler timeout("+k(this,x,"f")[t]+").")}g(this,x,[],"f");this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",N).call(this,t)});break}};const a=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){g(this,b,true,"f");this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)})}};k(this,C,"f").interact.on(this.rootElement,m.TAP,e);k(this,C,"f").interact.on(this.rootElement,m.DOUBLETAP,i);k(this,C,"f").interact.on(this.rootElement,m.HOLD,a)},B=function t(e){if(e.ctrlKey){e.preventDefault();const t=parseFloat(k(this,W,"f").style.getPropertyValue("--kup_familytree_scale"))||1;const i=.05;let a=e.deltaY>0?t-i:t+i;if(a<i){a=i}k(this,W,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}};U.style=y;export{U as kup_family_tree};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-d7c15b0e.js";import{F as n}from"./p-cc32b7a2.js";import{a as o}from"./p-e3062c19.js";import{F as s}from"./p-2b519589.js";import{k as f,g as _,s as h,h as p,N as m}from"./p-8c07fd42.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["autofitOnExpand"]="The component will autofit everytime a node is expanded.";t["autofitOnLoad"]="The component's initial render will fit the container by invoking the runAutofit method.";t["cardData"]="Used to render the family tree boxes as kup-cards (through kup-box).";t["collapsible"]="Nodes can be expanded/collapsed.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the component";t["layout"]="Layout of the boxes.";t["stackedLeaves"]="Child nodes that have no children are arranged vertically."})(u||(u={}));const d='.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_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';const y=d;var k=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(t):a?a.value:e.get(t)};var g=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,a,l){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?l.call(t,i):l?l.value=i:e.set(t,i),i};var v,x,b,w,z,j,C,E,T,W,M,S,D,L,O,P,R,A,F,X,Y,H,N,$,B;const U=class{constructor(i){t(this,i);this.kupClick=e(this,"kup-familytree-click",6);this.kupContextMenu=e(this,"kup-familytree-contextmenu",6);this.kupDblClick=e(this,"kup-familytree-dblclick",6);v.add(this);x.set(this,[]);b.set(this,false);w.set(this,0);z.set(this,0);j.set(this,[]);C.set(this,f());E.set(this,(t=>{const e=t.clientX-k(this,w,"f");const i=t.clientY-k(this,z,"f");this.rootElement.scrollTop-=i;this.rootElement.scrollLeft-=e;g(this,w,t.clientX,"f");g(this,z,t.clientY,"f")}));T.set(this,false);W.set(this,null);this.autofitOnExpand=true;this.autofitOnLoad=true;this.cardData=null;this.collapsible=true;this.customStyle="";this.data=null;this.layout=null;this.stackedLeaves=false}async collapseAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:false},true);this.refresh()}async expandAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:true},true);this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=k(this,W,"f").clientWidth;const e=k(this,W,"f").children[0].clientWidth;const i=.01;const a=85/100*t;const l=95/100*t;let r=1;let n=2e3;let o=e;while((o<a||o>l)&&n>0&&r>i){n--;if(o<a){r=r+i}else if(o>l){r=r-i}else{n=0}o=e*r}k(this,W,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){h(this,u,t)}componentWillLoad(){k(this,C,"f").debug.logLoad(this,false);k(this,C,"f").language.register(this);k(this,C,"f").theme.register(this)}componentDidLoad(){k(this,v,"m",$).call(this);if(this.autofitOnLoad){this.runAutofit()}k(this,C,"f").debug.logLoad(this,true)}componentWillRender(){k(this,C,"f").debug.logRender(this,false)}componentDidRender(){if(k(this,T,"f")){g(this,T,false,"f");this.runAutofit()}k(this,C,"f").debug.logRender(this,true)}render(){return a(l,{key:"602bb95f29dfe9e017313b01a3fc485c23dd2f97",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault();k(this,v,"m",F).call(this,t)},onWheel:t=>{k(this,v,"m",B).call(this,t)}},a("style",{key:"becb707b0e477aff23e752bbb7ce335c01b428bd"},k(this,C,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"aa50336a80b5499f3241b277639bb234c9e3eee5",id:c},k(this,v,"m",R).call(this)))}disconnectedCallback(){k(this,C,"f").language.unregister(this);k(this,C,"f").theme.unregister(this)}get rootElement(){return r(this)}};x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,C=new WeakMap,E=new WeakMap,T=new WeakMap,W=new WeakMap,v=new WeakSet,M=function t(e,i,l,r){const n=[];n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--right":!e,"family-tree__line--top":!e}},a("div",{class:"family-tree__line--placeholder"})));n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--left":e,"family-tree__line--top":e&&!l||r&&!i}},a("div",{class:"family-tree__line--placeholder"})));return n},S=function t(e){var i;let l=null;let r=null;if(!this.collapsible||this.collapsible&&e.isExpanded){(i=e.children)===null||i===void 0?void 0:i.forEach((t=>{if(t.isStaff){if(!r){r=[]}r.push(t)}else{if(!l){l=[]}l.push(t)}}))}const s=this.stackedLeaves&&l&&l.every((t=>!t.children||t.children.length==0));const f=l?l.length*2:1;const _={"family-tree__line":true,"family-tree__line--placeholder":!!(l||r),"family-tree__line--vertical":!!(l||r)};const h={columns:[{name:"*TREECOL",title:"Fake column",visible:false},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]};const m=e.layout||this.layout||1;const c={icon:e.isExpanded?"remove":"plus",shaped:true,slim:true,styling:o.OUTLINED,title:`${k(this,C,"f").language.translate(p.EXPAND)}/${k(this,C,"f").language.translate(p.COLLAPSE)} (CTRL + Click)`,onClick:t=>{if(t.ctrlKey&&e.children&&e.children.length>0){if(e.isExpanded){this.collapseAll(e.children)}else{this.expandAll(e.children)}}e.isExpanded=!e.isExpanded;if(this.autofitOnExpand){g(this,T,true,"f")}this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;if(k(this,v,"m",A).call(this,m)){u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:h,cardData:this.cardData,layout:this.cardData?null:m,showSelection:false})}const d=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},k(this,v,"m",A).call(this,m)?u:k(this,v,"m",D).call(this,e,m),this.collapsible&&e.children&&e.children.length>0?a(n,Object.assign({},c)):undefined));const y={["--kup_familytree_staffchildren"]:(r===null||r===void 0?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":true,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||e.children.length==0)}},a("tr",null,a("td",{"data-row":e,colSpan:f},d)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":true}),style:y}),a("div",{class:"family-tree__node__staff",style:y},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},k(this,v,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>k(this,v,"m",M).call(this,l.indexOf(t)==0,l.indexOf(t)==l.length-1,l.length==1,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>k(this,v,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},k(this,v,"m",t).call(this,e)))))]:undefined)},D=function t(e,i){switch(i){case 2:return k(this,v,"m",O).call(this,e);default:return k(this,v,"m",L).call(this,e)}},L=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--1`},a("div",{class:"family-tree__item__layout__text__title"},e.value))},O=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--2`},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:e.icon,placeholderResource:e.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},e.value),e.title?a("div",{class:"family-tree__item__layout__text__subtitle"},e.title):null))},P=function t(e){return e.map((t=>k(this,v,"m",S).call(this,t)))},R=function t(){const e=!this.data||!this.data.rows||!this.data.rows.length;return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>g(this,W,t,"f")},e?a("div",null,k(this,C,"f").language.translate(p.EMPTY_DATA)):k(this,v,"m",P).call(this,this.data.rows))},A=function t(e){const i=e;return!!this.cardData||i&&i.sections&&i.sections.length>0},F=function t(e){g(this,w,e.clientX,"f");g(this,z,e.clientY,"f");k(this,W,"f").classList.add("family-tree--dragging");const i=()=>{document.removeEventListener("pointermove",k(this,E,"f"));document.removeEventListener("pointerup",i);k(this,W,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",k(this,E,"f"));document.addEventListener("pointerup",i)},X=function t(e,i){let a;let l;if(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if(!i.tagName){continue}if(i.classList.contains("family-tree__item__expand")){a=i}switch(i.tagName.toUpperCase()){case"TD":{l=i;break}}}}let r=null,n=null,o=null;if(l){r=l["data-cell"];n=l["data-column"];o=l["data-row"]}return{cell:r?r:null,column:n?n:null,expandButton:a?a:null,originalEvent:i,row:o?o:null,td:l?l:null}},Y=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},H=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},N=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},$=function t(){k(this,j,"f").push(this.rootElement);const e=t=>{if(k(this,b,"f")){g(this,b,false,"f");return}switch(t.button){case 0:const e={};for(const i in t){e[i]=t[i]}k(this,x,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",Y).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)});break}};const i=t=>{switch(t.button){case 0:for(let t=0;t<k(this,x,"f").length;t++){clearTimeout(k(this,x,"f")[t]);k(this,C,"f").debug.logMessage(this,"Cleared clickHandler timeout("+k(this,x,"f")[t]+").")}g(this,x,[],"f");this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",N).call(this,t)});break}};const a=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){g(this,b,true,"f");this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)})}};k(this,C,"f").interact.on(this.rootElement,m.TAP,e);k(this,C,"f").interact.on(this.rootElement,m.DOUBLETAP,i);k(this,C,"f").interact.on(this.rootElement,m.HOLD,a)},B=function t(e){if(e.ctrlKey){e.preventDefault();const t=parseFloat(k(this,W,"f").style.getPropertyValue("--kup_familytree_scale"))||1;const i=.05;let a=e.deltaY>0?t-i:t+i;if(a<i){a=i}k(this,W,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}};U.style=y;export{U as kup_family_tree};
|
|
2
|
+
//# sourceMappingURL=p-48368d6a.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as t,f as i,h as a,H as h,d as n}from"./p-d7c15b0e.js";import{k as o,g as s,s as p}from"./p-8c07fd42.js";import{c as l}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var f;(function(e){e["componentName"]="Sets the tag name of the component to be lazy loaded.";e["customStyle"]="Custom style of the component.";e["data"]="Sets the data of the component to be lazy loaded.";e["showPlaceholder"]="Displays an animated SVG placeholder until the component is loaded."})(f||(f={}));var c;(function(e){e["VIEWPORT"]="viewport";e["PROPS"]="props";e["BOTH"]="both"})(c||(c={}));const d=".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_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";const r=d;const g=class{constructor(i){e(this,i);this.kupLazyLoaded=t(this,"kup-lazy-loaded",6);this.intObserver=null;this.kupManager=o();this.lazyComponent=null;this.lazyComponentLoaded=false;this.isInViewport=false;this.componentName=null;this.customStyle="";this.data=null;this.renderMode=c.BOTH;this.showPlaceholder=true}async getProps(e){return s(this,f,e)}async getComponent(){return this.lazyComponent}async refresh(){i(this)}async setProps(e){p(this,f,e)}setObserver(){let e=e=>{e.forEach((e=>{if(e.isIntersecting){this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+".");this.isInViewport=true;this.intObserver.unobserve(this.rootElement)}}))};let t={threshold:.25};this.intObserver=new IntersectionObserver(e,t)}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this);this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement);this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){if(this.lazyComponent&&!this.lazyComponentLoaded){this.lazyComponentLoaded=true;this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})}this.kupManager.debug.logRender(this,true)}render(){let e;let t;let i=this.componentName;switch(this.componentName){case"kup-button":t=a("svg",{key:"220fa65d9836c520dfed8e3dae2700c6b2b0cb9a",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"1d1e33f3ed89c32e6ee9ad2b1996fb65037cc3f2",d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":t=a("svg",{key:"d799cc013987de74e23c34201ecd2186c57b13f1",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"de98ef94a3f714e45e56a02877d4a139a8804424",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":t=a("svg",{key:"26ad78503d5c00f5b902b2bddb782a14f1a13b73",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"03ae544d551c47e0dce8f8fbaa92b1a2a1024c55",d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":t=a("svg",{key:"cc70b61653552ff28e1b6eda65ca7bec5bbbe7d2",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"f63b011d43b7c6649e1392de9426b325259e9f38",d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":t=a("svg",{key:"3c6218a9e78c22aa2cfdd787a77fd7575409b926",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"28aaf9eb0e27fd2ad901866bd1f93ff181eba283",d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":t=a("svg",{key:"695002a63b98d0c090f350df167e2dec9b85c8f6",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"160f2450a206b3da182ef9514e41d0e9cfebd7dd",d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":t=a("svg",{key:"e7f09d307522f61e8448975f881fb435f0c585bd",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"2ad28af4bed1da877edb16db6acdc392bfbfb47b",d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":t=a("svg",{key:"c60a5e10b12c2945bdc8d0558d1fb9c46cb4ca90",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"f016960b177263ba06c3b63c4761fef4a06a4fd3",d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:t=a("svg",{key:"f221046bcd689deebeb597f557d547292518a34a",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"8cd9ec1705efd526543348dcfe793c0705399482",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break}if(this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport){let t=this.componentName;e=a(t,Object.assign({key:"b856e5475a8fc048cf96c0ee534f17fa2ad261fe"},this.data,{ref:e=>this.lazyComponent=e}));i+=" kup-loaded"}else if(this.showPlaceholder){e=t;i+=" kup-to-be-loaded"}return a(h,{key:"de01035df24b5d3811ca54bb3840bf232287103d",class:i},a("style",{key:"db6f4fe85ed90c8a17b598a4805eff35fbfc11af"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"00c41dbaa1579061edf0b9472b19e6c5c8f24eb9",id:l},e))}disconnectedCallback(){var e;this.kupManager.theme.unregister(this);(e=this.intObserver)===null||e===void 0?void 0:e.unobserve(this.rootElement)}get rootElement(){return n(this)}};g.style=r;export{g as kup_lazy};
|
|
2
|
+
//# sourceMappingURL=p-4b14b67b.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h as e}from"./p-d7c15b0e.js";import{an as n,r as t,a as l,h as o}from"./p-8c07fd42.js";import{F as r}from"./p-cc32b7a2.js";import{a}from"./p-e3062c19.js";var i;(function(e){e["SIMPLE"]="simple";e["FULL"]="full"})(i||(i={}));const s=document.documentElement;const c=c=>{if(!c.perPage){c.perPage=10}const m=Math.ceil(c.max/c.perPage);const b=u(c,m);const h=p(c);const k={"kup-list":{data:b},"kup-text-field":{label:s.ketchup.language.translate(n.PAGE),helper:s.ketchup.language.translate(n.TOTAL)+`: ${m}`,helperWhenFocused:true,inputType:"number",max:m,min:1}};const g={"kup-list":{data:h},"kup-text-field":{label:s.ketchup.language.translate(t.ROWS)+" / "+s.ketchup.language.translate(n.PAGE),helper:s.ketchup.language.translate(t.TOTAL)+`: ${c.max}`,helperWhenFocused:true,inputType:"number",max:c.max,min:1}};return e("div",Object.assign({class:`f-paginator ${c.mode?c.mode:""} ${c.wrapperClass?c.wrapperClass:""}`},c.dataSet,{id:c.id,title:c.title}),c.onLoadMore?e(r,{icon:"plus",onClick:c.onLoadMore,label:s.ketchup.language.translate(o.LOAD_MORE),sizing:l.MEDIUM,styling:a.FLAT,wrapperClass:"load-more-button kup-neutral"}):null,e("kup-combobox",{class:"rows-selector",data:g,initialValue:c.perPage.toString(),"onkup-combobox-change":c.onRowsChange}),e("kup-combobox",{class:"page-selector",data:k,initialValue:c.currentPage.toString(),"onkup-combobox-change":c.onPageChange}),e("div",{class:"arrow-wrapper"},c.mode!==i.SIMPLE?e(r,{icon:"chevron_left",disabled:f(c),onClick:c.onPrevPage,sizing:l.MEDIUM,styling:a.FLAT,wrapperClass:"kup-neutral prev-page"}):null,c.mode!==i.SIMPLE?e(r,{icon:"chevron_right",disabled:d(c),onClick:c.onNextPage,sizing:l.MEDIUM,styling:a.FLAT,wrapperClass:"kup-neutral next-page"}):null))};function u(e,n){const t=[];for(let l=1;l<=n;l++){const n=l==e.currentPage;t.push({id:l.toString(),selected:n,value:l.toString()})}return t}function p(e){const n=[];let t=e.perPage;if(t===0){return n}while(t<e.max){const l=t==e.perPage;n.push({id:t.toString(),selected:l,value:t.toString()});t=t*2}const l=e.max==e.perPage;n.push({id:e.max.toString(),selected:l,value:e.max.toString()});return n}function d(e){return e.currentPage*e.perPage>=e.max}function f(e){return e.currentPage==1}const m=document.documentElement;function b(e,n,t){if(m.ketchup.math.isNumber(e)){const l=Math.ceil(n/t);let o=e;if(o>l){o=l}if(o<1){o=1}return o}return null}function h(e,n){if(m.ketchup.math.isNumber(e)){let t=e;if(t>n){t=n}if(t<1){t=1}return t}return null}export{c as F,b as p,h as r};
|
|
2
|
+
//# sourceMappingURL=p-544eca9d.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as e,f as i,h as n,F as a,H as f,d as o}from"./p-d7c15b0e.js";import{k as p,g as s,s as h,h as r}from"./p-8c07fd42.js";import{c as l}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var c;(function(t){t["data"]="Data of the component containing url or html"})(c||(c={}));const m=".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{height:100%;width:100%;display:block}#kup-component{height:100%}#kup-component .kup-htm.is-link{height:100%}#kup-component .kup-htm.is-link a{float:left}#kup-component .kup-htm.is-link iframe{height:100%;width:100%}";const g=m;var u=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)};var k;const d=class{constructor(i){t(this,i);this.kupReady=e(this,"kup-htm-ready",6);k.set(this,p());this.data=undefined}async getProps(t){return s(this,c,t)}async refresh(){i(this)}async setProps(t){h(this,c,t)}componentWillLoad(){u(this,k,"f").debug.logLoad(this,false);u(this,k,"f").theme.register(this);u(this,k,"f").language.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});u(this,k,"f").debug.logLoad(this,true)}componentWillRender(){u(this,k,"f").debug.logRender(this,false)}componentDidRender(){u(this,k,"f").debug.logRender(this,true)}render(){const t=u(this,k,"f").objects.isLink(this.data.obj);return n(f,{key:"e973cfb80ddc6aba894dd2994b3be82fc93a07bc"},n("style",{key:"cd5f18859b77dfbaa1008cfe37183e18780b8e38"},u(this,k,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"69a912436a0c644bbe0ca38efe2aff60c31b15e4",id:l},n("div",{key:"5e057d8c92cbfd479a57c10c205e96be51475007",class:`kup-htm ${t?"is-link":""}`},t?n(a,null,n("a",{href:this.data.value,target:"_blank",rel:"noopener noreferrer"},u(this,k,"f").language.translate(r.OPEN_IN_NEW_TAB)),n("iframe",{src:this.data.value,frameBorder:"0"})):n("div",{innerHTML:this.data.value}))))}disconnectedCallback(){u(this,k,"f").theme.unregister(this);u(this,k,"f").language.unregister(this)}get rootElement(){return o(this)}};k=new WeakMap;d.style=g;export{d as kup_htm};
|
|
2
|
+
//# sourceMappingURL=p-5e889cbc.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["KupHTMProps","kupHtmCss","KupHtmStyle0","KupHTM","_KupHTM_kupManager","set","this","kupManagerInstance","getProps","descriptions","refresh","forceUpdate","setProps","props","componentWillLoad","__classPrivateFieldGet","debug","logLoad","theme","register","language","componentDidLoad","kupReady","emit","comp","id","rootElement","componentWillRender","logRender","componentDidRender","render","isLink","objects","data","obj","h","Host","key","setKupStyle","componentWrapperId","class","Fragment","href","value","target","rel","translate","KupLanguageGeneric","OPEN_IN_NEW_TAB","src","frameBorder","innerHTML","disconnectedCallback","unregister"],"sources":["src/components/kup-htm/kup-htm-declarations.ts","src/components/kup-htm/kup-htm.scss?tag=kup-htm&encapsulation=shadow","src/components/kup-htm/kup-htm.tsx"],"sourcesContent":["/**\n * Props of the kup-htm component.\n * Used to export every prop in an object.\n */\nexport enum KupHTMProps {\n data = 'Data of the component containing url or html',\n}\n",":host {\n height: 100%;\n width: 100%;\n display: block;\n}\n\n#kup-component {\n height: 100%;\n .kup-htm.is-link {\n height: 100%;\n a {\n float: left;\n }\n iframe {\n height: 100%;\n width: 100%;\n }\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Host,\n Method,\n Prop,\n Fragment,\n} from '@stencil/core';\nimport {\n KupManager,\n kupManagerInstance,\n} from '../../managers/kup-manager/kup-manager';\nimport { KupDataCell } from '../../managers/kup-data/kup-data-declarations';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport {\n GenericObject,\n KupComponent,\n KupEventPayload,\n} from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport { KupHTMProps } from './kup-htm-declarations';\nimport { KupLanguageGeneric } from '../../managers/kup-language/kup-language-declarations';\n\n@Component({\n tag: 'kup-htm',\n styleUrl: 'kup-htm.scss',\n shadow: true,\n})\nexport class KupHTM {\n /**\n * References the root HTML element of the component (<kup-htm>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Data containing the url or html.\n * @default null\n */\n @Prop() data: KupDataCell;\n\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n #kupManager: KupManager = kupManagerInstance();\n\n /*-------------------------------------------------*/\n /* E v e n t s */\n /*-------------------------------------------------*/\n\n /**\n * Triggered when the component is ready.\n */\n @Event({\n eventName: 'kup-htm-ready',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupReady: EventEmitter<KupEventPayload>;\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n /**\n * Used to retrieve component's props values.\n * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.\n * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.\n */\n @Method()\n async getProps(descriptions?: boolean): Promise<GenericObject> {\n return getProps(this, KupHTMProps, descriptions);\n }\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async refresh(): Promise<void> {\n forceUpdate(this);\n }\n /**\n * Sets the props to the component.\n * @param {GenericObject} props - Object containing props that will be set to the component.\n */\n @Method()\n async setProps(props: GenericObject): Promise<void> {\n setProps(this, KupHTMProps, props);\n }\n\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.#kupManager.debug.logLoad(this, false);\n this.#kupManager.theme.register(this);\n this.#kupManager.language.register(this);\n }\n\n componentDidLoad() {\n this.kupReady.emit({\n comp: this,\n id: this.rootElement.id,\n });\n this.#kupManager.debug.logLoad(this, true);\n }\n\n componentWillRender() {\n this.#kupManager.debug.logRender(this, false);\n }\n\n componentDidRender() {\n this.#kupManager.debug.logRender(this, true);\n }\n\n render() {\n const isLink = this.#kupManager.objects.isLink(this.data.obj);\n\n return (\n <Host>\n <style>\n {this.#kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div id={componentWrapperId}>\n <div class={`kup-htm ${isLink ? 'is-link' : ''}`}>\n {isLink ? (\n <Fragment>\n <a\n href={this.data.value}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {this.#kupManager.language.translate(\n KupLanguageGeneric.OPEN_IN_NEW_TAB\n )}\n </a>\n <iframe\n src={this.data.value}\n frameBorder=\"0\"\n ></iframe>\n </Fragment>\n ) : (\n <div innerHTML={this.data.value} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n this.#kupManager.theme.unregister(this);\n this.#kupManager.language.unregister(this);\n }\n}\n"],"mappings":"mMAIA,IAAYA,GAAZ,SAAYA,GACRA,EAAA,sDACH,EAFD,CAAYA,MAAW,KCJvB,MAAMC,EAAY,ypEAClB,MAAAC,EAAeD,E,yWC+BFE,EAAM,M,iEAoBfC,EAAAC,IAAAC,KAA0BC,K,oBA2B1B,cAAMC,CAASC,GACX,OAAOD,EAASF,KAAMN,EAAaS,E,CAMvC,aAAMC,GACFC,EAAYL,K,CAOhB,cAAMM,CAASC,GACXD,EAASN,KAAMN,EAAaa,E,CAOhC,iBAAAC,GACIC,EAAAT,KAAIF,EAAA,KAAaY,MAAMC,QAAQX,KAAM,OACrCS,EAAAT,KAAIF,EAAA,KAAac,MAAMC,SAASb,MAChCS,EAAAT,KAAIF,EAAA,KAAagB,SAASD,SAASb,K,CAGvC,gBAAAe,GACIf,KAAKgB,SAASC,KAAK,CACfC,KAAMlB,KACNmB,GAAInB,KAAKoB,YAAYD,KAEzBV,EAAAT,KAAIF,EAAA,KAAaY,MAAMC,QAAQX,KAAM,K,CAGzC,mBAAAqB,GACIZ,EAAAT,KAAIF,EAAA,KAAaY,MAAMY,UAAUtB,KAAM,M,CAG3C,kBAAAuB,GACId,EAAAT,KAAIF,EAAA,KAAaY,MAAMY,UAAUtB,KAAM,K,CAG3C,MAAAwB,GACI,MAAMC,EAAShB,EAAAT,KAAIF,EAAA,KAAa4B,QAAQD,OAAOzB,KAAK2B,KAAKC,KAEzD,OACIC,EAACC,EAAI,CAAAC,IAAA,4CACDF,EAAA,SAAAE,IAAA,4CACKtB,EAAAT,KAAIF,EAAA,KAAac,MAAMoB,YACpBhC,KAAKoB,cAGbS,EAAA,OAAAE,IAAA,2CAAKZ,GAAIc,GACLJ,EAAA,OAAAE,IAAA,2CAAKG,MAAO,WAAWT,EAAS,UAAY,MACvCA,EACGI,EAACM,EAAQ,KACLN,EAAA,KACIO,KAAMpC,KAAK2B,KAAKU,MAChBC,OAAO,SACPC,IAAI,uBAEH9B,EAAAT,KAAIF,EAAA,KAAagB,SAAS0B,UACvBC,EAAmBC,kBAG3Bb,EAAA,UACIc,IAAK3C,KAAK2B,KAAKU,MACfO,YAAY,OAIpBf,EAAA,OAAKgB,UAAW7C,KAAK2B,KAAKU,U,CAQlD,oBAAAS,GACIrC,EAAAT,KAAIF,EAAA,KAAac,MAAMmC,WAAW/C,MAClCS,EAAAT,KAAIF,EAAA,KAAagB,SAASiC,WAAW/C,K","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as r,f as e,h as o,H as a,d as i}from"./p-d7c15b0e.js";import{k as n,g as p,s}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as r,f as e,h as o,H as a,d as i}from"./p-d7c15b0e.js";import{k as n,g as p,s}from"./p-8c07fd42.js";import{c as l}from"./p-635bb4b3.js";import"./p-029c7cbe.js";const d="drawer";var c;(function(t){t["customStyle"]="Custom style of the component.";t["opened"]="Defaults at false. When set to true, the drawer appears."})(c||(c={}));const h=".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_drawer_backdrop:var(--kup-drawer-backdrop, rgba(0, 0, 0, 0.32));--kup_drawer_box_shadow:var(\n --kup-drawer-box-shadow,\n 0 8px 10px -5px rgba(0, 0, 0, 0.2),\n 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12)\n );--kup_drawer_slotted_color:var(\n --kup-drawer-slotted-color,\n var(--kup-text-secondary)\n );--kup_drawer_background_color:var(\n --kup-drawer-background-color,\n var(--kup-layer-1)\n );--kup_drawer_permanent_border:var(\n --kup-drawer-permanent-border,\n 1px solid var(--kup-border-subtle)\n );--kup_drawer_slide_transition:var(--kup-drawer-slide-transition, 300ms);--kup_drawer_transition:var(--kup-drawer-transition, 250ms);box-shadow:var(--kup_drawer_box_shadow);display:block;height:100vh;left:calc(var(--kup-drawer-width) * -1);position:fixed;top:0;transition:left var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1), right var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1);width:var(--kup-drawer-width);z-index:var(--kup-drawer-zindex)}#kup-component{height:100%;width:100%}.backdrop{background:var(--kup_drawer_backdrop);display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--kup-drawer-zindex)}.drawer{height:100%;position:fixed;width:var(--kup-drawer-width);z-index:calc(var(--kup-drawer-zindex) + 1)}.drawer__content{background-color:var(--kup_drawer_background_color);box-sizing:border-box;height:100%;overflow-y:auto;width:100%}.drawer ::slotted(*){--kup-button-primary-color:var(--kup_drawer_slotted_color);--kup-button-primary-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-button-primary-color-h:var(--kup_drawer_slotted_color-h);--kup-button-primary-color-s:var(--kup_drawer_slotted_color-s);--kup-button-primary-color-l:var(--kup_drawer_slotted_color-l);--kup-switch-label-color:var(--kup_drawer_slotted_color);--kup-switch-primary-color:var(--kup_drawer_slotted_color);--kup-switch-primary-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-textfield-color:var(--kup_drawer_slotted_color);--kup-textfield-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-textfield-primary-color:var(--kup_drawer_slotted_color);--kup-textfield-primary-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-tree-color:var(--kup_drawer_slotted_color);--kup-tree-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-tree-filter-background-color:var(--kup-drawer-background-color);--kup-tree-icon-color:var(--kup_drawer_slotted_color);color:var(--kup_drawer_slotted_color);fill:var(--kup_drawer_slotted_color)}:host([kup-opened]){left:0}:host([kup-opened]) .backdrop{display:block}:host(.kup-right){left:unset;right:-100%}:host([kup-opened].kup-right){right:0}:host(.kup-permanent){box-shadow:unset;transition:all 250ms}:host(.kup-permanent) .backdrop{display:none}:host(.kup-permanent) .drawer{position:relative}:host(.kup-permanent) .drawer__content{border-right:var(--kup_drawer_permanent_border)}";const u=h;const f=class{constructor(e){t(this,e);this.kupDrawerClose=r(this,"kup-drawer-close",6);this.kupDrawerOpen=r(this,"kup-drawer-open",6);this.kupDrawerReady=r(this,"kup-drawer-ready",6);this.kupManager=n();this.opened=false;this.customStyle=""}async close(){this.opened=false;this.kupDrawerClose.emit({comp:this,id:this.rootElement.id})}async getProps(t){return p(this,c,t)}async isOpened(){return this.opened}async open(){this.opened=true;this.kupDrawerOpen.emit({comp:this,id:this.rootElement.id})}async refresh(){e(this)}async setProps(t){s(this,c,t)}async toggle(){if(this.opened){this.close()}else{this.open()}}content(){const t=[];const r=Array.prototype.slice.call(this.rootElement.children,0);const e=[];for(let e=0;e<r.length;e++){t.push(o("slot",null))}e.push(o("div",{class:`${d}__content`},t));return e}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.kupDrawerReady.emit({comp:this,id:this.rootElement.id});this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){return o(a,{key:"47b6e1195efa7ac6696505f19808aaeed8804c81","kup-opened":this.opened},o("style",{key:"2ae05ab9c05ad338fa42f7ea827139883dc370c9"},this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{key:"9574a0c126fbedb4022932c0388d96874bca3a71",class:"backdrop",onClick:t=>{t.preventDefault();t.stopPropagation()},onPointerDown:t=>{t.preventDefault();t.stopPropagation();this.close()},onTouchStart:t=>{t.preventDefault();t.stopPropagation()}}),o("div",{key:"bb38d8793e68860b78c53a82e067e5ee765db93b",id:l},o("div",{key:"fb7a2c5bc9cd9fcac56a6e7e73066995e31e78b3",class:d},this.content())))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};f.style=u;export{f as kup_drawer};
|
|
2
|
+
//# sourceMappingURL=p-6d51f043.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as e,H as t,D as l,B as n,af as i,v as r,x as s,ah as o,ai as a,J as u,e as f,F as c,aj as h,aa as d,ak as b,al as p,am as m,a1 as v}from"./p-26030fba.js";import{K as F}from"./p-029c7cbe.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,false)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,true)}_getTextFilterValue(e={},t,l){let n="";if(e==null){return n}let i=e[t];if(i==null){return n}n=l?i.textFieldTmp:i.textField;return n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,false)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,true)}_hasFiltersForColumn(e={},t,l){if(!t){return false}let n=this._getTextFilterValue(e,t.name,l);if(n!=null&&n.trim()!=""){return true}if(this._hasIntervalTextFieldFilterValues(e,t,l)){return true}let i=this.getCheckBoxFilterValues(e,t.name);if(i==null||i.length<1){return false}return true}getCheckBoxFilterValues(e={},t){let l=[];if(e==null){return l}let n=e[t];if(n==null){return l}if(n.checkBoxes==null){return l}l=n.checkBoxes;return l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,false)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,true)}_hasIntervalTextFieldFilterValues(e={},l,n){if(l==null){return false}if(!this.isColumnFiltrableByInterval(l)){return false}let i=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(i!=null&&i.trim()!=""){return true}let r=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);if(r!=null&&r.trim()!=""){return true}return false}addCheckboxFilter(t={},l,n){if(t==null){return}let i=t[l];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};t[l]=i}if(i.checkBoxes==null){i.checkBoxes=[]}if(n==null||n.value==null){i.checkBoxes=[]}else{if(!e.valuesArrayContainsValue(i.checkBoxes,n.value)){i.checkBoxes[i.checkBoxes.length]=n}}}removeCheckboxFilter(t={},l,n){if(t==null||n==null){return}let i=t[l];if(i==null){return}if(i.checkBoxes==null){i.checkBoxes=[]}let r=e.indexOfValueInValuesArray(i.checkBoxes,n);if(r>=0){let e=[];for(let t=0;t<i.checkBoxes.length;t++){if(t!=r){e[e.length]=i.checkBoxes[t]}}i.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,false)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,true)}_getIntervalTextFieldFilterValues(e={},l,n){if(!this._hasIntervalTextFieldFilterValues(e,l,n)){return["",""]}let i=[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)];return i}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,false)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,true)}_getIntervalTextFieldFilterValue(e={},t,l,n){let i="";if(e==null){return i}let r=e[t];if(r==null){return i}if(n&&r.intervalTmp==null){return i}if(!n&&r.interval==null){return i}i=n?r.intervalTmp[l]:r.interval[l];return i}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,true)}_setTextFieldFilterValue(e={},t,l,n){if(e==null){return}let i=e[t];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=i}if(n){i.textFieldTmp=l!=null?l.trim():l}else{i.textField=l!=null?l.trim():l}}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,true)}_setIntervalTextFieldFilterValue(e={},t,l,n,i){if(e==null){return}let r=e[t];if(r==null){r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=r}if(r.interval==null){r.interval=[];r.interval.push("","")}if(r.intervalTmp==null){r.intervalTmp=[];r.intervalTmp.push("","")}if(i){r.intervalTmp[n]=l!=null?l.trim():l}else{r.interval[n]=l!=null?l.trim():l}}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,false)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,true)}getFilterValueForTooltip(e={},i){let r=this.getTextFilterValue(e,i.name);let s=this.getIntervalTextFieldFilterValues(e,i);let o=this.getCheckBoxFilterValues(e,i.name);let a="";let u=l(r,i.obj,i.decimals);if(r!=""){a=" AND "}if(s[t.FROM]!=""){u+=a+"(>= "+l(s[t.FROM],i.obj,i.decimals)+")";a=" AND "}if(s[t.TO]!=""){u+=a+"(<= "+l(s[t.TO],i.obj,i.decimals)+")";a=" AND "}a="";let f="";o.forEach((e=>{f+=a+n(e,i);a=" OR "}));if(f!=""){f="("+f+")";if(u!=""){f=" AND "+f}}f=u+f;return f}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;(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."})(x||(x={}));const T="TREE_COLUMN";var k;(function(e){e["DROPDOWN"]="dropdown";e["NODE"]="node"})(k||(k={}));const g=document.documentElement;const j=g.ketchup?g.ketchup.objects:new s;const y=g.ketchup?g.ketchup.data:new o;class O extends e{isFilterCompliantForCell(e,t,l){if(!e){return false}return this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){if(!e){return false}if(!e.obj){return false}return this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=false,i=[],r){return this.areCellsCompliant(e.cells,t,l,n,i,r)}areCellsCompliant(e,t={},l="",n=false,s=[],o){if(n){let t=true;if(s&&s!=null&&s.length>0){t=false;let n=this.filterIsNegative(l);for(let r=0;r<s.length;r++){if(s[r].visible==false){continue}const o=e[s[r].name];if(o==null){continue}t=this.isFilterCompliantForValue(o.value,l);let a=i(s[r],o);if(a!=o.value){t=t||this.isFilterCompliantForValue(a,l)}if(t==true&&!n){break}if(t==false&&n){break}}}if(!t){return false}}if(o==null){o=new w}if(!this.hasFilters(t,s,o)){return true}let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const i=e[n];if(!i){return false}let u=o.getTextFilterValue(t,n);let f=o.getIntervalTextFieldFilterValues(t,r(s,n));const c=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(i,u,f);let d=c;if(!j.isNumber(i.obj)&&!j.isDate(i.obj)&&!j.isTime(i.obj)&&!j.isTimestamp(i.obj)){d=this.isFilterCompliantForCellObj(i,u,f)}if(c){if(!h||!d){return false}}else{if(!h&&!d){return false}}let b=o.getCheckBoxFilterValues(t,n);if(b.length==0){continue}let p=false;for(let e=0;e<b.length;e++){let t=b[e];if(t==null||t.value==null){continue}if(i.value!=null){if(i.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}if(i.obj!=null){if(i.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}}if(!p){return false}}return true}hasFilters(e={},t,l){if(e==null){return false}let n=Object.keys(e);if(n==null||n.length<1){return false}if(l==null){l=new w}for(let i=0;i<n.length;i++){let s=n[i];let o=null;if(s===T){o={name:T,title:""}}else{o=r(t,s)}if(l.hasFiltersForColumn(e,o)){return true}}return false}filterRows(e=[],t={},l="",n=[],i){if(!e||e==null){return[]}let r=[];const s=!!(l&&n);if(this.hasFilters(t,n,i)||s){for(let o=0;o<e.length;o++){let a=e[o];if(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,s,n,i)){r[r.length]=a}}}else{r=[...e]}return r}getColumnValues(t,n,i,r){let s=new Array;if(r==null){r=new w}let o=r.getTextFilterValueTmp(t.filters,n.name);let a=r.getIntervalTextFieldFilterValuesTmp(t.filters,n);let u=r.getCheckBoxFilterValues(t.filters,n.name);if(n.valuesForFilter!=null&&n.valuesForFilter.length>0){n.valuesForFilter.forEach((t=>{let i=t;if(e.valuesArrayContainsValue(u,i)||o==""||r.isFilterCompliantForSimpleValue(i,n.obj,o,a)){s.push({value:i,displayedValue:l(i,n.obj,n.decimals)})}}));return s}let f=Object.assign({},t.filters);f[n.name]={textField:o,textFieldTmp:o,checkBoxes:[],interval:a,intervalTmp:a};let c=this.filterRows(t.getRows(),f,i,t.getVisibleColumns(),r);for(let e=0;e<u.length;e++){s.push(u[e])}return y.cell.getUnivocalValue({rows:c},n,true)}}const V=document.documentElement;function C(e=[],t=[]){if(!e||e.length===0){return[]}if(e[0].group){return I(e,t)}if(!t||t.length===0){return e}const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const i=M(e,n,t[l]);if(i!==0){return i}}return 0}else{return M(e,n,t[0])}}))}function I(e=[],t=[]){if(!e||e.length===0){return[]}const l=e[0].group.column;let n=B(l,t);if(!n){n={column:l,sortMode:v.A}}e.sort(((e,t)=>{const l={obj:e.group.obj,value:e.group.id};const i={obj:t.group.obj,value:t.group.id};return a(l,i,n.sortMode)}));e.forEach((e=>{e.group.children=C(e.group.children,t)}));return e}function B(e="",t=[]){if(!e||!t||t.length===0){return null}for(let l of t){if(l.column===e){return l}}return null}function M(e,t,l){const n=e.cells[l.column];const i=t.cells[l.column];if(!n&&!i){return 0}if(!n){return 1}if(!i){return-1}return a(n,i,l.sortMode)}function N(e=[],t={},l="",n=[],i,r){if(r==null){r=new O}return r.filterRows(e,t,l,n,i)}function _(e=[],t=[],l=[],n={}){if(!t){return[]}if(!l||l.length===0||!e||e.length===0){return t}const s={};const o=l.filter((({column:t})=>{for(let{name:l,title:n}of e){if(l===t){s[l]=n;return true}}return false}));if(o.length===0){return t}const a=[];let f={};t.forEach((t=>{const l=o[0].column;const u=t.cells[l];if(u){const c=r(e,l);const h=i(c,u);const d=u.value;let b=null;for(let e of a){if(e.group.label===h){b=e;break}}if(b===null){b={group:{id:d,parent:null,column:l,columnLabel:s[l],expanded:false,label:h,children:[],obj:u.obj,totals:{}},cells:{}};a.push(b)}for(let l=1;l<o.length;l++){const n=o[l];const a=t.cells[n.column];if(a){const t=r(e,n.column);const l=i(t,a);const o=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];const n=t.group.label;if(n===l){u=t;break}}if(!u){u={cells:{},group:{id:o,parent:b,column:n.column,columnLabel:s[n.column],children:[],expanded:false,label:l,totals:{},obj:a.obj}};R(u);b.group.children.push(u)}b=u}}b.group.children.push(t);A(b,n,t,f)}}));D(a,n,f);S(a,u.AVERAGE,n);S(a,u.MATH,n);return a}function A(e,t,l,n){if(!e||!t){return}const i=Object.keys(t);if(i.length===0){return}i.forEach((i=>{const r=l.cells[i];if(r){const l=V.ketchup.objects.isNumber(r.obj);const s=t[i];switch(s){case u.COUNT:let t=e.group.totals[i]||0;e.group.totals[i]=++t;let o=e.group.parent;while(o!=null){let e=o.group.totals[i]||0;o.group.totals[i]=++e;o=o.group.parent}break;case u.DISTINCT:let a;if(l){a=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value))}else{a=r.value}let f=n[e.group.id];if(!f){n[e.group.id]={};n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{let t=n[e.group.id][i];if(!t){n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{t.push(a)}}let c=e.group.parent;while(c!=null){let e=n[c.group.id];if(!e){n[c.group.id]={};n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{let e=n[c.group.id][i];if(!e){n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{e.push(a)}}c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&r.value){const t=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));const l=e.group.totals[i]||0;e.group.totals[i]=t+l;let n=e.group.parent;while(n!=null){const e=V.ketchup.math.numberify(n.group.totals[i]||0);n.group.totals[i]=t+e;n=n.group.parent}}break;case u.MIN:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.min(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.min(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;case u.MAX:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.max(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.max(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;default:{if(s.indexOf(u.MATH)!=0){console.warn(`invalid total mode: ${s}`)}break}}}}))}function D(e,t,l){if(!e||!t){return}const n=Object.keys(t);if(e.length===0||!e[0].group||n.length===0){return}let i=n.filter((e=>u.DISTINCT===t[e]));if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,i,l)))}}function S(e,t,l){if(!e||!l){return}const n=Object.keys(l);if(e.length===0||!e[0].group||n.length===0){return}let i;if(t==u.AVERAGE){i=n.filter((e=>u.AVERAGE===l[e]))}if(t==u.MATH){i=n.filter((e=>l[e].indexOf(u.MATH)==0))}if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,i,l)))}}function W(e,t,l){const n=e.group.children;if(n.length===0){return}if(n[0].group){n.forEach((e=>{W(e,t,l)}))}t.forEach((t=>{const n=l[e.group.id][t];e.group.totals[t]=new Set(n).size}))}function E(e,t,l,n){const i=e.group.children;if(i.length===0){return 0}let r=0;if(i[0].group){i.forEach((e=>{r+=E(e,t,l,n)}))}else{r=i.length}l.forEach((l=>{if(t==u.AVERAGE){e.group.totals[l]=e.group.totals[l]/r}if(t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=V.ketchup.math.formulas.custom(t,e.group.totals)}}));return r}function L(e,t){if(t){const l=Object.assign(t);t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];if(l&&e.obj&&!l.obj){l.obj={t:e.obj.t,p:e.obj.p,k:l.value}}}}))}));return l}else{return undefined}}function $(e=[],t={}){if(V.ketchup.objects.isEmptyJsObject(e)||V.ketchup.objects.isEmptyJsObject(t)){return{}}const l=Object.keys(t);const n={};const i=new Array;let r=l.length===0||l.every((e=>t[e]===u.COUNT));if(r){l.forEach((t=>n[t]=e.length))}else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>u.COUNT!==t[e]&&t[e].indexOf(u.MATH)!=0)).forEach((l=>{const a=e.cells[l];if(a){if(t[l]===u.DISTINCT){let e;if(V.ketchup.objects.isNumber(a.obj)){e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value))}else{e=a.value}let t=r[l];if(!t){r[l]=[];r[l].push(e)}else{t.push(e)}}else if(V.ketchup.objects.isNumber(a.obj)){const e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value));let i=n[l];switch(true){case t[l]===u.MIN:if(i){n[l]=Math.min(i,e)}else{n[l]=e}break;case t[l]===u.MAX:if(i){n[l]=Math.max(i,e)}else{n[l]=e}break;default:i=n[l]||0;n[l]=e+V.ketchup.math.numberify(i)}}else if(V.ketchup.objects.isDate(a.obj)){if(i.indexOf(l)==-1){i.push(l)}if(V.ketchup.dates.isValidFormattedStringDate(a.value)){const e=V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(a.value));const i=n[l]?V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(n[l])):null;switch(true){case t[l]===u.MIN:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break;case t[l]===u.MAX:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break}}}}if(s===o.length-1&&t[l]===u.DISTINCT){n[l]=new Set(r[l]).size;r[l]=[]}}))}))}for(let r of l){switch(true){case t[r]===u.AVERAGE:const l=n[r];if(l&&e.length>0){n[r]=l/e.length}break;case t[r]===u.COUNT:n[r]=e.length;break;case t[r].indexOf(u.MATH)==0:n[r]=V.ketchup.math.formulas.custom(t[r].substring(u.MATH.length),n);break}if(n[r]){if(i.indexOf(r)!=-1){n[r]=V.ketchup.dates.format(n[r])}else if(V.ketchup.math.isNumber(n[r])){n[r]=+n[r].toFixed(2)}}}return n}function R(e){if(!e.group){return}let t=e.group.id;let l=e.group.parent;while(l!==null){t=`${l.group.id};${t}`;l=l.group.parent}e.group.id=t}function q(e,t,l,n){const i=t*l-l;const r=i+Number(l);if(n==false){return e.slice(i,r)}let s=[];z(e,s,i,Number(l),0);return s}function z(e,t,l,n,i){let r=false;for(let s=0;s<e.length;s++){let o=e[s];let a=J(e[s]);if(o.group!=null&&o.group.children!=null&&o.group.children.length>0){a.group.children=[];let e=z(o.group.children,a.group.children,l,n,i);i=e.ci;r=e.added;if(r==true){t[t.length]=a}}else{if(i>=l){t[t.length]=a;r=true}i++}if(i>=l+n){break}}return{ci:i,added:r}}function J(e){if(e==null){return null}else{return{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:H(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}}function K(e){if(e==null){return null}let t=[];for(let l=0;l<e.length;l++){t[t.length]=J(e[l])}return t}function H(e){if(e==null){return null}let t={id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:K(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)};return t}function U(e,t,l=false){const n={columns:t.columns,rows:[]};for(const i of t.rows){const r={cells:{},id:i.id};for(const l of t.columns){const t=l.name;const n=i.cells[t];const s=e.rows.find((e=>e.id===i.id));const o=s?s.cells[t]:null;if(!o||n.value!==o.value){r.cells[t]=n}}if(Object.keys(r.cells).length>0||l){n.rows.push(r)}}return n}function G(e){var t;(t=e.rows)===null||t===void 0?void 0:t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const i=n.value;const r=n["options"];n.isEditable=(l=n.isEditable)!==null&&l!==void 0?l:n["editable"];if(r){const e={[c.AUTOCOMPLETE]:()=>h(i,"",r),[c.COMBOBOX]:()=>h(i,"",r),[c.RADIO]:()=>d(i,r),[c.CHECKBOX]:()=>b(i,r),[c.CHIP]:()=>p(i),[c.SWITCH]:()=>m(i,"")};const t=e[n.shape];if(t){n.data=t()}else{if(n.shape){V.ketchup.debug.logMessage("kup-data",`Shape specified ${n.shape} in cell ${JSON.stringify(n)} unsupported`,f.WARNING)}}}}))}))}export{w as F,k as K,O as a,_ as b,$ as c,G as d,x as e,N as f,U as g,L as n,q as p,C as s,T as t};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{C as e,H as t,D as l,B as n,ag as i,v as r,x as s,ai as o,aj as a,J as u,e as f,F as c,ab as h,aa as d,ak as b,al as p,am as m,a1 as v}from"./p-8c07fd42.js";import{K as F}from"./p-029c7cbe.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,false)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,true)}_getTextFilterValue(e={},t,l){let n="";if(e==null){return n}let i=e[t];if(i==null){return n}n=l?i.textFieldTmp:i.textField;return n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,false)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,true)}_hasFiltersForColumn(e={},t,l){if(!t){return false}let n=this._getTextFilterValue(e,t.name,l);if(n!=null&&n.trim()!=""){return true}if(this._hasIntervalTextFieldFilterValues(e,t,l)){return true}let i=this.getCheckBoxFilterValues(e,t.name);if(i==null||i.length<1){return false}return true}getCheckBoxFilterValues(e={},t){let l=[];if(e==null){return l}let n=e[t];if(n==null){return l}if(n.checkBoxes==null){return l}l=n.checkBoxes;return l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,false)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,true)}_hasIntervalTextFieldFilterValues(e={},l,n){if(l==null){return false}if(!this.isColumnFiltrableByInterval(l)){return false}let i=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(i!=null&&i.trim()!=""){return true}let r=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);if(r!=null&&r.trim()!=""){return true}return false}addCheckboxFilter(t={},l,n){if(t==null){return}let i=t[l];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};t[l]=i}if(i.checkBoxes==null){i.checkBoxes=[]}if(n==null||n.value==null){i.checkBoxes=[]}else{if(!e.valuesArrayContainsValue(i.checkBoxes,n.value)){i.checkBoxes[i.checkBoxes.length]=n}}}removeCheckboxFilter(t={},l,n){if(t==null||n==null){return}let i=t[l];if(i==null){return}if(i.checkBoxes==null){i.checkBoxes=[]}let r=e.indexOfValueInValuesArray(i.checkBoxes,n);if(r>=0){let e=[];for(let t=0;t<i.checkBoxes.length;t++){if(t!=r){e[e.length]=i.checkBoxes[t]}}i.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,false)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,true)}_getIntervalTextFieldFilterValues(e={},l,n){if(!this._hasIntervalTextFieldFilterValues(e,l,n)){return["",""]}let i=[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)];return i}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,false)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,true)}_getIntervalTextFieldFilterValue(e={},t,l,n){let i="";if(e==null){return i}let r=e[t];if(r==null){return i}if(n&&r.intervalTmp==null){return i}if(!n&&r.interval==null){return i}i=n?r.intervalTmp[l]:r.interval[l];return i}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,true)}_setTextFieldFilterValue(e={},t,l,n){if(e==null){return}let i=e[t];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=i}if(n){i.textFieldTmp=l!=null?l.trim():l}else{i.textField=l!=null?l.trim():l}}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,true)}_setIntervalTextFieldFilterValue(e={},t,l,n,i){if(e==null){return}let r=e[t];if(r==null){r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=r}if(r.interval==null){r.interval=[];r.interval.push("","")}if(r.intervalTmp==null){r.intervalTmp=[];r.intervalTmp.push("","")}if(i){r.intervalTmp[n]=l!=null?l.trim():l}else{r.interval[n]=l!=null?l.trim():l}}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,false)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,true)}getFilterValueForTooltip(e={},i){let r=this.getTextFilterValue(e,i.name);let s=this.getIntervalTextFieldFilterValues(e,i);let o=this.getCheckBoxFilterValues(e,i.name);let a="";let u=l(r,i.obj,i.decimals);if(r!=""){a=" AND "}if(s[t.FROM]!=""){u+=a+"(>= "+l(s[t.FROM],i.obj,i.decimals)+")";a=" AND "}if(s[t.TO]!=""){u+=a+"(<= "+l(s[t.TO],i.obj,i.decimals)+")";a=" AND "}a="";let f="";o.forEach((e=>{f+=a+n(e,i);a=" OR "}));if(f!=""){f="("+f+")";if(u!=""){f=" AND "+f}}f=u+f;return f}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;(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."})(x||(x={}));const T="TREE_COLUMN";var k;(function(e){e["DROPDOWN"]="dropdown";e["NODE"]="node"})(k||(k={}));const g=document.documentElement;const j=g.ketchup?g.ketchup.objects:new s;const y=g.ketchup?g.ketchup.data:new o;class O extends e{isFilterCompliantForCell(e,t,l){if(!e){return false}return this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){if(!e){return false}if(!e.obj){return false}return this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=false,i=[],r){return this.areCellsCompliant(e.cells,t,l,n,i,r)}areCellsCompliant(e,t={},l="",n=false,s=[],o){if(n){let t=true;if(s&&s!=null&&s.length>0){t=false;let n=this.filterIsNegative(l);for(let r=0;r<s.length;r++){if(s[r].visible==false){continue}const o=e[s[r].name];if(o==null){continue}t=this.isFilterCompliantForValue(o.value,l);let a=i(s[r],o);if(a!=o.value){t=t||this.isFilterCompliantForValue(a,l)}if(t==true&&!n){break}if(t==false&&n){break}}}if(!t){return false}}if(o==null){o=new w}if(!this.hasFilters(t,s,o)){return true}let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const i=e[n];if(!i){return false}let u=o.getTextFilterValue(t,n);let f=o.getIntervalTextFieldFilterValues(t,r(s,n));const c=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(i,u,f);let d=c;if(!j.isNumber(i.obj)&&!j.isDate(i.obj)&&!j.isTime(i.obj)&&!j.isTimestamp(i.obj)){d=this.isFilterCompliantForCellObj(i,u,f)}if(c){if(!h||!d){return false}}else{if(!h&&!d){return false}}let b=o.getCheckBoxFilterValues(t,n);if(b.length==0){continue}let p=false;for(let e=0;e<b.length;e++){let t=b[e];if(t==null||t.value==null){continue}if(i.value!=null){if(i.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}if(i.obj!=null){if(i.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}}if(!p){return false}}return true}hasFilters(e={},t,l){if(e==null){return false}let n=Object.keys(e);if(n==null||n.length<1){return false}if(l==null){l=new w}for(let i=0;i<n.length;i++){let s=n[i];let o=null;if(s===T){o={name:T,title:""}}else{o=r(t,s)}if(l.hasFiltersForColumn(e,o)){return true}}return false}filterRows(e=[],t={},l="",n=[],i){if(!e||e==null){return[]}let r=[];const s=!!(l&&n);if(this.hasFilters(t,n,i)||s){for(let o=0;o<e.length;o++){let a=e[o];if(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,s,n,i)){r[r.length]=a}}}else{r=[...e]}return r}getColumnValues(t,n,i,r){let s=new Array;if(r==null){r=new w}let o=r.getTextFilterValueTmp(t.filters,n.name);let a=r.getIntervalTextFieldFilterValuesTmp(t.filters,n);let u=r.getCheckBoxFilterValues(t.filters,n.name);if(n.valuesForFilter!=null&&n.valuesForFilter.length>0){n.valuesForFilter.forEach((t=>{let i=t;if(e.valuesArrayContainsValue(u,i)||o==""||r.isFilterCompliantForSimpleValue(i,n.obj,o,a)){s.push({value:i,displayedValue:l(i,n.obj,n.decimals)})}}));return s}let f=Object.assign({},t.filters);f[n.name]={textField:o,textFieldTmp:o,checkBoxes:[],interval:a,intervalTmp:a};let c=this.filterRows(t.getRows(),f,i,t.getVisibleColumns(),r);for(let e=0;e<u.length;e++){s.push(u[e])}return y.cell.getUnivocalValue({rows:c},n,true)}}const V=document.documentElement;function C(e=[],t=[]){if(!e||e.length===0){return[]}if(e[0].group){return I(e,t)}if(!t||t.length===0){return e}const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const i=M(e,n,t[l]);if(i!==0){return i}}return 0}else{return M(e,n,t[0])}}))}function I(e=[],t=[]){if(!e||e.length===0){return[]}const l=e[0].group.column;let n=B(l,t);if(!n){n={column:l,sortMode:v.A}}e.sort(((e,t)=>{const l={obj:e.group.obj,value:e.group.id};const i={obj:t.group.obj,value:t.group.id};return a(l,i,n.sortMode)}));e.forEach((e=>{e.group.children=C(e.group.children,t)}));return e}function B(e="",t=[]){if(!e||!t||t.length===0){return null}for(let l of t){if(l.column===e){return l}}return null}function M(e,t,l){const n=e.cells[l.column];const i=t.cells[l.column];if(!n&&!i){return 0}if(!n){return 1}if(!i){return-1}return a(n,i,l.sortMode)}function N(e=[],t={},l="",n=[],i,r){if(r==null){r=new O}return r.filterRows(e,t,l,n,i)}function _(e=[],t=[],l=[],n={}){if(!t){return[]}if(!l||l.length===0||!e||e.length===0){return t}const s={};const o=l.filter((({column:t})=>{for(let{name:l,title:n}of e){if(l===t){s[l]=n;return true}}return false}));if(o.length===0){return t}const a=[];let f={};t.forEach((t=>{const l=o[0].column;const u=t.cells[l];if(u){const c=r(e,l);const h=i(c,u);const d=u.value;let b=null;for(let e of a){if(e.group.label===h){b=e;break}}if(b===null){b={group:{id:d,parent:null,column:l,columnLabel:s[l],expanded:false,label:h,children:[],obj:u.obj,totals:{}},cells:{}};a.push(b)}for(let l=1;l<o.length;l++){const n=o[l];const a=t.cells[n.column];if(a){const t=r(e,n.column);const l=i(t,a);const o=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];const n=t.group.label;if(n===l){u=t;break}}if(!u){u={cells:{},group:{id:o,parent:b,column:n.column,columnLabel:s[n.column],children:[],expanded:false,label:l,totals:{},obj:a.obj}};R(u);b.group.children.push(u)}b=u}}b.group.children.push(t);A(b,n,t,f)}}));D(a,n,f);S(a,u.AVERAGE,n);S(a,u.MATH,n);return a}function A(e,t,l,n){if(!e||!t){return}const i=Object.keys(t);if(i.length===0){return}i.forEach((i=>{const r=l.cells[i];if(r){const l=V.ketchup.objects.isNumber(r.obj);const s=t[i];switch(s){case u.COUNT:let t=e.group.totals[i]||0;e.group.totals[i]=++t;let o=e.group.parent;while(o!=null){let e=o.group.totals[i]||0;o.group.totals[i]=++e;o=o.group.parent}break;case u.DISTINCT:let a;if(l){a=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value))}else{a=r.value}let f=n[e.group.id];if(!f){n[e.group.id]={};n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{let t=n[e.group.id][i];if(!t){n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{t.push(a)}}let c=e.group.parent;while(c!=null){let e=n[c.group.id];if(!e){n[c.group.id]={};n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{let e=n[c.group.id][i];if(!e){n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{e.push(a)}}c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&r.value){const t=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));const l=e.group.totals[i]||0;e.group.totals[i]=t+l;let n=e.group.parent;while(n!=null){const e=V.ketchup.math.numberify(n.group.totals[i]||0);n.group.totals[i]=t+e;n=n.group.parent}}break;case u.MIN:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.min(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.min(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;case u.MAX:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.max(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.max(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;default:{if(s.indexOf(u.MATH)!=0){console.warn(`invalid total mode: ${s}`)}break}}}}))}function D(e,t,l){if(!e||!t){return}const n=Object.keys(t);if(e.length===0||!e[0].group||n.length===0){return}let i=n.filter((e=>u.DISTINCT===t[e]));if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,i,l)))}}function S(e,t,l){if(!e||!l){return}const n=Object.keys(l);if(e.length===0||!e[0].group||n.length===0){return}let i;if(t==u.AVERAGE){i=n.filter((e=>u.AVERAGE===l[e]))}if(t==u.MATH){i=n.filter((e=>l[e].indexOf(u.MATH)==0))}if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,i,l)))}}function W(e,t,l){const n=e.group.children;if(n.length===0){return}if(n[0].group){n.forEach((e=>{W(e,t,l)}))}t.forEach((t=>{const n=l[e.group.id][t];e.group.totals[t]=new Set(n).size}))}function E(e,t,l,n){const i=e.group.children;if(i.length===0){return 0}let r=0;if(i[0].group){i.forEach((e=>{r+=E(e,t,l,n)}))}else{r=i.length}l.forEach((l=>{if(t==u.AVERAGE){e.group.totals[l]=e.group.totals[l]/r}if(t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=V.ketchup.math.formulas.custom(t,e.group.totals)}}));return r}function L(e,t){if(t){const l=Object.assign(t);t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];if(l&&e.obj&&!l.obj){l.obj={t:e.obj.t,p:e.obj.p,k:l.value}}}}))}));return l}else{return undefined}}function $(e=[],t={}){if(V.ketchup.objects.isEmptyJsObject(e)||V.ketchup.objects.isEmptyJsObject(t)){return{}}const l=Object.keys(t);const n={};const i=new Array;let r=l.length===0||l.every((e=>t[e]===u.COUNT));if(r){l.forEach((t=>n[t]=e.length))}else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>u.COUNT!==t[e]&&t[e].indexOf(u.MATH)!=0)).forEach((l=>{const a=e.cells[l];if(a){if(t[l]===u.DISTINCT){let e;if(V.ketchup.objects.isNumber(a.obj)){e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value))}else{e=a.value}let t=r[l];if(!t){r[l]=[];r[l].push(e)}else{t.push(e)}}else if(V.ketchup.objects.isNumber(a.obj)){const e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value));let i=n[l];switch(true){case t[l]===u.MIN:if(i){n[l]=Math.min(i,e)}else{n[l]=e}break;case t[l]===u.MAX:if(i){n[l]=Math.max(i,e)}else{n[l]=e}break;default:i=n[l]||0;n[l]=e+V.ketchup.math.numberify(i)}}else if(V.ketchup.objects.isDate(a.obj)){if(i.indexOf(l)==-1){i.push(l)}if(V.ketchup.dates.isValidFormattedStringDate(a.value)){const e=V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(a.value));const i=n[l]?V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(n[l])):null;switch(true){case t[l]===u.MIN:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break;case t[l]===u.MAX:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break}}}}if(s===o.length-1&&t[l]===u.DISTINCT){n[l]=new Set(r[l]).size;r[l]=[]}}))}))}for(let r of l){switch(true){case t[r]===u.AVERAGE:const l=n[r];if(l&&e.length>0){n[r]=l/e.length}break;case t[r]===u.COUNT:n[r]=e.length;break;case t[r].indexOf(u.MATH)==0:n[r]=V.ketchup.math.formulas.custom(t[r].substring(u.MATH.length),n);break}if(n[r]){if(i.indexOf(r)!=-1){n[r]=V.ketchup.dates.format(n[r])}else if(V.ketchup.math.isNumber(n[r])){n[r]=+n[r].toFixed(2)}}}return n}function R(e){if(!e.group){return}let t=e.group.id;let l=e.group.parent;while(l!==null){t=`${l.group.id};${t}`;l=l.group.parent}e.group.id=t}function q(e,t,l,n){const i=t*l-l;const r=i+Number(l);if(n==false){return e.slice(i,r)}let s=[];z(e,s,i,Number(l),0);return s}function z(e,t,l,n,i){let r=false;for(let s=0;s<e.length;s++){let o=e[s];let a=J(e[s]);if(o.group!=null&&o.group.children!=null&&o.group.children.length>0){a.group.children=[];let e=z(o.group.children,a.group.children,l,n,i);i=e.ci;r=e.added;if(r==true){t[t.length]=a}}else{if(i>=l){t[t.length]=a;r=true}i++}if(i>=l+n){break}}return{ci:i,added:r}}function J(e){if(e==null){return null}else{return{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:H(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}}function K(e){if(e==null){return null}let t=[];for(let l=0;l<e.length;l++){t[t.length]=J(e[l])}return t}function H(e){if(e==null){return null}let t={id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:K(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)};return t}function U(e,t,l=false){const n={columns:t.columns,rows:[]};for(const i of t.rows){const r={cells:{},id:i.id};for(const l of t.columns){const t=l.name;const n=i.cells[t];const s=e.rows.find((e=>e.id===i.id));const o=s?s.cells[t]:null;if(!o||n.value!==o.value){r.cells[t]=n}}if(Object.keys(r.cells).length>0||l){n.rows.push(r)}}return n}function G(e){var t;(t=e.rows)===null||t===void 0?void 0:t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const i=n.value;const r=n["options"];n.isEditable=(l=n.isEditable)!==null&&l!==void 0?l:n["editable"];if(r){const e={[c.AUTOCOMPLETE]:()=>h(i,"",r),[c.COMBOBOX]:()=>h(i,"",r),[c.RADIO]:()=>d(i,r),[c.CHECKBOX]:()=>b(i,r),[c.CHIP]:()=>p(i),[c.SWITCH]:()=>m(i,"")};const t=e[n.shape];if(t){n.data=t()}else{if(n.shape){V.ketchup.debug.logMessage("kup-data",`Shape specified ${n.shape} in cell ${JSON.stringify(n)} unsupported`,f.WARNING)}}}}))}))}export{w as F,k as K,O as a,_ as b,$ as c,G as d,x as e,N as f,U as g,L as n,q as p,C as s,T as t};
|
|
2
|
+
//# sourceMappingURL=p-802a4e44.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,c as i,f as t,h as e,H as r,d as a}from"./p-d7c15b0e.js";import{k as n,a as c,g as p,s,d,b as l}from"./p-26030fba.js";import{F as h}from"./p-2b519589.js";import{c as u}from"./p-635bb4b3.js";import{M as f}from"./p-d4a879fc.js";import"./p-029c7cbe.js";var m;(function(o){o["customStyle"]="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";o["data"]="Data of the accordion.";o["ripple"]="When enabled displays Material's ripple effect on item headers."})(m||(m={}));const _=".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_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;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}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";const k=_;const g=class{constructor(t){o(this,t);this.kupAccordionItemSelected=i(this,"kup-accordion-itemselected",6);this.kupManager=n();this.slotsNames=[];this.selectedItems=[];this.customStyle="";this.data=null;this.ripple=false;this.sizing=c.MEDIUM}applyRipple(){const o=this.rootElement.shadowRoot;if(o&&this.ripple){const i=o.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}}async collapseAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(!this.isItemExpandible(e)&&this.isItemSelected(e)){o.push(e)}}this.selectedItems=o}async expandAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(this.isItemExpandible(e)){o.push(e)}}this.selectedItems=o}async getProps(o){return p(this,m,o)}async refresh(){t(this)}async setProps(o){s(this,m,o)}async toggleItem(o){const i=this.isItemExpandible(o);const t=[...this.selectedItems];if(t.includes(o)){t.splice(t.indexOf(o),1)}else{t.push(o)}this.selectedItems=t;if(!i){this.kupAccordionItemSelected.emit({comp:this,id:this.rootElement.id,itemName:o})}}isItemExpandible(o){return this.slotsNames.includes(o)}isItemSelected(o){return this.selectedItems.includes(o)}renderItems(){const o=[];const i=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<i.length;o++){const t=i[o];this.slotsNames.push(t.slot)}for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const r=t.name;const a=this.isItemSelected(r);const n=this.isItemExpandible(r);const c={"accordion-item__header":true,"accordion-item__header--selected":!n&&a?true:false,"accordion-item__header--expanded":n&&a?true:false,"mdc-ripple-surface":this.ripple?true:false,[`accordion-item--${this.sizing}`]:this.sizing?true:false};const p={"accordion-item__content":true,"accordion-item__content--selected":a?true:false};o.push(e("div",{class:"accordion-item"},e("div",{tabindex:"1",title:t.title,class:c,onClick:()=>this.toggleItem(r)},t.icon?e(h,{color:`var(${d.ICON})`,resource:t.icon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,e("span",{class:"accordion-item__text"},t.title),n?e("span",{class:`accordion-item__dropdown kup-icon ${l.DROPDOWN.replace("--","")}`}):null),e("div",{class:p},e("slot",{name:t.name}))))}return o}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.applyRipple();this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const o=this.rootElement.shadowRoot;if(o){const i=o.querySelectorAll(".mdc-ripple-surface");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}this.kupManager.debug.logRender(this,true)}render(){const o=this.data&&this.data.columns?this.renderItems():null;return e(r,{key:"57777569afca152462d5986886aabea876bba925"},e("style",{key:"91e13f524bb7457d1ee123104e3857db9be71adc"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"a73c87f19581e2964c651b781690e39c12b94e7e",id:u},e("div",{key:"f1d089a3a4f996c6a032acc26316d4722d8c094e",class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}static get watchers(){return{ripple:["applyRipple"]}}};g.style=k;export{g as kup_accordion};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as o,c as i,f as t,h as e,H as r,d as a}from"./p-d7c15b0e.js";import{k as n,a as c,g as p,s,d,b as l}from"./p-8c07fd42.js";import{F as h}from"./p-2b519589.js";import{c as u}from"./p-635bb4b3.js";import{M as f}from"./p-d4a879fc.js";import"./p-029c7cbe.js";var m;(function(o){o["customStyle"]="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";o["data"]="Data of the accordion.";o["ripple"]="When enabled displays Material's ripple effect on item headers."})(m||(m={}));const _=".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_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;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}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";const k=_;const g=class{constructor(t){o(this,t);this.kupAccordionItemSelected=i(this,"kup-accordion-itemselected",6);this.kupManager=n();this.slotsNames=[];this.selectedItems=[];this.customStyle="";this.data=null;this.ripple=false;this.sizing=c.MEDIUM}applyRipple(){const o=this.rootElement.shadowRoot;if(o&&this.ripple){const i=o.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}}async collapseAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(!this.isItemExpandible(e)&&this.isItemSelected(e)){o.push(e)}}this.selectedItems=o}async expandAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(this.isItemExpandible(e)){o.push(e)}}this.selectedItems=o}async getProps(o){return p(this,m,o)}async refresh(){t(this)}async setProps(o){s(this,m,o)}async toggleItem(o){const i=this.isItemExpandible(o);const t=[...this.selectedItems];if(t.includes(o)){t.splice(t.indexOf(o),1)}else{t.push(o)}this.selectedItems=t;if(!i){this.kupAccordionItemSelected.emit({comp:this,id:this.rootElement.id,itemName:o})}}isItemExpandible(o){return this.slotsNames.includes(o)}isItemSelected(o){return this.selectedItems.includes(o)}renderItems(){const o=[];const i=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<i.length;o++){const t=i[o];this.slotsNames.push(t.slot)}for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const r=t.name;const a=this.isItemSelected(r);const n=this.isItemExpandible(r);const c={"accordion-item__header":true,"accordion-item__header--selected":!n&&a?true:false,"accordion-item__header--expanded":n&&a?true:false,"mdc-ripple-surface":this.ripple?true:false,[`accordion-item--${this.sizing}`]:this.sizing?true:false};const p={"accordion-item__content":true,"accordion-item__content--selected":a?true:false};o.push(e("div",{class:"accordion-item"},e("div",{tabindex:"1",title:t.title,class:c,onClick:()=>this.toggleItem(r)},t.icon?e(h,{color:`var(${d.ICON})`,resource:t.icon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,e("span",{class:"accordion-item__text"},t.title),n?e("span",{class:`accordion-item__dropdown kup-icon ${l.DROPDOWN.replace("--","")}`}):null),e("div",{class:p},e("slot",{name:t.name}))))}return o}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.applyRipple();this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const o=this.rootElement.shadowRoot;if(o){const i=o.querySelectorAll(".mdc-ripple-surface");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}this.kupManager.debug.logRender(this,true)}render(){const o=this.data&&this.data.columns?this.renderItems():null;return e(r,{key:"57777569afca152462d5986886aabea876bba925"},e("style",{key:"91e13f524bb7457d1ee123104e3857db9be71adc"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"a73c87f19581e2964c651b781690e39c12b94e7e",id:u},e("div",{key:"f1d089a3a4f996c6a032acc26316d4722d8c094e",class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}static get watchers(){return{ripple:["applyRipple"]}}};g.style=k;export{g as kup_accordion};
|
|
2
|
+
//# sourceMappingURL=p-87ff86ee.entry.js.map
|