@sme.up/ketchup 5.2.0-SNAPSHOT → 5.2.0
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-5b16c180.js → cell-utils-153fb565.js} +2 -2
- package/dist/cjs/{f-button-3b9f32af.js → f-button-8f07d095.js} +2 -2
- package/dist/cjs/{f-cell-c6ad973a.js → f-cell-c08ad501.js} +8 -96
- package/dist/cjs/{f-chip-bed86c4a.js → f-chip-aa8d9253.js} +3 -3
- package/dist/cjs/{f-image-08a3d340.js → f-image-42025f08.js} +2 -2
- package/dist/cjs/f-text-field-b6300c8a.js +94 -0
- package/dist/cjs/f-text-field-mdc-a67f5dfe.js +2852 -0
- package/dist/cjs/{index-8d7bb3be.js → index-eb556444.js} +2 -0
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +455 -3068
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +8 -7
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +3 -3
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/kup-echart.cjs.entry.js +4 -4
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-form-editor.cjs.entry.js +404 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- 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-4227f0a2.js → kup-manager-04dc9671.js} +8391 -332
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
- package/dist/cjs/kup-photo-frame.cjs.entry.js +3 -3
- 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-b9df398c.js → utils-a201de8b.js} +1 -1
- package/dist/collection/assets/data-table.js +44 -0
- package/dist/collection/assets/form-editor.js +338 -0
- package/dist/collection/assets/index.js +12 -0
- package/dist/collection/assets/kuptooltip.js +608 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -0
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +1 -2
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
- package/dist/collection/components/kup-card/kup-card.css +35 -0
- package/dist/collection/components/kup-card/kup-card.js +2 -2
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +44 -12
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.css +1 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +23 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor.css +80 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor.js +561 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.css +50 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +895 -0
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -0
- package/dist/collection/components/kup-tree/kup-tree.css +10 -3
- package/dist/collection/components/kup-tree/kup-tree.js +75 -13
- package/dist/collection/managers/kup-debug/kup-debug.js +1 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +28 -1
- package/dist/collection/managers/kup-math/kup-math.js +11 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +3 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +191 -0
- package/dist/collection/types/GenericTypes.js +2 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/esm/{cell-utils-69f75e2e.js → cell-utils-55b4278f.js} +2 -2
- package/dist/esm/{f-button-7e7607d8.js → f-button-ea5059eb.js} +2 -2
- package/dist/esm/{f-cell-e4d83c27.js → f-cell-d767085a.js} +8 -95
- package/dist/esm/{f-chip-51dfefaf.js → f-chip-e99f71a0.js} +3 -3
- package/dist/esm/{f-image-de331954.js → f-image-7bea0647.js} +2 -2
- package/dist/esm/f-text-field-662a1d4b.js +92 -0
- package/dist/esm/f-text-field-mdc-9fbbefc3.js +2850 -0
- package/dist/esm/{index-aeec9835.js → index-baeab1ac.js} +2 -1
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +439 -3052
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +8 -7
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +3 -3
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/kup-echart.entry.js +4 -4
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-form-editor.entry.js +400 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-0ab94726.js → kup-manager-25d71df2.js} +8391 -332
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +419 -0
- package/dist/esm/kup-photo-frame.entry.js +3 -3
- 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/{utils-35c7a90d.js → utils-e4ea8310.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-67c64257.entry.js → p-04a941d9.entry.js} +1 -1
- package/dist/ketchup/{p-fea316ab.entry.js → p-12e5c8b7.entry.js} +1 -1
- package/dist/ketchup/{p-b5e1dbfa.entry.js → p-1e727a6c.entry.js} +1 -1
- package/dist/ketchup/{p-24df4f29.entry.js → p-2d322313.entry.js} +1 -1
- package/dist/ketchup/{p-8be1337b.js → p-34b74425.js} +1 -1
- package/dist/ketchup/p-38dbf4b3.entry.js +1 -0
- package/dist/ketchup/{p-5d190cf5.js → p-3b867a04.js} +1 -1
- package/dist/ketchup/{p-3813281b.entry.js → p-3e4a0ce7.entry.js} +1 -1
- package/dist/ketchup/{p-f9c41e20.entry.js → p-423f8dd0.entry.js} +1 -1
- package/dist/ketchup/p-44ffd4c9.js +30 -0
- package/dist/ketchup/{p-33073f4a.js → p-52aaf54a.js} +1 -1
- package/dist/ketchup/p-5969f1e8.entry.js +9 -0
- package/dist/ketchup/p-65c045fa.entry.js +1 -0
- package/dist/ketchup/{p-8f735633.entry.js → p-700b2d70.entry.js} +1 -1
- package/dist/ketchup/{p-68fc1428.entry.js → p-72ce09e3.entry.js} +1 -1
- package/dist/ketchup/p-76cffe8d.js +1 -0
- package/dist/ketchup/{p-96101f09.entry.js → p-787615f8.entry.js} +1 -1
- package/dist/ketchup/p-8bd00b7f.entry.js +1 -0
- package/dist/ketchup/p-937cd436.js +1 -0
- package/dist/ketchup/{p-3445be1e.entry.js → p-95754af8.entry.js} +1 -1
- package/dist/ketchup/{p-d7af8156.entry.js → p-9a3c41c2.entry.js} +1 -1
- package/dist/ketchup/p-a341d44c.entry.js +1 -0
- package/dist/ketchup/{p-9bcda66f.entry.js → p-af8dad7a.entry.js} +1 -1
- package/dist/ketchup/{p-0751aaf6.entry.js → p-dacd04a5.entry.js} +1 -1
- package/dist/ketchup/{p-10c8d755.js → p-dae6ef38.js} +1 -1
- package/dist/ketchup/{p-c314b1e6.js → p-e20d4661.js} +1 -1
- package/dist/ketchup/p-ecb7069b.js +135 -0
- package/dist/ketchup/{p-4081f5f7.entry.js → p-f4fbf6df.entry.js} +1 -1
- package/dist/ketchup/p-ffa8ad2d.js +1 -0
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -0
- package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +26 -1
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +2 -0
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +4 -0
- package/dist/types/components/kup-form-editor/kup-form-editor-declarations.d.ts +79 -0
- package/dist/types/components/kup-form-editor/kup-form-editor.d.ts +72 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -0
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +1 -1
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -1
- package/dist/types/components.d.ts +196 -1
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +12 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +14 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +2 -1
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +40 -0
- package/dist/types/types/GenericTypes.d.ts +2 -0
- package/package.json +4 -3
- package/CHANGELOG.md +0 -5
- package/dist/ketchup/p-2d4f19f4.js +0 -1
- package/dist/ketchup/p-3aab1f0d.entry.js +0 -1
- package/dist/ketchup/p-47b57d97.js +0 -1
- package/dist/ketchup/p-5186885c.entry.js +0 -1
- package/dist/ketchup/p-78223dc0.entry.js +0 -143
- package/dist/ketchup/p-ee33cbe9.js +0 -9
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
6
|
const tslib_es6 = require('./tslib.es6-0ee02c67.js');
|
|
7
|
-
const kupManager = require('./kup-manager-
|
|
8
|
-
const cellUtils = require('./cell-utils-
|
|
7
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
8
|
+
const cellUtils = require('./cell-utils-153fb565.js');
|
|
9
9
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
10
|
-
const fButton = require('./f-button-
|
|
11
|
-
const utils = require('./utils-
|
|
12
|
-
const fChip = require('./f-chip-
|
|
10
|
+
const fButton = require('./f-button-8f07d095.js');
|
|
11
|
+
const utils = require('./utils-a201de8b.js');
|
|
12
|
+
const fChip = require('./f-chip-aa8d9253.js');
|
|
13
13
|
require('./f-button-declarations-b611587f.js');
|
|
14
|
-
require('./f-image-
|
|
14
|
+
require('./f-image-42025f08.js');
|
|
15
15
|
|
|
16
16
|
var n,l,u$1,t,r$1,o,f$1,e$1={},c$1=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a$1(n,l){for(var u in l)n[u]=l[u];return n}function h(n){var l=n.parentNode;l&&l.removeChild(n);}function v$1(l,u,i){var t,r,o,f={};for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return y(l,f,t,r,null)}function y(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u$1:o};return null==o&&null!=l.vnode&&l.vnode(f),f}function p(){return {current:null}}function d(n){return n.children}function _(n,l){this.props=n,this.context=l;}function k(n,l){if(null==l)return n.__?k(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?k(n):null}function b$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return b$1(n)}}function m(n){(!n.__d&&(n.__d=!0)&&t.push(n)&&!g$1.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r$1)(g$1);}function g$1(){for(var n;g$1.__r=t.length;)n=t.sort(function(n,l){return n.__v.__b-l.__v.__b}),t=[],n.some(function(n){var l,u,i,t,r,o;n.__d&&(r=(t=(l=n).__v).__e,(o=l.__P)&&(u=[],(i=a$1({},t)).__v=t.__v+1,j$2(o,t,i,l.__n,void 0!==o.ownerSVGElement,null!=t.__h?[r]:null,u,null==r?k(t):r,t.__h),z$1(u,t),t.__e!=r&&b$1(t)));});}function w$1(n,l,u,i,t,r,o,f,s,a){var h,v,p,_,b,m,g,w=i&&i.__k||c$1,A=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?y(null,_,null,null,_):Array.isArray(_)?y(d,{children:_},null,null,null):_.__b>0?y(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(p=w[h])||p&&_.key==p.key&&_.type===p.type)w[h]=void 0;else for(v=0;v<A;v++){if((p=w[v])&&_.key==p.key&&_.type===p.type){w[v]=void 0;break}p=null;}j$2(n,_,p=p||e$1,t,r,o,f,s,a),b=_.__e,(v=_.ref)&&p.ref!=v&&(g||(g=[]),p.ref&&g.push(p.ref,null,_),g.push(v,_.__c||b,_)),null!=b?(null==m&&(m=b),"function"==typeof _.type&&_.__k===p.__k?_.__d=s=x$1(_,s,n):s=P$1(n,_,p,w,b,s),"function"==typeof u.type&&(u.__d=s)):s&&p.__e==s&&s.parentNode!=n&&(s=k(p));}for(u.__e=m,h=A;h--;)null!=w[h]&&("function"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=k(i,h+1)),N(w[h],w[h]));if(g)for(h=0;h<g.length;h++)M$1(g[h],g[++h],g[++h]);}function x$1(n,l,u){for(var i,t=n.__k,r=0;t&&r<t.length;r++)(i=t[r])&&(i.__=n,l="function"==typeof i.type?x$1(i,l,u):P$1(u,i,i,t,i.__e,l));return l}function A$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){A$1(n,l);}):l.push(n)),l}function P$1(n,l,u,i,t,r){var o,f,e;if(void 0!==l.__d)o=l.__d,l.__d=void 0;else if(null==u||t!=r||null==t.parentNode)n:if(null==r||r.parentNode!==n)n.appendChild(t),o=null;else {for(f=r,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,r),o=r;}return void 0!==o?o:t.nextSibling}function C$1(n,l,u,i,t){var r;for(r in u)"children"===r||"key"===r||r in l||H$1(n,r,null,u[r],i);for(r in l)t&&"function"!=typeof l[r]||"children"===r||"key"===r||"value"===r||"checked"===r||u[r]===l[r]||H$1(n,r,l[r],u[r],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||s.test(l)?u:u+"px";}function H$1(n,l,u,i,t){var r;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])r=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?T$1:I$1,r):n.removeEventListener(l,r?T$1:I$1,r);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function I$1(n){this.l[n.type+!1](l.event?l.event(n):n);}function T$1(n){this.l[n.type+!0](l.event?l.event(n):n);}function j$2(n,u,i,t,r,o,f,e,c){var s,h,v,y,p,k,b,m,g,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l.__b)&&s(u);try{n:if("function"==typeof P){if(m=u.props,g=(s=P.contextType)&&t[s.__c],x=s?g?g.props.value:s.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in P&&P.prototype.render?u.__c=h=new P(m,x):(u.__c=h=new _(m,x),h.constructor=P,h.render=O$1),g&&g.sub(h),h.props=m,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=a$1({},h.__s)),a$1(h.__s,P.getDerivedStateFromProps(m,h.__s))),y=h.props,p=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==P.getDerivedStateFromProps&&m!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,x)||u.__v===i.__v){h.props=m,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,p,k);});}h.context=x,h.props=m,h.state=h.__s,(s=l.__r)&&s(u),h.__d=!1,h.__v=u,h.__P=n,s=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=a$1(a$1({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,p)),A=null!=s&&s.type===d&&null==s.key?s.props.children:s,w$1(n,Array.isArray(A)?A:[A],u,i,t,r,o,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==o&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L$1(i.__e,u,i,t,r,o,f,c);(s=l.diffed)&&s(u);}catch(n){u.__v=null,(c||null!=o)&&(u.__e=e,u.__h=!!c,o[o.indexOf(e)]=null),l.__e(n,u,i);}}function z$1(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l.__e(n,u.__v);}});}function L$1(l,u,i,t,r,o,f,c){var s,a,v,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(r=!0),null!=o)for(;_<o.length;_++)if((s=o[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,o[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=r?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),o=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(o=o&&n.call(l.childNodes),a=(y=i.props||e$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=o)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(v||a)&&(v&&(a&&v.__html==a.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C$1(l,p,y,r,c),v)u.__k=[];else if(_=u.props.children,w$1(l,Array.isArray(_)?_:[_],u,i,t,r&&"foreignObject"!==d,o,f,o?o[0]:i.__k&&k(i,0),c),null!=o)for(_=o.length;_--;)null!=o[_]&&h(o[_]);c||("value"in p&&void 0!==(_=p.value)&&(_!==y.value||_!==l.value||"progress"===d&&!_)&&H$1(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&H$1(l,"checked",_,y.checked,!1));}return l}function M$1(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l.__e(n,i);}}function N(n,u,i){var t,r;if(l.unmount&&l.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M$1(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l.__e(n,u);}t.base=t.__P=null;}if(t=n.__k)for(r=0;r<t.length;r++)t[r]&&N(t[r],u,"function"!=typeof n.type);i||null==n.__e||h(n.__e),n.__e=n.__d=void 0;}function O$1(n,l,u){return this.constructor(n,u)}function S$1(u,i,t){var r,o,f;l.__&&l.__(u,i),o=(r="function"==typeof t)?null:t&&t.__k||i.__k,f=[],j$2(i,u=(!r&&t||i).__k=v$1(d,null,[u]),o||e$1,e$1,void 0!==i.ownerSVGElement,!r&&t?[t]:o?null:i.firstChild?n.call(i.childNodes):null,f,!r&&t?t:o?o.__e:i.firstChild,r),z$1(f,u);}function D$1(n,l){var u={__c:l="__cC"+f$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(m);},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=c$1.slice,l={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l;}throw n}},u$1=0,_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a$1({},this.state),"function"==typeof n&&(n=n(a$1({},u),this.props)),n&&a$1(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),m(this));},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this));},_.prototype.render=d,t=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g$1.__r=0,f$1=0;
|
|
17
17
|
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const utils = require('./utils-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
7
|
+
const utils = require('./utils-a201de8b.js');
|
|
8
8
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
|
-
const fCell = require('./f-cell-
|
|
10
|
-
require('./cell-utils-
|
|
11
|
-
require('./f-
|
|
12
|
-
require('./f-
|
|
9
|
+
const fCell = require('./f-cell-c08ad501.js');
|
|
10
|
+
require('./cell-utils-153fb565.js');
|
|
11
|
+
require('./f-text-field-b6300c8a.js');
|
|
12
|
+
require('./f-image-42025f08.js');
|
|
13
|
+
require('./f-chip-aa8d9253.js');
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Props of the kup-cell component.
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const cellUtils = require('./cell-utils-
|
|
7
|
-
const kupManager = require('./kup-manager-
|
|
8
|
-
const utils = require('./utils-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const cellUtils = require('./cell-utils-153fb565.js');
|
|
7
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
8
|
+
const utils = require('./utils-a201de8b.js');
|
|
9
9
|
|
|
10
10
|
const kupDashListCss = ".horizontal{display:inline-block;min-width:300px;max-width:100%;overflow:visible;white-space:nowrap;border:solid;border-width:1px;margin:2px}";
|
|
11
11
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const utils = require('./utils-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
7
|
+
const utils = require('./utils-a201de8b.js');
|
|
8
8
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
9
|
|
|
10
10
|
const kupDashCss = "#dash{color:var(--kup-text-color);font-size:2vw;display:flex;align-items:center;justify-content:center;position:relative;text-align:center;position:relative;word-break:normal}#dash.with-dyn{cursor:pointer}#dash #content .icon{margin:auto;font-size:90%}#dash #content.layout-1,#dash #content.layout-3{text-align:center}#dash #content.layout-1 .descr,#dash #content.layout-3 .descr{font-size:70%;width:100%}#dash #content.layout-1 .value,#dash #content.layout-3 .value{font-size:220%}#dash #content.layout-2>div{display:flex}#dash #content.layout-2>div .icon{margin:auto;font-size:150%;margin-right:5%}#dash #content.layout-2>div .value-int{font-size:250%}#dash #content.layout-2>div .value-dec,#dash #content.layout-2>div .unit{font-size:130%;margin-top:auto;margin-bottom:7%}#dash #content.layout-2>div .value-dec{margin-left:2%}#dash #content.layout-2>div .unit{margin-left:4%}#dash #content.layout-4>div{display:grid;grid-template-columns:2fr 5fr}#dash #content.layout-4>div .icon{margin:auto;font-size:150%;margin-right:5%}#dash #content.layout-4>div .value-and-unit{display:flex}#dash #content.layout-4>div .value-and-unit .value-int{font-size:250%}#dash #content.layout-4>div .value-and-unit .value-dec,#dash #content.layout-4>div .value-and-unit .unit{font-size:130%;margin-top:auto;margin-bottom:7%}#dash #content.layout-4>div .value-and-unit .value-dec{margin-left:2%}#dash #content.layout-4>div .value-and-unit .unit{margin-left:4%}#dash #content.layout-4>div .descr{margin-left:4%;text-align:left;font-size:80%;width:100%;min-width:max-content}#dash #content.layout-5>div,#dash #content.layout-7>div{display:flex}#dash #content.layout-5>div .icon,#dash #content.layout-7>div .icon{font-size:150%;margin:auto;margin-left:10%}#dash #content.layout-5>div .value,#dash #content.layout-7>div .value{font-size:200%}#dash #content.layout-5>div .descr,#dash #content.layout-7>div .descr{text-align:right;font-size:65%;width:100%;min-width:max-content}#dash #content.layout-6>div{display:flex;justify-content:space-between}#dash #content.layout-6>div .icon{font-size:150%;margin-right:10%}#dash #content.layout-6>div .value{font-size:220%;text-align:right}#dash #content.layout-6>div .descr{font-size:80%;text-align:right;width:100%;min-width:max-content}#dash #content.layout-8>div{display:flex;align-items:center}#dash #content.layout-8>div .icon{margin-right:4%;font-size:75%}#dash #content.layout-8>div .value{margin:0 10%;font-size:250%}#dash #content.layout-8>div .descr{font-size:60%;text-align:left}";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const utils = require('./utils-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
7
|
+
const utils = require('./utils-a201de8b.js');
|
|
8
8
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
9
|
|
|
10
10
|
const drawerClass = 'drawer';
|
|
@@ -18,7 +18,7 @@ var KupDrawerProps;
|
|
|
18
18
|
KupDrawerProps["opened"] = "Defaults at false. When set to true, the drawer appears.";
|
|
19
19
|
})(KupDrawerProps || (KupDrawerProps = {}));
|
|
20
20
|
|
|
21
|
-
const kupDrawerCss = ":host{--kup_drawer_backdrop:var(--kup-drawer-backdrop, rgba(0, 0, 0, 0.32));--kup_drawer_box_shadow:var(\n --kup-drawer-box-shadow,\n 0 8px 10px -5px rgba(0, 0, 0, 0.2),\n 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12)\n );--kup_drawer_permanent_border:var(\n --kup-drawer-permanent-border,\n 1px solid var(--kup-border-color)\n );--kup_drawer_slide_transition:var(--kup-drawer-slide-transition, 750ms);--kup_drawer_transition:var(--kup-drawer-transition, 250ms);box-shadow:var(--kup_drawer_box_shadow);display:block;font-size:var(--kup-font-size);height:100vh;left:calc(var(--kup-drawer-width) * -1);position:fixed;top:0;transition:left var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1), right var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1);width:var(--kup-drawer-width);z-index:var(--kup-drawer-zindex)}#kup-component{height:100%;width:100%}.backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--kup_drawer_backdrop);opacity:0;pointer-events:none;transition:opacity var(--kup_drawer_transition) ease-in;z-index:var(--kup-drawer-zindex)}.drawer{height:100%;position:fixed;width:var(--kup-drawer-width);z-index:calc(var(--kup-drawer-zindex) + 1)}.drawer__content{background-color:var(--kup-drawer-background-color);box-sizing:border-box;height:100%;overflow-y:auto;width:100%}.drawer ::slotted(*){--kup-button-primary-color:var(--kup-drawer-color);--kup-button-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-button-primary-color-h:var(--kup-drawer-color-h);--kup-button-primary-color-s:var(--kup-drawer-color-s);--kup-button-primary-color-l:var(--kup-drawer-color-l);--kup-switch-label-color:var(--kup-drawer-color);--kup-switch-primary-color:var(--kup-drawer-color);--kup-switch-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-color:var(--kup-drawer-color);--kup-textfield-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-primary-color:var(--kup-drawer-color);--kup-textfield-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-color:var(--kup-drawer-color);--kup-tree-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-icon-color:var(--kup-drawer-color);color:var(--kup-drawer-color);fill:var(--kup-drawer-color)}:host([kup-opened]){left:0}:host([kup-opened]) .backdrop{opacity:1;pointer-events:all}:host(.kup-right){left:unset;right:-100%}:host([kup-opened].kup-right){right:0}:host(.kup-permanent){box-shadow:unset;transition:all 250ms}:host(.kup-permanent) .backdrop{display:none}:host(.kup-permanent) .drawer{position:relative}:host(.kup-permanent) .drawer__content{border-right:var(--kup_drawer_permanent_border)}";
|
|
21
|
+
const kupDrawerCss = ":host{--kup_drawer_backdrop:var(--kup-drawer-backdrop, rgba(0, 0, 0, 0.32));--kup_drawer_box_shadow:var(\n --kup-drawer-box-shadow,\n 0 8px 10px -5px rgba(0, 0, 0, 0.2),\n 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12)\n );--kup_drawer_permanent_border:var(\n --kup-drawer-permanent-border,\n 1px solid var(--kup-border-color)\n );--kup_drawer_slide_transition:var(--kup-drawer-slide-transition, 750ms);--kup_drawer_transition:var(--kup-drawer-transition, 250ms);box-shadow:var(--kup_drawer_box_shadow);display:block;font-size:var(--kup-font-size);height:100vh;left:calc(var(--kup-drawer-width) * -1);position:fixed;top:0;transition:left var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1), right var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1);width:var(--kup-drawer-width);z-index:var(--kup-drawer-zindex)}#kup-component{height:100%;width:100%}.backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--kup_drawer_backdrop);opacity:0;pointer-events:none;transition:opacity var(--kup_drawer_transition) ease-in;z-index:var(--kup-drawer-zindex)}.drawer{height:100%;position:fixed;width:var(--kup-drawer-width);z-index:calc(var(--kup-drawer-zindex) + 1)}.drawer__content{background-color:var(--kup-drawer-background-color);box-sizing:border-box;height:100%;overflow-y:auto;width:100%}.drawer ::slotted(*){--kup-button-primary-color:var(--kup-drawer-color);--kup-button-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-button-primary-color-h:var(--kup-drawer-color-h);--kup-button-primary-color-s:var(--kup-drawer-color-s);--kup-button-primary-color-l:var(--kup-drawer-color-l);--kup-switch-label-color:var(--kup-drawer-color);--kup-switch-primary-color:var(--kup-drawer-color);--kup-switch-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-color:var(--kup-drawer-color);--kup-textfield-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-primary-color:var(--kup-drawer-color);--kup-textfield-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-color:var(--kup-drawer-color);--kup-tree-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-filter-background-color:var(--kup-drawer-background-color);--kup-tree-icon-color:var(--kup-drawer-color);color:var(--kup-drawer-color);fill:var(--kup-drawer-color)}:host([kup-opened]){left:0}:host([kup-opened]) .backdrop{opacity:1;pointer-events:all}:host(.kup-right){left:unset;right:-100%}:host([kup-opened].kup-right){right:0}:host(.kup-permanent){box-shadow:unset;transition:all 250ms}:host(.kup-permanent) .backdrop{display:none}:host(.kup-permanent) .drawer{position:relative}:host(.kup-permanent) .drawer__content{border-right:var(--kup_drawer_permanent_border)}";
|
|
22
22
|
|
|
23
23
|
const KupDrawer = class {
|
|
24
24
|
constructor(hostRef) {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const utils = require('./utils-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
7
|
+
const utils = require('./utils-a201de8b.js');
|
|
8
8
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
|
-
const cellUtils = require('./cell-utils-
|
|
9
|
+
const cellUtils = require('./cell-utils-153fb565.js');
|
|
10
10
|
|
|
11
11
|
/*! *****************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
7
7
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const fButton = require('./f-button-8f07d095.js');
|
|
7
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
8
|
+
const utils = require('./utils-a201de8b.js');
|
|
9
|
+
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
10
|
+
require('./f-button-declarations-b611587f.js');
|
|
11
|
+
require('./f-image-42025f08.js');
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Props of the kup-form-editor component.
|
|
15
|
+
* Used to export every prop in an object.
|
|
16
|
+
*/
|
|
17
|
+
var KupFormEditorProps;
|
|
18
|
+
(function (KupFormEditorProps) {
|
|
19
|
+
KupFormEditorProps["customStyle"] = "Custom style of the component.";
|
|
20
|
+
KupFormEditorProps["data"] = "The data of the component.";
|
|
21
|
+
})(KupFormEditorProps || (KupFormEditorProps = {}));
|
|
22
|
+
var KupFormEditorDragTypes;
|
|
23
|
+
(function (KupFormEditorDragTypes) {
|
|
24
|
+
KupFormEditorDragTypes["Components"] = "1";
|
|
25
|
+
KupFormEditorDragTypes["Sections"] = "2";
|
|
26
|
+
})(KupFormEditorDragTypes || (KupFormEditorDragTypes = {}));
|
|
27
|
+
var KupFormEditorLabels;
|
|
28
|
+
(function (KupFormEditorLabels) {
|
|
29
|
+
KupFormEditorLabels["Loaded"] = "Loaded";
|
|
30
|
+
KupFormEditorLabels["Reset"] = "Reset";
|
|
31
|
+
KupFormEditorLabels["Save"] = "Save";
|
|
32
|
+
KupFormEditorLabels["Components"] = "Components";
|
|
33
|
+
KupFormEditorLabels["Sections"] = "Sections";
|
|
34
|
+
KupFormEditorLabels["Column"] = "Column";
|
|
35
|
+
})(KupFormEditorLabels || (KupFormEditorLabels = {}));
|
|
36
|
+
|
|
37
|
+
const kupFormEditorCss = ":host{width:100%;height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;grid-gap:0.5em}.form-dropzone{padding:1em;border:1px solid var(--kup-primary-color)}.section{display:flex;flex-direction:column}.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);min-height:100px}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.component{height:fit-content;padding:1em;margin:0.5em}.component-draggable{border:1px solid var(--kup-secondary-color)}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";
|
|
38
|
+
|
|
39
|
+
const KupFormEditor = class {
|
|
40
|
+
constructor(hostRef) {
|
|
41
|
+
index.registerInstance(this, hostRef);
|
|
42
|
+
this.kupSave = index.createEvent(this, "kup-formeditor-save", 6);
|
|
43
|
+
/*-------------------------------------------------*/
|
|
44
|
+
/* S t a t e s */
|
|
45
|
+
/*-------------------------------------------------*/
|
|
46
|
+
/**
|
|
47
|
+
* Force render component by internal event.
|
|
48
|
+
*/
|
|
49
|
+
this.resetInternalData = false;
|
|
50
|
+
/*-------------------------------------------------*/
|
|
51
|
+
/* P r o p s */
|
|
52
|
+
/*-------------------------------------------------*/
|
|
53
|
+
/**
|
|
54
|
+
* Custom style of the component.
|
|
55
|
+
* @default ""
|
|
56
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
57
|
+
*/
|
|
58
|
+
this.customStyle = '';
|
|
59
|
+
/**
|
|
60
|
+
* The data of the component.
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
this.data = null;
|
|
64
|
+
/*-------------------------------------------------*/
|
|
65
|
+
/* I n t e r n a l V a r i a b l e s */
|
|
66
|
+
/*-------------------------------------------------*/
|
|
67
|
+
/**
|
|
68
|
+
* Instance of the KupManager class.
|
|
69
|
+
*/
|
|
70
|
+
this.kupManager = kupManager.kupManagerInstance();
|
|
71
|
+
/**
|
|
72
|
+
* Draggable type of Form (Components or Sections).
|
|
73
|
+
*/
|
|
74
|
+
this.dragType = KupFormEditorDragTypes.Components;
|
|
75
|
+
/**
|
|
76
|
+
* Internal data of the component.
|
|
77
|
+
*/
|
|
78
|
+
this.internalData = null;
|
|
79
|
+
/**
|
|
80
|
+
* Internal data backup of the component for refresh when changed content by drag&drop.
|
|
81
|
+
*/
|
|
82
|
+
this.internalDataBackup = null;
|
|
83
|
+
}
|
|
84
|
+
onKupSave() {
|
|
85
|
+
this.kupSave.emit({
|
|
86
|
+
comp: this,
|
|
87
|
+
id: this.rootElement.id,
|
|
88
|
+
data: this.internalData,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/*-------------------------------------------------*/
|
|
92
|
+
/* W a t c h e r s */
|
|
93
|
+
/*-------------------------------------------------*/
|
|
94
|
+
dataChanged() {
|
|
95
|
+
this.resetData();
|
|
96
|
+
}
|
|
97
|
+
/*-------------------------------------------------*/
|
|
98
|
+
/* P u b l i c M e t h o d s */
|
|
99
|
+
/*-------------------------------------------------*/
|
|
100
|
+
/**
|
|
101
|
+
* Used to retrieve component's props values.
|
|
102
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
103
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
104
|
+
*/
|
|
105
|
+
async getProps(descriptions) {
|
|
106
|
+
return utils.getProps(this, KupFormEditorProps, descriptions);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* This method is used to trigger a new render of the component.
|
|
110
|
+
*/
|
|
111
|
+
async refresh() {
|
|
112
|
+
index.forceUpdate(this);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Sets the props to the component.
|
|
116
|
+
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
117
|
+
*/
|
|
118
|
+
async setProps(props) {
|
|
119
|
+
utils.setProps(this, KupFormEditorProps, props);
|
|
120
|
+
}
|
|
121
|
+
/*-------------------------------------------------*/
|
|
122
|
+
/* P r i v a t e M e t h o d s */
|
|
123
|
+
/*-------------------------------------------------*/
|
|
124
|
+
buildHeader() {
|
|
125
|
+
const clearButtonProp = {
|
|
126
|
+
icon: 'cancel',
|
|
127
|
+
label: KupFormEditorLabels.Reset,
|
|
128
|
+
secondary: true,
|
|
129
|
+
onClick: () => {
|
|
130
|
+
this.resetData();
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
const saveButtonProp = {
|
|
134
|
+
icon: 'save',
|
|
135
|
+
label: KupFormEditorLabels.Save,
|
|
136
|
+
onClick: () => this.onKupSave(),
|
|
137
|
+
};
|
|
138
|
+
const selRadioProp = [
|
|
139
|
+
{
|
|
140
|
+
label: KupFormEditorLabels.Components,
|
|
141
|
+
value: KupFormEditorDragTypes.Components,
|
|
142
|
+
checked: this.dragType == KupFormEditorDragTypes.Components,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
label: KupFormEditorLabels.Sections,
|
|
146
|
+
value: KupFormEditorDragTypes.Sections,
|
|
147
|
+
checked: this.dragType == KupFormEditorDragTypes.Sections,
|
|
148
|
+
},
|
|
149
|
+
];
|
|
150
|
+
return (index.h("div", { class: "header" }, index.h("kup-radio", { data: selRadioProp, "onKup-radio-change": (ev) => {
|
|
151
|
+
this.dragType = ev.detail
|
|
152
|
+
.value;
|
|
153
|
+
this.resetData(this.internalData);
|
|
154
|
+
} }), index.h(fButton.FButton, Object.assign({}, clearButtonProp)), index.h(fButton.FButton, Object.assign({}, saveButtonProp))));
|
|
155
|
+
}
|
|
156
|
+
buildForm(form, parent) {
|
|
157
|
+
const classes = {
|
|
158
|
+
form: true,
|
|
159
|
+
'layout-column': form && form.layout == 'column',
|
|
160
|
+
'layout-row': form && form.layout == 'row',
|
|
161
|
+
'form-dropzone': form &&
|
|
162
|
+
this.dragType == KupFormEditorDragTypes.Sections &&
|
|
163
|
+
form.sections != null &&
|
|
164
|
+
form.sections.length > 0,
|
|
165
|
+
};
|
|
166
|
+
return form ? (index.h("div", { class: classes, ref: (el) => {
|
|
167
|
+
if (!el)
|
|
168
|
+
return;
|
|
169
|
+
const kel = el;
|
|
170
|
+
kel.kupData = { parent: parent, form: form };
|
|
171
|
+
} }, form.sections.map((section) => this.buildSection(section, form)))) : (index.h("div", null, this.kupManager.language.translate(kupManager.KupLanguageGeneric.EMPTY_DATA)));
|
|
172
|
+
}
|
|
173
|
+
buildSectionHeader(section, parent) {
|
|
174
|
+
const addButtonProp = {
|
|
175
|
+
icon: 'add',
|
|
176
|
+
slim: true,
|
|
177
|
+
onClick: () => {
|
|
178
|
+
if (!section.sections) {
|
|
179
|
+
section.sections = [];
|
|
180
|
+
}
|
|
181
|
+
const newSec = {
|
|
182
|
+
id: section.id + (section.sections.length + 1),
|
|
183
|
+
loaded: section.loaded,
|
|
184
|
+
layout: section.layout,
|
|
185
|
+
components: [],
|
|
186
|
+
};
|
|
187
|
+
if (section.components) {
|
|
188
|
+
section.components.forEach((x) => newSec.components.push(x));
|
|
189
|
+
section.components.splice(0);
|
|
190
|
+
}
|
|
191
|
+
section.sections.push(newSec);
|
|
192
|
+
this.resetData(this.internalData);
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
const removeButtonProp = {
|
|
196
|
+
icon: 'remove',
|
|
197
|
+
slim: true,
|
|
198
|
+
secondary: true,
|
|
199
|
+
onClick: () => {
|
|
200
|
+
const idx = parent.sections.indexOf(section);
|
|
201
|
+
parent.sections.splice(idx, 1);
|
|
202
|
+
this.resetData(this.internalData);
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
return (index.h("div", { class: "section-header" }, index.h("div", null, section.id, ' ', section.dim ? '(' + section.dim + ')' : undefined, " -", ' ', section.layout), index.h("div", null, index.h("div", { class: "section-header-actions" }, index.h("kup-switch", { checked: section.loaded, label: KupFormEditorLabels.Loaded, "onKup-switch-change": (ev) => {
|
|
206
|
+
section.loaded = ev.detail.value == 'on';
|
|
207
|
+
} }), index.h("kup-switch", { checked: section.layout == 'column', label: KupFormEditorLabels.Column, "onKup-switch-change": (ev) => {
|
|
208
|
+
section.layout =
|
|
209
|
+
ev.detail.value == 'on' ? 'column' : 'row';
|
|
210
|
+
this.resetData(this.internalData);
|
|
211
|
+
} }), index.h(fButton.FButton, Object.assign({}, addButtonProp)), index.h(fButton.FButton, Object.assign({}, removeButtonProp)), section.components && section.components.length > 0 ? (index.h("kup-image", { resource: "widgets", sizeX: "24px", sizeY: "24px" })) : undefined))));
|
|
212
|
+
}
|
|
213
|
+
buildSection(section, parent) {
|
|
214
|
+
const classes = {
|
|
215
|
+
section: true,
|
|
216
|
+
'section-draggable': this.dragType == KupFormEditorDragTypes.Sections,
|
|
217
|
+
'section-dropzone': !section.sections ||
|
|
218
|
+
section.sections.length == 0 ||
|
|
219
|
+
this.dragType == KupFormEditorDragTypes.Sections,
|
|
220
|
+
};
|
|
221
|
+
const bodyClasses = {
|
|
222
|
+
'section-body': true,
|
|
223
|
+
'layout-column': section && section.layout == 'column',
|
|
224
|
+
'layout-row': section && section.layout == 'row',
|
|
225
|
+
};
|
|
226
|
+
let bodyStyles = {};
|
|
227
|
+
if (section.sections) {
|
|
228
|
+
let gridTemplate = '';
|
|
229
|
+
section.sections.forEach((childSection) => {
|
|
230
|
+
if (!childSection.dim)
|
|
231
|
+
gridTemplate += ' 1fr';
|
|
232
|
+
else
|
|
233
|
+
gridTemplate +=
|
|
234
|
+
childSection.dim.indexOf('%') < 0
|
|
235
|
+
? ' ' + childSection.dim + 'px'
|
|
236
|
+
: ' ' + childSection.dim;
|
|
237
|
+
});
|
|
238
|
+
if (section.layout == 'column')
|
|
239
|
+
bodyStyles['gridTemplateRows'] = gridTemplate;
|
|
240
|
+
if (section.layout == 'row')
|
|
241
|
+
bodyStyles['gridTemplateColumns'] = gridTemplate;
|
|
242
|
+
}
|
|
243
|
+
return (index.h("div", { class: classes, ref: (el) => {
|
|
244
|
+
if (!el)
|
|
245
|
+
return;
|
|
246
|
+
const kel = el;
|
|
247
|
+
kel.kupData = { parent: parent, section: section };
|
|
248
|
+
} }, this.dragType == KupFormEditorDragTypes.Sections
|
|
249
|
+
? this.buildSectionHeader(section, parent)
|
|
250
|
+
: undefined, index.h("div", { class: bodyClasses, style: bodyStyles }, this.dragType == KupFormEditorDragTypes.Components &&
|
|
251
|
+
section.components
|
|
252
|
+
? section.components.map((component) => component.type == 'SCH' ? (this.buildForm(component, section)) : (index.h("div", { class: "component component-draggable", ref: (el) => {
|
|
253
|
+
if (!el)
|
|
254
|
+
return;
|
|
255
|
+
const kel = el;
|
|
256
|
+
kel.kupData = {
|
|
257
|
+
section: section,
|
|
258
|
+
componnent: component,
|
|
259
|
+
};
|
|
260
|
+
} }, component.id, " - ", component.type, index.h("kup-switch", { checked: component.loaded, label: KupFormEditorLabels.Loaded, "onKup-switch-change": (ev) => {
|
|
261
|
+
component.loaded =
|
|
262
|
+
ev.detail.value == 'on';
|
|
263
|
+
} }))))
|
|
264
|
+
: undefined, section.sections
|
|
265
|
+
? section.sections.map((childSection) => this.buildSection(childSection, section))
|
|
266
|
+
: undefined)));
|
|
267
|
+
}
|
|
268
|
+
didRenderInteractables() {
|
|
269
|
+
try {
|
|
270
|
+
const items = [];
|
|
271
|
+
this.rootElement.shadowRoot
|
|
272
|
+
.querySelectorAll('.component-draggable')
|
|
273
|
+
.forEach((x) => items.push(x));
|
|
274
|
+
this.rootElement.shadowRoot
|
|
275
|
+
.querySelectorAll('.section-draggable')
|
|
276
|
+
.forEach((x) => items.push(x));
|
|
277
|
+
items.forEach((item) => {
|
|
278
|
+
this.kupManager.interact.draggable(item, null, null, kupManager.KupDragEffect.CLONE);
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
catch (error) {
|
|
282
|
+
this.kupManager.debug.logMessage(this, error, kupManager.KupDebugCategory.ERROR);
|
|
283
|
+
}
|
|
284
|
+
try {
|
|
285
|
+
const items = [];
|
|
286
|
+
this.rootElement.shadowRoot
|
|
287
|
+
.querySelectorAll('.section-dropzone')
|
|
288
|
+
.forEach((x) => items.push(x));
|
|
289
|
+
this.rootElement.shadowRoot
|
|
290
|
+
.querySelectorAll('.form-dropzone')
|
|
291
|
+
.forEach((x) => items.push(x));
|
|
292
|
+
items.forEach((item) => {
|
|
293
|
+
this.kupManager.interact.dropzone(item, null, null, {
|
|
294
|
+
drop: (ev) => {
|
|
295
|
+
ev.currentTarget.appendChild(ev.relatedTarget);
|
|
296
|
+
this.dropped(ev.currentTarget, ev.relatedTarget);
|
|
297
|
+
},
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
catch (error) {
|
|
302
|
+
this.kupManager.debug.logMessage(this, error, kupManager.KupDebugCategory.ERROR);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
dropped(parent, child) {
|
|
306
|
+
if (this.dragType == KupFormEditorDragTypes.Components) {
|
|
307
|
+
const idx = child.kupData.section.components.indexOf(child.kupData.componnent);
|
|
308
|
+
child.kupData.section.components.splice(idx, 1);
|
|
309
|
+
parent.kupData.section.components.push(child.kupData.componnent);
|
|
310
|
+
child.kupData.section = parent.kupData.section;
|
|
311
|
+
}
|
|
312
|
+
else if (this.dragType == KupFormEditorDragTypes.Sections) {
|
|
313
|
+
const idx = child.kupData.parent.sections.indexOf(child.kupData.section);
|
|
314
|
+
child.kupData.parent.sections.splice(idx, 1);
|
|
315
|
+
if (parent.kupData.form) {
|
|
316
|
+
// il nuovo target è la form.
|
|
317
|
+
if (!parent.kupData.form.sections)
|
|
318
|
+
parent.kupData.form.sections = [];
|
|
319
|
+
parent.kupData.form.sections.push(child.kupData.section);
|
|
320
|
+
child.kupData.parent = parent.kupData.form;
|
|
321
|
+
}
|
|
322
|
+
else if (parent.kupData.section) {
|
|
323
|
+
// il nuovo target è la section.
|
|
324
|
+
if (!parent.kupData.section.sections)
|
|
325
|
+
parent.kupData.section.sections = [];
|
|
326
|
+
if (parent.kupData.section.components &&
|
|
327
|
+
parent.kupData.section.components.length > 0) {
|
|
328
|
+
// devo creare una section contenitore e sposare i components
|
|
329
|
+
const newSec = {
|
|
330
|
+
id: parent.kupData.section.id + '1',
|
|
331
|
+
loaded: parent.kupData.section.loaded,
|
|
332
|
+
layout: parent.kupData.section.layout,
|
|
333
|
+
components: [],
|
|
334
|
+
};
|
|
335
|
+
parent.kupData.section.components.forEach((x) => newSec.components.push(x));
|
|
336
|
+
parent.kupData.section.components.splice(0);
|
|
337
|
+
parent.kupData.section.sections.push(newSec);
|
|
338
|
+
}
|
|
339
|
+
parent.kupData.section.sections.push(child.kupData.section);
|
|
340
|
+
child.kupData.parent = parent.kupData.section;
|
|
341
|
+
}
|
|
342
|
+
this.resetData(this.internalData);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
resetData(form = null) {
|
|
346
|
+
if (form)
|
|
347
|
+
this.internalDataBackup = form;
|
|
348
|
+
this.resetInternalData = true;
|
|
349
|
+
setTimeout(() => {
|
|
350
|
+
if (this.internalDataBackup) {
|
|
351
|
+
this.internalData = this.internalDataBackup;
|
|
352
|
+
this.internalDataBackup = null;
|
|
353
|
+
}
|
|
354
|
+
this.resetInternalData = false;
|
|
355
|
+
}, 250);
|
|
356
|
+
}
|
|
357
|
+
unregisterInteractables() {
|
|
358
|
+
this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll('.component-draggable')));
|
|
359
|
+
this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll('.section-dropzone')));
|
|
360
|
+
this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll('.section-draggable')));
|
|
361
|
+
this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll('.form-dropzone')));
|
|
362
|
+
}
|
|
363
|
+
/*-------------------------------------------------*/
|
|
364
|
+
/* L i f e c y c l e H o o k s */
|
|
365
|
+
/*-------------------------------------------------*/
|
|
366
|
+
componentWillLoad() {
|
|
367
|
+
this.kupManager.dates.register(this);
|
|
368
|
+
this.kupManager.debug.logLoad(this, false);
|
|
369
|
+
this.kupManager.language.register(this);
|
|
370
|
+
this.kupManager.theme.register(this);
|
|
371
|
+
}
|
|
372
|
+
componentDidLoad() {
|
|
373
|
+
this.kupManager.debug.logLoad(this, true);
|
|
374
|
+
}
|
|
375
|
+
componentWillRender() {
|
|
376
|
+
this.kupManager.debug.logRender(this, false);
|
|
377
|
+
if (this.resetInternalData) {
|
|
378
|
+
this.internalData = null;
|
|
379
|
+
this.unregisterInteractables();
|
|
380
|
+
}
|
|
381
|
+
else if (!this.internalData)
|
|
382
|
+
this.internalData = JSON.parse(JSON.stringify(this.data));
|
|
383
|
+
}
|
|
384
|
+
componentDidRender() {
|
|
385
|
+
this.kupManager.debug.logRender(this, true);
|
|
386
|
+
this.didRenderInteractables();
|
|
387
|
+
}
|
|
388
|
+
render() {
|
|
389
|
+
return (index.h(index.Host, null, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, this.buildHeader(), this.buildForm(this.internalData, null))));
|
|
390
|
+
}
|
|
391
|
+
disconnectedCallback() {
|
|
392
|
+
this.unregisterInteractables();
|
|
393
|
+
this.kupManager.dates.unregister(this);
|
|
394
|
+
this.kupManager.language.unregister(this);
|
|
395
|
+
this.kupManager.theme.unregister(this);
|
|
396
|
+
}
|
|
397
|
+
get rootElement() { return index.getElement(this); }
|
|
398
|
+
static get watchers() { return {
|
|
399
|
+
"data": ["dataChanged"]
|
|
400
|
+
}; }
|
|
401
|
+
};
|
|
402
|
+
KupFormEditor.style = kupFormEditorCss;
|
|
403
|
+
|
|
404
|
+
exports.kup_form_editor = KupFormEditor;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const utils = require('./utils-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
7
|
+
const utils = require('./utils-a201de8b.js');
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Props of the kup-iframe component.
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const utils = require('./utils-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
7
|
+
const utils = require('./utils-a201de8b.js');
|
|
8
8
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-04dc9671.js');
|
|
7
7
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
8
|
-
const fImage = require('./f-image-
|
|
9
|
-
const utils = require('./utils-
|
|
8
|
+
const fImage = require('./f-image-42025f08.js');
|
|
9
|
+
const utils = require('./utils-a201de8b.js');
|
|
10
10
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
11
11
|
|
|
12
12
|
/**
|