@sme.up/ketchup 11.0.0-SNAPSHOT-20241016091107 → 11.0.0-SNAPSHOT-20241017090851
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-cell-8eca61f9.js → f-cell-047a1ebb.js} +23 -8
- package/dist/cjs/f-cell-047a1ebb.js.map +1 -0
- package/dist/cjs/{f-chip-657a698b.js → f-chip-a213a741.js} +2 -2
- package/dist/cjs/{f-chip-657a698b.js.map → f-chip-a213a741.js.map} +1 -1
- package/dist/cjs/{f-paginator-utils-e8954368.js → f-paginator-utils-a4a45bfc.js} +2 -2
- package/dist/cjs/{f-paginator-utils-e8954368.js.map → f-paginator-utils-a4a45bfc.js.map} +1 -1
- package/dist/cjs/{f-text-field-a489112a.js → f-text-field-78547f53.js} +2 -2
- package/dist/cjs/{f-text-field-a489112a.js.map → f-text-field-78547f53.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_27.cjs.entry.js +6 -6
- package/dist/cjs/kup-box.cjs.entry.js +6 -6
- package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +162 -5
- package/dist/cjs/kup-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-e665fbe5.js → kup-data-table-helper-cf31cb4e.js} +2 -2
- package/dist/cjs/{kup-data-table-helper-e665fbe5.js.map → kup-data-table-helper-cf31cb4e.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 +1 -1
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-input-panel.cjs.entry.js +4 -4
- 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-22be97c0.js → kup-manager-59aafed4.js} +3 -2
- package/dist/cjs/kup-manager-59aafed4.js.map +1 -0
- 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 +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/assets/radio.js +20 -0
- package/dist/collection/components/kup-cell/kup-cell.js +2 -2
- package/dist/collection/components/kup-cell/kup-cell.js.map +1 -1
- package/dist/collection/f-components/f-cell/f-cell-declarations.js.map +1 -1
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.declarations.js +2 -0
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.declarations.js.map +1 -0
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js +162 -0
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js.map +1 -0
- package/dist/collection/f-components/f-radio/f-radio-declarations.js +5 -1
- package/dist/collection/f-components/f-radio/f-radio-declarations.js.map +1 -1
- package/dist/collection/f-components/f-radio/f-radio.js +15 -4
- package/dist/collection/f-components/f-radio/f-radio.js.map +1 -1
- package/dist/collection/managers/kup-data/kup-data-declarations.js.map +1 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js.map +1 -1
- package/dist/components/kup-autocomplete2.js +20 -5
- package/dist/components/kup-autocomplete2.js.map +1 -1
- package/dist/components/kup-cell.js +162 -5
- package/dist/components/kup-cell.js.map +1 -1
- package/dist/components/kup-manager.js +2 -1
- package/dist/components/kup-manager.js.map +1 -1
- package/dist/esm/{f-cell-582be39b.js → f-cell-355ccc61.js} +24 -9
- package/dist/esm/f-cell-355ccc61.js.map +1 -0
- package/dist/esm/{f-chip-add4a0ae.js → f-chip-6fa3ec06.js} +2 -2
- package/dist/esm/{f-chip-add4a0ae.js.map → f-chip-6fa3ec06.js.map} +1 -1
- package/dist/esm/{f-paginator-utils-7b5c0780.js → f-paginator-utils-bd49fb29.js} +2 -2
- package/dist/esm/{f-paginator-utils-7b5c0780.js.map → f-paginator-utils-bd49fb29.js.map} +1 -1
- package/dist/esm/{f-text-field-f2ed44a9.js → f-text-field-25b1eec2.js} +2 -2
- package/dist/esm/{f-text-field-f2ed44a9.js.map → f-text-field-25b1eec2.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_27.entry.js +6 -6
- package/dist/esm/kup-box.entry.js +6 -6
- package/dist/esm/kup-calendar.entry.js +2 -2
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +164 -7
- package/dist/esm/kup-cell.entry.js.map +1 -1
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-1be99de5.js → kup-data-table-helper-6b828446.js} +2 -2
- package/dist/esm/{kup-data-table-helper-1be99de5.js.map → kup-data-table-helper-6b828446.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 +1 -1
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +4 -4
- package/dist/esm/kup-input-panel.entry.js +4 -4
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-82161dea.js → kup-manager-84ac466d.js} +3 -2
- package/dist/esm/kup-manager-84ac466d.js.map +1 -0
- 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 +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-39478ede.entry.js → p-060781c0.entry.js} +2 -2
- package/dist/ketchup/{p-b563176c.js → p-06fe42ee.js} +2 -2
- package/dist/ketchup/{p-ab432adb.entry.js → p-0bce5b56.entry.js} +2 -2
- package/dist/ketchup/{p-178c8a26.js → p-0d2bf291.js} +2 -2
- package/dist/ketchup/{p-2e4de380.entry.js → p-10c91f9b.entry.js} +2 -2
- package/dist/ketchup/{p-131dfa03.entry.js → p-1223c713.entry.js} +2 -2
- package/dist/ketchup/{p-1a6acdad.entry.js → p-131be87e.entry.js} +2 -2
- package/dist/ketchup/{p-5340e384.entry.js → p-1be7bf16.entry.js} +2 -2
- package/dist/ketchup/{p-d8c17372.entry.js → p-219488f4.entry.js} +2 -2
- package/dist/ketchup/{p-ac0c9718.entry.js → p-2219138a.entry.js} +2 -2
- package/dist/ketchup/{p-06c56ec4.entry.js → p-2a792585.entry.js} +2 -2
- package/dist/ketchup/{p-2214607f.entry.js → p-35802f68.entry.js} +2 -2
- package/dist/ketchup/{p-c6f65088.entry.js → p-3bb0e4b3.entry.js} +2 -2
- package/dist/ketchup/{p-d002f625.js → p-454b6065.js} +2 -2
- package/dist/ketchup/{p-102bc318.entry.js → p-53fab0f5.entry.js} +2 -2
- package/dist/ketchup/{p-f1fa3169.entry.js → p-5540decd.entry.js} +2 -2
- package/dist/ketchup/{p-bf3b655e.entry.js → p-556618b0.entry.js} +2 -2
- package/dist/ketchup/{p-83dd1290.entry.js → p-56855d4f.entry.js} +2 -2
- package/dist/ketchup/p-68f82cb0.js +2 -0
- package/dist/ketchup/p-68f82cb0.js.map +1 -0
- package/dist/ketchup/{p-11c3f3be.entry.js → p-6c6fc868.entry.js} +2 -2
- package/dist/ketchup/{p-e18a5f0c.entry.js → p-718900c1.entry.js} +2 -2
- package/dist/ketchup/{p-6a87e1d2.entry.js → p-8084cec5.entry.js} +2 -2
- package/dist/ketchup/{p-24b02a70.entry.js → p-81a042dc.entry.js} +2 -2
- package/dist/ketchup/{p-d0774afd.entry.js → p-8aa58b0f.entry.js} +2 -2
- package/dist/ketchup/{p-3788598c.js → p-a670a42e.js} +2 -2
- package/dist/ketchup/p-a670a42e.js.map +1 -0
- package/dist/ketchup/{p-a04245a4.entry.js → p-c8ec502a.entry.js} +2 -2
- package/dist/ketchup/{p-9333a3e6.entry.js → p-dc959676.entry.js} +2 -2
- package/dist/ketchup/p-deea2b0f.entry.js +2 -0
- package/dist/ketchup/p-deea2b0f.entry.js.map +1 -0
- package/dist/ketchup/p-df055087.js +2 -0
- package/dist/ketchup/{p-f106458a.js.map → p-df055087.js.map} +1 -1
- package/dist/ketchup/{p-d57db62b.entry.js → p-e5b4c8ca.entry.js} +2 -2
- package/dist/ketchup/{p-557f3e37.entry.js → p-ef160adf.entry.js} +2 -2
- package/dist/ketchup/{p-e0a0a49c.entry.js → p-f57c4edf.entry.js} +2 -2
- package/dist/ketchup/{p-60c73c17.entry.js → p-ffa43222.entry.js} +2 -2
- package/dist/ketchup/{p-a0875191.entry.js → p-ffbbd115.entry.js} +2 -2
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-cell-options.tsx/f-cell-options.d.ts +3 -0
- package/dist/types/f-components/f-cell-options.tsx/f-cell-options.declarations.d.ts +19 -0
- package/dist/types/f-components/f-radio/f-radio-declarations.d.ts +5 -0
- package/dist/types/f-components/f-radio/f-radio.d.ts +1 -1
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/f-cell-8eca61f9.js.map +0 -1
- package/dist/cjs/kup-manager-22be97c0.js.map +0 -1
- package/dist/esm/f-cell-582be39b.js.map +0 -1
- package/dist/esm/kup-manager-82161dea.js.map +0 -1
- package/dist/ketchup/p-3788598c.js.map +0 -1
- package/dist/ketchup/p-5dd13932.entry.js +0 -2
- package/dist/ketchup/p-5dd13932.entry.js.map +0 -1
- package/dist/ketchup/p-c42a79a7.js +0 -2
- package/dist/ketchup/p-c42a79a7.js.map +0 -1
- package/dist/ketchup/p-f106458a.js +0 -2
- /package/dist/ketchup/{p-39478ede.entry.js.map → p-060781c0.entry.js.map} +0 -0
- /package/dist/ketchup/{p-b563176c.js.map → p-06fe42ee.js.map} +0 -0
- /package/dist/ketchup/{p-ab432adb.entry.js.map → p-0bce5b56.entry.js.map} +0 -0
- /package/dist/ketchup/{p-178c8a26.js.map → p-0d2bf291.js.map} +0 -0
- /package/dist/ketchup/{p-2e4de380.entry.js.map → p-10c91f9b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-131dfa03.entry.js.map → p-1223c713.entry.js.map} +0 -0
- /package/dist/ketchup/{p-1a6acdad.entry.js.map → p-131be87e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-5340e384.entry.js.map → p-1be7bf16.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d8c17372.entry.js.map → p-219488f4.entry.js.map} +0 -0
- /package/dist/ketchup/{p-ac0c9718.entry.js.map → p-2219138a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-06c56ec4.entry.js.map → p-2a792585.entry.js.map} +0 -0
- /package/dist/ketchup/{p-2214607f.entry.js.map → p-35802f68.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c6f65088.entry.js.map → p-3bb0e4b3.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d002f625.js.map → p-454b6065.js.map} +0 -0
- /package/dist/ketchup/{p-102bc318.entry.js.map → p-53fab0f5.entry.js.map} +0 -0
- /package/dist/ketchup/{p-f1fa3169.entry.js.map → p-5540decd.entry.js.map} +0 -0
- /package/dist/ketchup/{p-bf3b655e.entry.js.map → p-556618b0.entry.js.map} +0 -0
- /package/dist/ketchup/{p-83dd1290.entry.js.map → p-56855d4f.entry.js.map} +0 -0
- /package/dist/ketchup/{p-11c3f3be.entry.js.map → p-6c6fc868.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e18a5f0c.entry.js.map → p-718900c1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-6a87e1d2.entry.js.map → p-8084cec5.entry.js.map} +0 -0
- /package/dist/ketchup/{p-24b02a70.entry.js.map → p-81a042dc.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d0774afd.entry.js.map → p-8aa58b0f.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a04245a4.entry.js.map → p-c8ec502a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-9333a3e6.entry.js.map → p-dc959676.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d57db62b.entry.js.map → p-e5b4c8ca.entry.js.map} +0 -0
- /package/dist/ketchup/{p-557f3e37.entry.js.map → p-ef160adf.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e0a0a49c.entry.js.map → p-f57c4edf.entry.js.map} +0 -0
- /package/dist/ketchup/{p-60c73c17.entry.js.map → p-ffa43222.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a0875191.entry.js.map → p-ffbbd115.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as n,H as s,d as o}from"./p-d7c15b0e.js";import{F as l}from"./p-cc32b7a2.js";import{F as a}from"./p-c42a79a7.js";import{k as r,a5 as u,F as c,g as h,s as p,h as f,al as d,ai as m,ak as b,aj as v,am as k,e as g}from"./p-3788598c.js";import{F as y}from"./p-c4054aba.js";import{c as _}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-5d03c077.js";import"./p-b563176c.js";import"./p-178c8a26.js";import"./p-029c7cbe.js";import"./p-d4a879fc.js";var x;(function(t){t["TAB"]="tab"})(x||(x={}));var w;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the input panel.";t["hiddenSubmitButton"]="Creates a hidden submit button in order to submit the form with enter.";t["submitCb"]="Sets the callback function on submit form";t["optionsHandler"]="Sets the callback function to recieve options"})(w||(w={}));const j=12;const O=22;const z=t=>{if(t==0){return j/2}if(!t){return null}if(t===1){return 1.5*j}return t*j};const $=t=>{if(!t){return null}return t*O};const S=t=>{if(!t){return null}return(t-1)*O};const M=t=>{if(!t){return null}return t*j};const T=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:87ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";const W=T;var D=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)};var C=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var E=undefined&&undefined.__rest||function(t,e){var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0)i[n]=t[n];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++){if(e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s]))i[n[s]]=t[n[s]]}return i};var F,I,P,R,N,G,J,A,L,V,B,H,K,X,Y,q,Q,U,Z,tt,et,it,nt,st,ot,lt,at,rt,ut,ct,ht,pt,ft,dt,mt,bt,vt,kt,gt,yt,_t,xt,wt,jt,Ot,zt,$t,St,Mt,Tt;const Wt=document.documentElement;const Dt=class{constructor(i){t(this,i);this.kupReady=e(this,"kup-input-panel-ready",6);F.add(this);I.set(this,r());P.set(this,new Map([["SmeupTreeNode",D(this,F,"m",$t).bind(this)],["SmeupDataTree",D(this,F,"m",St).bind(this)],["SmeupTable",D(this,F,"m",Mt).bind(this)],["SmeupDataTable",D(this,F,"m",Mt).bind(this)]]));R.set(this,null);N.set(this,new Map([[u.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.COMBOBOX,["kup-combobox-iconclick"]],[u.MULTI_COMBOBOX,["kup-combobox-iconclick"]]]));G.set(this,[]);J.set(this,new Map([[u.DATE,"kup-date-picker"],[u.TIME,"kup-time-picker"]]));A.set(this,new Map([[c.BUTTON_LIST,D(this,F,"m",K).bind(this)],[c.EDITOR,D(this,F,"m",X).bind(this)],[c.LABEL,D(this,F,"m",q).bind(this)],[c.TABLE,D(this,F,"m",Y).bind(this)]]));L.set(this,new Map([[x.TAB,D(this,F,"m",it).bind(this)]]));V.set(this,[]);this.customStyle="";this.data=null;this.hiddenSubmitButton=false;this.submitCb=null;this.optionsHandler=null;this.customButtonClickHandler=null;this.inputPanelCells=[];this.tabSelected=null}onDataChanged(){C(this,R,structuredClone(this.data),"f");if(D(this,G,"f").length){D(this,G,"f").map((({event:t,handler:e})=>{this.rootElement.removeEventListener(t,e)}));C(this,G,[],"f")}if(D(this,V,"f").length){D(this,V,"f").map((t=>{D(this,I,"f").keysBinding.unregister(t)}));C(this,V,[],"f")}D(this,F,"m",ot).call(this,this.data)}async getProps(t){return h(this,w,t)}async refresh(){i(this)}async setProps(t){p(this,w,t)}componentWillLoad(){D(this,I,"f").debug.logLoad(this,false);D(this,I,"f").language.register(this);D(this,I,"f").theme.register(this);this.onDataChanged()}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});D(this,I,"f").debug.logLoad(this,true)}componentWillRender(){D(this,I,"f").debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){y(e[t])}}D(this,I,"f").debug.logRender(this,true)}render(){const t=Boolean(!this.inputPanelCells.length);const e=t?[n("p",null,D(this,I,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>D(this,F,"m",B).call(this,t)));return n(s,{key:"525584941a5ebb2b3baea0b002139bb008e58065"},n("style",{key:"dda6f8455cbe807a5e6ab758404dfef606397a82"},D(this,I,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"b932a344a74bca096f71290cc8fca64b962b952b",id:_},e))}disconnectedCallback(){D(this,I,"f").language.unregister(this);D(this,I,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["onDataChanged"]}}};I=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,G=new WeakMap,J=new WeakMap,A=new WeakMap,L=new WeakMap,V=new WeakMap,F=new WeakSet,B=function t(e){var i;const s=e.row.layout;const o=(s===null||s===void 0?void 0:s.horizontal)||false;let a;if(!((i=s===null||s===void 0?void 0:s.sections)===null||i===void 0?void 0:i.length)){a=e.cells.map((t=>D(this,F,"m",H).call(this,t.cell,e.row,t.column)))}else{a=s.absolute?D(this,F,"m",Z).call(this,e,s):D(this,F,"m",U).call(this,e,s)}const r={"input-panel":true,"input-panel--column":!o,"input-panel--absolute":s===null||s===void 0?void 0:s.absolute};return n("form",{class:r,name:this.rootElement.id,onSubmit:t=>{t.preventDefault();this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)}})}},a,!this.hiddenSubmitButton?n(l,{buttonType:"submit",label:D(this,I,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit"}):null)},H=function t(e,i,s){if(!e){return}const o=D(this,A,"f").get(e.shape);if(o!==undefined){return o(e,s.name)}const l={cell:e,column:s,row:i,component:this,editable:true,renderKup:true,setSizes:true};const r=D(this,F,"m",Q).call(this,e,s.title);if(r){return n("div",{class:{"input-panel__label_container":true}},r,n(a,Object.assign({},l)))}return n(a,Object.assign({},l))},K=function t(e,i){return n(l,Object.assign({icon:e.icon,id:i},e.data,{wrapperClass:"form__submit"}))},X=function t(e,i){const s="kup-editor-save";const o=t=>{const e=this.inputPanelCells.reduce(((t,{cells:e})=>{if(!t){return e.find((({column:t})=>t.name===i)).cell}return t}),null);e.value=t.detail.htmlValue.replace(/\n/g,"<br>")};this.rootElement.addEventListener(s,o);D(this,G,"f").push({event:s,handler:o});return n("kup-editor",Object.assign({},e.data,{id:i,isReadOnly:!e.isEditable,showToolbar:true}))},Y=function t(e,i){return n("kup-data-table",Object.assign({id:i,editableData:true,showGroups:true,showFilters:true,showFooter:true},e.data))},q=function t(e,i){return n("span",{class:"input-panel-label",id:i},e.value)},Q=function t(e,i){if(!i){return null}const s=Wt.ketchup.data.cell.getType(e,e.shape);if(s===u.RADIO){return n("span",null,i)}return null},U=function t(e,i){const n=D(this,L,"f").get(i.sectionsType);return n?n(e,i.sections):i.sections.map((t=>D(this,F,"m",tt).call(this,e,t)))},Z=function t(e,i){return i.sections.map((t=>D(this,F,"m",et).call(this,e,t)))},tt=function t(e,i,s=false,o={}){var l,a,r,u;let c=[];if((l=i.sections)===null||l===void 0?void 0:l.length){c=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((a=i.content)===null||a===void 0?void 0:a.length){c=i.content.map((t=>D(this,F,"m",nt).call(this,e,t)))}const h={"input-panel__section":!i.horizontal,"input-panel__horizontal-section":i.horizontal};if((u=(r=e.row)===null||r===void 0?void 0:r.layout)===null||u===void 0?void 0:u.horizontal){o.maxWidth=i.dim}else{o.maxHeight=i.dim}const p=Object.assign(Object.assign({},o),{gap:+i.gap>0?`${i.gap}rem`:"","grid-template-columns":+i.gridCols>0?`repeat(${i.gridCols}, 1fr)`:"","grid-template-rows":+i.gridRows>0?`repeat(${i.gridRows}, 1fr)`:""});const f=n("div",{class:h,style:p},c);return i.title&&!s?n("div",{class:{"input-panel__section_label_container":true}},n("h3",null,i.title),f):f},et=function t(e,i){var s,o;let l=[];if((s=i.sections)===null||s===void 0?void 0:s.length){l=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((o=i.content)===null||o===void 0?void 0:o.length){l=i.content.map((t=>D(this,F,"m",st).call(this,e,t)))}const a=`${z(i.absoluteWidth)}px`;const r=`${$(i.absoluteHeight)}px`;const u=`${S(i.absoluteRow)}px`;const c=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:a,"min-width":a,"max-width":a,height:r,"min-height":r,"max-height":r,top:u,left:c,overflow:"auto"};return n("div",{style:h},l)},it=function t(e,i){if(!this.tabSelected){this.tabSelected=i[0].id||"0"}const s=i.map(((t,e)=>({active:(t.id||`${e}`)===this.tabSelected,value:t.title,icon:t.icon,id:t.id||`${e}`})));const o=i.map(((t,i)=>{const n=t.id||`${i}`;return D(this,F,"m",tt).call(this,e,t,true,{display:this.tabSelected!==n?"none":"grid"})}));const l=".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }";if(!D(this,G,"f").map((t=>t.event)).includes("kup-tabbar-click")){const t="kup-tabbar-click";const e=t=>{this.tabSelected=t.detail.node.id};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}return n("div",{class:{"input-panel__tabs_container":true}},n("kup-tab-bar",{data:s,customStyle:l}),o)},nt=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));const o=+i.colSpan>0?i.colSpan:!(+i.colSpan>0)&&!(+i.colStart>0)?1:null;const l=o?`span ${o}`:`${i.colStart}`;const a=+i.colEnd>0?`${i.colEnd}`:"";const r=+i.rowSpan>0?i.rowSpan:!(+i.rowSpan>0)&&!(+i.rowStart>0)?1:null;const u=r?`span ${r}`:`${i.rowStart}`;const c=+i.rowEnd>0?`${i.rowEnd}`:"";const h={"grid-column-start":l,"grid-column-end":a,"grid-row-start":u,"grid-row-end":c};if(!s||!s.cell){return}return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},st=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));if(!s||!s.cell){return}let o;if(s.cell.shape==c.DATE){o=i.absoluteLength>8?i.absoluteLength:8}else{o=i.absoluteLength}const l=`${z(o)}px`;const a=`${$(1)}px`;const r=`${S(i.absoluteRow)}px`;const u=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:l,"min-width":l,"max-width":l,height:a,"min-height":a,"max-height":a,top:r,left:u,overflow:"auto"};s.cell.data=Object.assign(Object.assign({},s.cell.data),{customStyle:(s.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}"});return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},ot=function t(e){var i;const n=((i=e===null||e===void 0?void 0:e.rows)===null||i===void 0?void 0:i.length)?e.rows.reduce(((t,i)=>{const n=e.columns.filter((t=>t.visible)).map((t=>{const e=structuredClone(i.cells[t.name]);const n=e?Object.assign(Object.assign({},e),{data:D(this,F,"m",lt).call(this,e,t),slotData:D(this,F,"m",ct).call(this,e,t),isEditable:true}):null;return{column:t,cell:n}}));return[...t,{cells:n,row:i}]}),[]):[];n.map((({cells:t})=>t.map((({cell:t,column:e})=>{const i=Wt.ketchup.data.cell.getType(t,t.shape);const n=D(this,J,"f").get(i);if(!n){return}const s=this.rootElement.shadowRoot.querySelector(`${n}[id=${e.name}]`);s===null||s===void 0?void 0:s.setValue(t.value)}))));this.inputPanelCells=n},lt=function t(e,i){const n=Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e,i)),{disabled:!e.editable,id:i.name});const s=Wt.ketchup.data.cell.getType(e,e.shape);const o=e.data||{},l=E(o,["data"]);return s!==u.MULTI_AUTOCOMPLETE&&s!==u.MULTI_COMBOBOX?D(this,F,"m",at).call(this,n,Object.assign({},e.data)):Object.assign(Object.assign({},n),l)},at=function t(e,i){for(const n in i){if(i[n]instanceof Object&&!Array.isArray(i[n])&&n in e){e[n]=D(this,F,"m",t).call(this,e[n],i[n])}else{e[n]=i[n]}}return e},rt=function t(){return this.inputPanelCells.reduce(((t,e)=>{const i=Object.keys(e.row.cells).reduce(((t,i)=>{var n;const s=(n=e.cells.find((t=>t.column.name===i)))===null||n===void 0?void 0:n.cell;let o=s===null||s===void 0?void 0:s.value;if((s===null||s===void 0?void 0:s.shape)===c.TABLE){o=JSON.stringify(D(this,F,"m",Ot).call(this,s.data.data,i))}return Object.assign(Object.assign({},t),{[i]:Object.assign(Object.assign({},e.row.cells[i]),{value:o,obj:s===null||s===void 0?void 0:s.obj})})}),{});return{columns:[...t.columns,...e.cells.map((t=>t.column))],rows:[...t.rows,{cells:i,layout:e.row.layout}]}}),{columns:[],rows:[]})},ut=function t(e,i){if(!e){return null}const n=e.options;const s=i.title;const o=e.value;const l=Wt.ketchup.data.cell.getType(e,e.shape);const a=new Map([[u.AUTOCOMPLETE,D(this,F,"m",dt).bind(this)],[u.BUTTON_LIST,D(this,F,"m",ft).bind(this)],[u.CHART,D(this,F,"m",pt).bind(this)],[u.CHIP,D(this,F,"m",ht).bind(this)],[u.CHECKBOX,D(this,F,"m",mt).bind(this)],[u.COLOR_PICKER,D(this,F,"m",bt).bind(this)],[u.COMBOBOX,D(this,F,"m",dt).bind(this)],[u.EDITOR,D(this,F,"m",vt).bind(this)],[u.MULTI_AUTOCOMPLETE,D(this,F,"m",ht).bind(this)],[u.MULTI_COMBOBOX,D(this,F,"m",ht).bind(this)],[u.NUMBER,D(this,F,"m",wt).bind(this)],[u.DATE,D(this,F,"m",_t).bind(this)],[u.RADIO,D(this,F,"m",gt).bind(this)],[u.STRING,D(this,F,"m",kt).bind(this)],[u.SWITCH,D(this,F,"m",yt).bind(this)],[u.TABLE,D(this,F,"m",jt).bind(this)],[u.TIME,D(this,F,"m",xt).bind(this)]]);const r=a.get(l);return r?r(n,s,o,e,i.name):null},ct=function t(e,i){const n=Wt.ketchup.data.cell.getType(e,e.shape);if(!e.editable){return null}if(n===u.CHIP){return{trailingIcon:true,label:i.title,disabled:!e.editable,id:i.name,fullWidth:false}}if(n===u.MULTI_AUTOCOMPLETE||n===u.MULTI_COMBOBOX){return Object.assign(Object.assign({},D(this,F,"m",dt).call(this,e.options,i.title,null,e,i.name)),{showDropDownIcon:true,class:"",style:{width:"100%"},disabled:!e.editable,id:i.name})}return null},ht=function t(e,i,n){return d(n)},pt=function t(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},ft=function t(e,i,n,s,o){var l,a,r,u;s.data=s.data||{};s.data.onClick=()=>{s.fun?this.customButtonClickHandler({fun:s.fun,cellId:o,currentState:D(this,F,"m",rt).call(this)}):this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)},cell:o})};if(((l=s.data)===null||l===void 0?void 0:l.keyShortcut)&&!((a=s.data)===null||a===void 0?void 0:a.disabled)){D(this,V,"f").push((r=s.data)===null||r===void 0?void 0:r.keyShortcut);D(this,I,"f").keysBinding.register((u=s.data)===null||u===void 0?void 0:u.keyShortcut,s.data.onClick.bind(this))}return Object.assign({label:s.value,fun:s.fun},s.data)},dt=function t(e,i,n,s,o){const l=m(n,i,[]);if(s.fun){const t=Wt.ketchup.data.cell.getType(s,s.shape);const e=D(this,N,"f").get(t);if(!e){return}e.map((t=>{const e=t=>{D(this,F,"m",Tt).call(this,t.detail,s.fun,l,o,n)};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}))}else if(e){l.data["kup-list"].data=D(this,F,"m",zt).call(this,e,n)}return l},mt=function t(e,i,n){return b(n,i)},bt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},vt=function t(e,i,n){return{initialValue:n}},kt=function t(e,i,n){return{label:i}},gt=function t(e,i,n){return v(n,e)},yt=function t(e,i,n){return k(n,i)},_t=function t(e,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},xt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},wt=function t(e,i,n){return{label:i}},jt=function t(e,i,n,s,o){try{let t=JSON.parse(s.value);if(!t){D(this,I,"f").debug.logMessage(this,`Empty value for ${o} cell.`,g.WARNING);return null}if(t.type!=="SmeupDataTable"){D(this,I,"f").debug.logMessage(this,`Wrong data table type for ${o} cell. Type \`SmeupDataTable\` in value expected`,g.ERROR);return null}return{data:{columns:t.columns.map((e=>Object.assign(Object.assign({},e),{obj:t.rows[0].cells[e.name].obj}))),rows:t.rows.map((e=>Object.assign(Object.assign({},e),{cells:Object.keys(e.cells).reduce(((i,n)=>{const s=t.columns.find((t=>t.name===n));return Object.assign(Object.assign({},i),{[n]:Object.assign(Object.assign({},e.cells[n]),{data:Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e.cells[n],s)),{disabled:e.cells[n].editable===false,id:s.id})})})}),{})})))}}}catch(t){D(this,I,"f").debug.logMessage(this,`Invalid value for ${o} cell. Type \`SmeupDataTable\` expected`,g.ERROR);return null}},Ot=function t(e,i){const n=Object.assign(Object.assign({},e),{rows:e.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))});const s=e.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!s.length){return n}try{const t=JSON.parse(D(this,R,"f").rows[0].cells[i].value);n.rows=e.rows.map(((e,i)=>s.reduce(((n,s)=>{const o=t.rows[i].cells[s]&&e.cells[s].value!==t.rows[i].cells[s].value;if(o){return Object.assign(Object.assign({},t.rows[i]),{cells:Object.assign(Object.assign({},n.cells),{[s]:Object.assign(Object.assign({},t.rows[i].cells[s]),{value:e.cells[s].value})})})}return Object.assign(Object.assign({},t.rows[i]),{cells:n.cells})}),Object.assign(Object.assign({},t.rows[i]),{cells:{}}))));return n}catch(t){return n}},zt=function t(e,i){const n=D(this,P,"f").get(e.type);if(n){return n(e,i)}else{return e.map((t=>({value:t.label,id:t.id,selected:i===t.id})))}},$t=function t(e,i){return e.children.map((e=>{var n;return{id:e.content.codice,value:e.content.testo,selected:i===e.content.codice,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},St=function t(e,i){return e.children.map((e=>{var n;return{id:e.obj.k,value:e.value,selected:i===e.obj.k,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},Mt=function t(e,i){return e.rows.map((t=>{var e;const n=t.fields||t.cells;const[s,o]=Object.keys(n);return{id:n[s].value,value:((e=n[o])===null||e===void 0?void 0:e.value)||n[s].value,selected:i===n[s].value}}))},Tt=function t(e,i,n,s,o){if(e.id!==s||e.open===false){return}this.optionsHandler(i,e.inputValue,D(this,F,"m",rt).call(this),e.id).then((t=>{var i;n.data["kup-list"].data=(i=D(this,F,"m",zt).call(this,t,o))!==null&&i!==void 0?i:[];e.comp.refresh()}))};Dt.style=W;export{Dt as kup_input_panel};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as n,H as s,d as o}from"./p-d7c15b0e.js";import{F as l}from"./p-cc32b7a2.js";import{F as a}from"./p-68f82cb0.js";import{k as r,a5 as u,F as c,g as h,s as p,h as f,al as d,ai as m,ak as b,aj as v,am as k,e as g}from"./p-a670a42e.js";import{F as y}from"./p-c4054aba.js";import{c as _}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-5d03c077.js";import"./p-06fe42ee.js";import"./p-0d2bf291.js";import"./p-029c7cbe.js";import"./p-d4a879fc.js";var x;(function(t){t["TAB"]="tab"})(x||(x={}));var w;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the input panel.";t["hiddenSubmitButton"]="Creates a hidden submit button in order to submit the form with enter.";t["submitCb"]="Sets the callback function on submit form";t["optionsHandler"]="Sets the callback function to recieve options"})(w||(w={}));const j=12;const O=22;const z=t=>{if(t==0){return j/2}if(!t){return null}if(t===1){return 1.5*j}return t*j};const $=t=>{if(!t){return null}return t*O};const S=t=>{if(!t){return null}return(t-1)*O};const M=t=>{if(!t){return null}return t*j};const T=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:87ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";const W=T;var D=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)};var C=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var E=undefined&&undefined.__rest||function(t,e){var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0)i[n]=t[n];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++){if(e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s]))i[n[s]]=t[n[s]]}return i};var F,I,P,R,N,G,J,A,L,V,B,H,K,X,Y,q,Q,U,Z,tt,et,it,nt,st,ot,lt,at,rt,ut,ct,ht,pt,ft,dt,mt,bt,vt,kt,gt,yt,_t,xt,wt,jt,Ot,zt,$t,St,Mt,Tt;const Wt=document.documentElement;const Dt=class{constructor(i){t(this,i);this.kupReady=e(this,"kup-input-panel-ready",6);F.add(this);I.set(this,r());P.set(this,new Map([["SmeupTreeNode",D(this,F,"m",$t).bind(this)],["SmeupDataTree",D(this,F,"m",St).bind(this)],["SmeupTable",D(this,F,"m",Mt).bind(this)],["SmeupDataTable",D(this,F,"m",Mt).bind(this)]]));R.set(this,null);N.set(this,new Map([[u.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.COMBOBOX,["kup-combobox-iconclick"]],[u.MULTI_COMBOBOX,["kup-combobox-iconclick"]]]));G.set(this,[]);J.set(this,new Map([[u.DATE,"kup-date-picker"],[u.TIME,"kup-time-picker"]]));A.set(this,new Map([[c.BUTTON_LIST,D(this,F,"m",K).bind(this)],[c.EDITOR,D(this,F,"m",X).bind(this)],[c.LABEL,D(this,F,"m",q).bind(this)],[c.TABLE,D(this,F,"m",Y).bind(this)]]));L.set(this,new Map([[x.TAB,D(this,F,"m",it).bind(this)]]));V.set(this,[]);this.customStyle="";this.data=null;this.hiddenSubmitButton=false;this.submitCb=null;this.optionsHandler=null;this.customButtonClickHandler=null;this.inputPanelCells=[];this.tabSelected=null}onDataChanged(){C(this,R,structuredClone(this.data),"f");if(D(this,G,"f").length){D(this,G,"f").map((({event:t,handler:e})=>{this.rootElement.removeEventListener(t,e)}));C(this,G,[],"f")}if(D(this,V,"f").length){D(this,V,"f").map((t=>{D(this,I,"f").keysBinding.unregister(t)}));C(this,V,[],"f")}D(this,F,"m",ot).call(this,this.data)}async getProps(t){return h(this,w,t)}async refresh(){i(this)}async setProps(t){p(this,w,t)}componentWillLoad(){D(this,I,"f").debug.logLoad(this,false);D(this,I,"f").language.register(this);D(this,I,"f").theme.register(this);this.onDataChanged()}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});D(this,I,"f").debug.logLoad(this,true)}componentWillRender(){D(this,I,"f").debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){y(e[t])}}D(this,I,"f").debug.logRender(this,true)}render(){const t=Boolean(!this.inputPanelCells.length);const e=t?[n("p",null,D(this,I,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>D(this,F,"m",B).call(this,t)));return n(s,{key:"525584941a5ebb2b3baea0b002139bb008e58065"},n("style",{key:"dda6f8455cbe807a5e6ab758404dfef606397a82"},D(this,I,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"b932a344a74bca096f71290cc8fca64b962b952b",id:_},e))}disconnectedCallback(){D(this,I,"f").language.unregister(this);D(this,I,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["onDataChanged"]}}};I=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,G=new WeakMap,J=new WeakMap,A=new WeakMap,L=new WeakMap,V=new WeakMap,F=new WeakSet,B=function t(e){var i;const s=e.row.layout;const o=(s===null||s===void 0?void 0:s.horizontal)||false;let a;if(!((i=s===null||s===void 0?void 0:s.sections)===null||i===void 0?void 0:i.length)){a=e.cells.map((t=>D(this,F,"m",H).call(this,t.cell,e.row,t.column)))}else{a=s.absolute?D(this,F,"m",Z).call(this,e,s):D(this,F,"m",U).call(this,e,s)}const r={"input-panel":true,"input-panel--column":!o,"input-panel--absolute":s===null||s===void 0?void 0:s.absolute};return n("form",{class:r,name:this.rootElement.id,onSubmit:t=>{t.preventDefault();this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)}})}},a,!this.hiddenSubmitButton?n(l,{buttonType:"submit",label:D(this,I,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit"}):null)},H=function t(e,i,s){if(!e){return}const o=D(this,A,"f").get(e.shape);if(o!==undefined){return o(e,s.name)}const l={cell:e,column:s,row:i,component:this,editable:true,renderKup:true,setSizes:true};const r=D(this,F,"m",Q).call(this,e,s.title);if(r){return n("div",{class:{"input-panel__label_container":true}},r,n(a,Object.assign({},l)))}return n(a,Object.assign({},l))},K=function t(e,i){return n(l,Object.assign({icon:e.icon,id:i},e.data,{wrapperClass:"form__submit"}))},X=function t(e,i){const s="kup-editor-save";const o=t=>{const e=this.inputPanelCells.reduce(((t,{cells:e})=>{if(!t){return e.find((({column:t})=>t.name===i)).cell}return t}),null);e.value=t.detail.htmlValue.replace(/\n/g,"<br>")};this.rootElement.addEventListener(s,o);D(this,G,"f").push({event:s,handler:o});return n("kup-editor",Object.assign({},e.data,{id:i,isReadOnly:!e.isEditable,showToolbar:true}))},Y=function t(e,i){return n("kup-data-table",Object.assign({id:i,editableData:true,showGroups:true,showFilters:true,showFooter:true},e.data))},q=function t(e,i){return n("span",{class:"input-panel-label",id:i},e.value)},Q=function t(e,i){if(!i){return null}const s=Wt.ketchup.data.cell.getType(e,e.shape);if(s===u.RADIO){return n("span",null,i)}return null},U=function t(e,i){const n=D(this,L,"f").get(i.sectionsType);return n?n(e,i.sections):i.sections.map((t=>D(this,F,"m",tt).call(this,e,t)))},Z=function t(e,i){return i.sections.map((t=>D(this,F,"m",et).call(this,e,t)))},tt=function t(e,i,s=false,o={}){var l,a,r,u;let c=[];if((l=i.sections)===null||l===void 0?void 0:l.length){c=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((a=i.content)===null||a===void 0?void 0:a.length){c=i.content.map((t=>D(this,F,"m",nt).call(this,e,t)))}const h={"input-panel__section":!i.horizontal,"input-panel__horizontal-section":i.horizontal};if((u=(r=e.row)===null||r===void 0?void 0:r.layout)===null||u===void 0?void 0:u.horizontal){o.maxWidth=i.dim}else{o.maxHeight=i.dim}const p=Object.assign(Object.assign({},o),{gap:+i.gap>0?`${i.gap}rem`:"","grid-template-columns":+i.gridCols>0?`repeat(${i.gridCols}, 1fr)`:"","grid-template-rows":+i.gridRows>0?`repeat(${i.gridRows}, 1fr)`:""});const f=n("div",{class:h,style:p},c);return i.title&&!s?n("div",{class:{"input-panel__section_label_container":true}},n("h3",null,i.title),f):f},et=function t(e,i){var s,o;let l=[];if((s=i.sections)===null||s===void 0?void 0:s.length){l=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((o=i.content)===null||o===void 0?void 0:o.length){l=i.content.map((t=>D(this,F,"m",st).call(this,e,t)))}const a=`${z(i.absoluteWidth)}px`;const r=`${$(i.absoluteHeight)}px`;const u=`${S(i.absoluteRow)}px`;const c=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:a,"min-width":a,"max-width":a,height:r,"min-height":r,"max-height":r,top:u,left:c,overflow:"auto"};return n("div",{style:h},l)},it=function t(e,i){if(!this.tabSelected){this.tabSelected=i[0].id||"0"}const s=i.map(((t,e)=>({active:(t.id||`${e}`)===this.tabSelected,value:t.title,icon:t.icon,id:t.id||`${e}`})));const o=i.map(((t,i)=>{const n=t.id||`${i}`;return D(this,F,"m",tt).call(this,e,t,true,{display:this.tabSelected!==n?"none":"grid"})}));const l=".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }";if(!D(this,G,"f").map((t=>t.event)).includes("kup-tabbar-click")){const t="kup-tabbar-click";const e=t=>{this.tabSelected=t.detail.node.id};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}return n("div",{class:{"input-panel__tabs_container":true}},n("kup-tab-bar",{data:s,customStyle:l}),o)},nt=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));const o=+i.colSpan>0?i.colSpan:!(+i.colSpan>0)&&!(+i.colStart>0)?1:null;const l=o?`span ${o}`:`${i.colStart}`;const a=+i.colEnd>0?`${i.colEnd}`:"";const r=+i.rowSpan>0?i.rowSpan:!(+i.rowSpan>0)&&!(+i.rowStart>0)?1:null;const u=r?`span ${r}`:`${i.rowStart}`;const c=+i.rowEnd>0?`${i.rowEnd}`:"";const h={"grid-column-start":l,"grid-column-end":a,"grid-row-start":u,"grid-row-end":c};if(!s||!s.cell){return}return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},st=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));if(!s||!s.cell){return}let o;if(s.cell.shape==c.DATE){o=i.absoluteLength>8?i.absoluteLength:8}else{o=i.absoluteLength}const l=`${z(o)}px`;const a=`${$(1)}px`;const r=`${S(i.absoluteRow)}px`;const u=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:l,"min-width":l,"max-width":l,height:a,"min-height":a,"max-height":a,top:r,left:u,overflow:"auto"};s.cell.data=Object.assign(Object.assign({},s.cell.data),{customStyle:(s.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}"});return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},ot=function t(e){var i;const n=((i=e===null||e===void 0?void 0:e.rows)===null||i===void 0?void 0:i.length)?e.rows.reduce(((t,i)=>{const n=e.columns.filter((t=>t.visible)).map((t=>{const e=structuredClone(i.cells[t.name]);const n=e?Object.assign(Object.assign({},e),{data:D(this,F,"m",lt).call(this,e,t),slotData:D(this,F,"m",ct).call(this,e,t),isEditable:true}):null;return{column:t,cell:n}}));return[...t,{cells:n,row:i}]}),[]):[];n.map((({cells:t})=>t.map((({cell:t,column:e})=>{const i=Wt.ketchup.data.cell.getType(t,t.shape);const n=D(this,J,"f").get(i);if(!n){return}const s=this.rootElement.shadowRoot.querySelector(`${n}[id=${e.name}]`);s===null||s===void 0?void 0:s.setValue(t.value)}))));this.inputPanelCells=n},lt=function t(e,i){const n=Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e,i)),{disabled:!e.editable,id:i.name});const s=Wt.ketchup.data.cell.getType(e,e.shape);const o=e.data||{},l=E(o,["data"]);return s!==u.MULTI_AUTOCOMPLETE&&s!==u.MULTI_COMBOBOX?D(this,F,"m",at).call(this,n,Object.assign({},e.data)):Object.assign(Object.assign({},n),l)},at=function t(e,i){for(const n in i){if(i[n]instanceof Object&&!Array.isArray(i[n])&&n in e){e[n]=D(this,F,"m",t).call(this,e[n],i[n])}else{e[n]=i[n]}}return e},rt=function t(){return this.inputPanelCells.reduce(((t,e)=>{const i=Object.keys(e.row.cells).reduce(((t,i)=>{var n;const s=(n=e.cells.find((t=>t.column.name===i)))===null||n===void 0?void 0:n.cell;let o=s===null||s===void 0?void 0:s.value;if((s===null||s===void 0?void 0:s.shape)===c.TABLE){o=JSON.stringify(D(this,F,"m",Ot).call(this,s.data.data,i))}return Object.assign(Object.assign({},t),{[i]:Object.assign(Object.assign({},e.row.cells[i]),{value:o,obj:s===null||s===void 0?void 0:s.obj})})}),{});return{columns:[...t.columns,...e.cells.map((t=>t.column))],rows:[...t.rows,{cells:i,layout:e.row.layout}]}}),{columns:[],rows:[]})},ut=function t(e,i){if(!e){return null}const n=e.options;const s=i.title;const o=e.value;const l=Wt.ketchup.data.cell.getType(e,e.shape);const a=new Map([[u.AUTOCOMPLETE,D(this,F,"m",dt).bind(this)],[u.BUTTON_LIST,D(this,F,"m",ft).bind(this)],[u.CHART,D(this,F,"m",pt).bind(this)],[u.CHIP,D(this,F,"m",ht).bind(this)],[u.CHECKBOX,D(this,F,"m",mt).bind(this)],[u.COLOR_PICKER,D(this,F,"m",bt).bind(this)],[u.COMBOBOX,D(this,F,"m",dt).bind(this)],[u.EDITOR,D(this,F,"m",vt).bind(this)],[u.MULTI_AUTOCOMPLETE,D(this,F,"m",ht).bind(this)],[u.MULTI_COMBOBOX,D(this,F,"m",ht).bind(this)],[u.NUMBER,D(this,F,"m",wt).bind(this)],[u.DATE,D(this,F,"m",_t).bind(this)],[u.RADIO,D(this,F,"m",gt).bind(this)],[u.STRING,D(this,F,"m",kt).bind(this)],[u.SWITCH,D(this,F,"m",yt).bind(this)],[u.TABLE,D(this,F,"m",jt).bind(this)],[u.TIME,D(this,F,"m",xt).bind(this)]]);const r=a.get(l);return r?r(n,s,o,e,i.name):null},ct=function t(e,i){const n=Wt.ketchup.data.cell.getType(e,e.shape);if(!e.editable){return null}if(n===u.CHIP){return{trailingIcon:true,label:i.title,disabled:!e.editable,id:i.name,fullWidth:false}}if(n===u.MULTI_AUTOCOMPLETE||n===u.MULTI_COMBOBOX){return Object.assign(Object.assign({},D(this,F,"m",dt).call(this,e.options,i.title,null,e,i.name)),{showDropDownIcon:true,class:"",style:{width:"100%"},disabled:!e.editable,id:i.name})}return null},ht=function t(e,i,n){return d(n)},pt=function t(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},ft=function t(e,i,n,s,o){var l,a,r,u;s.data=s.data||{};s.data.onClick=()=>{s.fun?this.customButtonClickHandler({fun:s.fun,cellId:o,currentState:D(this,F,"m",rt).call(this)}):this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)},cell:o})};if(((l=s.data)===null||l===void 0?void 0:l.keyShortcut)&&!((a=s.data)===null||a===void 0?void 0:a.disabled)){D(this,V,"f").push((r=s.data)===null||r===void 0?void 0:r.keyShortcut);D(this,I,"f").keysBinding.register((u=s.data)===null||u===void 0?void 0:u.keyShortcut,s.data.onClick.bind(this))}return Object.assign({label:s.value,fun:s.fun},s.data)},dt=function t(e,i,n,s,o){const l=m(n,i,[]);if(s.fun){const t=Wt.ketchup.data.cell.getType(s,s.shape);const e=D(this,N,"f").get(t);if(!e){return}e.map((t=>{const e=t=>{D(this,F,"m",Tt).call(this,t.detail,s.fun,l,o,n)};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}))}else if(e){l.data["kup-list"].data=D(this,F,"m",zt).call(this,e,n)}return l},mt=function t(e,i,n){return b(n,i)},bt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},vt=function t(e,i,n){return{initialValue:n}},kt=function t(e,i,n){return{label:i}},gt=function t(e,i,n){return v(n,e)},yt=function t(e,i,n){return k(n,i)},_t=function t(e,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},xt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},wt=function t(e,i,n){return{label:i}},jt=function t(e,i,n,s,o){try{let t=JSON.parse(s.value);if(!t){D(this,I,"f").debug.logMessage(this,`Empty value for ${o} cell.`,g.WARNING);return null}if(t.type!=="SmeupDataTable"){D(this,I,"f").debug.logMessage(this,`Wrong data table type for ${o} cell. Type \`SmeupDataTable\` in value expected`,g.ERROR);return null}return{data:{columns:t.columns.map((e=>Object.assign(Object.assign({},e),{obj:t.rows[0].cells[e.name].obj}))),rows:t.rows.map((e=>Object.assign(Object.assign({},e),{cells:Object.keys(e.cells).reduce(((i,n)=>{const s=t.columns.find((t=>t.name===n));return Object.assign(Object.assign({},i),{[n]:Object.assign(Object.assign({},e.cells[n]),{data:Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e.cells[n],s)),{disabled:e.cells[n].editable===false,id:s.id})})})}),{})})))}}}catch(t){D(this,I,"f").debug.logMessage(this,`Invalid value for ${o} cell. Type \`SmeupDataTable\` expected`,g.ERROR);return null}},Ot=function t(e,i){const n=Object.assign(Object.assign({},e),{rows:e.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))});const s=e.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!s.length){return n}try{const t=JSON.parse(D(this,R,"f").rows[0].cells[i].value);n.rows=e.rows.map(((e,i)=>s.reduce(((n,s)=>{const o=t.rows[i].cells[s]&&e.cells[s].value!==t.rows[i].cells[s].value;if(o){return Object.assign(Object.assign({},t.rows[i]),{cells:Object.assign(Object.assign({},n.cells),{[s]:Object.assign(Object.assign({},t.rows[i].cells[s]),{value:e.cells[s].value})})})}return Object.assign(Object.assign({},t.rows[i]),{cells:n.cells})}),Object.assign(Object.assign({},t.rows[i]),{cells:{}}))));return n}catch(t){return n}},zt=function t(e,i){const n=D(this,P,"f").get(e.type);if(n){return n(e,i)}else{return e.map((t=>({value:t.label,id:t.id,selected:i===t.id})))}},$t=function t(e,i){return e.children.map((e=>{var n;return{id:e.content.codice,value:e.content.testo,selected:i===e.content.codice,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},St=function t(e,i){return e.children.map((e=>{var n;return{id:e.obj.k,value:e.value,selected:i===e.obj.k,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},Mt=function t(e,i){return e.rows.map((t=>{var e;const n=t.fields||t.cells;const[s,o]=Object.keys(n);return{id:n[s].value,value:((e=n[o])===null||e===void 0?void 0:e.value)||n[s].value,selected:i===n[s].value}}))},Tt=function t(e,i,n,s,o){if(e.id!==s||e.open===false){return}this.optionsHandler(i,e.inputValue,D(this,F,"m",rt).call(this),e.id).then((t=>{var i;n.data["kup-list"].data=(i=D(this,F,"m",zt).call(this,t,o))!==null&&i!==void 0?i:[];e.comp.refresh()}))};Dt.style=W;export{Dt as kup_input_panel};
|
|
2
|
+
//# sourceMappingURL=p-8aa58b0f.entry.js.map
|