@sme.up/ketchup 6.1.0-SNAPSHOT → 6.2.0-SNAPSHOT
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/{cell-utils-a78d6fac.js → cell-utils-d894e802.js} +2 -2
- package/dist/cjs/{f-button-ac179257.js → f-button-414b3bc3.js} +4 -4
- package/dist/cjs/f-cell-c8983ec7.js +418 -0
- package/dist/cjs/f-checkbox-57443ca3.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-ef81bf51.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-0618c795.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-c9dd5173.js} +5 -5
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-7d31190f.js} +3 -3
- package/dist/cjs/{index-eb556444.js → index-06b131ea.js} +6 -4
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +200 -187
- package/dist/cjs/kup-box_2.cjs.entry.js +23 -12
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +10 -9
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +4 -7
- package/dist/cjs/{kup-form-editor.cjs.entry.js → kup-dashboard.cjs.entry.js} +123 -148
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-form.cjs.entry.js +469 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +11 -10
- package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-2fee8cf3.js} +324 -6
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +7 -9
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-6287d878.js → utils-8470184d.js} +1 -1
- package/dist/collection/assets/dashboard.js +113 -0
- package/dist/collection/assets/data-table.js +15 -0
- package/dist/collection/assets/form.js +179 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +10 -6
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
- package/dist/collection/components/kup-box/kup-box.js +13 -2
- package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +7 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +148 -149
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-form/kup-form-declarations.js +19 -0
- package/dist/collection/components/kup-form/kup-form.css +86 -0
- package/dist/collection/components/kup-form/kup-form.js +668 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +10 -7
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +3 -5
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +10 -4
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
- package/dist/collection/managers/kup-data/kup-data.js +94 -0
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +18 -3
- package/dist/collection/types/GenericTypes.js +2 -1
- package/dist/esm/{cell-utils-964da6b5.js → cell-utils-7fc84d4e.js} +2 -2
- package/dist/esm/{f-button-871a544b.js → f-button-2f6cc296.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-4428481c.js} +48 -283
- package/dist/esm/f-checkbox-c51c4a75.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-b39eb49a.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-b08ebeb2.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-4fda6086.js} +5 -5
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-184a5fb3.js} +3 -3
- package/dist/esm/{index-baeab1ac.js → index-ad6ab214.js} +6 -4
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_25.entry.js +190 -177
- package/dist/esm/kup-box_2.entry.js +23 -12
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +4 -7
- package/dist/esm/{kup-form-editor.entry.js → kup-dashboard.entry.js} +123 -148
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-form.entry.js +465 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +10 -9
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-3325b2d8.js} +321 -7
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +7 -9
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d7e4b3c2.js → utils-6373a07e.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-006bc4d0.entry.js +1 -0
- package/dist/ketchup/{p-8cdf61a4.js → p-0741da57.js} +1 -1
- package/dist/ketchup/{p-44ec4f03.js → p-13e08580.js} +1 -1
- package/dist/ketchup/p-153697fb.entry.js +1 -0
- package/dist/ketchup/{p-a615a92b.entry.js → p-175edb62.entry.js} +1 -1
- package/dist/ketchup/{p-fac1a08b.entry.js → p-1db1d42b.entry.js} +1 -1
- package/dist/ketchup/{p-f09f2f98.entry.js → p-30820f8f.entry.js} +1 -1
- package/dist/ketchup/p-35325834.entry.js +9 -0
- package/dist/ketchup/{p-65b46587.entry.js → p-359e8bec.entry.js} +4 -4
- package/dist/ketchup/{p-6dff70f8.entry.js → p-3c7c92c0.entry.js} +1 -1
- package/dist/ketchup/{p-954cc340.entry.js → p-41cf8703.entry.js} +1 -1
- package/dist/ketchup/{p-3c11e615.entry.js → p-6127fccf.entry.js} +1 -1
- package/dist/ketchup/{p-f71a1675.entry.js → p-6b82e4e2.entry.js} +1 -1
- package/dist/ketchup/p-704e60eb.js +30 -0
- package/dist/ketchup/p-70660fe2.js +1 -0
- package/dist/ketchup/{p-ea10176c.entry.js → p-762c0382.entry.js} +1 -1
- package/dist/ketchup/{p-c5ce8951.entry.js → p-76947316.entry.js} +1 -1
- package/dist/ketchup/{p-d2ee56dd.entry.js → p-8103b80a.entry.js} +1 -1
- package/dist/ketchup/{p-99e0d768.entry.js → p-9fa457d4.entry.js} +1 -1
- package/dist/ketchup/{p-65974e48.entry.js → p-a0ce8075.entry.js} +1 -1
- package/dist/ketchup/p-a804fe83.entry.js +27 -0
- package/dist/ketchup/{p-7454cb92.js → p-ca9fd099.js} +1 -1
- package/dist/ketchup/p-caabb9ab.entry.js +1 -0
- package/dist/ketchup/p-cc3abf84.entry.js +1 -0
- package/dist/ketchup/p-cd5cfa7c.js +1 -0
- package/dist/ketchup/p-d2e76960.entry.js +1 -0
- package/dist/ketchup/p-d3b542b3.js +2 -0
- package/dist/ketchup/p-d7004ae4.js +1 -0
- package/dist/ketchup/{p-e0035c58.js → p-d95c904b.js} +1 -1
- package/dist/ketchup/{p-7eff4eee.js → p-ddce3430.js} +1 -1
- package/dist/ketchup/p-ee580b3a.entry.js +1 -0
- package/dist/ketchup/p-f49cb68e.js +1 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
- package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
- package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +12 -9
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +48 -0
- package/dist/types/components/kup-form/kup-form.d.ts +68 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components.d.ts +412 -159
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data.d.ts +2 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/types/GenericTypes.d.ts +2 -1
- package/package.json +2 -2
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-976244f9.entry.js +0 -9
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as n,d as l,e as u,h as t}from"./p-
|
|
1
|
+
import{u as n,d as l,e as u,h as t}from"./p-d95c904b.js";import{d as r}from"./p-704e60eb.js";const e=document.documentElement;function f(n,l){if(null!=l&&null!=l.displayedValue)return l.displayedValue;let u=s(l.value,n,l);return null!=l&&(l.displayedValue=u),u}function i(n,l){return null==n?"":(null!=n.displayedValue&&""!=n.displayedValue.trim()||(n.displayedValue=s(n.value,l,null)),n.displayedValue)}function o(n){return e.ketchup.math.numberify(n.obj?n.obj.k:n.value)}function s(n,l,u){let t=null!=l?l.obj:null;return null!=u&&(t=u.obj?u.obj:t),c(n,t,null!=l?l.decimals:null)}function c(t,f,i){return null==t||""==t.trim()?t:e.ketchup.objects.isNumber(f)?n(t,i||-1,f?f.p:""):e.ketchup.objects.isDate(f)&&e.ketchup.dates.isValid(t,r.ISO_DATE)?e.ketchup.dates.format(t):e.ketchup.objects.isTime(f)?l(t,e.ketchup.objects.isTimeWithSeconds(f),f.t+f.p):e.ketchup.objects.isTimestamp(f)?u(t):t}function a(n,l){if(null==n)return null;for(let u of n)if(u.name===l)return u;return null}function d(n,l,u){return m(n.obj,n.value,l.obj,l.value,u)}function m(n,l,u,f,i){const o="A"===i?1:-1;if(null==n||null==u)return o*p(l,f);if(n.t!==u.t||n.p!==u.p){let l=p(n.t,u.t);return 0===l&&(l=p(n.p,u.p)),l*o}let s=l,c=f;if(s==c)return 0;if(""==s)return-1*o;if(""==c)return 1*o;let a=s,d=c;if(e.ketchup.objects.isNumber(n))a=t(s),d=t(c);else if(e.ketchup.objects.isDate(n))a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,r.ISO_DATE)),d=e.ketchup.dates.toDate(e.ketchup.dates.format(c,r.ISO_DATE));else if(e.ketchup.objects.isTime(n)){let l=e.ketchup.objects.isTimeWithSeconds(n);a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,l?r.ISO_TIME:r.ISO_TIME_WITHOUT_SECONDS)),d=e.ketchup.dates.toDate(e.ketchup.dates.format(c,l?r.ISO_TIME:r.ISO_TIME_WITHOUT_SECONDS))}else e.ketchup.objects.isTimestamp(n)&&(a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,r.ISO_DATE_TIME)),d=e.ketchup.dates.toDate(e.ketchup.dates.format(c,r.ISO_DATE_TIME)));return a>d?1*o:a<d?-1*o:0}function p(n,l){let u=null==n?0:n.length,t=null==l?0:l.length;const r=Math.min(u,t);let e=0;for(;e<r;){const u=n[e],t=l[e];if(u!==t)return u.charCodeAt(0)-t.charCodeAt(0);e++}return u-t}export{i as a,c as b,f as c,m as d,d as e,o as f,a as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,f as i,h as s,H as e,g as o}from"./p-d3b542b3.js";import{k as a,h as c,c as n,a7 as r,z as h,a8 as l,D as u,b as p}from"./p-704e60eb.js";import{F as d}from"./p-6c77a36c.js";import{F as b}from"./p-70660fe2.js";import{g as m,s as k}from"./p-d95c904b.js";import{c as g}from"./p-97e8ea42.js";var f,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(f||(f={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.display=x.DATATABLE,this.customStyle="",this.data=null,this.dragHandler=null,this.kupManager=a(),this.textArea=null,this.wrapperRef=null}async getProps(t){return m(this,f,t)}async refresh(){i(this)}async setProps(t){k(this,f,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(c.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],e={};if(this.display===x.JSON)e.initialValue=this.data?JSON.stringify(this.data,null,2):"",e.textArea=!0,i.push(s("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},e,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:e.data=this.data,i.push(s("kup-box",Object.assign({},e)));break;case x.BUTTON_LIST:e.data=this.data,i.push(s("kup-button-list",Object.assign({},e)));break;case x.CHIP:e.data=this.data,i.push(s("kup-chip",Object.assign({},e)));break;case x.CHART:case x.ECHART:e.data=this.data,e.series=[],e.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==e.axis?e.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):e.axis=i.name}0===e.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",n.WARNING),e.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",n.WARNING),i.push(s(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},e)));break;case x.DATATABLE:e.data=this.data,e.autoFillMissingCells=!0,i.push(s("kup-data-table",Object.assign({},e)));break;case x.TREE:e.data=this.data,i.push(s("kup-tree",Object.assign({class:"kup-full-width"},e)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",n.ERROR)}else i.push(s("div",{class:"empty"},s(b,{sizeY:"100px",resource:"move_to_inbox"}),s("div",{class:"empty-text"},this.kupManager.language.translate(c.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),s=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,e=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(s&&s.name?i.columns?this.data.columns.find((t=>t.name===s.name))||i.columns.push(s):i.columns=[s]:this.kupManager.debug.logMessage(this,"Invalid column received.",n.WARNING),e&&(i.rows?i.rows.push(e):i.rows=[e]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(r,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${h}],[${l}]`},{dispatcher:this.rootElement,type:u.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return s(e,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:g},s("div",{class:"magic-box-wrapper"},s("div",{class:"actions",id:"drag-handle"},s("kup-combobox",Object.assign({},this.comboboxProps())),s("kup-button",{styling:d.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),s("kup-button",{id:"close-dialog",customStyle:`:host{${p.PRIMARY}: var(${p.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),s("div",{class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=":host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-color);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,f as s,h as e,H as o,g as n}from"./p-d3b542b3.js";import{F as r}from"./p-f49cb68e.js";import{F as a}from"./p-cd5cfa7c.js";import{F as h}from"./p-13e08580.js";import{F as l}from"./p-a203f78b.js";import{k as c,a6 as d,h as u,B as p,c as m}from"./p-704e60eb.js";import{g as f,s as x}from"./p-d95c904b.js";import{c as g}from"./p-97e8ea42.js";import"./p-6c77a36c.js";import"./p-70660fe2.js";import"./p-79b0730b.js";import"./p-81605f08.js";var b;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the component.",t.enableDesign="When set to true, the component is in design mode and it is draggable."}(b||(b={}));const y=class{constructor(s){t(this,s),this.kupSave=i(this,"kup-dashboard-save",6),this.resetInternalData=!1,this.customStyle="",this.data=null,this.enableDesign=!1,this.kupManager=c(),this.internalData=null,this.internalDataBackup=null}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return f(this,b,t)}async refresh(){s(this)}async setProps(t){x(this,b,t)}buildGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=16*Math.random()|0;return("x"===t?i:3&i|8).toString(16)}))}buildHeader(){const t={icon:"cancel",label:this.kupManager.language.translate(d.RESET),secondary:!0,onClick:()=>{this.resetData()}},i={icon:"save",label:this.kupManager.language.translate(d.SAVE),onClick:()=>this.onKupSave()};return e("div",{class:"header"},this.enableDesign?e(r,Object.assign({},t)):void 0,this.enableDesign?e(r,Object.assign({},i)):void 0)}buildForm(t,i){return t?e("div",{class:{form:!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout,"form-dropzone":this.enableDesign&&t&&null!=t.sections&&t.sections.length>0},style:this.getGridStyle(t),ref:s=>{s&&(s.kupData={parent:i,form:t})}},t.sections.map((i=>this.buildSection(i,t)))):e("div",null,this.kupManager.language.translate(u.EMPTY_DATA))}buildSectionHeader(t,i){const s={value:t.dim,label:this.kupManager.language.translate(d.DIMENSION),onChange:i=>{const{target:s}=i;t.dim=s.value}},o={icon:"add",slim:!0,onClick:()=>{t.sections||(t.sections=[]),t.sections.push({id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout}),this.resetData(this.internalData)}},n={icon:"remove",slim:!0,secondary:!0,onClick:()=>{const s=i.sections.indexOf(t);i.sections.splice(s,1),this.resetData(this.internalData)}},l={checked:t.loaded,label:this.kupManager.language.translate(d.LOADED),onChange:()=>{t.loaded=!t.loaded,this.refresh()}},c={checked:"column"==t.layout,label:this.kupManager.language.translate(d.VERTICAL),onChange:()=>{t.layout="column"==t.layout?"row":"column",this.refresh()}};return e("div",{class:"section-header"},e("div",null,t.id," - ",t.layout),e("div",null,e("div",{class:"section-header-actions"},e(h,Object.assign({},s)),e(a,Object.assign({},l)),e(a,Object.assign({},c)),e(r,Object.assign({},o)),e(r,Object.assign({},n)))))}buildSection(t,i){const s={"section-body":!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout};return e("div",{class:{section:!0,"section-draggable":this.enableDesign,"section-dropzone":this.enableDesign},ref:s=>{s&&(s.kupData={parent:i,section:t})}},this.enableDesign?this.buildSectionHeader(t,i):void 0,e("div",{class:s,style:this.getGridStyle(t)},this.enableDesign||!t.loaded||t.sections&&0!=t.sections.length?void 0:e("slot",{name:t.id}),t.sections&&(t.loaded||this.enableDesign)?t.sections.map((i=>this.buildSection(i,t))):void 0))}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,p.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,m.ERROR)}try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-dropzone").forEach((i=>t.push(i))),this.rootElement.shadowRoot.querySelectorAll(".form-dropzone").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.dropzone(t,null,null,{drop:t=>{this.dropped(t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,m.ERROR)}}dropped(t,i){const s=i.kupData.parent.sections.indexOf(i.kupData.section);if(i.kupData.parent.sections.splice(s,1),t.kupData.form)t.kupData.form.sections||(t.kupData.form.sections=[]),t.kupData.form.sections.push(i.kupData.section),i.kupData.parent=t.kupData.form;else if(t.kupData.section){if(!t.kupData.section.sections||0==t.kupData.section.sections.length){const s=JSON.parse(JSON.stringify(t.kupData.section));s.dim=null,i.kupData.section.dim=null,t.kupData.section.id=this.buildGuid(),t.kupData.section.sections=[],t.kupData.section.sections.push(s)}t.kupData.section.sections.push(i.kupData.section),i.kupData.parent=t.kupData.section}this.resetData(this.internalData)}getGridStyle(t){let i={};if(!this.enableDesign&&t.sections){let s="";t.sections.forEach((t=>{s+=t.dim?t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim:" 1fr"})),"column"==t.layout&&(i.gridTemplateRows=s),"row"==t.layout&&(i.gridTemplateColumns=s)}return i}resetData(t=null){t&&(this.internalDataBackup=t),this.resetInternalData=!0,setTimeout((()=>{this.internalDataBackup&&(this.internalData=this.internalDataBackup,this.internalDataBackup=null),this.resetInternalData=!1}),250)}unregisterInteractables(){this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-dropzone"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-draggable"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".form-dropzone")))}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.resetInternalData?(this.internalData=null,this.unregisterInteractables()):this.internalData||(this.internalData=JSON.parse(JSON.stringify(this.data)))}componentDidRender(){this.kupManager.debug.logRender(this,!0);const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");i&&i.forEach((t=>{l(t)}))}this.didRenderInteractables()}render(){return e(o,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:g},this.buildHeader(),this.buildForm(this.internalData,null)))}disconnectedCallback(){this.unregisterInteractables(),this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}static get watchers(){return{data:["dataChanged"]}}};y.style=":host{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color)}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";export{y as kup_dashboard}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as c}from"./p-d3b542b3.js";const e=e=>{const o={"data-indeterminate":!!e.indeterminate},a={checkbox:!0,"checkbox--checked":!(!e.checked||e.indeterminate),"checkbox--disabled":!!e.disabled,"checkbox--indeterminate":!!e.indeterminate};return c("div",Object.assign({class:`f-checkbox ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),c("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},c("div",{class:a},c("input",Object.assign({type:"checkbox",class:"checkbox__native-control",checked:e.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus},o,{value:e.checked?"on":"off"})),c("div",{class:"checkbox__background",onClick:e.onChange},c("svg",{class:"checkbox__checkmark",viewBox:"0 0 24 24"},c("path",{class:"checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),c("div",{class:"checkbox__mixedmark"}))),e.label?c("label",null,e.label):void 0))};export{e as F}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,f as a,h as e,H as r,g as s}from"./p-d3b542b3.js";import{k as o,h as n,F as l}from"./p-704e60eb.js";import{g as p,s as m}from"./p-d95c904b.js";import{c}from"./p-97e8ea42.js";import{F as g}from"./p-70660fe2.js";import{F as _}from"./p-f49cb68e.js";import{F as h}from"./p-6c77a36c.js";import{F as u}from"./p-d7004ae4.js";import{M as d}from"./p-81605f08.js";import"./p-ca9fd099.js";import"./p-cd5cfa7c.js";import"./p-13e08580.js";import"./p-ddce3430.js";import"./p-79b0730b.js";var f;!function(i){i.customStyle="Custom style of the component.",i.data="Actual data of the component",i.ripple="When enabled displays Material's ripple effect on clicked items."}(f||(f={}));var b,k,v,w,y,x,j,C=function(i,t,a,e){if("a"===a&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?i!==t||!e:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?e:"a"===a?e.call(i):e?e.value:t.get(i)};const M=class{constructor(a){i(this,a),this.kupClick=t(this,"kup-imagelist-click",6),this.kupContextMenu=t(this,"kup-imagelist-contextmenu",6),this.kupDblClick=t(this,"kup-imagelist-dblclick",6),b.add(this),this.currentNode=null,this.navigationBarToggled=!1,this.customStyle="",this.data=[],this.ripple=!0,k.set(this,[]),v.set(this,o()),w.set(this,{icon:"arrow_back",onClick:()=>{this.currentNode=C(this,v,"f").data.node.getParent(this.data,this.currentNode),this.currentNode||(this.navigationBarToggled=!1)},styling:h.FLAT,wrapperClass:"navigation-bar__back"}),y.set(this,{icon:"arrow_upward",onClick:()=>{this.currentNode=null,this.navigationBarToggled=!1},styling:h.FLAT,wrapperClass:"navigation-bar__top"})}onKupClick(i){i.children&&i.children.length>0&&(this.currentNode=i),this.kupClick.emit({comp:this,id:this.rootElement.id,node:i})}onKupContextMenu(i,t){i.preventDefault(),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,node:t})}onKupDblClick(i){for(let i=0;i<C(this,k,"f").length;i++)clearTimeout(C(this,k,"f")[i]);(function(i,t,a,e,r){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?i!==t||!r:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===e?r.call(i,a):r?r.value=a:t.set(i,a)})(this,k,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,node:i})}async getProps(i){return p(this,f,i)}async refresh(){a(this)}async setProps(i){m(this,f,i)}componentWillLoad(){C(this,v,"f").debug.logLoad(this,!1),C(this,v,"f").language.register(this),C(this,v,"f").theme.register(this)}componentDidLoad(){C(this,v,"f").debug.logLoad(this,!0)}componentWillRender(){C(this,v,"f").debug.logRender(this,!1)}componentDidRender(){const i=this.rootElement.shadowRoot;if(i&&this.ripple){const t=i.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(t)for(let i=0;i<t.length;i++)d.attachTo(t[i])}C(this,v,"f").debug.logRender(this,!0)}render(){const i=!!this.currentNode;return e(r,null,e("style",null,C(this,v,"f").theme.setKupStyle(this.rootElement)),e("div",{id:c},e("div",{class:"navigation-bar"},i?e("div",{class:"navigation-bar__wrapper "+(this.navigationBarToggled?"navigation-bar__wrapper--active":"")},e("div",{class:"navigation-bar__title",onClick:()=>{this.navigationBarToggled=!this.navigationBarToggled}},e(g,{fit:!0,resource:this.currentNode.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"navigation-bar__title__image"}),e("div",{class:"navigation-bar__title__label"},this.currentNode.value)),e(_,Object.assign({},C(this,w,"f"),{label:C(this,v,"f").language.translate(n.BACK)})),e(_,Object.assign({},C(this,y,"f"),{label:C(this,v,"f").language.translate(n.TOP)}))):null),e("div",{class:"image-list"},...C(this,b,"m",j).call(this))))}disconnectedCallback(){C(this,v,"f").language.unregister(this),C(this,v,"f").theme.unregister(this)}get rootElement(){return s(this)}};k=new WeakMap,v=new WeakMap,w=new WeakMap,y=new WeakMap,b=new WeakSet,x=function(i){const t=e(g,Object.assign({},{fit:!0,resource:i.icon,title:i.title,wrapperClass:"image-list__image"})),a=e("div",{class:"image-list__label"},i.value);return e(u,{cell:{value:i.value,icon:i.icon,obj:i.obj},column:{name:"IMAGE",title:"Image"},density:l.NONE,row:Object.assign({},i)},e("div",{class:"image-list__wrapper"},t,a))},j=function(){const i=[],t=this.currentNode?this.currentNode.children:this.data;for(let a=0;t&&a<t.length;a++){const r=t[a],s=e("div",{onClick:()=>{C(this,k,"f").push(setTimeout((()=>this.onKupClick(r)),300))},onContextMenu:i=>this.onKupContextMenu(i,r),onDblClick:()=>this.onKupDblClick(r),class:{"image-list__item":!0,"mdc-ripple-surface":!!this.ripple}},C(this,b,"m",x).call(this,r));i.push(s)}return i},M.style=":host{--kup_imagelist_background_color:var(\n --kup-imagelist-background-color,\n transparent\n );--kup_imagelist_columns:var(--kup-imagelist-columns, 4);--kup_imagelist_grid_gap:var(--kup-imagelist-grid-gap, 0.5em);--kup_imagelist_image_margin:var(--kup-imagelist-image-margin, 1em auto);--kup_imagelist_image_min_height:var(--kup-imagelist-image-min-height, 64px);--kup_imagelist_item_border_radius:var(\n --kup-imagelist-item-border-radius,\n 8px\n );--kup_imagelist_item_height:var(--kup-imagelist-item-height, auto);--kup_imagelist_item_padding:var(--kup-imagelist-item-padding, 0);--kup_imagelist_item_width:var(--kup-imagelist-item-width, auto);--kup_imagelist_label_margin:var(\n --kup-imagelist-label-margin,\n 0 auto 1em auto\n );--kup_imagelist_navbar_background_color:var(\n --kup-imagelist-navbar-background-color,\n transparent\n );--kup_imagelist_primary_color:var(\n --kup-imagelist-primary-color,\n var(--kup-primary-color)\n );--kup_imagelist_primary_color_rgb:var(\n --kup-imagelist-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_imagelist_text_color:var(\n --kup-imagelist-text-color,\n var(--kup-text-color)\n );display:block}.navigation-bar{align-items:center;background-color:var(--kup_imagelist_navbar_background_color);display:flex;justify-content:center}.navigation-bar__wrapper{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;max-width:100%;position:relative}.navigation-bar__wrapper--active .navigation-bar__title{background-color:rgba(var(--kup_imagelist_primary_color_rgb), 0.15);color:var(--kup_imagelist_primary_color)}.navigation-bar__wrapper--active .navigation-bar__back,.navigation-bar__wrapper--active .navigation-bar__top{display:block}.navigation-bar__back,.navigation-bar__top{--kup-button-primary-color-rgb:0;animation:fade-in 0.375s ease-in;display:none}.navigation-bar__title{border-radius:16px;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;padding:0.75em 1em;user-select:none;transition:background-color 125ms, color 125ms;width:100%}.navigation-bar__title__image.f-image{margin:0}.navigation-bar__title__label{font-size:1.2em;font-weight:bold;letter-spacing:0.12em;overflow:hidden;padding:0 0.5em;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.image-list{background-color:var(--kup_imagelist_background_color);display:grid;grid-gap:var(--kup_imagelist_grid_gap);grid-template-columns:repeat(var(--kup_imagelist_columns, 4), minmax(0px, 1fr));margin-top:1em;width:100%}.image-list .f-cell{height:100%;width:100%}.image-list__item{border-radius:var(--kup_imagelist_item_border_radius);cursor:pointer;height:var(--kup_imagelist_item_height);padding:var(--kup_imagelist_item_padding);width:var(--kup_imagelist_item_width)}.image-list__image.f-image{margin:var(--kup_imagelist_image_margin)}.image-list__image.f-image .f-image__icon{min-height:var(--kup_imagelist_image_min_height)}.image-list__label{color:var(--kup_imagelist_text_color);letter-spacing:0.12em;margin:var(--kup_imagelist_label_margin);overflow:hidden;text-align:center;text-overflow:ellipsis}.image-list .mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.image-list .mdc-ripple-surface:before,.image-list .mdc-ripple-surface:after{background-color:var(--kup_imagelist_primary_color)}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-horizontal) .image-list{display:flex}:host(.kup-auto-grid) .image-list{display:flex;flex-wrap:wrap;justify-content:center}";export{M as kup_image_list}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},i={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},c=e=>Promise.resolve(e),r=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),a=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),c=u(t,s),r=p(n);i.ael(o,l,c,r),(t.o=t.o||[]).push((()=>i.rel(o,l,c,r)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){le(e)}},f=(e,t)=>4&t?o:e,p=e=>0!=(2&e),d="http://www.w3.org/1999/xlink",h=new WeakMap,m=e=>"sc-"+e.p,y={},$=e=>"object"==(e=typeof e)||"function"===e,w=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1;const c=[],r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!$(l))&&(l+=""),o&&i?c[c.length-1].h+=l:c.push(o?b(null,l):l),i=o)};if(r(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,v);const a=b(e,null);return a.m=t,c.length>0&&(a.$=c),a.g=s,a},b=(e,t)=>({t:0,v:e,h:t,j:null,$:null,m:null,g:null}),g={},v={forEach:(e,t)=>e.map(j).forEach(t),map:(e,t)=>e.map(j).map(t).map(k)},j=e=>({vattrs:e.m,vchildren:e.$,vkey:e.g,vname:e.k,vtag:e.v,vtext:e.h}),k=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),w(e.vtag,t,...e.vchildren||[])}const t=b(e.vtag,e.vtext);return t.m=e.vattrs,t.$=e.vchildren,t.g=e.vkey,t.k=e.vname,t},S=(e,t,n,l,o,c)=>{if(n!==l){let r=ne(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,s=M(n),o=M(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const s=$(l);if((r||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}let i=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,i=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(i?e.removeAttributeNS(d,t):e.removeAttribute(t)):(!r||4&c||o)&&!s&&(l=!0===l?"":l,i?e.setAttributeNS(d,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):ne(s,a)?a.slice(2):a[2]+t.slice(3),n&&i.rel(e,t,n,!1),l&&i.ael(e,t,l,!1)}},O=/\s/,M=e=>e?e.split(O):[],x=(e,t,n,l)=>{const s=11===t.j.nodeType&&t.j.host?t.j.host:t.j,o=e&&e.m||y,i=t.m||y;for(l in o)l in i||S(s,l,o[l],void 0,n,t.t);for(l in i)S(s,l,o[l],i[l],n,t.t)},C=(t,l,s)=>{const i=l.$[s];let c,r,a=0;if(null!==i.h)c=i.j=o.createTextNode(i.h);else{if(n||(n="svg"===i.v),c=i.j=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.v),n&&"foreignObject"===i.v&&(n=!1),x(null,i,n),null!=e&&c["s-si"]!==e&&c.classList.add(c["s-si"]=e),i.$)for(a=0;a<i.$.length;++a)r=C(t,i,a),r&&c.appendChild(r);"svg"===i.v?n=!1:"foreignObject"===c.tagName&&(n=!0)}return c},L=(e,n,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=C(null,l,o),c&&(s[o].j=c,r.insertBefore(c,n)))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.j,W(l),s.remove())},R=(e,t)=>e.v===t.v&&e.g===t.g,U=(e,t)=>{const l=t.j=e.j,s=e.$,o=t.$,i=t.v,c=t.h;null===c?(n="svg"===i||"foreignObject"!==i&&n,"slot"===i||x(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o,i=0,c=0,r=0,a=0,u=t.length-1,f=t[0],p=t[u],d=l.length-1,h=l[0],m=l[d];for(;i<=u&&c<=d;)if(null==f)f=t[++i];else if(null==p)p=t[--u];else if(null==h)h=l[++c];else if(null==m)m=l[--d];else if(R(f,h))U(f,h),f=t[++i],h=l[++c];else if(R(p,m))U(p,m),p=t[--u],m=l[--d];else if(R(f,m))U(f,m),e.insertBefore(f.j,p.j.nextSibling),f=t[++i],m=l[--d];else if(R(p,h))U(p,h),e.insertBefore(p.j,f.j),p=t[--u],h=l[++c];else{for(r=-1,a=i;a<=u;++a)if(t[a]&&null!==t[a].g&&t[a].g===h.g){r=a;break}r>=0?(o=t[r],o.v!==h.v?s=C(t&&t[c],n,r):(U(o,h),t[r]=void 0,s=o.j),h=l[++c]):(s=C(t&&t[c],n,c),h=l[++c]),s&&f.j.parentNode.insertBefore(s,f.j)}i>u?L(e,null==l[d+1]?null:l[d+1].j,n,l,c,d):c>d&&P(t,i,u)})(l,s,t,o):null!==o?(null!==e.h&&(l.textContent=""),L(l,null,t,o,0,o.length-1)):null!==s&&P(s,0,s.length-1),n&&"svg"===i&&(n=!1)):e.h!==c&&(l.data=c)},W=e=>{e.m&&e.m.ref&&e.m.ref(null),e.$&&e.$.map(W)},E=e=>Z(e).S,D=(e,t,n)=>{const l=E(e);return{emit:e=>N(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},N=(e,t,n)=>{const l=i.ce(t,n);return e.dispatchEvent(l),l},T=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},A=(e,t)=>{if(e.t|=16,!(4&e.t))return T(e,e.M),de((()=>F(e,t)));e.t|=512},F=(e,t)=>{const n=e.i;let l;return t?(e.t|=256,e.u&&(e.u.map((([e,t])=>B(n,e,t))),e.u=null),l=B(n,"componentWillLoad")):l=B(n,"componentWillUpdate"),l=G(l,(()=>B(n,"componentWillRender"))),G(l,(()=>H(e,n,t)))},H=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.C,n=e.S,l=t.t,s=((e,t)=>{let n=m(t);const l=ie.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=h.get(e=e.head||e);s||h.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);q(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>V(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},q=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.C,i=n.L||b(null,null),c=(e=>e&&e.v===g)(l)?l:w(null,null,l);t=s.tagName,o.P&&(c.m=c.m||{},o.P.map((([e,t])=>c.m[t]=s[e]))),c.v=null,c.t|=4,n.L=c,c.j=i.j=s.shadowRoot||s,e=s["s-sc"],U(i,c)})(n,l)}catch(e){le(e,n.S)}return null},V=e=>{const t=e.S,n=e.i,l=e.M;B(n,"componentDidRender"),64&e.t?B(n,"componentDidUpdate"):(e.t|=64,I(t),B(n,"componentDidLoad"),e.R(t),l||z()),e.U(t),e.O&&(e.O(),e.O=void 0),512&e.t&&pe((()=>A(e,!1))),e.t&=-517},_=e=>{{const t=Z(e),n=t.S.isConnected;return n&&2==(18&t.t)&&A(t,!1),n}},z=()=>{I(o.documentElement),pe((()=>N(s,"appload",{detail:{namespace:"ketchup"}})))},B=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){le(e)}},G=(e,t)=>e&&e.then?e.then(t):t(),I=e=>e.classList.add("hydrated"),J=(e,t,n)=>{if(t.W){e.watchers&&(t.D=e.watchers);const l=Object.entries(t.W),s=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(s,e,{get(){return((e,t)=>Z(this).N.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=Z(e),o=s.S,i=s.N.get(t),c=s.t,r=s.i;if(n=((e,t)=>null==e||$(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.W[t][0]),(!(8&c)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.N.set(t,n),r)){if(l.D&&128&c){const e=l.D[t];e&&e.map((e=>{try{r[e](n,i,t)}catch(e){le(e,o)}}))}2==(18&c)&&A(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(s,e,{value(...t){const n=Z(this);return n.T.then((()=>n.i[e](...t)))}})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){i.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.P.push([e,s]),s}))}}return e},K=(e,t={})=>{const n=[],l=t.exclude||[],c=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),p=o.createElement("style"),d=[];let h,y=!0;Object.assign(i,t),i.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],p:t[1],W:t[2],A:t[3]};s.W=t[2],s.A=t[3],s.P=[],s.D={};const o=s.p,u=class extends HTMLElement{constructor(e){super(e),te(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),y?d.push(this):i.jmp((()=>(e=>{if(0==(1&i.t)){const t=Z(e),n=t.C,l=()=>{};if(1&t.t)a(e,t,n.A);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){T(t,t.M=n);break}}n.W&&Object.entries(n.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=oe(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.D=s.watchers,J(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){le(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=m(n);if(!ie.has(t)){const l=()=>{};((e,t,n)=>{let l=ie.get(e);r&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,ie.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.M,i=()=>A(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){i.jmp((()=>(()=>{if(0==(1&i.t)){const e=Z(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),B(t,"disconnectedCallback")}})()))}componentOnReady(){return Z(this).F}};s.H=e[0],l.includes(o)||c.get(o)||(n.push(o),c.define(o,J(u,s,1)))}))})),p.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",p.setAttribute("data-styles",""),u.insertBefore(p,f?f.nextSibling:u.firstChild),y=!1,d.length?d.map((e=>e.connectedCallback())):i.jmp((()=>h=setTimeout(z,30)))},Q=e=>{const t=new URL(e,i.l);return t.origin!==s.location.origin?t.href:t.pathname},X=e=>i.l=e,Y=new WeakMap,Z=e=>Y.get(e),ee=(e,t)=>Y.set(t.i=e,t),te=(e,t)=>{const n={t:0,S:e,C:t,N:new Map};return n.T=new Promise((e=>n.U=e)),n.F=new Promise((e=>n.R=e)),e["s-p"]=[],e["s-rc"]=[],a(e,n,t.A),Y.set(e,n)},ne=(e,t)=>t in e,le=(e,t)=>(0,console.error)(e,t),se=new Map,oe=e=>{const t=e.p.replace(/-/g,"_"),n=e.H,l=se.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(se.set(n,e),e[t])),le)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ie=new Map,ce=[],re=[],ae=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&i.t?pe(fe):i.raf(fe))},ue=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){le(e)}e.length=0},fe=()=>{ue(ce),ue(re),(l=ce.length>0)&&i.raf(fe)},pe=e=>c().then(e),de=ae(re,!0);export{g as H,Q as a,K as b,D as c,_ as f,E as g,w as h,c as p,ee as r,X as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Y as e,Z as c,b as t,_ as s,W as a,$ as n,a0 as l,a1 as i,a2 as r}from"./p-704e60eb.js";import{h as u}from"./p-d3b542b3.js";import{c as o}from"./p-ca9fd099.js";import{F as p}from"./p-cd5cfa7c.js";import{F as b}from"./p-13e08580.js";import{h as k}from"./p-d95c904b.js";import{F as d}from"./p-70660fe2.js";import{a as h}from"./p-ddce3430.js";const f=e=>u("div",Object.assign({class:`f-switch ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),u("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},u("div",{class:`switch ${e.checked?"switch--checked":""} ${e.disabled?"switch--disabled":""}`},u("div",{class:"switch__track"}),u("div",{class:"switch__thumb-underlay"},u("div",{class:"switch__thumb"},u("input",{type:"checkbox",class:"switch__native-control",role:"switch",checked:e.checked,disabled:e.disabled,value:e.checked?"on":"off",onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus})))),u("label",{onClick:e.onChange},e.label))),m=document.documentElement,j=(n,i)=>{const j=n.cell,_=n.column,v=n.row,x=n.shape?n.shape:j.shape?j.shape:_.shape?_.shape:null,$=!m.ketchup.objects.isEmptyKupObj(j.obj),y=!(!j.isEditable||!n.editable),C=n.previousValue!==j.value?j.value:"",z=m.ketchup.data.cell.getType(j,x),F=Object.assign({},j.data);let V=j.cssClass?j.cssClass:_.cssClass?_.cssClass:"";const H={"f-cell":!0,[l.OBJ]:!!$,[z+"-cell"]:!0,[n.wrapperClass]:!!n.wrapperClass,[n.density]:!(!n.density||z===s.BAR),[V]:!!V};let Y=C;y&&e.includes(z)?Y=function(e,c,t,a,n){switch(e){case s.AUTOCOMPLETE:return u("kup-autocomplete",Object.assign({initialValue:t.value},t.data,{class:O(n)?"kup-full-width":"","onkup-autocomplete-change":c=>w(c,n,e,r.UPDATE),"onkup-autocomplete-input":c=>w(c,n,e,r.INPUT),"onkup-autocomplete-iconclick":c=>w(c,n,e,r.ICON_CLICK)}));case s.CHECKBOX:return g(n)&&(c[l.C_CENTERED]=!0),u(p,Object.assign({},t.data,{onChange:c=>w(c,n,e,r.UPDATE)}));case s.COLOR_PICKER:return u("kup-color-picker",Object.assign({initialValue:t.value},t.data,{class:O(n)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":c=>w(c,n,e,r.UPDATE)}));case s.COMBOBOX:return u("kup-combobox",Object.assign({initialValue:t.value},t.data,{class:O(n)?"kup-full-width":"","onkup-combobox-change":c=>w(c,n,e,r.UPDATE),"onkup-combobox-input":c=>w(c,n,e,r.INPUT),"onkup-combobox-iconclick":c=>w(c,n,e,r.ICON_CLICK)}));case s.DATE:return u("kup-date-picker",Object.assign({initialValue:t.value},t.data,{class:O(n)?"kup-full-width":"","onkup-datepicker-change":c=>w(c,n,e,r.UPDATE),"onkup-datepicker-input":c=>w(c,n,e,r.INPUT)}));case s.RATING:return u("kup-rating",Object.assign({},t.data,{disabled:!1,"onkup-rating-click":c=>w(c,n,e,r.UPDATE)}));case s.SWITCH:return u(f,Object.assign({},t.data,{disabled:!1,onChange:c=>w(c,n,e,r.UPDATE)}));case s.TIME:return u("kup-time-picker",Object.assign({initialValue:t.value},t.data,{class:O(n)?"kup-full-width":"","onkup-timepicker-change":c=>w(c,n,e,r.UPDATE),"onkup-timepicker-input":c=>w(c,n,e,r.INPUT)}));case s.NUMBER:c[l.C_RIGHT_ALIGNED]=!0;case s.STRING:return u(b,Object.assign({},t.data,{icon:t.icon?t.icon:a.icon?a.icon:null,fullWidth:!!O(n),inputType:e===s.NUMBER?"number":null,value:e===s.NUMBER?k(t.value).toString():t.value,onChange:c=>w(c,n,e,r.UPDATE),onInput:c=>w(c,n,e,r.INPUT),onIconClick:c=>w(c,n,e,r.ICON_CLICK)}))}}(z,H,j,_,n):j.data&&c.includes(z)?(n.setSizes&&function(e,c,t){switch(e){case s.BAR:c.sizeY||(c.sizeY="26px");break;case s.BUTTON:let e="";c.label&&(e="36px"),t.style?t.style.height||(t.style.minHeight=e):t.style={minHeight:e};break;case s.CHART:c.sizeX||(c.sizeX="100%"),c.sizeY||(c.sizeY="100%");break;case s.CHIP:case s.RADIO:t.style?t.style.height||(t.style.minHeight="40px"):t.style={minHeight:"40px"}}}(z,F,j),Y=n.renderKup?function(e,c,t,a,n,i,o){switch(e){case s.BAR:return t.data?u("div",{style:{height:t.sizeY,width:"100%"}},u(d,Object.assign({},t))):u("kup-image",Object.assign({},t));case s.BUTTON:return g(o)&&(c[l.C_CENTERED]=!0),u("kup-button",Object.assign({},t,{"onkup-button-click":c=>w(c,o,e,r.CLICK)}));case s.BUTTON_LIST:return g(o)&&(c[l.C_CENTERED]=!0),t["data-storage"]={cell:a,row:n,column:i},u("kup-button-list",Object.assign({},t));case s.CHART:return g(o)&&(c[l.C_CENTERED]=!0),u("kup-chart",Object.assign({},t));case s.CHIP:return u(h,Object.assign({},t));case s.COLOR_PICKER:return u("kup-color-picker",Object.assign({},t,{class:O(o)?"kup-full-width":"",disabled:!0}));case s.GAUGE:return u("kup-gauge",Object.assign({value:k(a.value),"width-component":"280px"},t));case s.KNOB:case s.PROGRESS_BAR:return u("kup-progress-bar",Object.assign({},t));case s.RADIO:return g(o)&&(c[l.C_CENTERED]=!0),t.disabled=n.readOnly,u("kup-radio",Object.assign({},t));case s.RATING:return u("kup-rating",Object.assign({},t,{disabled:!0}))}}(z,H,F,j,v,_,n):u("span",{class:"cell-"+z+" placeholder"})):(n.setSizes&&function(e,c,t,n){switch(e){case s.CHECKBOX:case s.ICON:c.sizeX||(c.sizeX="18px"),c.sizeY||(c.sizeY="18px"),t.style?t.style.height||(t.style.minHeight=c.sizeY):t.style={minHeight:c.sizeY};break;case s.IMAGE:n.component.rootElement.tagName===a.BOX?(c.sizeY||(c.sizeY="auto"),void 0===c.fit&&(c.fit=!0)):c.sizeX||(c.sizeX="auto"),c.sizeY||(c.sizeY="64px")}}(z,F,j,n),Y=function(e,c,t,a,n,i,r){switch(e){case s.AUTOCOMPLETE:case s.COMBOBOX:case s.DATE:case s.DATETIME:case s.TIME:if(t&&""!=t){const e=o(i,n);return u("div",{class:"f-cell__text"},e)}return t;case s.CHECKBOX:return g(r)&&(a[l.C_CENTERED]=!0),u(d,{resource:c.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case s.EDITOR:return u("div",{innerHTML:n.value});case s.ICON:case s.IMAGE:return g(r)&&(a[l.C_CENTERED]=!0),c.badgeData&&(a[l.C_PADDED]=!0),u(d,Object.assign({},c));case s.LINK:return u("a",{href:t,target:"_blank"},n.value);case s.NUMBER:if(t&&""!=t){const e=k(n.value),c=o(i,n);return e<0&&(a[l.TEXT_DANGER]=!0),g(r)&&(a[l.C_RIGHT_ALIGNED]=!0),u("div",{class:"f-cell__text"},c)}return u("div",{class:"f-cell__text"},t);case s.SWITCH:return g(r)&&(a[l.C_CENTERED]=!0),c.disabled=!0,u(f,Object.assign({},c));default:return u("div",{class:"f-cell__text"},t)}}(z,F,Y,H,j,_,n));let I=null;!y&&(_.icon||j.icon)&&Y&&(I=u(d,Object.assign({},{color:`rgba(var(${t.TEXT}-rgb), 0.375)`,resource:j.icon?j.icon:_.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let T=null;m.ketchup.debug.isDebug()&&$?T=j.obj.t+"; "+j.obj.p+"; "+j.obj.k+";":null!=j.title&&""!=j.title.trim()&&(T=j.title);let X=null;if(j.info){const e=Object.assign({},j.info);e.color||(e.color=`var(${t.INFO})`),e.icon||(e.icon="info"),X=u(d,Object.assign({},{color:e.color,resource:e.icon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return u("div",{class:H,"kup-get-cell-props":()=>n,style:j.style},u("div",{class:"f-cell__content",style:j.styleContent,title:T},i&&i.length>0?i:[n.indents,X,I,Y]))};function w(e,c,t,a){const n=c.cell,l=c.column,i=c.component,u=c.row;let p="INPUT"===e.target.tagName?e.target.value:e.detail.value;if(a===r.UPDATE){switch(t){case s.AUTOCOMPLETE:case s.COMBOBOX:case s.DATE:case s.TIME:n.data&&(n.data.initialValue=p);break;case s.CHECKBOX:case s.SWITCH:p="on"===p?"0":"1",n.data&&(n.data.checked="0"!==p)}n.obj&&(n.obj.k=p.toString()),n.value=p.toString(),n.displayedValue=null,n.displayedValue=o(l,n)}if(i&&i.rootElement){const c=new CustomEvent(a,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:i,id:i.rootElement.id,cell:n,column:l,event:e,row:u,type:t}});i.rootElement.dispatchEvent(c);try{i.refresh()}catch(e){}}}function g(e){return i.includes(e.component.rootElement.tagName)}function O(e){return n.includes(e.component.rootElement.tagName)}export{j as F,f as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,d as t}from"./p-
|
|
1
|
+
import{r as n,d as t}from"./p-704e60eb.js";const u=document.documentElement;var r;function i(n){if(n)for(let t=0;t<n.length;t++)n[t].id=t.toString()}function e(n){const t={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==n&&(t.second="2-digit"),new Intl.DateTimeFormat(u.ketchup.dates.getLocale()+"-u-hc-h23",t).formatToParts(new Date).map((n=>{switch(n.type){case"hour":return"HH";case"minute":return"mm";case"second":return"ss";default:return n.value}})).join("")}function c(n,t){return null!=n&&""!=n.trim()&&!!o(h(n,t))}function o(n){return!isNaN(n)}function s(n){return n&&null!=n&&""!=n.trim()||(n="0"),u.ketchup.math.numberify(n)}function a(n){let t="";return"P"==(n=n.toUpperCase())?t=" %":"VE"==n?t=" €":"VL"==n?t=" £":"VV"==n&&(t=" $"),t}function f(n,t,r){if(null==n||isNaN(n))return"";let i=function(n,t){return null==n?"":I(n,t,u.ketchup.dates.getLocale(),!0)}(n,t);return i+=a(r),i}function l(n,t,u){return f(s(n),t,u)}function h(n,t){return d(n,t,m(u.ketchup.dates.getLocale()))}function g(n,t){return d(n,t,".")}function d(n,t,r){if(null==n||""==n.trim())return"";let i=n,e=a(t);""!=e&&(n=n.replace(e,""));let c=null;return c="."==r?/,/g:/\./g,n=n.replace(c,""),"."!=r&&(n=n.replace(/,/g,".")),null==u.ketchup.math.numberify(n)||isNaN(u.ketchup.math.numberify(n))?i:I(s(n),-1,"en-US",!1)}function m(n){return function(n){return Intl.NumberFormat(n).formatToParts(1000.1).find((n=>"decimal"===n.type)).value}(n)}function I(n,t,u,r){return null==n&&(n=0),null!=t&&-1!=t||(t=function(n){if(Math.floor(n)===n)return 0;let t=n.toString().split(".")[1];return t&&t.length?t.length:0}(n)),Number(n).toLocaleString(u,t>-1?{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:r}:{useGrouping:r})}function w(n,t){const r={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==t&&(r.second="2-digit"),n.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r)}function N(n,t){let r=e(t);return u.ketchup.dates.isValid(n,r,!0)}function p(n){return D(n,t.ISO_DATE_TIME,!0)}function D(t,r,i){let c=e(i);return u.ketchup.dates.isValid(t,c)?u.ketchup.dates.format(u.ketchup.dates.normalize(t,n.TIME),r):""}function b(t,r,i){const e={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==r&&(e.second="2-digit"),function(n,t,r,i){if(null==i)return t.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r);switch(i){case"I13":case"I12":break;case"I11":case"I14":case"I1H":case"I1M":case"I21":case"I22":case"I23":case"I24":case"I2H":case"I2D":case"I2M":return n}return t.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r)}(t,u.ketchup.dates.toDate(u.ketchup.dates.normalize(t,n.TIME)),e,i)}function H(t){return u.ketchup.dates.toDate(u.ketchup.dates.normalize(t,n.TIMESTAMP)).toLocaleString(u.ketchup.dates.getLocale()+"-u-hc-h23",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function V(n,t){if(null==n)return"";const r=new Date;r.setDate(1),r.setMonth(n-1);const i={month:t};return new Intl.DateTimeFormat(u.ketchup.dates.getLocale(),i).format(r)}function j(n){null!=n&&""!=n.trim()||(n=r.LONG);for(var t=[],u=0;u<12;u++)t[u]=V(u+1,n);return t}function M(n,t,u){let r={};if(u)r=t;else for(const u in t)Object.prototype.hasOwnProperty.call(t,u)&&(r[u]=n[u]);return r}function k(n,t,u){for(const r in u)t[r]?n[r]=u[r]:n.rootElement[r]=u[r]}!function(n){n.NUMERIC="numeric",n.DIGIT2="2-digit",n.LONG="long",n.SHORT="short",n.NARROW="narrow"}(r||(r={}));export{r as D,j as a,N as b,w as c,b as d,H as e,D as f,M as g,s as h,i,p as j,c as k,h as l,g as m,f as n,o,m as p,k as s,l as u}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as c}from"./p-
|
|
1
|
+
import{h as c}from"./p-d3b542b3.js";import{F as i}from"./p-70660fe2.js";import{K as e,h as s,b as n}from"./p-704e60eb.js";var p;!function(c){c.CHOICE="choice",c.FILTER="filter",c.INPUT="input",c.STANDARD="standard"}(p||(p={}));const l=document.documentElement,a=a=>{a.type||(a.type=p.STANDARD);const r=a.type.toLowerCase()===p.CHOICE,t=a.type.toLowerCase()===p.FILTER,o=a.type.toLowerCase()===p.INPUT,d={"chip-set":!0,"chip-set--choice":!!r,"chip-set--filter":!!t,"chip-set--input":!!o};return c("div",Object.assign({class:`f-chip ${a.danger?"kup-danger":""} ${a.info?"kup-info":""} ${a.secondary?"kup-secondary":""} ${a.success?"kup-success":""} ${a.warning?"kup-warning":""} ${a.wrapperClass?a.wrapperClass:""}`},a.dataSet,{id:a.id,title:a.title}),c("div",{class:d,role:"grid"},function(p,a,r,t){const o=[];for(let u=0;p.data&&u<p.data.length;u++){const _=[];function d(n,a){const r=!!(n.children&&n.children.length>0),t=!(!r||!n.isExpanded),o={"--kup_chip_indent_offset":a.toString()};if(_.push(c("div",{class:"chip-set__wrapper "+(r&&!t?"chip-set__wrapper--hidden-children":"")},c("div",{class:"chip-set__indent",style:o}),r?c(i,{onClick:p.onExpansionClick&&p.onExpansionClick[u]?p.onExpansionClick[u].bind(p.onExpansionClick[u],n):null,resource:`${e.DROPDOWN}`,sizeX:"18px",sizeY:"18px",title:l.ketchup.language.translate(s.EXPAND)+"/"+l.ketchup.language.translate(s.COLLAPSE)+" (CTRL + Click)",wrapperClass:"dropdown-icon"}):a?c(i,{resource:"blank",sizeX:"18px",sizeY:"18px",wrapperClass:"dropdown-icon"}):null,h(n))),t)for(let c=0;c<n.children.length;c++)n.children[c]&&d(n.children[c],a+1)}function h(s){let l="chip "+(s.icon&&!s.value?"chip--only-icon":""),o=[],d="chip__icon chip__icon--leading";return(r||a)&&s.checked&&(l+=" chip--selected",r&&(d+=" chip__icon--leading-hidden")),s.icon&&o.push(c(i,Object.assign({},{color:a&&s.checked?`var(${n.PRIMARY})`:`var(${n.TEXT})`,resource:s.icon,sizeX:"18px",sizeY:"18px",wrapperClass:d}))),r&&o.push(c("span",{class:"chip__checkmark"},c("svg",{class:"chip__checkmark-svg",viewBox:"-2 -3 30 30"},c("path",{class:"chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})))),c("div",{class:l,"data-value":s.id,onClick:p.onClick&&p.onClick[u]?p.onClick[u].bind(p.onClick[u],s):null,role:"row",title:s.title?s.title:""},c("span",{class:"chip-set__indent"}),o,c("span",{role:"gridcell"},c("span",{role:"button",tabindex:u,class:"chip__primary-action",value:s.id,checked:s.checked,onBlur:p.onBlur&&p.onBlur[u]?p.onBlur[u].bind(p.onBlur[u],s):null,onFocus:p.onFocus&&p.onFocus[u]?p.onFocus[u].bind(p.onFocus[u],s):null},c("span",{class:"chip__text"},s.value))),t?c("span",{role:"gridcell"},c("span",{tabindex:"-1",class:`kup-icon chip__icon ${e.CLEAR.replace("--","")}`,onClick:p.onIconClick&&p.onIconClick[u]?p.onIconClick[u].bind(p.onIconClick[u],s):null})):null)}d(p.data[u],0),o.push(c("div",{class:"chip-set__item"},..._))}return o}(a,r,t,o)))};export{p as F,a}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,f as i,h as o,H as s,g as r}from"./p-d3b542b3.js";import{k as h}from"./p-704e60eb.js";import{g as a,s as n}from"./p-d95c904b.js";import{c as p}from"./p-97e8ea42.js";var l;!function(t){t.customStyle="Custom style of the component.",t.placeholderAttrs="Html attributes of the picture before the component enters the viewport.",t.resourceAttrs="Html attributes of the picture after the component enters the viewport."}(l||(l={}));var c,f,d,m,u,w=function(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)},b=function(t,e,i,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,i):s?s.value=i:e.set(t,i),i};const k=class{constructor(i){t(this,i),this.kupPhotoFramePlaceholderLoad=e(this,"kup-photoframe-placeholderload",6),this.kupPhotoFrameResourceLoad=e(this,"kup-photoframe-resourceload",6),this.isInViewport=!1,this.customStyle="",this.placeholderAttrs={},this.resourceAttrs={},this.threshold=.25,c.set(this,null),f.set(this,h()),d.set(this,null),m.set(this,!1),u.set(this,null)}async getProps(t){return a(this,l,t)}async refresh(){i(this)}async setProps(t){n(this,l,t)}setObserver(){b(this,c,new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.isInViewport=!0,w(this,c,"f").unobserve(this.rootElement))}))}),{threshold:this.threshold}),"f")}componentWillLoad(){w(this,f,"f").debug.logLoad(this,!1),w(this,f,"f").theme.register(this),this.setObserver()}componentDidLoad(){w(this,f,"f").debug.logLoad(this,!0)}componentWillRender(){w(this,f,"f").debug.logRender(this,!1)}componentDidRender(){w(this,f,"f").debug.logRender(this,!0)}render(){return this.isInViewport&&!w(this,m,"f")&&b(this,m,!0,"f"),o(s,null,o("style",null,w(this,f,"f").theme.setKupStyle(this.rootElement)),o("div",{id:p,ref:t=>{b(this,u,t,"f")}},o("img",Object.assign({},this.placeholderAttrs,{class:"placeholder",ref:t=>b(this,d,t,"f"),onLoad:()=>{w(this,d,"f").naturalWidth>w(this,d,"f").naturalHeight?w(this,u,"f").classList.add("horizontal"):w(this,u,"f").classList.add("vertical"),w(this,c,"f").observe(this.rootElement),w(this,d,"f").classList.add("placeholder--loaded"),this.kupPhotoFramePlaceholderLoad.emit({comp:this,id:this.rootElement.id})}})),w(this,m,"f")?o("img",Object.assign({},this.resourceAttrs,{class:"resource",onLoad:()=>{w(this,d,"f").classList.add("placeholder--fade-out"),this.kupPhotoFrameResourceLoad.emit({comp:this,id:this.rootElement.id})}})):null))}disconnectedCallback(){w(this,f,"f").theme.unregister(this),w(this,c,"f").unobserve(this.rootElement)}get rootElement(){return r(this)}};c=new WeakMap,f=new WeakMap,d=new WeakMap,m=new WeakMap,u=new WeakMap,k.style=":host{--kup_photoframe_border:var(\n --kup-photoframe-border,\n 1px inset var(--kup-border-color)\n );--kup_photoframe_fade_out_time:var(--kup-photoframe-fade-out-time, 2000ms);border:var(--kup_photoframe_border);display:block;height:100%;position:relative;width:100%}#kup-component{position:relative;height:100%;width:100%}img{max-height:100%;max-width:100%}.horizontal img{width:100%}.vertical img{height:100%}.placeholder{display:none;transition:opacity var(--kup_photoframe_fade_out_time) ease-out;will-change:opacity}.placeholder--loaded{display:block}.placeholder--fade-out{left:0;opacity:0;position:absolute;top:0}.resource{display:block}:host(.kup-fit) img{height:100%;object-fit:cover;width:100%}";export{k as kup_photo_frame}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as n}from"./p-d3b542b3.js";import{F as t}from"./p-6c77a36c.js";import{F as o}from"./p-70660fe2.js";const e=(e,u)=>{if(e.styling||(e.styling=t.RAISED),!e.label&&!e.icon)return;const i=!!(e.styling.toLowerCase()===t.ICON||e.styling.toLowerCase()===t.RAISED&&e.icon&&null==e.label);return n("div",Object.assign({class:`f-button ${e.danger?"kup-danger":""} ${e.fullHeight?"kup-full-height":""} ${e.fullWidth?"kup-full-width":""} ${e.info?"kup-info":""} ${e.large?"kup-large":""} ${e.pulsating?"kup-pulsating":""} ${e.shaped?"kup-shaped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),i?function(t){const e={color:t.disabled?"var(--kup_button_disabled_color)":"var(--kup_button_primary_color)",sizeX:t.large?"calc(1.75em * 1.5)":"1.75em",sizeY:t.large?"calc(1.75em * 1.5)":"1.75em"};return n("button",{class:{"icon-button":!0,"button--disabled":!!t.disabled,"icon-button--on":!(!t.toggable||!t.checked),toggable:!!t.toggable,"button--with-spinner":!(!t.showSpinner||t.disabled)},disabled:t.disabled,onClick:t.onClick,style:{"--kup_button_spinner_height":e.sizeY,"--kup_button_spinner_width":e.sizeX},type:"button",value:t.checked?"on":"off","aria-label":t.title},!t.showSpinner||t.disabled?n(o,Object.assign({},e,{resource:t.toggable&&!t.checked?t.iconOff?t.iconOff:t.icon+"_border":t.icon,wrapperClass:"icon-button__icon kup-icon"})):null,t.toggable&&!t.showSpinner?n(o,Object.assign({},e,{resource:t.icon,wrapperClass:"icon-button__icon icon-button__icon--on kup-icon"})):null,t.showSpinner&&!t.disabled?n("div",{class:"icon-button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e):function(e){const u=e.styling.toLowerCase()===t.FLAT,i=e.styling.toLowerCase()===t.FLOATING,s=e.styling.toLowerCase()===t.ICON,r=e.styling.toLowerCase()===t.OUTLINED,c=!(u||i||r||s),l={color:e.disabled?"var(--kup_button_disabled_color)":r||u?"var(--kup_button_primary_color)":"var(--kup_button_text_on_primary_color)",resource:e.icon,sizeX:i?"1.75em":"1.475em",sizeY:i?"1.75em":"1.475em",wrapperClass:"button__icon kup-icon"};e.showSpinner&&(l.wrapperClass+=" content--hidden");const a={button__label:!0,"content--hidden":!(!e.showSpinner||e.disabled)};return n("button",{class:{button:!0,"button--disabled":!!e.disabled,"button--floating":!!i,"button--outlined":!!r,"button--raised":!!c,"button--no-label":!e.label||" "===e.label,"button--with-spinner":!(!e.showSpinner||e.disabled)},disabled:e.disabled,onBlur:e.onBlur,onClick:e.onClick,onFocus:e.onFocus,style:{"--kup_button_spinner_height":l.sizeY},"aria-label":e.title,type:"button"},e.trailingIcon?[n("span",{class:a},e.label),e.icon?n(o,Object.assign({},l)):void 0]:[e.icon?n(o,Object.assign({},l)):void 0,n("span",{class:a},e.label)],e.showSpinner&&!e.disabled?n("div",{class:"button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e),u)};export{e as F}
|
|
@@ -3,6 +3,7 @@ import { GenericObject } from '../../types/GenericTypes';
|
|
|
3
3
|
import { KupAutocompleteEventPayload, KupAutocompleteIconClickEventPayload } from './kup-autocomplete-declarations';
|
|
4
4
|
import { ItemsDisplayMode, KupListEventPayload } from '../kup-list/kup-list-declarations';
|
|
5
5
|
export declare class KupAutocomplete {
|
|
6
|
+
#private;
|
|
6
7
|
/**
|
|
7
8
|
* References the root HTML element of the component (<kup-autocomplete>).
|
|
8
9
|
*/
|
|
@@ -65,17 +66,6 @@ export declare class KupAutocomplete {
|
|
|
65
66
|
* @default true
|
|
66
67
|
*/
|
|
67
68
|
showDropDownIcon: boolean;
|
|
68
|
-
private doConsistencyCheck;
|
|
69
|
-
private elStyle;
|
|
70
|
-
private listEl;
|
|
71
|
-
/**
|
|
72
|
-
* Instance of the KupManager class.
|
|
73
|
-
*/
|
|
74
|
-
private kupManager;
|
|
75
|
-
private textfieldWrapper;
|
|
76
|
-
private textfieldEl;
|
|
77
|
-
private clickCb;
|
|
78
|
-
private inputTimeout;
|
|
79
69
|
kupBlur: EventEmitter<KupAutocompleteEventPayload>;
|
|
80
70
|
kupChange: EventEmitter<KupAutocompleteEventPayload>;
|
|
81
71
|
kupClick: EventEmitter<KupAutocompleteEventPayload>;
|
|
@@ -120,11 +110,6 @@ export declare class KupAutocomplete {
|
|
|
120
110
|
* @param {string} value - Value of the component.
|
|
121
111
|
*/
|
|
122
112
|
setValue(value: string): Promise<void>;
|
|
123
|
-
private openList;
|
|
124
|
-
private closeList;
|
|
125
|
-
private isListOpened;
|
|
126
|
-
private consistencyCheck;
|
|
127
|
-
private prepList;
|
|
128
113
|
componentWillLoad(): void;
|
|
129
114
|
componentDidLoad(): void;
|
|
130
115
|
componentWillRender(): void;
|
|
@@ -1,41 +1,31 @@
|
|
|
1
1
|
import { KupEventPayload } from '../../types/GenericTypes';
|
|
2
2
|
/**
|
|
3
|
-
* Props of the kup-
|
|
3
|
+
* Props of the kup-dashboard component.
|
|
4
4
|
* Used to export every prop in an object.
|
|
5
5
|
*/
|
|
6
|
-
export declare enum
|
|
6
|
+
export declare enum KupDashboardProps {
|
|
7
7
|
customStyle = "Custom style of the component.",
|
|
8
|
-
data = "The data of the component."
|
|
8
|
+
data = "The data of the component.",
|
|
9
|
+
enableDesign = "When set to true, the component is in design mode and it is draggable."
|
|
9
10
|
}
|
|
10
|
-
export interface
|
|
11
|
+
export interface KupDashboardEventPayload extends KupEventPayload {
|
|
11
12
|
data: KupForm;
|
|
12
13
|
}
|
|
13
|
-
export
|
|
14
|
-
Components = "1",
|
|
15
|
-
Sections = "2"
|
|
16
|
-
}
|
|
17
|
-
export declare enum KupFormEditorLabels {
|
|
18
|
-
Loaded = "Loaded",
|
|
19
|
-
Reset = "Reset",
|
|
20
|
-
Save = "Save",
|
|
21
|
-
Components = "Components",
|
|
22
|
-
Sections = "Sections",
|
|
23
|
-
Column = "Column"
|
|
14
|
+
export interface KupDataDashboard extends KupForm {
|
|
24
15
|
}
|
|
25
16
|
/**
|
|
26
17
|
* Extend html element properties for Form Editor
|
|
27
18
|
*/
|
|
28
|
-
export interface
|
|
29
|
-
kupData:
|
|
19
|
+
export interface KupDashboardElement extends HTMLDivElement {
|
|
20
|
+
kupData: KupDashboardData;
|
|
30
21
|
}
|
|
31
22
|
/**
|
|
32
23
|
* Additional kupData for html element.
|
|
33
24
|
*/
|
|
34
|
-
export interface
|
|
25
|
+
export interface KupDashboardData {
|
|
35
26
|
parent?: KupForm | KupSection;
|
|
36
27
|
form?: KupForm;
|
|
37
28
|
section?: KupSection;
|
|
38
|
-
componnent?: KupComponent;
|
|
39
29
|
}
|
|
40
30
|
export interface KupVariableEntity {
|
|
41
31
|
name: string;
|
|
@@ -64,15 +54,7 @@ export interface KupForm extends KupComponentEntity {
|
|
|
64
54
|
layout: string;
|
|
65
55
|
sections: KupSection[];
|
|
66
56
|
}
|
|
67
|
-
export interface KupWidget extends KupComponentEntity {
|
|
68
|
-
config?: any;
|
|
69
|
-
data?: any;
|
|
70
|
-
dynamisms?: KupDynamismEntity[];
|
|
71
|
-
options?: any;
|
|
72
|
-
}
|
|
73
|
-
export declare type KupComponent = KupForm | KupWidget;
|
|
74
57
|
export interface KupSection extends KupEntity {
|
|
75
|
-
components?: KupComponent[];
|
|
76
58
|
dim?: string;
|
|
77
59
|
layout?: string;
|
|
78
60
|
sections?: KupSection[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { GenericObject } from '../../types/GenericTypes';
|
|
3
|
-
import { KupForm,
|
|
4
|
-
export declare class
|
|
3
|
+
import { KupForm, KupDashboardElement, KupDashboardEventPayload, KupSection, KupDataDashboard } from './kup-dashboard-declarations';
|
|
4
|
+
export declare class KupDashboard {
|
|
5
5
|
/**
|
|
6
6
|
* References the root HTML element of the component (<kup-text-field>).
|
|
7
7
|
*/
|
|
@@ -18,17 +18,18 @@ export declare class KupFormEditor {
|
|
|
18
18
|
customStyle: string;
|
|
19
19
|
/**
|
|
20
20
|
* The data of the component.
|
|
21
|
+
* @default null
|
|
22
|
+
*/
|
|
23
|
+
data: KupDataDashboard;
|
|
24
|
+
/**
|
|
25
|
+
* Enable drag & drop of the section.
|
|
21
26
|
* @default false
|
|
22
27
|
*/
|
|
23
|
-
|
|
28
|
+
enableDesign: boolean;
|
|
24
29
|
/**
|
|
25
30
|
* Instance of the KupManager class.
|
|
26
31
|
*/
|
|
27
32
|
private kupManager;
|
|
28
|
-
/**
|
|
29
|
-
* Draggable type of Form (Components or Sections).
|
|
30
|
-
*/
|
|
31
|
-
private dragType;
|
|
32
33
|
/**
|
|
33
34
|
* Internal data of the component.
|
|
34
35
|
*/
|
|
@@ -37,7 +38,7 @@ export declare class KupFormEditor {
|
|
|
37
38
|
* Internal data backup of the component for refresh when changed content by drag&drop.
|
|
38
39
|
*/
|
|
39
40
|
private internalDataBackup;
|
|
40
|
-
kupSave: EventEmitter<
|
|
41
|
+
kupSave: EventEmitter<KupDashboardEventPayload>;
|
|
41
42
|
onKupSave(): void;
|
|
42
43
|
dataChanged(): void;
|
|
43
44
|
/**
|
|
@@ -55,12 +56,14 @@ export declare class KupFormEditor {
|
|
|
55
56
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
56
57
|
*/
|
|
57
58
|
setProps(props: GenericObject): Promise<void>;
|
|
59
|
+
buildGuid(): string;
|
|
58
60
|
buildHeader(): any;
|
|
59
61
|
buildForm(form: KupForm, parent: KupForm | KupSection): any;
|
|
60
62
|
buildSectionHeader(section: KupSection, parent: KupForm | KupSection): any;
|
|
61
63
|
buildSection(section: KupSection, parent: KupForm | KupSection): any;
|
|
62
64
|
didRenderInteractables(): void;
|
|
63
|
-
dropped(parent:
|
|
65
|
+
dropped(parent: KupDashboardElement, child: KupDashboardElement): void;
|
|
66
|
+
getGridStyle(entity: KupForm | KupSection): {};
|
|
64
67
|
resetData(form?: KupForm): void;
|
|
65
68
|
unregisterInteractables(): void;
|
|
66
69
|
componentWillLoad(): void;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { FCellShapes } from '../../f-components/f-cell/f-cell-declarations';
|
|
2
|
+
import { KupDataColumn, KupDataRow } from '../../managers/kup-data/kup-data-declarations';
|
|
3
|
+
/**
|
|
4
|
+
* Props of the kup-form component.
|
|
5
|
+
* Used to export every prop in an object.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum KupFormProps {
|
|
8
|
+
customStyle = "Custom style of the component.",
|
|
9
|
+
data = "Actual data of the form.",
|
|
10
|
+
layout = "How the form will arrange its content."
|
|
11
|
+
}
|
|
12
|
+
export interface KupFormData {
|
|
13
|
+
columns?: KupDataColumn[];
|
|
14
|
+
rows?: KupFormRow[];
|
|
15
|
+
}
|
|
16
|
+
export interface KupFormRow extends KupDataRow {
|
|
17
|
+
layout?: KupFormLayout;
|
|
18
|
+
}
|
|
19
|
+
export interface KupFormLayout {
|
|
20
|
+
horizontal?: boolean;
|
|
21
|
+
sections?: KupFormSection[];
|
|
22
|
+
}
|
|
23
|
+
export interface KupFormSection {
|
|
24
|
+
id?: string;
|
|
25
|
+
horizontal?: boolean;
|
|
26
|
+
dim?: string;
|
|
27
|
+
sections?: KupFormSection[];
|
|
28
|
+
content?: KupFormField[];
|
|
29
|
+
style?: {
|
|
30
|
+
[index: string]: string;
|
|
31
|
+
};
|
|
32
|
+
columns?: number;
|
|
33
|
+
title?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface KupFormField {
|
|
36
|
+
column?: string;
|
|
37
|
+
value?: string;
|
|
38
|
+
shape?: FCellShapes;
|
|
39
|
+
config?: any;
|
|
40
|
+
}
|
|
41
|
+
export declare enum KupFormLabelPlacement {
|
|
42
|
+
BOTTOM = "bottom",
|
|
43
|
+
LEFT = "left",
|
|
44
|
+
HIDDEN = "hidden",
|
|
45
|
+
PLACEHOLDER = "placeholder",
|
|
46
|
+
RIGHT = "right",
|
|
47
|
+
TOP = "top"
|
|
48
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { KupFormLayout, KupFormData, KupFormLabelPlacement } from './kup-form-declarations';
|
|
2
|
+
import { GenericObject } from '../../types/GenericTypes';
|
|
3
|
+
export declare class KupForm {
|
|
4
|
+
/**
|
|
5
|
+
* References the root HTML element of the component (<kup-form>).
|
|
6
|
+
*/
|
|
7
|
+
rootElement: HTMLElement;
|
|
8
|
+
/**
|
|
9
|
+
* Custom style of the component.
|
|
10
|
+
* @default ""
|
|
11
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
12
|
+
*/
|
|
13
|
+
customStyle: string;
|
|
14
|
+
/**
|
|
15
|
+
* Actual data of the form.
|
|
16
|
+
* @default null
|
|
17
|
+
*/
|
|
18
|
+
data: KupFormData;
|
|
19
|
+
/**
|
|
20
|
+
* Placement of fields' labels.
|
|
21
|
+
* @default KupFormLabelPlacement.LEFT
|
|
22
|
+
*/
|
|
23
|
+
labelPlacement: KupFormLabelPlacement;
|
|
24
|
+
/**
|
|
25
|
+
* How the form will arrange its content.
|
|
26
|
+
* @default null
|
|
27
|
+
*/
|
|
28
|
+
layout: KupFormLayout;
|
|
29
|
+
private kupManager;
|
|
30
|
+
private formLayout;
|
|
31
|
+
private visibleColumns;
|
|
32
|
+
onDataChanged(): void;
|
|
33
|
+
onLayoutChanged(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Used to retrieve component's props values.
|
|
36
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
37
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
38
|
+
*/
|
|
39
|
+
getProps(descriptions?: boolean): Promise<GenericObject>;
|
|
40
|
+
/**
|
|
41
|
+
* This method is used to trigger a new render of the component.
|
|
42
|
+
*/
|
|
43
|
+
refresh(): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Sets the focus on an editable table cell.
|
|
46
|
+
* @param {string} column - Name of the column.
|
|
47
|
+
* @param {string} rowId - Id of the row.
|
|
48
|
+
*/
|
|
49
|
+
setFocus(column: string, rowId: string): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Sets the props to the component.
|
|
52
|
+
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
53
|
+
*/
|
|
54
|
+
setProps(props: GenericObject): Promise<void>;
|
|
55
|
+
private getColumns;
|
|
56
|
+
private initVisibleColumns;
|
|
57
|
+
private getRows;
|
|
58
|
+
private checkLayout;
|
|
59
|
+
private renderRow;
|
|
60
|
+
private renderSection;
|
|
61
|
+
private renderFormField;
|
|
62
|
+
componentWillLoad(): void;
|
|
63
|
+
componentDidLoad(): void;
|
|
64
|
+
componentWillRender(): void;
|
|
65
|
+
componentDidRender(): void;
|
|
66
|
+
render(): any;
|
|
67
|
+
disconnectedCallback(): void;
|
|
68
|
+
}
|
|
@@ -17,7 +17,10 @@ export declare enum KupTextFieldProps {
|
|
|
17
17
|
isClearable = "Enables a clear trailing icon.",
|
|
18
18
|
label = "When set, its content will be shown as a label.",
|
|
19
19
|
leadingLabel = "When set to true, the label will be on the left of the component.",
|
|
20
|
+
max = "The HTML max attribute specifies the maximum value for the input element. Works with the following input types: number, range, date, datetime-local, month, time and week.",
|
|
20
21
|
maxLength = "When set, the helper will display a character counter.",
|
|
22
|
+
min = "The HTML min attribute specifies the minimum value for the input element. Works with the following input types: number, range, date, datetime-local, month, time and week.",
|
|
23
|
+
name = "The HTML name attribute used for form autocomplete.",
|
|
21
24
|
outlined = "When set to true, the component will be rendered as an outlined field.",
|
|
22
25
|
readOnly = "Sets the component to read only state, making it not editable, but interactable. Used in combobox component when it behaves as a select.",
|
|
23
26
|
step = "The HTML step of the input element. It has effect only with number input type.",
|
|
@@ -94,6 +94,11 @@ export declare class KupTextField {
|
|
|
94
94
|
* @default null
|
|
95
95
|
*/
|
|
96
96
|
min: number;
|
|
97
|
+
/**
|
|
98
|
+
* The HTML name attribute used for form autocomplete.
|
|
99
|
+
* @default null
|
|
100
|
+
*/
|
|
101
|
+
name: string;
|
|
97
102
|
/**
|
|
98
103
|
* When set to true, the component will be rendered as an outlined field.
|
|
99
104
|
* @default false
|
|
@@ -47,12 +47,6 @@ export declare class KupTimePicker {
|
|
|
47
47
|
* Instance of the KupManager class.
|
|
48
48
|
*/
|
|
49
49
|
private kupManager;
|
|
50
|
-
private hoursEl;
|
|
51
|
-
private minutesEl;
|
|
52
|
-
private secondsEl;
|
|
53
|
-
private hoursCircleEl;
|
|
54
|
-
private minutesCircleEl;
|
|
55
|
-
private secondsCircleEl;
|
|
56
50
|
private hoursActive;
|
|
57
51
|
private minutesActive;
|
|
58
52
|
private secondsActive;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { KupDataCell, KupDataColumn, KupDataNode, KupDataRow } from '../../managers/kup-data/kup-data-declarations';
|
|
2
|
+
import type { PointerEvent } from '@interactjs/types/index';
|
|
2
3
|
import { GenericMap, KupEventPayload } from '../../types/GenericTypes';
|
|
3
4
|
import { KupCardEventPayload } from '../kup-card/kup-card-declarations';
|
|
4
5
|
/**
|
|
@@ -55,6 +56,7 @@ export interface KupTreeEventHandlerDetails {
|
|
|
55
56
|
cell: KupDataCell;
|
|
56
57
|
column: KupDataColumn;
|
|
57
58
|
filterRemove: HTMLSpanElement;
|
|
59
|
+
originalEvent: PointerEvent;
|
|
58
60
|
row: KupDataRow;
|
|
59
61
|
td: HTMLElement;
|
|
60
62
|
th: HTMLElement;
|