@sankhyalabs/sankhyablocks 8.1.0 → 8.2.0-dev.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 (221) hide show
  1. package/dist/cjs/{ConfigStorage-73e7afff.js → ConfigStorage-12397f18.js} +163 -51
  2. package/dist/cjs/{DataFetcher-004811c6.js → DataFetcher-f2da1f79.js} +68 -30
  3. package/dist/cjs/ISave-d68ce3cd.js +8 -0
  4. package/dist/cjs/ResourceIDUtils-5ff86aa7.js +12 -0
  5. package/dist/cjs/{SnkFormConfigManager-d1f1a222.js → SnkFormConfigManager-13f79e37.js} +19 -21
  6. package/dist/cjs/auth-fetcher-319a4cb2.js +34 -0
  7. package/dist/cjs/{dataunit-fetcher-029eafbd.js → dataunit-fetcher-e72068c1.js} +1 -1
  8. package/dist/cjs/{form-config-fetcher-181767c9.js → form-config-fetcher-5d62ab62.js} +66 -3
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{pesquisa-fetcher-9a97994a.js → pesquisa-fetcher-8c363096.js} +1 -1
  11. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  12. package/dist/cjs/snk-actions-button.cjs.entry.js +18 -11
  13. package/dist/cjs/snk-application.cjs.entry.js +51 -73
  14. package/dist/cjs/snk-attach.cjs.entry.js +7 -13
  15. package/dist/cjs/snk-configurator.cjs.entry.js +2 -1
  16. package/dist/cjs/snk-crud.cjs.entry.js +28 -9
  17. package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
  18. package/dist/cjs/{snk-data-unit-d5109a08.js → snk-data-unit-80a00ae4.js} +8 -6
  19. package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
  20. package/dist/cjs/snk-detail-view.cjs.entry.js +18 -25
  21. package/dist/cjs/snk-entity-list.cjs.entry.js +0 -4
  22. package/dist/cjs/snk-filter-bar.cjs.entry.js +14 -17
  23. package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -15
  24. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +5 -19
  25. package/dist/cjs/snk-form-config.cjs.entry.js +6 -17
  26. package/dist/cjs/snk-form-view.cjs.entry.js +6 -1
  27. package/dist/cjs/snk-form.cjs.entry.js +12 -8
  28. package/dist/cjs/snk-grid-config.cjs.entry.js +5 -6
  29. package/dist/cjs/snk-grid.cjs.entry.js +20 -20
  30. package/dist/cjs/{snk-guides-viewer-aa3e3bfa.js → snk-guides-viewer-a7cd6fda.js} +18 -9
  31. package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -8
  32. package/dist/cjs/snk-personalized-filter.cjs.entry.js +13 -16
  33. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  34. package/dist/cjs/snk-simple-crud.cjs.entry.js +43 -92
  35. package/dist/cjs/snk-taskbar.cjs.entry.js +2 -1
  36. package/dist/collection/components/snk-actions-button/actions/index.js +3 -4
  37. package/dist/collection/components/snk-actions-button/snk-actions-button.js +8 -4
  38. package/dist/collection/components/snk-application/snk-application.js +60 -65
  39. package/dist/collection/components/snk-configurator/snk-configurator.js +19 -1
  40. package/dist/collection/components/snk-crud/snk-crud.js +63 -8
  41. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +65 -15
  42. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +27 -1
  43. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +66 -30
  44. package/dist/collection/components/snk-data-unit/snk-data-unit.js +42 -7
  45. package/dist/collection/components/snk-entity-list/snk-entity-list.js +0 -23
  46. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +2 -12
  47. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +1 -1
  48. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +21 -16
  49. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +28 -12
  50. package/dist/collection/components/snk-form/SnkFormConfigManager.js +17 -19
  51. package/dist/collection/components/snk-form/snk-form.js +46 -2
  52. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +5 -15
  53. package/dist/collection/components/snk-grid/snk-grid.js +110 -16
  54. package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +19 -1
  55. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +28 -12
  56. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +43 -9
  57. package/dist/collection/components/snk-taskbar/snk-taskbar.js +19 -1
  58. package/dist/collection/lib/configs/ConfigStorage.js +33 -44
  59. package/dist/collection/lib/dataUnit/InMemoryLoader.js +23 -71
  60. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +39 -30
  61. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +0 -24
  62. package/dist/collection/lib/index.js +10 -0
  63. package/dist/collection/lib/resourceid/ResourceIDUtils.js +7 -0
  64. package/dist/collection/lib/utils/urlutils.js +29 -0
  65. package/dist/components/ConfigStorage.js +161 -48
  66. package/dist/components/DataFetcher.js +68 -30
  67. package/dist/components/ResourceIDUtils.js +10 -0
  68. package/dist/components/SnkFormConfigManager.js +17 -19
  69. package/dist/components/auth-fetcher.js +32 -0
  70. package/dist/components/form-config-fetcher.js +64 -2
  71. package/dist/components/snk-actions-button2.js +23 -9
  72. package/dist/components/snk-application2.js +132 -154
  73. package/dist/components/snk-attach2.js +1 -8
  74. package/dist/components/snk-configurator2.js +3 -1
  75. package/dist/components/snk-crud.js +29 -7
  76. package/dist/components/snk-data-unit2.js +10 -6
  77. package/dist/components/snk-detail-view2.js +28 -23
  78. package/dist/components/snk-entity-list.js +0 -4
  79. package/dist/components/snk-filter-bar2.js +12 -12
  80. package/dist/components/snk-filter-detail2.js +2 -12
  81. package/dist/components/snk-filter-modal-item2.js +5 -16
  82. package/dist/components/snk-form-config2.js +5 -15
  83. package/dist/components/snk-form-view2.js +6 -1
  84. package/dist/components/snk-form.js +9 -2
  85. package/dist/components/snk-grid-config2.js +4 -2
  86. package/dist/components/snk-grid2.js +23 -16
  87. package/dist/components/snk-personalized-filter2.js +11 -11
  88. package/dist/components/snk-simple-crud2.js +33 -81
  89. package/dist/components/snk-taskbar2.js +3 -1
  90. package/dist/esm/{ConfigStorage-19a7260b.js → ConfigStorage-932ab366.js} +162 -49
  91. package/dist/esm/{DataFetcher-e0fc5549.js → DataFetcher-7e18aa30.js} +68 -30
  92. package/dist/esm/ISave-4412b20c.js +8 -0
  93. package/dist/esm/ResourceIDUtils-a114189a.js +10 -0
  94. package/dist/esm/{SnkFormConfigManager-1a42eb02.js → SnkFormConfigManager-bb9afc3f.js} +19 -21
  95. package/dist/esm/auth-fetcher-6d9664b7.js +32 -0
  96. package/dist/esm/{dataunit-fetcher-6a695723.js → dataunit-fetcher-91a4eb82.js} +1 -1
  97. package/dist/esm/{form-config-fetcher-9e167008.js → form-config-fetcher-aaaa79a6.js} +65 -3
  98. package/dist/esm/loader.js +1 -1
  99. package/dist/esm/{pesquisa-fetcher-9118eb7a.js → pesquisa-fetcher-56b30fb4.js} +1 -1
  100. package/dist/esm/sankhyablocks.js +1 -1
  101. package/dist/esm/snk-actions-button.entry.js +18 -11
  102. package/dist/esm/snk-application.entry.js +49 -71
  103. package/dist/esm/snk-attach.entry.js +3 -9
  104. package/dist/esm/snk-configurator.entry.js +2 -1
  105. package/dist/esm/snk-crud.entry.js +28 -9
  106. package/dist/esm/snk-data-exporter.entry.js +2 -2
  107. package/dist/esm/{snk-data-unit-3a0bbfcb.js → snk-data-unit-3ab57d1a.js} +8 -6
  108. package/dist/esm/snk-data-unit.entry.js +1 -1
  109. package/dist/esm/snk-detail-view.entry.js +18 -25
  110. package/dist/esm/snk-entity-list.entry.js +0 -4
  111. package/dist/esm/snk-filter-bar.entry.js +14 -17
  112. package/dist/esm/snk-filter-detail.entry.js +2 -16
  113. package/dist/esm/snk-filter-modal-item.entry.js +6 -20
  114. package/dist/esm/snk-form-config.entry.js +7 -18
  115. package/dist/esm/snk-form-view.entry.js +6 -1
  116. package/dist/esm/snk-form.entry.js +12 -8
  117. package/dist/esm/snk-grid-config.entry.js +5 -6
  118. package/dist/esm/snk-grid.entry.js +20 -20
  119. package/dist/esm/{snk-guides-viewer-aa386f6e.js → snk-guides-viewer-cc709b5f.js} +18 -9
  120. package/dist/esm/snk-guides-viewer.entry.js +8 -8
  121. package/dist/esm/snk-personalized-filter.entry.js +13 -16
  122. package/dist/esm/snk-print-selector.entry.js +1 -1
  123. package/dist/esm/snk-simple-crud.entry.js +34 -83
  124. package/dist/esm/snk-taskbar.entry.js +2 -1
  125. package/dist/sankhyablocks/p-01739b21.entry.js +1 -0
  126. package/dist/sankhyablocks/{p-e7e54737.entry.js → p-03bb1aea.entry.js} +1 -1
  127. package/dist/sankhyablocks/p-05dbc70e.entry.js +1 -0
  128. package/dist/sankhyablocks/{p-0a4c753d.js → p-14eac6fe.js} +1 -1
  129. package/dist/sankhyablocks/{p-2ac9c585.js → p-2d333d22.js} +1 -1
  130. package/dist/sankhyablocks/p-41e897f1.js +56 -0
  131. package/dist/sankhyablocks/p-48a40939.js +1 -0
  132. package/dist/sankhyablocks/p-611aa624.entry.js +1 -0
  133. package/dist/sankhyablocks/p-66bb8c20.entry.js +1 -0
  134. package/dist/sankhyablocks/p-688dcb4c.js +1 -0
  135. package/dist/sankhyablocks/p-6f154396.entry.js +1 -0
  136. package/dist/sankhyablocks/p-787071a8.js +1 -0
  137. package/dist/sankhyablocks/p-8818d8f6.entry.js +1 -0
  138. package/dist/sankhyablocks/p-93f6ca04.entry.js +1 -0
  139. package/dist/sankhyablocks/p-9a270401.entry.js +1 -0
  140. package/dist/sankhyablocks/p-9e7d65a4.js +1 -0
  141. package/dist/sankhyablocks/p-a52a6c9d.js +26 -0
  142. package/dist/sankhyablocks/p-b6003974.entry.js +1 -0
  143. package/dist/sankhyablocks/p-c555075c.entry.js +1 -0
  144. package/dist/sankhyablocks/p-cfb33a4a.entry.js +1 -0
  145. package/dist/sankhyablocks/{p-7c7764bf.entry.js → p-d13c00b6.entry.js} +1 -1
  146. package/dist/sankhyablocks/p-d4f9ee17.entry.js +1 -0
  147. package/dist/sankhyablocks/p-d53a9169.entry.js +1 -0
  148. package/dist/sankhyablocks/p-d7638f45.entry.js +11 -0
  149. package/dist/sankhyablocks/p-e086cc2a.entry.js +1 -0
  150. package/dist/sankhyablocks/p-e64f3e17.entry.js +1 -0
  151. package/dist/sankhyablocks/p-ed41b38c.js +1 -0
  152. package/dist/sankhyablocks/p-ed705cbb.entry.js +1 -0
  153. package/dist/sankhyablocks/p-efc10705.entry.js +1 -0
  154. package/dist/sankhyablocks/p-f74fe358.js +1 -0
  155. package/dist/sankhyablocks/{p-df8621b4.js → p-f8e6b97e.js} +1 -1
  156. package/dist/sankhyablocks/p-f91e0c5d.entry.js +1 -0
  157. package/dist/sankhyablocks/p-fa523d6b.entry.js +1 -0
  158. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  159. package/dist/types/components/snk-actions-button/actions/index.d.ts +2 -1
  160. package/dist/types/components/snk-application/snk-application.d.ts +8 -13
  161. package/dist/types/components/snk-configurator/snk-configurator.d.ts +4 -0
  162. package/dist/types/components/snk-crud/snk-crud.d.ts +10 -0
  163. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +13 -0
  164. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +5 -0
  165. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +13 -2
  166. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +8 -0
  167. package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +0 -4
  168. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +0 -3
  169. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +1 -1
  170. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +5 -4
  171. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
  172. package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +5 -4
  173. package/dist/types/components/snk-form/snk-form.d.ts +9 -1
  174. package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +0 -2
  175. package/dist/types/components/snk-grid/snk-grid.d.ts +18 -1
  176. package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +4 -0
  177. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +5 -1
  178. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +8 -0
  179. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +4 -0
  180. package/dist/types/components.d.ts +189 -21
  181. package/dist/types/lib/configs/ConfigStorage.d.ts +11 -13
  182. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -8
  183. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  184. package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +0 -1
  185. package/dist/types/lib/index.d.ts +11 -0
  186. package/dist/types/lib/resourceid/ResourceIDUtils.d.ts +3 -0
  187. package/dist/types/lib/utils/urlutils.d.ts +14 -0
  188. package/package.json +2 -2
  189. package/dist/cjs/filter-bar-config-fetcher-2b8ed9d0.js +0 -155
  190. package/dist/cjs/resource-fetcher-c0332609.js +0 -68
  191. package/dist/components/filter-bar-config-fetcher.js +0 -153
  192. package/dist/components/resource-fetcher.js +0 -66
  193. package/dist/esm/filter-bar-config-fetcher-06e02851.js +0 -153
  194. package/dist/esm/resource-fetcher-768d5556.js +0 -66
  195. package/dist/sankhyablocks/p-0a94fdbd.entry.js +0 -1
  196. package/dist/sankhyablocks/p-0ed0fc02.entry.js +0 -1
  197. package/dist/sankhyablocks/p-1e0189ff.entry.js +0 -1
  198. package/dist/sankhyablocks/p-216f081a.entry.js +0 -1
  199. package/dist/sankhyablocks/p-50d72261.entry.js +0 -1
  200. package/dist/sankhyablocks/p-6759adae.entry.js +0 -1
  201. package/dist/sankhyablocks/p-7b8b8ae9.js +0 -10
  202. package/dist/sankhyablocks/p-815a42c0.entry.js +0 -1
  203. package/dist/sankhyablocks/p-8a41172a.entry.js +0 -1
  204. package/dist/sankhyablocks/p-8f8184ff.js +0 -56
  205. package/dist/sankhyablocks/p-8fdc3108.js +0 -1
  206. package/dist/sankhyablocks/p-976e56e9.js +0 -1
  207. package/dist/sankhyablocks/p-98f9d076.js +0 -17
  208. package/dist/sankhyablocks/p-9edad923.js +0 -1
  209. package/dist/sankhyablocks/p-abdcac04.entry.js +0 -1
  210. package/dist/sankhyablocks/p-b0847056.entry.js +0 -1
  211. package/dist/sankhyablocks/p-bc735728.entry.js +0 -1
  212. package/dist/sankhyablocks/p-be684b38.entry.js +0 -1
  213. package/dist/sankhyablocks/p-befbc9ee.entry.js +0 -1
  214. package/dist/sankhyablocks/p-c0f656af.entry.js +0 -1
  215. package/dist/sankhyablocks/p-c6380ea2.entry.js +0 -1
  216. package/dist/sankhyablocks/p-ccbfb1cf.entry.js +0 -1
  217. package/dist/sankhyablocks/p-d1b89765.js +0 -1
  218. package/dist/sankhyablocks/p-de69b4b0.entry.js +0 -1
  219. package/dist/sankhyablocks/p-e28129aa.entry.js +0 -1
  220. package/dist/sankhyablocks/p-f31bfdee.entry.js +0 -1
  221. package/dist/sankhyablocks/p-f92fda53.entry.js +0 -11
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as l,H as s}from"./p-d2d301a6.js";import{ObjectUtils as o,ApplicationContext as e}from"@sankhyalabs/core";const n=class{constructor(l){i(this,l),this.valueChanged=t(this,"valueChanged",7),this._searchValue=void 0,this._ezListSource=[],this.config=void 0,this.rightListSlotBuilder=void 0,this.maxHeightList=""}async reloadList(){this.loadListSource()}observeConfig(){var i,t;null===(t=null===(i=this._searchElement)||void 0===i?void 0:i.clearValue)||void 0===t||t.call(i)}ezListChangeListener(i){var t,l;const s=o.copy(this.config);null===(t=this.getListConfigValue(s))||void 0===t||t.forEach((t=>{var l,s;t&&t.id===(null===(l=i.detail)||void 0===l?void 0:l.id)&&(t.check=null===(s=i.detail)||void 0===s?void 0:s.check)})),this.config=o.copy(s),this.valueChanged.emit(null===(l=this.config)||void 0===l?void 0:l.value)}loadListSource(){var i;this._ezListSource=[],null===(i=this.getListConfigValue(this.config))||void 0===i||i.forEach((i=>{i&&this._ezListSource.push({label:`${i.id} - ${i.label}`,check:i.check,id:i.id})}))}componentDidLoad(){var i,t,l,s,o;let n=this.getListConfigValue(this.config),a=[];Array.isArray(n)?a=n:a.push(null===(t=null===(i=this.config)||void 0===i?void 0:i.value)||void 0===t?void 0:t.members),this.config.value=a,this._entityName=null===(o=null===(s=null===(l=this.config)||void 0===l?void 0:l.props)||void 0===s?void 0:s.searchContext)||void 0===o?void 0:o.entity,this._application=e.getContextValue("__SNK__APPLICATION__"),this.loadListSource()}optionLoader(i){var t,l,s,o;const{mode:e,argument:n}=i;if(void 0===this._application)return;const a=null===(s=null===(l=null===(t=this.config)||void 0===t?void 0:t.props)||void 0===l?void 0:l.searchContext)||void 0===s?void 0:s.searchOptions,v={entityDescription:null===(o=this.config)||void 0===o?void 0:o.label,entity:this._entityName,searchOptions:a};return this._application.executePreparedSearch(e,n,v)}onEzSearchChange(i){var t,l,s,o;null!=i.detail&&void 0===(null===(t=this.getListConfigValue(this.config))||void 0===t?void 0:t.find((t=>{var l;return(null==t?void 0:t.id)==(null===(l=i.detail)||void 0===l?void 0:l.value)})))&&(this.config=Object.assign(Object.assign({},this.config),{value:[...null!==(s=null===(l=this.config)||void 0===l?void 0:l.value)&&void 0!==s?s:[],{id:i.detail.value,check:!0,label:i.detail.label}]}),this.loadListSource(),this.valueChanged.emit(null===(o=this.config)||void 0===o?void 0:o.value))}getMessage(i,t){var l;return null===(l=this._application)||void 0===l?void 0:l.messagesBuilder.getMessage(i,t)}getListConfigValue(i){var t,l,s,o;return null!==(o=null!==(l=null===(t=i.value)||void 0===t?void 0:t.elements)&&void 0!==l?l:null===(s=null==i?void 0:i.value)||void 0===s?void 0:s.members)&&void 0!==o?o:null==i?void 0:i.value}render(){var i,t;return l(s,null,l("ez-search",{ref:i=>this._searchElement=i,optionLoader:i=>this.optionLoader(i),value:this._searchValue,label:null===(i=this.config)||void 0===i?void 0:i.label,onEzChange:i=>this.onEzSearchChange(i),suppressEmptyOption:!0}),(null===(t=this._ezListSource)||void 0===t?void 0:t.length)>0&&l("label",{class:"label"},this.getMessage("snkEntityList.selected")),l("div",{style:this.maxHeightList?{"max-height":this.maxHeightList}:{},class:{"snk-entity-list--overflow":!!this.maxHeightList}},l("ez-list",{ref:i=>this._ezList=i,id:"snkEntityList",listMode:"check",dataSource:this._ezListSource,hoverFeedback:!0,itemSlotBuilder:this.rightListSlotBuilder,onEzCheckChange:i=>this.ezListChangeListener(i)})))}static get watchers(){return{config:["observeConfig"]}}};n.style=".sc-snk-entity-list-h{--snk-entity-list--label--font-size:var(--text--medium, 14px);--snk-entity-list--label--font-family:var(--font-pattern, Arial);--snk-entity-list--label--color:var(--title--primary, #000);--snk-entity-list--label--disabled--color:var(--text--disable, #AFB6C0)}.label.sc-snk-entity-list{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--snk-entity-list--label--color);font-size:var(--snk-entity-list--label--font-size);font-family:var(--snk-entity-list--label--font-family);cursor:default;padding-left:var(--space--small);padding-bottom:var(--space--extra-small)}.snk-entity-list--overflow.sc-snk-entity-list{overflow:auto}.snk-entity-list--overflow.sc-snk-entity-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";export{n as snk_entity_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,f as s,h as e,H as a}from"./p-d2d301a6.js";import{S as h}from"./p-ed41b38c.js";import{FormMetadata as o,buildFormMetadata as n}from"@sankhyalabs/ezui/dist/collection/utils/form";import"./p-f8e6b97e.js";import"./p-14eac6fe.js";import"@sankhyalabs/core";import{P as r}from"./p-5534e08c.js";import"./p-9e7d65a4.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-584d7212.js";import"./p-a52a6c9d.js";import{T as d}from"./p-a2493d11.js";import{c as l}from"./p-4a78e118.js";import{S as c}from"./p-787071a8.js";import{S as m}from"./p-ae6aff81.js";import"./p-41e897f1.js";import"./p-112455b1.js";import"./p-6dc031de.js";import"./p-c2beb95c.js";import"@sankhyalabs/core/dist/dataunit/DataUnit";class u{constructor(t,i,s){this._parentGuide=t,this._formMetadata=i,this._dataUnit=s}get id(){return this._parentGuide.id}buildGuideItem(t){const i=Object.assign({},this._parentGuide);delete i.expanded,delete i.children;const s=this._dataUnit.getSelectedRecord();if(!s)return i;const e=this._dataUnit.isNewRecord(s.__record__id__),a=Array.from(this._formMetadata.getAllSheets().values()).map((i=>{const{name:s,label:a}=i,h=null!=o.getDetailName(s.split("::").pop()),n=h&&e,r=this._parentGuide.id,d=h?`${r}::${s}`:`${r}__FORM:${s}`;return h&&t.has(d)&&!n?t.get(d).buildGuideItem(t):{id:d,label:a,disabled:n,tooltip:n?"Finalize o cadastro para ter acesso a esta guia.":void 0}})),h=a.shift();return h.label=e?"Novo Registro":s.__record__label__,h.children=a,i.children=[h],i}}const p=class{constructor(s){t(this,s),this.snkDetailGuidesChange=i(this,"snkDetailGuidesChange",7),this.snkSwitchGuide=i(this,"snkSwitchGuide",7),this.formItemsReady=i(this,"formItemsReady",7),this._disabledButtons=void 0,this._currentView=void 0,this.attachmentRegisterKey=void 0,this.formConfigManager=void 0,this.dataUnitName=void 0,this.resourceID=void 0,this.guideItemPath=void 0,this.entityName=void 0,this.label=void 0,this.dataUnit=void 0,this.selectedForm=void 0,this.dataState=void 0,this.messagesBuilder=void 0,this.branchGuide=void 0,this.canEdit=!0}observerDataState(t,i){const s=!(null==i?void 0:i.insertionMode)&&(null==t?void 0:t.insertionMode),e=(null==i?void 0:i.insertionMode)&&!(null==t?void 0:t.insertionMode);if((s||e)&&this.loadMetadata(),null==this._formMetadata)return;const a=null==t?void 0:t.selectedRecord,h=null==i?void 0:i.selectedRecord;(null==a?void 0:a.__record__id__)!==(null==h?void 0:h.__record__id__)&&this.snkDetailGuidesChange.emit(new u(this.branchGuide,this._formMetadata,this.dataUnit)),s&&setTimeout((()=>{this.changeViewMode(l.FORM)}),0),e&&this.changeViewMode(l.GRID);const o=[];this.dataState.hasPrevious||o.push(d.PREVIOUS),this.dataState.hasNext||o.push(d.NEXT),this._disabledButtons=o}async changeViewMode(t){this.emitSwitchEvent(t)}async configGrid(){this._snkGrid&&this._snkGrid.showConfig()}async showUp(){this._snkFormView&&this._snkFormView.showUp(),this._snkGrid&&this._snkGrid.scrollIntoView({behavior:"smooth",block:"start"})}onContentCardChanged(t){c.updateContentCard(t.detail.formName,t.detail.cardConfig,t.detail.propertyChanged,this.formConfigManager).then((()=>s(this))),t.stopPropagation()}updateLabel(){const t=this.guideItemPath?this.guideItemPath.length:0;if(t>0){const i=t>0?this.guideItemPath.map((t=>t.label)):void 0;this.label=i.pop(),this._levelPath=i.length>0?i.join(" / "):void 0}else this.label="",this._levelPath=void 0}getFormGuideId(t){var i;if(!t){if(null==(null===(i=this.dataState)||void 0===i?void 0:i.selectedRecord))return;const s=Array.from(this._formMetadata.getAllSheets().keys());if(!s||0==s.length)return;t=s[0]}return`${this.stripFormPattern(this.branchGuide.id)}__FORM:${t}`}stripFormPattern(t){return t.replace(p.REGEX_FORM_ID,"")}loadMetadata(){var t;if(!this.dataUnit)return;if(!this.formConfigManager.isLoaded)return;const i=this.formConfigManager.getConfig(null===(t=this.dataState)||void 0===t?void 0:t.insertionMode,this.dataUnit);this._formMetadata=n(null==i||0===i.fields.length?void 0:i,this.dataUnit,!0)}dataUnitReadyHandler(t){this.dataUnit=t.detail,this.loadMetadata()}updateViewStack(t){var i,s;this._viewStack=t,this._currentView=this.selectedForm?1:0,null===(s=null===(i=this._viewStack)||void 0===i?void 0:i.show)||void 0===s||s.call(i,this._currentView)}getFormFields(){return this.selectedForm&&this._formMetadata?this._formMetadata.getSheet(this.selectedForm).fields:[]}emitSwitchEvent(t){const i=t===l.GRID?this.stripFormPattern(this.branchGuide.id):this.getFormGuideId();i&&this.snkSwitchGuide.emit(i)}handleAttachBack(){this._viewStack.show(l.GRID)}executeActionHandler(t){t.detail===d.GRID_MODE&&(this.emitSwitchEvent(l.GRID),t.stopPropagation()),t.detail===d.FORM_MODE&&(this.emitSwitchEvent(l.FORM),t.stopPropagation()),t.detail===d.ATTACH&&(this._viewStack.show(l.ATTACHMENT),t.stopPropagation())}async getAttachmentRegisterKey(){if(this._snkDataUnit)return(await this._snkDataUnit.getSelectedRecordsIDsInfo()).map((({value:t})=>t)).join("_")}async handleDataStateChange({detail:t}){this.dataState=t,void 0!==t.selectedRecord&&this._snkDataUnit&&(this.attachmentRegisterKey=await this.getAttachmentRegisterKey())}componentWillLoad(){this._configName=`dynaform.${this.entityName}`,this.formConfigManager=new h(this._configName,this.resourceID,(()=>this.loadMetadata())),this.formConfigManager.loadConfig(),null==this.messagesBuilder&&(this.messagesBuilder=new m(this.entityName))}render(){return this.updateLabel(),e(a,null,e("snk-data-unit",{ref:t=>this._snkDataUnit=t,dataUnitName:`${this.dataUnitName}`,onDataUnitReady:t=>this.dataUnitReadyHandler(t),entityName:this.entityName,onDataStateChange:this.handleDataStateChange.bind(this),ignoreSaveMessage:this._currentView===l.GRID,messagesBuilder:this.messagesBuilder,configName:this._configName},e("ez-view-stack",{ref:t=>this.updateViewStack(t)},e("stack-item",null,e("div",{class:"ez-box ez-box--shadow grid-container"},e("div",{class:"ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header"},e("div",{class:"ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center"},this._levelPath?e("span",{class:"level-path"},this._levelPath+" /"):void 0,this.label)),e("snk-grid",{class:"ez-size-width--full ez-size-height--full",ref:t=>this._snkGrid=t,configName:this._configName,messagesBuilder:this.messagesBuilder,onGridDoubleClick:()=>this.emitSwitchEvent(l.FORM),onActionClick:t=>this.executeActionHandler(t),presentationMode:r.SECONDARY,canEdit:this.canEdit,isDetail:!0}))),e("stack-item",null,e("snk-form-view",{ref:t=>this._snkFormView=t,canExpand:!1,canFix:!1,name:this.selectedForm,formMetadata:this._formMetadata,dataUnit:this.dataUnit,fields:this.getFormFields(),label:this.label,levelPath:this._levelPath,onFormItemsReady:({detail:t})=>this.formItemsReady.emit(t)},e("snk-taskbar",{key:"guideViewerTaskbar",class:"form-taskbar","data-element-id":"guideViewer",configName:this._configName,messagesBuilder:this.messagesBuilder,disabledButtons:this._disabledButtons,buttons:"INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR",primaryButton:"INSERT",presentationMode:r.SECONDARY,onActionClick:t=>this.executeActionHandler(t),dataUnit:this.dataUnit,resourceID:this.resourceID}))),e("stack-item",null,e("snk-attach",{registerKey:this.attachmentRegisterKey,messagesBuilder:this.messagesBuilder,entityName:this.entityName,onBack:this.handleAttachBack.bind(this)})))))}static get watchers(){return{dataState:["observerDataState"]}}};p.REGEX_FORM_ID=/__FORM:[^:]+/g,p.style=".sc-snk-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%}.level-path.sc-snk-detail-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.form-taskbar.sc-snk-detail-view{padding-bottom:var(--space--medium)}.grid-container.sc-snk-detail-view{background-color:#FFF;min-height:100px}.detail-header.sc-snk-detail-view{padding-bottom:0}";export{p as snk_detail_view}
@@ -0,0 +1,11 @@
1
+ import{r as t,c as e,h as s,g as i}from"./p-d2d301a6.js";import{WaitingChangeException as n,WarningException as r,ErrorException as a,ObjectUtils as o,DateUtils as c,StringUtils as h,OnboardingUtils as u,DependencyType as l,ElementIDUtils as p,ApplicationContext as d,ErrorTracking as m,DataType as w}from"@sankhyalabs/core";import{d as f,D as y,U as P}from"./p-f8e6b97e.js";import{ApplicationUtils as g}from"@sankhyalabs/ezui/dist/collection/utils";import{P as I}from"./p-14eac6fe.js";import{C as _}from"./p-41e897f1.js";import{D as v}from"./p-2d333d22.js";import{A,a as S}from"./p-f74fe358.js";import{S as E}from"./p-ae6aff81.js";import"./p-112455b1.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-a52a6c9d.js";import"./p-584d7212.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";class C{constructor(t){this._app=t,window.addEventListener("error",(t=>this.errorHandler(t))),window.addEventListener("unhandledrejection",(t=>this.rejectionHandler(t)))}rejectionHandler(t){const e=t.reason;e instanceof n||(e?this.processException(e):this._app.isDebugMode().then((t=>{t&&this._app.error("Promise rejeitada","Erro interno: Uma promise foi rejeitada sem razão determinada.")})))}errorHandler(t){this.processException(t.error)}buildErrorCodeHTML(t){return'<br><a href="#" onclick="try{window.workspace.openHelp(\'_tbcode:'+t+"')} catch(e){alert('Não é possível abrir a ajuda fora do workspace Sankhya');}\">Código: "+t+"</a>"}processException(t){t.errorCode&&(t.message+=this.buildErrorCodeHTML(t.errorCode)),t instanceof n||t instanceof r?this._app.alert(t.title,t.message):t instanceof a?this._app.error(t.title,t.message):this._app.isDebugMode().then((e=>{if(e)if(t instanceof Error)this._app.error(t.name,t.message);else{const e=(null==t?void 0:t.title)||"Erro detectado",s="string"==typeof t?t:t.message||`Erro interno "${o.objectToString(t)}"`;this._app.error(e,s)}}))}}function T(){const t=["2909523kXwted","CompanyName=Sankhya Jiva Tecnologia e Inovao Ltda,LicensedApplication=Sankhya Gestao,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=2,LicensedProductionInstancesCount=0,AssetReference=AG-019460,ExpiryDate=9_November_2022_[v2]_MTY2Nzk1MjAwMDAwMA==10487151e296ee4360f80961ca960869","1131048CARoeW","502909mLEPmu","447255iQEXuN","428UHbJwW","270AFTxAV","194369jhGqTI","1540nWuTrj","2044062GicUQI","30CkXPWg"];return(T=function(){return t})()}const D=N;function N(t,e){const s=T();return(N=function(t){return s[t-=392]})(t,e)}!function(){const t=N,e=T();for(;;)try{if(951926==-parseInt(t(398))/1+-parseInt(t(393))/2+parseInt(t(395))/3+-parseInt(t(400))/4*(parseInt(t(392))/5)+-parseInt(t(401))/6*(-parseInt(t(402))/7)+parseInt(t(397))/8+-parseInt(t(399))/9*(-parseInt(t(394))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const b=D(396);class O{constructor(){this.templateByQuery=new Map,this.cancel=[],this.buildTemplates()}buildTemplates(){this.templateByQuery.set("fetchTotals",f.gql`query($filters: [InputFilter!] $name: String!) {
2
+ $queryAlias$: fetchTotals(name: $name, filters: $filters ){
3
+ name
4
+ value
5
+ }
6
+ }`)}fetchTotals(t,e,s=[]){const i=`${t}_${e}`,n=this.cancel.findIndex((t=>t[i]));return n>=0&&(this.cancel[n][i](),this.cancel.splice(n,1)),Promise.race([new Promise((t=>this.cancel.push({[i]:t}))),this.getTotals(t,e,s)]).then((t=>{let e=new Map;if(t){e=t;const s=this.cancel.findIndex((t=>t[i]));s>=0&&this.cancel.splice(s,1)}return e}))}getTotals(t,e,s=[]){return new Promise(((i,n)=>{y.get().callGraphQL({query:this.templateByQuery.get("fetchTotals"),values:{name:`totals://${t}/${e}`,filters:s}}).then((t=>{if(t.length>0){const e=new Map;return t.forEach((t=>e.set(t.name,parseFloat(t.value)))),i(e)}return n("Não foi possível recuperar os totalizadores")})).catch(n)}))}}var L;class k{static openAppActivity(t,e){var s;null===(s=window.workspace)||void 0===s||s.openAppActivity(t,e)}static getAppLabel(t){if(null!=(null===window||void 0===window?void 0:window.workspace))return null==window.workspace.getAppLabel&&(window.workspace.getAppLabel=t=>(t||"").split(".").pop()),window.workspace.getAppLabel(t)}}k.resourceID=null===(L=window.workspace)||void 0===L?void 0:L.resourceID;class j{static webConnectionCaller(t,e,s){var i;null===(i=window.AppletCaller)||void 0===i||i.webConnectionCaller(t,e,s)}}class U{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchParam",f.gql`query($name: String!) {
7
+ $queryAlias$: fetchResource(name: $name){
8
+ name
9
+ resource
10
+ }
11
+ }`)}async getParam(t){const e=`param://application?params=${t}`;return y.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchParam")})}async asString(t){const e=await this.getParam(t);return this.getValue(e)}async asInteger(t){const e=await this.getParam(t);return parseInt(this.getValue(e))}async asFloat(t){const e=await this.getParam(t);return parseFloat(this.getValue(e))}async asBoolean(t){const e=await this.getParam(t);return"S"===this.getValue(e)}async asDate(t){const e=await this.getParam(t);return c.strToDate(this.getValue(e))}async getBatchParams(t){const e=await this.getParam(t.join(",")),s={};return e.forEach((t=>s[t.name]=t.resource)),s}getValue(t={}){if(Array.isArray(t)&&t.length>0&&(t=t[0]),h.isEmpty(t.resource))return"";try{const e=o.stringToObject(t.resource),[s]=Object.keys(e);return e[s]}catch(t){console.warn("Erro ao converter string JSON.")}}}const $=R;function R(t,e){const s=M();return(R=function(t){return s[t-=378]})(t,e)}function M(){const t=["true","863GKWjmo","parse","56355fjjjAm","isSup","putAccess","4324480sjuCdS","hasOwnProperty","239748okvJLB","name","6055770tXeRaU","actions","forEach","7RPRvzn","1042CHxkUw","2988126NIwRMm","20MTNzmH","authorizationSf","item","string","hasAccess","isArray","Objeto não pode ser indefinido.","3071943fWslZp","parseFromJSON"];return(M=function(){return t})()}!function(){const t=R,e=M();for(;;)try{if(281287==parseInt(t(399))/1*(-parseInt(t(387))/2)+-parseInt(t(401))/3+parseInt(t(381))/4*(-parseInt(t(389))/5)+parseInt(t(388))/6*(-parseInt(t(386))/7)+parseInt(t(379))/8+parseInt(t(396))/9+parseInt(t(383))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class q{[$(397)](t){const e=$;if(typeof(t=utxt(t[e(390)]))==e(392)&&(t=JSON[e(400)](t)),null==t)throw Error(e(395));const s=new F("S"===t[e(402)]||!0===t[e(402)]);return Array[e(394)](t[e(391)])&&t[e(391)][e(385)]((t=>s.putAccess(t[e(382)],String(t.status)==e(398)))),s}}class F{constructor(t){const e=$;this.isSup=t,this[e(384)]={}}[$(378)](t,e){this[$(384)][t]=e}[$(393)](t){const e=$;if(this[e(402)])return!0;let s=!0;return this[e(384)][e(380)](t)&&(s=this.actions[t]),s}isUserSup(){return this.isSup}}const x=class{constructor(s){t(this,s),this.applicationLoaded=e(this,"applicationLoaded",7),this.applicationLoading=e(this,"applicationLoading",7),this._authPromises=[],this._duCache=new Map,this._duPromises=new Map,this._requestListener=new z,this.messagesBuilder=void 0,this.configName=void 0}get parameters(){return this._parameters||(this._parameters=new U),this._parameters}async getAuth(t){return null==t?this.getApplicationAuth():new Promise(((e,s)=>{this.authFetcher.getData(t).then((t=>{e(t)})).catch((t=>{s(t)}))}))}async getApplicationAuth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,e)=>{const s=this._authPromises.length>0;this._authPromises.push(new H(t,e)),s||this.authFetcher.getData(this.applicationResourceID).then((t=>{for(this._auth=t;this._authPromises.length>0;)this._authPromises.pop().resolve(this._auth)})).catch((t=>{for(;this._authPromises.length>0;)this._authPromises.pop().reject(t)}))}))}async isUserSup(){return new Promise(((t,e)=>{this.getAuth().then((s=>{this.getAuthList(s).then((e=>{t(e.isSup)})).catch((t=>e(t)))}))}))}initOnboarding(t){return u.getInstance().init(t,window.envContext),Promise.resolve()}async hasAccess(t,e){return new Promise(((s,i)=>{this.getAuth(e).then((e=>{this.getAuthList(e).then((e=>{s(e.isSup||e.actions[t])})).catch((t=>i(t)))}))}))}async getAllAccess(t){return new Promise(((e,s)=>{this.getAuth(t).then((t=>{this.getAuthList(t).then((t=>{const s={};s.isSup=t.isSup,Object.entries(A).forEach((e=>{s[e[0]]=t.actions[e[1]]||!1})),e(s)})).catch((t=>s(t)))}))}))}async getStringParam(t){return this.parameters.asString(t)}async getIntParam(t){return this.parameters.asInteger(t)}async getFloatParam(t){return this.parameters.asFloat(t)}async getBooleanParam(t){return this.parameters.asBoolean(t)}async getDateParam(t){return this.parameters.asDate(t)}async showPopUp(t,e="full",s=!0){this.clearContent(this._popUp),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=e,this._popUp.useHeader=s,"EZ-MODAL-CONTAINER"===t.tagName&&(this._popUp.useHeader=!1)}async showModal(t){this.clearContent(this._rightModal),this._rightModal.appendChild(t),this._rightModal.opened=!0}async closeModal(){this.clearContent(this._rightModal),this._rightModal.opened=!1}async closePopUp(){this.clearContent(this._popUp),this._popUp.opened=!1,this._popUp.useHeader=!0,this._popUp.heightMode="full"}async temOpcional(t){const e=t.split(",");return new Promise(((t,s)=>{this.getAttributeFromHTMLWrapper("opc0009").then((i=>{"1"===i?t(!0):Promise.all(e.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((e=>{t(e.includes("1"))})).catch((t=>{s(t)}))})).catch((t=>{s(t)}))}))}async getConfig(t){let e={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,s)=>{y.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(e)).then((e=>{var s;return t(null===(s=e.config)||void 0===s?void 0:s.data)})).catch((t=>s(t)))}))}async saveConfig(t,e){let s={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:e}}};return new Promise(((t,e)=>{y.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(s)).then((e=>t(e))).catch((t=>e(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,e){k.openAppActivity(t,e)}async webConnection(t,e,s){this.getStringParam(t).then((t=>{j.webConnectionCaller(t,e,s)}))}getDuPromissesStack(t){let e;return t&&(e=this._duPromises.get(t),e||(e=[],this._duPromises.set(t,e))),e||[]}async createDataunit(t,e,s,i,n){return null==n&&(n=this.applicationResourceID),new Promise(((r,a)=>{const o=this.getDuPromissesStack(e),c=o.length>0;if(o.push(new H(r,a)),!c){const r=this.dataUnitFetcher.getDataUnit(t,n,s,i);r.loadMetadata().then((()=>{for(e&&this.updateDataunitCache(void 0,e,r);o.length>0;)o.pop().resolve(r)})).catch((t=>{for(;o.length>0;)o.pop().reject(t)}))}}))}async updateDataunitCache(t,e,s){t&&this._duCache.delete(t),this._duCache.set(e,s)}async getDataUnit(t,e,s,i,n){return new Promise(((r,a)=>{const o=this._duCache.get(e);o?r(o):this.createDataunit(t,e,s,i,n).then((t=>{r(t)})).catch((t=>a(t)))}))}async addClientEvent(t,e){return new Promise((s=>{y.addClientEvent(t,e),s()}))}async removeClientEvent(t){return new Promise((e=>{y.removeClientEvent(t),e()}))}async hasClientEvent(t){return new Promise((e=>{e(y.hasClientEvent(t))}))}async callServiceBroker(t,e,s){return y.get().callServiceBroker(t,e,s)}get applicationResourceID(){return this._applicationResourceID||(this._applicationResourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||k.resourceID||"unknown.resource.id"),this._applicationResourceID}async getResourceID(){return Promise.resolve(this.applicationResourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,e,s,i){return g.alert(t,e,s,i)}async error(t,e,s,i){return g.error(t,e,s,i)}async success(t,e,s,i){return g.success(t,e,s,i)}async message(t,e,s,i){return g.message(t,e,s,i)}async confirm(t,e,s,i,n){return g.confirm(t,e,s,i,n)}async info(t,e){return g.info(t,e)}async loadTotals(t,e,s){return this.totalsFetcher.fetchTotals(t,e,s)}async getAuthList(t){return await(new q).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=P.getQueryParams(location.search)),this._urlParams}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new v),this._dataUnitFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new O),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new I),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new S),this._authFetcher}async executeSearch(t,e,s){const i=null==s?void 0:s.getField(e);if(i){const{mode:e,argument:n}=t,{ENTITYNAME:r,CODEFIELD:a,DESCRIPTIONFIELD:o,ROOTENTITY:c,DESCRIPTIONENTITY:h}=i.properties,u=i.dependencies;let p;const d={rootEntity:c,descriptionFieldName:o,codeFieldName:a,showInactives:!1,dataUnitId:s.dataUnitId};return null==u||u.filter((t=>t.masterFields)).forEach((t=>{var e;t.type===l.SEARCHING&&(null===(e=t.masterFields)||void 0===e?void 0:e.length)>0&&(p={expression:t.expression,params:t.masterFields.map((t=>{const e=s.getField(t),i=(null==e?void 0:e.dataType)||w.TEXT,n=s.getFieldValue(t);if(null==n)throw this.alert("Erro ao pesquisar",`É necessario informar o campo ${e.label} para executar a pesquisa.`),new Error(`É necessario informar o campo ${e.label} para executar a pesquisa.`);return{name:t,value:n,dataType:i}}))})})),this.executePreparedSearch(e,n,{entity:r,entityDescription:h,criteria:p,searchOptions:d})}}async executePreparedSearch(t,e,s){const{entity:i,entityDescription:n,criteria:r,searchOptions:a}=s;return"ADVANCED"===t?new Promise((t=>{const s=document.createElement("snk-pesquisa");s[p.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${i}`,s.argument=e,s.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(i,t,r,a),s.selectItem=e=>{t(e),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(n),this.showPopUp(s)})):this.pesquisaFetcher.loadSearchOptions(i,e,r,a)}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return k.getAppLabel(this.applicationResourceID)}addSearchListener(t,e,s){return new Promise((i=>{i(this.pesquisaFetcher.addSearchListener(t,e.dataUnitId,s))}))}importScript(t){return new Promise((e=>{this.getApplicationPath().then((s=>{let i=[];Array.isArray(t)||(i=[t]),i.forEach((t=>{const e=document.createElement("script");e.src=`${s}/${t}`,e.async=!0,document.body.appendChild(e)})),e()}))}))}getApplicationPath(){return new Promise((t=>{"dev"!==window.applicationenv&&t(`/${window.MGE_MODULE_NAME}/labsApps/${window.APPLICATION_NAME}/build`),t("")}))}executeSelectDistinct(t,e,s){return this.dataUnitFetcher.loadSelectDistinct(t,e,s)}getDataFetcher(){return Promise.resolve(y.get())}clearContent(t){t&&Array.from(t.children).forEach((e=>{t.removeChild(e)}))}clearPopUpTitle(){this._popUp.ezTitle=""}setPopUpTitle(t){this._popUp.ezTitle=t}componentWillLoad(){d.setContextValue("__SNK__APPLICATION__LOADING__",!0),this._errorHandler=new C(this),this.messagesBuilder=new E,d.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${P.getUrlBase()}/mge/upload/file`),d.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,e,s)=>this.executeSearch(t,e,s))),d.setContextValue("__EZUI__GRID_LICENSE__",b),m.init(),_.preload(this.applicationResourceID,this.configName)}connectedCallback(){d.setContextValue("__SNK__APPLICATION__",this),y.addRequestListener(this._requestListener)}disconnectedCallback(){y.removeRequestListener(this._requestListener)}componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{d.setContextValue("__SNK__APPLICATION__LOADING__",!1),this.applicationLoaded.emit(!0)})),p.addIDInfo(this._element,`resource_${this.applicationResourceID}`)}render(){return s("div",null,s("ez-loading-bar",{ref:t=>this._requestListener.loadingBar=t}),s("ez-popup",{opened:!1,ref:t=>this._popUp=t,onEzClosePopup:()=>this.closePopUp()}),s("ez-modal",{opened:!1,ref:t=>this._rightModal=t,"modal-size":"small",closeOutsideClick:!0,closeEsc:!0}))}get _element(){return i(this)}};class z{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.loadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.loadingBar.hide()}),this._debounceTime))}isIgnoreLoadingOnRequest(t){var e;if(1==(null===(e=null==t?void 0:t.requestBody)||void 0===e?void 0:e.length)){const{name:e}=t.requestBody[0].variables;if(e){const t=e.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class H{constructor(t,e){this.resolve=t,this.reject=e}}x.style=".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";export{x as snk_application}
@@ -0,0 +1 @@
1
+ export{S as snk_data_unit}from"./p-48a40939.js";import"./p-d2d301a6.js";import"@sankhyalabs/core";import"@sankhyalabs/ezui/dist/collection/utils";import"./p-ae6aff81.js";
@@ -0,0 +1 @@
1
+ import{r as t,h as s,H as i,g as e}from"./p-d2d301a6.js";import{ApplicationContext as n,StringUtils as o,ErrorException as a,WarningException as c,ObjectUtils as r,DateUtils as l,ArrayUtils as h,ElementIDUtils as u}from"@sankhyalabs/core";import{D as d}from"./p-f8e6b97e.js";import{P as p}from"./p-eaad0aa8.js";import"./p-14eac6fe.js";import"./p-5534e08c.js";import"./p-9e7d65a4.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-584d7212.js";import"./p-a52a6c9d.js";import{R as m}from"./p-688dcb4c.js";import"./p-112455b1.js";class v{execute(t){var s;const i={actionID:t.actionID,refreshType:null===(s=t.actionConfig.javaCall)||void 0===s?void 0:s.refreshType};return new Promise((t=>{t({execSource:i,callback:this.callExecJava})}))}callExecJava(t){const s={requestBody:{javaCall:t}};d.get().callServiceBroker("ActionButtonsSP.executeJava",JSON.stringify(s))}}class b{execute(t){var s;const i={actionID:t.actionID,refreshType:null===(s=t.actionConfig.runScript)||void 0===s?void 0:s.refreshType};return new Promise((t=>{t({execSource:i,callback:this.callExecScript})}))}callExecScript(t){const s={runScript:t};d.get().callServiceBroker("ActionButtonsSP.executeScript",s)}}class k{constructor(){this._application=n.getContextValue("__SNK__APPLICATION__")}async execute(t,s){const i=t.resourceID;if(!i)return;let e=await this.buildLaunchObject(t,s);return this._application.openApp(i,e),null}buildLaunchObject(t,s){return new Promise((i=>{let e=t.actionConfig.params.param;if(e&&e.length>0){let n={},c=[];e.forEach((i=>{const e=i.localField;let r=s.getFieldValue(e);if(!r){let i=s.getField(e).label;throw i=o.isEmpty(s.getField(e).label)?e:i,new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.launchScreen.emptyField",{description:t.description,localFieldLabel:i}))}r=o.isEmpty(r.toString())?void 0:r.toString(),n[i.targetField]=r,c.push({fieldName:i.targetField,value:r})})),n.ACTION_PARAMETERS=c,n.call_time=Date.now(),i(n)}i(null)}))}}class w{execute(t){var s,i,e;const n=null===(s=t.actionConfig.dbCall)||void 0===s?void 0:s.name,o=null===(i=t.actionConfig.dbCall)||void 0===i?void 0:i.rootEntity,a={actionID:t.actionID,refreshType:null===(e=t.actionConfig.dbCall)||void 0===e?void 0:e.refreshType,procName:n,rootEntity:o};return new Promise((t=>{t({execSource:a,callback:this.callExecProcedure})}))}callExecProcedure(t){const s={requestBody:{stpCall:t}};d.get().callServiceBroker("ActionButtonsSP.executeSTP",JSON.stringify(s))}}var f,_;!function(t){t.LAUNCH_SCREEN="LC",t.JAVASCRIPT="SC",t.JAVA="RJ",t.PROCEDURE="SP",t.EMBEDDED="EB"}(f||(f={}));class S{constructor(t){this.actionType=t,this._application=n.getContextValue("__SNK__APPLICATION__")}get executor(){switch(this.actionType){case f.LAUNCH_SCREEN:return new k;case f.JAVASCRIPT:return new b;case f.JAVA:return new v;case f.PROCEDURE:return new w;default:throw new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.nonExistentType",{actionType:this.actionType}))}}}!function(t){t.NONE="NONE",t.PARENT="PARENT",t.MASTER="MASTER",t.ALL="ALL"}(_||(_={}));const y="__MASTER_ROW__";class P{constructor(t,s,i){var e;this._lastValuesCache={},this._actionsExecuteInterface=t,this._dataUnit=s,this._selectedRows=(null===(e=null==s?void 0:s.getSelectionInfo())||void 0===e?void 0:e.isAllRecords())?[]:null==s?void 0:s.getSelectionInfo().records,this._application=n.getContextValue("__SNK__APPLICATION__"),this._appResourceId=i}apply(t,s){this._application.closePopUp(),this._actionsExecuteInterface.execute(t,this._dataUnit).then((({execSource:i,callback:e})=>{this.resolvePromptParams(t,i,s).then((()=>{this.actionExecute(i,e)}))}))}async execute(t){var s;if(!t.actionConfig)throw new c(this._application.messagesBuilder.getMessage("snkActionsButton.title.warning",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.incorrectAction",{description:t.description}));if(null===(s=t.actionConfig.params)||void 0===s?void 0:s.promptParam){const s=t.actionConfig.params.promptParam;let i=!1;for(let t=0;t<s.length;t++)if(!i&&"true"===s[t].saveLast){i=!0;break}i&&(t.actionConfig.params.promptParam=await this.loadSavedValuesIntoParams(t));const e=document.createElement("snk-actions-form");window.document.body.appendChild(e),e.action=r.copy(t),e.applyParameters=t=>{this.apply(t,i)},e.openPopup()}else t.type!=f.LAUNCH_SCREEN?this._actionsExecuteInterface.execute(t,this._dataUnit).then((({execSource:t,callback:s})=>{this.actionExecute(t,s)})):this._actionsExecuteInterface.execute(t,this._dataUnit)}loadSavedValuesIntoParams(t){return this.loadLastValues(t).then((s=>{let i=t.actionConfig.params.promptParam;return s&&s.param.forEach((t=>{i=i.map((s=>s.name!==t.paramName?s:Object.assign(Object.assign({},s),"B"===s.paramType?{value:"S"===t.$}:{value:t.$})))})),i}))}actionExecute(t,s){t.virtualPage=this.buildVirtualPage(),this.prepareAndExecute(t,s),this.recordsReloader(t.refreshType)}resolvePromptParams(t,s,i){return new Promise((e=>{let n=[];t.actionConfig.params.promptParam.forEach((t=>{n.push(this.buildPromptParam(t))})),this.putParamsOnExecSource(n,s),i&&this.saveLastValues(t,n),e()}))}buildPromptParam(t){let s,i,e=t.paramType,n=!1,o=t.value;switch(e){case p.DATE:e="D";break;case p.DATETIME:e="H";break;case p.DECIMAL:e="F",s={"sk-precision":Number(t.precision)};break;case p.BOOLEAN:e="S",n=!0,o=t.value?"S":"N";break;case p.ENTITY:s={"sk-entity-name":t.entityName,"sk-allow-show-hierarchical-mode":t.hierarchyEntity,"sk-data-type":"S"},t.hierarchyEntity&&t.entityPK&&(i=t.entityPK),o=t.value?Number(t.value):null;break;case p.OPTIONS:e="O";let a=t.options.split(";").map((function(t,s){let i,e;if(t.indexOf("=")>-1){let s=t.split("=");i=s[0],e=s[1]}else i=s+1,e=t;return{data:i,value:e}}));s={"sk-options":a}}return{description:t.label,required:"true"==t.required,fieldName:t.name,fieldNameOri:t.name,entityPK:i,paramType:t.paramType,type:e,isCheckbox:n,saveLast:t.saveLast,fieldProp:s,value:o,isGeneratedName:t.isGeneratedName}}putParamsOnExecSource(t,s){s.params={param:[]},t.forEach((t=>{if(t.isGeneratedName&&t.value)throw new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.emptyParamName",void 0));o.isEmpty(t.value)||s.params.param.push({type:this.getParamDataType(t.paramType),paramName:t.fieldName,$:this.getParamValue(t)})}))}getParamDataType(t){let s;switch(t){case"D":s="F";break;case"DT":case"DH":s="D";break;case"B":case"ENTITY":case"SO":s="S";break;default:s=t}return s}getParamValue(t){let s=t.value;return s?("DT"==t.paramType?s=l.formatDate(s):"DH"==t.paramType&&(s=l.formatDateTime(s)),s):s}async loadLastValues(t){const s=await this.buildResourceId(t.actionID);return new Promise(((t,i)=>{if(this._lastValuesCache[s])t(this._lastValuesCache[s]);else{const e={config:{chave:s,tipo:"T"}};d.get().callServiceBroker("SystemUtilsSP.getConf",e).then((i=>{var e,n;let o;(null===(n=null===(e=i.config)||void 0===e?void 0:e.data)||void 0===n?void 0:n.params)&&(o=i.config.data.params,Array.isArray(o.param)||(o.param=[o.param])),this._lastValuesCache[s]=o,t(o)})).catch((t=>{i(t)}))}}))}async saveLastValues(t,s){if(this._application){let i={params:{param:[]}};s.forEach((t=>{"true"==t.saveLast&&i.params.param.push({paramName:t.fieldName,$:t.value})}));const e=await this.buildResourceId(t.actionID);this._lastValuesCache[e]=i.params,this._application.saveConfig(e,i)}}async buildResourceId(t){return this._appResourceId+".actionconfig."+t}prepareAndExecute(t,s){this.addRows(t),s(t)}addRows(t){const s={row:[]},i=this._selectedRows;for(const t in i){const e=i[t],n={};e.hasOwnProperty(y)&&(n.master="S",n.entityName=e.__ENTITY_NAME__,delete e[y],delete e.__ENTITY_NAME__);for(const t in e)"NUFIN"===t&&(n.field||(n.field=[]),n.field.push({fieldName:t,$:e[t]}));s.row.push(n)}s.row.length>0&&(t.rows=s)}recordsReloader(t){switch(t){case _.NONE:break;case _.PARENT:case _.MASTER:case _.ALL:this._dataUnit.loadData();break;default:this._dataUnit.reloadCurrentRecord()}}buildVirtualPage(){var t,s,i,e;if(null===(s=null===(t=this._dataUnit)||void 0===t?void 0:t.getSelectionInfo())||void 0===s?void 0:s.isAllRecords())return{filters:{filters:null===(i=this._dataUnit)||void 0===i?void 0:i.getAppliedFilters()},orders:{orders:null===(e=this._dataUnit)||void 0===e?void 0:e.getSort()}}}}class A{clientConfirm(t,s){const i=n.getContextValue("__SNK__APPLICATION__");let e="";t.content.event.hasOwnProperty("stpCall")?(s.requestBody=t.content.event.stpCall,e=f.PROCEDURE):t.content.event.hasOwnProperty("runScript")?(s.requestBody=t.content.event.runScript,e=f.JAVASCRIPT):t.content.event.hasOwnProperty("javaCall")&&(s.requestBody=t.content.event.javaCall,e=f.JAVA);let o={type:"S",sequence:t.content.event.sequence};s.requestBody.params?Array.isArray(s.requestBody.params.param)||(s.requestBody.params.param=[s.requestBody.params.param]):s.requestBody.params={param:[]},s.requestBody.params.param.push(o);const a=t.content.event.title.$,c=t.content.event.message.$;let r;switch(e){case f.JAVASCRIPT:r={runScript:s.requestBody};break;case f.PROCEDURE:r={requestBody:{stpCall:s.requestBody}};break;case f.JAVA:r={requestBody:{javaCall:s.requestBody}}}if("S"==t.content.event.showNoOption){o.paramName="__ESCOLHA_SIMNAO__";const t=document.createElement("snk-client-confirm");window.document.body.appendChild(t),t.titleMessage=a,t.message=c,t.accept=()=>{o.$="S",s.reCall(r)},t.cancel=()=>{o.$="N",s.reCall(r)},t.openPopup()}else i.confirm(a,c,null,"warn",{labelCancel:"Cancelar",labelConfirm:"Sim"}).then((t=>{t&&(o.paramName="__CONFIRMACAO__",o.$="S",s.reCall(r))}))}}const N=class{constructor(s){t(this,s),this.CLIENT_EVENT_CONFIRM_NAME="br.com.sankhya.actionbutton.clientconfirm",this.handleClick=t=>{const s=this._actions.find((s=>s.actionID==t.detail.id)),i=new S(s.type).executor;new P(i,this._dataUnit,this._resourceID).execute(Object.assign({},s)),this._showDropdown=!1},this._items=[],this._showDropdown=!1,this._actions=[],this._isOrderActions=!1}async getActions(){let t={param:{entityName:this._entityName,resourceID:this._resourceID}};return d.get().callServiceBroker("ActionButtonsSP.getActions",t).then((t=>{var s;(null===(s=t.actions)||void 0===s?void 0:s.action)&&(this._actions=this._isOrderActions?h.sortAlphabetically(t.actions.action,"description"):t.actions.action)}))}controlDropdown(){this._showDropdown=!this._showDropdown}canShowDropdown(){var t;return this._showDropdown&&(null===(t=this._items)||void 0===t?void 0:t.length)>0}positionDropdown(){var t;const s=null===(t=this._ezButton)||void 0===t?void 0:t.getBoundingClientRect();s&&this._dropdownParent&&(this._dropdownParent.style.top=s.y+s.height+5+"px",this._dropdownParent.style.left=s.x+"px")}closeDropdown(t){const s=null==t?void 0:t.target;s&&(s.closest(".snk-actions-button")||(this._showDropdown=!1))}setEvents(){document.removeEventListener("click",this.closeDropdown.bind(this)),document.addEventListener("click",this.closeDropdown.bind(this)),document.removeEventListener("scroll",this.positionDropdown.bind(this)),document.addEventListener("scroll",this.positionDropdown.bind(this))}async componentWillLoad(){this._application=n.getContextValue("__SNK__APPLICATION__"),this._isOrderActions=await this._application.getBooleanParam("global.ordenar.acoes.personalizadas");const t=this._element.parentElement;this._dataUnit=null==t?void 0:t.dataUnit,this._resourceID=null==t?void 0:t.resourceID,this._entityName=this._dataUnit.name.split("/")[2],null==this._resourceID&&(this._resourceID=await m.getResourceID()),this.setEvents(),this.getActions().then((()=>{this.loadItems()}))}async componentDidLoad(){if(this._element&&(u.addIDInfo(this._element),this.positionDropdown(),!await this._application.hasClientEvent(this.CLIENT_EVENT_CONFIRM_NAME))){const t=new A;this._application.addClientEvent(this.CLIENT_EVENT_CONFIRM_NAME,t.clientConfirm)}}componentDidUpdate(){this.positionDropdown()}loadItems(){this._actions&&0!=this._actions.length&&this._actions.forEach((t=>{this._items.push({id:t.actionID,label:t.description})}))}getElementID(t){return{[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:u.getInternalIDInfo(t)}}render(){return s(i,null,this._actions&&this._actions.length>0&&s("div",{class:`ez-padding-left--medium snk-actions-button \n ${this.canShowDropdown()?" snk-actions-button--overlap":""}\n `},s("ez-button",Object.assign({ref:t=>this._ezButton=t,iconName:"acao",size:"small",mode:"icon",title:this._application.messagesBuilder.getMessage("snkActionsButton.title.actions",void 0),onClick:()=>this.controlDropdown()},this.getElementID("button"))),s("div",Object.assign({ref:t=>this._dropdownParent=t,class:(this.canShowDropdown()?"snk-actions-button__dropdown--show":"snk-actions-button__dropdown")+"\n "},this.getElementID("dropdown")),this.canShowDropdown()&&s("ez-dropdown",Object.assign({items:this._items,onEzClick:t=>this.handleClick(t)},this.getElementID("dropdown"))))),this.canShowDropdown()&&s("div",Object.assign({class:"ez-scrim ez-scrim--light"},this.getElementID("ezScrim"))))}get _element(){return e(this)}};N.style=".sc-snk-actions-button-h{--snk-actions-button--z-index:var(--most-visible, 3);display:flex;width:fit-content;height:fit-content}.snk-actions-button.sc-snk-actions-button{display:flex;width:fit-content;height:fit-content}.snk-actions-button__dropdown--show.sc-snk-actions-button{display:flex;flex-direction:column;position:fixed}.snk-actions-button__dropdown.sc-snk-actions-button>ez-dropdown.sc-snk-actions-button{position:relative}.snk-actions-button--overlap.sc-snk-actions-button{z-index:var(--snk-actions-button--z-index)}.snk-actions-button__dropdown.sc-snk-actions-button{display:none}";export{N as snk_actions_button}
@@ -0,0 +1 @@
1
+ import{C as t}from"./p-41e897f1.js";import{ObjectUtils as s}from"@sankhyalabs/core";import{F as e}from"./p-a52a6c9d.js";class i{constructor(t,s,e){this._resourceID=s,this._configName=t,this._onConfigChange=e}async loadConfig(){return new Promise((s=>{t.loadFormConfig(this._configName,this._resourceID).then((t=>{this.setConfig(t),s(t)})).catch((t=>{console.warn(t)}))}))}saveConfig(e){const i=s.copy(e);return new Promise((s=>{t.saveFormConfig(e,this._configName,this._resourceID).then((t=>{this.setConfig(Object.assign(Object.assign({},i),t)),s(Object.assign(Object.assign({},i),t))}))}))}saveCardState(s,e,i){return new Promise((r=>{var n;const h=(null===(n=this._config)||void 0===n?void 0:n.cardsState)||new Map,c=h.get(s);h.set(s,"fixed"===i?this.updateFixSequence(Object.assign(Object.assign({},c),{fixed:e.fixed}),h):Object.assign(Object.assign({},c),{[i]:e[i]})),t.saveCardState(h,this._configName,this._resourceID).then((t=>{this._config=Object.assign(Object.assign({},this._config),{cardsState:h}),r(t)}))}))}updateFixSequence(t,s){let e=-1;return Array.from(s.values()).forEach((s=>{s.fixed||delete t.fixSequence,null!=s.fixSequence&&(e=Math.max(e,s.fixSequence))})),t.fixed?t.fixSequence=e+1:delete t.fixSequence,t}getFieldsList(t){var s;const e=null===(s=this._config)||void 0===s?void 0:s.fields;return null!=e&&e.length>0?[...e]:null!=t?t.metadata.fields.filter((t=>!1!==t.visible)).map((({name:t})=>({name:t}))):[]}getInsertionConfig(t){const s=this.getFieldsList(t).filter((s=>{if(t){const e=t.getField(s.name);if(e&&e.readOnly)return!1}return!s.readOnly}));return Object.assign(Object.assign({},this._config),{fields:s})}setConfig(t){this.isLoaded=!0;const{cardsState:s,summary:e,defaultVars:i}=this._config||{};this._config=Object.assign({},t),s&&(this._config.cardsState=s),e&&(this._config.summary=e),i&&(this._config.defaultVars=i),this._onConfigChange&&this._onConfigChange(Object.assign({},this._config))}getConfig(t,s){return t?this.getInsertionConfig(s):Object.assign({},this._config)}getFormConfigFetcher(){return null==this._formConfigFetcher&&(this._formConfigFetcher=new e),this._formConfigFetcher}async fetchUserAvailableConfigs(){return null!=this._configName?Promise.resolve(void 0):this.getFormConfigFetcher().fetchUserAvailableConfigs(this._configName,this._resourceID)}async fetchLegacyConfig(){return this.getFormConfigFetcher().fetchLegacyConfig(this._configName,this._resourceID)}async fetchDefaultConfig(){return this.getFormConfigFetcher().fetchDefaultConfig(this._configName,this._resourceID)}}export{i as S}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,F as s,H as l,g as r}from"./p-d2d301a6.js";import{ApplicationUtils as n}from"@sankhyalabs/ezui/dist/collection/utils";import{F as a}from"./p-584d7212.js";import{ElementIDUtils as o,ObjectUtils as h}from"@sankhyalabs/core";import{E as c}from"./p-1a68fb59.js";import{P as d}from"./p-5c1aacc7.js";import"./p-933c0c0b.js";const u=class{constructor(e){t(this,e),this.filterChange=i(this,"filterChange",7),this.config=void 0,this.getMessage=void 0}async show(){var t,i;null===(i=null===(t=this._editor)||void 0===t?void 0:t.show)||void 0===i||i.call(t)}observeConfig(t){var i,e;this._editor&&(this._editor.config=t),null===(e=null===(i=this._editor)||void 0===i?void 0:i.reloadList)||void 0===e||e.call(i)}componentDidLoad(){if(this._element){o.addIDInfo(this._element);const t=this._element.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME);this._idContentEditor=`${t}_${this.config.id}`}}changeConfig(t){this.filterChange.emit(t)}getContentEditor(){switch(this.config.type){case a.BINARY_SELECT:return{tag:"snk-filter-binary-select"};case a.MULTI_SELECT:return{tag:"snk-filter-multi-select"};case a.PERIOD:return{tag:"snk-filter-period"};case a.SEARCH:return{tag:"snk-filter-search"};case a.NUMBER:return{tag:"snk-filter-number"};case a.PERSONALIZED:return{tag:"snk-personalized-filter-editor",props:{presentationMode:c.CHIP,onValueChanged:t=>this.handleValueChanged(t)}};case a.MULTI_LIST:return{tag:"snk-entity-list"}}return{tag:"snk-filter-text"}}handleValueChanged({detail:t}){const i=(null==t?void 0:t.items)||this.config.groupedItems;this.config=Object.assign(Object.assign({},this.config),{groupedItems:i,visible:(i||[]).filter((t=>t.visible)).length>0})}removeItem(){const t=this.config.type===a.MULTI_LIST&&Array.isArray(this.config.value)?this.config.value.map((t=>Object.assign(Object.assign({},t),{check:!1}))):void 0,i=Object.assign(Object.assign({},this.config),{visible:!1,fixed:!1,value:t});null!=i.groupedItems&&(i.groupedItems=i.groupedItems.map((t=>Object.assign(Object.assign({},t),{visible:!1,fixed:!1,value:void 0})))),this.changeConfig(i)}removeItemFromGroup(t){return Object.assign(Object.assign({},t),{visible:!1,fixed:!1,value:void 0})}getPopUpHeaderButtons(){return e(s,null,!this.config.removalBlocked&&this.buildIcon(this.getMessage("snkFilterBar.removeFilter"),"delete",(()=>this.removeItem())),!this.config.hardFixed&&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,i,s){return e("button",{onClick:()=>s(),class:"sc-snk-filter-bar snk-filter-item__editor-header-button",ref:i=>i&&this.buildIdButton(i,t)},e("ez-icon",Object.assign({title:t,iconName:i},{[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${o.getInternalIDInfo(`_${t}`)}`})))}buildIdButton(t,i){if(!t)return;const e={id:i};t.removeAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME),o.addIDInfoIfNotExists(t,"button",e)}clearBinarySelectValues(){var t;const i=this._editor||{};null===(t=i.resetValues)||void 0===t||t.call(i),this.config=h.copy(this.originalConfig),this.changeConfig(Object.assign(Object.assign({},this.config),{value:void 0}))}apply(){if(!d.validateVariableValues(this.config,this._editor.value))return n.alert(this.getMessage("snkFilterBar.filterModal.validations.notFullFilled.title"),this.getMessage("snkFilterBar.filterModal.validations.notFullFilled.message"));const t=void 0!==this._editor.value?this._editor.value:this.config.value;this.changeConfig(Object.assign(Object.assign({},this.config),{visible:this.isVisible(),value:t}))}isVisible(){return!(this.config.groupedItems&&this.config.groupedItems.length>0)||this.config.groupedItems.filter((t=>t.visible)).length>0}clear(){var t;if(this.config.type!==a.BINARY_SELECT){if(a.MULTI_LIST===this.config.type){const i=h.copy(this.config);return null===(t=i.value)||void 0===t||t.forEach((t=>!!t&&(t.check=!1))),void(this.config=h.copy(i))}this.changeConfig(Object.assign(Object.assign({},this.config),{value:void 0}))}else this.clearBinarySelectValues()}filterCanBeCleared(){return this.config.type!==a.PERSONALIZED}onKeyDonwListener(t){"Enter"===t.key&&this._applyButton.setFocus().then((()=>this.apply()))}buildRightSlot(t){return e("ez-icon",{iconName:"delete",onClick:()=>this.removeValueFromConfig(t)})}removeValueFromConfig(t){var i,e;if(this.config){const s=h.copy(this.config),l=null===(i=s.value)||void 0===i?void 0:i.findIndex((i=>(null==i?void 0:i.id)===t.id));null===(e=s.value)||void 0===e||e.splice(l,1),this.config=h.copy(s)}}componentWillLoad(){this.originalConfig=h.copy(this.config)}render(){const{tag:t,props:i}=this.getContentEditor();return e(l,null,e("div",{class:"col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center"},e("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()),e(t,Object.assign({maxHeightList:"240px",ref:t=>this._editor=t,value:this.config.value,config:this.config,onKeyDown:t=>this.onKeyDonwListener(t),"data-element-id":this._idContentEditor,getMessage:this.getMessage,rightListSlotBuilder:t=>this.buildRightSlot(t)},i)),e("hr",{class:"sc-snk-filter-bar snk-filter__popover-rule"}),e("div",{class:"ez-col ez-col--sd-12 ez-align--right"},this.filterCanBeCleared()&&e("ez-button",{label:this.getMessage("snkFilterBar.cleanFilter"),onClick:()=>this.clear(),size:"small"}),e("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)}static get watchers(){return{config:["observeConfig"]}}};export{u as snk_filter_detail}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as n,H as s,g as o}from"./p-d2d301a6.js";import{StringUtils as r,ElementIDUtils as e}from"@sankhyalabs/core";import{ApplicationUtils as l,DialogType as a}from"@sankhyalabs/ezui/dist/collection/utils";import{CheckMode as d}from"@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode";import{C as c}from"./p-41e897f1.js";import{O as g}from"./p-4a78e118.js";import"./p-a52a6c9d.js";import"./p-f8e6b97e.js";import"./p-112455b1.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-584d7212.js";const h=class{constructor(n){i(this,n),this.configChange=t(this,"configChange",7),this.configCancel=t(this,"configCancel",7),this._orderListItems=[],this._orderPriorityList=[],this._columListItems=[],this._selectedIndex=-1,this._dataChanged=!1,this._componenteInternalKey=Date.now(),this.selectedIndex=0,this.application=void 0,this.columns=void 0,this.config=void 0,this.configName=void 0,this.resourceID=void 0}getMessage(i,t){return this.application.messagesBuilder.getMessage(i,t)}createOrderList(){let i=[];this.columns.filter((i=>{var t;return r.getBooleanValue(null===(t=null==i?void 0:i.props)||void 0===t?void 0:t.get("sortable"),!0)})).forEach((t=>{var n;let s=null===(n=this.config)||void 0===n?void 0:n.columns.find((i=>i.name===t.name)),o={name:t.name,label:t.label};s&&(o.orderIndex=s.orderIndex,o.ascending=s.ascending),t.hidden||i.push(o)})),i.sort(((i,t)=>0!=i.orderIndex||0!=t.orderIndex||null==i.ascending&&null==t.ascending?null!=i.ascending&&null!=t.ascending?i.orderIndex-t.orderIndex:null!=i.ascending||null!=t.ascending?null!=i.ascending?-1:null!=t.ascending?1:0:i.orderIndex-t.orderIndex:null!=i.ascending?-1:null!=t.ascending?1:0)),this._orderListItems=i}createColumnList(){let i={group:this.getMessage("snkGridConfig.group.visible"),items:[]},t={group:this.getMessage("snkGridConfig.group.hidden"),items:[],sort:g.asc.value};this.columns.forEach((n=>{let s={label:n.label};n.hidden?t.items.push(s):i.items.push(s)})),this._columListItems=[i,t]}buildColumnListSlot(i,t){const s=`configItem_${r.replaceAccentuatedChars(r.toCamelCase(i.label))}`;return n("div",null,n("ez-check",{mode:d.SWITCH,id:d.SWITCH+((null==i?void 0:i.label)||"")+((null==t?void 0:t.group)||""),value:t.group===this.getMessage("snkGridConfig.group.visible"),"data-element-id":s,onEzChange:t=>{this.switchColumnGroup(t,i)}}))}buildOrderListSlot(i){const t=`${this._element.getAttribute(e.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${r.toCamelCase(i.label)}`;let s=g.none.value;return null!=(null==i?void 0:i.ascending)&&(s=1==i.ascending?g.asc.value:g.desc.value),n("div",null,n("snk-select-box",{selectedOption:s,key:"snk-select-box-"+this._componenteInternalKey+"-"+i,"data-element-id":t,onEzChange:t=>{t.stopPropagation(),this.updateOrder(t.detail,i.label)}}))}updateOrder(i,t){var n;this._dataChanged=!0;let s,o=[...this.columns],r=o.find((i=>i.label===t));r&&(r.sort=i.value===g.none.value?void 0:i.value),(null===(n=this._orderPriorityList)||void 0===n?void 0:n.length)>0?(this._orderPriorityList.find((i=>i.label===r.label)).sort=i,this._orderPriorityList.filter((i=>i.sort)).map(((i,t)=>{i.label===r.label&&(r.sortIndex=t)}))):(s=o.filter((i=>i.sort&&!0!==i.hidden)).map(((i,t)=>({label:i.label,orderIndex:t}))),s.forEach((i=>{o.find((t=>t.label===i.label)).sortIndex=i.orderIndex}))),this.columns=o}switchColumnGroup(i,t){i.stopPropagation();let n=[...this._columListItems];if(this._dataChanged=!0,!0===i.detail){let i=n.find((i=>i.group===this.getMessage("snkGridConfig.group.hidden"))),s=i.items.findIndex((i=>i.label===t.label));s>=0&&i.items.splice(s,1),n.find((i=>i.group===this.getMessage("snkGridConfig.group.visible"))).items.push(t),this._columListItems=n,this.createOrderList()}else if(!1===i.detail){let i=n.find((i=>i.group===this.getMessage("snkGridConfig.group.visible"))),s=i.items.findIndex((i=>i.label===t.label));s>=0&&i.items.splice(s,1),n.find((i=>i.group===this.getMessage("snkGridConfig.group.hidden"))).items.push(t),this._columListItems=n,this.createOrderList()}}finish(){if(!this._dataChanged)return void this.closeConfig();let i=[];this._columListItems.forEach((t=>{t.items.forEach((n=>{const s=this.columns.find((i=>i.label===n.label));let o=Object.assign({},s);o.hidden=t.group===this.getMessage("snkGridConfig.group.hidden"),i.push(o)}))})),this.columns=i,this._dataChanged=!1,this.closeConfig(),this.save()}save(){var i;let t;t=this.config?this.config:this.createConfigFromState(this.columns);let n,s=[];if((null===(i=this._orderPriorityList)||void 0===i?void 0:i.length)>0){n=this.columns.filter((i=>i.sort&&!0!==i.hidden)).map((i=>({label:i.label,orderIndex:0})));let i=0,t=[];this._orderPriorityList.forEach((s=>{let o=n.find((i=>i.label===s.label));o&&(o.orderIndex=i,t.push(o),i++)})),t.length>0&&(n=t)}for(let i=0;i<this.columns.length;i++){const r=this.columns[i];let e=t.columns.find((i=>r.name===i.name));!0===r.hidden&&e||(e?e.width=r.width:!1===r.hidden&&(e={name:r.name,width:r.width,orderIndex:0}),e&&(r.sort?(e.ascending=r.sort.toUpperCase()===g.asc.value,n?o(r,e):e.orderIndex=r.sortIndex):(delete e.ascending,e.orderIndex=0),s.push(e)))}function o(i,t){if(n){let s=n.find((t=>t.label===i.label));s&&(t.orderIndex=s.orderIndex)}}t.columns=s,c.saveGridConfig(t,this.configName,this.resourceID).then((i=>{this.configChange.emit(i),this._orderList.clearHistory(),l.info(this.getMessage("snkGridConfig.info.successfullyConfigSaved"),{iconName:"check"})}))}createConfigFromState(i){let t={columns:[]};return i.forEach((i=>{if(!i.hidden){let n={name:i.name};i.width&&(n.width=i.width),i.sort?(n.ascending=i.sort.toUpperCase()===g.asc.value,n.orderIndex=i.sortIndex):n.orderIndex=0,n&&t.columns.push(n)}})),t}async locateColumn(i,t){var n;const s="Enter"===i.key;t||(t=null===(n=i.currentTarget)||void 0===n?void 0:n.value);let o=-1;if(1===this.selectedIndex)if(t){const i=[];let n,r;if(await this._orderList.getList().then((s=>{n=s,n.forEach(((n,s)=>{this.compareWords(n,t)&&i.push(s)}))})),i.length>0){if(s)for(let t=0;t<i.length;t++)if(i[t]>this._selectedIndex){o=i[t];break}-1===o&&(o=i[0])}this._selectedIndex=o,r=n[o],r?this._orderList.setSelection(r,!0):this._orderList.removeSelection()}else this._orderList.removeSelection();else if(t){const i=[];if(this.columns.forEach(((n,s)=>{this.compareWords(n,t)&&i.push(s)})),i.length>0){if(s)for(let t=0;t<i.length;t++)if(i[t]>this._selectedIndex){o=i[t];break}-1===o&&(o=i[0])}this._selectedIndex=o;let n=this.columns[o];if(n){const i=this._columListItems.map((i=>i.items)).flat().find((i=>i.label===n.label));i&&this._columnList.setSelection(i,!0)}else this._columnList.removeSelection()}else this._columnList.removeSelection()}compareWords(i,t){var n,s;const o=null===(n=r.replaceAccentuatedChars(null==i?void 0:i.label))||void 0===n?void 0:n.toUpperCase(),e=null===(s=r.replaceAccentuatedChars(t))||void 0===s?void 0:s.toUpperCase();return!r.isEmpty(o)&&!r.isEmpty(e)&&o.includes(e)}getColumnNames(){const i=[];return i.push(this.getMessage("snkGridConfig.tab.columns")),i.push(this.getMessage("snkGridConfig.tab.lineOrdering")),i.join(",")}closeConfig(){if(this._orderList.scrollToTop(),this._columnList.scrollToTop(),this._searchElement.value="",this._dataChanged){let i={canClose:!1,labelCancel:this.getMessage("snkGridConfig.confirm.cancel"),labelConfirm:this.getMessage("snkGridConfig.confirm.save"),btnConfirmDanger:!1};l.confirm(this.getMessage("snkGridConfig.confirm.alert"),this.getMessage("snkGridConfig.confirm.msgCancel"),null,a.WARN,i).then((i=>{i?this.finish():(this._dataChanged=!1,this.configCancel.emit(),this._orderList.clearHistory(),this._componenteInternalKey=Date.now())}))}else this.configCancel.emit(),this._orderList.clearHistory()}handleTabChange(i){null!=(null==i?void 0:i.index)&&(this.selectedIndex!==i.index&&(0===i.index?this._orderList.scrollToTop():1===i.index&&this._columnList.scrollToTop(),this._searchElement.value=""),1===i.index&&this.createOrderList(),this.selectedIndex=i.index)}handleColumnListChange(i){var t;if(i.detail){let n=null===(t=i.detail.find((i=>i.group===this.getMessage("snkGridConfig.group.visible"))))||void 0===t?void 0:t.items;n&&(this._dataChanged=!0,this._orderListItems=n)}}handleOrderListChange(i){if(i.detail){let t=i.detail;t&&(this._dataChanged=!0,this._orderPriorityList=t)}}componentWillRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&this.createColumnList()}componentDidRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&this.locateColumn(new KeyboardEvent("arrow-right",{key:"ArrowRight"}),this._searchElement.value)}componentDidLoad(){e.addIDInfo(this._element)}render(){return n(s,null,n("div",{class:"grid-config__header"},n("div",{class:"title-container"},n("div",{class:""},n("label",{class:"title"},this.getMessage("snkGridConfig.gridConfiguration")),n("label",{class:"subtitle"},this.getMessage("snkGridConfig.columnVisibilityOrder"))),n("div",{class:"button-close"},n("ez-button",{mode:"icon",iconName:"close",size:"medium",onClick:()=>this.closeConfig()}))),n("div",{class:"tabselector-container"},n("ez-tabselector",{selectedIndex:this.selectedIndex,onEzChange:i=>{this.handleTabChange(i.detail)},tabs:this.getColumnNames()})),n("div",null,n("ez-text-input",{"data-element-id":"searchColums",ref:i=>this._searchElement=i,label:this.getMessage("snkGridConfig.findColumn"),onKeyUp:i=>this.locateColumn(i)},n("ez-icon",{slot:"leftIcon",size:"medium",iconName:"search"})))),n("div",{class:"grid-config__main"},n("ez-list",{ref:i=>this._columnList=i,class:0===this.selectedIndex?"":"hidden",dataSource:this._columListItems,onEzChange:i=>this.handleColumnListChange(i),ezDraggable:!0,ezSelectable:!0,itemSlotBuilder:(i,t)=>this.buildColumnListSlot(i,t),useGroups:!0,"data-element-id":"configCols"}),n("div",{class:1===this.selectedIndex?"group-name":"hidden"},this.getMessage("snkGridConfig.info.sortingSequence")),n("ez-list",{ref:i=>this._orderList=i,class:1===this.selectedIndex?"height-calc":"hidden",dataSource:this._orderListItems,ezSelectable:!0,onEzChange:i=>this.handleOrderListChange(i),ezDraggable:!0,itemSlotBuilder:i=>this.buildOrderListSlot(i),"data-element-id":"configDataOrder"})),n("div",{class:"grid-config__footer"},n("ez-button",{class:"padding-right--medium",label:this.getMessage("snkGridConfig.cancel"),onClick:()=>this.closeConfig()}),n("ez-button",{label:this.getMessage("snkGridConfig.complete"),class:"ez-button--primary",onClick:()=>this.finish()})))}static get assetsDirs(){return["../assets"]}get _element(){return o(this)}};h.style='.sc-snk-grid-config-h{--snk-grid-config__footer--padding-top:var(--space--medium, 12px);--snk-grid-config__main--padding-right:var(--space--medium, 12px);--snk-grid-config__tabselector-container--padding:var(--space--medium, 12px);--snk-grid-config__button-close--padding-left:var(--space--medium, 12px);--snk-grid-config__title--color:var(--title--primary, #2B3A54);--snk-grid-config__title--font-family:var(--font-pattern, "Roboto");--snk-grid-config__title--font-size:var(--title--large, 20px);--snk-grid-config__title--font-weight:var(--text-weight--extra-large, 700);--snk-grid-config__subtitle--font-family:var(--font-pattern, "Roboto");--snk-grid-config__subtitle--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-family:var(--font-pattern, "Roboto");--snk-grid-config__group--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-weight:var(--text-weight--large, 600);--snk-grid-config__group--padding-bottom:var(--space-small, 6px);--snk-grid-config__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-grid-config__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-grid-config__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-grid-config__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-grid-config__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-grid-config__scrollbar--width:var(--space--medium, 12px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-snk-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-snk-grid-config{padding-right:var(--space--medium)}ez-list.sc-snk-grid-config{height:100%}.height-calc.sc-snk-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-snk-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--snk-grid-config__footer--padding-top)}.hidden.sc-snk-grid-config{display:none}.tabselector-container.sc-snk-grid-config{padding:var(--snk-grid-config__tabselector-container--padding) 0}.button-close.sc-snk-grid-config{padding-left:var(--snk-grid-config__button-close--padding-left)}.title-container.sc-snk-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.title.sc-snk-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-grid-config__title--color);font-size:var(--snk-grid-config__title--font-size);font-family:var(--snk-grid-config__title--font-family);font-weight:var(--snk-grid-config__title--font-weight)}.subtitle.sc-snk-grid-config{color:var(--text--primary);font-size:var(--snk-grid-config__subtitle--font-size);font-family:var(--snk-grid-config__subtitle--font-family)}.grid-config__main.sc-snk-grid-config{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-grid-config__scrollbar--color-clicked) var(--snk-grid-config__scrollbar--color-background);padding-right:var(--snk-grid-config__main--padding-right)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar{width:var(--snk-grid-config__scrollbar--width);max-width:var(--snk-grid-config__scrollbar--width);min-width:var(--snk-grid-config__scrollbar--width);background-color:var(--snk-grid-config__scrollbar--color-background)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-track{background-color:var(--snk-grid-config__scrollbar--color-background);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb{background-color:var(--snk-grid-config__scrollbar--color-default);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:hover,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-grid-config__scrollbar--color-hover)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:active,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-grid-config__scrollbar--color-clicked)}.group-name.sc-snk-grid-config{font-family:var(--snk-grid-config__group--font-family);font-size:var(--snk-grid-config__group--font-size);font-weight:var(--snk-grid-config__group--font-weight);padding-bottom:var(--snk-grid-config__group--padding-bottom)}';export{h as snk_grid_config}
@@ -0,0 +1 @@
1
+ import{ObjectUtils as a}from"@sankhyalabs/core";import{R as t}from"./p-a52a6c9d.js";class s extends t{getData(t){const s=`cfg://auth/${t}`;return new Promise(((t,e)=>{this.loadResource(s).then((s=>{let e=a.stringToObject(s);e&&"object"==typeof e&&t(e)})).catch((a=>{e(a)}))}))}}var e;!function(a){a.INSERT="I",a.UPDATE="A",a.REMOVE="E",a.SHOW="C",a.CONFIG="F",a.CONFIG_NUMBER="N",a.CLONE="D",a.CONFIG_GRID="G"}(e||(e={}));export{e as A,s as a}