@sme.up/ketchup 11.0.0-SNAPSHOT-20250107141846 → 11.0.0-SNAPSHOT-20250107161914
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-7b755680.js → f-cell-51e9d24e.js} +4 -4
- package/dist/cjs/{f-chip-6e268510.js → f-chip-b93179a6.js} +1 -1
- package/dist/cjs/{f-object-field-d63e632e.js → f-object-field-3caf16ab.js} +2 -2
- package/dist/cjs/{f-paginator-utils-55d3f22b.js → f-paginator-utils-caf8cc37.js} +1 -1
- package/dist/cjs/{f-text-field-3f1b2dd2.js → f-text-field-9bbdb0de.js} +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 +2 -2
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-7d6b8d9c.js → kup-data-table-helper-48700f22.js} +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +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-htm.cjs.entry.js +10 -5
- 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 +18 -9
- 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-54961dbb.js → kup-manager-2435b523.js} +11 -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-object-field.cjs.entry.js +3 -3
- 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-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-htm/kup-htm.js +9 -4
- package/dist/collection/components/kup-input-panel/kup-input-panel.css +3 -0
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +12 -3
- package/dist/collection/managers/kup-objects/kup-objects.js +11 -1
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -2
- package/dist/components/kup-activity-timeline.js +2 -2
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +2 -2
- package/dist/components/kup-card-list.js +3 -3
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +2 -2
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +2 -2
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +2 -2
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +3 -3
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +11 -6
- package/dist/components/kup-iframe.js +2 -2
- package/dist/components/kup-image-list.js +2 -2
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +16 -7
- package/dist/components/kup-lazy.js +2 -2
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +4 -4
- package/dist/components/kup-nav-bar.js +2 -2
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-object-field.js +2 -2
- package/dist/components/kup-pdf.js +2 -2
- package/dist/components/kup-photo-frame.js +2 -2
- package/dist/components/kup-planner.js +2 -2
- package/dist/components/kup-probe.js +2 -2
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +2 -2
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +2 -2
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +2 -2
- package/dist/components/kup-typography-list.js +2 -2
- package/dist/components/kup-typography.js +2 -2
- package/dist/components/{p-621f0bbd.js → p-37475978.js} +2 -2
- package/dist/components/{p-e080670d.js → p-61a0b6f9.js} +11 -1
- package/dist/components/{p-9a575a64.js → p-7c269057.js} +2 -2
- package/dist/components/{p-e2706fe7.js → p-90f591ba.js} +1 -1
- package/dist/components/{p-f6a3ea61.js → p-9ce9b5c5.js} +2 -2
- package/dist/components/{p-07b27ea9.js → p-ad3b9980.js} +2 -2
- package/dist/esm/{f-cell-591f1f12.js → f-cell-5e67bafe.js} +4 -4
- package/dist/esm/{f-chip-1248516a.js → f-chip-72e1b2f4.js} +1 -1
- package/dist/esm/{f-object-field-b16254a9.js → f-object-field-b2c8624c.js} +2 -2
- package/dist/esm/{f-paginator-utils-8aa20dfc.js → f-paginator-utils-4b981dc2.js} +1 -1
- package/dist/esm/{f-text-field-92942ecf.js → f-text-field-caa25b8b.js} +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 +2 -2
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-49f2c189.js → kup-data-table-helper-ccafd537.js} +1 -1
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +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-htm.entry.js +10 -5
- 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 +18 -9
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-9ea618cf.js → kup-manager-2e46c39a.js} +11 -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-object-field.entry.js +3 -3
- 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-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-f72fd2ab.entry.js → p-099043ba.entry.js} +1 -1
- package/dist/ketchup/{p-515f975a.entry.js → p-0ad01a0e.entry.js} +1 -1
- package/dist/ketchup/{p-ec442d8b.entry.js → p-0c5698a0.entry.js} +1 -1
- package/dist/ketchup/{p-9fbcac86.entry.js → p-16d47a9a.entry.js} +1 -1
- package/dist/ketchup/p-1cb717be.entry.js +1 -0
- package/dist/ketchup/{p-9f4e7404.entry.js → p-1dcf7986.entry.js} +1 -1
- package/dist/ketchup/{p-7040ddc0.entry.js → p-20ec5f31.entry.js} +1 -1
- package/dist/ketchup/{p-ded20d72.entry.js → p-29a68ad9.entry.js} +1 -1
- package/dist/ketchup/{p-1dbe390d.entry.js → p-2fe4c931.entry.js} +1 -1
- package/dist/ketchup/{p-e1eedb80.js → p-36d2c660.js} +1 -1
- package/dist/ketchup/p-37dca8a7.entry.js +1 -0
- package/dist/ketchup/{p-dc9816a2.entry.js → p-40abc9cc.entry.js} +1 -1
- package/dist/ketchup/{p-15759c11.entry.js → p-42bce238.entry.js} +1 -1
- package/dist/ketchup/{p-86ece599.entry.js → p-4d6ba592.entry.js} +1 -1
- package/dist/ketchup/{p-ebd275f7.entry.js → p-4db95ef4.entry.js} +1 -1
- package/dist/ketchup/{p-4613ff5f.entry.js → p-4f13cd6d.entry.js} +1 -1
- package/dist/ketchup/{p-808c46cf.js → p-62e905d5.js} +1 -1
- package/dist/ketchup/{p-2dd6e0a1.entry.js → p-6b87b094.entry.js} +1 -1
- package/dist/ketchup/{p-0603a2d2.js → p-7f8db0a9.js} +1 -1
- package/dist/ketchup/{p-129f55ab.entry.js → p-841c9dcd.entry.js} +1 -1
- package/dist/ketchup/{p-6c2058a5.entry.js → p-855ca027.entry.js} +1 -1
- package/dist/ketchup/{p-c24bb0e2.entry.js → p-8db60274.entry.js} +1 -1
- package/dist/ketchup/{p-2c99c1dd.entry.js → p-92b894c4.entry.js} +1 -1
- package/dist/ketchup/{p-7e0747d4.entry.js → p-a2bae66e.entry.js} +1 -1
- package/dist/ketchup/{p-f9c0266f.entry.js → p-a596d203.entry.js} +1 -1
- package/dist/ketchup/p-ab6f6f42.entry.js +1 -0
- package/dist/ketchup/{p-e0ce09a4.entry.js → p-ac57b401.entry.js} +1 -1
- package/dist/ketchup/{p-30809bee.entry.js → p-b2f87e6c.entry.js} +1 -1
- package/dist/ketchup/{p-cbd22d9c.entry.js → p-ba460623.entry.js} +1 -1
- package/dist/ketchup/{p-9eff2437.entry.js → p-ba7b5f7b.entry.js} +1 -1
- package/dist/ketchup/{p-5e784686.entry.js → p-c8594174.entry.js} +1 -1
- package/dist/ketchup/{p-dc66522b.entry.js → p-cf8e032c.entry.js} +1 -1
- package/dist/ketchup/p-d21921e5.js +1 -0
- package/dist/ketchup/{p-a7cd2d27.entry.js → p-e593d787.entry.js} +1 -1
- package/dist/ketchup/{p-1a8b9bc6.js → p-e8672317.js} +1 -1
- package/dist/ketchup/{p-7f574ecd.entry.js → p-e90ea603.entry.js} +1 -1
- package/dist/ketchup/{p-6b5ee00f.js → p-fab6d29d.js} +1 -1
- package/dist/ketchup/{p-4508907e.js → p-fc539d1f.js} +1 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +7 -1
- package/package.json +1 -1
- package/dist/ketchup/p-3d221df1.entry.js +0 -1
- package/dist/ketchup/p-95dddc38.js +0 -1
- package/dist/ketchup/p-c6f045ac.entry.js +0 -1
- package/dist/ketchup/p-e095d994.entry.js +0 -1
|
@@ -208,9 +208,15 @@ export declare class KupObjects {
|
|
|
208
208
|
*/
|
|
209
209
|
isEmptyJsObject(obj: GenericObject): boolean;
|
|
210
210
|
/**
|
|
211
|
-
* Check whether the object is a J1;KEY
|
|
211
|
+
* Check whether the object is a J1;KEY;...
|
|
212
212
|
* @param {GenericObject} object - Object to check.
|
|
213
213
|
* @returns {boolean} True if the object is a J1;KEY
|
|
214
214
|
*/
|
|
215
215
|
isJ1Key(obj: GenericObject): boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Check whether the object is a J1;PATHFILE;...
|
|
218
|
+
* @param {GenericObject} object - Object to check.
|
|
219
|
+
* @returns {boolean} True if the object is a J1;PATHFILE
|
|
220
|
+
*/
|
|
221
|
+
isJ1Pathfile(obj: GenericObject): boolean;
|
|
216
222
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,f as e,h as s,H as a,d as o}from"./p-b0368f88.js";import{F as i}from"./p-1a8b9bc6.js";import{k as r,g as n}from"./p-4508907e.js";import{c}from"./p-635bb4b3.js";import"./p-504fe614.js";import"./p-e3062c19.js";import"./p-f2213e00.js";import"./p-6b5ee00f.js";import"./p-1ee561ba.js";var f;!function(t){t.customStyle="Custom style of the component.",t.data="Actual data of the component."}(f||(f={}));var h,p=function(t,e,s,a){if("a"===s&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?a:"a"===s?a.call(t):a?a.value:e.get(t)};const d=class{constructor(e){t(this,e),h.set(this,r()),this.inputValue="",this.customStyle="",this.data={}}async getValue(){return this.inputValue}async getProps(t){return n(this,f,t)}async refresh(){e(this)}async setValue(t){this.inputValue=t}componentWillLoad(){p(this,h,"f").debug.logLoad(this,!1),p(this,h,"f").theme.register(this)}componentDidLoad(){p(this,h,"f").debug.logLoad(this,!0)}componentWillRender(){p(this,h,"f").debug.logRender(this,!1)}componentDidRender(){p(this,h,"f").debug.logRender(this,!0)}render(){var t;const e={data:null!==(t=this.data)&&void 0!==t?t:{},inputValue:this.inputValue,onChange:null};return s(a,{key:"f3c9567c118b3ef39f24a7b89a0852379b5b50d3"},s("style",{key:"10b4329a4934fecca877b99814846422b162f4ff"},p(this,h,"f").theme.setKupStyle(this.rootElement)),s("div",{key:"054e8a048364d488fe117131fa0699c3d8e05d85",id:c},s(i,Object.assign({key:"4a28a96a773e739adc954fcee4a429633e00f5d4"},e))))}disconnectedCallback(){p(this,h,"f").theme.unregister(this)}get rootElement(){return o(this)}};h=new WeakMap,d.style="";export{d as kup_object_field}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as i}from"./p-b0368f88.js";import{F as c}from"./p-f2213e00.js";import{b as e,h as s}from"./p-4508907e.js";var n,p,l;!function(i){i.CHOICE="choice",i.FILTER="filter",i.INPUT="input",i.STANDARD="standard"}(n||(n={})),function(i){i.OUTLINED="outlined",i.RAISED="raised"}(p||(p={})),function(i){i.SMALL="small",i.MEDIUM="medium"}(l||(l={}));const r=document.documentElement,o=l=>{l.styling||(l.styling=p.RAISED),l.type||(l.type=n.STANDARD);const o=l.type.toLowerCase()===n.CHOICE,a=l.type.toLowerCase()===n.FILTER,t=l.type.toLowerCase()===n.INPUT,u=l.styling.toLowerCase()===p.OUTLINED,d={"chip-set":!0,"chip-set--choice":!!o,"chip-set--filter":!!a,"chip-set--input":!!t,"chip--outlined":!!u,"chip--raised":!u,[`chip--${l.sizing}`]:!!l.sizing};return i("div",Object.assign({class:`f-chip ${l.danger?"kup-danger":""} ${l.info?"kup-info":""} ${l.secondary?"kup-secondary":""} ${l.success?"kup-success":""} ${l.warning?"kup-warning":""} ${l.wrapperClass?l.wrapperClass:""} ${l.primary?"kup-primary":""}`},l.dataSet,{id:l.id,title:l.title}),i("div",{class:d,role:"grid"},function(n,p,l,o){const a=[];for(let t=0;n.data&&t<n.data.length;t++){const u=[];function d(p,l){const o=!!(p.children&&p.children.length>0),a=!(!o||!p.isExpanded),_={"--kup_chip_indent_offset":l.toString()};if(u.push(i("div",{class:"chip-set__wrapper "+(o&&!a?"chip-set__wrapper--hidden-children":"")},i("div",{class:"chip-set__indent",style:_}),o?i(c,{onClick:n.onExpansionClick&&n.onExpansionClick[t]?n.onExpansionClick[t].bind(n.onExpansionClick[t],p):null,resource:`${e.DROPDOWN}`,sizeX:"16px",sizeY:"16px",title:r.ketchup.language.translate(s.EXPAND)+"/"+r.ketchup.language.translate(s.COLLAPSE)+" (CTRL + Click)",wrapperClass:"dropdown-icon"}):l?i(c,{resource:"blank",sizeX:"16px",sizeY:"16px",wrapperClass:"dropdown-icon"}):null,h(p))),a)for(let i=0;i<p.children.length;i++)p.children[i]&&d(p.children[i],l+1)}function h(s){let r="chip "+(s.icon&&!s.value?"chip--only-icon":""),a=[],u="chip__icon chip__icon--leading";return(l||p)&&s.checked&&(r+=" chip--selected",l&&(u+=" chip__icon--leading-hidden")),s.icon&&a.push(i(c,Object.assign({},{color:p&&s.checked?"var(--kup_chip_primary_color)":"var(--kup_chip_text_color)",resource:s.icon,placeholderResource:s.placeholderIcon,sizeX:"16px",sizeY:"16px",wrapperClass:u}))),l&&a.push(i("span",{class:"chip__checkmark"},i("svg",{class:"chip__checkmark-svg",viewBox:"-2 -3 30 30"},i("path",{class:"chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})))),i("div",{class:r,"data-value":s.id,onClick:n.onClick&&n.onClick[t]?n.onClick[t].bind(n.onClick[t],s):null,role:"row",title:s.title?s.title:""},i("span",{class:"chip-set__indent"}),a,i("span",{role:"gridcell"},i("span",{role:"button",tabindex:t,class:"chip__primary-action",value:s.id,checked:s.checked,onBlur:n.onBlur&&n.onBlur[t]?n.onBlur[t].bind(n.onBlur[t],s):null,onFocus:n.onFocus&&n.onFocus[t]?n.onFocus[t].bind(n.onFocus[t],s):null},i("span",{class:"chip__text"},n.displayId?s.id+" - "+s.value:s.value))),o?i("span",{role:"gridcell"},i("span",{tabindex:"-1",class:`kup-icon chip__icon ${e.CLEAR.replace("--","")}`,onClick:n.onIconClick&&n.onIconClick[t]?n.onIconClick[t].bind(n.onIconClick[t],s):null})):null)}d(n.data[t],0),a.push(i("div",{class:"chip-set__item"},...u))}return a}(l,o,a,t)))};export{n as F,l as a,p as b,o as c}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as n,F as f,H as o,d as a}from"./p-b0368f88.js";import{k as p,g as h,s,h as r}from"./p-4508907e.js";import{c as l}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var m;!function(t){t.data="Data of the component containing url or html"}(m||(m={}));var c,g=function(t,i,e,n){if("a"===e&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!n:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?n:"a"===e?n.call(t):n?n.value:i.get(t)};const k=class{constructor(e){t(this,e),this.kupReady=i(this,"kup-htm-ready",6),c.set(this,p()),this.data=void 0}async getProps(t){return h(this,m,t)}async refresh(){e(this)}async setProps(t){s(this,m,t)}componentWillLoad(){g(this,c,"f").debug.logLoad(this,!1),g(this,c,"f").theme.register(this),g(this,c,"f").language.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id}),g(this,c,"f").debug.logLoad(this,!0)}componentWillRender(){g(this,c,"f").debug.logRender(this,!1)}componentDidRender(){g(this,c,"f").debug.logRender(this,!0)}render(){const t=g(this,c,"f").objects.isLink(this.data.obj);return n(o,{key:"7d201de79a109a963b30fcdcb0f584789178ea45"},n("style",{key:"e0c435c3f36f10f2ee0506f697ea3d4b6b063efe"},g(this,c,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"b534f995de45451eaef5db29e0421bd417e4c7f4",id:l},n("div",{key:"7452a218ec171bc1db4bb5febf8267706bc79553",class:"kup-htm "+(t?"is-link":"")},t?n(f,null,n("a",{href:this.data.value,target:"_blank",rel:"noopener noreferrer"},g(this,c,"f").language.translate(r.OPEN_IN_NEW_TAB)),n("iframe",{src:this.data.value,frameBorder:"0"})):n("div",{innerHTML:this.data.value}))))}disconnectedCallback(){g(this,c,"f").theme.unregister(this),g(this,c,"f").language.unregister(this)}get rootElement(){return a(this)}};c=new WeakMap,k.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{height:100%;width:100%;display:block}#kup-component{height:100%}#kup-component .kup-htm.is-link{height:100%}#kup-component .kup-htm.is-link a{float:left}#kup-component .kup-htm.is-link iframe{min-height:600px;width:100%}";export{k as kup_htm}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,f as n,h as e,H as l,d as s}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{F as a}from"./p-0603a2d2.js";import{k as u,a6 as h,F as r,g as c,s as p,h as f,ah as d,ae as m,ag as v,af as b,ai as g,e as k,O as _}from"./p-4508907e.js";import{F as x}from"./p-7db300e0.js";import{F as y,a as w}from"./p-60cfddce.js";import{c as j}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-f2213e00.js";import"./p-982a5cfc.js";import"./p-95dddc38.js";import"./p-1a8b9bc6.js";import"./p-6b5ee00f.js";import"./p-1ee561ba.js";import"./p-c56195a0.js";var O,F,$,T;!function(t){t.TAB="tab"}(O||(O={})),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",t.buttonPosition="Manage the position of the buttons related to the input panel content. It is an enumeration",t.inputPanelPosition="Manage the global layout of the input panel fields. The default is COLUMNS.",t.autoSkip="Sets the auto skip between input text fields when the value reaches the max length.",t.autoFocus="Sets whether the first input should receive focus."}(F||(F={})),function(t){t.COLUMNS="COLUMNS",t.INLINE="INLINE",t.STRETCHED="STRETCHED",t.UPINLINE="UPINLINE",t.UPCOLUMNS="UPCOLUMNS",t.PLACEHOLDER="PLACEHOLDER"}($||($={})),function(t){t.CENTER="CENTER",t.LEFT="LEFT",t.BOTTOM="BOTTOM",t.RIGHT="RIGHT",t.TOP="TOP"}(T||(T={}));const z={"*F01":"F1","*F02":"F2","*F03":"F3","*F04":"F4","*F05":"F5","*F06":"F6","*F07":"F7","*F08":"F8","*F09":"F9","*F10":"F10","*F11":"F11","*F12":"F12","*F13":"shift+F1","*F14":"shift+F2","*F15":"shift+F3","*F16":"shift+F4","*F17":"shift+F5","*F18":"shift+F6","*F19":"shift+F7","*F20":"shift+F8","*F21":"shift+F9","*F22":"shift+F10","*F23":"shift+F11","*F24":"shift+F12","*ENT":"Enter","*PDN":"PageDown","*PUP":"PageUp"},E=t=>0==t?6:t?1===t?18:12*t:null,M=t=>t?22*t:null,S=t=>t?22*(t-1):null,C=t=>t?12*t:null;var D,P,L,W,I,N,R,H,A,U,K,G,V,B,J,X,Y,q,Q,Z,tt,it,nt,et,lt,st,ot,at,ut,ht,rt,ct,pt,ft,dt,mt,vt,bt,gt,kt,_t,xt,yt,wt,jt,Ot,Ft,$t,Tt,zt,Et,Mt,St,Ct,Dt,Pt,Lt,Wt,It,Nt,Rt,Ht,At,Ut,Kt,Gt,Vt,Bt,Jt=function(t,i,n,e){if("a"===n&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?e:"a"===n?e.call(t):e?e.value:i.get(t)},Xt=function(t,i,n,e,l){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!l:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?l.call(t,n):l?l.value=n:i.set(t,n),n};const Yt=document.documentElement,qt=class{constructor(n){t(this,n),this.kupReady=i(this,"kup-input-panel-ready",6),this.kupDataTableContextMenu=i(this,"kup-inputpanel-contextmenu",6),D.add(this),P.set(this,u()),L.set(this,void 0),W.set(this,new Map([["SmeupTreeNode",Jt(this,D,"m",Ct).bind(this)],["SmeupDataTree",Jt(this,D,"m",Dt).bind(this)],["SmeupTable",Jt(this,D,"m",Pt).bind(this)],["SmeupDataTable",Jt(this,D,"m",Pt).bind(this)]])),I.set(this,null),N.set(this,new Map([[h.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[h.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[h.COMBOBOX,["kup-combobox-iconclick","kup-combobox-blur"]],[h.MULTI_COMBOBOX,["kup-combobox-iconclick"]]])),R.set(this,[]),H.set(this,new Map([[h.DATE,"kup-date-picker"],[h.TIME,"kup-time-picker"]])),A.set(this,new Map([[r.BUTTON_LIST,Jt(this,D,"m",J).bind(this)],[r.EDITOR,Jt(this,D,"m",Y).bind(this)],[r.LABEL,Jt(this,D,"m",Q).bind(this)],[r.TABLE,Jt(this,D,"m",q).bind(this)]])),U.set(this,new Map([[O.TAB,Jt(this,D,"m",st).bind(this)]])),K.set(this,[]),this.buttonPosition=T.BOTTOM,this.customStyle="",this.dashboardMode=!1,this.data=null,this.hiddenSubmitButton=!1,this.inputPanelPosition=$.COLUMNS,this.submitCb=null,this.optionsHandler=null,this.customButtonClickHandler=null,this.checkValidObjCallback=null,this.checkValidValueCallback=null,this.autoFocus=!1,this.autoSkip=!1,this.inputPanelCells=[],this.inputPanelCommands=[],this.tabSelected=null}onDataChanged(){Xt(this,I,structuredClone(this.data),"f"),Jt(this,R,"f").length&&(Jt(this,R,"f").map((({event:t,handler:i})=>{this.rootElement.removeEventListener(t,i)})),Xt(this,R,[],"f")),Jt(this,K,"f").length&&(Jt(this,K,"f").map((t=>{Jt(this,P,"f").keysBinding.unregister(t)})),Xt(this,K,[],"f")),this.data&&Jt(this,D,"m",ht).call(this,this.data)}async getProps(t){return c(this,F,t)}async refresh(){n(this)}async setProps(t){p(this,F,t)}componentWillLoad(){Jt(this,P,"f").debug.logLoad(this,!1),Jt(this,P,"f").language.register(this),Jt(this,P,"f").theme.register(this),this.onDataChanged()}componentDidLoad(){Jt(this,D,"m",Kt).call(this),this.kupReady.emit({comp:this,id:this.rootElement.id}),Jt(this,D,"m",Gt).call(this),Jt(this,P,"f").debug.logLoad(this,!0)}componentWillRender(){Jt(this,P,"f").debug.logRender(this,!1)}componentDidRender(){if(Jt(this,L,"f")){const t=Jt(this,L,"f").querySelectorAll(".f-text-field");for(let i=0;i<t.length;i++)x(t[i])}Jt(this,P,"f").debug.logRender(this,!0)}render(){const t=Boolean(!this.inputPanelCells.length)?[e("p",null,Jt(this,P,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>Jt(this,D,"m",V).call(this,t)));return e(l,{key:"16518bbef7bd41b36c6c2f8ab6f9b400ad6a1fdd","onKup-cell-blur":Jt(this,D,"m",It).bind(this),"onKup-tabbar-click":t=>{this.tabSelected=t.detail.node.id},"onKup-autocomplete-input":Jt(this,D,"m",kt).bind(this),"onKup-autocomplete-iconclick":Jt(this,D,"m",kt).bind(this),"onKup-combobox-iconclick":Jt(this,D,"m",kt).bind(this)},e("style",{key:"e3939c0397bda17f0e4639466128788a61a17555"},Jt(this,P,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"a0104309e691d9f3e8e167ed5c66be4da359e9ec",id:j},t))}disconnectedCallback(){Jt(this,P,"f").language.unregister(this),Jt(this,P,"f").theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["onDataChanged"]}}};P=new WeakMap,L=new WeakMap,W=new WeakMap,I=new WeakMap,N=new WeakMap,R=new WeakMap,H=new WeakMap,A=new WeakMap,U=new WeakMap,K=new WeakMap,D=new WeakSet,G=function(t){return this.inputPanelCells.reduce(((i,{cells:n})=>{if(!i){const i=n.find((({column:i})=>i.name===t));return i?i.cell:null}return i}),null)},V=function(t){var i,n;const l=t.row.layout,s=(null==l?void 0:l.horizontal)||!1,a={};let u;if(null===(i=null==l?void 0:l.sections)||void 0===i?void 0:i.length)if(l.absolute)u=Jt(this,D,"m",it).call(this,t,l),a.height=22*(t=>{let i=0;return t.sections.forEach((t=>{t.content.forEach((t=>{t.absoluteRow>i&&(i=t.absoluteRow+(t.absoluteHeight>1?t.absoluteHeight:0))}))})),i})(l)+"px";else{if(!l.sectionsType){const i=l.sections.some((t=>t.dim));a.display="grid",this.inputPanelPosition!==$.INLINE&&this.inputPanelPosition!==$.UPINLINE||(a.display=""),l.horizontal?a.gridTemplateColumns=i?l.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${t.cells.length}, 1fr)`:this.dashboardMode&&(a.gridTemplateRows=i?l.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${l.sections.length}, 1fr)`)}u=Jt(this,D,"m",tt).call(this,t,l)}else u=t.cells.map((i=>Jt(this,D,"m",B).call(this,i.cell,t.row,i.column)));const h={"input-panel-form":!0,"input-panel-form--inline":this.buttonPosition==T.RIGHT},r={"input-panel":!0,"input-panel--column":!s,"input-panel--absolute":null==l?void 0:l.absolute,"input-panel--inline":this.inputPanelPosition===$.INLINE||this.inputPanelPosition===$.UPINLINE},c={"input-panel__commands":!0,[`input-panel__commands--${this.buttonPosition}`]:!0},p={value:null===(n=null==l?void 0:l.sections[0])||void 0===n?void 0:n.title,type:w.HEADING1};return e("div",null,e("form",{name:this.rootElement.id,id:this.rootElement.id,class:h,ref:t=>Xt(this,L,t,"f"),onSubmit:t=>{t.preventDefault(),this.submitCb({value:{before:Object.assign({},Jt(this,I,"f")),after:Jt(this,D,"m",pt).call(this)}})},onContextMenu:t=>{t.preventDefault()}},e("div",{class:"input-panel__typography"},e(y,Object.assign({},p))),e("div",{class:r,style:a},u),e("div",{class:c},e(o,{buttonType:"submit",label:Jt(this,P,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit",invisible:this.hiddenSubmitButton}),this.inputPanelCommands)))},B=function(t,i,n){var l;if(!t)return;const s=Jt(this,A,"f").get(t.shape);if(void 0!==s)return s(t,n.name,null===(l=i.layout)||void 0===l?void 0:l.absolute);const o={cell:t,column:n,row:i,component:this,editable:!0,renderKup:!0,setSizes:!0},u=Jt(this,D,"m",Z).call(this,t,n.title);return u?e("div",{class:{"input-panel__label_container":!0}},u,e(a,Object.assign({},o))):e(a,Object.assign({},o))},J=function(t,i){return e(o,Object.assign({icon:t.icon,id:i},t.data,{wrapperClass:"form__submit"}))},X=function(t,i){return e("kup-dropdown-button",Object.assign({},t.data,{label:t.value,data:i,"onkup-dropdownbutton-itemclick":t=>{Jt(this,D,"m",Ht).call(this,t.detail.node,t.detail.node.id)}}))},Y=function(t,i){const n="kup-editor-save",l=t=>{const n=this.inputPanelCells.reduce(((t,{cells:n})=>t||n.find((({column:t})=>t.name===i)).cell),null);n.value=t.detail.htmlValue.replace(/\n/g,"<br>")};return this.rootElement.addEventListener(n,l),Jt(this,R,"f").push({event:n,handler:l}),e("kup-editor",Object.assign({},t.data,{id:i,isReadOnly:!t.isEditable,showToolbar:!0}))},q=function(t,i){return e("kup-data-table",Object.assign({id:i,editableData:!0,showGroups:!0,showFilters:!0},t.data))},Q=function(t,i,n){return e("span",{class:"input-panel-label"+(n?" input-panel-label--legacy-look":""),id:i},t.value)},Z=function(t,i){return i&&Yt.ketchup.data.cell.getType(t,t.shape)===h.RADIO?e("span",null,i):null},tt=function(t,i){const n=Jt(this,U,"f").get(i.sectionsType);return n?n(t,i.sections):i.sections.map((i=>Jt(this,D,"m",nt).call(this,t,i,!1)))},it=function(t,i){return i.sections.map((i=>Jt(this,D,"m",et).call(this,t,i)))},nt=function t(i,n,l=!1,s={}){var o,a;const u={"input-panel__section":!n.horizontal,"input-panel__horizontal-section":n.horizontal,"input-panel__section-inline":this.inputPanelPosition===$.INLINE||this.inputPanelPosition===$.UPINLINE};s.gap=+n.gap>0?`${n.gap}rem`:"1rem";let h=[];if(null===(o=n.sections)||void 0===o?void 0:o.length){h=n.sections.map((n=>Jt(this,D,"m",t).call(this,i,n)));const e=n.sections.some((t=>t.dim));!n.gridCols&&n.horizontal&&(s.gridTemplateColumns=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`),n.gridRows||n.horizontal||!this.dashboardMode||(s.gridTemplateRows=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`)}else(null===(a=n.content)||void 0===a?void 0:a.length)&&(h=n.content.map((t=>Jt(this,D,"m",ot).call(this,i,t))),s.gridTemplateColumns=+n.gridCols>0?`repeat(${n.gridCols}, 1fr)`:"",this.dashboardMode&&(s.gridTemplateRows=+n.gridRows>0?`repeat(${n.gridRows}, 1fr)`:""));const r=e("div",{class:u,style:s},h.filter(Boolean));return n.title&&!l?e("div",{class:{"input-panel__section_label_container":!0}},e(y,{type:w.HEADING1,value:n.title}),r):r},et=function t(i,n){var l,s;let o=[];if((null===(l=n.sections)||void 0===l?void 0:l.length)?o=n.sections.map((n=>Jt(this,D,"m",t).call(this,i,n))):(null===(s=n.content)||void 0===s?void 0:s.length)&&(o=n.content.map((t=>Jt(this,D,"m",at).call(this,i,t)))),null==E(n.absoluteWidth))return o;const a=null!=E(n.absoluteWidth)?`${E(n.absoluteWidth)}px`:"100%",u=null!=M(n.absoluteHeight)?`${M(n.absoluteHeight)}px`:"100%",h=`${S(n.absoluteRow)}px`,r=`${C(n.absoluteColumn)}px`;return e("div",{style:{position:"relative",width:a,"min-width":a,"max-width":a,height:u,"min-height":u,"max-height":u,top:h,left:r,overflow:"auto"}},o)},lt=function t(i){var n,e;let l=[];return(null===(n=i.content)||void 0===n?void 0:n.length)&&i.content.forEach((t=>{t.id&&l.push(t.id)})),(null===(e=i.sections)||void 0===e?void 0:e.length)&&i.sections.forEach((i=>{l=l.concat(Jt(this,D,"m",t).call(this,i))})),l},st=function(t,i){this.tabSelected||(this.tabSelected=i[0].id||"0");const n=i.map(((i,n)=>{const e=Jt(this,D,"m",lt).call(this,i),l=t.cells.some((t=>{var i;const n=t.cell;return e.includes(t.column.name)&&!!(null===(i=n.data)||void 0===i?void 0:i.error)}));return{active:(i.id||`${n}`)===this.tabSelected,value:i.title,icon:l?"error":i.icon,id:i.id||`${n}`,danger:l}})),l=i.map(((i,n)=>{const e=i.id||`${n}`;return Jt(this,D,"m",nt).call(this,t,i,!0,{display:this.tabSelected!==e?"none":"grid"})}));return e("div",{class:{"input-panel__tabs_container":!0}},e("kup-tab-bar",{data:n,customStyle:".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }"}),l)},ot=function(t,i){const n=t.cells.find((t=>t.column.name===i.id)),l=+i.colSpan>0?i.colSpan:+i.colSpan>0||+i.colStart>0?null:1,s=+i.rowSpan>0?i.rowSpan:+i.rowSpan>0||+i.rowStart>0?null:1;if(n&&n.cell)return e("div",{style:{"min-width":"0","grid-column-start":l?`span ${l}`:`${i.colStart}`,"grid-column-end":+i.colEnd>0?`${i.colEnd}`:"","grid-row-start":s?`span ${s}`:`${i.rowStart}`,"grid-row-end":+i.rowEnd>0?`${i.rowEnd}`:""}},Jt(this,D,"m",B).call(this,n.cell,t.row,n.column))},at=function(t,i){const n=t.cells.find((t=>t.column.name===i.id));if(!n||!n.cell)return;let l;l=n.cell.shape==r.DATE?i.absoluteLength>8?i.absoluteLength:8:i.absoluteLength,i.absoluteHeight||(i.absoluteHeight=1);const s=E(l),o=M(i.absoluteHeight),a=S(i.absoluteRow),u=C(i.absoluteColumn),h={position:"absolute",width:null!==s?`${s}px`:null,"min-width":null!==s?`${s}px`:null,"max-width":null!==s?`${s}px`:null,height:null!==o?`${o}px`:null,"min-height":null!==o?`${o}px`:null,"max-height":null!==o?`${o}px`:null,top:null!==a?`${S(i.absoluteRow)}px`:null,left:null!==u?`${C(i.absoluteColumn)}px`:null,overflow:"auto"};return n.cell.data=Object.assign(Object.assign(Object.assign({},n.cell.data),{customStyle:(n.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}",legacyLook:!0,helperEnabled:!1}),n.cell.shape===r.TABLE&&{rowsPerPage:n.cell.data.data.rows.length,showPaginator:!1,showFooter:!1,tableHeight:`${o}px`}),e("div",{style:h},Jt(this,D,"m",B).call(this,n.cell,t.row,n.column))},ut=function(){this.inputPanelCommands=this.data.setup.commands.map((t=>{if((null==t?void 0:t.children)&&(null==t?void 0:t.children.length)>0){const i={"kup-list":{showIcons:!0,data:t.children.map((t=>Jt(this,D,"m",Lt).call(this,t)))}};return Jt(this,D,"m",X).call(this,t,i)}{const i=Jt(this,D,"m",Lt).call(this,t);return Jt(this,D,"m",J).call(this,i,t.value)}})).flat()},ht=function(t){var i,n,e,l;(null===(n=null===(i=t.setup)||void 0===i?void 0:i.commands)||void 0===n?void 0:n.length)&&Jt(this,D,"m",ut).call(this);const s=null===(e=null==t?void 0:t.rows[0])||void 0===e?void 0:e.layout,o=(null===(l=null==t?void 0:t.rows)||void 0===l?void 0:l.length)?t.rows.reduce(((i,n)=>[...i,{cells:t.columns.filter((t=>t.visible)).map((t=>{const i=structuredClone(n.cells[t.name]);return{column:t,cell:i?Object.assign(Object.assign({},i),{data:Jt(this,D,"m",rt).call(this,i,t,s),slotData:Jt(this,D,"m",dt).call(this,i,t),isEditable:!0}):null}})),row:n}]),[]):[];o.map((({cells:t})=>t.map((({cell:t,column:i})=>{const n=Yt.ketchup.data.cell.getType(t,t.shape),e=Jt(this,H,"f").get(n);if(!e)return;const l=this.rootElement.shadowRoot.querySelector(`${e}[id='${i.name.replace(/\//g,"\\$1")}']`);t.value&&(null==l||l.setValue(t.value))})))),this.inputPanelCells=o},rt=function(t,i,n){const e=Object.assign(Object.assign({},Jt(this,D,"m",ft).call(this,t,i,n)),{disabled:!t.editable,id:i.name}),l=Yt.ketchup.data.cell.getType(t,t.shape),s=function(t,i){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(e=Object.getOwnPropertySymbols(t);l<e.length;l++)i.indexOf(e[l])<0&&Object.prototype.propertyIsEnumerable.call(t,e[l])&&(n[e[l]]=t[e[l]])}return n}(t.data||{},["data"]);return l!==h.MULTI_AUTOCOMPLETE&&l!==h.MULTI_COMBOBOX?Jt(this,D,"m",ct).call(this,e,Object.assign({},t.data)):Object.assign(Object.assign({},e),s)},ct=function t(i,n){for(const e in n)i[e]=n[e]instanceof Object&&!Array.isArray(n[e])&&e in i?Jt(this,D,"m",t).call(this,i[e],n[e]):n[e];return i},pt=function(){return this.inputPanelCells.reduce(((t,i)=>{const n=Object.keys(i.row.cells).reduce(((t,n)=>{var e;const l=null===(e=i.cells.find((t=>t.column.name===n)))||void 0===e?void 0:e.cell;let s=null==l?void 0:l.value;return(null==l?void 0:l.shape)===r.TABLE&&(s=JSON.stringify(Jt(this,D,"m",Mt).call(this,l.data.data,n))),Object.assign(Object.assign({},t),{[n]:Object.assign(Object.assign({},i.row.cells[n]),{value:s,obj:null==l?void 0:l.obj})})}),{});return{columns:[...t.columns,...i.cells.map((t=>t.column))],rows:[...t.rows,{cells:n,layout:i.row.layout}]}}),{columns:[],rows:[]})},ft=function(t,i,n){if(!t)return null;const e=t.options;let l;l=(null==n?void 0:n.absolute)?null:i.title;const s=t.value,o=Yt.ketchup.data.cell.getType(t,t.shape),a=new Map([[h.AUTOCOMPLETE,Jt(this,D,"m",gt).bind(this)],[h.BUTTON_LIST,Jt(this,D,"m",bt).bind(this)],[h.CHART,Jt(this,D,"m",vt).bind(this)],[h.CHIP,Jt(this,D,"m",mt).bind(this)],[h.CHECKBOX,Jt(this,D,"m",_t).bind(this)],[h.COLOR_PICKER,Jt(this,D,"m",xt).bind(this)],[h.COMBOBOX,Jt(this,D,"m",gt).bind(this)],[h.EDITOR,Jt(this,D,"m",yt).bind(this)],[h.MULTI_AUTOCOMPLETE,Jt(this,D,"m",mt).bind(this)],[h.MULTI_COMBOBOX,Jt(this,D,"m",mt).bind(this)],[h.NUMBER,Jt(this,D,"m",zt).bind(this)],[h.DATE,Jt(this,D,"m",Ft).bind(this)],[h.OBJECT,Jt(this,D,"m",$t).bind(this)],[h.RADIO,Jt(this,D,"m",jt).bind(this)],[h.STRING,Jt(this,D,"m",wt).bind(this)],[h.SWITCH,Jt(this,D,"m",Ot).bind(this)],[h.TABLE,Jt(this,D,"m",Et).bind(this)],[h.TIME,Jt(this,D,"m",Tt).bind(this)]]).get(o);return a?a(e,l,s,t,i.name):null},dt=function(t,i){const n=Yt.ketchup.data.cell.getType(t,t.shape);return t.editable?n===h.CHIP?{trailingIcon:!0,label:i.title,disabled:!t.editable,id:i.name,fullWidth:!1}:n===h.MULTI_AUTOCOMPLETE||n===h.MULTI_COMBOBOX?Object.assign(Object.assign({},Jt(this,D,"m",gt).call(this,t.options,i.title,null)),{showDropDownIcon:!0,class:"",style:{width:"100%"},disabled:!t.editable,id:i.name}):null:null},mt=function(t,i,n){return d(n)},vt=function(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},bt=function(t,i,n,e,l){var s,o,a,u;return e.data=e.data||{},e.data.onClick=()=>{Jt(this,D,"m",Ht).call(this,e,l)},(null===(s=e.data)||void 0===s?void 0:s.keyShortcut)&&!(null===(o=e.data)||void 0===o?void 0:o.disabled)&&(Jt(this,K,"f").push(null===(a=e.data)||void 0===a?void 0:a.keyShortcut),Jt(this,P,"f").keysBinding.register(null===(u=e.data)||void 0===u?void 0:u.keyShortcut,e.data.onClick.bind(this))),Object.assign({label:e.value,fun:e.fun},e.data)},gt=function(t,i,n){const e=m(n,i,[]);return t&&(e.data["kup-list"].data=Jt(this,D,"m",St).call(this,t,n)),e},kt=function({detail:t}){const i=Jt(this,D,"m",G).call(this,t.id);i.fun&&Jt(this,D,"m",Wt).call(this,t,i)},_t=function(t,i,n){return v(n,i)},xt=function(t,i){return{data:{"kup-text-field":{label:i}}}},yt=function(t,i,n){return{initialValue:n}},wt=function(t,i,n,e,l){var s;const o=Object.assign({label:i},e.data);return this.autoSkip&&(e.isEditable||e.editable)&&(null===(s=e.data)||void 0===s?void 0:s.maxLength)&&(o.onInput=t=>{Jt(this,D,"m",Bt).call(this,l,t)}),o},jt=function(t,i,n){return b(n,t)},Ot=function(t,i,n){return g(n,i)},Ft=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:null!=n?n:""}},$t=function(t,i,n){return{initialValue:n||"",label:i||" ",value:n||""}},Tt=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},zt=function(t,i){return{label:i}},Et=function(t,i,n,e,l){try{let t=JSON.parse(e.value);return t?"SmeupDataTable"!==t.type?(Jt(this,P,"f").debug.logMessage(this,`Wrong data table type for ${l} cell. Type \`SmeupDataTable\` in value expected`,k.ERROR),null):{data:{columns:t.columns.map((i=>{var n;if(t.rows.length>0){const e=null===(n=t.rows[0].cells[i.name])||void 0===n?void 0:n.obj;return!i.obj&&e?Object.assign(Object.assign({},i),{obj:{t:e.t,p:e.p}}):i}return i})),rows:t.rows.map((i=>Object.assign(Object.assign({},i),{cells:Object.keys(i.cells).reduce(((n,e)=>{const l=t.columns.find((t=>t.name===e));return Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},i.cells[e]),{data:Object.assign(Object.assign({},Jt(this,D,"m",ft).call(this,i.cells[e],l)),{disabled:!1===i.cells[e].editable,id:l.id})})})}),{})})))}}:(Jt(this,P,"f").debug.logMessage(this,`Empty value for ${l} cell.`,k.WARNING),null)}catch(t){return Jt(this,P,"f").debug.logMessage(this,`Invalid value for ${l} cell. Type \`SmeupDataTable\` expected`,k.ERROR),null}},Mt=function(t,i){const n=Object.assign(Object.assign({},t),{rows:t.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))}),e=t.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!e.length)return n;try{const l=JSON.parse(Jt(this,I,"f").rows[0].cells[i].value);return n.rows=t.rows.map(((t,i)=>e.reduce(((n,e)=>{const s=l.rows[i].cells[e]&&t.cells[e].value!==l.rows[i].cells[e].value;return Object.assign(Object.assign({},l.rows[i]),s?{cells:Object.assign(Object.assign({},n.cells),{[e]:Object.assign(Object.assign({},l.rows[i].cells[e]),{value:t.cells[e].value})})}:{cells:n.cells})}),Object.assign(Object.assign({},l.rows[i]),{cells:{}})))),n}catch(t){return n}},St=function(t,i){const n=Jt(this,W,"f").get(t.type);return n?n(t,i):t.map((t=>({value:t.label,id:t.id,selected:i===t.id})))},Ct=function t(i,n){return i.children.map((i=>{var e;return{id:i.content.codice,value:i.content.testo,selected:n===i.content.codice,children:(null===(e=i.children)||void 0===e?void 0:e.length)?Jt(this,D,"m",t).call(this,i,n):[]}}))},Dt=function t(i,n){return i.children.map((i=>{var e;return{id:i.obj.k,value:i.value,selected:n===i.obj.k,children:(null===(e=i.children)||void 0===e?void 0:e.length)?Jt(this,D,"m",t).call(this,i,n):[]}}))},Pt=function(t,i){return t.rows.map((t=>{const n=t.fields||t.cells,[e,l]=Object.keys(n);return{id:n[e].value,value:n[l].value||n[e].value,selected:i===n[e].value}}))},Lt=function(t){return t.data&&!t.data.keyShortcut&&Jt(this,P,"f").objects.isJ1Key(t.obj?t.obj:{})&&(t.data.keyShortcut=z[t.obj.k]),Object.assign(Object.assign({},t),{data:Jt(this,D,"m",bt).call(this,null,null,t.value,t,t.obj.k),id:t.obj.k})},Wt=function(t,i){this.optionsHandler(i.fun,t.inputValue,Jt(this,D,"m",pt).call(this),t.id).then((n=>{var e,l,s,o,a;const u=(null===(e=null==n?void 0:n.columns)||void 0===e?void 0:e.filter((t=>(null==t?void 0:t.visible)||!("visible"in t))).map((t=>t.name)))||[],h=null===(l=null==n?void 0:n.rows)||void 0===l?void 0:l.map((t=>{const{cells:i}=t,n=u.reduce(((n,e)=>(t.cells.hasOwnProperty(e)&&(n[e]=i[e]),n)),{});return Object.assign(Object.assign({},t),{cells:n})})),r=Object.assign(Object.assign({},n),{rows:h}),c=null===(o=null===(s=i.data)||void 0===s?void 0:s.data)||void 0===o?void 0:o["kup-list"];c?c.data=(null==h?void 0:h.length)&&null!==(a=Jt(this,D,"m",St).call(this,r,i.value))&&void 0!==a?a:[]:Jt(this,P,"f").debug.logMessage(this,'getAutocompleteEventCallback() - "kup-list" not found in cell.data.data',k.WARNING),t.comp.refresh()}))},It=async function(t){var i,n,e,l,s;const{detail:{column:o,cell:a}}=t,u=Jt(this,D,"m",G).call(this,o.name),h=Jt(this,I,"f").rows[0].cells[o.name];if(u){if(a.mandatory){if(Jt(this,D,"m",Nt).call(this,o.name,u.value?(null===(i=h.data)||void 0===i?void 0:i.error)||null:Jt(this,P,"f").language.translate(f.REQUIRED_VALUE)),!a.value)return}else Jt(this,D,"m",Nt).call(this,o.name,(null===(n=h.data)||void 0===n?void 0:n.error)||null);if(null===(e=a.inputSettings)||void 0===e?void 0:e.checkObject){const{valid:t}=await this.checkValidObjCallback({obj:a.obj,currentState:Jt(this,D,"m",pt).call(this),fun:a.fun});if(!t)return void Jt(this,D,"m",Nt).call(this,o.name,Jt(this,P,"f").language.translate(f.INVALID_VALUE));Jt(this,D,"m",Nt).call(this,o.name,(null===(l=h.data)||void 0===l?void 0:l.error)||null)}(null===(s=a.inputSettings)||void 0===s?void 0:s.checkValueOnExit)&&Jt(this,D,"m",Rt).call(this)&&this.checkValidValueCallback({before:Object.assign({},Jt(this,I,"f")),after:Jt(this,D,"m",pt).call(this)},o.name)}},Nt=function(t,i){this.inputPanelCells=this.inputPanelCells.map((n=>Object.assign(Object.assign({},n),{cells:n.cells.map((({cell:n,column:e})=>{const l=e.name===t?Object.assign(Object.assign({},n.data),{error:i}):n.data;return{column:e,cell:Object.assign(Object.assign({},n),{data:l})}}))})))},Rt=function(){return this.inputPanelCells.some((({cells:t,row:i})=>t.some((({cell:t,column:{name:n}})=>t.value!==i.cells[n].value))))},Ht=function(t,i){t.fun?this.customButtonClickHandler({fun:t.fun,cellId:i,currentState:Jt(this,D,"m",pt).call(this)}):this.submitCb({value:{before:Object.assign({},Jt(this,I,"f")),after:Jt(this,D,"m",pt).call(this)},cell:i})},At=function(t,i){const n=t.find((t=>{var i;return null===(i=t.classList)||void 0===i?void 0:i.contains("f-cell")}));if(null==n)return;const e=Jt(this,D,"m",pt).call(this),l=n["kup-get-cell-props"]().column.name;return{anchor:n,cell:e.rows[0].cells[l],column:e.columns.find((t=>t.name==l)),row:e.rows[0],originalEvent:i}},Ut=function(t){const i=Jt(this,P,"f").getEventPath(t.target,this.rootElement);return Jt(this,D,"m",At).call(this,i,t)},Kt=function(){Jt(this,P,"f").interact.managedElements.add(Jt(this,L,"f")),Jt(this,P,"f").interact.on(Jt(this,L,"f"),_.TAP,(t=>{if(2==t.button){const i=Jt(this,D,"m",Ut).call(this,t);i&&this.kupDataTableContextMenu.emit({comp:this,id:this.rootElement.id,details:i})}}))},Gt=function(){if(!Jt(this,L,"f"))return;const t=Array.from(Jt(this,L,"f").querySelectorAll(".f-cell__content"));for(const i of t){const t=Jt(this,D,"m",Vt).call(this,i,!0);if(t)return void setTimeout((()=>t.focus()),300)}if(!this.autoFocus||0===t.length)return;const i=Jt(this,D,"m",Vt).call(this,t[0]);i&&setTimeout((()=>i.focus()),300)},Vt=function(t,i=!1){if(!(t&&t instanceof HTMLElement))return;const n=".mdc-text-field__input",e=i?`.mdc-text-field--error ${n}`:n,l=t.querySelector(e);if(l)return l;const s=Array.from(t.querySelectorAll("*")).filter((t=>t.shadowRoot));for(const t of s){const i=t.shadowRoot.querySelector(e);if(i)return i}},Bt=function(t,i){var n,e;const l=null==i?void 0:i.target;if(!(l&&l instanceof HTMLInputElement))return;const{maxLength:s,value:o}=l;if(!s||s<0||(null==o?void 0:o.length)<s)return;const a=Array.from(null===(n=Jt(this,L,"f"))||void 0===n?void 0:n.querySelectorAll(".f-text-field")).reduce(((t,i)=>{const n=i.querySelector("input");return n?(t.push({id:(null==i?void 0:i.id)||"",HTMLInputElement:n}),t):t}),[]);if(!a.length)return;const u=a.findIndex((i=>i.id===t));u<0||u===a.length-1||null===(e=a[u+1].HTMLInputElement)||void 0===e||e.focus()},qt.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size: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-fcell-width:fit-content;--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);--kup_input_panel_padding--inline:var(--kup-input-panel-padding--inline, 0);--kup_input_panel_absolute_max_height:var(\n --kup-input-panel-absolute-max-height,\n 500px\n )}: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:1rem}:host .input-panel__commands{display:flex;gap:1rem}:host .input-panel__commands.input-panel__commands--right{flex-shrink:0;overflow:hidden}:host .input-panel--inline{flex:1;overflow-x:auto;white-space:nowrap;padding:var(--kup_input_panel_padding--inline);display:inline-flex}: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;min-width:0}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel__section-inline{display:inline-block;width:max-content}: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 .input-panel-label--legacy-look{font-size:12px;font-family:var(--kup-font-family-monospace);white-space:pre}:host .input-panel--absolute{justify-content:flex-end;padding:var(--kup-space-02);max-height:var(--kup_input_panel_absolute_max_height)}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}:host .input-panel-form--inline{display:flex;align-items:end;gap:1rem}";export{qt as kup_input_panel}
|