@sankhyalabs/sankhyablocks 10.1.0-dev.13 → 10.1.0-dev.15
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/{ConfigStorage-5c0590b3.js → ConfigStorage-a4e1e518.js} +2 -2
- package/dist/cjs/{DataFetcher-5181a917.js → DataFetcher-0b6aa084.js} +11 -22
- package/dist/cjs/{ISave-0f98a457.js → ISave-2c455a77.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-1907ffed.js → SnkFormConfigManager-b8c81493.js} +2 -2
- package/dist/cjs/{SnkMultiSelectionListDataSource-e4e38139.js → SnkMultiSelectionListDataSource-72925620.js} +5 -5
- package/dist/cjs/{auth-fetcher-cff55b1f.js → auth-fetcher-7e7796c9.js} +1 -1
- package/dist/cjs/config-header.cjs.entry.js +1 -1
- package/dist/cjs/configs-button.cjs.entry.js +1 -1
- package/dist/cjs/{dataunit-fetcher-1ba5e2cc.js → dataunit-fetcher-8dffbcdf.js} +1 -1
- package/dist/cjs/field-config_2.cjs.entry.js +1 -1
- package/dist/cjs/fields-layout.cjs.entry.js +1 -1
- package/dist/cjs/fields-selector.cjs.entry.js +1 -1
- package/dist/cjs/{form-config-fetcher-4a679e23.js → form-config-fetcher-5516d68a.js} +1 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +1 -1
- package/dist/cjs/{index-13d05f03.js → index-516250fa.js} +1 -1
- package/dist/cjs/{index-1cf293c1.js → index-dc83c596.js} +0 -17
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +6 -6
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +7 -7
- package/dist/cjs/snk-attach.cjs.entry.js +8 -8
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +8 -8
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
- package/dist/cjs/{snk-data-unit-061487a8.js → snk-data-unit-47f02b9e.js} +3 -3
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-default-filter.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -10
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +4 -4
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +4 -4
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +5 -5
- package/dist/cjs/snk-grid.cjs.entry.js +20 -14
- package/dist/cjs/{snk-guides-viewer-2efe60a7.js → snk-guides-viewer-41c22d96.js} +7 -7
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -10
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +5 -5
- package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +10 -10
- package/dist/cjs/snk-taskbar.cjs.entry.js +3 -3
- package/dist/cjs/{taskbar-elements-fb5d1e08.js → taskbar-elements-756fcbe7.js} +2 -2
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/components/snk-grid/snk-grid.js +12 -7
- package/dist/collection/lib/message/SnkMessageBuilder.js +11 -2
- package/dist/components/DataFetcher.js +11 -2
- package/dist/components/snk-grid2.js +12 -6
- package/dist/esm/{ConfigStorage-bd096633.js → ConfigStorage-39ac8fef.js} +2 -2
- package/dist/esm/{DataFetcher-5780ad39.js → DataFetcher-0b9da57d.js} +11 -2
- package/dist/esm/{ISave-8a22ec18.js → ISave-f1c9269b.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-437e98bb.js → SnkFormConfigManager-a87566c8.js} +2 -2
- package/dist/esm/{SnkMultiSelectionListDataSource-42125ef4.js → SnkMultiSelectionListDataSource-493ae8c8.js} +5 -5
- package/dist/esm/{auth-fetcher-28b9d0db.js → auth-fetcher-acdc1cb4.js} +1 -1
- package/dist/esm/config-header.entry.js +1 -1
- package/dist/esm/configs-button.entry.js +1 -1
- package/dist/esm/{dataunit-fetcher-c4251d80.js → dataunit-fetcher-4c312b43.js} +1 -1
- package/dist/esm/field-config_2.entry.js +1 -1
- package/dist/esm/fields-layout.entry.js +1 -1
- package/dist/esm/fields-selector.entry.js +1 -1
- package/dist/esm/{form-config-fetcher-d0536a71.js → form-config-fetcher-7cda6254.js} +1 -1
- package/dist/esm/guides-configurator.entry.js +1 -1
- package/dist/esm/{index-446f9341.js → index-3355bd17.js} +1 -1
- package/dist/esm/{index-479e1293.js → index-7fd74680.js} +0 -17
- package/dist/esm/loader.js +2 -2
- package/dist/esm/pesquisa-grid_2.entry.js +5 -5
- package/dist/esm/sankhyablocks.js +2 -2
- package/dist/esm/snk-actions-button_9.entry.js +6 -6
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +7 -7
- package/dist/esm/snk-attach.entry.js +8 -8
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +8 -8
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-custom-slot-guide.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +6 -6
- package/dist/esm/{snk-data-unit-4a1ef77f.js → snk-data-unit-9e9d9d46.js} +3 -3
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-default-filter.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +10 -10
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-expression-group_2.entry.js +2 -2
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +1 -1
- package/dist/esm/snk-filter-bar_4.entry.js +4 -4
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +1 -1
- package/dist/esm/snk-filter-field-search_2.entry.js +1 -1
- package/dist/esm/snk-filter-modal-item.entry.js +4 -4
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/esm/snk-form-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +1 -1
- package/dist/esm/snk-form_2.entry.js +5 -5
- package/dist/esm/snk-grid.entry.js +20 -14
- package/dist/esm/{snk-guides-viewer-c182d058.js → snk-guides-viewer-31ef5fc6.js} +7 -7
- package/dist/esm/snk-guides-viewer.entry.js +10 -10
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +5 -5
- package/dist/esm/snk-pesquisa.entry.js +5 -5
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-bar.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +10 -10
- package/dist/esm/snk-taskbar.entry.js +3 -3
- package/dist/esm/{taskbar-elements-faaf5d8f.js → taskbar-elements-bf5b73f1.js} +2 -2
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/p-02cb4829.entry.js +1 -0
- package/dist/sankhyablocks/{p-78d4b3e3.entry.js → p-0893a694.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5d408e7e.entry.js → p-0da30fd9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-55d7abe7.js → p-156c9f38.js} +1 -1
- package/dist/sankhyablocks/{p-f35f2eb3.entry.js → p-17856827.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b987e15d.js → p-1be69fd4.js} +1 -1
- package/dist/sankhyablocks/{p-e679c75a.entry.js → p-1dba30c9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-21107f0d.entry.js → p-1e469905.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0e4f8b86.js → p-1f310bc6.js} +1 -1
- package/dist/sankhyablocks/{p-96d45943.entry.js → p-227e82b2.entry.js} +1 -1
- package/dist/sankhyablocks/p-2624dfd2.entry.js +1 -0
- package/dist/sankhyablocks/{p-aca74b21.js → p-2ac55a5d.js} +1 -1
- package/dist/sankhyablocks/{p-99a11017.entry.js → p-301baf9c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2e882241.entry.js → p-357e10e0.entry.js} +1 -1
- package/dist/sankhyablocks/{p-987cd79d.entry.js → p-35a26068.entry.js} +1 -1
- package/dist/sankhyablocks/{p-180716b2.entry.js → p-3671cdd4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-27482793.entry.js → p-4575c4aa.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3c046287.js → p-48a5c311.js} +2 -2
- package/dist/sankhyablocks/{p-3d41f5a8.entry.js → p-497ece60.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6e5af618.entry.js → p-4deb7f46.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9f16d33e.entry.js → p-4e9e570c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3b167a03.entry.js → p-516411de.entry.js} +1 -1
- package/dist/sankhyablocks/{p-162bddae.entry.js → p-522d36aa.entry.js} +1 -1
- package/dist/sankhyablocks/p-52691b42.js +1 -0
- package/dist/sankhyablocks/{p-825098c1.entry.js → p-56b1b397.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d3534985.js → p-59158ba4.js} +1 -1
- package/dist/sankhyablocks/{p-c98c79c3.entry.js → p-5c9bea92.entry.js} +1 -1
- package/dist/sankhyablocks/{p-91a9abb6.entry.js → p-613eb22e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-49ddc27a.entry.js → p-670b8802.entry.js} +1 -1
- package/dist/sankhyablocks/{p-60dd1d27.entry.js → p-67137d7c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1b1373b6.js → p-6768f176.js} +1 -1
- package/dist/sankhyablocks/{p-03f02b12.entry.js → p-7375bf6a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b7e891cc.entry.js → p-7961c550.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4db9dbf8.js → p-7ee6b1bf.js} +1 -1
- package/dist/sankhyablocks/{p-75af335e.entry.js → p-82b59a45.entry.js} +1 -1
- package/dist/sankhyablocks/p-82bb3eda.js +2 -0
- package/dist/sankhyablocks/{p-55798617.js → p-8336900b.js} +1 -1
- package/dist/sankhyablocks/{p-d2ec9a24.entry.js → p-8488fa7e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-cb4343c4.entry.js → p-8783d550.entry.js} +1 -1
- package/dist/sankhyablocks/{p-471b34f4.entry.js → p-8d76a0ca.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-8d84d6ab.entry.js} +1 -1
- package/dist/sankhyablocks/{p-a1d23fef.js → p-907e96eb.js} +1 -1
- package/dist/sankhyablocks/{p-e258de96.entry.js → p-939523b3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-a9b16874.entry.js → p-959fe522.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e250432.entry.js → p-98c70173.entry.js} +1 -1
- package/dist/sankhyablocks/{p-82a3d522.entry.js → p-98e3d0a1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9ab6ae1e.js → p-9e4555ab.js} +2 -2
- package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-abfc9880.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1037ea7b.entry.js → p-b5832fa0.entry.js} +1 -1
- package/dist/sankhyablocks/{p-01ca59fc.entry.js → p-c2bb0659.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-c60d864f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-028fb380.entry.js → p-cb7c592f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f3027bc9.entry.js → p-cc68a0c1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c3dbf441.entry.js → p-ce207f2a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c4fcf1fb.entry.js → p-cfa4c183.entry.js} +1 -1
- package/dist/sankhyablocks/{p-42272de8.entry.js → p-d5d7fe52.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b04db4ac.entry.js → p-dd89bc02.entry.js} +1 -1
- package/dist/sankhyablocks/{p-667cab42.entry.js → p-def17f0e.entry.js} +1 -1
- package/dist/sankhyablocks/p-e41c86b2.entry.js +1 -0
- package/dist/sankhyablocks/{p-4c2e2767.entry.js → p-e47d6f17.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7345782c.entry.js → p-fd1a5a61.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-30a58e29.entry.js +0 -1
- package/dist/sankhyablocks/p-903fa0b4.entry.js +0 -1
- package/dist/sankhyablocks/p-b9699067.js +0 -1
- package/dist/sankhyablocks/p-d8d8169b.js +0 -2
- package/dist/sankhyablocks/p-fd05e31d.entry.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e,t,n,l=!1,o=!1,s=!1,i=null,c=!1;const r="http://www.w3.org/1999/xlink",a={},f=e=>"object"==(e=typeof e)||"function"===e;function u(e){var t,n,l;return null!==(l=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const d=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,c=!1;const r=[],a=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!f(l))&&(l+=""),i&&c?r[r.length-1].t+=l:r.push(i?p(null,l):l),c=i)};if(a(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,r,m);const u=p(e,null);return u.l=t,r.length>0&&(u.o=r),u.i=o,u.u=s,u},p=(e,t)=>({p:0,$:e,t,m:null,o:null,l:null,i:null,u:null}),$={},m={forEach:(e,t)=>e.map(y).forEach(t),map:(e,t)=>e.map(y).map(t).map(h)},y=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.$,vtext:e.t}),h=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),d(e.vtag,t,...e.vchildren||[])}const t=p(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.i=e.vkey,t.u=e.vname,t},b=e=>re(e).h,v=(e,t,n)=>{const l=b(e);return{emit:e=>w(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},w=(e,t,n)=>{const l=be.ce(t,n);return e.dispatchEvent(l),l},k=new WeakMap,g=e=>"sc-"+e.v,S=(e,t,n,l,o,s)=>{if(n!==l){let i=ue(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=C(n),s=C(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const a=f(l);if((i||a&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let u=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,u=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(u?e.removeAttributeNS(r,t):e.removeAttribute(t)):(!i||4&s||o)&&!a&&(l=!0===l?"":l,u?e.setAttributeNS(r,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):ue(ye,c)?c.slice(2):c[2]+t.slice(3),n&&be.rel(e,t,n,!1),l&&be.ael(e,t,l,!1)}},j=/\s/,C=e=>e?e.split(j):[],M=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.l||a,i=t.l||a;for(l in s)l in i||S(o,l,s[l],void 0,n,t.p);for(l in i)S(o,l,s[l],i[l],n,t.p)},O=(o,i,c,r)=>{const a=i.o[c];let f,u,d,p=0;if(l||(s=!0,"slot"===a.$&&(e&&r.classList.add(e+"-s"),a.p|=a.o?2:1)),null!==a.t)f=a.m=he.createTextNode(a.t);else if(1&a.p)f=a.m=he.createTextNode("");else if(f=a.m=he.createElement(2&a.p?"slot-fb":a.$),M(null,a,!1),null!=e&&f["s-si"]!==e&&f.classList.add(f["s-si"]=e),a.o)for(p=0;p<a.o.length;++p)u=O(o,a,p,f),u&&f.appendChild(u);return f["s-hn"]=n,3&a.p&&(f["s-sr"]=!0,f["s-cr"]=t,f["s-sn"]=a.u||"",d=o&&o.o&&o.o[c],d&&d.$===a.$&&o.m&&R(o.m,!1)),f},R=(e,t)=>{be.p|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(E(o).insertBefore(o,W(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&R(o,t)}be.p&=-2},x=(e,t,l,o,s,i)=>{let c,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=O(null,l,s,e),c&&(o[s].m=c,r.insertBefore(c,W(t))))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,A(l),o=!0,s["s-ol"]?s["s-ol"].remove():R(s,!0),s.remove())},T=(e,t)=>e.$===t.$&&("slot"===e.$?e.u===t.u:e.i===t.i),W=e=>e&&e["s-ol"]||e,E=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,L=(e,t)=>{const n=t.m=e.m,l=e.o,o=t.o,s=t.t;let i;null===s?("slot"===t.$||M(e,t,!1),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,c=0,r=0,a=0,f=t.length-1,u=t[0],d=t[f],p=l.length-1,$=l[0],m=l[p];for(;i<=f&&c<=p;)if(null==u)u=t[++i];else if(null==d)d=t[--f];else if(null==$)$=l[++c];else if(null==m)m=l[--p];else if(T(u,$))L(u,$),u=t[++i],$=l[++c];else if(T(d,m))L(d,m),d=t[--f],m=l[--p];else if(T(u,m))"slot"!==u.$&&"slot"!==m.$||R(u.m.parentNode,!1),L(u,m),e.insertBefore(u.m,d.m.nextSibling),u=t[++i],m=l[--p];else if(T(d,$))"slot"!==u.$&&"slot"!==m.$||R(d.m.parentNode,!1),L(d,$),e.insertBefore(d.m,u.m),d=t[--f],$=l[++c];else{for(r=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].i&&t[a].i===$.i){r=a;break}r>=0?(s=t[r],s.$!==$.$?o=O(t&&t[c],n,r,e):(L(s,$),t[r]=void 0,o=s.m),$=l[++c]):(o=O(t&&t[c],n,c,e),$=l[++c]),o&&E(u.m).insertBefore(o,W(u.m))}i>f?x(e,null==l[p+1]?null:l[p+1].m,n,l,c,p):c>p&&P(t,i,f)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),x(n,null,t,o,0,o.length-1)):null!==l&&P(l,0,l.length-1)):(i=n["s-cr"])?i.parentNode.textContent=s:e.t!==s&&(n.data=s)},N=e=>{const t=e.childNodes;let n,l,o,s,i,c;for(l=0,o=t.length;l<o;l++)if(n=t[l],1===n.nodeType){if(n["s-sr"])for(i=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(c=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||""!==i){if(1===c&&i===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===c||3===c&&""!==t[s].textContent.trim()){n.hidden=!0;break}N(n)}},U=[],D=e=>{let t,n,l,s,i,c,r=0;const a=e.childNodes,f=a.length;for(;r<f;r++){if(t=a[r],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],c=l.length-1;c>=0;c--)n=l[c],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(F(n,s)?(i=U.find((e=>e.k===n)),o=!0,n["s-sn"]=n["s-sn"]||s,i?i.g=t:U.push({g:t,k:n}),n["s-sr"]&&U.map((e=>{F(e.k,n["s-sn"])&&(i=U.find((e=>e.k===n)),i&&!e.g&&(e.g=i.g))}))):U.some((e=>e.k===n))||U.push({k:n}));1===t.nodeType&&D(t)}},F=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,A=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(A)},H=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},q=(e,t)=>{if(e.p|=16,!(4&e.p))return H(e,e.j),Oe((()=>V(e,t)));e.p|=512},V=(e,t)=>{const n=e.C;let l;return t?(e.p|=256,e.M&&(e.M.map((([e,t])=>K(n,e,t))),e.M=null),l=K(n,"componentWillLoad")):l=K(n,"componentWillUpdate"),l=Q(l,(()=>K(n,"componentWillRender"))),Q(l,(()=>_(e,n,t)))},_=async(e,t,n)=>{const l=e.h,o=l["s-rc"];n&&(e=>{const t=e.O,n=e.h,l=t.p,o=((e,t)=>{var n;let l=g(t);const o=me.get(l);if(e=11===e.nodeType?e:he,o)if("string"==typeof o){let t,s=k.get(e=e.head||e);if(s||k.set(e,s=new Set),!s.has(l)){{t=he.createElement("style"),t.innerHTML=o;const l=null!==(n=be.R)&&void 0!==n?n:u(he);null!=l&&t.setAttribute("nonce",l),e.insertBefore(t,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"),2&l&&n.classList.add(o+"-s"))})(e);z(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>G(e);0===t.length?n():(Promise.all(t).then(n),e.p|=4,t.length=0)}},z=(c,r)=>{try{i=r,r=r.render(),c.p&=-17,c.p|=2,((i,c)=>{const r=i.h,a=i.O,f=i.P||p(null,null),u=(e=>e&&e.$===$)(c)?c:d(null,null,c);if(n=r.tagName,a.T&&(u.l=u.l||{},a.T.map((([e,t])=>u.l[t]=r[e]))),u.$=null,u.p|=4,i.P=u,u.m=f.m=r.shadowRoot||r,e=r["s-sc"],t=r["s-cr"],l=0!=(1&a.p),o=!1,L(f,u),be.p|=1,s){let e,t,n,l,o,s;D(u.m);let i=0;for(;i<U.length;i++)e=U[i],t=e.k,t["s-ol"]||(n=he.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<U.length;i++)if(e=U[i],t=e.k,e.g){for(l=e.g.parentNode,o=e.g.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&N(u.m),be.p&=-2,U.length=0})(c,r)}catch(e){de(e,c.h)}return i=null,null},B=()=>i,G=e=>{const t=e.h,n=e.C,l=e.j;K(n,"componentDidRender"),64&e.p?K(n,"componentDidUpdate"):(e.p|=64,X(t),K(n,"componentDidLoad"),e.W(t),l||J()),e.L(t),e.S&&(e.S(),e.S=void 0),512&e.p&&Me((()=>q(e,!1))),e.p&=-517},I=e=>{{const t=re(e),n=t.h.isConnected;return n&&2==(18&t.p)&&q(t,!1),n}},J=()=>{X(he.documentElement),Me((()=>w(ye,"appload",{detail:{namespace:"sankhyablocks"}})))},K=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){de(e)}},Q=(e,t)=>e&&e.then?e.then(t):t(),X=e=>e.classList.add("hydrated"),Y=(e,t,n)=>{if(t.N){e.watchers&&(t.U=e.watchers);const l=Object.entries(t.N),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>re(this).D.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=re(e),s=o.h,i=o.D.get(t),c=o.p,r=o.C;if(n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.N[t][0]),(!(8&c)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.D.set(t,n),r)){if(l.U&&128&c){const e=l.U[t];e&&e.map((e=>{try{r[e](n,i,t)}catch(e){de(e,s)}}))}if(2==(18&c)){if(r.componentShouldUpdate&&!1===r.componentShouldUpdate(n,i,t))return;q(o,!1)}}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=re(this);return n.F.then((()=>n.C[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){be.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.T.push([e,o]),o}))}}return e},Z=e=>{K(e,"connectedCallback")},ee=(e,t={})=>{var n;const l=[],o=t.exclude||[],s=ye.customElements,i=he.head,c=i.querySelector("meta[charset]"),r=he.createElement("style"),a=[];let f,d=!0;Object.assign(be,t),be.A=new URL(t.resourcesUrl||"./",he.baseURI).href,e.map((e=>{e[1].map((t=>{const n={p:t[0],v:t[1],N:t[2],H:t[3]};n.N=t[2],n.H=t[3],n.T=[],n.U={};const i=n.v,c=class extends HTMLElement{constructor(e){super(e),fe(e=this,n),1&n.p&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):be.jmp((()=>(e=>{if(0==(1&be.p)){const t=re(e),n=t.O,l=()=>{};if(1&t.p)ne(e,t,n.H),Z(t.C);else{t.p|=1,12&n.p&&(e=>{const t=e["s-cr"]=he.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){H(t,t.j=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.p)){{if(t.p|=32,(o=$e(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.U=o.watchers,Y(o,n,2),o.isProxied=!0);const e=()=>{};t.p|=8;try{new o(t)}catch(e){de(e)}t.p&=-9,t.p|=128,e(),Z(t.C)}if(o.style){let e=o.style;const t=g(n);if(!me.has(t)){const l=()=>{};((e,t,n)=>{let l=me.get(e);we&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,me.set(e,l)})(t,e,!!(1&n.p)),l()}}}const s=t.j,i=()=>q(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){be.jmp((()=>(()=>{if(0==(1&be.p)){const e=re(this),t=e.C;e.q&&(e.q.map((e=>e())),e.q=void 0),K(t,"disconnectedCallback")}})()))}componentOnReady(){return re(this).V}};n._=e[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,Y(c,n,1)))}))}));{r.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles","");const e=null!==(n=be.R)&&void 0!==n?n:u(he);null!=e&&r.setAttribute("nonce",e),i.insertBefore(r,c?c.nextSibling:i.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):be.jmp((()=>f=setTimeout(J,30)))},te=(e,t)=>t,ne=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=oe(e,n),i=le(t,o),c=se(n);be.ael(s,l,i,c),(t.q=t.q||[]).push((()=>be.rel(s,l,i,c)))}))},le=(e,t)=>n=>{try{256&e.p?e.C[t](n):(e.M=e.M||[]).push([t,n])}catch(e){de(e)}},oe=(e,t)=>8&t?ye:16&t?he.body:e,se=e=>0!=(2&e),ie=e=>be.R=e,ce=new WeakMap,re=e=>ce.get(e),ae=(e,t)=>ce.set(t.C=e,t),fe=(e,t)=>{const n={p:0,h:e,O:t,D:new Map};return n.F=new Promise((e=>n.L=e)),n.V=new Promise((e=>n.W=e)),e["s-p"]=[],e["s-rc"]=[],ne(e,n,t.H),ce.set(e,n)},ue=(e,t)=>t in e,de=(e,t)=>(0,console.error)(e,t),pe=new Map,$e=e=>{const t=e.v.replace(/-/g,"_"),n=e._,l=pe.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(pe.set(n,e),e[t])),de)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},me=new Map,ye="undefined"!=typeof window?window:{},he=ye.document||{head:{}},be={p:0,A:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},ve=e=>Promise.resolve(e),we=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),ke=[],ge=[],Se=(e,t)=>n=>{e.push(n),c||(c=!0,t&&4&be.p?Me(Ce):be.raf(Ce))},je=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){de(e)}e.length=0},Ce=()=>{je(ke),je(ge),(c=ke.length>0)&&be.raf(Ce)},Me=e=>ve().then(e),Oe=Se(ge,!0);export{te as F,$ as H,B as a,ee as b,v as c,I as f,b as g,d as h,ve as p,ae as r,ie as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as s,F as e,g as r}from"./p-d8d8169b.js";import{KeyboardManager as a,Action as n,ElementIDUtils as o,ApplicationContext as h,StringUtils as d}from"@sankhyalabs/core";import{SelectionMode as l}from"@sankhyalabs/core/dist/dataunit/DataUnit";import{buildFieldSearch as c}from"@sankhyalabs/ezui/dist/collection/utils";import"./p-1b1373b6.js";import"./p-3c046287.js";import{C as u,S as g,a as m,R as k,b as v,c as p}from"./p-d3534985.js";import{P as f,E as T}from"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-9ab6ae1e.js";import"./p-ff1990ad.js";import"./p-4db9dbf8.js";import"./p-9019a32f.js";import{C as b}from"./p-0e4f8b86.js";import{s as C}from"./p-55798617.js";import{g as E}from"./p-7dd49d15.js";import{v as R}from"./p-76e66fd9.js";import{T as _}from"./p-b987e15d.js";import{T as O}from"./p-1a0caadb.js";import"./p-8d884fab.js";import"./p-8f3f2306.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";class I extends u{getFilters(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getAppliedFilters()}getOrders(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getSort()}getResourceURI(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.name}getSelectedNumber(){return this.dataUnit.getSelectionInfo().length}getTotalRecords(){var i,t,s;const{total:e}=(null===(i=this.dataUnit)||void 0===i?void 0:i.getPaginationInfo())||{};return null!=e?e:null===(s=null===(t=this.dataUnit)||void 0===t?void 0:t.records)||void 0===s?void 0:s.length}getSelectedIDs(){return E(this.dataUnit)}getOffset(){return this.getExporterOffset(this.getPaginationInfo())}getPageSize(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.pageSize}getExportLimit(){return 5e3}getRecordID(){var i,t,s;return null===(s=null===(t=null===(i=this.dataUnit)||void 0===i?void 0:i.records)||void 0===t?void 0:t[0])||void 0===s?void 0:s.__record__id__}getPaginationInfo(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getPaginationInfo()}getExporterOffset(i){if(null==i)return;const t=i.firstRecord;return t>0?t-1:t}}const S=class{constructor(s){i(this,s),this.actionClick=t(this,"actionClick",7),this.gridDoubleClick=t(this,"gridDoubleClick",7),this.componentReady=t(this,"componentReady",7),this._customEditors=new Map,this._customRenders=new Map,this._keyboardManager=new a,this._topTaskbarProcessor=new O({"snkGridTopTaskbar.regular":["FORM_MODE","CONFIGURATOR","INSERT"],"snkGridTopTaskbar.regular.secondary":["FORM_MODE","CONFIGURATOR","INSERT"],"snkGridTopTaskbar.regular.singleTaskbar":[],"snkGridTopTaskbar.finish_edition":["CANCEL","SAVE",this.handleAddFormMode()],"snkGridTopTaskbar.finish_edition.secondary":[],"snkGridTopTaskbar.finish_edition.singleTaskbar":[]}),this._headerTaskbarProcessor=new O({"snkGridHeaderTaskbar.unselected":["REFRESH","DATA_EXPORTER","ACTIONS_BUTTON","MORE_OPTIONS"],"snkGridHeaderTaskbar.selected":this.getGridHeaderSelectedBtns(),"snkGridHeaderTaskbar.detail.unselected":["REFRESH","MORE_OPTIONS"],"snkGridHeaderTaskbar.detail.selected":["UPDATE","ATTACH","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","REFRESH"],"snkGridHeaderTaskbar.singleTaskbar.unselected":["INSERT","FORM_MODE","CONFIGURATOR","REFRESH","DATA_EXPORTER","ACTIONS_BUTTON","MORE_OPTIONS"],"snkGridHeaderTaskbar.singleTaskbar.selected":["UPDATE","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","ATTACH","FORM_MODE","CONFIGURATOR","REFRESH","DATA_EXPORTER","ACTIONS_BUTTON"],"snkGridHeaderTaskbar.singleTaskbar.detail.unselected":["INSERT","FORM_MODE","CONFIGURATOR","REFRESH","MORE_OPTIONS"],"snkGridHeaderTaskbar.singleTaskbar.detail.selected":["UPDATE","ATTACH","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","FORM_MODE","CONFIGURATOR","REFRESH"],"snkGridHeaderTaskbar.singleTaskbar.finish_edition":["CANCEL","SAVE",this.handleAddFormMode()]}),this.dataUnitInterceptor={interceptAction:async i=>i.type===n.METADATA_LOADED?await this.interceptMetadataLoaded(i):i.type===n.LOADING_DATA?await this.interceptLoadData(i):i},this._dataUnit=void 0,this._dataState=void 0,this._gridConfig=void 0,this._popUpGridConfig=!1,this._showSnkFilterBar=!0,this._enableContinuousInsert=!1,this._filterMode="regular",this.columnFilterDataSource=new g,this.enableLockManagerLoadingComp=!1,this.enableLockManagerTaskbarClick=!1,this.configName=void 0,this.filterBarTitle=void 0,this.resourceID=void 0,this.selectionToastConfig=void 0,this.actionsList=void 0,this.isDetail=void 0,this.taskbarManager=void 0,this.statusResolver=void 0,this.multipleSelection=void 0,this.presentationMode=f.PRIMARY,this.messagesBuilder=void 0,this.useEnterLikeTab=!1,this.recordsValidator=void 0,this.canEdit=!0,this.taskbarCustomContainerId=void 0,this.gridHeaderCustomSlotId="GRID_HEADER_CUSTOM_ELEMENTS",this.gridHeaderDynamicSearchSlotId="GRID_HEADER_DYNAMIC_SEARCH",this.topTaskbarCustomSlotId="GRID_TASKBAR_CUSTOM_ELEMENTS",this.disablePersonalizedFilter=void 0,this.gridLegacyConfigName=void 0,this.filterBarLegacyConfigName=void 0,this.autoLoad=void 0,this.autoFocus=!0,this.enableGridInsert=!1,this.outlineMode=!1,this.suppressHorizontalScroll=!1,this.strategyExporter=T.SERVER_SIDE,this.useSearchColumn=!0,this.multipleEditionEnabled=!0,this.paginationCounterMode="auto",this.suppressCheckboxColumn=void 0,this.suppressFilterColumn=!1,this.compact=void 0,this.filterCustomConfig=void 0,this.filterCustomConfigInterceptor=void 0}getGridHeaderSelectedBtns(){const i=[_.UPDATE,_.CLONE,_.REMOVE,_.MORE_OPTIONS,_.DIVIDER,_.ATTACH,_.FORM_MODE,_.CONFIGURATOR,_.REFRESH,_.DATA_EXPORTER,_.ACTIONS_BUTTON];return this.multipleEditionEnabled&&i.unshift(_.UPDATE_MULTIPLE),i}async refreshColumnFilterDataSource(){await this._grid.refreshColumnFilterDataSource()}reloadConfig(){this.loadConfig()}async showConfig(){null!=this._grid&&this.openGridConfig()}async hideConfig(){null!=this._grid&&this.closeGridConfig()}async setConfig(i){this.setGridConfig(i)}async reloadFilterBar(){var i;null===(i=this._snkFilterBar)||void 0===i||i.reload()}async getFilterBar(){return this._snkFilterBar}async addCustomEditor(i,t,s){if(this._grid)return void this._grid.addCustomEditor(i,t,s);const e=new Map(this._customEditors);e.set(i,{customEditor:t,detailContext:s}),this._customEditors=e}async addGridCustomRender(i,t,s){if(this._grid)return void this._grid.addGridCustomRender(i,t,s);const e=new Map(this._customRenders);e.set(i,{customRender:t,detailContext:s}),this._customRenders=e}async addCustomValueFormatter(i,t){this._grid.addCustomValueFormatter(i,t)}async removeCustomValueFormatter(i){this._grid.removeCustomValueFormatter(i)}async setFocus(){this._grid.setFocus()}async handleClick(i){var t;if(this.hasToBlockEvent(i)){if(i.preventDefault(),i.stopPropagation(),!await this._dataUnit.cancelEdition())return;const s=new i.constructor(i.type,i);null===(t=i.target)||void 0===t||t.dispatchEvent(s)}this._grid&&!this._grid.contains(i.target)&&this._grid.stopEdit()}hasToBlockEvent(i){var t;return(null===(t=this._snkFilterBar)||void 0===t?void 0:t.contains(i.target))&&this.enableGridInsert&&this._dataUnit.hasNewRecord()}async handleGridLegacyConfigName(i,t){i&&i!==t&&(this.addGridLegacyConfigName(),this.loadConfig())}handleAddFormMode(){return this.enableGridInsert?_.FORM_MODE:""}openGridConfig(){this._grid.getColumnsState().then((i=>{this._snkGridConfig.columns=i.filter((i=>i.name)),this._popUpGridConfig=!0}))}closeGridConfig(){this._popUpGridConfig=!1}setGridConfig(i){this._gridConfig=i,m.assertDefaultSorting(this._gridConfig,this._dataUnit)}fixColumNameCharset(i){try{return decodeURIComponent(escape(i))}catch(t){return i}}normalizeGridConfig(i){if(!i)return i;const t=i.columns.map((i=>Object.assign(Object.assign({},i),{name:this.fixColumNameCharset(i.name)})));return Object.assign(Object.assign({},i),{columns:t})}loadConfig(){b.loadGridConfig(this.configName,this.resourceID).then((i=>{this.setGridConfig(this.normalizeGridConfig(i))})).catch((i=>{console.warn(i)}))}addGridLegacyConfigName(){this.gridLegacyConfigName&&this.configName&&b.addGridLegacyConfig(this.configName,this.gridLegacyConfigName)}hasCalculatedFields(i){let t=!1;return i.forEach((i=>{var s;"true"===(null===(s=this._dataUnit.getField(i).properties)||void 0===s?void 0:s.calculated)&&(t=!0)})),t}gridConfigChangeHandler(i){const t=this.normalizeGridConfig(i.detail);b.saveGridConfig(t,this.configName,this.resourceID),i.stopPropagation()}modalConfigChangeHandler(i){const t=this.normalizeGridConfig(i.detail);this._grid.setColumnsState(t.columns).then((()=>{this.setGridConfig(t),this.closeGridConfig(),this.dataExporterProviderStore()})),i.stopPropagation()}async hasToForceClientSideExporter(){if(!this._grid)return!1;const i=(await this._grid.getAppliedColumnFilters()).map((i=>i.name.replace("FILTRO_COLUNA_","")));return this.hasCalculatedFields(i)}async dataExporterProviderStore(){const i=await this.hasToForceClientSideExporter()||this.strategyExporter===T.CLIENT_SIDE?new p(this._dataUnit,this._grid):new I(this._dataUnit,this._grid);C.set("exporterProviders",Object.assign(Object.assign({},C.get("exporterProviders")),{[this.configName]:i}))}addElementID(){o.addIDInfo(this._element,null,{dataUnit:this._dataUnit})}loadGridCustomFormatters(i){i&&this._grid&&i.forEach((i=>{var t;(null===(t=i.properties)||void 0===t?void 0:t.rm_precision)&&this.addCustomValueFormatter(i.name,this._rmPrecisionCustomValueFormatter)}))}async interceptMetadataLoaded(i){return this.loadGridCustomFormatters(i.payload.fields),i}async interceptLoadData(i){var t;if(R(null===(t=this._snkFilterBar)||void 0===t?void 0:t.filterConfig))return i;{const i=this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.title",{}),t=this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.message",{});await this._application.error(i,t)}}finishLoading(){this._dataUnit.addInterceptor(this.dataUnitInterceptor),m.assertDefaultSorting(this._gridConfig,this._dataUnit),this.addElementID(),null!=this.columnFilterDataSource&&(this.columnFilterDataSource.setApplication(this._application),this.columnFilterDataSource.setDataUnit(this._dataUnit))}setCustomRenders(){if(this._grid)for(const[i,t]of this._customRenders)this._grid.addGridCustomRender(i,t.customRender,t.detailContext),this._customRenders.delete(i)}setCustomEditors(){if(this._grid)for(const[i,t]of this._customEditors)this._grid.addCustomEditor(i,t.customEditor,t.detailContext),this._customEditors.delete(i)}componentWillLoad(){this._application=h.getContextValue("__SNK__APPLICATION__");let i=this._element.parentElement;for(;i;){if("SNK-DATA-UNIT"===i.tagName.toUpperCase()){this._snkDataUnit=i,this._dataUnit=this._snkDataUnit.dataUnit,this._dataUnit?this.finishLoading():this._snkDataUnit.addEventListener("dataUnitReady",(i=>{this._dataUnit=i.detail,this.finishLoading()})),this.messagesBuilder||(this.messagesBuilder=this._snkDataUnit.messagesBuilder),this._snkDataUnit.addEventListener("dataStateChange",this.handleDataStateChange.bind(this)),this._snkDataUnit.addEventListener("cancelEdition",(()=>{var i;(null===(i=this._dataState)||void 0===i?void 0:i.recordsIsEmpty)&&this._dataUnit.clearSelection()}));break}i=i.parentElement}this._rmPrecisionCustomValueFormatter=new k,this.addGridLegacyConfigName(),this.loadConfig(),this._continuousInsertUtils=new v(this._application,this.resourceID,this.configName),this.enableGridInsert&&this._continuousInsertUtils.getConfig().then((i=>this._enableContinuousInsert=i))}componentDidRender(){var i,t;this._rmPrecisionCustomValueFormatter.setGrid(this._grid),this.loadGridCustomFormatters(null===(t=null===(i=this._dataUnit)||void 0===i?void 0:i.metadata)||void 0===t?void 0:t.fields),this.setCustomRenders(),this.setCustomEditors()}async handleDataStateChange(i){this._dataState=i.detail,this._rmPrecisionCustomValueFormatter.setDataState(this._dataState)}getHeaderDisabledButtons(){var i;const t=[];return(null===(i=this._dataState)||void 0===i?void 0:i.selectionInfo)&&(this._dataState.selectionInfo.length>1&&t.push(_.CLONE,_.ATTACH,_.UPDATE),this._dataState.selectionInfo.isAllRecords()&&t.push(_.REMOVE)),t}getInvisibleButtons(){var i,t;let s=[];return this._dataUnit&&0!==this._dataUnit.records.length||s.push(_.DATA_EXPORTER),(null===(i=this._dataState)||void 0===i?void 0:i.selectionInfo.mode)===l.ALL_RECORDS&&s.push(_.ACTIONS_BUTTON),1===(null===(t=this._dataState)||void 0===t?void 0:t.selectionInfo.length)&&s.push(_.UPDATE_MULTIPLE),s}componentWillRender(){const i=this.getInvisibleButtons();this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(),this.taskbarManager,this._dataState,this.getHeaderDisabledButtons(),i),this._topTaskbarProcessor.process(this.getTopTaskBarId(),this.taskbarManager,this._dataState,void 0,i),this.dataExporterProviderStore()}getHeaderTaskbarId(){var i,t;const s=this._dataState&&!!(null===(i=this._dataState.selectionInfo)||void 0===i?void 0:i.length),e={primary:this.isDetail?"snkGridHeaderTaskbar.detail":"snkGridHeaderTaskbar",secondary:this.isDetail?"snkGridHeaderTaskbar.detail":"snkGridHeaderTaskbar",singleTaskbar:this.isDetail?"snkGridHeaderTaskbar.singleTaskbar.detail":"snkGridHeaderTaskbar.singleTaskbar"}[this.presentationMode];let r=s?`${e}.selected`:`${e}.unselected`;return(null===(t=this._dataState)||void 0===t?void 0:t.isDirty)&&this.presentationMode===f.SINGLE_TASKBAR&&(r="snkGridHeaderTaskbar.singleTaskbar.finish_edition"),r}getTopTaskBarId(){var i;const t={primary:"",secondary:".secondary",singleTaskbar:".singleTaskbar"}[this.presentationMode];return(null===(i=this._dataState)||void 0===i?void 0:i.isDirty)?`snkGridTopTaskbar.finish_edition${t}`:`snkGridTopTaskbar.regular${t}`}getPrimaryButton(){return{primary:"INSERT",secondary:"",singleTaskbar:"INSERT"}[this.presentationMode]}getColumnSearch(i){return null!=this._columnSearch||(this._columnSearch=c(i,(({argument:i})=>new Promise((t=>{this._grid.filterColumns(i).then((i=>{t(i.filter((i=>!i.hidden)).map((i=>({label:i.label,value:i.name}))))}))}))),(i=>{null!=i&&this._grid.locateColumn(i.value)}))),this._columnSearch}getActionsList(){const i=[];if(this.enableGridInsert&&i.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert,(()=>{this._enableContinuousInsert=!this._enableContinuousInsert,this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert)}))),this.isGridInsertActive())return i;if(null!=this.taskbarManager&&null!=this.taskbarManager.getMoreOptions){const t=this.getTopTaskBarId();return i.concat(this.taskbarManager.getMoreOptions(t,this.configName,this._dataState,this.actionsList))}return i.concat(this.actionsList)}getActionsSettingsList(){return[{value:d.generateUUID(),label:this.messagesBuilder.getMessage("snkGrid.findColumn",{}),disableCloseOnSelect:!0,eagerInitialize:!0,itemBuilder:(i,t)=>this.getColumnSearch(t)}]}handleFilterConfigUpdated(i){if(i.length)return 1===i.length&&"PERSONALIZED_FILTER_GROUP"===i[0].id?(this._showSnkFilterBar=!0,void(this._filterMode=i[0].groupedItems.length>0?"regular":"button")):void(this._showSnkFilterBar=!0);this._showSnkFilterBar=!1}getGridHeaderButtons(){return this.isGridInsertActive()?_.MORE_OPTIONS:this._headerTaskbarProcessor.buttons}isGridInsertActive(){return this.enableGridInsert&&this._dataUnit.hasNewRecord()}render(){if(this._dataUnit)return s("div",{class:"snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline",tabindex:"0"},s("div",{class:"snk-grid__header ez-margin-bottom--extra-small"},this._showSnkFilterBar&&s(e,null,s("snk-filter-bar",{ref:i=>this._snkFilterBar=i,title:this.filterBarTitle,dataUnit:this._dataUnit,"data-element-id":"gridFilter",class:"snk-grid__filter-bar ez-align--top",configName:this.configName,messagesBuilder:this.messagesBuilder,resourceID:this.resourceID,onConfigUpdated:i=>this.handleFilterConfigUpdated(i.detail),disablePersonalizedFilter:this.disablePersonalizedFilter,filterBarLegacyConfigName:this.filterBarLegacyConfigName,autoLoad:this.autoLoad,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,filterCustomConfig:this.filterCustomConfig,filterCustomConfigInterceptor:this.filterCustomConfigInterceptor,mode:this._filterMode}),s("hr",{class:"ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider"})),s("snk-taskbar",{class:"ez-padding-left--medium ez-padding-top--extra-small","data-element-id":"grid_top",key:"topTaskbar",configName:this.configName,dataUnit:this._dataUnit,messagesBuilder:this.messagesBuilder,buttons:this._topTaskbarProcessor.buttons,disabledButtons:this._topTaskbarProcessor.disabledButtons,customButtons:this._topTaskbarProcessor.customButtons,primaryButton:this.getPrimaryButton(),resourceID:this.resourceID,customContainerId:this.taskbarCustomContainerId,customSlotId:this.topTaskbarCustomSlotId,overflowStrategy:"none",actionsSettingsList:this.getActionsSettingsList()},s("slot",{name:this.topTaskbarCustomSlotId}))),s("ez-grid",{ref:i=>this._grid=i,class:(this.presentationMode===f.SECONDARY?"snk-grid-container__without-shadow ":"")+"snk-grid__table","data-element-id":"embedded",dataUnit:this._dataUnit,key:"grid-"+this._snkDataUnit.entityName,config:this._gridConfig,onConfigChange:i=>{this.gridConfigChangeHandler(i)},onEzColumnFilterChanged:async()=>await this.dataExporterProviderStore(),onEzDoubleClick:i=>this.gridDoubleClick.emit(i.detail),statusResolver:this.statusResolver,multipleSelection:this.multipleSelection,columnfilterDataSource:this.columnFilterDataSource,selectionToastConfig:this.selectionToastConfig,useEnterLikeTab:this.useEnterLikeTab,recordsValidator:this.recordsValidator,canEdit:this.canEdit,autoFocus:this.autoFocus,enableGridInsert:this.enableGridInsert,enableContinuousInsert:this._enableContinuousInsert,enableLockManagerTaskbarClick:this.enableLockManagerTaskbarClick,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,outlineMode:this.outlineMode,useSearchColumn:this.useSearchColumn,suppressHorizontalScroll:this.suppressHorizontalScroll,paginationCounterMode:this.paginationCounterMode,suppressCheckboxColumn:this.suppressCheckboxColumn,suppressFilterColumn:this.suppressFilterColumn,compact:this.compact},s("snk-taskbar",{id:"teste",dataUnit:this._dataUnit,configName:this.configName,messagesBuilder:this.messagesBuilder,"data-element-id":"grid_left",buttons:this.getGridHeaderButtons(),presentationMode:this.presentationMode,disabledButtons:this._headerTaskbarProcessor.disabledButtons,customButtons:this._headerTaskbarProcessor.customButtons,slot:"leftButtons",actionsList:this.getActionsList(),primaryButton:this.getPrimaryButton(),resourceID:this.resourceID,customContainerId:this.taskbarCustomContainerId,customSlotId:this.gridHeaderCustomSlotId,additionalSlotId:this.gridHeaderDynamicSearchSlotId,actionsSettingsList:this.getActionsSettingsList()},s("slot",{name:this.gridHeaderCustomSlotId}),s("slot",{name:this.gridHeaderDynamicSearchSlotId}))),s("div",{class:"ez-col ez-col--sd-12 snk-grid-container__footer"},s("slot",{name:"SnkGridFooter"})),s("ez-popup",{size:"medium",heightMode:"auto",useHeader:!1,opened:this._popUpGridConfig,onEzClosePopup:()=>this.closeGridConfig()},s("snk-grid-config",{ref:i=>this._snkGridConfig=i,config:this._gridConfig,"data-element-id":this._element.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME),selectedIndex:0,configName:this.configName,onConfigChange:i=>this.modalConfigChangeHandler(i),onConfigCancel:()=>this.closeGridConfig(),resourceID:this.resourceID})))}get _element(){return r(this)}static get watchers(){return{gridLegacyConfigName:["handleGridLegacyConfigName"]}}};S.style=".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none;--snk-grid-header--min-height:40px}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__filter-bar.sc-snk-grid{width:100%;display:flex;align-items:flex-start}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium);margin-top:var(--space--small);align-self:stretch}.snk-grid__header.sc-snk-grid snk-taskbar.sc-snk-grid{display:flex;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";export{S as snk_grid}
|