@sme.up/ketchup 5.2.1-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/CHANGELOG.md +5 -0
- package/dist/cjs/{cell-utils-d96b2993.js → cell-utils-d894e802.js} +2 -2
- package/dist/cjs/{component-d1496215.js → component-72a5b626.js} +30 -0
- package/dist/cjs/{f-button-2b9b99b1.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-df59e1b0.js → f-chip-ef81bf51.js} +5 -4
- package/dist/cjs/{f-image-12bab3b5.js → f-image-0618c795.js} +2 -2
- package/dist/cjs/f-paginator-utils-c9dd5173.js +1898 -0
- package/dist/cjs/{f-text-field-e7c35b5b.js → f-text-field-7d31190f.js} +3 -3
- package/dist/cjs/{f-text-field-mdc-a67f5dfe.js → f-text-field-mdc-85997738.js} +23 -305
- 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 +5 -5
- package/dist/cjs/{kup-autocomplete_27.cjs.entry.js → kup-autocomplete_25.cjs.entry.js} +1833 -5745
- package/dist/cjs/{kup-echart.cjs.entry.js → kup-box_2.cjs.entry.js} +17113 -14788
- package/dist/cjs/kup-calendar.cjs.entry.js +42 -34
- 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-dashboard.cjs.entry.js +379 -0
- package/dist/cjs/kup-drawer.cjs.entry.js +12 -5
- 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 +229 -0
- 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-2fee8cf3.js +17021 -0
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
- 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 +6 -6
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-e99921c1.js → utils-8470184d.js} +1 -1
- package/dist/collection/assets/card.js +4 -5
- package/dist/collection/assets/dashboard.js +113 -0
- package/dist/collection/assets/data-table.js +15 -79
- package/dist/collection/assets/form.js +179 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/image-list.js +624 -0
- package/dist/collection/assets/index.js +16 -4
- package/dist/collection/assets/kupdata.js +0 -3
- package/dist/collection/assets/kuptooltip.js +53 -7
- package/dist/collection/assets/tree.js +0 -128
- package/dist/collection/collection-manifest.json +8 -6
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +136 -130
- package/dist/collection/components/kup-box/kup-box-declarations.js +0 -4
- package/dist/collection/components/kup-box/kup-box.js +20 -137
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +1 -1
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +1 -2
- package/dist/collection/components/kup-card/kup-card.css +26 -8
- package/dist/collection/components/kup-card/kup-card.js +1 -2
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +14 -6
- package/dist/collection/components/kup-combobox/kup-combobox.js +17 -14
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/kup-dashboard/kup-dashboard.css +81 -0
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +560 -0
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +1 -3
- package/dist/collection/components/kup-data-table/kup-data-table.js +19 -136
- package/dist/collection/components/kup-drawer/kup-drawer.css +6 -8
- package/dist/collection/components/kup-drawer/kup-drawer.js +8 -1
- 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-image-list/kup-image-list-declarations.js +10 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +166 -0
- package/dist/collection/components/kup-image-list/kup-image-list.js +432 -0
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +2 -9
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +3 -5
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -0
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +18 -19
- 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 +2 -8
- package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -4
- package/dist/collection/components/kup-tree/kup-tree.css +10 -3
- package/dist/collection/components/kup-tree/kup-tree.js +73 -142
- 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 +41 -121
- package/dist/collection/f-components/f-chip/f-chip.js +2 -1
- package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +24 -0
- package/dist/collection/managers/kup-data/kup-data.js +98 -1
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +4 -2
- package/dist/collection/managers/kup-interact/kup-interact.js +1 -22
- package/dist/collection/managers/kup-language/kup-language-declarations.js +13 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +21 -2
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +21 -1
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +53 -20
- package/dist/collection/types/GenericTypes.js +3 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +7 -11
- package/dist/esm/{cell-utils-f4bdbbc8.js → cell-utils-7fc84d4e.js} +3 -3
- package/dist/esm/{component-c4eb6153.js → component-b1bedf1d.js} +27 -2
- package/dist/esm/{f-button-54a49fd8.js → f-button-2f6cc296.js} +4 -4
- package/dist/esm/f-cell-4428481c.js +415 -0
- package/dist/esm/f-checkbox-c51c4a75.js +27 -0
- package/dist/esm/{f-chip-a3035b4b.js → f-chip-b39eb49a.js} +6 -5
- package/dist/esm/{f-image-d32465e3.js → f-image-b08ebeb2.js} +2 -2
- package/dist/esm/f-paginator-utils-4fda6086.js +1884 -0
- package/dist/esm/{f-text-field-c25cc63f.js → f-text-field-184a5fb3.js} +3 -3
- package/dist/esm/{f-text-field-mdc-9fbbefc3.js → f-text-field-mdc-d42d3f9e.js} +2 -284
- 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 +6 -6
- package/dist/esm/{kup-autocomplete_27.entry.js → kup-autocomplete_25.entry.js} +1775 -5685
- package/dist/esm/{kup-echart.entry.js → kup-box_2.entry.js} +17113 -14789
- package/dist/esm/kup-calendar.entry.js +43 -35
- 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-dashboard.entry.js +375 -0
- package/dist/esm/kup-drawer.entry.js +12 -5
- 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 +225 -0
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/kup-manager-3325b2d8.js +17000 -0
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +6 -6
- package/dist/esm/kup-photo-frame.entry.js +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 +6 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{tslib.es6-8f2d44b6.js → tslib.es6-3eea2234.js} +1 -1
- package/dist/esm/{utils-f24319a0.js → utils-6373a07e.js} +2 -2
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-006bc4d0.entry.js +1 -0
- package/dist/ketchup/p-0741da57.js +1 -0
- package/dist/ketchup/{p-669bde31.js → p-13e08580.js} +1 -1
- package/dist/ketchup/p-153697fb.entry.js +1 -0
- package/dist/ketchup/{p-9a61d8dc.entry.js → p-175edb62.entry.js} +1 -1
- package/dist/ketchup/{p-11e72a8c.entry.js → p-1db1d42b.entry.js} +1 -1
- package/dist/ketchup/{p-67842f1e.entry.js → p-30820f8f.entry.js} +1 -1
- package/dist/ketchup/p-35325834.entry.js +9 -0
- package/dist/ketchup/p-359e8bec.entry.js +40 -0
- package/dist/ketchup/{p-09d708c4.entry.js → p-3c7c92c0.entry.js} +1 -1
- package/dist/ketchup/p-41cf8703.entry.js +1 -0
- package/dist/ketchup/{p-e6709c26.entry.js → p-6127fccf.entry.js} +1 -1
- package/dist/ketchup/{p-203d6295.entry.js → p-6b82e4e2.entry.js} +1 -1
- package/dist/ketchup/p-704e60eb.js +30 -0
- package/dist/ketchup/{p-4f56932b.js → p-70660fe2.js} +1 -1
- package/dist/ketchup/{p-44192f30.entry.js → p-762c0382.entry.js} +1 -1
- package/dist/ketchup/{p-c58a2a81.entry.js → p-76947316.entry.js} +1 -1
- package/dist/ketchup/{p-a0b1d769.js → p-79b0730b.js} +1 -1
- package/dist/ketchup/{p-bb8844bf.entry.js → p-8103b80a.entry.js} +1 -1
- package/dist/ketchup/{p-8c44c3b9.js → p-81605f08.js} +4 -5
- package/dist/ketchup/p-9fa457d4.entry.js +1 -0
- package/dist/ketchup/{p-e8e3c9da.entry.js → p-a0ce8075.entry.js} +1 -1
- package/dist/ketchup/p-a203f78b.js +45 -0
- package/dist/ketchup/p-a804fe83.entry.js +27 -0
- package/dist/ketchup/{p-34748c91.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-40f97429.js → p-d95c904b.js} +1 -1
- package/dist/ketchup/p-ddce3430.js +1 -0
- 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-box/kup-box-declarations.d.ts +3 -5
- package/dist/types/components/kup-box/kup-box.d.ts +0 -22
- package/dist/types/components/kup-dashboard/kup-dashboard-declarations.d.ts +61 -0
- package/dist/types/components/kup-dashboard/kup-dashboard.d.ts +75 -0
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +2 -4
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +1 -19
- 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-image-list/kup-image-list-declarations.d.ts +14 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +56 -0
- package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +3 -9
- package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +6 -6
- 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 +3 -5
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -24
- package/dist/types/components.d.ts +512 -369
- 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-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +7 -0
- package/dist/types/managers/kup-data/kup-data.d.ts +3 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +13 -1
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +4 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +12 -0
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +3 -3
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +17 -6
- package/dist/types/types/GenericTypes.d.ts +3 -0
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +1 -3
- package/package.json +15 -14
- package/dist/cjs/f-cell-8351cb84.js +0 -653
- package/dist/cjs/kup-manager-5c03da64.js +0 -8795
- package/dist/collection/assets/tooltip.js +0 -73
- package/dist/collection/components/kup-tooltip/kup-tooltip-declarations.js +0 -20
- package/dist/collection/components/kup-tooltip/kup-tooltip.css +0 -149
- package/dist/collection/components/kup-tooltip/kup-tooltip.js +0 -1205
- package/dist/collection/utils/helpers.js +0 -38
- package/dist/esm/f-cell-d5dac50b.js +0 -650
- package/dist/esm/kup-manager-9316a184.js +0 -8778
- package/dist/ketchup/p-12773ca8.js +0 -9
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-4173422f.entry.js +0 -1
- package/dist/ketchup/p-41741c28.entry.js +0 -1
- package/dist/ketchup/p-44f8da2a.js +0 -1
- package/dist/ketchup/p-7a74ad17.js +0 -1
- package/dist/ketchup/p-7ba8fa4a.entry.js +0 -39
- package/dist/ketchup/p-7de0d7e1.js +0 -1
- package/dist/ketchup/p-8418e8fa.entry.js +0 -1
- package/dist/ketchup/p-96bf19aa.entry.js +0 -1
- package/dist/ketchup/p-b0ddcce9.entry.js +0 -9
- package/dist/ketchup/p-b6c21223.entry.js +0 -27
- package/dist/ketchup/p-ca3d585b.entry.js +0 -1
- package/dist/ketchup/p-ecb7069b.js +0 -135
- package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +0 -93
- package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +0 -142
- package/dist/types/utils/helpers.d.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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{
|
|
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}
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -2,6 +2,7 @@ import { KupBadge } from '../kup-badge/kup-badge';
|
|
|
2
2
|
import { KupEventPayload } from '../../types/GenericTypes';
|
|
3
3
|
import { FCellShapes } from '../../f-components/f-cell/f-cell-declarations';
|
|
4
4
|
import { KupDataCell, KupDataColumn, KupDataRow, KupDataRowAction } from '../../managers/kup-data/kup-data-declarations';
|
|
5
|
+
import type { PointerEvent } from '@interactjs/types/index';
|
|
5
6
|
/**
|
|
6
7
|
* Props of the kup-box component.
|
|
7
8
|
* Used to export every prop in an object.
|
|
@@ -28,15 +29,11 @@ export declare enum KupBoxProps {
|
|
|
28
29
|
selectBox = "Automatically selects the box at the specified index.",
|
|
29
30
|
selectedRowsState = "Multiple selection.",
|
|
30
31
|
showSelection = "If enabled, highlights the selected box/boxes.",
|
|
31
|
-
showTooltipOnRightClick = "If set to true, displays tooltip on right click; if set to false, displays tooltip on mouseOver.",
|
|
32
32
|
sortBy = "If sorting is enabled, specifies which column to sort.",
|
|
33
33
|
sortEnabled = "Enable sorting.",
|
|
34
34
|
stateId = "",
|
|
35
35
|
store = "",
|
|
36
|
-
swipeDisabled = "Disable swipe."
|
|
37
|
-
tooltipDetailTimeout = "Defines the timeout for tooltip detail.",
|
|
38
|
-
tooltipEnabled = "Enable show tooltip.",
|
|
39
|
-
tooltipLoadTimeout = "Defines the timeout for tooltip load."
|
|
36
|
+
swipeDisabled = "Disable swipe."
|
|
40
37
|
}
|
|
41
38
|
export interface KupBoxData {
|
|
42
39
|
columns?: KupDataColumn[];
|
|
@@ -89,6 +86,7 @@ export interface KupBoxEventHandlerDetails {
|
|
|
89
86
|
boxObject: HTMLElement;
|
|
90
87
|
cell: KupDataCell;
|
|
91
88
|
column: KupDataColumn;
|
|
89
|
+
originalEvent: PointerEvent;
|
|
92
90
|
row: KupBoxRow;
|
|
93
91
|
}
|
|
94
92
|
export interface KupBoxClickEventPayload extends KupEventPayload {
|
|
@@ -132,11 +132,6 @@ export declare class KupBox {
|
|
|
132
132
|
* @default true
|
|
133
133
|
*/
|
|
134
134
|
showSelection: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* If set to true, displays tooltip on right click; if set to false, displays tooltip on mouseOver.
|
|
137
|
-
* @default true
|
|
138
|
-
*/
|
|
139
|
-
showTooltipOnRightClick: boolean;
|
|
140
135
|
/**
|
|
141
136
|
* If sorting is enabled, specifies which column to sort
|
|
142
137
|
* @default undefined
|
|
@@ -154,21 +149,6 @@ export declare class KupBox {
|
|
|
154
149
|
* @default false
|
|
155
150
|
*/
|
|
156
151
|
swipeDisabled: boolean;
|
|
157
|
-
/**
|
|
158
|
-
* Defines the timeout for tooltip detail
|
|
159
|
-
* @default undefined
|
|
160
|
-
*/
|
|
161
|
-
tooltipDetailTimeout: number;
|
|
162
|
-
/**
|
|
163
|
-
* Enable show tooltip
|
|
164
|
-
* @default true
|
|
165
|
-
*/
|
|
166
|
-
tooltipEnabled: boolean;
|
|
167
|
-
/**
|
|
168
|
-
* Defines the timeout for tooltip load
|
|
169
|
-
* @default undefined
|
|
170
|
-
*/
|
|
171
|
-
tooltipLoadTimeout: number;
|
|
172
152
|
/**
|
|
173
153
|
* Instance of the KupManager class.
|
|
174
154
|
*/
|
|
@@ -177,7 +157,6 @@ export declare class KupBox {
|
|
|
177
157
|
private visibleColumns;
|
|
178
158
|
private rows;
|
|
179
159
|
private filteredRows;
|
|
180
|
-
private tooltip;
|
|
181
160
|
private globalFilterTimeout;
|
|
182
161
|
private boxContainer;
|
|
183
162
|
private sectionRef;
|
|
@@ -280,7 +259,6 @@ export declare class KupBox {
|
|
|
280
259
|
[index: string]: string;
|
|
281
260
|
};
|
|
282
261
|
};
|
|
283
|
-
renderTooltip(): any;
|
|
284
262
|
didLoadInteractables(): void;
|
|
285
263
|
didRenderInteractables(): void;
|
|
286
264
|
componentWillLoad(): void;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { KupEventPayload } from '../../types/GenericTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Props of the kup-dashboard component.
|
|
4
|
+
* Used to export every prop in an object.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum KupDashboardProps {
|
|
7
|
+
customStyle = "Custom style 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."
|
|
10
|
+
}
|
|
11
|
+
export interface KupDashboardEventPayload extends KupEventPayload {
|
|
12
|
+
data: KupForm;
|
|
13
|
+
}
|
|
14
|
+
export interface KupDataDashboard extends KupForm {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Extend html element properties for Form Editor
|
|
18
|
+
*/
|
|
19
|
+
export interface KupDashboardElement extends HTMLDivElement {
|
|
20
|
+
kupData: KupDashboardData;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Additional kupData for html element.
|
|
24
|
+
*/
|
|
25
|
+
export interface KupDashboardData {
|
|
26
|
+
parent?: KupForm | KupSection;
|
|
27
|
+
form?: KupForm;
|
|
28
|
+
section?: KupSection;
|
|
29
|
+
}
|
|
30
|
+
export interface KupVariableEntity {
|
|
31
|
+
name: string;
|
|
32
|
+
type?: string;
|
|
33
|
+
value: string;
|
|
34
|
+
}
|
|
35
|
+
export interface KupDynamismEntity {
|
|
36
|
+
event: string;
|
|
37
|
+
exec?: string;
|
|
38
|
+
targets?: string[];
|
|
39
|
+
variables?: KupVariableEntity[];
|
|
40
|
+
}
|
|
41
|
+
export interface KupEntity {
|
|
42
|
+
id: string;
|
|
43
|
+
loaded: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface KupComponentEntity extends KupEntity {
|
|
46
|
+
fun: string;
|
|
47
|
+
evaluatedFun?: string;
|
|
48
|
+
title: string;
|
|
49
|
+
type: string;
|
|
50
|
+
variables?: KupVariableEntity[];
|
|
51
|
+
timer?: ReturnType<typeof setTimeout>;
|
|
52
|
+
}
|
|
53
|
+
export interface KupForm extends KupComponentEntity {
|
|
54
|
+
layout: string;
|
|
55
|
+
sections: KupSection[];
|
|
56
|
+
}
|
|
57
|
+
export interface KupSection extends KupEntity {
|
|
58
|
+
dim?: string;
|
|
59
|
+
layout?: string;
|
|
60
|
+
sections?: KupSection[];
|
|
61
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { GenericObject } from '../../types/GenericTypes';
|
|
3
|
+
import { KupForm, KupDashboardElement, KupDashboardEventPayload, KupSection, KupDataDashboard } from './kup-dashboard-declarations';
|
|
4
|
+
export declare class KupDashboard {
|
|
5
|
+
/**
|
|
6
|
+
* References the root HTML element of the component (<kup-text-field>).
|
|
7
|
+
*/
|
|
8
|
+
rootElement: HTMLElement;
|
|
9
|
+
/**
|
|
10
|
+
* Force render component by internal event.
|
|
11
|
+
*/
|
|
12
|
+
resetInternalData: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Custom style of the component.
|
|
15
|
+
* @default ""
|
|
16
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
17
|
+
*/
|
|
18
|
+
customStyle: string;
|
|
19
|
+
/**
|
|
20
|
+
* The data of the component.
|
|
21
|
+
* @default null
|
|
22
|
+
*/
|
|
23
|
+
data: KupDataDashboard;
|
|
24
|
+
/**
|
|
25
|
+
* Enable drag & drop of the section.
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
enableDesign: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Instance of the KupManager class.
|
|
31
|
+
*/
|
|
32
|
+
private kupManager;
|
|
33
|
+
/**
|
|
34
|
+
* Internal data of the component.
|
|
35
|
+
*/
|
|
36
|
+
private internalData;
|
|
37
|
+
/**
|
|
38
|
+
* Internal data backup of the component for refresh when changed content by drag&drop.
|
|
39
|
+
*/
|
|
40
|
+
private internalDataBackup;
|
|
41
|
+
kupSave: EventEmitter<KupDashboardEventPayload>;
|
|
42
|
+
onKupSave(): void;
|
|
43
|
+
dataChanged(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Used to retrieve component's props values.
|
|
46
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
47
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
48
|
+
*/
|
|
49
|
+
getProps(descriptions?: boolean): Promise<GenericObject>;
|
|
50
|
+
/**
|
|
51
|
+
* This method is used to trigger a new render of the component.
|
|
52
|
+
*/
|
|
53
|
+
refresh(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Sets the props to the component.
|
|
56
|
+
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
57
|
+
*/
|
|
58
|
+
setProps(props: GenericObject): Promise<void>;
|
|
59
|
+
buildGuid(): string;
|
|
60
|
+
buildHeader(): any;
|
|
61
|
+
buildForm(form: KupForm, parent: KupForm | KupSection): any;
|
|
62
|
+
buildSectionHeader(section: KupSection, parent: KupForm | KupSection): any;
|
|
63
|
+
buildSection(section: KupSection, parent: KupForm | KupSection): any;
|
|
64
|
+
didRenderInteractables(): void;
|
|
65
|
+
dropped(parent: KupDashboardElement, child: KupDashboardElement): void;
|
|
66
|
+
getGridStyle(entity: KupForm | KupSection): {};
|
|
67
|
+
resetData(form?: KupForm): void;
|
|
68
|
+
unregisterInteractables(): void;
|
|
69
|
+
componentWillLoad(): void;
|
|
70
|
+
componentDidLoad(): void;
|
|
71
|
+
componentWillRender(): void;
|
|
72
|
+
componentDidRender(): void;
|
|
73
|
+
render(): any;
|
|
74
|
+
disconnectedCallback(): void;
|
|
75
|
+
}
|
|
@@ -51,7 +51,6 @@ export declare enum KupDataTableProps {
|
|
|
51
51
|
showGroups = "When set to true enables the column grouping.",
|
|
52
52
|
showHeader = "Enables rendering of the table header.",
|
|
53
53
|
showLoadMore = "If set to true, displays the button to load more records.",
|
|
54
|
-
showTooltipOnRightClick = "If set to true, displays tooltip on right click; if set to false, displays tooltip on mouseOver.",
|
|
55
54
|
sort = "Defines the current sorting options.",
|
|
56
55
|
stateId = "",
|
|
57
56
|
store = "",
|
|
@@ -59,9 +58,8 @@ export declare enum KupDataTableProps {
|
|
|
59
58
|
sortEnabled = "When set to true enables the sorting of the columns by clicking on the column header.",
|
|
60
59
|
tableHeight = "Sets the height of the table.",
|
|
61
60
|
tableWidth = "Sets the width of the table.",
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
totals = "Defines the current totals options."
|
|
61
|
+
totals = "Defines the current totals options.",
|
|
62
|
+
transpose = "Transposes the data of the data table."
|
|
65
63
|
}
|
|
66
64
|
export interface KupDataTableDataset {
|
|
67
65
|
columns?: KupDataColumn[];
|
|
@@ -207,10 +207,6 @@ export declare class KupDataTable {
|
|
|
207
207
|
* If set to true, displays the button to load more records.
|
|
208
208
|
*/
|
|
209
209
|
showLoadMore: boolean;
|
|
210
|
-
/**
|
|
211
|
-
* If set to true, displays tooltip on right click; if set to false, displays tooltip on mouseOver.
|
|
212
|
-
*/
|
|
213
|
-
showTooltipOnRightClick: boolean;
|
|
214
210
|
/**
|
|
215
211
|
* Defines the current sorting options.
|
|
216
212
|
*/
|
|
@@ -232,18 +228,6 @@ export declare class KupDataTable {
|
|
|
232
228
|
* Sets the width of the table.
|
|
233
229
|
*/
|
|
234
230
|
tableWidth: string;
|
|
235
|
-
/**
|
|
236
|
-
* Defines the timeout for tooltip detail
|
|
237
|
-
*/
|
|
238
|
-
tooltipDetailTimeout: number;
|
|
239
|
-
/**
|
|
240
|
-
* Enable show tooltip
|
|
241
|
-
*/
|
|
242
|
-
tooltipEnabled: boolean;
|
|
243
|
-
/**
|
|
244
|
-
* Defines the timeout for tooltip load
|
|
245
|
-
*/
|
|
246
|
-
tooltipLoadTimeout: number;
|
|
247
231
|
/**
|
|
248
232
|
* Defines the current totals options
|
|
249
233
|
*/
|
|
@@ -273,6 +257,7 @@ export declare class KupDataTable {
|
|
|
273
257
|
recalculateRowsAndUndoSelections(): void;
|
|
274
258
|
controlFixedRowsColumns(): void;
|
|
275
259
|
recalculateData(): void;
|
|
260
|
+
private initialized;
|
|
276
261
|
private rows;
|
|
277
262
|
private rowsLength;
|
|
278
263
|
private paginatedRows;
|
|
@@ -291,7 +276,6 @@ export declare class KupDataTable {
|
|
|
291
276
|
*/
|
|
292
277
|
private theadRef;
|
|
293
278
|
private tableRef;
|
|
294
|
-
private tooltip;
|
|
295
279
|
/**
|
|
296
280
|
* contains the original data, used in transposed function
|
|
297
281
|
* @private
|
|
@@ -530,7 +514,6 @@ export declare class KupDataTable {
|
|
|
530
514
|
private onSelectAll;
|
|
531
515
|
private openTotalMenu;
|
|
532
516
|
private closeTotalMenu;
|
|
533
|
-
private closeMenuAndTooltip;
|
|
534
517
|
private isOpenedTotalMenuForColumn;
|
|
535
518
|
private groupRows;
|
|
536
519
|
getInternalState(): Promise<{
|
|
@@ -565,7 +548,6 @@ export declare class KupDataTable {
|
|
|
565
548
|
private composeHeaderCellClassAndStyle;
|
|
566
549
|
private renderHeader;
|
|
567
550
|
private renderStickyHeader;
|
|
568
|
-
renderTooltip(): any;
|
|
569
551
|
areTotalsSelected(column: KupDataColumn): boolean;
|
|
570
552
|
onTotalsChange(event: any, column: any): void;
|
|
571
553
|
private totalMenuPosition;
|
|
@@ -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
|
+
}
|