@sme.up/ketchup 11.0.0-SNAPSHOT-20241120152755 → 11.0.0-SNAPSHOT-20241120152921
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-button-e29b456b.js → f-button-7486e6b3.js} +2 -1
- package/dist/cjs/f-button-7486e6b3.js.map +1 -0
- package/dist/cjs/f-button-declarations-76ef9f87.js.map +1 -1
- package/dist/cjs/{f-cell-425bb3db.js → f-cell-81fac889.js} +5 -5
- package/dist/cjs/{f-cell-425bb3db.js.map → f-cell-81fac889.js.map} +1 -1
- package/dist/cjs/{f-chip-c7015446.js → f-chip-1a0bf837.js} +2 -2
- package/dist/cjs/{f-chip-c7015446.js.map → f-chip-1a0bf837.js.map} +1 -1
- package/dist/cjs/{f-paginator-utils-92ba8179.js → f-paginator-utils-1354f423.js} +3 -3
- package/dist/cjs/{f-paginator-utils-92ba8179.js.map → f-paginator-utils-1354f423.js.map} +1 -1
- package/dist/cjs/{f-text-field-151bb601.js → f-text-field-b2a594d0.js} +2 -2
- package/dist/cjs/{f-text-field-151bb601.js.map → f-text-field-b2a594d0.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js +7 -7
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +3 -3
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dashboard.cjs.entry.js +3 -3
- package/dist/cjs/{kup-data-table-helper-26c63633.js → kup-data-table-helper-d6167be7.js} +2 -2
- package/dist/cjs/{kup-data-table-helper-26c63633.js.map → kup-data-table-helper-d6167be7.js.map} +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +2 -2
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-htm.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +5 -5
- package/dist/cjs/kup-input-panel.cjs.entry.js +7 -7
- package/dist/cjs/kup-input-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
- package/dist/cjs/{kup-manager-50129d01.js → kup-manager-34811418.js} +2 -2
- package/dist/cjs/{kup-manager-50129d01.js.map → kup-manager-34811418.js.map} +1 -1
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/kup-txt.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/collection/components/kup-input-panel/kup-input-panel.js +2 -2
- package/dist/collection/components/kup-input-panel/kup-input-panel.js.map +1 -1
- package/dist/collection/f-components/f-button/f-button-declarations.js.map +1 -1
- package/dist/collection/f-components/f-button/f-button.js +1 -0
- package/dist/collection/f-components/f-button/f-button.js.map +1 -1
- package/dist/components/kup-autocomplete2.js +1 -0
- package/dist/components/kup-autocomplete2.js.map +1 -1
- package/dist/components/kup-input-panel.js +2 -2
- package/dist/components/kup-input-panel.js.map +1 -1
- package/dist/components/kup-manager.js +1 -1
- package/dist/components/kup-manager.js.map +1 -1
- package/dist/esm/{f-button-bfe24f7d.js → f-button-7466dc36.js} +2 -1
- package/dist/esm/f-button-7466dc36.js.map +1 -0
- package/dist/esm/f-button-declarations-6c8f8abe.js.map +1 -1
- package/dist/esm/{f-cell-52c9d0c3.js → f-cell-3742e76e.js} +5 -5
- package/dist/esm/{f-cell-52c9d0c3.js.map → f-cell-3742e76e.js.map} +1 -1
- package/dist/esm/{f-chip-4ca84b54.js → f-chip-d244477c.js} +2 -2
- package/dist/esm/{f-chip-4ca84b54.js.map → f-chip-d244477c.js.map} +1 -1
- package/dist/esm/{f-paginator-utils-63478aa3.js → f-paginator-utils-d853e9d0.js} +3 -3
- package/dist/esm/{f-paginator-utils-63478aa3.js.map → f-paginator-utils-d853e9d0.js.map} +1 -1
- package/dist/esm/{f-text-field-3393b2fa.js → f-text-field-beb14c3f.js} +2 -2
- package/dist/esm/{f-text-field-3393b2fa.js.map → f-text-field-beb14c3f.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/kup-accordion.entry.js +1 -1
- package/dist/esm/kup-activity-timeline.entry.js +2 -2
- package/dist/esm/kup-autocomplete_28.entry.js +7 -7
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +3 -3
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dashboard.entry.js +3 -3
- package/dist/esm/{kup-data-table-helper-f5ed8338.js → kup-data-table-helper-9f1ffee2.js} +2 -2
- package/dist/esm/{kup-data-table-helper-f5ed8338.js.map → kup-data-table-helper-9f1ffee2.js.map} +1 -1
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +2 -2
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-htm.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +5 -5
- package/dist/esm/kup-input-panel.entry.js +7 -7
- package/dist/esm/kup-input-panel.entry.js.map +1 -1
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-3ec9832f.js → kup-manager-2f3cc678.js} +2 -2
- package/dist/esm/{kup-manager-3ec9832f.js.map → kup-manager-2f3cc678.js.map} +1 -1
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-pdf.entry.js +1 -1
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +2 -2
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +2 -2
- package/dist/esm/kup-txt.entry.js +1 -1
- package/dist/esm/kup-typography-list.entry.js +1 -1
- package/dist/esm/kup-typography.entry.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-84b3b2fa.entry.js → p-0ac50bc7.entry.js} +2 -2
- package/dist/ketchup/{p-382fdf9c.entry.js → p-0b0a2967.entry.js} +2 -2
- package/dist/ketchup/{p-66aa279f.entry.js → p-0bff2c29.entry.js} +2 -2
- package/dist/ketchup/p-10dfd311.js +2 -0
- package/dist/ketchup/p-10dfd311.js.map +1 -0
- package/dist/ketchup/{p-0ccb3fa7.js → p-12386c37.js} +2 -2
- package/dist/ketchup/{p-8021ea4e.js → p-12b043a8.js} +2 -2
- package/dist/ketchup/{p-2f6bd59a.entry.js → p-1d358110.entry.js} +2 -2
- package/dist/ketchup/{p-184d3aad.entry.js → p-2783ac80.entry.js} +2 -2
- package/dist/ketchup/{p-d3a9b480.entry.js → p-3952ba3e.entry.js} +2 -2
- package/dist/ketchup/{p-3db3c1fd.entry.js → p-395ae9d2.entry.js} +2 -2
- package/dist/ketchup/{p-75e27581.entry.js → p-464f194c.entry.js} +2 -2
- package/dist/ketchup/{p-89f32074.entry.js → p-560eaac6.entry.js} +2 -2
- package/dist/ketchup/{p-61ad2d20.entry.js → p-59f26ccb.entry.js} +2 -2
- package/dist/ketchup/{p-3fc9766a.entry.js → p-5aa4321e.entry.js} +2 -2
- package/dist/ketchup/{p-80ba04d9.entry.js → p-5deed7a5.entry.js} +2 -2
- package/dist/ketchup/{p-4a816a86.js → p-72bd3fc5.js} +2 -2
- package/dist/ketchup/{p-8e9af4b7.entry.js → p-86e79650.entry.js} +2 -2
- package/dist/ketchup/{p-13e28e4a.entry.js → p-93f55a64.entry.js} +2 -2
- package/dist/ketchup/{p-a5c86e8e.entry.js → p-9fbdb39e.entry.js} +2 -2
- package/dist/ketchup/{p-e305ceca.entry.js → p-b13e044e.entry.js} +2 -2
- package/dist/ketchup/{p-be44be11.entry.js → p-b57a163a.entry.js} +2 -2
- package/dist/ketchup/{p-0fdd095b.entry.js → p-b7bb3cf2.entry.js} +2 -2
- package/dist/ketchup/p-c0395621.entry.js +2 -0
- package/dist/ketchup/p-c0395621.entry.js.map +1 -0
- package/dist/ketchup/{p-32a621b8.entry.js → p-c2ab279b.entry.js} +2 -2
- package/dist/ketchup/{p-1ab129ab.entry.js → p-cbf642ba.entry.js} +2 -2
- package/dist/ketchup/p-d1aed414.entry.js +2 -0
- package/dist/ketchup/{p-c95408b6.entry.js.map → p-d1aed414.entry.js.map} +1 -1
- package/dist/ketchup/{p-294d3d1c.js → p-d6a135fc.js} +2 -2
- package/dist/ketchup/{p-5a94cb83.entry.js → p-d94e9c52.entry.js} +2 -2
- package/dist/ketchup/{p-76b5fa90.entry.js → p-d9640c84.entry.js} +2 -2
- package/dist/ketchup/{p-616f1df0.entry.js → p-dd07f05f.entry.js} +2 -2
- package/dist/ketchup/{p-4f6f4498.entry.js → p-dff1eec1.entry.js} +2 -2
- package/dist/ketchup/p-e3062c19.js.map +1 -1
- package/dist/ketchup/{p-e8b0b78f.entry.js → p-ec1a591f.entry.js} +2 -2
- package/dist/ketchup/{p-42603d08.entry.js → p-ef98bb25.entry.js} +2 -2
- package/dist/ketchup/{p-73f1f96f.entry.js → p-f6b9f5fe.entry.js} +2 -2
- package/dist/ketchup/{p-af7bddae.js → p-f7bd59af.js} +2 -2
- package/dist/ketchup/p-f7bd59af.js.map +1 -0
- package/dist/ketchup/{p-1368c22b.js → p-f7d95fe5.js} +2 -2
- package/dist/ketchup/{p-2168db8b.entry.js → p-fe866c33.entry.js} +2 -2
- package/dist/types/f-components/f-button/f-button-declarations.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/f-button-e29b456b.js.map +0 -1
- package/dist/esm/f-button-bfe24f7d.js.map +0 -1
- package/dist/ketchup/p-01e7a8d0.entry.js +0 -2
- package/dist/ketchup/p-01e7a8d0.entry.js.map +0 -1
- package/dist/ketchup/p-af7bddae.js.map +0 -1
- package/dist/ketchup/p-c95408b6.entry.js +0 -2
- package/dist/ketchup/p-e3032f6d.js +0 -2
- package/dist/ketchup/p-e3032f6d.js.map +0 -1
- /package/dist/ketchup/{p-84b3b2fa.entry.js.map → p-0ac50bc7.entry.js.map} +0 -0
- /package/dist/ketchup/{p-382fdf9c.entry.js.map → p-0b0a2967.entry.js.map} +0 -0
- /package/dist/ketchup/{p-66aa279f.entry.js.map → p-0bff2c29.entry.js.map} +0 -0
- /package/dist/ketchup/{p-0ccb3fa7.js.map → p-12386c37.js.map} +0 -0
- /package/dist/ketchup/{p-8021ea4e.js.map → p-12b043a8.js.map} +0 -0
- /package/dist/ketchup/{p-2f6bd59a.entry.js.map → p-1d358110.entry.js.map} +0 -0
- /package/dist/ketchup/{p-184d3aad.entry.js.map → p-2783ac80.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d3a9b480.entry.js.map → p-3952ba3e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-3db3c1fd.entry.js.map → p-395ae9d2.entry.js.map} +0 -0
- /package/dist/ketchup/{p-75e27581.entry.js.map → p-464f194c.entry.js.map} +0 -0
- /package/dist/ketchup/{p-89f32074.entry.js.map → p-560eaac6.entry.js.map} +0 -0
- /package/dist/ketchup/{p-61ad2d20.entry.js.map → p-59f26ccb.entry.js.map} +0 -0
- /package/dist/ketchup/{p-3fc9766a.entry.js.map → p-5aa4321e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-80ba04d9.entry.js.map → p-5deed7a5.entry.js.map} +0 -0
- /package/dist/ketchup/{p-4a816a86.js.map → p-72bd3fc5.js.map} +0 -0
- /package/dist/ketchup/{p-8e9af4b7.entry.js.map → p-86e79650.entry.js.map} +0 -0
- /package/dist/ketchup/{p-13e28e4a.entry.js.map → p-93f55a64.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a5c86e8e.entry.js.map → p-9fbdb39e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e305ceca.entry.js.map → p-b13e044e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-be44be11.entry.js.map → p-b57a163a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-0fdd095b.entry.js.map → p-b7bb3cf2.entry.js.map} +0 -0
- /package/dist/ketchup/{p-32a621b8.entry.js.map → p-c2ab279b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-1ab129ab.entry.js.map → p-cbf642ba.entry.js.map} +0 -0
- /package/dist/ketchup/{p-294d3d1c.js.map → p-d6a135fc.js.map} +0 -0
- /package/dist/ketchup/{p-5a94cb83.entry.js.map → p-d94e9c52.entry.js.map} +0 -0
- /package/dist/ketchup/{p-76b5fa90.entry.js.map → p-d9640c84.entry.js.map} +0 -0
- /package/dist/ketchup/{p-616f1df0.entry.js.map → p-dd07f05f.entry.js.map} +0 -0
- /package/dist/ketchup/{p-4f6f4498.entry.js.map → p-dff1eec1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e8b0b78f.entry.js.map → p-ec1a591f.entry.js.map} +0 -0
- /package/dist/ketchup/{p-42603d08.entry.js.map → p-ef98bb25.entry.js.map} +0 -0
- /package/dist/ketchup/{p-73f1f96f.entry.js.map → p-f6b9f5fe.entry.js.map} +0 -0
- /package/dist/ketchup/{p-1368c22b.js.map → p-f7d95fe5.js.map} +0 -0
- /package/dist/ketchup/{p-2168db8b.entry.js.map → p-fe866c33.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as a,H as n,d as o}from"./p-d7c15b0e.js";import{k as s,g as p,s as r}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as a,H as n,d as o}from"./p-d7c15b0e.js";import{k as s,g as p,s as r}from"./p-f7bd59af.js";import{c as l}from"./p-635bb4b3.js";import{F as c}from"./p-10dfd311.js";import"./p-029c7cbe.js";import"./p-e3062c19.js";import"./p-2b519589.js";const f="snackbar";var h;(function(t){t["actionButton"]="Set of FButton props to set the action button.";t["closeButton"]="When true, the hide button will be displayed.";t["customStyle"]="Custom style of the component.";t["text"]="Sets the textual content of the snackbar.";t["timeout"]="Defaults at null, when set the snackbar will automatically disappear after the specified amount of milliseconds."})(h||(h={}));const k=".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_snackbar_border_left_color:var(\n --kup-snackbar-border-left-color,\n var(--kup-border-interactive)\n );--kup_snackbar_background_color:var(\n --kup-snackbar-background-color,\n var(--kup-layer-0-inverted)\n );--kup_snackbar_text_color:var(\n --kup-snackbar-text-color,\n var(--kup-text-primary-inverted)\n );--kup_snackbar_text_color:var(--kup-snackbar-text-color, var(--kup-layer-1));animation:snackbar-show 125ms;bottom:0;box-sizing:border-box;display:block;left:0;outline:none;pointer-events:none;position:fixed;transition:opacity 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, -webkit-transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;width:100%;z-index:calc(var(--kup-navbar-zindex) + 1)}:host(:not([kup-visible])){display:none}#kup-component{box-sizing:border-box;display:flex;justify-content:center;height:100%;padding:8px;width:100%}.snackbar{align-items:center;background-color:var(--kup_snackbar_background_color);color:var(--kup_snackbar_text_color);display:flex;justify-content:space-between;max-width:672px;min-height:48px;min-width:344px;border-left:4px solid var(--kup_snackbar_border_left_color);padding:0 var(--kup-space-05)}.snackbar .snackbar__text__block{padding:var(--kup-space-05) 0;color:var(--kup_snackbar_text_color)}.snackbar__header{pointer-events:all;word-break:break-word;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.snackbar__text{pointer-events:all;word-break:break-word;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}.snackbar__buttons{align-items:center;display:flex;justify-content:flex-end;pointer-events:all;width:max-content}.snackbar__close{--kup-button-font-size:11px;margin-left:8px;pointer-events:all}@media (min-width: 768px){.snackbar__text__block{padding:var(--kup-space-05) 0;min-width:350px}}@keyframes snackbar-show{from{transform:scale(0.5);opacity:0}to{transform:scale(1);opacity:1}}:host(.kup-top){bottom:unset;top:var(--kup-navbar-height, 0)}";const d=k;const u=class{constructor(i){t(this,i);this.kupActionClick=e(this,"kup-snackbar-actionclick",6);this.kupTimeoutComplete=e(this,"kup-snackbar-timeoutcomplete",6);this.kupManager=s();this.visible=false;this.actionButton=null;this.closeButton=true;this.customStyle="";this.text="";this.header="";this.timeout=null}onKupActionClick(){this.hide();this.kupActionClick.emit({comp:this,id:this.rootElement.id})}onKupTimeoutComplete(){this.kupTimeoutComplete.emit({comp:this,id:this.rootElement.id})}async getProps(t){return p(this,h,t)}async hide(){this.visible=false}async refresh(){i(this)}async setProps(t){r(this,h,t)}async show(){this.visible=true}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){if(this.timeout&&this.visible){setTimeout((()=>{this.hide();this.onKupTimeoutComplete()}),this.timeout)}this.kupManager.debug.logRender(this,true)}render(){return a(n,{key:"425ff290429f0ac399306ad7737d5df519a9518a","kup-visible":this.visible},a("style",{key:"0e1bc10e2884f4943c0bc4fe96bed9805f7358e6"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"a66cdfc2a2fb2098a8959949b2b117c24e99cef3",id:l},a("div",{key:"d3bf872e84369ef05dbd1343e8264e3b3f03a0f2",class:f},a("div",{key:"a2ad63fe4b3146826a77312edeac063dd4e31f08",class:"snackbar__text__block"},a("div",{key:"a45f6f870c6ca3e2dbc825a820bd6a1f2c1a210f",class:`${f}__header`},this.header),a("div",{key:"f866bd88c6f4aa1b0c25debd96dd7ac46c47e4f6",class:`${f}__text`},this.text)),this.actionButton||this.closeButton?a("div",{class:`${f}__buttons`},this.actionButton?a("div",{class:`${f}__action`},a(c,Object.assign({},this.actionButton,{onClick:()=>this.onKupActionClick()}))):null,this.closeButton?a("div",{class:`${f}__close`},a(c,{icon:"close",onClick:()=>this.hide()})):null):null)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};u.style=d;export{u as kup_snackbar};
|
|
2
|
+
//# sourceMappingURL=p-0b0a2967.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-f7bd59af.js";import{c as l}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var c;(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."})(c||(c={}));var f;(function(e){e["VIEWPORT"]="viewport";e["PROPS"]="props";e["BOTH"]="both"})(f||(f={}));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=f.BOTH;this.showPlaceholder=true}async getProps(e){return s(this,c,e)}async getComponent(){return this.lazyComponent}async refresh(){i(this)}async setProps(e){p(this,c,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:"d934e9316a35cbe1ab46988fece131f5c087c768",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"88935457e57ed8dcd9b54156697eaa2d8c4bc6fb",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:"cd827bdabef7edb14856b20fa296fb6c24ce35ad",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"0500bfa97874d60be3031a483664dfe065abd3a1",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:"f95ee18e654761802003f36bb40adea81334b191",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"94cd486d665abfed4429d33f4746d849e50186bf",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:"7867e1d291b486852252c75bc338575fe2be275d",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"dff262a50d8cf2777278083063971f8509a34dd1",d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":t=a("svg",{key:"28e9319d4813e1185a3963595205838c0e37195e",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"bc286850018bd55c1ee22d4d657b7154be95a8ad",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:"1684c481d0337a7e9f34743e518c49b1b745540e",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"55ec03003702a987ebceca536e2d449cfb7a72be",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:"a036086630cc6ccede34e08a53daa74e3d88f034",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"41e65183e03358a0a8da170d6d54e7d549391aec",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:"dd9b30ae9aa487a4d0b11ce80f14252180f8e2de",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"e6c51b6c1b5affc7c512d63c2b5e019d174c31b8",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:"e2a8de44a8f5ef7b24cc2eada62e044bb5eb81d1",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"fcb610c8455c4275f926ca707fad2ba710c74dcc",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===f.VIEWPORT&&this.isInViewport||this.renderMode===f.PROPS&&this.data||this.renderMode===f.BOTH&&this.data&&this.isInViewport){let t=this.componentName;e=a(t,Object.assign({key:"511d4b91acf17e894f499c7c0e85fb18081d2fb8"},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:"be93bd2e9dbc7a72f1504368c123e240035d062d",class:i},a("style",{key:"bd50b350aac68bd7017f9e69dda239f0e163c36a"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"0a6ec5bbad939bceb6e45b4256c23374da076473",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-0bff2c29.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h as t}from"./p-d7c15b0e.js";import{a as e}from"./p-e3062c19.js";import{F as n}from"./p-2b519589.js";const o=(n,o)=>{if(!n.styling){n.styling=e.RAISED}if(!n.label&&!n.icon){return}const r=!!(n.styling.toLowerCase()===e.ICON||n.styling.toLowerCase()===e.RAISED&&n.icon&&(n.label===null||n.label===undefined));const l={"f-button":true,"kup-danger":n.danger,"kup-full-height":n.fullHeight,"kup-full-width":n.fullWidth,"kup-info":n.info,"kup-large":n.large,"kup-pulsating":n.pulsating,"kup-shaped":n.shaped,"kup-secondary":n.secondary,"kup-slim":n.slim,"kup-success":n.success,"kup-warning":n.warning,"kup-neutral":n.neutral,"kup-black-mode":n.blackMode,[n.wrapperClass]:!!n.wrapperClass,"button--invisible":n.invisible?true:false};return t("div",Object.assign({class:l},n.dataSet,{id:n.id,title:n.title}),r?s(n):u(n),o)};function u(o){const u=o.styling.toLowerCase()===e.FLAT;const s=o.styling.toLowerCase()===e.FLOATING;const r=o.styling.toLowerCase()===e.ICON;const l=o.styling.toLowerCase()===e.OUTLINED;const a=!u&&!s&&!l&&!r?true:false;const i={color:o.neutral?`var(--kup-text-primary)`:o.disabled?`var(--kup_button_text_color_disabled)`:l||u?`var(--kup_button_text_color)`:`var(--kup_button_text_color)`,resource:o.icon,placeholderResource:o.placeholderIcon,sizeX:s?"1.75em":"1.475em",sizeY:s?"1.75em":"1.475em",wrapperClass:"button__icon kup-icon"};if(o.showSpinner)i.wrapperClass+=" content--hidden";const c={button:true,"button--disabled":o.disabled?true:false,"button--floating":s?true:false,"button--flat":u?true:false,"button--outlined":l?true:false,"button--raised":a?true:false,"button--no-label":!o.label||o.label===" "?true:false,"button--with-spinner":o.showSpinner&&!o.disabled?true:false,[`button--${o.sizing||"small"}`]:true,[`button--${o.contentAlign}`]:o.contentAlign?true:false};const p={button__label:true,"content--hidden":o.showSpinner&&!o.disabled?true:false};const b={"--kup_button_spinner_height":i.sizeY};return t("button",{type:o.buttonType?o.buttonType:"button",class:c,disabled:o.disabled,onBlur:o.onBlur,onClick:o.onClick,onFocus:o.onFocus,style:b,"aria-label":o.title},o.trailingIcon?[o.label?t("span",{class:p},o.label):undefined,o.icon?t(n,Object.assign({},i)):undefined]:[o.icon?t(n,Object.assign({},i)):undefined,o.label?t("span",{class:p},o.label):undefined],o.showSpinner&&!o.disabled?t("div",{class:"button__spinner-container"},t("slot",{name:"spinner"})):undefined)}function s(e){const o={color:e.neutral?`var(--kup-text-primary)`:e.disabled?`var(--kup_button_text_color_disabled)`:`var(--kup_button_text_color)`,sizeX:e.large?"calc(1.75em * 1.5)":"1.75em",sizeY:e.large?"calc(1.75em * 1.5)":"1.75em"};const u={"icon-button":true,"button--disabled":e.disabled?true:false,"icon-button--on":e.toggable&&e.checked?true:false,toggable:e.toggable?true:false,"button--with-spinner":e.showSpinner&&!e.disabled?true:false};const s={"--kup_button_spinner_height":o.sizeY,"--kup_button_spinner_width":o.sizeX};const r=e.iconOff?e.iconOff:e.icon+"_border";return t("button",{type:e.buttonType?e.buttonType:"button",class:u,disabled:e.disabled,onClick:e.onClick,style:s,value:e.checked?"on":"off","aria-label":e.title},!e.showSpinner||e.disabled?t(n,Object.assign({},o,{resource:e.toggable&&!e.checked?r:e.icon,placeholderResource:e.placeholderIcon,wrapperClass:`icon-button__icon kup-icon`})):null,e.toggable&&!e.showSpinner?t(n,Object.assign({},o,{resource:e.icon,placeholderResource:e.placeholderIcon,wrapperClass:`icon-button__icon icon-button__icon--on kup-icon`})):null,e.showSpinner&&!e.disabled?t("div",{class:"icon-button__spinner-container"},t("slot",{name:"spinner"})):undefined)}export{o as F};
|
|
2
|
+
//# sourceMappingURL=p-10dfd311.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FButton","props","children","styling","FButtonStyling","RAISED","label","icon","isIconButton","toLowerCase","ICON","undefined","classObj","danger","fullHeight","fullWidth","info","large","pulsating","shaped","secondary","slim","success","warning","neutral","blackMode","wrapperClass","invisible","h","Object","assign","class","dataSet","id","title","renderIconButton","renderButton","isFlat","FLAT","isFloating","FLOATING","isIcon","isOutlined","OUTLINED","isRaised","propsFImage","color","disabled","resource","placeholderResource","placeholderIcon","sizeX","sizeY","showSpinner","button","sizing","contentAlign","classLabelObj","button__label","styleSpinnerContainer","type","buttonType","onBlur","onClick","onFocus","style","trailingIcon","FImage","name","toggable","checked","iconOff","value"],"sources":["src/f-components/f-button/f-button.tsx"],"sourcesContent":["import { FunctionalComponent, h, VNode } from '@stencil/core';\nimport { FButtonProps, FButtonStyling } from './f-button-declarations';\nimport { FImage } from '../f-image/f-image';\nimport { FImageProps } from '../f-image/f-image-declarations';\n\n/*-------------------------------------------------*/\n/* C o m p o n e n t */\n/*-------------------------------------------------*/\n\nexport const FButton: FunctionalComponent<FButtonProps> = (\n props: FButtonProps,\n children: VNode[]\n) => {\n if (!props.styling) {\n props.styling = FButtonStyling.RAISED;\n }\n if (!props.label && !props.icon) {\n return;\n }\n const isIconButton: boolean = !!(\n props.styling.toLowerCase() === FButtonStyling.ICON ||\n (props.styling.toLowerCase() === FButtonStyling.RAISED &&\n props.icon &&\n (props.label === null || props.label === undefined))\n );\n const classObj: Record<string, boolean> = {\n 'f-button': true,\n 'kup-danger': props.danger,\n 'kup-full-height': props.fullHeight,\n 'kup-full-width': props.fullWidth,\n 'kup-info': props.info,\n 'kup-large': props.large,\n 'kup-pulsating': props.pulsating,\n 'kup-shaped': props.shaped,\n 'kup-secondary': props.secondary,\n 'kup-slim': props.slim,\n 'kup-success': props.success,\n 'kup-warning': props.warning,\n 'kup-neutral': props.neutral,\n 'kup-black-mode': props.blackMode,\n [props.wrapperClass]: !!props.wrapperClass,\n 'button--invisible': props.invisible ? true : false,\n };\n return (\n <div\n class={classObj}\n {...props.dataSet}\n id={props.id}\n title={props.title}\n >\n {isIconButton ? renderIconButton(props) : renderButton(props)}\n {children}\n </div>\n );\n};\n\n/*-------------------------------------------------*/\n/* M e t h o d s */\n/*-------------------------------------------------*/\n\nfunction renderButton(props: FButtonProps): VNode {\n const isFlat: boolean = props.styling.toLowerCase() === FButtonStyling.FLAT;\n const isFloating: boolean =\n props.styling.toLowerCase() === FButtonStyling.FLOATING;\n const isIcon: boolean = props.styling.toLowerCase() === FButtonStyling.ICON;\n const isOutlined: boolean =\n props.styling.toLowerCase() === FButtonStyling.OUTLINED;\n const isRaised: boolean =\n !isFlat && !isFloating && !isOutlined && !isIcon ? true : false;\n\n const propsFImage: FImageProps = {\n color: props.neutral\n ? `var(--kup-text-primary)`\n : props.disabled\n ? `var(--kup_button_text_color_disabled)`\n : isOutlined || isFlat\n ? `var(--kup_button_text_color)` // metter colore per sfondo bianco\n : `var(--kup_button_text_color)`,\n resource: props.icon,\n placeholderResource: props.placeholderIcon,\n sizeX: isFloating ? '1.75em' : '1.475em',\n sizeY: isFloating ? '1.75em' : '1.475em',\n wrapperClass: 'button__icon kup-icon',\n };\n if (props.showSpinner) propsFImage.wrapperClass += ' content--hidden';\n\n const classObj: Record<string, boolean> = {\n button: true,\n 'button--disabled': props.disabled ? true : false,\n 'button--floating': isFloating ? true : false,\n 'button--flat': isFlat ? true : false,\n 'button--outlined': isOutlined ? true : false,\n 'button--raised': isRaised ? true : false,\n 'button--no-label': !props.label || props.label === ' ' ? true : false,\n 'button--with-spinner':\n props.showSpinner && !props.disabled ? true : false,\n [`button--${props.sizing || 'small'}`]: true,\n [`button--${props.contentAlign}`]: props.contentAlign ? true : false,\n };\n\n const classLabelObj: Record<string, boolean> = {\n button__label: true,\n 'content--hidden': props.showSpinner && !props.disabled ? true : false,\n };\n\n const styleSpinnerContainer: Record<string, string> = {\n '--kup_button_spinner_height': propsFImage.sizeY,\n };\n\n return (\n <button\n type={props.buttonType ? props.buttonType : 'button'}\n class={classObj}\n disabled={props.disabled}\n onBlur={props.onBlur}\n onClick={props.onClick}\n onFocus={props.onFocus}\n style={styleSpinnerContainer}\n aria-label={props.title}\n >\n {props.trailingIcon\n ? [\n props.label ? (\n <span class={classLabelObj}>{props.label}</span>\n ) : undefined,\n props.icon ? <FImage {...propsFImage} /> : undefined,\n ]\n : [\n props.icon ? <FImage {...propsFImage} /> : undefined,\n props.label ? (\n <span class={classLabelObj}>{props.label}</span>\n ) : undefined,\n ]}\n {props.showSpinner && !props.disabled ? (\n <div class=\"button__spinner-container\">\n <slot name=\"spinner\"></slot>\n </div>\n ) : undefined}\n </button>\n );\n}\n\nfunction renderIconButton(props: FButtonProps): VNode {\n const propsFImage: FImageProps = {\n color: props.neutral\n ? `var(--kup-text-primary)`\n : props.disabled\n ? `var(--kup_button_text_color_disabled)`\n : `var(--kup_button_text_color)`,\n sizeX: props.large ? 'calc(1.75em * 1.5)' : '1.75em',\n sizeY: props.large ? 'calc(1.75em * 1.5)' : '1.75em',\n };\n\n const classObj: Record<string, boolean> = {\n 'icon-button': true,\n 'button--disabled': props.disabled ? true : false,\n 'icon-button--on': props.toggable && props.checked ? true : false,\n toggable: props.toggable ? true : false,\n 'button--with-spinner':\n props.showSpinner && !props.disabled ? true : false,\n };\n\n const styleSpinnerContainer: Record<string, string> = {\n '--kup_button_spinner_height': propsFImage.sizeY,\n '--kup_button_spinner_width': propsFImage.sizeX,\n };\n\n const iconOff: string = props.iconOff\n ? props.iconOff\n : props.icon + '_border';\n\n return (\n <button\n type={props.buttonType ? props.buttonType : 'button'}\n class={classObj}\n disabled={props.disabled}\n onClick={props.onClick}\n style={styleSpinnerContainer}\n value={props.checked ? 'on' : 'off'}\n aria-label={props.title}\n >\n {!props.showSpinner || props.disabled ? (\n <FImage\n {...propsFImage}\n resource={\n props.toggable && !props.checked ? iconOff : props.icon\n }\n placeholderResource={props.placeholderIcon}\n wrapperClass={`icon-button__icon kup-icon`}\n />\n ) : null}\n {props.toggable && !props.showSpinner ? (\n <FImage\n {...propsFImage}\n resource={props.icon}\n placeholderResource={props.placeholderIcon}\n wrapperClass={`icon-button__icon icon-button__icon--on kup-icon`}\n />\n ) : null}\n {props.showSpinner && !props.disabled ? (\n <div class=\"icon-button__spinner-container\">\n <slot name=\"spinner\"></slot>\n </div>\n ) : undefined}\n </button>\n );\n}\n"],"mappings":"kHASaA,EAA6C,CACtDC,EACAC,KAEA,IAAKD,EAAME,QAAS,CAChBF,EAAME,QAAUC,EAAeC,M,CAEnC,IAAKJ,EAAMK,QAAUL,EAAMM,KAAM,CAC7B,M,CAEJ,MAAMC,KACFP,EAAME,QAAQM,gBAAkBL,EAAeM,MAC9CT,EAAME,QAAQM,gBAAkBL,EAAeC,QAC5CJ,EAAMM,OACLN,EAAMK,QAAU,MAAQL,EAAMK,QAAUK,YAEjD,MAAMC,EAAoC,CACtC,WAAY,KACZ,aAAcX,EAAMY,OACpB,kBAAmBZ,EAAMa,WACzB,iBAAkBb,EAAMc,UACxB,WAAYd,EAAMe,KAClB,YAAaf,EAAMgB,MACnB,gBAAiBhB,EAAMiB,UACvB,aAAcjB,EAAMkB,OACpB,gBAAiBlB,EAAMmB,UACvB,WAAYnB,EAAMoB,KAClB,cAAepB,EAAMqB,QACrB,cAAerB,EAAMsB,QACrB,cAAetB,EAAMuB,QACrB,iBAAkBvB,EAAMwB,UACxB,CAACxB,EAAMyB,gBAAiBzB,EAAMyB,aAC9B,oBAAqBzB,EAAM0B,UAAY,KAAO,OAElD,OACIC,EAAA,MAAAC,OAAAC,OAAA,CACIC,MAAOnB,GACHX,EAAM+B,QAAO,CACjBC,GAAIhC,EAAMgC,GACVC,MAAOjC,EAAMiC,QAEZ1B,EAAe2B,EAAiBlC,GAASmC,EAAanC,GACtDC,EACC,EAQd,SAASkC,EAAanC,GAClB,MAAMoC,EAAkBpC,EAAME,QAAQM,gBAAkBL,EAAekC,KACvE,MAAMC,EACFtC,EAAME,QAAQM,gBAAkBL,EAAeoC,SACnD,MAAMC,EAAkBxC,EAAME,QAAQM,gBAAkBL,EAAeM,KACvE,MAAMgC,EACFzC,EAAME,QAAQM,gBAAkBL,EAAeuC,SACnD,MAAMC,GACDP,IAAWE,IAAeG,IAAeD,EAAS,KAAO,MAE9D,MAAMI,EAA2B,CAC7BC,MAAO7C,EAAMuB,QACP,0BACAvB,EAAM8C,SACN,wCACAL,GAAcL,EACd,+BACA,+BACNW,SAAU/C,EAAMM,KAChB0C,oBAAqBhD,EAAMiD,gBAC3BC,MAAOZ,EAAa,SAAW,UAC/Ba,MAAOb,EAAa,SAAW,UAC/Bb,aAAc,yBAElB,GAAIzB,EAAMoD,YAAaR,EAAYnB,cAAgB,mBAEnD,MAAMd,EAAoC,CACtC0C,OAAQ,KACR,mBAAoBrD,EAAM8C,SAAW,KAAO,MAC5C,mBAAoBR,EAAa,KAAO,MACxC,eAAgBF,EAAS,KAAO,MAChC,mBAAoBK,EAAa,KAAO,MACxC,iBAAkBE,EAAW,KAAO,MACpC,oBAAqB3C,EAAMK,OAASL,EAAMK,QAAU,IAAM,KAAO,MACjE,uBACIL,EAAMoD,cAAgBpD,EAAM8C,SAAW,KAAO,MAClD,CAAC,WAAW9C,EAAMsD,QAAU,WAAY,KACxC,CAAC,WAAWtD,EAAMuD,gBAAiBvD,EAAMuD,aAAe,KAAO,OAGnE,MAAMC,EAAyC,CAC3CC,cAAe,KACf,kBAAmBzD,EAAMoD,cAAgBpD,EAAM8C,SAAW,KAAO,OAGrE,MAAMY,EAAgD,CAClD,8BAA+Bd,EAAYO,OAG/C,OACIxB,EAAA,UACIgC,KAAM3D,EAAM4D,WAAa5D,EAAM4D,WAAa,SAC5C9B,MAAOnB,EACPmC,SAAU9C,EAAM8C,SAChBe,OAAQ7D,EAAM6D,OACdC,QAAS9D,EAAM8D,QACfC,QAAS/D,EAAM+D,QACfC,MAAON,EAAqB,aAChB1D,EAAMiC,OAEjBjC,EAAMiE,aACD,CACIjE,EAAMK,MACFsB,EAAA,QAAMG,MAAO0B,GAAgBxD,EAAMK,OACnCK,UACJV,EAAMM,KAAOqB,EAACuC,EAAMtC,OAAAC,OAAA,GAAKe,IAAkBlC,WAE/C,CACIV,EAAMM,KAAOqB,EAACuC,EAAMtC,OAAAC,OAAA,GAAKe,IAAkBlC,UAC3CV,EAAMK,MACFsB,EAAA,QAAMG,MAAO0B,GAAgBxD,EAAMK,OACnCK,WAEbV,EAAMoD,cAAgBpD,EAAM8C,SACzBnB,EAAA,OAAKG,MAAM,6BACPH,EAAA,QAAMwC,KAAK,aAEfzD,UAGhB,CAEA,SAASwB,EAAiBlC,GACtB,MAAM4C,EAA2B,CAC7BC,MAAO7C,EAAMuB,QACP,0BACAvB,EAAM8C,SACN,wCACA,+BACNI,MAAOlD,EAAMgB,MAAQ,qBAAuB,SAC5CmC,MAAOnD,EAAMgB,MAAQ,qBAAuB,UAGhD,MAAML,EAAoC,CACtC,cAAe,KACf,mBAAoBX,EAAM8C,SAAW,KAAO,MAC5C,kBAAmB9C,EAAMoE,UAAYpE,EAAMqE,QAAU,KAAO,MAC5DD,SAAUpE,EAAMoE,SAAW,KAAO,MAClC,uBACIpE,EAAMoD,cAAgBpD,EAAM8C,SAAW,KAAO,OAGtD,MAAMY,EAAgD,CAClD,8BAA+Bd,EAAYO,MAC3C,6BAA8BP,EAAYM,OAG9C,MAAMoB,EAAkBtE,EAAMsE,QACxBtE,EAAMsE,QACNtE,EAAMM,KAAO,UAEnB,OACIqB,EAAA,UACIgC,KAAM3D,EAAM4D,WAAa5D,EAAM4D,WAAa,SAC5C9B,MAAOnB,EACPmC,SAAU9C,EAAM8C,SAChBgB,QAAS9D,EAAM8D,QACfE,MAAON,EACPa,MAAOvE,EAAMqE,QAAU,KAAO,MAAK,aACvBrE,EAAMiC,QAEhBjC,EAAMoD,aAAepD,EAAM8C,SACzBnB,EAACuC,EAAMtC,OAAAC,OAAA,GACCe,EAAW,CACfG,SACI/C,EAAMoE,WAAapE,EAAMqE,QAAUC,EAAUtE,EAAMM,KAEvD0C,oBAAqBhD,EAAMiD,gBAC3BxB,aAAc,gCAElB,KACHzB,EAAMoE,WAAapE,EAAMoD,YACtBzB,EAACuC,EAAMtC,OAAAC,OAAA,GACCe,EAAW,CACfG,SAAU/C,EAAMM,KAChB0C,oBAAqBhD,EAAMiD,gBAC3BxB,aAAc,sDAElB,KACHzB,EAAMoD,cAAgBpD,EAAM8C,SACzBnB,EAAA,OAAKG,MAAM,kCACPH,EAAA,QAAMwC,KAAK,aAEfzD,UAGhB,Q","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
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-af7bddae.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-f7bd59af.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-12386c37.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as c}from"./p-d7c15b0e.js";import{F as e}from"./p-2b519589.js";import{b as i,h as s}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{h as c}from"./p-d7c15b0e.js";import{F as e}from"./p-2b519589.js";import{b as i,h as s}from"./p-f7bd59af.js";var n;(function(c){c["CHOICE"]="choice";c["FILTER"]="filter";c["INPUT"]="input";c["STANDARD"]="standard"})(n||(n={}));var t;(function(c){c["OUTLINED"]="outlined";c["RAISED"]="raised"})(t||(t={}));var l;(function(c){c["SMALL"]="small";c["MEDIUM"]="medium"})(l||(l={}));const r=document.documentElement;const o=e=>{if(!e.styling){e.styling=t.RAISED}if(!e.type){e.type=n.STANDARD}const i=e.type.toLowerCase()===n.CHOICE;const s=e.type.toLowerCase()===n.FILTER;const l=e.type.toLowerCase()===n.INPUT;const r=e.styling.toLowerCase()===t.OUTLINED;const o=!r?true:false;const a={"chip-set":true,"chip-set--choice":i?true:false,"chip-set--filter":s?true:false,"chip-set--input":l?true:false,"chip--outlined":r?true:false,"chip--raised":o?true:false,[`chip--${e.sizing}`]:e.sizing?true:false};return c("div",Object.assign({class:`f-chip ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""} ${e.primary?"kup-primary":""}`},e.dataSet,{id:e.id,title:e.title}),c("div",{class:a,role:"grid"},p(e,i,s,l)))};function p(n,t,l,o){const p=[];for(let a=0;n.data&&a<n.data.length;a++){const u=[];d(n.data[a],0);p.push(c("div",{class:"chip-set__item"},...u));function d(t,l){const o=!!(t.children&&t.children.length>0);const p=!!(o&&t.isExpanded);const _={["--kup_chip_indent_offset"]:l.toString()};u.push(c("div",{class:`chip-set__wrapper ${o&&!p?"chip-set__wrapper--hidden-children":""}`},c("div",{class:"chip-set__indent",style:_}),o?c(e,{onClick:n.onExpansionClick&&n.onExpansionClick[a]?n.onExpansionClick[a].bind(n.onExpansionClick[a],t):null,resource:`${i.DROPDOWN}`,sizeX:"16px",sizeY:"16px",title:r.ketchup.language.translate(s.EXPAND)+"/"+r.ketchup.language.translate(s.COLLAPSE)+" (CTRL + Click)",wrapperClass:"dropdown-icon"}):l?c(e,{resource:"blank",sizeX:"16px",sizeY:"16px",wrapperClass:"dropdown-icon"}):null,h(t)));if(p){for(let c=0;c<t.children.length;c++){if(t.children[c]){d(t.children[c],l+1)}}}}function h(s){const r=!!(s.icon&&!s.value);let p=`chip ${r?"chip--only-icon":""}`;let u=[];let d="chip__icon chip__icon--leading";if(l||t){if(s.checked){p+=" chip--selected";if(l){d+=" chip__icon--leading-hidden"}}}if(s.icon){const i={color:t&&s.checked?`var(--kup_chip_primary_color)`:`var(--kup_chip_text_color)`,resource:s.icon,placeholderResource:s.placeholderIcon,sizeX:"16px",sizeY:"16px",wrapperClass:d};u.push(c(e,Object.assign({},i)))}if(l){u.push(c("span",{class:"chip__checkmark"},c("svg",{class:"chip__checkmark-svg",viewBox:"-2 -3 30 30"},c("path",{class:"chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}))))}return c("div",{class:p,"data-value":s.id,onClick:n.onClick&&n.onClick[a]?n.onClick[a].bind(n.onClick[a],s):null,role:"row",title:s.title?s.title:""},c("span",{class:"chip-set__indent"}),u,c("span",{role:"gridcell"},c("span",{role:"button",tabindex:a,class:"chip__primary-action",value:s.id,checked:s.checked,onBlur:n.onBlur&&n.onBlur[a]?n.onBlur[a].bind(n.onBlur[a],s):null,onFocus:n.onFocus&&n.onFocus[a]?n.onFocus[a].bind(n.onFocus[a],s):null},c("span",{class:"chip__text"},n.displayId?s.id+" - "+s.value:s.value))),o?c("span",{role:"gridcell"},c("span",{tabindex:"-1",class:`kup-icon chip__icon ${i.CLEAR.replace("--","")}`,onClick:n.onIconClick&&n.onIconClick[a]?n.onIconClick[a].bind(n.onIconClick[a],s):null})):null)}}return p}export{n as F,l as a,t as b,o as c};
|
|
2
|
+
//# sourceMappingURL=p-12b043a8.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as o,H as a,d as n}from"./p-d7c15b0e.js";import{k as s,g as f,s as p}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as o,H as a,d as n}from"./p-d7c15b0e.js";import{k as s,g as f,s as p}from"./p-f7bd59af.js";import{c as h}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var r;(function(t){t["customStyle"]="Custom style of the component.";t["placeholderAttrs"]="Html attributes of the picture before the component enters the viewport.";t["resourceAttrs"]="Html attributes of the picture after the component enters the viewport."})(r||(r={}));const l=".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_photoframe_border:var(\n --kup-photoframe-border,\n 1px inset var(--kup-border-subtle)\n );--kup_photoframe_fade_out_time:var(--kup-photoframe-fade-out-time, 2000ms);border:var(--kup_photoframe_border);display:block;height:100%;position:relative;width:100%}#kup-component{position:relative;height:100%;width:100%}img{max-height:100%;max-width:100%}.horizontal img{width:100%}.vertical img{height:100%}.placeholder{display:none;transition:opacity var(--kup_photoframe_fade_out_time) ease-out;will-change:opacity;z-index:1}.placeholder--loaded{display:block}.placeholder--fade-out{opacity:0;position:absolute}.resource{display:none;left:0;position:absolute;top:0;z-index:0}.resource--fade-in{display:block;position:relative}:host(.kup-fit) img{height:100%;object-fit:cover;width:100%}";const c=l;var d=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,o){if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?o:i==="a"?o.call(t):o?o.value:e.get(t)};var u=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,i):a?a.value=i:e.set(t,i),i};var m,g,k,y,w,x;const b=class{constructor(i){t(this,i);this.kupPhotoFramePlaceholderLoad=e(this,"kup-photoframe-placeholderload",6);this.kupPhotoFrameResourceLoad=e(this,"kup-photoframe-resourceload",6);m.set(this,null);g.set(this,s());k.set(this,null);y.set(this,null);w.set(this,false);x.set(this,null);this.isInViewport=false;this.customStyle="";this.placeholderAttrs={};this.resourceAttrs={};this.threshold=.25}async getProps(t){return f(this,r,t)}async refresh(){i(this)}async setProps(t){p(this,r,t)}setObserver(){let t=t=>{t.forEach((t=>{if(t.isIntersecting){this.isInViewport=true;d(this,m,"f").unobserve(this.rootElement)}}))};let e={threshold:this.threshold};u(this,m,new IntersectionObserver(t,e),"f")}componentWillLoad(){d(this,g,"f").debug.logLoad(this,false);d(this,g,"f").theme.register(this);this.setObserver()}componentDidLoad(){d(this,g,"f").debug.logLoad(this,true)}componentWillRender(){d(this,g,"f").debug.logRender(this,false)}componentDidRender(){d(this,g,"f").debug.logRender(this,true)}render(){if(this.isInViewport&&!d(this,w,"f")){u(this,w,true,"f")}return o(a,{key:"0a8e3132bca574cfbb1cce6ad4caafa9214e9c76"},o("style",{key:"9ee8736d2783d07c51dcd87d2dbbe366bae06078"},d(this,g,"f").theme.setKupStyle(this.rootElement)),o("div",{key:"f93a429043a18f9d5b1ca8eaebfcb97ecc0218e7",id:h,ref:t=>{u(this,x,t,"f")}},o("img",Object.assign({key:"41d8a842da9ec15a748073f221641876a4e37dcf"},this.placeholderAttrs,{class:"placeholder",ref:t=>u(this,k,t,"f"),onLoad:()=>{if(d(this,k,"f").naturalWidth>d(this,k,"f").naturalHeight){d(this,x,"f").classList.add("horizontal")}else{d(this,x,"f").classList.add("vertical")}d(this,m,"f").observe(this.rootElement);d(this,k,"f").classList.add("placeholder--loaded");this.kupPhotoFramePlaceholderLoad.emit({comp:this,id:this.rootElement.id})}})),d(this,w,"f")?o("img",Object.assign({},this.resourceAttrs,{class:"resource",ref:t=>u(this,y,t,"f"),onLoad:()=>{d(this,k,"f").classList.add("placeholder--fade-out");d(this,y,"f").classList.add("resource--fade-in");this.kupPhotoFrameResourceLoad.emit({comp:this,id:this.rootElement.id})}})):null))}disconnectedCallback(){var t;d(this,g,"f").theme.unregister(this);(t=d(this,m,"f"))===null||t===void 0?void 0:t.unobserve(this.rootElement)}get rootElement(){return n(this)}};m=new WeakMap,g=new WeakMap,k=new WeakMap,y=new WeakMap,w=new WeakMap,x=new WeakMap;b.style=c;export{b as kup_photo_frame};
|
|
2
|
+
//# sourceMappingURL=p-1d358110.entry.js.map
|