@sankhyalabs/sankhyablocks 3.2.0 → 3.2.2

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.
Files changed (164) hide show
  1. package/dist/cjs/{index-2cd6f753.js → index-21bd01e1.js} +111 -2
  2. package/dist/cjs/{index-696b5c3b.js → index-fc7ca86c.js} +1 -1
  3. package/dist/cjs/loader.cjs.js +3 -2
  4. package/dist/cjs/sankhyablocks.cjs.js +6 -2
  5. package/dist/cjs/snk-application.cjs.entry.js +4 -2
  6. package/dist/cjs/snk-config-options.cjs.entry.js +4 -4
  7. package/dist/cjs/snk-configurator_3.cjs.entry.js +14 -14
  8. package/dist/cjs/snk-crud.cjs.entry.js +10 -9
  9. package/dist/cjs/snk-data-exporter_8.cjs.entry.js +41 -16
  10. package/dist/cjs/snk-data-unit.cjs.entry.js +8 -5
  11. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +3 -1
  12. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +3 -1
  13. package/dist/cjs/snk-filter-detail.cjs.entry.js +3 -1
  14. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +3 -1
  15. package/dist/cjs/snk-filter-number.cjs.entry.js +3 -1
  16. package/dist/cjs/snk-filter-period.cjs.entry.js +3 -1
  17. package/dist/cjs/snk-filter-personalized.cjs.entry.js +5 -1
  18. package/dist/cjs/snk-filter-search.cjs.entry.js +3 -1
  19. package/dist/cjs/snk-filter-text.cjs.entry.js +3 -1
  20. package/dist/cjs/snk-form-config.cjs.entry.js +7 -4
  21. package/dist/cjs/snk-form.cjs.entry.js +10 -5
  22. package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -1
  23. package/dist/cjs/snk-tab-config.cjs.entry.js +7 -1
  24. package/dist/cjs/{taskbar-elements-81ad590c.js → taskbar-elements-8d38f43a.js} +2 -2
  25. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  26. package/dist/collection/collection-manifest.json +2 -2
  27. package/dist/collection/components/snk-application/snk-application.js +2 -0
  28. package/dist/collection/components/snk-configurator/snk-configurator.js +2 -3
  29. package/dist/collection/components/snk-crud/snk-crud.js +7 -6
  30. package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +2 -0
  31. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +0 -3
  32. package/dist/collection/components/snk-data-unit/snk-data-unit.js +7 -4
  33. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +4 -0
  34. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +4 -0
  35. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +4 -0
  36. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +4 -0
  37. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +6 -0
  38. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +4 -0
  39. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +4 -0
  40. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +4 -0
  41. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -0
  42. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +9 -0
  43. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +12 -0
  44. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +4 -0
  45. package/dist/collection/components/snk-form/snk-form.js +9 -4
  46. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +3 -3
  47. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +2 -6
  48. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +6 -3
  49. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +6 -0
  50. package/dist/collection/components/snk-grid/snk-grid.js +8 -3
  51. package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +3 -3
  52. package/dist/collection/components/snk-grid/subcomponents/snk-select-box/snk-select-box.js +0 -3
  53. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +4 -0
  54. package/dist/collection/components/snk-taskbar/snk-taskbar.js +9 -4
  55. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +1 -1
  56. package/dist/components/index.d.ts +9 -0
  57. package/dist/components/index.js +1 -1
  58. package/dist/components/snk-application2.js +3 -1
  59. package/dist/components/snk-config-options2.js +3 -3
  60. package/dist/components/snk-configurator2.js +2 -3
  61. package/dist/components/snk-crud.js +7 -6
  62. package/dist/components/snk-data-exporter2.js +0 -3
  63. package/dist/components/snk-data-unit.js +7 -4
  64. package/dist/components/snk-exporter-email-sender2.js +2 -0
  65. package/dist/components/snk-field-config2.js +2 -6
  66. package/dist/components/snk-filter-bar2.js +4 -0
  67. package/dist/components/snk-filter-binary-select.js +2 -0
  68. package/dist/components/snk-filter-detail2.js +2 -0
  69. package/dist/components/snk-filter-item2.js +3 -0
  70. package/dist/components/snk-filter-list2.js +9 -0
  71. package/dist/components/snk-filter-modal2.js +10 -0
  72. package/dist/components/snk-filter-multi-select.js +2 -0
  73. package/dist/components/snk-filter-number.js +2 -0
  74. package/dist/components/snk-filter-period.js +2 -0
  75. package/dist/components/snk-filter-personalized.js +4 -0
  76. package/dist/components/snk-filter-search.js +2 -0
  77. package/dist/components/snk-filter-text.js +2 -0
  78. package/dist/components/snk-form-config2.js +6 -3
  79. package/dist/components/snk-form2.js +9 -4
  80. package/dist/components/snk-grid-config2.js +3 -3
  81. package/dist/components/snk-grid2.js +8 -3
  82. package/dist/components/snk-pesquisa2.js +4 -0
  83. package/dist/components/snk-select-box2.js +0 -3
  84. package/dist/components/snk-tab-config2.js +6 -0
  85. package/dist/components/snk-taskbar2.js +9 -4
  86. package/dist/esm/{index-a77b6f35.js → index-cfd4bb13.js} +111 -3
  87. package/dist/esm/{index-d89e384f.js → index-e467ade5.js} +1 -1
  88. package/dist/esm/loader.js +3 -2
  89. package/dist/esm/polyfills/css-shim.js +1 -1
  90. package/dist/esm/sankhyablocks.js +3 -2
  91. package/dist/esm/snk-application.entry.js +4 -2
  92. package/dist/esm/snk-config-options.entry.js +4 -4
  93. package/dist/esm/snk-configurator_3.entry.js +14 -14
  94. package/dist/esm/snk-crud.entry.js +10 -9
  95. package/dist/esm/snk-data-exporter_8.entry.js +41 -16
  96. package/dist/esm/snk-data-unit.entry.js +8 -5
  97. package/dist/esm/snk-exporter-email-sender.entry.js +3 -1
  98. package/dist/esm/snk-filter-binary-select.entry.js +3 -1
  99. package/dist/esm/snk-filter-detail.entry.js +3 -1
  100. package/dist/esm/snk-filter-multi-select.entry.js +3 -1
  101. package/dist/esm/snk-filter-number.entry.js +3 -1
  102. package/dist/esm/snk-filter-period.entry.js +3 -1
  103. package/dist/esm/snk-filter-personalized.entry.js +5 -1
  104. package/dist/esm/snk-filter-search.entry.js +3 -1
  105. package/dist/esm/snk-filter-text.entry.js +3 -1
  106. package/dist/esm/snk-form-config.entry.js +7 -4
  107. package/dist/esm/snk-form.entry.js +10 -5
  108. package/dist/esm/snk-pesquisa.entry.js +5 -1
  109. package/dist/esm/snk-tab-config.entry.js +7 -1
  110. package/dist/esm/{taskbar-elements-9b0a87f1.js → taskbar-elements-24655695.js} +2 -2
  111. package/dist/esm/teste-pesquisa.entry.js +1 -1
  112. package/dist/sankhyablocks/p-01fdcc77.entry.js +1 -0
  113. package/dist/sankhyablocks/p-0b86c7f0.entry.js +1 -0
  114. package/dist/sankhyablocks/p-123732eb.entry.js +1 -0
  115. package/dist/sankhyablocks/p-125c2d01.entry.js +1 -0
  116. package/dist/sankhyablocks/p-2cd74aa1.entry.js +1 -0
  117. package/dist/sankhyablocks/p-5360f8fa.entry.js +1 -0
  118. package/dist/sankhyablocks/p-5e62a17b.entry.js +1 -0
  119. package/dist/sankhyablocks/p-5fc55684.entry.js +1 -0
  120. package/dist/sankhyablocks/p-6878464e.entry.js +1 -0
  121. package/dist/sankhyablocks/p-6b992e43.js +1 -0
  122. package/dist/sankhyablocks/p-82ab941a.entry.js +83 -0
  123. package/dist/sankhyablocks/p-86d29b6f.entry.js +1 -0
  124. package/dist/sankhyablocks/p-93c92b97.entry.js +1 -0
  125. package/dist/sankhyablocks/p-93d8ea09.js +2 -2
  126. package/dist/sankhyablocks/{p-112bb324.js → p-98f7f796.js} +1 -1
  127. package/dist/sankhyablocks/p-9fab987d.entry.js +1 -0
  128. package/dist/sankhyablocks/p-ad51bf1c.entry.js +1 -0
  129. package/dist/sankhyablocks/p-afba9bbe.entry.js +1 -0
  130. package/dist/sankhyablocks/p-b9667fbe.js +2 -0
  131. package/dist/sankhyablocks/p-c336170d.entry.js +1 -0
  132. package/dist/sankhyablocks/p-d5c9c1f8.entry.js +1 -0
  133. package/dist/sankhyablocks/{p-57895452.entry.js → p-e551b19a.entry.js} +1 -1
  134. package/dist/sankhyablocks/p-e701646c.entry.js +1 -0
  135. package/dist/sankhyablocks/p-ee82c157.entry.js +1 -0
  136. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  137. package/dist/types/stencil-public-runtime.d.ts +64 -3
  138. package/loader/index.d.ts +9 -0
  139. package/package.json +5 -5
  140. package/react/components.d.ts +29 -29
  141. package/react/react-component-lib/createComponent.d.ts +1 -1
  142. package/react/react-component-lib/interfaces.js +1 -0
  143. package/react/react-component-lib/utils/index.d.ts +2 -2
  144. package/dist/sankhyablocks/p-048e126b.entry.js +0 -1
  145. package/dist/sankhyablocks/p-12ebe36a.entry.js +0 -1
  146. package/dist/sankhyablocks/p-187b0d06.entry.js +0 -1
  147. package/dist/sankhyablocks/p-1ccaea51.entry.js +0 -1
  148. package/dist/sankhyablocks/p-1dbe9dd8.entry.js +0 -1
  149. package/dist/sankhyablocks/p-3c7ec56e.entry.js +0 -1
  150. package/dist/sankhyablocks/p-3f6c05c7.entry.js +0 -1
  151. package/dist/sankhyablocks/p-4cec3835.entry.js +0 -83
  152. package/dist/sankhyablocks/p-5ebc029c.entry.js +0 -1
  153. package/dist/sankhyablocks/p-7dad1d5e.js +0 -1
  154. package/dist/sankhyablocks/p-91c23d20.entry.js +0 -1
  155. package/dist/sankhyablocks/p-a77dd79a.js +0 -2
  156. package/dist/sankhyablocks/p-ab4ff312.entry.js +0 -1
  157. package/dist/sankhyablocks/p-bcb2fb03.entry.js +0 -1
  158. package/dist/sankhyablocks/p-c15108d5.entry.js +0 -1
  159. package/dist/sankhyablocks/p-d3e402d3.entry.js +0 -1
  160. package/dist/sankhyablocks/p-d7ae56ce.entry.js +0 -1
  161. package/dist/sankhyablocks/p-df5d94c6.entry.js +0 -1
  162. package/dist/sankhyablocks/p-e075dba7.entry.js +0 -1
  163. package/dist/sankhyablocks/p-f6f71be7.entry.js +0 -1
  164. package/dist/sankhyablocks/p-f9829109.entry.js +0 -1
