@sme.up/ketchup 8.3.2 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{component-2c7ddef7.js → component-cb3b32f5.js} +7 -2
- package/dist/cjs/{f-button-be5c564a.js → f-button-b2cfce1c.js} +3 -3
- package/dist/cjs/{f-cell-d034bcb0.js → f-cell-75fca92b.js} +24 -17
- package/dist/cjs/{f-checkbox-cff77b2c.js → f-checkbox-48d7af02.js} +1 -1
- package/dist/cjs/{f-chip-bc678bf1.js → f-chip-3e504f3e.js} +3 -3
- package/dist/cjs/{f-image-8542c984.js → f-image-270d39ae.js} +2 -2
- package/dist/cjs/{f-paginator-utils-f48afc35.js → f-paginator-utils-6d0c4678.js} +4 -4
- package/dist/cjs/{f-text-field-acfc1717.js → f-text-field-bbcd2143.js} +2 -2
- package/dist/cjs/{f-text-field-mdc-d38d80b5.js → f-text-field-mdc-4fda9705.js} +1 -1
- package/dist/cjs/{index-a9a3b467.js → index-c3d10561.js} +90 -19
- package/dist/cjs/ketchup.cjs.js +3 -6
- package/dist/cjs/kup-accordion.cjs.entry.js +5 -5
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +151 -156
- package/dist/cjs/kup-box.cjs.entry.js +14 -14
- package/dist/cjs/kup-calendar.cjs.entry.js +16 -10
- package/dist/cjs/kup-card-list.cjs.entry.js +244 -0
- package/dist/cjs/kup-cell.cjs.entry.js +8 -8
- package/dist/cjs/kup-dashboard.cjs.entry.js +10 -10
- package/dist/cjs/kup-drawer.cjs.entry.js +3 -3
- package/dist/cjs/kup-echart.cjs.entry.js +4604 -4444
- package/dist/cjs/kup-family-tree.cjs.entry.js +6 -6
- package/dist/cjs/kup-grid.cjs.entry.js +109 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +11 -11
- package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
- package/dist/cjs/kup-magic-box.cjs.entry.js +5 -5
- package/dist/cjs/{kup-manager-b3677c1d.js → kup-manager-130bbd9d.js} +7 -7
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +6 -6
- package/dist/cjs/kup-photo-frame.cjs.entry.js +3 -3
- package/dist/cjs/kup-planner.cjs.entry.js +26 -18
- package/dist/cjs/kup-probe.cjs.entry.js +3 -3
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +6 -6
- package/dist/cjs/loader.cjs.js +3 -12
- package/dist/collection/assets/card-list.js +709 -0
- package/dist/collection/assets/data-table-performance.js +6 -0
- package/dist/collection/assets/echart.js +168 -90
- package/dist/collection/assets/image-list.js +2 -12
- package/dist/collection/assets/index.js +4 -4
- package/dist/collection/collection-manifest.json +49 -50
- package/dist/collection/components/kup-accordion/kup-accordion.js +28 -18
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +47 -29
- package/dist/collection/components/kup-badge/kup-badge.js +21 -14
- package/dist/collection/components/kup-box/kup-box.js +62 -41
- package/dist/collection/components/kup-button/kup-button.js +26 -17
- package/dist/collection/components/kup-button-list/kup-button-list.e2e.js +1 -1
- package/dist/collection/components/kup-button-list/kup-button-list.js +24 -16
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +3 -2
- package/dist/collection/components/kup-calendar/kup-calendar.css +13 -0
- package/dist/collection/components/kup-calendar/kup-calendar.js +73 -35
- package/dist/collection/components/kup-card/box/kup-card-box.js +3 -3
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +7 -7
- package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +6 -6
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +5 -5
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +4 -4
- package/dist/collection/components/kup-card/built-in/kup-card-message-box.js +4 -4
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +2 -2
- package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +5 -5
- package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +5 -5
- package/dist/collection/components/kup-card/free/kup-card-free.js +2 -2
- package/dist/collection/components/kup-card/kup-card-helper.js +5 -5
- package/dist/collection/components/kup-card/kup-card.css +20 -7
- package/dist/collection/components/kup-card/kup-card.js +67 -52
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +49 -58
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +9 -9
- package/dist/collection/components/kup-card-list/kup-card-list-declarations.js +13 -0
- package/dist/collection/components/kup-card-list/kup-card-list.css +34 -0
- package/dist/collection/components/kup-card-list/kup-card-list.js +481 -0
- package/dist/collection/components/kup-cell/kup-cell.js +27 -18
- package/dist/collection/components/kup-chart/kup-chart-builder.js +5 -5
- package/dist/collection/components/kup-chart/kup-chart.js +47 -28
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +22 -14
- package/dist/collection/components/kup-chip/kup-chip.js +32 -20
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +30 -20
- package/dist/collection/components/kup-combobox/kup-combobox.js +47 -29
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +26 -19
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +4 -4
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +178 -106
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +42 -26
- package/dist/collection/components/kup-dialog/kup-dialog.js +30 -18
- package/dist/collection/components/kup-drawer/kup-drawer.e2e.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.js +29 -17
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +42 -26
- package/dist/collection/components/kup-echart/kup-echart.js +64 -39
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +42 -26
- package/dist/collection/components/kup-form/kup-form.js +32 -21
- package/dist/collection/components/kup-gauge/kup-gauge.js +18 -13
- package/dist/collection/components/kup-grid/kup-grid.css +10 -0
- package/dist/collection/components/kup-grid/kup-grid.js +16 -11
- package/dist/collection/components/kup-iframe/kup-iframe.js +21 -13
- package/dist/collection/components/kup-image/canvas/kup-image-canvas-declarations.js +1 -1
- package/dist/collection/components/kup-image/canvas/kup-image-canvas-helper.js +1 -1
- package/dist/collection/components/kup-image/canvas/kup-image-canvas.js +2 -2
- package/dist/collection/components/kup-image/kup-image.js +27 -18
- package/dist/collection/components/kup-image-list/kup-image-list.js +35 -24
- package/dist/collection/components/kup-lazy/kup-lazy.js +25 -15
- package/dist/collection/components/kup-list/kup-list-helper.js +1 -1
- package/dist/collection/components/kup-list/kup-list.js +45 -27
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +23 -17
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +23 -14
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +40 -24
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +23 -14
- package/dist/collection/components/kup-planner/kup-planner-helper.js +3 -3
- package/dist/collection/components/kup-planner/kup-planner.css +277 -277
- package/dist/collection/components/kup-planner/kup-planner.js +51 -33
- package/dist/collection/components/kup-probe/kup-probe.js +7 -5
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +15 -10
- package/dist/collection/components/kup-qlik/kup-qlik.js +8 -5
- package/dist/collection/components/kup-radio/kup-radio.js +23 -14
- package/dist/collection/components/kup-rating/kup-rating.js +17 -11
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +26 -16
- package/dist/collection/components/kup-spinner/kup-spinner.js +17 -11
- package/dist/collection/components/kup-state/mock-store.js +1 -1
- package/dist/collection/components/kup-switch/kup-switch.js +22 -14
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +31 -20
- package/dist/collection/components/kup-text-field/kup-text-field.js +40 -24
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +47 -29
- package/dist/collection/components/kup-tree/kup-tree.js +104 -63
- package/dist/collection/f-components/f-button/f-button.js +3 -3
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +2 -1
- package/dist/collection/f-components/f-cell/f-cell.js +30 -23
- package/dist/collection/f-components/f-checkbox/f-checkbox.js +1 -1
- package/dist/collection/f-components/f-chip/f-chip.js +5 -5
- package/dist/collection/f-components/f-image/f-image.js +3 -3
- package/dist/collection/f-components/f-paginator/f-paginator.js +5 -5
- package/dist/collection/f-components/f-switch/f-switch.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +2 -2
- package/dist/collection/f-components/f-text-field/f-text-field.js +2 -2
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +4 -4
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +3 -3
- package/dist/collection/managers/kup-data/kup-data.js +8 -8
- package/dist/collection/managers/kup-dates/kup-dates.js +11 -11
- package/dist/collection/managers/kup-debug/kup-debug.js +3 -3
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +2 -2
- package/dist/collection/managers/kup-interact/kup-interact.js +2 -2
- package/dist/collection/managers/kup-language/kup-language.js +3 -3
- package/dist/collection/managers/kup-manager/kup-manager.js +20 -20
- package/dist/collection/managers/kup-math/kup-math-helper.js +1 -1
- package/dist/collection/managers/kup-math/kup-math.js +12 -12
- package/dist/collection/managers/kup-objects/kup-objects.js +1 -1
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +1 -1
- package/dist/collection/managers/kup-search/kup-search.js +2 -2
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -1
- package/dist/collection/managers/kup-theme/kup-theme.js +15 -15
- package/dist/collection/managers/kup-toolbar/kup-toolbar.js +1 -1
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +1 -1
- package/dist/collection/types/GenericTypes.js +1 -2
- package/dist/collection/utils/cell-utils.js +1 -1
- package/dist/collection/utils/filters/filters-column-menu.js +3 -3
- package/dist/collection/utils/filters/filters-rows.js +6 -6
- package/dist/collection/utils/filters/filters-tree-items.js +4 -4
- package/dist/collection/utils/filters/filters.js +3 -3
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +12 -12
- package/dist/collection/utils/utils.js +1 -1
- package/dist/components/kup-autocomplete2.js +393 -386
- package/dist/components/kup-calendar.js +10 -3
- package/dist/components/{kup-dash-list.d.ts → kup-card-list.d.ts} +4 -4
- package/dist/components/kup-card-list.js +408 -0
- package/dist/components/kup-cell.js +1 -1
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +4602 -4442
- package/dist/components/kup-family-tree.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid2.js +1 -1
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-planner.js +21 -13
- package/dist/esm/{component-e86c51ea.js → component-879e99bf.js} +7 -2
- package/dist/esm/{f-button-3b97025a.js → f-button-baa419dc.js} +3 -3
- package/dist/esm/{f-cell-ae537010.js → f-cell-18ee3afa.js} +24 -17
- package/dist/esm/{f-checkbox-91358c27.js → f-checkbox-00a1e020.js} +1 -1
- package/dist/esm/{f-chip-69df7df4.js → f-chip-311500f4.js} +3 -3
- package/dist/esm/{f-image-705c1694.js → f-image-da03494c.js} +2 -2
- package/dist/esm/{f-paginator-utils-b7009f00.js → f-paginator-utils-d63a195e.js} +4 -4
- package/dist/esm/{f-text-field-fa349928.js → f-text-field-e5f1f1fd.js} +2 -2
- package/dist/esm/{f-text-field-mdc-a1b4a919.js → f-text-field-mdc-1143cf21.js} +1 -1
- package/dist/esm/{index-bb15ce14.js → index-3336c3b1.js} +91 -19
- package/dist/esm/ketchup.js +4 -7
- package/dist/esm/kup-accordion.entry.js +5 -5
- package/dist/esm/kup-autocomplete_27.entry.js +151 -156
- package/dist/esm/kup-box.entry.js +14 -14
- package/dist/esm/kup-calendar.entry.js +16 -10
- package/dist/esm/kup-card-list.entry.js +240 -0
- package/dist/esm/kup-cell.entry.js +8 -8
- package/dist/esm/kup-dashboard.entry.js +10 -10
- package/dist/esm/kup-drawer.entry.js +3 -3
- package/dist/esm/kup-echart.entry.js +4604 -4444
- package/dist/esm/kup-family-tree.entry.js +6 -6
- package/dist/esm/kup-grid.entry.js +105 -0
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +11 -11
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +5 -5
- package/dist/esm/{kup-manager-bad7bec3.js → kup-manager-c8d5c94d.js} +7 -7
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +6 -6
- package/dist/esm/kup-photo-frame.entry.js +3 -3
- package/dist/esm/kup-planner.entry.js +26 -18
- package/dist/esm/kup-probe.entry.js +3 -3
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +6 -6
- package/dist/esm/loader.js +4 -13
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-fb0b5466.js → p-008ad26c.js} +1 -1
- package/dist/ketchup/{p-15ffcd21.entry.js → p-07707cd1.entry.js} +1 -1
- package/dist/ketchup/p-0c19d485.entry.js +9 -0
- package/dist/ketchup/{p-4c79ea53.entry.js → p-13eac183.entry.js} +1 -1
- package/dist/ketchup/{p-bd5ece4c.js → p-25de68e5.js} +1 -1
- package/dist/ketchup/{p-bd21cdea.entry.js → p-2a2a18bf.entry.js} +1 -1
- package/dist/ketchup/{p-31da4bae.entry.js → p-2d192def.entry.js} +1 -1
- package/dist/ketchup/p-2d42477d.js +2 -0
- package/dist/ketchup/{p-ee39977d.entry.js → p-2dab9c4f.entry.js} +1 -1
- package/dist/ketchup/{p-afa2af1e.js → p-39602629.js} +1 -1
- package/dist/ketchup/{p-fd1323da.js → p-4597f25d.js} +1 -1
- package/dist/ketchup/{p-7664a38d.entry.js → p-51aa248f.entry.js} +2 -2
- package/dist/ketchup/{p-af50bc6b.entry.js → p-55fd3f46.entry.js} +1 -1
- package/dist/ketchup/p-5c15661d.entry.js +1 -0
- package/dist/ketchup/p-5cfaa673.entry.js +1 -0
- package/dist/ketchup/{p-2587abcf.entry.js → p-5f583257.entry.js} +1 -1
- package/dist/ketchup/{p-55182fcf.js → p-7555c10d.js} +1 -1
- package/dist/ketchup/{p-fefa9ae4.entry.js → p-76130e83.entry.js} +1 -1
- package/dist/ketchup/{p-be89bc7b.entry.js → p-7bf649f0.entry.js} +1 -1
- package/dist/ketchup/{p-aa373c37.entry.js → p-7e1c8fc0.entry.js} +1 -1
- package/dist/ketchup/p-80699a95.js +1 -0
- package/dist/ketchup/{p-68c5029f.entry.js → p-81debebe.entry.js} +1 -1
- package/dist/ketchup/{p-82b5fac1.js → p-8281c9e5.js} +1 -1
- package/dist/ketchup/{p-e1f0ade4.entry.js → p-a0f59b05.entry.js} +1 -1
- package/dist/ketchup/{p-b3eeb140.entry.js → p-a8a39b08.entry.js} +1 -1
- package/dist/ketchup/{p-a8eccd10.entry.js → p-bb854cf5.entry.js} +1 -1
- package/dist/ketchup/{p-fb03f2f5.js → p-cd2af1a6.js} +1 -1
- package/dist/ketchup/{p-6507e9eb.js → p-d4a879fc.js} +1 -1
- package/dist/ketchup/{p-6c995fb2.entry.js → p-d6a7498b.entry.js} +1 -1
- package/dist/ketchup/p-d8384990.entry.js +1 -0
- package/dist/ketchup/p-da58f8ab.entry.js +39 -0
- package/dist/ketchup/p-ecb9fe91.entry.js +1 -0
- package/dist/ketchup/{p-3879be61.js → p-f729449f.js} +1 -1
- package/dist/loader/index.d.ts +1 -1
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +3 -2
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +6 -1
- package/dist/types/components/kup-card/kup-card.d.ts +3 -3
- package/dist/types/components/kup-card-list/kup-card-list-declarations.d.ts +35 -0
- package/dist/types/components/kup-card-list/kup-card-list.d.ts +62 -0
- package/dist/types/components.d.ts +107 -92
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +1 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +12 -2
- package/dist/types/types/GenericTypes.d.ts +1 -2
- package/package.json +8 -5
- package/dist/cjs/kup-dash-list.cjs.entry.js +0 -116
- package/dist/cjs/kup-dash_2.cjs.entry.js +0 -179
- package/dist/collection/assets/dash-list.js +0 -474
- package/dist/collection/components/kup-dash/kup-dash.css +0 -136
- package/dist/collection/components/kup-dash/kup-dash.js +0 -171
- package/dist/collection/components/kup-dash-list/kup-dash-list.css +0 -10
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +0 -327
- package/dist/components/kup-dash-list.js +0 -288
- package/dist/components/kup-dash.d.ts +0 -11
- package/dist/components/kup-dash.js +0 -6
- package/dist/components/kup-dash2.js +0 -228
- package/dist/esm/kup-dash-list.entry.js +0 -112
- package/dist/esm/kup-dash_2.entry.js +0 -174
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/ketchup/p-0b24a2ed.entry.js +0 -1
- package/dist/ketchup/p-15e6bfaf.entry.js +0 -1
- package/dist/ketchup/p-1ad1cf92.entry.js +0 -9
- package/dist/ketchup/p-68cd7d9a.js +0 -1
- package/dist/ketchup/p-b5deb573.js +0 -2
- package/dist/ketchup/p-c455cc67.entry.js +0 -39
- package/dist/ketchup/p-e6cf7db3.entry.js +0 -1
- package/dist/ketchup/p-ef21d377.entry.js +0 -1
- package/dist/types/components/kup-dash/kup-dash.d.ts +0 -33
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +0 -22
- /package/dist/cjs/{GenericVariables-9cd88034.js → GenericVariables-1d52ba57.js} +0 -0
- /package/dist/cjs/{f-button-declarations-76b4fb4c.js → f-button-declarations-3fd791a8.js} +0 -0
- /package/dist/esm/{GenericVariables-6dfdd433.js → GenericVariables-d8d0541e.js} +0 -0
- /package/dist/esm/{f-button-declarations-fd4965d1.js → f-button-declarations-8a009df1.js} +0 -0
- /package/dist/ketchup/{p-ad2e21d2.js → p-635bb4b3.js} +0 -0
- /package/dist/ketchup/{p-0fd98ab4.js → p-b00f3575.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as r,H as a,g as l}from"./p-b5deb573.js";import{F as o}from"./p-82b5fac1.js";import{F as s}from"./p-0fd98ab4.js";import{F as _}from"./p-3879be61.js";import{k as n,g as m,s as f,m as h,Q as c}from"./p-bd5ece4c.js";import{c as u}from"./p-ad2e21d2.js";var p;!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."}(p||(p={}));var d,y,k,v,g,b,x,w,j,C,E,T,W,M,S,z,D,L,O,P,A,F,R,X,Y,H=function(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)},$=function(t,e,i,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(t,i):a?a.value=i:e.set(t,i),i};const B=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),d.add(this),y.set(this,[]),k.set(this,!1),v.set(this,0),g.set(this,0),b.set(this,[]),x.set(this,n()),w.set(this,(t=>{const e=t.clientX-H(this,v,"f"),i=t.clientY-H(this,g,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,$(this,v,t.clientX,"f"),$(this,g,t.clientY,"f")})),j.set(this,!1),C.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){H(this,x,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){H(this,x,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return m(this,p,t)}async refresh(){i(this)}async runAutofit(){const t=H(this,C,"f").clientWidth,e=H(this,C,"f").children[0].clientWidth,i=.01,r=.85*t,a=.95*t;let l=1,o=2e3,s=e;for(;(s<r||s>a)&&o>0&&l>i;)o--,s<r?l+=i:s>a?l-=i:o=0,s=e*l;H(this,C,"f").style.setProperty("--kup_familytree_scale",l<=1?l.toFixed(2):"1")}async setProps(t){f(this,p,t)}componentWillLoad(){H(this,x,"f").debug.logLoad(this,!1),H(this,x,"f").language.register(this),H(this,x,"f").theme.register(this)}componentDidLoad(){H(this,d,"m",X).call(this),this.autofitOnLoad&&this.runAutofit(),H(this,x,"f").debug.logLoad(this,!0)}componentWillRender(){H(this,x,"f").debug.logRender(this,!1)}componentDidRender(){H(this,j,"f")&&($(this,j,!1,"f"),this.runAutofit()),H(this,x,"f").debug.logRender(this,!0)}render(){return r(a,{onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),H(this,d,"m",O).call(this,t)},onWheel:t=>{H(this,d,"m",Y).call(this,t)}},r("style",null,H(this,x,"f").theme.setKupStyle(this.rootElement)),r("div",{id:u},H(this,d,"m",D).call(this)))}disconnectedCallback(){H(this,x,"f").language.unregister(this),H(this,x,"f").theme.unregister(this)}get rootElement(){return l(this)}};y=new WeakMap,k=new WeakMap,v=new WeakMap,g=new WeakMap,b=new WeakMap,x=new WeakMap,w=new WeakMap,j=new WeakMap,C=new WeakMap,d=new WeakSet,E=function(t,e,i,a){const l=[];return l.push(r("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},r("div",{class:"family-tree__line--placeholder"}))),l.push(r("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||a&&!e}},r("div",{class:"family-tree__line--placeholder"}))),l},T=function t(e){var i;let a=null,l=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(l||(l=[]),l.push(t)):(a||(a=[]),a.push(t))})));const _=this.stackedLeaves&&a&&a.every((t=>!t.children||0==t.children.length)),n=a?2*a.length:1,m={"family-tree__line":!0,"family-tree__line--placeholder":!(!a&&!l),"family-tree__line--vertical":!(!a&&!l)},f={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},c=e.layout||this.layout||1,u={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:s.OUTLINED,title:`${H(this,x,"f").language.translate(h.EXPAND)}/${H(this,x,"f").language.translate(h.COLLAPSE)} (CTRL + Click)`,onClick:t=>{t.ctrlKey&&e.children&&e.children.length>0&&(e.isExpanded?this.collapseAll(e.children):this.expandAll(e.children)),e.isExpanded=!e.isExpanded,this.autofitOnExpand&&$(this,j,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let p=null;H(this,d,"m",L).call(this,c)&&(p=r("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:f,cardData:this.cardData,layout:this.cardData?null:c,showSelection:!1}));const y=r("div",{class:"family-tree__item"},r("div",{class:"family-tree__item__wrapper"},H(this,d,"m",L).call(this,c)?p:H(this,d,"m",W).call(this,e,c),this.collapsible&&e.children&&e.children.length>0?r(o,Object.assign({},u)):void 0)),k={"--kup_familytree_staffchildren":(null==l?void 0:l.length.toString())||"0"};return r("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},r("tr",null,r("td",{"data-row":e,colSpan:n},y)),r("tr",null,r("td",{colSpan:n},r("div",{class:m}))),l?[r("tr",null,r("td",{colSpan:n},r("div",{class:Object.assign(Object.assign({},m),{"family-tree__line--staff":!0}),style:k}),r("div",{class:"family-tree__node__staff",style:k},l.map((e=>[r("div",{class:"family-tree__node__staff__item"},H(this,d,"m",t).call(this,e))])))))]:null,l&&a?[r("tr",null,r("td",{colSpan:n},r("div",{class:m})))]:null,a?[r("tr",null,_?r("td",{colSpan:n},r("div",{class:m})):a.map((t=>H(this,d,"m",E).call(this,0==a.indexOf(t),a.indexOf(t)==a.length-1,1==a.length,a.length>2)))),r("tr",null,_?r("td",{colSpan:n},a.map((e=>H(this,d,"m",t).call(this,e)))):a.map((e=>r("td",{colSpan:2},H(this,d,"m",t).call(this,e)))))]:void 0)},W=function(t,e){return 2===e?H(this,d,"m",S).call(this,t):H(this,d,"m",M).call(this,t)},M=function(t){return r("div",{class:"family-tree__item__layout family-tree__item__layout--1"},r("div",{class:"family-tree__item__layout__text__title"},t.value))},S=function(t){return r("div",{class:"family-tree__item__layout family-tree__item__layout--2"},r("div",{class:"family-tree__item__layout__color"}),r("div",{class:"family-tree__item__layout__image"},r(_,{resource:t.icon,sizeX:"48px",sizeY:"48px"})),r("div",{class:"family-tree__item__layout__text"},r("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?r("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},z=function(t){return t.map((t=>H(this,d,"m",T).call(this,t)))},D=function(){return r("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>$(this,C,t,"f")},this.data&&this.data.rows&&this.data.rows.length?H(this,d,"m",z).call(this,this.data.rows):r("div",null,H(this,x,"f").language.translate(h.EMPTY_DATA)))},L=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},O=function(t){$(this,v,t.clientX,"f"),$(this,g,t.clientY,"f"),H(this,C,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",H(this,w,"f")),document.removeEventListener("pointerup",e),H(this,C,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",H(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t,e){let i,r;if(t)for(let e=t.length-1;e>=0;e--){const a=t[e];a.tagName&&(a.classList.contains("family-tree__item__expand")&&(i=a),"TD"===a.tagName.toUpperCase())&&(r=a)}let a=null,l=null,o=null;return r&&(a=r["data-cell"],l=r["data-column"],o=r["data-row"]),{cell:a||null,column:l||null,expandButton:i||null,originalEvent:e,row:o||null,td:r||null}},A=function(t){return H(this,d,"m",P).call(this,H(this,x,"f").getEventPath(t.target,this.rootElement),t)},F=function(t){return H(this,d,"m",P).call(this,H(this,x,"f").getEventPath(t.target,this.rootElement),t)},R=function(t){return H(this,d,"m",P).call(this,H(this,x,"f").getEventPath(t.target,this.rootElement),t)},X=function(){H(this,b,"f").push(this.rootElement),H(this,x,"f").interact.on(this.rootElement,c.TAP,(t=>{if(H(this,k,"f"))$(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];H(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)})}})),H(this,x,"f").interact.on(this.rootElement,c.DOUBLETAP,(t=>{if(0===t.button){for(let t=0;t<H(this,y,"f").length;t++)clearTimeout(H(this,y,"f")[t]),H(this,x,"f").debug.logMessage(this,"Cleared clickHandler timeout("+H(this,y,"f")[t]+").");$(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",R).call(this,t)})}})),H(this,x,"f").interact.on(this.rootElement,c.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||($(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)}))}))},Y=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat(H(this,C,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let r=t.deltaY>0?e-i:e+i;r<i&&(r=i),H(this,C,"f").style.setProperty("--kup_familytree_scale",r.toFixed(2))}},B.style=':host{--kup_familytree_item_background_color:var(\n --kup-familytree-item-background-color,\n var(--kup-background-color)\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(--kup-familytree-item-h-padding, 8px);--kup_familytree_item_v_padding:var(--kup-familytree-item-v-padding, 10px);--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-color)\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);border:1px solid var(--kup_familytree_lines_color);border-radius:8px;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-secondary-color);border-bottom-left-radius:8px;border-top-left-radius:8px;height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto 10px}.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}';export{B as kup_family_tree}
|
|
1
|
+
import{r as t,c as e,f as i,h as r,H as a,g as l}from"./p-2d42477d.js";import{F as o}from"./p-8281c9e5.js";import{F as s}from"./p-b00f3575.js";import{F as _}from"./p-f729449f.js";import{k as n,g as m,s as f,m as h,Q as c}from"./p-25de68e5.js";import{c as u}from"./p-635bb4b3.js";var p;!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."}(p||(p={}));var d,y,k,v,g,b,x,w,j,C,E,T,W,M,S,z,D,L,O,P,A,F,R,X,Y,H=function(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)},$=function(t,e,i,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(t,i):a?a.value=i:e.set(t,i),i};const B=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),d.add(this),y.set(this,[]),k.set(this,!1),v.set(this,0),g.set(this,0),b.set(this,[]),x.set(this,n()),w.set(this,(t=>{const e=t.clientX-H(this,v,"f"),i=t.clientY-H(this,g,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,$(this,v,t.clientX,"f"),$(this,g,t.clientY,"f")})),j.set(this,!1),C.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){H(this,x,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){H(this,x,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return m(this,p,t)}async refresh(){i(this)}async runAutofit(){const t=H(this,C,"f").clientWidth,e=H(this,C,"f").children[0].clientWidth,i=.01,r=.85*t,a=.95*t;let l=1,o=2e3,s=e;for(;(s<r||s>a)&&o>0&&l>i;)o--,s<r?l+=i:s>a?l-=i:o=0,s=e*l;H(this,C,"f").style.setProperty("--kup_familytree_scale",l<=1?l.toFixed(2):"1")}async setProps(t){f(this,p,t)}componentWillLoad(){H(this,x,"f").debug.logLoad(this,!1),H(this,x,"f").language.register(this),H(this,x,"f").theme.register(this)}componentDidLoad(){H(this,d,"m",X).call(this),this.autofitOnLoad&&this.runAutofit(),H(this,x,"f").debug.logLoad(this,!0)}componentWillRender(){H(this,x,"f").debug.logRender(this,!1)}componentDidRender(){H(this,j,"f")&&($(this,j,!1,"f"),this.runAutofit()),H(this,x,"f").debug.logRender(this,!0)}render(){return r(a,{onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),H(this,d,"m",O).call(this,t)},onWheel:t=>{H(this,d,"m",Y).call(this,t)}},r("style",null,H(this,x,"f").theme.setKupStyle(this.rootElement)),r("div",{id:u},H(this,d,"m",D).call(this)))}disconnectedCallback(){H(this,x,"f").language.unregister(this),H(this,x,"f").theme.unregister(this)}get rootElement(){return l(this)}};y=new WeakMap,k=new WeakMap,v=new WeakMap,g=new WeakMap,b=new WeakMap,x=new WeakMap,w=new WeakMap,j=new WeakMap,C=new WeakMap,d=new WeakSet,E=function(t,e,i,a){const l=[];return l.push(r("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},r("div",{class:"family-tree__line--placeholder"}))),l.push(r("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||a&&!e}},r("div",{class:"family-tree__line--placeholder"}))),l},T=function t(e){var i;let a=null,l=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(l||(l=[]),l.push(t)):(a||(a=[]),a.push(t))})));const _=this.stackedLeaves&&a&&a.every((t=>!t.children||0==t.children.length)),n=a?2*a.length:1,m={"family-tree__line":!0,"family-tree__line--placeholder":!(!a&&!l),"family-tree__line--vertical":!(!a&&!l)},f={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},c=e.layout||this.layout||1,u={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:s.OUTLINED,title:`${H(this,x,"f").language.translate(h.EXPAND)}/${H(this,x,"f").language.translate(h.COLLAPSE)} (CTRL + Click)`,onClick:t=>{t.ctrlKey&&e.children&&e.children.length>0&&(e.isExpanded?this.collapseAll(e.children):this.expandAll(e.children)),e.isExpanded=!e.isExpanded,this.autofitOnExpand&&$(this,j,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let p=null;H(this,d,"m",L).call(this,c)&&(p=r("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:f,cardData:this.cardData,layout:this.cardData?null:c,showSelection:!1}));const y=r("div",{class:"family-tree__item"},r("div",{class:"family-tree__item__wrapper"},H(this,d,"m",L).call(this,c)?p:H(this,d,"m",W).call(this,e,c),this.collapsible&&e.children&&e.children.length>0?r(o,Object.assign({},u)):void 0)),k={"--kup_familytree_staffchildren":(null==l?void 0:l.length.toString())||"0"};return r("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},r("tr",null,r("td",{"data-row":e,colSpan:n},y)),r("tr",null,r("td",{colSpan:n},r("div",{class:m}))),l?[r("tr",null,r("td",{colSpan:n},r("div",{class:Object.assign(Object.assign({},m),{"family-tree__line--staff":!0}),style:k}),r("div",{class:"family-tree__node__staff",style:k},l.map((e=>[r("div",{class:"family-tree__node__staff__item"},H(this,d,"m",t).call(this,e))])))))]:null,l&&a?[r("tr",null,r("td",{colSpan:n},r("div",{class:m})))]:null,a?[r("tr",null,_?r("td",{colSpan:n},r("div",{class:m})):a.map((t=>H(this,d,"m",E).call(this,0==a.indexOf(t),a.indexOf(t)==a.length-1,1==a.length,a.length>2)))),r("tr",null,_?r("td",{colSpan:n},a.map((e=>H(this,d,"m",t).call(this,e)))):a.map((e=>r("td",{colSpan:2},H(this,d,"m",t).call(this,e)))))]:void 0)},W=function(t,e){return 2===e?H(this,d,"m",S).call(this,t):H(this,d,"m",M).call(this,t)},M=function(t){return r("div",{class:"family-tree__item__layout family-tree__item__layout--1"},r("div",{class:"family-tree__item__layout__text__title"},t.value))},S=function(t){return r("div",{class:"family-tree__item__layout family-tree__item__layout--2"},r("div",{class:"family-tree__item__layout__color"}),r("div",{class:"family-tree__item__layout__image"},r(_,{resource:t.icon,sizeX:"48px",sizeY:"48px"})),r("div",{class:"family-tree__item__layout__text"},r("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?r("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},z=function(t){return t.map((t=>H(this,d,"m",T).call(this,t)))},D=function(){return r("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>$(this,C,t,"f")},this.data&&this.data.rows&&this.data.rows.length?H(this,d,"m",z).call(this,this.data.rows):r("div",null,H(this,x,"f").language.translate(h.EMPTY_DATA)))},L=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},O=function(t){$(this,v,t.clientX,"f"),$(this,g,t.clientY,"f"),H(this,C,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",H(this,w,"f")),document.removeEventListener("pointerup",e),H(this,C,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",H(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t,e){let i,r;if(t)for(let e=t.length-1;e>=0;e--){const a=t[e];a.tagName&&(a.classList.contains("family-tree__item__expand")&&(i=a),"TD"===a.tagName.toUpperCase())&&(r=a)}let a=null,l=null,o=null;return r&&(a=r["data-cell"],l=r["data-column"],o=r["data-row"]),{cell:a||null,column:l||null,expandButton:i||null,originalEvent:e,row:o||null,td:r||null}},A=function(t){return H(this,d,"m",P).call(this,H(this,x,"f").getEventPath(t.target,this.rootElement),t)},F=function(t){return H(this,d,"m",P).call(this,H(this,x,"f").getEventPath(t.target,this.rootElement),t)},R=function(t){return H(this,d,"m",P).call(this,H(this,x,"f").getEventPath(t.target,this.rootElement),t)},X=function(){H(this,b,"f").push(this.rootElement),H(this,x,"f").interact.on(this.rootElement,c.TAP,(t=>{if(H(this,k,"f"))$(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];H(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)})}})),H(this,x,"f").interact.on(this.rootElement,c.DOUBLETAP,(t=>{if(0===t.button){for(let t=0;t<H(this,y,"f").length;t++)clearTimeout(H(this,y,"f")[t]),H(this,x,"f").debug.logMessage(this,"Cleared clickHandler timeout("+H(this,y,"f")[t]+").");$(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",R).call(this,t)})}})),H(this,x,"f").interact.on(this.rootElement,c.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||($(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)}))}))},Y=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat(H(this,C,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let r=t.deltaY>0?e-i:e+i;r<i&&(r=i),H(this,C,"f").style.setProperty("--kup_familytree_scale",r.toFixed(2))}},B.style=':host{--kup_familytree_item_background_color:var(\n --kup-familytree-item-background-color,\n var(--kup-background-color)\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(--kup-familytree-item-h-padding, 8px);--kup_familytree_item_v_padding:var(--kup-familytree-item-v-padding, 10px);--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-color)\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);border:1px solid var(--kup_familytree_lines_color);border-radius:8px;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-secondary-color);border-bottom-left-radius:8px;border-top-left-radius:8px;height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto 10px}.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}';export{B as kup_family_tree}
|