@sme.up/ketchup 9.0.0 → 9.1.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/{f-button-b2cfce1c.js → f-button-733664a5.js} +2 -2
- package/dist/cjs/{f-cell-75fca92b.js → f-cell-f37757a6.js} +183 -11
- package/dist/cjs/{f-checkbox-48d7af02.js → f-checkbox-556771e8.js} +1 -1
- package/dist/cjs/{f-chip-3e504f3e.js → f-chip-3349d130.js} +3 -3
- package/dist/cjs/{f-image-270d39ae.js → f-image-b7a5816b.js} +2 -2
- package/dist/cjs/{f-paginator-utils-6d0c4678.js → f-paginator-utils-1fe1df76.js} +49 -50
- package/dist/cjs/{f-text-field-bbcd2143.js → f-text-field-8557fc3f.js} +38 -4
- package/dist/cjs/{index-c3d10561.js → index-4b3a5567.js} +48 -18
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +157 -195
- package/dist/cjs/kup-box.cjs.entry.js +23 -15
- package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
- package/dist/cjs/kup-card-list.cjs.entry.js +2 -2
- package/dist/cjs/kup-cell.cjs.entry.js +9 -7
- package/dist/cjs/kup-dashboard.cjs.entry.js +6 -6
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +2 -2
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-grid.cjs.entry.js +2 -2
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
- package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
- package/dist/cjs/{kup-manager-130bbd9d.js → kup-manager-cb73c128.js} +59 -9
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.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 +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/index.js +4 -0
- package/dist/collection/assets/progress-bar.js +0 -0
- package/dist/collection/assets/radio.js +30 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/kup-box/kup-box.js +14 -6
- package/dist/collection/components/kup-card/kup-card.css +14 -0
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +10 -5
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +47 -48
- package/dist/collection/components/kup-data-table/kup-data-table.js +36 -22
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.css +1 -242
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +37 -84
- package/dist/collection/components/kup-radio/kup-radio.css +0 -161
- package/dist/collection/components/kup-radio/kup-radio.js +31 -26
- package/dist/collection/components/kup-rating/kup-rating.css +0 -8
- package/dist/collection/components/kup-rating/kup-rating.js +27 -52
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +1 -0
- package/dist/collection/f-components/f-cell/f-cell.js +19 -5
- package/dist/collection/f-components/f-progress-bar/f-progress-bar-declarations.js +1 -0
- package/dist/collection/f-components/f-progress-bar/f-progress-bar.js +88 -0
- package/dist/collection/f-components/f-radio/f-radio-declarations.js +1 -0
- package/dist/collection/f-components/f-radio/f-radio.js +28 -0
- package/dist/collection/f-components/f-rating/f-rating-declarations.js +1 -0
- package/dist/collection/f-components/f-rating/f-rating.js +26 -0
- package/dist/collection/f-components/f-text-field/f-text-field.js +36 -2
- package/dist/collection/managers/kup-data/kup-data.js +2 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +33 -0
- package/dist/collection/managers/kup-theme/kup-theme.js +13 -1
- package/dist/collection/utils/cell-utils.js +6 -7
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -0
- package/dist/components/kup-autocomplete2.js +962 -801
- package/dist/components/kup-box2.js +24 -6
- package/dist/components/kup-calendar.js +3 -0
- package/dist/components/kup-dashboard.js +2 -0
- package/dist/components/kup-image-list.js +2 -0
- package/dist/components/kup-planner.js +2 -0
- package/dist/esm/{f-button-baa419dc.js → f-button-f247ce10.js} +2 -2
- package/dist/esm/{f-cell-18ee3afa.js → f-cell-ba94f1b3.js} +181 -12
- package/dist/esm/{f-checkbox-00a1e020.js → f-checkbox-cbf7b3de.js} +1 -1
- package/dist/esm/{f-chip-311500f4.js → f-chip-104c4a64.js} +3 -3
- package/dist/esm/{f-image-da03494c.js → f-image-d2a9603c.js} +2 -2
- package/dist/esm/{f-paginator-utils-d63a195e.js → f-paginator-utils-743522fa.js} +49 -50
- package/dist/esm/{f-text-field-e5f1f1fd.js → f-text-field-4d91ccfc.js} +38 -4
- package/dist/esm/{index-3336c3b1.js → index-c161a33e.js} +48 -18
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +3 -3
- package/dist/esm/kup-autocomplete_27.entry.js +157 -195
- package/dist/esm/kup-box.entry.js +23 -15
- package/dist/esm/kup-calendar.entry.js +5 -5
- package/dist/esm/kup-card-list.entry.js +2 -2
- package/dist/esm/kup-cell.entry.js +9 -7
- package/dist/esm/kup-dashboard.entry.js +6 -6
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +2 -2
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-grid.entry.js +2 -2
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-lazy.entry.js +2 -2
- package/dist/esm/kup-magic-box.entry.js +3 -3
- package/dist/esm/{kup-manager-c8d5c94d.js → kup-manager-94b3d177.js} +59 -9
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +2 -2
- package/dist/esm/kup-planner.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 +4 -4
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-12e47371.js +1 -0
- package/dist/ketchup/{p-81debebe.entry.js → p-15548f51.entry.js} +1 -1
- package/dist/ketchup/p-20e8ab84.js +2 -0
- package/dist/ketchup/{p-a0f59b05.entry.js → p-21f1b22a.entry.js} +1 -1
- package/dist/ketchup/{p-25de68e5.js → p-2c47b88f.js} +3 -3
- package/dist/ketchup/{p-7e1c8fc0.entry.js → p-304f296e.entry.js} +1 -1
- package/dist/ketchup/p-48f8b0d5.entry.js +9 -0
- package/dist/ketchup/p-4ca502ce.entry.js +1 -0
- package/dist/ketchup/{p-7555c10d.js → p-4d7c02f4.js} +1 -1
- package/dist/ketchup/{p-76130e83.entry.js → p-5abbf31b.entry.js} +1 -1
- package/dist/ketchup/{p-13eac183.entry.js → p-5c9b10a5.entry.js} +1 -1
- package/dist/ketchup/{p-55fd3f46.entry.js → p-5cb2dbf3.entry.js} +1 -1
- package/dist/ketchup/p-679ccbf8.js +1 -0
- package/dist/ketchup/p-6a0ac578.entry.js +1 -0
- package/dist/ketchup/{p-d6a7498b.entry.js → p-87e13738.entry.js} +1 -1
- package/dist/ketchup/p-8e5db599.entry.js +1 -0
- package/dist/ketchup/{p-07707cd1.entry.js → p-a14ede8c.entry.js} +1 -1
- package/dist/ketchup/{p-39602629.js → p-a2007880.js} +1 -1
- package/dist/ketchup/{p-da58f8ab.entry.js → p-a2b75445.entry.js} +1 -1
- package/dist/ketchup/{p-8281c9e5.js → p-b0678a34.js} +1 -1
- package/dist/ketchup/{p-4597f25d.js → p-ba003975.js} +1 -1
- package/dist/ketchup/{p-f729449f.js → p-bb80719e.js} +1 -1
- package/dist/ketchup/{p-2a2a18bf.entry.js → p-bf41d71f.entry.js} +1 -1
- package/dist/ketchup/{p-d8384990.entry.js → p-c32e8755.entry.js} +1 -1
- package/dist/ketchup/p-c4b1bde1.entry.js +1 -0
- package/dist/ketchup/p-c6b58be6.entry.js +1 -0
- package/dist/ketchup/{p-2dab9c4f.entry.js → p-d56763cf.entry.js} +1 -1
- package/dist/ketchup/{p-7bf649f0.entry.js → p-e7f57bee.entry.js} +1 -1
- package/dist/ketchup/{p-a8a39b08.entry.js → p-eb12225c.entry.js} +1 -1
- package/dist/ketchup/{p-2d192def.entry.js → p-f22abf4e.entry.js} +1 -1
- package/dist/ketchup/{p-51aa248f.entry.js → p-f82db512.entry.js} +1 -1
- package/dist/types/components/kup-box/kup-box.d.ts +1 -0
- package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +0 -1
- package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +1 -9
- package/dist/types/components/kup-radio/kup-radio.d.ts +3 -2
- package/dist/types/components/kup-rating/kup-rating.d.ts +2 -7
- package/dist/types/components.d.ts +6 -4
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +1 -0
- package/dist/types/f-components/f-progress-bar/f-progress-bar-declarations.d.ts +16 -0
- package/dist/types/f-components/f-progress-bar/f-progress-bar.d.ts +3 -0
- package/dist/types/f-components/f-radio/f-radio-declarations.d.ts +22 -0
- package/dist/types/f-components/f-radio/f-radio.d.ts +3 -0
- package/dist/types/f-components/f-rating/f-rating-declarations.d.ts +10 -0
- package/dist/types/f-components/f-rating/f-rating.d.ts +3 -0
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +12 -0
- package/dist/types/stencil-public-runtime.d.ts +5 -3
- package/package.json +2 -2
- package/dist/ketchup/p-008ad26c.js +0 -1
- package/dist/ketchup/p-0c19d485.entry.js +0 -9
- package/dist/ketchup/p-2d42477d.js +0 -2
- package/dist/ketchup/p-5c15661d.entry.js +0 -1
- package/dist/ketchup/p-5cfaa673.entry.js +0 -1
- package/dist/ketchup/p-5f583257.entry.js +0 -1
- package/dist/ketchup/p-80699a95.js +0 -1
- package/dist/ketchup/p-bb854cf5.entry.js +0 -1
- package/dist/ketchup/p-ecb9fe91.entry.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e,n,t=!1,l=!1;const o=e=>{const n=new URL(e,re.t);return n.origin!==ie.location.origin?n.href:n.pathname},s=e=>re.t=e,i="http://www.w3.org/1999/xlink",c={},r=e=>"object"==(e=typeof e)||"function"===e;function u(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const a=(e,n,...t)=>{let l=null,o=null,s=!1,i=!1;const c=[],u=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!r(l))&&(l+=""),s&&i?c[c.length-1].l+=l:c.push(s?f(null,l):l),i=s)};if(u(t),n){n.key&&(o=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}if("function"==typeof e)return e(null===n?{}:n,c,p);const a=f(e,null);return a.o=n,c.length>0&&(a.i=c),a.u=o,a},f=(e,n)=>({p:0,h:e,l:n,m:null,i:null,o:null,u:null}),d={},p={forEach:(e,n)=>e.map(y).forEach(n),map:(e,n)=>e.map(y).map(n).map(h)},y=e=>({vattrs:e.o,vchildren:e.i,vkey:e.u,vname:e.v,vtag:e.h,vtext:e.l}),h=e=>{if("function"==typeof e.vtag){const n=Object.assign({},e.vattrs);return e.vkey&&(n.key=e.vkey),e.vname&&(n.name=e.vname),a(e.vtag,n,...e.vchildren||[])}const n=f(e.vtag,e.vtext);return n.o=e.vattrs,n.i=e.vchildren,n.u=e.vkey,n.v=e.vname,n},m=e=>Y(e).$,v=(e,n,t)=>{const l=m(e);return{emit:e=>$(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},$=(e,n,t)=>{const l=re.ce(n,t);return e.dispatchEvent(l),l},w=new WeakMap,b=e=>"sc-"+e.g,g=(e,n,t,l,o,s)=>{if(t!==l){let c=ne(e,n),u=n.toLowerCase();if("class"===n){const n=e.classList,o=k(t),s=k(l);n.remove(...o.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===n){for(const n in t)l&&null!=l[n]||(n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in l)t&&l[n]===t[n]||(n.includes("-")?e.style.setProperty(n,l[n]):e.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&l(e);else if(c||"o"!==n[0]||"n"!==n[1]){const a=r(l);if((c||a&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[n]=l;else{const o=null==l?"":l;"list"===n?c=!1:null!=t&&e[n]==o||(e[n]=o)}}catch(e){}let f=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(n=u,f=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(n)||(f?e.removeAttributeNS(i,n):e.removeAttribute(n)):(!c||4&s||o)&&!a&&(l=!0===l?"":l,f?e.setAttributeNS(i,n,l):e.setAttribute(n,l))}else n="-"===n[2]?n.slice(3):ne(ie,u)?u.slice(2):u[2]+n.slice(3),t&&re.rel(e,n,t,!1),l&&re.ael(e,n,l,!1)}},j=/\s/,k=e=>e?e.split(j):[],S=(e,n,t,l)=>{const o=11===n.m.nodeType&&n.m.host?n.m.host:n.m,s=e&&e.o||c,i=n.o||c;for(l in s)l in i||g(o,l,s[l],void 0,t,n.p);for(l in i)g(o,l,s[l],i[l],t,n.p)},O=(n,l,o)=>{const s=l.i[o];let i,c,r=0;if(null!==s.l)i=s.m=ce.createTextNode(s.l);else{if(t||(t="svg"===s.h),i=s.m=ce.createElementNS(t?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.h),t&&"foreignObject"===s.h&&(t=!1),S(null,s,t),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),s.i)for(r=0;r<s.i.length;++r)c=O(n,s,r),c&&i.appendChild(c);"svg"===s.h?t=!1:"foreignObject"===i.tagName&&(t=!0)}return i},M=(e,t,l,o,s,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=O(null,l,s),c&&(o[s].m=c,r.insertBefore(c,t)))},x=(e,n,t)=>{for(let l=n;l<=t;++l){const n=e[l];if(n){const e=n.m;L(n),e&&e.remove()}}},C=(e,n)=>e.h===n.h&&e.u===n.u,P=(e,n)=>{const l=n.m=e.m,o=e.i,s=n.i,i=n.h,c=n.l;null===c?(t="svg"===i||"foreignObject"!==i&&t,"slot"===i||S(e,n,t),null!==o&&null!==s?((e,n,t,l)=>{let o,s,i=0,c=0,r=0,u=0,a=n.length-1,f=n[0],d=n[a],p=l.length-1,y=l[0],h=l[p];for(;i<=a&&c<=p;)if(null==f)f=n[++i];else if(null==d)d=n[--a];else if(null==y)y=l[++c];else if(null==h)h=l[--p];else if(C(f,y))P(f,y),f=n[++i],y=l[++c];else if(C(d,h))P(d,h),d=n[--a],h=l[--p];else if(C(f,h))P(f,h),e.insertBefore(f.m,d.m.nextSibling),f=n[++i],h=l[--p];else if(C(d,y))P(d,y),e.insertBefore(d.m,f.m),d=n[--a],y=l[++c];else{for(r=-1,u=i;u<=a;++u)if(n[u]&&null!==n[u].u&&n[u].u===y.u){r=u;break}r>=0?(s=n[r],s.h!==y.h?o=O(n&&n[c],t,r):(P(s,y),n[r]=void 0,o=s.m),y=l[++c]):(o=O(n&&n[c],t,c),y=l[++c]),o&&f.m.parentNode.insertBefore(o,f.m)}i>a?M(e,null==l[p+1]?null:l[p+1].m,t,l,c,p):c>p&&x(n,i,a)})(l,o,n,s):null!==s?(null!==e.l&&(l.textContent=""),M(l,null,n,s,0,s.length-1)):null!==o&&x(o,0,o.length-1),t&&"svg"===i&&(t=!1)):e.l!==c&&(l.data=c)},L=e=>{e.o&&e.o.ref&&e.o.ref(null),e.i&&e.i.map(L)},R=(e,n)=>{n&&!e.j&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.j=n)))},U=(e,n)=>{if(e.p|=16,!(4&e.p))return R(e,e.k),ve((()=>W(e,n)));e.p|=512},W=(e,n)=>{const t=e.S;let l;return n?(e.p|=256,e.O&&(e.O.map((([e,n])=>q(t,e,n))),e.O=void 0),l=q(t,"componentWillLoad")):l=q(t,"componentWillUpdate"),l=E(l,(()=>q(t,"componentWillRender"))),E(l,(()=>N(e,t,n)))},E=(e,n)=>D(e)?e.then(n):n(),D=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,N=async(e,n,t)=>{var l;const o=e.$,s=o["s-rc"];t&&(e=>{const n=e.M,t=e.$,l=n.p,o=((e,n)=>{var t;const l=b(n),o=se.get(l);if(e=11===e.nodeType?e:ce,o)if("string"==typeof o){let n,s=w.get(e=e.head||e);if(s||w.set(e,s=new Set),!s.has(l)){{n=ce.createElement("style"),n.innerHTML=o;const l=null!==(t=re.C)&&void 0!==t?t:u(ce);null!=l&&n.setAttribute("nonce",l),e.insertBefore(n,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=o,t.classList.add(o+"-h"))})(e);T(e,n,o,t),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const n=null!==(l=o["s-p"])&&void 0!==l?l:[],t=()=>A(e);0===n.length?t():(Promise.all(n).then(t),e.p|=4,n.length=0)}},T=(t,l,o,s)=>{try{l=l.render(),t.p&=-17,t.p|=2,((t,l,o=!1)=>{const s=t.$,i=t.M,c=t.P||f(null,null),r=(e=>e&&e.h===d)(l)?l:a(null,null,l);if(n=s.tagName,i.L&&(r.o=r.o||{},i.L.map((([e,n])=>r.o[n]=s[e]))),o&&r.o)for(const e of Object.keys(r.o))s.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.o[e]=s[e]);r.h=null,r.p|=4,t.P=r,r.m=c.m=s.shadowRoot||s,e=s["s-sc"],P(c,r)})(t,l,s)}catch(e){te(e,t.$)}return null},A=e=>{const n=e.$,t=e.S,l=e.k;q(t,"componentDidRender"),64&e.p?q(t,"componentDidUpdate"):(e.p|=64,V(n),q(t,"componentDidLoad"),e.R(n),l||H()),e.U(n),e.j&&(e.j(),e.j=void 0),512&e.p&&me((()=>U(e,!1))),e.p&=-517},F=e=>{{const n=Y(e),t=n.$.isConnected;return t&&2==(18&n.p)&&U(n,!1),t}},H=()=>{V(ce.documentElement),me((()=>$(ie,"appload",{detail:{namespace:"ketchup"}})))},q=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){te(e)}},V=e=>e.classList.add("hydrated"),_=(e,n,t)=>{if(n.W){e.watchers&&(n.D=e.watchers);const l=Object.entries(n.W),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&t&&32&l?Object.defineProperty(o,e,{get(){return((e,n)=>Y(this).N.get(n))(0,e)},set(t){((e,n,t,l)=>{const o=Y(e),s=o.$,i=o.N.get(n),c=o.p,u=o.S;if(t=((e,n)=>null==e||r(e)?e:4&n?"false"!==e&&(""===e||!!e):2&n?parseFloat(e):1&n?e+"":e)(t,l.W[n][0]),(!(8&c)||void 0===i)&&t!==i&&(!Number.isNaN(i)||!Number.isNaN(t))&&(o.N.set(n,t),u)){if(l.D&&128&c){const e=l.D[n];e&&e.map((e=>{try{u[e](t,i,n)}catch(e){te(e,s)}}))}2==(18&c)&&U(o,!1)}})(this,e,t,n)},configurable:!0,enumerable:!0}):1&t&&64&l&&Object.defineProperty(o,e,{value(...n){const t=Y(this);return t.T.then((()=>t.S[e](...n)))}})})),1&t){const t=new Map;o.attributeChangedCallback=function(e,n,l){re.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,n])=>15&n[0])).map((([e,l])=>{const o=l[1]||e;return t.set(o,e),512&l[0]&&n.L.push([e,o]),o}))}}return e},z=e=>{q(e,"disconnectedCallback")},B=(e,n={})=>{var t;const l=[],o=n.exclude||[],s=ie.customElements,i=ce.head,c=i.querySelector("meta[charset]"),r=ce.createElement("style"),a=[];let f,d=!0;Object.assign(re,n),re.t=new URL(n.resourcesUrl||"./",ce.baseURI).href,e.map((e=>{e[1].map((n=>{const t={p:n[0],g:n[1],W:n[2],A:n[3]};t.W=n[2],t.A=n[3],t.L=[],t.D={};const i=t.g,c=class extends HTMLElement{constructor(e){super(e),ee(e=this,t),1&t.p&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):re.jmp((()=>(e=>{if(0==(1&re.p)){const n=Y(e),t=n.M,l=()=>{};if(1&n.p)G(e,n,t.A),(null==n?void 0:n.S)||(null==n?void 0:n.F)&&n.F.then((()=>{}));else{n.p|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){R(n,n.k=t);break}}t.W&&Object.entries(t.W).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t,l,o)=>{if(0==(32&n.p)){n.p|=32;{if((o=oe(t)).then){const e=()=>{};o=await o,e()}o.isProxied||(t.D=o.watchers,_(o,t,2),o.isProxied=!0);const e=()=>{};n.p|=8;try{new o(n)}catch(e){te(e)}n.p&=-9,n.p|=128,e()}if(o.style){let e=o.style;const n=b(t);if(!se.has(n)){const l=()=>{};((e,n,t)=>{let l=se.get(e);ae&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,se.set(e,l)})(n,e,!!(1&t.p)),l()}}}const s=n.k,i=()=>U(n,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,n,t)}l()}})(this)))}disconnectedCallback(){re.jmp((()=>(async()=>{if(0==(1&re.p)){const e=Y(this);e.H&&(e.H.map((e=>e())),e.H=void 0),(null==e?void 0:e.S)?z(e.S):(null==e?void 0:e.F)&&e.F.then((()=>z(e.S)))}})()))}componentOnReady(){return Y(this).F}};t.q=e[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,_(c,t,1)))}))}));{r.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles","");const e=null!==(t=re.C)&&void 0!==t?t:u(ce);null!=e&&r.setAttribute("nonce",e),i.insertBefore(r,c?c.nextSibling:i.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):re.jmp((()=>f=setTimeout(H,30)))},G=(e,n,t)=>{t&&t.map((([t,l,o])=>{const s=J(e,t),i=I(n,o),c=K(t);re.ael(s,l,i,c),(n.H=n.H||[]).push((()=>re.rel(s,l,i,c)))}))},I=(e,n)=>t=>{try{256&e.p?e.S[n](t):(e.O=e.O||[]).push([n,t])}catch(e){te(e)}},J=(e,n)=>4&n?ce:e,K=e=>0!=(2&e),Q=e=>re.C=e,X=new WeakMap,Y=e=>X.get(e),Z=(e,n)=>X.set(n.S=e,n),ee=(e,n)=>{const t={p:0,$:e,M:n,N:new Map};return t.T=new Promise((e=>t.U=e)),t.F=new Promise((e=>t.R=e)),e["s-p"]=[],e["s-rc"]=[],G(e,t,n.A),X.set(e,t)},ne=(e,n)=>n in e,te=(e,n)=>(0,console.error)(e,n),le=new Map,oe=e=>{const n=e.g.replace(/-/g,"_"),t=e.q,l=le.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(le.set(t,e),e[n])),te)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},se=new Map,ie="undefined"!=typeof window?window:{},ce=ie.document||{head:{}},re={p:0,t:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},ue=e=>Promise.resolve(e),ae=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),fe=[],de=[],pe=(e,n)=>t=>{e.push(t),l||(l=!0,n&&4&re.p?me(he):re.raf(he))},ye=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){te(e)}e.length=0},he=()=>{ye(fe),ye(de),(l=fe.length>0)&&re.raf(he)},me=e=>ue().then(e),ve=pe(de,!0);export{d as H,o as a,B as b,v as c,s as d,F as f,m as g,a as h,ue as p,Z as r,Q as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,f as s,h as a,H as i,g as r}from"./p-2d42477d.js";import{k as c,g as o,s as h,t as l,af as n}from"./p-25de68e5.js";import{c as d}from"./p-635bb4b3.js";var u;!function(t){t.columnsNumber="Sets the number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the component.",t.fullWidth="Sets whether the component occupies all available width.",t.horizontal="Sets whether the cards are placed horizontally or not.",t.isClickable="Sets whether a single card is clickable or not."}(u||(u={}));var p,m=function(t,e,s,a){if("a"===s&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?a:"a"===s?a.call(t):a?a.value:e.get(t)};const k=class{constructor(s){t(this,s),this.kupCardListClickEvent=e(this,"kup-cardlist-click",7),p.set(this,c()),this.columnsNumber=1,this.customStyle="",this.data=null,this.fullWidth=!0,this.horizontal=!1,this.isClickable=!1}async getProps(t){return o(this,u,t)}async refresh(){s(this)}async setProps(t){h(this,u,t)}componentWillLoad(){m(this,p,"f").debug.logLoad(this,!1),m(this,p,"f").theme.register(this)}componentDidLoad(){m(this,p,"f").debug.logLoad(this,!0)}componentDidRender(){m(this,p,"f").debug.logRender(this,!0)}render(){if(!this.data||!this.data.columns||!this.data.columns.length)return;const t=[];let e,s,r,c,o,h,u,k,_,f;for(let t=0;t<this.data.columns.length;t++){const a=this.data.columns[t];if(a.cardListOption)switch(a.cardListOption){case"decvalue":e=a;break;case"descr":s=a;break;case"icon":r=a;break;case"iconcolor":c=a;break;case"intvalue":o=a;break;case"layout":h=a;break;case"measure":u=a;break;case"textcolor":k=a;break;case"value":_=a;break;case"valuecolor":f=a}}for(let i=0;i<this.data.rows.length;i++){const d=this.data.rows[i],b={color:[],image:[],text:[]},g=h&&d.cells[h.name].value?parseInt(d.cells[h.name].value):1,w=a("kup-card",{class:this.isClickable?"is-clickable":"",customStyle:"#kup-component, .scalable-card { min-height: var(--kup_cardlist_cardsminheight) }",data:b,layoutFamily:l.SCALABLE,layoutNumber:g,key:i,"onKup-card-click":()=>{this.isClickable&&this.kupCardListClickEvent.emit({comp:this,id:this.rootElement.id,index:i,row:d})},slot:i.toString()}),x=(t,e,s)=>{if(t){const a=d.cells[t.name];if(a){const i=a.value;switch(e){case"color":b[e][s]=m(this,p,"f").theme.colorCheck(i).hexColor;break;case"image":b[e][s]={resource:i};break;default:b[e][s]=n(t,a)}}}};switch(g){case 1:x(k,"color",0),x(f,"color",1),x(s,"text",0),x(_,"text",1);break;case 2:x(c,"color",0),x(f,"color",1),x(r,"image",0),x(o,"text",0),x(e,"text",1),x(u,"text",2);break;case 3:x(f,"color",0),x(k,"color",1),x(_,"text",0),x(s,"text",1);break;case 4:x(c,"color",0),x(f,"color",1),x(k,"color",2),x(r,"image",0),x(o,"text",0),x(e,"text",1),x(u,"text",2),x(s,"text",3);break;case 5:x(c,"color",0),x(k,"color",1),x(f,"color",2),x(r,"image",0),x(s,"text",0),x(_,"text",1);break;case 6:case 7:case 8:x(c,"color",0),x(f,"color",1),x(k,"color",2),x(r,"image",0),x(_,"text",0),x(s,"text",1)}t.push(w)}return a(i,null,a("style",null,m(this,p,"f").theme.setKupStyle(this.rootElement)),a("div",{id:d},a("kup-grid",{class:(this.fullWidth?"kup-full-width":"")+" scalable-cards",columns:this.columnsNumber,singleLine:this.horizontal},t)))}disconnectedCallback(){m(this,p,"f").theme.unregister(this)}get rootElement(){return r(this)}};p=new WeakMap,k.style=":host{--kup_cardlist_cards_max_height:var(--kup-cardlist-cards-max-height, unset);--kup_cardlist_cards_min_height:var(--kup-cardlist-cards-min-height, unset);--kup_cardlist_cards_max_width:var(--kup-cardlist-cards-max-width, unset);--kup_cardlist_cards_min_width:var(--kup-cardlist-cards-min-width, unset);display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}kup-card{max-height:var(--kup_cardlist_cards_max_height);min-height:var(--kup_cardlist_cards_min_height);max-width:var(--kup_cardlist_cards_max_width);min-width:var(--kup_cardlist_cards_min_width)}kup-card.is-clickable{cursor:pointer}kup-grid{--kup-grid-padding:0}";export{k as kup_card_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as o,f as i,h as e,H as s,g as r}from"./p-2d42477d.js";import{k as n,A as a,g as l,s as h,v as c,m as p,K as b,c as d,Q as u,V as x,W as f,X as g,I as w,a2 as m}from"./p-25de68e5.js";import{f as k,p as v,s as y,d as _,r as j,h as C,b as P}from"./p-39602629.js";import{F as A}from"./p-f729449f.js";import{a as R}from"./p-7555c10d.js";import{c as z}from"./p-635bb4b3.js";import{F as I}from"./p-80699a95.js";import{F as E}from"./p-cd2af1a6.js";import"./p-8281c9e5.js";import"./p-b00f3575.js";import"./p-4597f25d.js";import"./p-008ad26c.js";import"./p-d4a879fc.js";var M;!function(t){t.cardData="Data of the card linked to the box when the latter's layout must be a premade template.",t.columns="Number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the box.",t.dragEnabled="Enable dragging.",t.dropEnabled="Enable dropping.",t.dropOnSection="Drop can be done in section.",t.enableRowActions="If enabled, a button to load / display the row actions will be displayed on the right of every box.",t.globalFilter="When set to true it activates the global filter.",t.globalFilterValue="The value of the global filter.",t.kanban="Displays the boxlist as a Kanban.",t.layout="How the field will be displayed. If not present, a default one will be created.",t.lazyLoadRows="When set to true, extra rows will be automatically loaded once the last row enters the viewport.",t.multiSelection="Enable multi selection.",t.pageSelected="Current page number.",t.pagination="Enables pagination.",t.rowsPerPage="Number of current rows per page.",t.scrollOnHover="Activates the scroll on hover function.",t.selectBox="Automatically selects the box at the specified index.",t.selectedRowsState="Multiple selection.",t.showSelection="If enabled, highlights the selected box/boxes.",t.sortBy="If sorting is enabled, specifies which column to sort.",t.sortEnabled="Enable sorting.",t.stateId="",t.store="",t.swipeDisabled="Disable swipe."}(M||(M={}));class O{constructor(){this.globalFilterValue="",this.sortBy="",this.selectedRowsState="",this.pageSelected=1,this.rowsPerPage=0,this.load=!1}toDebugString(){return"box state"}}var S,B,D,W,$,T,L=function(t,o,i,e){if("a"===i&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof o?t!==o||!e:!o.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?e:"a"===i?e.call(t):e?e.value:o.get(t)},F=function(t,o,i,e,s){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof o?t!==o||!s:!o.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?s.call(t,i):s?s.value=i:o.set(t,i),i};const H=class{constructor(i){t(this,i),this.kupBoxClick=o(this,"kup-box-click",6),this.kupBoxSelected=o(this,"kup-box-selected",6),this.kupAutoBoxSelect=o(this,"kup-box-autoselect",6),this.kupRowActionMenuClick=o(this,"kup-box-rowactionmenuclick",6),this.kupRowActionClick=o(this,"kup-box-rowactionclick",6),this.kupDidLoad=o(this,"kup-box-didload",6),this.kupDidUnload=o(this,"kup-box-didunload",6),this.kupBoxContextMenu=o(this,"kup-box-contextmenu",6),S.add(this),this.state=new O,this.kupManager=n(),this.visibleColumns=[],this.rows=[],this.filteredRows=[],this.sectionRef=null,this.rowsRefs=[],this.hold=!1,this.interactableDrag=[],this.interactableDrop=[],this.interactableTouch=[],B.set(this,void 0),D.set(this,[]),W.set(this,0),this.collapsedSection={},this.selectedRows=[],this.rowActionMenuOpened=void 0,this.currentPage=1,this.currentRowsPerPage=10,this.cardData=null,this.columns=1,this.customStyle="",this.data=null,this.dragEnabled=!1,this.dropEnabled=!1,this.dropOnSection=!1,this.editableData=!1,this.enableRowActions=!1,this.globalFilter=!1,this.globalFilterValue="",this.kanban=null,this.layout=void 0,this.lazyLoadRows=!1,this.multiSelection=!1,this.pageSelected=1,this.pagination=!1,this.rowsPerPage=void 0,this.scrollOnHover=!1,this.selectBox=void 0,this.selectedRowsState=void 0,this.showSelection=!0,this.sortBy=void 0,this.sortEnabled=!1,this.stateId="",this.store=void 0,this.swipeDisabled=!1}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&(this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t),this.sortBy=this.state.sortBy,this.globalFilterValue=this.state.globalFilterValue,this.selectedRowsState=this.state.selectedRowsState,this.pageSelected=this.state.pageSelected,this.rowsPerPage=this.state.rowsPerPage)}}persistState(){if(this.store&&this.stateId){let t=!1;this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)||(this.state.sortBy=this.sortBy,t=!0),this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)||(this.state.globalFilterValue=this.globalFilterValue,t=!0),this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)||(this.state.pageSelected=this.currentPage,t=!0),this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)||(this.state.rowsPerPage=this.currentRowsPerPage,t=!0);const o=this.selectedRows.reduce(((t,o,i)=>t+(i>0?";":"")+o.id),"");if(this.kupManager.objects.deepEqual(this.state.selectedRowsState,o)||(this.state.selectedRowsState=o,t=!0),!this.state.load)return void(this.state.load=!0);t&&(this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state),this.store.persistState(this.stateId,this.state))}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows()),this.initVisibleColumns(),this.initRows(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return l(this,M,t)}async loadRowActions(t,o){t.actions=o,this.rowActionMenuOpened=t}async refresh(){i(this)}async setProps(t){h(this,M,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>!t.hasOwnProperty("visible")||t.visible))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows(),this.globalFilter&&this.globalFilterValue&&(this.filteredRows=k(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)),this.rows=this.sortRows(this.filteredRows),this.pagination&&(this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,!1))}sortRows(t){let o=t;return this.sortBy&&(o=y(o,[{column:this.sortBy,sortMode:m.A}])),o}checkScrollOnHover(){this.kupManager.scrollOnHover.isRegistered(this.boxContainer)?this.scrollOnHover||this.kupManager.scrollOnHover.unregister(this.boxContainer):this.scrollOnHover&&this.kupManager.scrollOnHover.register(this.boxContainer)}checkLayout(){if(this.layout)return void(this.boxLayout=this.layout);const t={horizontal:!1,sections:[]},o=this.visibleColumns;let i=o.length,e=[],s=0;for(;i-- >0;)e.push({column:o[s++].name});t.content=e,this.boxLayout={sections:[t]}}onSortChange(t){let o=c(this.visibleColumns,t.detail.value);this.sortBy=o.name}onGlobalFilterChange({detail:t}){let o="";t&&t.value&&(o=t.value),this.globalFilterValue=o}isSectionExpanded(t,o){return!(!t.id||!o.id)&&this.collapsedSection[o.id]&&this.collapsedSection[o.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows)if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,o){let i=null,e=null,s=null,r=null;if(t&&(i=t.closest(".box-object")||t.querySelector(".box-object")||t.closest(".f-cell")),i)if(i.classList.contains("f-cell")){const t=i["kup-get-cell-props"]();e=t.cell,r=t.column,s=t.row}else e=i["data-cell"],s=i["data-row"],r=c(this.visibleColumns,i.dataset.column);return{boxObject:i||null,column:r||null,cell:e||null,originalEvent:o,row:s||null}}contextMenuHandler(t){return this.getEventDetails(t.target,t)}checkIfElementIsActionMenuIcon(t){return!(!t.tagName||!t.parentElement)&&"svg"===t.tagName&&t.parentElement.classList.contains("row-actions-toggler")}onBoxClick({target:t},o){if(!(t instanceof HTMLElement))return;let i=t,e=i.classList;for(;!e.contains("box-object")&&!e.contains("box-section")&&!e.contains("box")&&(i=i.parentElement,null!==i);)e=i.classList;let s=null;e.contains("box-object")&&(s=i.dataset.column),this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o,column:s}),this.multiSelection?this.onSelectionCheckChange(o):this.selectedRows=[o]}onSelectionCheckChange(t){var o=-1;for(let i=0;i<this.selectedRows.length;i++)if(this.selectedRows[i].id===t.id){o=i;break}o>=0?(this.selectedRows.splice(o,1),this.selectedRows=[...this.selectedRows]):this.selectedRows=[...this.selectedRows,t],this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,o){if(o.id)if(t.id){if(this.collapsedSection[o.id]){const i=this.collapsedSection[o.id];i[t.id]=!i[t.id]||!i[t.id]}else this.collapsedSection[o.id]={},this.collapsedSection[o.id][t.id]=!0;this.collapsedSection=Object.assign({},this.collapsedSection)}else console.error("cannot expand / collapse a section of a row without ad id");else console.error("cannot expand / collapse a section withoun an ID")}onRowAction(t){t&&(t!==this.rowActionMenuOpened?t.actions?this.rowActionMenuOpened=t:this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t}):this.rowActionMenuOpened=null)}onRowActionClick(t,o,i){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:o,index:i})}clickFunction(t){try{const o=t.composedPath();for(let t of o)if(this.checkIfElementIsActionMenuIcon(t))return}catch(o){if(this.checkIfElementIsActionMenuIcon(t.target))return}this.rowActionMenuOpened=null}handlePageChange(t){const o=_(t,this.filteredRows.length,this.currentRowsPerPage);o&&(this.currentPage=o)}handleRowsPerPageChange(t){const o=j(t,this.filteredRows.length);o&&(this.currentRowsPerPage=o,this.adjustPaginator())}adjustPaginator(){const t=Math.ceil(this.rows.length/this.currentRowsPerPage);this.currentPage>t&&(this.currentPage=1)}renderSectionAsCard(t){let o=!1;const i={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let o=0;o<this.data.columns.length;o++){const e=this.data.columns[o];!1!==e.visible&&(i.cell.push(t.cells[e.name]),i.columns.push(e))}for(const o in t.cells)if(t.cells.hasOwnProperty(o)){const e=t.cells[o];if(void 0!==e.cardID&&e.obj)switch(e.obj.p){case"BTN":do{i.button.push({})}while(i.button.length<e.cardID);i.button[e.cardID]={label:e.value};break;case"IMG":do{i.image.push({})}while(i.image.length<e.cardID);i.image[e.cardID]={resource:e.value};break;case"PGB":do{i.progressbar.push({})}while(i.progressbar.length<e.cardID);i.progressbar[e.cardID]={value:e.value};break;default:do{i.text.push("")}while(i.text.length<e.cardID);i.text[e.cardID]=e.value}}for(const e in t.cells)if(t.cells.hasOwnProperty(e)){const s=t.cells[e];if(void 0===s.cardID&&s.obj)switch(o=!1,s.obj.p){case"BTN":for(let t=0;t<i.button.length;t++)if(!Object.keys(i.button[t]).length){i.button[t]={label:s.value},o=!0;break}o||i.button.push({label:s.value});break;case"IMG":for(let t=0;t<i.image.length;t++)if(!Object.keys(i.image[t]).length){i.image[t]={resource:s.value},o=!0;break}o||i.image.push({resource:s.value});break;case"PGB":for(let t=0;t<i.progressbar.length;t++)if(!Object.keys(i.progressbar[t]).length){i.progressbar[t]={value:s.value},o=!0;break}o||i.progressbar.push({value:s.value});break;default:for(let t=0;t<i.text.length;t++)if(""===i.text[t]){i.text[t]=s.value,o=!0;break}o||i.text.push(s.value)}}return e("kup-card",Object.assign({data:i},this.cardData))}renderRow(t){const o=[...this.visibleColumns];let i=null,s=t.layout;s||(s=this.boxLayout);let r=!1;if(s){s.horizontal&&(r=!0);const e=s.sections;let n=e.length,a=0;n>0&&(i=[]);const l={horizontal:r};for(;n-- >0;)i.push(null!=this.cardData&&"object"==typeof this.cardData?this.renderSectionAsCard(t):this.renderSection(e[a++],l,t,o))}var n=!1;for(let o of this.selectedRows)o.id===t.id&&(n=!0);let a=null;this.multiSelection&&(a=e("div",{class:"box-selection"},e("kup-checkbox",{checked:n})));let l=null;if(this.enableRowActions&&!this.swipeDisabled){const o={"row-action-menu":!0,open:t===this.rowActionMenuOpened};let i=null;if(t.actions){const o=t.actions.map(((o,i)=>e("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,o,i)},e("div",{class:`icon ${o.icon}`}),e("div",{class:"text"},o.text))));i=e("ul",null,o)}l=e("div",{class:"row-actions-wrapper"},e("div",{class:"row-actions-toggler"},e("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},e("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),e("div",{class:o},i)))}let h=null;return t.badgeData&&t.badgeData.length>0&&(h=t.badgeData.map((t=>e("kup-badge",{text:t.text,class:t.className?`centered ${t.className}`:"centered",imageData:t.imageData})))),e("div",{class:"box-wrapper",style:t.style||{},ref:t=>L(this,D,"f").push(t)},e("div",{class:{box:!0,draggable:this.dragEnabled,selected:this.showSelection&&n,column:!r},onClick:o=>this.onBoxClick(o,t),ref:t=>this.rowsRefs.push(t)},a,i,h),l)}renderSection(t,o,i,s){let r=null;if(t.sections&&t.sections.length>0){const o=t.sections;let e=o.length,n=0;for(e>0&&(r=[]);e-- >0;)r.push(this.renderSection(o[n++],t,i,s))}else if(t.content){const o=t.content;let e=o.length,n=0;for(e>0&&(r=[]);e-- >0;)r.push(this.renderBoxObject({boxObject:o[n++],row:i,visibleColumns:s},!0))}else s.length>0&&(r=this.renderBoxObject({boxObject:{column:s[0].name},row:i,visibleColumns:s}));const n=this.isSectionExpanded(i,t),a=!!t.columns,l={"box-section":!0,open:n,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||0===t.sections.length},h=t.style||{};t.dim&&o&&(h.flex=`0 0 ${t.dim}`,h.overflow="hidden",o.horizontal?h.maxWidth=t.dim:h.maxHeight=t.dim),a&&(h["grid-template-columns"]=`repeat(${t.columns}, 1fr)`);let c=null;if(t.collapsible){l["collapse-section"]=!0;const o={content:!0};let s="";s=t.title?t.title:this.kupManager.language.translate(n?p.COLLAPSE:p.EXPAND),c=e("div",{class:l,style:h},e("div",{class:o},r),e("div",{class:"header",role:"button",onClick:o=>{o.stopPropagation(),this.toggleSectionExpand(i,t)}},e("div",{class:"header-content"},e("span",null,s),e(A,{resource:`${b.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:n?"toggled":""}))))}else{const o=t.title?e("h3",null,t.title):null;c=e("div",{class:l,style:h},o,r)}return c}renderBoxObject({boxObject:t,row:o,visibleColumns:i},s){const r={"box-object":!0};let n=null,a=-1;for(let o=0;o<i.length;o++)if(i[o].name===t.column){a=o;break}a>=0?(n=i[a],i.splice(a,1)):s&&(n=this.data.columns.find((o=>o.name===t.column)));const l=o.cells[t.column];let h;return l&&!this.kupManager.objects.isEmptyKupObj(l.obj)&&(r["is-obj"]=!0,this.kupManager.debug.isDebug()&&(h=l.obj.t+"; "+l.obj.p+"; "+l.obj.k+";")),e("div",{"data-cell":l,"data-row":o,"data-column":t.column,class:r,style:{},title:h},l&&n?e(I,Object.assign({},{cell:l,column:n,component:this,editable:this.editableData,renderKup:!0,row:o,setSizes:!0,shape:t.shape})):e("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||0===this.kanban.columns.length)return this.kupManager.debug.logMessage(this,"No columns to group by detected.",d.ERROR),{jsx:e("div",{id:"empty-data-message",class:"box-wrapper"},e("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(p.EMPTY_DATA)),style:{"grid-template-columns":"repeat(1, 1fr)"}};const t=[];if(this.kanban.labels)for(let o=0;o<this.kanban.labels.length;o++)t.push({labels:this.kanban.labels[o],nodes:[]});for(let o=0;o<this.rows.length;o++){let i=[];for(let t=0;t<this.kanban.columns.length;t++)try{i.push(this.rows[o].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,d.WARNING)}const e={found:!1,index:null};for(let o=0;o<t.length;o++){let s=t[o].labels,r=!0;for(let t=0;t<s.length;t++)if(i[t]!==s[t]){r=!1;break}if(r){e.found=!0,e.index=o;break}}e.found?t[e.index].nodes.push(this.renderRow(this.rows[o])):t.push({labels:i,nodes:[this.renderRow(this.rows[o])]})}const o=[];for(let i=0;i<t.length;i++){const s=t[i].labels,r={data:[]};for(let t=0;t<s.length;t++)r.data.push({value:s[t],id:s[t]});o.push(e("div",{class:"kanban-section"},e(R,Object.assign({},r)),t[i].nodes))}return{jsx:o,style:{"grid-template-columns":this.kanban.isStacked?"repeat(1fr)":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer),this.kupManager.interact.on(this.boxContainer,u.TAP,(t=>{this.hold?this.hold=!1:2===t.button&&this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})})),this.kupManager.interact.on(this.boxContainer,u.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.hold=!0,this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)}))}))}didRenderInteractables(){if(this.dragEnabled)for(let t=0;t<this.rowsRefs.length;t++){const o=this.rowsRefs[t],i=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:c(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};o&&!this.interactableDrag.includes(o)&&(this.interactableDrag.push(o),this.kupManager.interact.draggable(o,{allowFrom:".box-object",cursorChecker:()=>null},{callback:i},x.BADGE))}if(this.dropEnabled){const t=()=>{const t=this.getEventDetails(this.rootElement.shadowRoot.querySelector(".box:hover"));return{cell:t.cell,column:t.column,id:this.rootElement.id,row:t.row}};this.interactableDrop.includes(this.sectionRef)||(this.interactableDrop.push(this.sectionRef),this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${f}]`},{dispatcher:this.rootElement,type:g.BOX}));for(let o=0;o<this.rowsRefs.length;o++){const i=this.rowsRefs[o];i&&!this.interactableDrop.includes(i)&&(this.interactableDrop.push(i),this.kupManager.interact.dropzone(i,{accept:`[${f}]`},{callback:t,dispatcher:this.rootElement,type:g.BOX}))}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.rowsPerPage&&(this.currentRowsPerPage=this.rowsPerPage),this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length&&(this.currentRowsPerPage=this.data.rows.length),this.kupManager.language.register(this),this.kupManager.theme.register(this),this.onDataChanged(),this.adjustPaginator(),document.querySelector(".header")?F(this,W,document.querySelector(".header").clientHeight,"f"):F(this,W,0,"f"),document.querySelector(".topbar")&&F(this,W,L(this,W,"f")+document.querySelector(".topbar").clientHeight,"f"),L(this,S,"m",T).call(this)}componentDidLoad(){if(this.handleAutomaticBoxSelection(),document.addEventListener("click",this.clickFunction.bind(this)),this.currentPage=this.pageSelected,this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((o=>t.indexOf(o.id)>=0))}this.didLoadInteractables(),this.kupDidLoad.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const o=t.querySelectorAll(".f-text-field");for(let t=0;t<o.length;t++)E(o[t])}this.checkScrollOnHover(),this.persistState(),this.didRenderInteractables(),L(this,S,"m",$).call(this),this.kupManager.debug.logRender(this,!0)}render(){const t=!("object"!=typeof this.kanban||null===this.kanban);let o=null;if(this.sortEnabled){const t=[{value:"",id:""},...this.visibleColumns.map((t=>({value:t.title,id:t.name,selected:t.name===this.sortBy})))];let i={label:this.kupManager.language.translate(p.SORT_BY),trailingIcon:!0};o=e("div",{id:"sort-panel"},e("kup-combobox",{data:{"kup-text-field":i,"kup-list":{data:t,selectable:!0}},initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let i=null;this.globalFilter&&(i=e("div",{id:"global-filter"},e("kup-text-field",{fullWidth:!0,label:this.kupManager.language.translate(w.SEARCH),icon:b.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout),this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}})));let r=null;!this.lazyLoadRows&&this.pagination&&(r=e(P,{id:top?"top-paginator":"bottom-paginator",currentPage:this.currentPage,max:this.filteredRows.length,mode:C.SIMPLE,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)}));let n=null,a={};if(0===this.rows.length)n=e("div",{id:"empty-data-message",class:"box-wrapper"},e("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(p.EMPTY_DATA))),a={"grid-template-columns":"repeat(1, 1fr)"};else if(t){const t=this.kanbanMode();n=t.jsx,a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let o=t.length,i=0;for(n=[];o-- >0;)n.push(this.renderRow(t[i++]))}return e(s,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:z},e("div",{class:"box-component",ref:t=>this.sectionRef=t},o,i,r,e("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},n))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop)),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this),this.scrollOnHover&&this.kupManager.scrollOnHover.unregister(this.boxContainer),document.removeEventListener("click",this.clickFunction.bind(this)),this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return r(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};B=new WeakMap,D=new WeakMap,W=new WeakMap,S=new WeakSet,$=function(){this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length&&L(this,B,"f").observe(L(this,D,"f")[L(this,D,"f").length-1])},T=function(){const t={threshold:0,rootMargin:"-"+L(this,W,"f")+"px 0px 0px 0px"};F(this,B,new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){this.kupManager.debug.logMessage(this,"Last row entering the viewport, loading more elements.");const o=this.data.rows.length-this.currentRowsPerPage;this.currentRowsPerPage+=o<10?o:10,t.target.classList.remove("last-row"),L(this,B,"f").unobserve(t.target)}}))}),t),"f")},H.style=":host{--kup_box_background_color:var(\n --kup-box-background-color,\n var(--kup-background-color)\n );--kup_box_color:var(--kup-box-color, var(--kup-text-color));--kup_box_font_family:var(--kup-box-font-family, var(--kup-font-family));--kup_box_font_size:var(--kup-box-font-size, var(--kup-font-size));--kup_box_grid_gap:var(--kup-box-grid-gap, 1em);--kup_box_hover_box_shadow:var(\n --kup-box-hover-box-shadow,\n 0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)\n );--kup_box_primary_color_rgb:var(\n --kup-box-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_box_transition:var(--kup-box-transition, 0.25s);display:block;font-family:var(--kup_box_font_family);font-size:var(--kup_box_font_size)}.box-component{background:var(--kup_box_background_color);transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup-border-color)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *{box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box:hover{box-shadow:var(--kup_box_hover_box_shadow)}#box-container .box-wrapper .box.selected{background-color:rgba(var(--kup_box_primary_color_rgb), 0.175)}#box-container .box-wrapper .box.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup-border-color);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-color);color:rgba(var(--kup-text-color-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-color);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 500ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-color)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(:not(.kup-borderless)) .box{border:1px solid var(--kup-border-color)}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box{padding:3px}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{margin:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";export{H as kup_box}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,f as s,h as e,H as o,g as h}from"./p-2d42477d.js";import{k as n,g as r,s as a,c as d}from"./p-25de68e5.js";var c;!function(t){t.buttonData="Props of the button (when isButton is set to true).",t.isButton="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.",t.src="The address the iframe should be referencing to."}(c||(c={}));const p=class{constructor(s){t(this,s),this.kupIframeError=i(this,"kup-iframe-error",6),this.kupIframeLoad=i(this,"kup-iframe-load",6),this.kupManager=n(),this.buttonData={},this.isButton=!1,this.src=void 0}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return r(this,c,t)}async refresh(){s(this)}async setProps(t){a(this,c,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){if(null!=this.src&&""!==this.src)return this.buttonData.icon||(this.buttonData.icon="open_in_new"),this.buttonData.label||(this.buttonData.label="Open in new tab"),this.isButton?e(o,{"is-button":!0},e("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()}))):e(o,{"is-iframe":!0},e("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src}));this.kupManager.debug.logMessage(this,"Resource undefined, not rendering!",d.WARNING)}get rootElement(){return h(this)}};p.style="iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";export{p as kup_iframe}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a9 as e,aa as t,b as c,a6 as s,ab as a,F as n,ac as i,ad as o,ae as l,af as u,ag as r}from"./p-25de68e5.js";import{h as p}from"./p-2d42477d.js";import{F as d}from"./p-4597f25d.js";import{F as k}from"./p-008ad26c.js";import{F as b}from"./p-f729449f.js";import{F as h,a as f}from"./p-7555c10d.js";var m,w,y;!function(e){e.customStyle="Custom style of the component.",e.data="The data of the list.",e.displayMode="Selects how the items must display their label and how they can be filtered for.",e.filter="Keeps string for filtering elements when filter mode is active",e.hideText="Hides rows' text, ideally to display a list of icons only.",e.isMenu="Defines whether the list is a menu or not.",e.keyboardNavigation="When true, enables items' navigation through arrow keys.",e.menuVisible="Sets the status of the menu, when false it's hidden otherwise it's visible.",e.roleType="Defines the type of selection. Values accepted: listbox, radiogroup or group.",e.selectable="Defines whether items are selectable or not.",e.showIcons="Displays the icons associated to each row when set to true.",e.twoLine="The list elements descriptions will be arranged in two lines."}(m||(m={})),function(e){e.LISTBOX="listbox",e.RADIOGROUP="radiogroup",e.GROUP="group"}(w||(w={})),function(e){e.CODE="code",e.DESCRIPTION="description",e.DESCRIPTION_AND_CODE="both"}(y||(y={}));const g=e=>p("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}),p("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},p("div",{class:`switch ${e.checked?"switch--checked":""} ${e.disabled?"switch--disabled":""}`},p("div",{class:"switch__track"}),p("div",{class:"switch__thumb-underlay"},p("div",{class:"switch__thumb"},p("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})))),p("label",{onClick:e.onChange},e.label))),j=document.documentElement,v=(i,l)=>{const m=i.cell,w=i.column,v=i.row,C=i.shape?i.shape:m.shape?m.shape:w.shape?w.shape:null,I=!j.ketchup.objects.isEmptyKupObj(m.obj),$=!(!m.isEditable&&!w.isEditable||!i.editable),z=i.previousValue!==m.value?m.value:"",F=j.ketchup.data.cell.getType(m,C),D=Object.assign({},m.data);let K=m.cssClass?m.cssClass:w.cssClass?w.cssClass:"";const V={"f-cell":!0,[o.OBJ]:!!I,[F+"-cell"]:!0,[i.wrapperClass]:!!i.wrapperClass,[i.density]:!(!i.density||F===s.BAR),[K]:!!K};let H=z;$&&e.includes(F)?H=function(e,t,c,a,i){switch(e){case s.AUTOCOMPLETE:return p("kup-autocomplete",Object.assign({key:a.name+i.row.id,initialValue:c.value},c.data,{class:_(i)?"kup-full-width":"","onkup-autocomplete-change":t=>O(t,i,e,r.UPDATE),"onkup-autocomplete-input":t=>O(t,i,e,r.INPUT),"onkup-autocomplete-iconclick":t=>O(t,i,e,r.ICON_CLICK)}));case s.CHECKBOX:return x(i)&&(t[o.C_CENTERED]=!0),p(d,Object.assign({},c.data,{onChange:t=>O(t,i,e,r.UPDATE)}));case s.CHIP:return p("kup-chip",Object.assign({},c.data,{type:h.INPUT,enableInput:!0,"onKup-chip-change":t=>O(t,i,e,r.UPDATE)}),p("kup-text-field",Object.assign({fullWidth:!0,slot:"field"},c.slotData)));case s.COLOR_PICKER:return p("kup-color-picker",Object.assign({key:a.name+i.row.id,initialValue:c.value},c.data,{class:_(i)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":t=>O(t,i,e,r.UPDATE)}));case s.COMBOBOX:return p("kup-combobox",Object.assign({key:a.name+i.row.id,initialValue:c.value},c.data,{class:_(i)?"kup-full-width":"","onkup-combobox-change":t=>O(t,i,e,r.UPDATE),"onkup-combobox-input":t=>O(t,i,e,r.INPUT),"onkup-combobox-iconclick":t=>O(t,i,e,r.ICON_CLICK)}));case s.DATE:return p("kup-date-picker",Object.assign({key:a.name+i.row.id,initialValue:c.value},c.data,{class:_(i)?"kup-full-width":"","onkup-datepicker-change":t=>O(t,i,e,r.UPDATE),"onkup-datepicker-input":t=>O(t,i,e,r.INPUT)}));case s.MULTI_AUTOCOMPLETE:return p("kup-chip",Object.assign({displayId:!0},c.data,{type:h.INPUT,enableInput:!0,"onKup-chip-change":t=>O(t,i,e,r.UPDATE)}),p("kup-autocomplete",Object.assign({class:"kup-full-width",slot:"field",displayMode:y.DESCRIPTION_AND_CODE,selectMode:y.DESCRIPTION_AND_CODE,"onkup-autocomplete-input":t=>O(t,i,e,r.INPUT),"onkup-autocomplete-iconclick":t=>O(t,i,e,r.ICON_CLICK),showDropDownIcon:!1},c.slotData)));case s.MULTI_COMBOBOX:return p("kup-chip",Object.assign({displayId:!0},c.data,{type:h.INPUT,enableInput:!0,"onKup-chip-change":t=>O(t,i,e,r.UPDATE)}),p("kup-combobox",Object.assign({class:"kup-full-width",slot:"field",displayMode:y.DESCRIPTION_AND_CODE,selectMode:y.DESCRIPTION_AND_CODE,"onkup-combobox-input":t=>O(t,i,e,r.INPUT),"onkup-combobox-iconclick":t=>O(t,i,e,r.ICON_CLICK)},c.slotData)));case s.RATING:return p("kup-rating",Object.assign({key:a.name+i.row.id},c.data,{disabled:!1,"onkup-rating-click":t=>O(t,i,e,r.UPDATE)}));case s.SWITCH:return p(g,Object.assign({},c.data,{disabled:!1,onChange:t=>O(t,i,e,r.UPDATE)}));case s.TIME:return p("kup-time-picker",Object.assign({key:a.name+i.row.id,initialValue:c.value},c.data,{class:_(i)?"kup-full-width":"","onkup-timepicker-change":t=>O(t,i,e,r.UPDATE),"onkup-timepicker-input":t=>O(t,i,e,r.INPUT)}));case s.NUMBER:t[o.C_RIGHT_ALIGNED]=!0;case s.LINK:case s.STRING:const l=t=>O(t,i,e,r.UPDATE),u=t=>O(t,i,e,r.INPUT),b=e===s.NUMBER?"number":null,f=e===s.NUMBER&&c.value?j.ketchup.math.numberifySafe(c.value).toString():c.value;return c.shape===n.INPUT_FIELD?p("input",{class:"input-field",onChange:l,onInput:u,type:b,value:f}):p(k,Object.assign({inputType:b,fullWidth:!!_(i)},c.data,{icon:c.data&&c.data.icon?c.data.icon:c.icon?c.icon:a.icon?a.icon:null,value:f,onChange:l,onInput:u,onIconClick:t=>O(t,i,e,r.ICON_CLICK)}))}}(F,V,m,w,i):m.data&&t.includes(F)?(i.setSizes&&function(e,t,c){switch(e){case s.BAR:t.sizeY||(t.sizeY="26px");break;case s.BUTTON:let e="";t.label&&(e="36px"),c.style?c.style.height||(c.style.minHeight=e):c.style={minHeight:e};break;case s.CHART:t.sizeX||(t.sizeX="100%"),t.sizeY||(t.sizeY="100%");break;case s.CHIP:case s.RADIO:c.style?c.style.height||(c.style.minHeight="40px"):c.style={minHeight:"40px"}}}(F,D,m),H=i.renderKup?function(e,t,c,a,n,i,l){switch(e){case s.BAR:return c.data?p("div",{style:{height:c.sizeY,width:"100%"}},p(b,Object.assign({},c))):p("kup-image",Object.assign({key:i.name+l.row.id,sizeX:"250px"},c));case s.BUTTON:return x(l)&&(t[o.C_CENTERED]=!0),p("kup-button",Object.assign({key:i.name+l.row.id},c,{"onkup-button-click":t=>O(t,l,e,r.CLICK)}));case s.BUTTON_LIST:return x(l)&&(t[o.C_CENTERED]=!0),c["data-storage"]={cell:a,row:n,column:i},p("kup-button-list",Object.assign({key:i.name+l.row.id},c));case s.CHART:return x(l)&&(t[o.C_CENTERED]=!0),p("kup-chart",Object.assign({key:i.name+l.row.id},c));case s.MULTI_AUTOCOMPLETE:case s.MULTI_COMBOBOX:case s.CHIP:return p(f,Object.assign({},c));case s.COLOR_PICKER:return p("kup-color-picker",Object.assign({key:i.name+l.row.id},c,{class:_(l)?"kup-full-width":"",disabled:!0}));case s.GAUGE:return p("kup-gauge",Object.assign({key:i.name+l.row.id,value:j.ketchup.math.numberifySafe(a.value),"width-component":"280px"},c));case s.KNOB:case s.PROGRESS_BAR:return p("kup-progress-bar",Object.assign({key:i.name+l.row.id},c));case s.RADIO:return x(l)&&(t[o.C_CENTERED]=!0),c.disabled=n.readOnly,p("kup-radio",Object.assign({key:i.name+l.row.id},c));case s.RATING:return p("kup-rating",Object.assign({key:i.name+l.row.id},c,{disabled:!0}))}}(F,V,D,m,v,w,i):p("span",{class:"cell-"+F+" placeholder"})):(i.setSizes&&function(e,t,c,n){switch(e){case s.CHECKBOX:case s.ICON:t.sizeX||(t.sizeX="18px"),t.sizeY||(t.sizeY="18px"),c.style?c.style.height||(c.style.minHeight=t.sizeY):c.style={minHeight:t.sizeY};break;case s.IMAGE:n.component.rootElement.tagName===a.BOX?(t.sizeY||(t.sizeY="auto"),void 0===t.fit&&(t.fit=!0)):t.sizeX||(t.sizeX="auto"),t.sizeY||(t.sizeY="64px")}}(F,D,m,i),H=function(e,t,c,a,n,i,l){switch(e){case s.AUTOCOMPLETE:case s.COMBOBOX:case s.DATE:case s.DATETIME:case s.TIME:if(c&&""!=c){const e=u(i,n);return p("div",{class:"f-cell__text"},e)}return c;case s.CHECKBOX:return x(l)&&(a[o.C_CENTERED]=!0),p(b,{resource:t.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case s.EDITOR:return p("div",{innerHTML:n.value});case s.ICON:case s.IMAGE:return x(l)&&(a[o.C_CENTERED]=!0),t.badgeData&&(a[o.C_PADDED]=!0),p(b,Object.assign({},t));case s.LINK:return p("a",{href:c,target:"_blank"},n.value);case s.NUMBER:if(c&&""!=c){const e=j.ketchup.math.numberifySafe(n.value),t=u(i,n);return e<0&&(a[o.TEXT_DANGER]=!0),x(l)&&(a[o.C_RIGHT_ALIGNED]=!0),p("div",{class:"f-cell__text"},t)}return p("div",{class:"f-cell__text"},c);case s.SWITCH:return x(l)&&(a[o.C_CENTERED]=!0),t.disabled=!0,p(g,Object.assign({},t));default:return p("div",{class:"f-cell__text"},c)}}(F,D,H,V,m,w,i));let M=null;!$&&(w.icon||m.icon)&&H&&(M=p(b,Object.assign({},{color:`rgba(var(${c.TEXT}-rgb), 0.375)`,resource:m.icon?m.icon:w.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let T=null;j.ketchup.debug.isDebug()&&I?T=m.obj.t+"; "+m.obj.p+"; "+m.obj.k+";":null!=m.title&&""!=m.title.trim()&&(T=m.title);let X=null;if(m.info){const e=Object.assign({},m.info);e.color||(e.color=`var(${c.INFO})`),e.icon||(e.icon="info"),X=p(b,Object.assign({},{color:e.color,resource:e.icon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return p("div",{onKeyUp:e=>O(e,i,F,r.KEYUP),class:V,"kup-get-cell-props":()=>i,ref:e=>m.element=e,style:m.style},p("div",{class:"f-cell__content",style:m.styleContent,title:T},l&&l.length>0?l:[i.indents,X,M,H]))};function O(e,t,c,a){const n=t.cell,i=t.column,o=t.component,l=t.row;let p=function(e,t){const c=!("INPUT"!==e.target.tagName);let a=c?e.target.value:e.detail.value;return t===s.NUMBER&&c&&(a=j.ketchup.math.formattedStringToNumberString(a,"")),a}(e,c);if(a===r.UPDATE){switch(c){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);break;case s.CHIP:case s.MULTI_AUTOCOMPLETE:case s.MULTI_COMBOBOX:p=e.detail.stringifiedValues,n.data&&(n.data.data=e.detail.comp.data)}n.obj&&(n.obj.k=p.toString()),n.value=p.toString(),n.displayedValue=null,n.displayedValue=u(i,n)}if(o&&o.rootElement){const t=new CustomEvent(a,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:o,id:o.rootElement.id,cell:n,column:i,event:e,row:l,type:c}});if(o.rootElement.dispatchEvent(t),a===r.UPDATE)try{o.refresh()}catch(e){}}}function x(e){var t;return l.includes(null===(t=e.component)||void 0===t?void 0:t.rootElement.tagName)}function _(e){var t;return i.includes(null===(t=e.component)||void 0===t?void 0:t.rootElement.tagName)}export{v as F,y as I,w as K,m as a,g as b}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,f as s,h as i,H as e,g as h}from"./p-2d42477d.js";import{k as o,d as n,g as r,s as l,V as a,m as c}from"./p-25de68e5.js";import{c as d}from"./p-635bb4b3.js";import{F as p}from"./p-80699a95.js";import"./p-4597f25d.js";import"./p-008ad26c.js";import"./p-f729449f.js";import"./p-7555c10d.js";var m;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the cell.",t.density="The density of the cell, defaults at 'dense' and can be also set to 'wide' or 'medium'.",t.dragEnabled="When set to true, the component is draggable."}(m||(m={}));const u=class{constructor(s){t(this,s),this.kupManager=o(),this.customStyle="",this.data=null,this.density=n.NONE,this.dragEnabled=!1}async addCssClasses(t){if(this.data.cssClass||(this.data.cssClass=""),t)for(let s=0;s<t.length;s++){const i=t[s];this.data.cssClass.indexOf(i)<0&&(this.data.cssClass+=` ${i}`)}this.refresh()}async getProps(t){return r(this,m,t)}async refresh(){s(this)}async removeCssClasses(t){if(this.data.cssClass){if(t)for(let s=0;s<t.length;s++){const i=t[s];this.data.cssClass.indexOf(i)>0&&(this.data.cssClass=this.data.cssClass.replace(new RegExp(i,"g"),""))}this.refresh()}}async setProps(t){l(this,m,t)}didRenderInteractables(){if(this.dragEnabled){const t=()=>({cell:this.data,column:this.generateColumn(),id:this.rootElement.id,multiple:!1,row:this.generateRow()});this.kupManager.interact.draggable(this.rootElement.shadowRoot.querySelector("#"+d),{cursorChecker:()=>null},{callback:t},a.BADGE)}}generateColumn(){return{name:this.data&&this.data.obj&&this.data.obj.t?this.data.obj.t+";"+this.data.obj.p:"KUPCELL",title:this.data&&this.data.obj&&this.data.obj.t?this.data.obj.t+";"+this.data.obj.p:this.kupManager.language.translate(c.EMPTY_OBJECT)}}generateRow(){const t=this.generateColumn(),s={cells:{}};return s.cells[t.name]=this.data,s}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)}componentDidRender(){this.didRenderInteractables(),this.kupManager.debug.logRender(this,!0)}render(){const t={cell:this.data,column:this.generateColumn(),component:this,density:this.density,editable:this.data.isEditable,renderKup:!0,row:this.generateRow()};return i(e,null,i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:d},i(p,Object.assign({},t))))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return h(this)}};u.style=":host{display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}";export{u as kup_cell}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,f as n,h as l,H as a,g as t}from"./p-2d42477d.js";import{k as e,g as r,s as d,c as s}from"./p-25de68e5.js";import{c as o}from"./p-635bb4b3.js";var p;!function(i){i.columns="The number of columns displayed by the grid, the default behavior is 12.",i.customStyle="Custom style of the component. For more information: https://ketchup.smeup.com/ketchup-showcase/#/customization",i.singleLine="When set to true, forces the content on a single line."}(p||(p={}));const u=class{constructor(n){i(this,n),this.kupManager=e(),this.columns=12,this.customStyle="",this.singleLine=!1}async getProps(i){return r(this,p,i)}async refresh(){n(this)}async setProps(i){d(this,p,i)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const i=this.rootElement.children;if(!i||0===i.length)return void this.kupManager.debug.logMessage(this,"Missing slots, not rendering!",s.WARNING);const n=[];for(let a=0;a<i.length;a++){let t=null;if(this.singleLine)t=l("slot",{name:`${a}`});else{const n=i[a].span||i[a].getAttribute("span")||1;t=l("div",{class:`layout-grid__cell layout-grid__cell--span-${n}`},l("slot",{name:`${a}`}))}n.push(t)}const t={};return this.columns&&12!==this.columns&&(t["--kup_grid_columns"]=this.columns),l(a,{style:t},l("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),l("div",{id:o},l("div",{class:this.singleLine?"flex-layout":"layout-grid"},l("div",{class:this.singleLine?"flex-layout__inner":"layout-grid__inner"},n))))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return t(this)}};u.style=":host{--kup_grid_font_size:var(--kup-grid-font-size, var(--kup-font-size));--kup_grid_gap:var(--kup-grid-gap, 24px);--kup_grid_gap_mobile:var(--kup-grid-gap-mobile, 16px);--kup_grid_padding:var(--kup-grid-padding, 24px);display:block;font-size:var(--kup_grid_font_size);height:100%;width:100%}#kup-component{height:100%;width:100%}.layout-grid{box-sizing:border-box;margin:0px auto;padding:var(--kup_grid_padding)}.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap);grid-template-columns:repeat(var(--kup_grid_columns, 12), minmax(0px, 1fr))}.layout-grid .layout-grid__inner .layout-grid__cell{box-sizing:border-box;display:flex;justify-content:center;margin:0px;width:auto}.layout-grid__cell--span-1{grid-column-end:span 1}.layout-grid__cell--span-2{grid-column-end:span 2}.layout-grid__cell--span-3{grid-column-end:span 3}.layout-grid__cell--span-4{grid-column-end:span 4}.layout-grid__cell--span-5{grid-column-end:span 5}.layout-grid__cell--span-6{grid-column-end:span 6}.layout-grid__cell--span-7{grid-column-end:span 7}.layout-grid__cell--span-8{grid-column-end:span 8}.layout-grid__cell--span-9{grid-column-end:span 9}.layout-grid__cell--span-10{grid-column-end:span 10}.layout-grid__cell--span-11{grid-column-end:span 11}.layout-grid__cell--span-12{grid-column-end:span 12}.layout-grid__cell--span-13{grid-column-end:span 13}.layout-grid__cell--span-14{grid-column-end:span 14}.layout-grid__cell--span-15{grid-column-end:span 15}.layout-grid__cell--span-16{grid-column-end:span 16}.layout-grid__cell--span-17{grid-column-end:span 17}.layout-grid__cell--span-18{grid-column-end:span 18}.layout-grid__cell--span-19{grid-column-end:span 19}.layout-grid__cell--span-20{grid-column-end:span 20}.layout-grid__cell--span-21{grid-column-end:span 21}.layout-grid__cell--span-22{grid-column-end:span 22}.layout-grid__cell--span-23{grid-column-end:span 23}.layout-grid__cell--span-24{grid-column-end:span 24}.flex-layout,.flex-layout__inner{height:100%;align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap}.flex-layout__inner{width:auto}.flex-layout__inner *{display:block;margin:0 1.5em}.flex-layout__inner .flex-layout__cell{display:flex}.flex-layout__inner .flex-layout__cell *{justify-content:center;margin:auto}@media (min-width: 600px) and (max-width: 839px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 8), minmax(0px, 1fr))}}@media (max-width: 599px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 4), minmax(0px, 1fr))}}:host(.kup-full-width) .flex-layout__inner{width:100%}:host(.kup-full-width) .flex-layout__inner *{margin:auto}:host(.kup-full-width.scalable-cards) .flex-layout__inner{width:100%}:host(.kup-full-width.scalable-cards) .flex-layout__inner *{margin:0;height:100%;width:100%}";export{u as kup_grid}
|