@@ -1 +1 @@
1
- import{a as e,f as t}from"./p-a77dd79a.js";const s=e=>!("isConnected"in e)||e.isConnected,o=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),n=e=>"function"==typeof e?e():e,r=(()=>{const s=((e,t=((e,t)=>e!==t))=>{const s=n(e);let o=new Map(Object.entries(null!=s?s:{}));const r={dispose:[],get:[],set:[],reset:[]},c=()=>{var t;o=new Map(Object.entries(null!==(t=n(e))&&void 0!==t?t:{})),r.reset.forEach((e=>e()))},a=e=>(r.get.forEach((t=>t(e))),o.get(e)),i=(e,s)=>{const n=o.get(e);t(s,n,e)&&(o.set(e,s),r.set.forEach((t=>t(e,s,n))))},p="undefined"==typeof Proxy?{}:new Proxy(s,{get:(e,t)=>a(t),ownKeys:()=>Array.from(o.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>o.has(t),set:(e,t,s)=>(i(t,s),!0)}),u=(e,t)=>(r[e].push(t),()=>{((e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)})(r[e],t)});return{state:p,get:a,set:i,on:u,onChange:(t,s)=>{const o=u("set",((e,o)=>{e===t&&s(o)})),r=u("reset",(()=>s(n(e)[t])));return()=>{o(),r()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(u("set",t.set)),t.get&&e.push(u("get",t.get)),t.reset&&e.push(u("reset",t.reset)),t.dispose&&e.push(u("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{r.dispose.forEach((e=>e())),c()},reset:c,forceUpdate:e=>{const t=o.get(e);r.set.forEach((s=>s(e,t,t)))}}})({exporterProviders:{}},void 0);return s.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const o=e();o&&((e,t,s)=>{const o=e.get(t);o?o.includes(s)||o.push(s):e.set(t,[s])})(s,t,o)},set:e=>{const n=s.get(e);n&&s.set(e,n.filter(t)),o(s)},reset:()=>{s.forEach((e=>e.forEach(t))),o(s)}}})()),s})();export{r as s}
1
+ import{a as e,f as t}from"./p-b9667fbe.js";const s=e=>!("isConnected"in e)||e.isConnected,o=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),n=e=>"function"==typeof e?e():e,r=(()=>{const s=((e,t=((e,t)=>e!==t))=>{const s=n(e);let o=new Map(Object.entries(null!=s?s:{}));const r={dispose:[],get:[],set:[],reset:[]},c=()=>{var t;o=new Map(Object.entries(null!==(t=n(e))&&void 0!==t?t:{})),r.reset.forEach((e=>e()))},i=e=>(r.get.forEach((t=>t(e))),o.get(e)),p=(e,s)=>{const n=o.get(e);t(s,n,e)&&(o.set(e,s),r.set.forEach((t=>t(e,s,n))))},u="undefined"==typeof Proxy?{}:new Proxy(s,{get:(e,t)=>i(t),ownKeys:()=>Array.from(o.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>o.has(t),set:(e,t,s)=>(p(t,s),!0)}),a=(e,t)=>(r[e].push(t),()=>{((e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)})(r[e],t)});return{state:u,get:i,set:p,on:a,onChange:(t,s)=>{const o=a("set",((e,o)=>{e===t&&s(o)})),r=a("reset",(()=>s(n(e)[t])));return()=>{o(),r()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(a("set",t.set)),t.get&&e.push(a("get",t.get)),t.reset&&e.push(a("reset",t.reset)),t.dispose&&e.push(a("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{r.dispose.forEach((e=>e())),c()},reset:c,forceUpdate:e=>{const t=o.get(e);r.set.forEach((s=>s(e,t,t)))}}})({exporterProviders:{}},void 0);return s.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const o=e();o&&((e,t,s)=>{const o=e.get(t);o?o.includes(s)||o.push(s):e.set(t,[s])})(s,t,o)},set:e=>{const n=s.get(e);n&&s.set(e,n.filter(t)),o(s)},reset:()=>{s.forEach((e=>e.forEach(t))),o(s)}}})()),s})();export{r as s}
@@ -0,0 +1 @@
1
+ import{r as i,c as o,h as t,H as n,g as r}from"./p-b9667fbe.js";import{ApplicationContext as s,ElementIDUtils as e,DataType as a}from"@sankhyalabs/core";import{c as l,A as d}from"./p-b4093344.js";import{A as c}from"./p-dc36cfbf.js";import{UserInterface as f}from"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import{C as g}from"./p-93d8ea09.js";import{P as u}from"./p-5534e08c.js";import{T as h}from"./p-5a3e0eb6.js";import{s as _}from"./p-98f7f796.js";import"./p-112455b1.js";const k=l.grid,v=l.form,b=class{constructor(t){i(this,t),this.configSelected=o(this,"configSelected",7),this.openConfig=o(this,"openConfig",7),this._opened=!1,this._permissions=void 0,this.configName=void 0,this.viewMode=k.name}async open(){this._opened=!0,this.configSelected.emit(this.getViewModeValue())}async close(){this.closeConfig()}closeConfig(){this._opened=!1}onViewModeChanged(i){const o=null==i?void 0:i.detail;this.viewMode=o,this.configSelected.emit(o)}onClickOpenConfig(){this.openConfig.emit(this.viewMode)}isAllowed(i){return!c[i]||!!this._permissions&&(this._permissions.isSup||this._permissions[i])}enableModeConfig(){return!(!this.isAllowed(c.CONFIG_GRID)||!this.isAllowed(c.CONFIG))}getViewModeValue(){return null!=this._permissions&&(this.isAllowed(c.CONFIG_GRID)?this.isAllowed(c.CONFIG)||(this.viewMode=k.name):this.viewMode=v.name),this.viewMode}getMessage(i){var o,t;return null===(t=null===(o=this._application)||void 0===o?void 0:o.messagesBuilder)||void 0===t?void 0:t.getMessage(i,{})}componentWillLoad(){this._application=s.getContextValue("__SNK__APPLICATION__"),this._application?this._application.getAllAccess().then((i=>this._permissions=i)):this._permissions={}}render(){return t("ez-modal",{opened:this._opened,"close-esc":!1,"close-outside-click":!1,"modal-size":"small"},t("div",{class:"snk-configurator"},t("div",{class:"snk-configurator__header"},t("label",{class:"snk-configurator__title"},this.getMessage("snkConfigurator.titleConfigurations")),t("div",{class:"snk-configurator__button-close"},t("ez-button",{mode:"icon",iconName:"close",size:"medium",onClick:()=>this.closeConfig()}))),t("div",{class:"snk-configurator__main"},t("ez-radio-button",{class:"ez-margin-top--medium",label:this.getMessage("snkConfigurator.subTitleModeConfig"),value:this.getViewModeValue(),onEzChange:i=>this.onViewModeChanged(i),enabled:this.enableModeConfig()},t("ez-radio-button-option",{label:this.getMessage("snkConfigurator.labelGrid"),value:k.name}),t("ez-radio-button-option",{label:this.getMessage("snkConfigurator.labelForm"),value:v.name})),t("ez-button",{mode:"slim",label:this.getMessage(this.viewMode===k.name?"snkConfigurator.labelConfigGrid":"snkConfigurator.labelConfigForm"),class:"snk-configurator__button-config ez-button--primary",onClick:()=>this.onClickOpenConfig(),id:"openConfigurator"}),t("hr",{class:"ez-divider-horizontal ez-margin-vertical--medium"}))))}};b.style='.sc-snk-configurator-h{--snk-configurator__button-close--padding-left:var(--space--medium, 12px);--snk-configurator__title--color:var(--title--primary, #2B3A54);--snk-configurator__title--font-family:var(--font-pattern, "Roboto");--snk-configurator__title--font-size:var(--title--large, 20px);--snk-configurator__title--font-weight:var(--text-weight--extra-large, 700);--snk-configurator__subtitle--color:var(--title--primary, #2B3A54);--snk-configurator__subtitle--font-family:var(--font-pattern, "Roboto");--snk-configurator__subtitle--font-size:var(--text--medium, 14px);--snk-configurator__subtitle--font-weight:var(--text-weight--large, 600);--snk-configurator__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-configurator__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-configurator__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-configurator__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-configurator__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-configurator__scrollbar--width:var(--space--medium, 12px)}.snk-configurator.sc-snk-configurator{display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.snk-configurator.sc-snk-configurator{width:359px;max-width:359px}}.snk-configurator__button-config.sc-snk-configurator{--ez-button--min-width:100%}.snk-configurator__header.sc-snk-configurator{display:flex;justify-content:space-between;align-items:center;width:100%}.snk-configurator__title.sc-snk-configurator{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-configurator__title--color);font-size:var(--snk-configurator__title--font-size);font-family:var(--snk-configurator__title--font-family);font-weight:var(--snk-configurator__title--font-weight)}.snk-configurator__subtitle.sc-snk-configurator{display:flex;margin:0;padding-top:var(--space--medium);padding-bottom:var(--space--small);color:var(--snk-configurator__subtitle--color);font-size:var(--snk-configurator__subtitle--font-size);font-family:var(--snk-configurator__subtitle--font-family);font-weight:var(--snk-configurator__subtitle--font-weight)}.snk-configurator__button-close.sc-snk-configurator{padding-left:var(--snk-configurator__button-close--padding-left)}.snk-configurator__main.sc-snk-configurator{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-configurator__scrollbar--color-clicked) var(--snk-configurator__scrollbar--color-background)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar{background-color:var(--snk-configurator__scrollbar--color-background);width:var(--snk-configurator__scrollbar--width);max-width:var(--snk-configurator__scrollbar--width);min-width:var(--snk-configurator__scrollbar--width)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-track{background-color:var(--snk-configurator__scrollbar--color-background);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb{background-color:var(--snk-configurator__scrollbar--color-default);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:hover,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-configurator__scrollbar--color-hover)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:active,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-configurator__scrollbar--color-clicked)}';const p=class{constructor(t){i(this,t),this.ezClickIcon=o(this,"ezClickIcon",7),this.isConfigActive=!1,this.fieldConfig=void 0,this.modeInsertion=!0,this.dataUnit=void 0}handleAction(i,o){i.preventDefault(),i.stopPropagation();const t=this.fieldConfig;o!==d.configuration&&(t.group=void 0),this.ezClickIcon.emit({field:t,type:o})}getMessage(i){return this._application.messagesBuilder.getMessage(i,{})}isRequired(){var i,o;const t=this.dataUnit&&this.dataUnit.getField(null===(i=this.fieldConfig)||void 0===i?void 0:i.name);return!0===(null==t?void 0:t.required)||!0===(null===(o=this.fieldConfig)||void 0===o?void 0:o.required)}componentWillLoad(){this._application=s.getContextValue("__SNK__APPLICATION__")}componentDidLoad(){e.addIDInfo(this._element)}render(){if(null!=this.fieldConfig)return t(n,null,t("div",{class:"field-config"},t("div",{class:"field-config__draggable"},t("ez-icon",{iconName:"drag-indicator",size:"small"})),t("div",null,this.fieldConfig.label,this.isRequired()&&t("span",{class:"field-config__required-label"},"*")),this.modeInsertion?t("div",{class:"field-config__add"},t("ez-button",{onClick:i=>this.handleAction(i,d.add),mode:"icon",class:"ez-button--tertiary",iconName:"plus",size:"large",title:this.getMessage("snkFieldConfig.titleAdd")})):t("div",{class:"field-config__options"+(this.isConfigActive?" field-config__options--is-active":" ")},t("ez-button",{mode:"icon",class:"ez-button--tertiary field-config__remove-icon",onClick:i=>this.handleAction(i,d.remove),iconName:"minus",size:"large",title:this.getMessage("snkFieldConfig.titleRemove")}),t("ez-button",{id:"buttonConfig_"+this.fieldConfig.name,mode:"icon",class:"ez-button--tertiary",onClick:i=>this.handleAction(i,d.configuration),iconName:this.isConfigActive?"chevron-up":"settings-inverted",size:"large",title:this.getMessage("snkFieldConfig.titleConfigurations")}))),this.isConfigActive&&t("div",{class:"field-config__config-popover"},t("div",{class:"field-config__config-outer-arrow"},t("div",{class:"field-config__config-inner-arrow"}))))}get _element(){return r(this)}};p.style=".sc-snk-field-config-h{--snk-field-config--height:42px;--snk-field-config--width:100%;--snk-field-config__icon--width:48px;--snk-field-config-slim--height:32px;--snk-field-config--border-radius:var(--border--radius-medium, 12px);--snk-field-config--font-size:var(--text--medium, 14px);--snk-field-config--font-family:var(--font-pattern, Arial);--snk-field-config--font-weight:var(--text-weight--medium, 400);--snk-field-config--color:var(--title--primary, #000);--snk-field-config--padding-left:var(--space--medium, 6px);--snk-field-config__input--background-color:var(--background--medium, #e0e0e0);--snk-field-config__input--border:var(--border--medium, 2px solid);--snk-field-config__input--border-color:var(--background--xlight, #fff);--snk-field-config__required--color:var(--color--error, #FF0000);--snk-field-config__required--padding-left:var(--space--extra-small, 3px);--snk-field-config__transition--visibility:var(--transition, 0.2s linear);--snk-field-config__transition--opacity:var(--transition, 0.15s linear);--snk-field-config__config-popover--z-index:var(--more-visible, 2);--snk-field-config__config-outer-arrow--background-color:var(--color--secondary-200, #D2D3DA);--snk-field-config__draggable--padding-right:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--snk-field-config--width)}.field-config.sc-snk-field-config{width:100%;box-sizing:border-box;display:flex;align-items:center;padding-left:var(--snk-field-config--padding-left);font-weight:var(--snk-field-config--font-weight);height:var(--snk-field-config--height);border-radius:var(--snk-field-config--border-radius);font-family:var(--snk-field-config--font-family);font-size:var(--snk-field-config--font-size);border:var(--snk-field-config__input--border);border-color:var(--snk-field-config__input--border-color);background-color:var(--snk-field-config__input--background-color);color:var(--snk-field-config--color)}.field-config__config-popover.sc-snk-field-config{width:40px;margin-left:auto;z-index:var(--snk-field-config__config-popover--z-index)}.field-config__required-label.sc-snk-field-config{color:var(--snk-field-config__required--color);padding-left:var(--snk-field-config__required--padding-left)}.field-config__add.sc-snk-field-config{display:flex;margin-left:auto;visibility:hidden;opacity:0;transition:visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity)}.field-config__options.sc-snk-field-config{display:flex;margin-left:auto;visibility:hidden;opacity:0;transition:visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity)}.field-config__options--is-active.sc-snk-field-config{display:flex;visibility:visible;opacity:1}.field-config__remove-icon.sc-snk-field-config{margin-right:-15px}.field-config.sc-snk-field-config:hover .field-config__options.sc-snk-field-config{display:flex;visibility:visible;opacity:1}.field-config.sc-snk-field-config:hover .field-config__add.sc-snk-field-config{visibility:visible;opacity:1}.field-config__draggable.sc-snk-field-config{padding-right:var(--snk-field-config__draggable--padding-right)}.field-config__config-outer-arrow.sc-snk-field-config{clip-path:polygon(50% 0, 90% 100%, 10% 100%);border-radius:0.25em 0 0 0;width:30px;height:15px;padding-top:3px;border-bottom:1px solid #FFFFFF;background-color:var(--snk-field-config__config-outer-arrow--background-color)}.field-config__config-inner-arrow.sc-snk-field-config{background-color:#FFFFFF;clip-path:polygon(50% 0, 90% 100%, 10% 100%);border-radius:0.25em 0 0 0;width:30px;height:15px}.ez-box__container.sc-snk-field-config ez-collapsible-box.sc-snk-field-config{--snk-collapsible-box__header--padding-left:6px}ez-icon.sc-snk-field-config{--snk-icon--color:var(--snk-field-config--color)}ez-popover.sc-snk-field-config{--snk-popover__box--background-color:transparent;--snk-popover__box--box-shadow:none}.field-config__options.sc-snk-field-config ez-button.sc-snk-field-config{--snk-button--background-color:transparent;--snk-button--focus--border:none;--snk-button--focus--box-shadow:none}";const m=class{constructor(t){i(this,t),this.actionClick=o(this,"actionClick",7),this.gridDoubleClick=o(this,"gridDoubleClick",7),this._topTaskbarProcessor=new h({snkGridTopTaskbar:["FORM_MODE","CONFIGURATOR","INSERT"]}),this._headerTaskbarProcessor=new h({"snkGridHeaderTaskbar.unselected":["REFRESH","DATA_EXPORTER"],"snkGridHeaderTaskbar.selected":["UPDATE","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","REFRESH","DATA_EXPORTER"]}),this._dataUnit=void 0,this._dataState=void 0,this._gridConfig=void 0,this._popUpGridConfig=!1,this.configName=void 0,this.actionsList=void 0,this.taskbarManager=void 0,this.statusResolver=void 0,this.multipleSelection=void 0,this.presentationMode=u.PRIMARY}async showConfig(){null!=this._grid&&this.openGridConfig()}async hideConfig(){null!=this._grid&&this.closeGridConfig()}async setConfig(i){this.setGridConfig(i)}openGridConfig(){this._grid.getColumnsState().then((i=>{this._snkGridConfig.columns=i.filter((i=>i.name)),this._snkGridConfig.selectedIndex=0,this._popUpGridConfig=!0}))}closeGridConfig(){this._popUpGridConfig=!1}setGridConfig(i){this._gridConfig=i}loadConfig(){null!=this.configName&&g.get().then((i=>{i.loadGridConfig(this.configName).then((i=>{this.setGridConfig(i)})).catch((i=>{console.warn(i)}))}))}saveConfig(i){this._snkGridConfig.saveConfig(i)}changeConfig(i){this._grid.setColumnsState(i.columns).then((()=>{this.setGridConfig(i),this.closeGridConfig()}))}buildColumnsMetadata(i,o){return null==o||o.forEach((o=>{var t,n,r,s,e;if(o.hidden&&"RECDESP"!==o.name)return;const l=null===(s=null===(r=null===(n=null===(t=this._dataUnit)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.fields)||void 0===r?void 0:r.filter((i=>i.name===o.name)))||void 0===s?void 0:s[0];i.push({label:o.label,id:o.name,width:o.width,type:null==l?void 0:l.dataType,userInterface:null==l?void 0:l.userInterface}),null!=(null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e.DESCRIPTIONFIELD)&&i.push({label:l.properties.DESCRIPTIONENTITY,id:l.properties.ENTITYNAME+"."+l.properties.DESCRIPTIONFIELD,width:200,type:a.TEXT,userInterface:f.LONGTEXT})})),i||[]}getPaginationInfo(){var i;return null===(i=this._dataUnit)||void 0===i?void 0:i.getPaginationInfo()}getExporterOffset(i){if(null==i)return;const o=i.firstRecord;return o>0?o-1:o}getExporterLimit(i){if(null==i)return;const{firstRecord:o,lastRecord:t}=i;return o>0&&t>0&&t-o+1||void 0}async dataExporterProviderStore(){var i,o;const t=this.getPaginationInfo(),n=[],r=await(null===(i=this._snkDataUnit)||void 0===i?void 0:i.getSelectedRecordsIDsInfo());await(null===(o=this._grid)||void 0===o?void 0:o.getColumnsState().then(this.buildColumnsMetadata.bind(this,n)));const s={getFilters:()=>{var i;return null===(i=this._dataUnit)||void 0===i?void 0:i.getFilters()},getColumnsMetadata:()=>n,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:()=>{var i,o;return null===(o=null===(i=this._dataState)||void 0===i?void 0:i.selectedRecords)||void 0===o?void 0:o.length},getTotalRecords:()=>{var i,o,t;const{total:n}=(null===(i=this._dataUnit)||void 0===i?void 0:i.getPaginationInfo())||{};return null!=n?n:null===(t=null===(o=this._dataUnit)||void 0===o?void 0:o.records)||void 0===t?void 0:t.length},getSelectedIDs:()=>r||[],getOffset:()=>this.getExporterOffset(t),getLimit:()=>this.getExporterLimit(t),getRecordID:()=>{var i,o,t;return null===(t=null===(o=null===(i=this._dataUnit)||void 0===i?void 0:i.records)||void 0===o?void 0:o[0])||void 0===t?void 0:t.__record__id__}};_.set("exporterProviders",Object.assign(Object.assign({},_.get("exporterProviders")),{[this.configName]:s}))}getPrimaryButton(){return this.presentationMode===u.PRIMARY?"INSERT":""}validatePresentationMode(){Object.values(u).includes(this.presentationMode)||(this.presentationMode=u.PRIMARY)}addElementID(){e.addIDInfo(this._element,null,{dataUnit:this._dataUnit})}componentWillLoad(){this._application=s.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.addElementID():this._snkDataUnit.addEventListener("dataUnitReady",(i=>{this._dataUnit=i.detail,this.addElementID()})),this._snkDataUnit.addEventListener("dataStateChange",(i=>{this._dataState=i.detail}));break}i=i.parentElement}this.loadConfig()}componentWillRender(){const i=this._dataUnit&&this._dataUnit.records.length>0?[]:["DATA_EXPORTER"];this._headerTaskbarProcessor.process(this._dataState&&this._dataState.selectedRecords.length>0?"snkGridHeaderTaskbar.selected":"snkGridHeaderTaskbar.unselected",this.taskbarManager,this._dataState,void 0,i),this._topTaskbarProcessor.process("snkGridTopTaskbar",this.taskbarManager,this._dataState,void 0,i),this.dataExporterProviderStore(),this.validatePresentationMode()}render(){if(this._dataUnit)return t("div",{class:"snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large"},t("div",{class:"snk-grid__header ez-margin-bottom--medium"},t("snk-filter-bar",{dataUnit:this._dataUnit,"data-element-id":"gridFilter",class:"snk-grid__filter-bar ez-align--top",configName:this.configName}),t("hr",{class:"ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider"}),t("snk-taskbar",{class:"ez-padding-left--medium","data-element-id":"grid_top",key:"topTaskbar",configName:this.configName,dataUnit:this._dataUnit,buttons:this._topTaskbarProcessor.buttons,disabledButtons:this._topTaskbarProcessor.disabledButtons,customButtons:this._topTaskbarProcessor.customButtons,primaryButton:this.getPrimaryButton()})),t("ez-grid",{ref:i=>this._grid=i,"data-element-id":"embedded",dataUnit:this._dataUnit,key:"grid-"+this._snkDataUnit.entityName,config:this._gridConfig,onConfigChange:i=>{this.saveConfig(i.detail)},onEzDoubleClick:()=>this.gridDoubleClick.emit(),statusResolver:this.statusResolver,multipleSelection:this.multipleSelection},t("snk-taskbar",{dataUnit:this._dataUnit,configName:this.configName,"data-element-id":"grid_left",buttons:this._headerTaskbarProcessor.buttons,disabledButtons:this._headerTaskbarProcessor.disabledButtons,customButtons:this._headerTaskbarProcessor.customButtons,slot:"leftButtons",actionsList:this.actionsList})),t("div",{class:"ez-col ez-col--sd-12"},t("slot",{name:"SnkGridFooter"})),t("ez-modal",{modalSize:"small",closeEsc:!1,closeOutsideClick:!1,opened:this._popUpGridConfig,onEzCloseModal:()=>this.closeGridConfig()},t("snk-grid-config",{ref:i=>this._snkGridConfig=i,config:this._gridConfig,"data-element-id":this._element.getAttribute(e.DATA_ELEMENT_ID_ATTRIBUTE_NAME),application:this._application,selectedIndex:0,onConfigChange:i=>this.changeConfig(i.detail),onConfigCancel:()=>this.closeGridConfig()})))}get _element(){return r(this)}};m.style=".snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{display:flex;flex-wrap:nowrap;width:100%}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}";export{b as snk_configurator,p as snk_field_config,m as snk_grid}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,g as s}from"./p-b9667fbe.js";import{ElementIDUtils as e}from"@sankhyalabs/core";import{F as r}from"./p-9dd2b8cb.js";const o=class{constructor(i){t(this,i),this.config=void 0,this.value=void 0}ezChangeListener(t){this.value=t.detail}async show(){this._numberElement.setFocus()}componentDidLoad(){this._element&&e.addIDInfo(this._element,"filterContentEditor")}render(){var t;if(this.config&&this.config.type===r.NUMBER)return i("ez-number-input",{id:this.config.id,ref:t=>this._numberElement=t,label:this.config.label,value:this.config.value,precision:null===(t=this.config.props)||void 0===t?void 0:t.precision})}get _element(){return s(this)}};export{o as snk_filter_number}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,H as s,g as r}from"./p-b9667fbe.js";import{ApplicationUtils as l}from"@sankhyalabs/ezui/dist/collection/utils";import{F as n}from"./p-9dd2b8cb.js";import{ElementIDUtils as a,DataType as o}from"@sankhyalabs/core";const h=class{constructor(i){t(this,i),this.filterChange=e(this,"filterChange",7),this.config=void 0,this.getMessage=void 0}async show(){this._editor.show()}componentDidLoad(){if(this._element){a.addIDInfo(this._element);const t=this._element.getAttribute(a.DATA_ELEMENT_ID_ATTRIBUTE_NAME);this._idContentEditor=`${t}_${this.config.id}`}}changeConfig(t){this.filterChange.emit(t)}getContentEditor(){switch(this.config.type){case n.BINARY_SELECT:return"snk-filter-binary-select";case n.MULTI_SELECT:return"snk-filter-multi-select";case n.PERIOD:return"snk-filter-period";case n.SEARCH:return"snk-filter-search";case n.NUMBER:return"snk-filter-number";case n.PERSONALIZED:return"snk-filter-personalized"}return"snk-filter-text"}removeItem(){this.changeConfig(Object.assign(Object.assign({},this.config),{visible:!1,fixed:!1,value:void 0}))}getPopUpHeaderButtons(){if(!this.config.hardFixed)return[this.buildIcon(this.getMessage("snkFilterBar.removeFilter"),"delete",(()=>this.removeItem())),this.buildIcon(this.getMessage(this.config.fixed?"snkFilterBar.unpinFilter":"snkFilterBar.pinFilter"),this.config.fixed?"un-pin":"push-pin",(()=>this.changeConfig(Object.assign(Object.assign({},this.config),{fixed:!this.config.fixed}))))]}buildIcon(t,e,s){return i("button",{onClick:()=>s(),class:"sc-snk-filter-bar snk-filter-item__editor-header-button",ref:e=>e&&this.buildIdButton(e,t)},i("ez-icon",Object.assign({title:t,iconName:e},{[a.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${a.getInternalIDInfo(`_${t}`)}`})))}buildIdButton(t,e){if(!t)return;const i={id:e};t.removeAttribute(a.DATA_ELEMENT_ID_ATTRIBUTE_NAME),a.addIDInfoIfNotExists(t,"button",i)}getNormalizedValue(t,e){return t.reduce(((t,e,i)=>(e.dataType!==o.BOOLEAN||null!=t&&null!=t[i]||((t=t||[])[i]=!1),t)),e)}apply(){var t;let e=this._editor.value,i=!0;if(this.config.type===n.PERSONALIZED){const s=(null===(t=this.config.props.personalizedFilter)||void 0===t?void 0:t.parameters)||[];e=this.getNormalizedValue(s,e);const r=s.length;0===r?e=[]:i=this.validateAllFilled(r,e)}i&&this.changeConfig(Object.assign(Object.assign({},this.config),{value:e}))}validateAllFilled(t,e){let i=!0;return null!=e&&t>1&&(t>e.length?i=!1:e.forEach((t=>{null==t&&(i=!1)}))),i||l.alert("Filtro parcialmente preenchido","Favor completar todas as informações do filtro."),i}clear(){this.changeConfig(Object.assign(Object.assign({},this.config),{value:void 0}))}onKeyDonwListener(t){"Enter"===t.key&&this._applyButton.setFocus().then((()=>this.apply()))}render(){const t=this.getContentEditor();return i(s,null,i("div",{class:"col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center"},i("div",{class:"ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header"},this.config.detailTitle),this.getPopUpHeaderButtons()),i(t,{ref:t=>this._editor=t,value:this.config.value,config:this.config,onKeyDown:t=>this.onKeyDonwListener(t),"data-element-id":this._idContentEditor}),i("hr",{class:"sc-snk-filter-bar snk-filter__popover-rule"}),i("div",{class:"ez-col ez-col--sd-12 ez-align--right"},i("ez-button",{label:this.getMessage("snkFilterBar.cleanFilter"),onClick:()=>this.clear(),size:"small"}),i("ez-button",{ref:t=>this._applyButton=t,label:this.getMessage("snkFilterBar.applyFilter"),onClick:()=>this.apply(),size:"small",class:"ez-button--primary ez-padding-left--medium"})))}get _element(){return r(this)}};export{h as snk_filter_detail}
@@ -0,0 +1,2 @@
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=>ce(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=he.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=fe(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):fe(me,c)?c.slice(2):c[2]+t.slice(3),n&&he.rel(e,t,n,!1),l&&he.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=ye.createTextNode(a.t);else if(1&a.p)f=a.m=ye.createTextNode("");else if(f=a.m=ye.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)=>{he.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)}he.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),Me((()=>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=$e.get(l);if(e=11===e.nodeType?e:ye,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=ye.createElement("style"),t.innerHTML=o;const l=null!==(n=he.R)&&void 0!==n?n:u(ye);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),he.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=ye.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),he.p&=-2,U.length=0})(c,r)}catch(e){ue(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&&Ce((()=>q(e,!1))),e.p&=-517},I=e=>{{const t=ce(e),n=t.h.isConnected;return n&&2==(18&t.p)&&q(t,!1),n}},J=()=>{X(ye.documentElement),Ce((()=>w(me,"appload",{detail:{namespace:"sankhyablocks"}})))},K=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ue(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)=>ce(this).D.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=ce(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){ue(e,s)}}))}2==(18&c)&&q(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=ce(this);return n.F.then((()=>n.C[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){he.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=me.customElements,i=ye.head,c=i.querySelector("meta[charset]"),r=ye.createElement("style"),a=[];let f,d=!0;Object.assign(he,t),he.A=new URL(t.resourcesUrl||"./",ye.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),ae(e=this,n),1&n.p&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):he.jmp((()=>(e=>{if(0==(1&he.p)){const t=ce(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"]=ye.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=pe(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){ue(e)}t.p&=-9,t.p|=128,e(),Z(t.C)}if(o.style){let e=o.style;const t=g(n);if(!$e.has(t)){const l=()=>{};((e,t,n)=>{let l=$e.get(e);ve&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,$e.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(){he.jmp((()=>(()=>{if(0==(1&he.p)){const e=ce(this),t=e.C;e.q&&(e.q.map((e=>e())),e.q=void 0),K(t,"disconnectedCallback")}})()))}componentOnReady(){return ce(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=he.R)&&void 0!==n?n:u(ye);null!=e&&r.setAttribute("nonce",e),i.insertBefore(r,c?c.nextSibling:i.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):he.jmp((()=>f=setTimeout(J,30)))},te=(e,t)=>t,ne=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=e,i=le(t,o),c=oe(n);he.ael(s,l,i,c),(t.q=t.q||[]).push((()=>he.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){ue(e)}},oe=e=>0!=(2&e),se=e=>he.R=e,ie=new WeakMap,ce=e=>ie.get(e),re=(e,t)=>ie.set(t.C=e,t),ae=(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),ie.set(e,n)},fe=(e,t)=>t in e,ue=(e,t)=>(0,console.error)(e,t),de=new Map,pe=e=>{const t=e.v.replace(/-/g,"_"),n=e._,l=de.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(de.set(n,e),e[t])),ue)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},$e=new Map,me="undefined"!=typeof window?window:{},ye=me.document||{head:{}},he={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)},be=e=>Promise.resolve(e),ve=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),we=[],ke=[],ge=(e,t)=>n=>{e.push(n),c||(c=!0,t&&4&he.p?Ce(je):he.raf(je))},Se=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ue(e)}e.length=0},je=()=>{Se(we),Se(ke),(c=we.length>0)&&he.raf(je)},Ce=e=>be().then(e),Me=ge(ke,!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,be as p,re as r,se as s}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,g as i}from"./p-b9667fbe.js";import{ElementIDUtils as s}from"@sankhyalabs/core";const r=class{constructor(e){t(this,e),this.config=void 0,this.value=void 0}ezChangeListener(t){this.value=t.detail}componentDidLoad(){this._element&&s.addIDInfo(this._element,"filterContentEditor")}render(){if(this.config)return e("ez-text-input",{id:this.config.id,ref:t=>this._textInputElement=t,label:this.config.label,value:this.config.value})}get _element(){return i(this)}};export{r as snk_filter_text}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as i,g as s}from"./p-b9667fbe.js";import{ElementIDUtils as a,UserInterface as n,ApplicationContext as o}from"@sankhyalabs/core";import{convertType as r}from"@sankhyalabs/core/dist/dataunit/metadata/DataType";import{CheckMode as l}from"@sankhyalabs/ezui/dist/collection/utils";import{F as h}from"./p-9dd2b8cb.js";const u=class{constructor(e){t(this,e),this.config=void 0,this.value=void 0,this.fix=void 0,this.unfix=void 0}componentDidLoad(){this._element&&a.addIDInfo(this._element,"filterContentEditor")}getValue(t,e){if(this.value&&e>=0&&e<this.value.length){const i=this.value[e];return t.type===n.SEARCH?i:r(t.dataType,i)}}setValue(t,e){this.value=null==this.value?Array(t).fill(null):[...this.value],this.value[t]=e,0==this.value.filter((t=>null!=t)).length&&(this.value=null)}doSearch(t,e,i){const s=o.getContextValue("__SNK__APPLICATION__");return new Promise(((a,n)=>{s.executePreparedSearch(t,e,i.searchContext).then((t=>{a(t)})).catch((t=>{n(t)}))}))}getParamsInterface(){var t,i,s;return(null===(s=null===(i=null===(t=this.config)||void 0===t?void 0:t.props)||void 0===i?void 0:i.personalizedFilter)||void 0===s?void 0:s.parameters).map(((t,i)=>{var s;const a="param_"+i;switch(t.type){case n.SEARCH:return e("ez-search",{id:a,suppressEmptyOption:!0,value:this.getValue(t,i),onEzChange:t=>this.setValue(i,t.detail),label:t.label,optionLoader:({mode:e,argument:i})=>this.doSearch(e,i,t)});case n.SWITCH:case n.CHECKBOX:return e("ez-check",{id:a,class:"ez-padding-bottom--medium",mode:n.SWITCH===t.type?l.SWITCH:l.REGULAR,value:this.getValue(t,i),label:t.label,onEzChange:t=>this.setValue(i,t.detail)});case n.DECIMALNUMBER:case n.INTEGERNUMBER:return e("ez-number-input",{id:a,label:t.label,value:this.getValue(t,i),precision:null===(s=t.props)||void 0===s?void 0:s.precision,onEzChange:t=>this.setValue(i,t.detail)});case n.OPTIONSELECTOR:return e("ez-combo-box",{id:a,label:t.label,value:this.getValue(t,i),options:t.options,onEzChange:t=>{var e;return this.setValue(i,null===(e=t.detail)||void 0===e?void 0:e.value)}});case n.DATE:return e("ez-date-input",{id:a,label:t.label,value:this.getValue(t,i),onEzChange:t=>this.setValue(i,t.detail)});case n.DATETIME:return e("ez-date-time-input",{id:a,label:t.label,value:this.getValue(t,i),onEzChange:t=>this.setValue(i,t.detail)});default:return e("ez-text-input",{id:a,label:t.label,value:this.getValue(t,i),onEzChange:t=>this.setValue(i,t.detail)})}}))}async show(){const t=document.querySelector("#param_0");t&&t.setFocus()}render(){if(this.config&&this.config.type===h.PERSONALIZED)return e(i,null,this.getParamsInterface())}get _element(){return s(this)}};export{u as snk_filter_personalized}
@@ -1 +1 @@
1
- import{r as a,h as e}from"./p-a77dd79a.js";import{DataUnit as r,DataType as o,UserInterface as i}from"@sankhyalabs/core";const s=class{constructor(e){a(this,e)}componentWillLoad(){this.dataUnit=new r("testes_com_formulario"),this.dataUnit.metadata={name:"dd://br.com.sankhya.fin.cad.movimentacaoFinanceira/Financeiro",label:"Parceiro",fields:[{name:"CODPARC",label:"Parceiro",dataType:o.NUMBER,userInterface:i.SEARCH,required:!0,properties:{ENTITYNAME:"Parceiro"}}]}}render(){return e("snk-application",null,e("ez-form",{dataUnit:this.dataUnit}))}};s.style=":host{display:block}";export{s as teste_pesquisa}
1
+ import{r as e,h as a}from"./p-b9667fbe.js";import{DataUnit as r,DataType as o,UserInterface as i}from"@sankhyalabs/core";const s=class{constructor(a){e(this,a)}componentWillLoad(){this.dataUnit=new r("testes_com_formulario"),this.dataUnit.metadata={name:"dd://br.com.sankhya.fin.cad.movimentacaoFinanceira/Financeiro",label:"Parceiro",fields:[{name:"CODPARC",label:"Parceiro",dataType:o.NUMBER,userInterface:i.SEARCH,required:!0,properties:{ENTITYNAME:"Parceiro"}}]}}render(){return a("snk-application",null,a("ez-form",{dataUnit:this.dataUnit}))}};s.style=":host{display:block}";export{s as teste_pesquisa}
@@ -0,0 +1 @@
1
+ import{r as s,h as e,H as i,g as t}from"./p-b9667fbe.js";import{ObjectUtils as r,StringUtils as a,ElementIDUtils as o}from"@sankhyalabs/core";const n=class{constructor(e){s(this,e),this._mdByName={},this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this._specialCharsRegex=/[[.\-\$\+\*,_\&\(\)%\/\\#@!:\|\=\'\"]/gim,this._charsWithAccentuation="ÁÉÍÓÚ_ÃÕ_ÂÊÎÔÛ_ÀÈÌÒÙ_Ü_Ç_áéíóú_ãõ_âêîôû_àèìòù_ü_ç",this._charsWithoutAccentuation="AEIOU_AO_AEIOU_AEIOU_U_C_aeiou_ao_aeiou_aeiou_u_c",this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=450,this._itemList=void 0,this._startLoading=!1,this.searchLoader=void 0,this.selectItem=void 0,this.argument=void 0}observeArgument(){this._textInput&&(this._textInput.value=this.argument)}clearSearch(){this.argument="",this._itemList=void 0}buildDetails(s,e){let i={};for(let t=0;t<s.length;t++){const r=s[t],a=e[r.fieldName];i[r.description]=this.highlightValue(e.__matchFields,r.options&&r.options[a]||a,s,!0)}return i}buildFirstFields(s,e,i=6){return s&&Array.isArray(s)&&s.forEach((s=>{let i=this.removeReference(e,this._mdByName[s]);i&&e.unshift(i)})),e=e.slice(0,i)}doSearch(s){this.searchLoader&&"function"==typeof this.searchLoader&&(this._startLoading=!0,this.searchLoader(s).then((s=>{if(this._startLoading=!1,s){let e=(s=r.stringToObject(s.json.$)).descriptionField,i=s.pkField;if(i){let t=[];s.data.forEach((r=>{var a;let o=this.filterFieldsMetadata(s,r),n=this.buildFirstFields(r.__matchFields,o),l={key:this.highlightValue(r.__matchFields,null===(a=r[i])||void 0===a?void 0:a.toString(),n,!0),title:e?this.highlightValue(r.__matchFields,r[e],n,!0):"",details:this.buildDetails(n,r)};t.push(l)})),this._itemList=t}}})).catch((s=>{this._startLoading=!1,this._itemList=[],console.warn(s)})))}filterFieldsMetadata(s,e){return s.fieldsMetadata.filter((i=>{let t=!a.isEmpty(e[i.fieldName])&&!1!==i.visible&&"B"!==i.type&&s.pkField!==i.fieldName&&s.descriptionField!==i.fieldName&&(i.isPrimaryKey||!i.isLinkField)&&!("S"===i.type&&"H"===i.presentationType);return t&&(this._mdByName[i.fieldName]=i),("string"!=typeof e[i.fieldName]||!(e[i.fieldName].indexOf("<img")>-1||e[i.fieldName].indexOf("<svg")>-1))&&t}))}removeAtIndex(s,e){if(e>=0&&e<s.length)return s.splice(e,1)[0]}removeReference(s,e){let i=this.indexOf(s,e);return this.removeAtIndex(s,i)}indexOf(s,e){let i=-1;return Array.isArray(s)&&this.find(s,((s,t)=>(i=t,this.equals(e,s)))),i}equals(s,e){return r.objectToString(s)===r.objectToString(e)}find(s,e){if(s)for(let i=0,t=s.length;i<t;i++)if(e(s[i],i,s))return s[i]}highlightValue(s,e,i,t){let r=this.replaceHtmlEntities(e);if(this.argument&&(t||this.isIn(s,i.fieldName))){const s=this.getArgumentNumber();let e=(isNaN(s)?this.argument:s.toString()).split(/%|,|\s+/),t=0,a=this.replaceAccentuatedChars(r);e.forEach((s=>{if(s){s=this.replaceAccentuatedChars(s);let e=this.getSpecialCharacters(s);null!=e&&e.length>0&&(s=this.removeSpecialCharacters(s)),(i.mask||"CGC_CPF"===i.uiType||"Phone"===i.uiType)&&(s=s.split("").join("\\.?\\-?\\/?\\(?\\)?"));let o=new RegExp(s,"ig");o.lastIndex=t;let n=o.exec(a);if(n&&n.length>0){t=n.index;let s=n[0].length,e=r.substring(t,t+s),i=(null==e?void 0:e.trim())?this._startHighlightTag+e+this._endHighlightTag:"",o=r.substring(0,t),l=r.substring(t+s);r=o+i+l,t+=i.length,a=this.replaceAccentuatedChars(r)}}}))}return r}replaceHtmlEntities(s){return null==s?s:String(s).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}replaceAccentuatedChars(s){return null==s?s:this.replaceToSpace(s,["&amp;","&lt;","&gt;","&quot;"]).replace(/[^\w ]/g,(s=>{let e=this._charsWithAccentuation.indexOf(s);return e>-1&&(s=this._charsWithoutAccentuation.charAt(e)),s||""}))}replaceToSpace(s,e=[]){return null==s||e.forEach((e=>{const i=new RegExp(e,"g");let t="";for(let s=0;s<e.length;s++)t+=" ";s=String(s).replace(i,t)})),s}isIn(s,e){return this.indexOf(s,e)>-1}getSpecialCharacters(s){let e,i=[];for(;e=this._specialCharsRegex.exec(s);)i.push(s[e.index]);return i}removeSpecialCharacters(s){return this.getSpecialCharacters(s).forEach((e=>{s=this.replaceAll(s,e,"")})),s}replaceAll(s,e,i){let t=(null!=s?s:"").indexOf(e);for(;t>-1;)t=(s=s.replace(e,i)).indexOf(e);return s}getArgumentNumber(){return Number(this.argument||void 0)}createOption(s){let{key:e,title:i}=s;const t=new RegExp(this._startHighlightTag,"g"),r=new RegExp(this._endHighlightTag,"g");i=a.decodeHtmlEntities(i);const o={value:null==e?void 0:e.replace(t,"").replace(r,""),label:null==i?void 0:i.replace(t,"").replace(r,"")};this.selectItem(o)}onChangeValue(s){if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=setTimeout((()=>{this.onChangeValue(s)}),this._deboucingTime));this.argument=(s.detail||"").trim();const e=this.getArgumentNumber();this.argument&&(!isNaN(e)||this.argument.length>=this._limitCharsToSearch)?this._changeDeboucingTimeout=setTimeout((()=>{this.doSearch(isNaN(e)?this.argument:e.toString())}),this._deboucingTime):this._itemList=void 0}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=void 0)}onClickSearch(){this.doSearch((this.argument||"").trim())}getMessageView(){return this._startLoading?"Aguarde, buscando registros...":this._itemList?this._itemList.length>=1?`${this._itemList.length} ${this._itemList.length>1?"registros encontrados":"registro encontrado"}`:"Nenhum registro encontrado":"Os resultados de sua pesquisa aparecerão aqui..."}componentDidLoad(){o.addIDInfo(this._element)}render(){var s;return e(i,null,e("div",{class:"snk-pesquisa"},e("div",{class:"snk-pesquisa__input"},e("ez-text-input",{label:"Buscar",class:"ez-margin-right--medium",canShowError:!1,ref:s=>this._textInput=s,onEzChange:s=>this.onChangeValue(s),value:this.argument,"data-element-id":"searchInput"},e("ez-icon",{slot:"leftIcon",iconName:"search"}),this.argument&&(null===(s=this._textInput)||void 0===s?void 0:s.value)?e("button",{slot:"rightIcon",class:"snk-pesquisa__btn",onClick:()=>this.clearSearch()},e("ez-icon",{iconName:"close"})):void 0),e("ez-button",{class:"ez-button--primary",label:"Pesquisar",onClick:()=>this.onClickSearch()})),e("label",{class:"snk-pesquisa__records"},this.getMessageView()),e("div",{class:"snk-pesquisa__content"},this._itemList&&this._itemList.map((s=>e("ez-card-item",{onEzClick:s=>this.createOption(s.detail),item:s}))))))}get _element(){return t(this)}static get watchers(){return{argument:["observeArgument"]}}};n.style=".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--medium, 12px);max-height:100%;height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records.sc-snk-pesquisa{font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);color:var(--snk-pesquisa__records--color);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";export{n as snk_pesquisa}
@@ -0,0 +1 @@
1
+ import{r as t,h as s,g as i}from"./p-b9667fbe.js";import{ElementIDUtils as e}from"@sankhyalabs/core";import{F as o}from"./p-9dd2b8cb.js";const r=class{constructor(s){t(this,s),this.value=void 0,this.config=void 0}ezChangeListener(t){this.value=t.detail.value}async show(){this._comboElement.setFocus()}componentDidLoad(){this._element&&e.addIDInfo(this._element,"filterContentEditor")}render(){if(this.config&&this.config.type===o.MULTI_SELECT)return s("ez-combo-box",{id:this.config.id,ref:t=>this._comboElement=t,label:this.config.label,value:this.config.value,options:this.config.props.options})}get _element(){return i(this)}};export{r as snk_filter_multi_select}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-a77dd79a.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((e=>t([["p-57895452",[[1,"teste-pesquisa"]]],["p-5ebc029c",[[2,"snk-data-unit",{dataState:[1040],dataUnitName:[1,"data-unit-name"],entityName:[1,"entity-name"],pageSize:[2,"page-size"],dataUnit:[1040],beforeSave:[16],afterSave:[16],getDataUnit:[64],getSelectedRecordsIDsInfo:[64]}]]],["p-d7ae56ce",[[0,"snk-filter-binary-select",{value:[1544],config:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-91c23d20",[[0,"snk-filter-multi-select",{value:[1544],config:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-1ccaea51",[[0,"snk-filter-number",{config:[16],value:[2],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-12ebe36a",[[0,"snk-filter-period",{config:[16],value:[8],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-ab4ff312",[[0,"snk-filter-personalized",{config:[16],value:[1040],fix:[16],unfix:[16],show:[64]}]]],["p-e075dba7",[[0,"snk-filter-search",{config:[16],value:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-df5d94c6",[[0,"snk-filter-text",{config:[16],value:[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-187b0d06",[[2,"snk-pesquisa",{searchLoader:[16],selectItem:[16],argument:[1025],_itemList:[32],_startLoading:[32]}]]],["p-3f6c05c7",[[2,"snk-config-options",{fieldConfig:[16],idConfig:[513,"id-config"],dataUnit:[16],_defaultType:[32]}]]],["p-3c7ec56e",[[6,"snk-tab-config",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1],_processedTabs:[32],_activeEditText:[32],_activeEditTextIndex:[32],_actionsHide:[32],_actionsShow:[32]}]]],["p-d3e402d3",[[0,"snk-filter-detail",{config:[1040],getMessage:[16],show:[64]}]]],["p-c15108d5",[[6,"snk-grid",{configName:[1,"config-name"],actionsList:[16],taskbarManager:[16],statusResolver:[16],multipleSelection:[4,"multiple-selection"],presentationMode:[1,"presentation-mode"],_dataUnit:[32],_dataState:[32],_gridConfig:[32],_popUpGridConfig:[32],showConfig:[64],hideConfig:[64],setConfig:[64]}],[2,"snk-configurator",{configName:[1,"config-name"],viewMode:[1,"view-mode"],_opened:[32],_permissions:[32],open:[64],close:[64]}],[2,"snk-field-config",{isConfigActive:[16],fieldConfig:[16],modeInsertion:[516,"mode-insertion"],dataUnit:[16]}]]],["p-bcb2fb03",[[2,"snk-form-config",{dataUnit:[16],formConfig:[16],configName:[513,"config-name"],_formConfigOptions:[32],_fieldConfigSelected:[32],_layoutFormConfig:[32],_fieldsAvailable:[32],_formConfig:[32],_formConfigChanged:[32],_optionFormConfigSelected:[32],_optionFormConfigChanged:[32],_tempGroups:[32]}]]],["p-048e126b",[[0,"snk-exporter-email-sender",{getMessage:[16],_config:[32],_opened:[32],_currentStep:[32],open:[64],close:[64]}]]],["p-1dbe9dd8",[[2,"snk-filter-bar",{dataUnit:[1040],configName:[1,"config-name"],filterConfig:[1040],allowDefault:[32],scrollerLocked:[32]},[[0,"filterChange","filterChangeListener"]]],[2,"snk-grid-config",{selectedIndex:[1026,"selected-index"],application:[16],columns:[1040],config:[1040],saveConfig:[64]}],[6,"snk-taskbar",{configName:[1,"config-name"],buttons:[1],customButtons:[16],actionsList:[16],primaryButton:[1,"primary-button"],disabledButtons:[16],dataUnit:[16],presentationMode:[1537,"presentation-mode"],_permissions:[32]}],[0,"snk-filter-item",{config:[1040],getMessage:[16],detailIsVisible:[32],showUp:[64],hideDetail:[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{label:[1],iconName:[1,"icon-name"],items:[16],getMessage:[16],emptyText:[1,"empty-text"],findFilterText:[1,"find-filter-text"],buttonClass:[1,"button-class"],_filterArgument:[32],_showAll:[32],hideDetail:[64]},[[2,"keydown","keyDownHandler"]]],[0,"snk-filter-modal",{getMessage:[16],items:[1040],modalTitle:[1,"modal-title"],modalSubTitle:[1,"modal-sub-title"],cancelButtonLabel:[1,"cancel-button-label"],okButtonLabel:[1,"ok-button-label"],infoText:[1,"info-text"],useSearch:[4,"use-search"],processModalAction:[16],_filterArgument:[32]}],[1,"snk-select-box",{selectedOption:[1,"selected-option"]}],[2,"snk-data-exporter",{provider:[16],_items:[32],_showDropdown:[32],_releasedToExport:[32]}]]],["p-f6f71be7",[[2,"snk-form",{configName:[1,"config-name"],recordsValidator:[16],actionsList:[16],taskbarManager:[16],presentationMode:[1,"presentation-mode"],_dataUnit:[32],_dataState:[32],_editionFormConfig:[32],_insertionFormConfig:[32],_showFormConfig:[32],showConfig:[64],hideConfig:[64]}]]],["p-f9829109",[[6,"snk-crud",{configName:[1025,"config-name"],actionsList:[16],taskbarManager:[16],recordsValidator:[16],statusResolver:[16],multipleSelection:[4,"multiple-selection"],presentationMode:[1,"presentation-mode"],_dataUnit:[32],_dataState:[32],_viewMode:[32],goToView:[64]}]]],["p-4cec3835",[[2,"snk-application",{messagesBuilder:[1040],configName:[1,"config-name"],isUserSup:[64],hasAccess:[64],getAllAccess:[64],getStringParam:[64],getIntParam:[64],getFloatParam:[64],getBooleanParam:[64],getDateParam:[64],showPopUp:[64],showModal:[64],closeModal:[64],closePopUp:[64],temOpcional:[64],getConfig:[64],saveConfig:[64],getAttributeFromHTMLWrapper:[64],openApp:[64],webConnection:[64],createDataunit:[64],getDataUnit:[64],getResourceID:[64],getUserID:[64],alert:[64],error:[64],success:[64],message:[64],confirm:[64],info:[64],loadFormConfig:[64],loadGridConfig:[64],fetchUserAvailableConfigs:[64],fetchLegacyConfig:[64],fetchDefaultConfig:[64],loadTotals:[64],saveGridConfig:[64],getFilterBarConfig:[64],saveFilterBarConfig:[64],saveFormConfig:[64],getDefaultValues:[64],getDefaultValue:[64],executeSearch:[64],executePreparedSearch:[64],isDebugMode:[64],getAppLabel:[64]}]]]],e)));
1
+ import{p as e,b as t}from"./p-b9667fbe.js";export{s as setNonce}from"./p-b9667fbe.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((e=>t([["p-e551b19a",[[1,"teste-pesquisa"]]],["p-01fdcc77",[[2,"snk-data-unit",{dataState:[1040],dataUnitName:[1,"data-unit-name"],entityName:[1,"entity-name"],pageSize:[2,"page-size"],dataUnit:[1040],beforeSave:[16],afterSave:[16],getDataUnit:[64],getSelectedRecordsIDsInfo:[64]}]]],["p-86d29b6f",[[0,"snk-filter-binary-select",{value:[1544],config:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-ee82c157",[[0,"snk-filter-multi-select",{value:[1544],config:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-ad51bf1c",[[0,"snk-filter-number",{config:[16],value:[2],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-5fc55684",[[0,"snk-filter-period",{config:[16],value:[8],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-d5c9c1f8",[[0,"snk-filter-personalized",{config:[16],value:[1040],fix:[16],unfix:[16],show:[64]}]]],["p-5e62a17b",[[0,"snk-filter-search",{config:[16],value:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-c336170d",[[0,"snk-filter-text",{config:[16],value:[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-e701646c",[[2,"snk-pesquisa",{searchLoader:[16],selectItem:[16],argument:[1025],_itemList:[32],_startLoading:[32]}]]],["p-93c92b97",[[2,"snk-config-options",{fieldConfig:[16],idConfig:[513,"id-config"],dataUnit:[16],_defaultType:[32]}]]],["p-5360f8fa",[[6,"snk-tab-config",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1],_processedTabs:[32],_activeEditText:[32],_activeEditTextIndex:[32],_actionsHide:[32],_actionsShow:[32]}]]],["p-afba9bbe",[[0,"snk-filter-detail",{config:[1040],getMessage:[16],show:[64]}]]],["p-9fab987d",[[6,"snk-grid",{configName:[1,"config-name"],actionsList:[16],taskbarManager:[16],statusResolver:[16],multipleSelection:[4,"multiple-selection"],presentationMode:[1,"presentation-mode"],_dataUnit:[32],_dataState:[32],_gridConfig:[32],_popUpGridConfig:[32],showConfig:[64],hideConfig:[64],setConfig:[64]}],[2,"snk-configurator",{configName:[1,"config-name"],viewMode:[1,"view-mode"],_opened:[32],_permissions:[32],open:[64],close:[64]}],[2,"snk-field-config",{isConfigActive:[16],fieldConfig:[16],modeInsertion:[516,"mode-insertion"],dataUnit:[16]}]]],["p-125c2d01",[[2,"snk-form-config",{dataUnit:[16],formConfig:[16],configName:[513,"config-name"],_formConfigOptions:[32],_fieldConfigSelected:[32],_layoutFormConfig:[32],_fieldsAvailable:[32],_formConfig:[32],_formConfigChanged:[32],_optionFormConfigSelected:[32],_optionFormConfigChanged:[32],_tempGroups:[32]}]]],["p-0b86c7f0",[[0,"snk-exporter-email-sender",{getMessage:[16],_config:[32],_opened:[32],_currentStep:[32],open:[64],close:[64]}]]],["p-123732eb",[[2,"snk-filter-bar",{dataUnit:[1040],configName:[1,"config-name"],filterConfig:[1040],allowDefault:[32],scrollerLocked:[32]},[[0,"filterChange","filterChangeListener"]]],[2,"snk-grid-config",{selectedIndex:[1026,"selected-index"],application:[16],columns:[1040],config:[1040],saveConfig:[64]}],[6,"snk-taskbar",{configName:[1,"config-name"],buttons:[1],customButtons:[16],actionsList:[16],primaryButton:[1,"primary-button"],disabledButtons:[16],dataUnit:[16],presentationMode:[1537,"presentation-mode"],_permissions:[32]}],[0,"snk-filter-item",{config:[1040],getMessage:[16],detailIsVisible:[32],showUp:[64],hideDetail:[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{label:[1],iconName:[1,"icon-name"],items:[16],getMessage:[16],emptyText:[1,"empty-text"],findFilterText:[1,"find-filter-text"],buttonClass:[1,"button-class"],_filterArgument:[32],_showAll:[32],hideDetail:[64]},[[2,"keydown","keyDownHandler"]]],[0,"snk-filter-modal",{getMessage:[16],items:[1040],modalTitle:[1,"modal-title"],modalSubTitle:[1,"modal-sub-title"],cancelButtonLabel:[1,"cancel-button-label"],okButtonLabel:[1,"ok-button-label"],infoText:[1,"info-text"],useSearch:[4,"use-search"],processModalAction:[16],_filterArgument:[32]}],[1,"snk-select-box",{selectedOption:[1,"selected-option"]}],[2,"snk-data-exporter",{provider:[16],_items:[32],_showDropdown:[32],_releasedToExport:[32]}]]],["p-6878464e",[[2,"snk-form",{configName:[1,"config-name"],recordsValidator:[16],actionsList:[16],taskbarManager:[16],presentationMode:[1,"presentation-mode"],_dataUnit:[32],_dataState:[32],_editionFormConfig:[32],_insertionFormConfig:[32],_showFormConfig:[32],showConfig:[64],hideConfig:[64]}]]],["p-2cd74aa1",[[6,"snk-crud",{configName:[1025,"config-name"],actionsList:[16],taskbarManager:[16],recordsValidator:[16],statusResolver:[16],multipleSelection:[4,"multiple-selection"],presentationMode:[1,"presentation-mode"],_dataUnit:[32],_dataState:[32],_viewMode:[32],goToView:[64]}]]],["p-82ab941a",[[2,"snk-application",{messagesBuilder:[1040],configName:[1,"config-name"],isUserSup:[64],hasAccess:[64],getAllAccess:[64],getStringParam:[64],getIntParam:[64],getFloatParam:[64],getBooleanParam:[64],getDateParam:[64],showPopUp:[64],showModal:[64],closeModal:[64],closePopUp:[64],temOpcional:[64],getConfig:[64],saveConfig:[64],getAttributeFromHTMLWrapper:[64],openApp:[64],webConnection:[64],createDataunit:[64],getDataUnit:[64],getResourceID:[64],getUserID:[64],alert:[64],error:[64],success:[64],message:[64],confirm:[64],info:[64],loadFormConfig:[64],loadGridConfig:[64],fetchUserAvailableConfigs:[64],fetchLegacyConfig:[64],fetchDefaultConfig:[64],loadTotals:[64],saveGridConfig:[64],getFilterBarConfig:[64],saveFilterBarConfig:[64],saveFormConfig:[64],getDefaultValues:[64],getDefaultValue:[64],executeSearch:[64],executePreparedSearch:[64],isDebugMode:[64],getAppLabel:[64]}]]]],e)));
@@ -133,7 +133,7 @@ export interface ListenOptions {
133
133
  */
134
134
  passive?: boolean;
135
135
  }
136
- export declare type ListenTargetOptions = 'body' | 'document' | 'window';
136
+ export type ListenTargetOptions = 'body' | 'document' | 'window';
137
137
  export interface StateDecorator {
138
138
  (): PropertyDecorator;
139
139
  }
@@ -214,8 +214,8 @@ export declare const State: StateDecorator;
214
214
  * https://stenciljs.com/docs/reactive-data#watch-decorator
215
215
  */
216
216
  export declare const Watch: WatchDecorator;
217
- export declare type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
218
- export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
217
+ export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
218
+ export type ErrorHandler = (err: any, element?: HTMLElement) => void;
219
219
  /**
220
220
  * `setMode()` is used for libraries which provide multiple "modes" for styles.
221
221
  */
@@ -223,6 +223,7 @@ export declare const setMode: (handler: ResolutionHandler) => void;
223
223
  /**
224
224
  * `getMode()` is used for libraries which provide multiple "modes" for styles.
225
225
  * @param ref a reference to the node to get styles for
226
+ * @returns the current mode or undefined, if not found
226
227
  */
227
228
  export declare function getMode<T = string | undefined>(ref: any): T;
228
229
  export declare function setPlatformHelpers(helpers: {
@@ -237,6 +238,7 @@ export declare function setPlatformHelpers(helpers: {
237
238
  * if the path needs to be customized.
238
239
  * @param path the path to use in calculating the asset path. this value will be
239
240
  * used in conjunction with the base asset path
241
+ * @returns the base path
240
242
  */
241
243
  export declare function getAssetPath(path: string): string;
242
244
  /**
@@ -252,11 +254,22 @@ export declare function getAssetPath(path: string): string;
252
254
  * bundling, and where your assets can be loaded from. Additionally custom bundling
253
255
  * will have to ensure the static assets are copied to its build directory.
254
256
  * @param path the asset path to set
257
+ * @returns the set path
255
258
  */
256
259
  export declare function setAssetPath(path: string): string;
260
+ /**
261
+ * Used to specify a nonce value that corresponds with an application's
262
+ * [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
263
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
264
+ * Alternatively, the nonce value can be set on a `meta` tag in the DOM head
265
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
266
+ * @param nonce The value to be used for the nonce attribute.
267
+ */
268
+ export declare function setNonce(nonce: string): void;
257
269
  /**
258
270
  * Retrieve a Stencil element for a given reference
259
271
  * @param ref the ref to get the Stencil element for
272
+ * @returns a reference to the element
260
273
  */
261
274
  export declare function getElement(ref: any): HTMLStencilElement;
262
275
  /**
@@ -269,6 +282,7 @@ export declare function getElement(ref: any): HTMLStencilElement;
269
282
  export declare function forceUpdate(ref: any): void;
270
283
  /**
271
284
  * getRenderingRef
285
+ * @returns the rendering ref
272
286
  */
273
287
  export declare function getRenderingRef(): any;
274
288
  export interface HTMLStencilElement extends HTMLElement {
@@ -428,13 +442,57 @@ interface HostAttributes {
428
442
  ref?: (el: HTMLElement | null) => void;
429
443
  [prop: string]: any;
430
444
  }
445
+ /**
446
+ * Utilities for working with functional Stencil components. An object
447
+ * conforming to this interface is passed by the Stencil runtime as the third
448
+ * argument to a functional component, allowing component authors to work with
449
+ * features like children.
450
+ *
451
+ * The children of a functional component will be passed as the second
452
+ * argument, so a functional component which uses these utils to transform its
453
+ * children might look like the following:
454
+ *
455
+ * ```ts
456
+ * export const AddClass: FunctionalComponent = (_, children, utils) => (
457
+ * utils.map(children, child => ({
458
+ * ...child,
459
+ * vattrs: {
460
+ * ...child.vattrs,
461
+ * class: `${child.vattrs.class} add-class`
462
+ * }
463
+ * }))
464
+ * );
465
+ * ```
466
+ *
467
+ * For more see the Stencil documentation, here:
468
+ * https://stenciljs.com/docs/functional-components
469
+ */
431
470
  export interface FunctionalUtilities {
471
+ /**
472
+ * Utility for reading the children of a functional component at runtime.
473
+ * Since the Stencil runtime uses a different interface for children it is
474
+ * not recommendeded to read the children directly, and is preferable to use
475
+ * this utility to, for instance, perform a side effect for each child.
476
+ */
432
477
  forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
478
+ /**
479
+ * Utility for transforming the children of a functional component. Given an
480
+ * array of children and a callback this will return a list of the results of
481
+ * passing each child to the supplied callback.
482
+ */
433
483
  map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
434
484
  }
435
485
  export interface FunctionalComponent<T = {}> {
436
486
  (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
437
487
  }
488
+ /**
489
+ * A Child VDOM node
490
+ *
491
+ * This has most of the same properties as {@link VNode} but friendlier names
492
+ * (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in
493
+ * order to provide a friendlier public interface for users of the
494
+ * {@link FunctionalUtilities}).
495
+ */
438
496
  export interface ChildNode {
439
497
  vtag?: string | number | Function;
440
498
  vkey?: string | number;
@@ -481,6 +539,9 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
481
539
  export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
482
540
  export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
483
541
  export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
542
+ /**
543
+ * A virtual DOM node
544
+ */
484
545
  export interface VNode {
485
546
  $flags$: number;
486
547
  $tag$: string | number | Function;
package/loader/index.d.ts CHANGED
@@ -10,3 +10,12 @@ export interface CustomElementsDefineOptions {
10
10
  }
11
11
  export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
12
12
  export declare function applyPolyfills(): Promise<void>;
13
+
14
+ /**
15
+ * Used to specify a nonce value that corresponds with an application's CSP.
16
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
17
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
18
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
19
+ * will result in the same behavior.
20
+ */
21
+ export declare function setNonce(nonce: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/sankhyablocks",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -40,8 +40,8 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@babel/preset-env": "^7.18.2",
43
- "@sankhyalabs/core": "^2.11.1",
44
- "@sankhyalabs/ezui": "^2.15.2",
43
+ "@sankhyalabs/core": "^3.1.0",
44
+ "@sankhyalabs/ezui": "^3.0.4",
45
45
  "@sankhyalabs/skippeerdeps": "^1.0.2",
46
46
  "@semantic-release/exec": "^5.0.0",
47
47
  "@semantic-release/git": "^9.0.0",
@@ -65,8 +65,8 @@
65
65
  "verbose": true
66
66
  },
67
67
  "peerDependencies": {
68
- "@sankhyalabs/core": "^2.0.0",
69
- "@sankhyalabs/ezui": "^2.0.0"
68
+ "@sankhyalabs/core": "^3.1.0",
69
+ "@sankhyalabs/ezui": "^3.0.1"
70
70
  },
71
71
  "license": "MIT"
72
72
  }