@sankhyalabs/sankhyablocks 10.1.0-dev.14 → 10.1.0-dev.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/dist/cjs/{SnkMultiSelectionListDataSource-3f561345.js → SnkMultiSelectionListDataSource-72925620.js} +1 -1
  2. package/dist/cjs/config-header.cjs.entry.js +1 -1
  3. package/dist/cjs/configs-button.cjs.entry.js +1 -1
  4. package/dist/cjs/field-config_2.cjs.entry.js +1 -1
  5. package/dist/cjs/fields-layout.cjs.entry.js +1 -1
  6. package/dist/cjs/fields-selector.cjs.entry.js +1 -1
  7. package/dist/cjs/guides-configurator.cjs.entry.js +1 -1
  8. package/dist/cjs/{index-13d05f03.js → index-516250fa.js} +1 -1
  9. package/dist/cjs/{index-1cf293c1.js → index-dc83c596.js} +0 -17
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +1 -1
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/snk-actions-button_9.cjs.entry.js +1 -1
  14. package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
  15. package/dist/cjs/snk-application.cjs.entry.js +1 -1
  16. package/dist/cjs/snk-attach.cjs.entry.js +3 -3
  17. package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
  18. package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
  19. package/dist/cjs/snk-crud.cjs.entry.js +3 -3
  20. package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
  21. package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +1 -1
  22. package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
  23. package/dist/cjs/{snk-data-unit-b8ea81e1.js → snk-data-unit-47f02b9e.js} +1 -1
  24. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  25. package/dist/cjs/snk-default-filter.cjs.entry.js +1 -1
  26. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -4
  27. package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
  28. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  29. package/dist/cjs/snk-expression-group_2.cjs.entry.js +2 -2
  30. package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +1 -1
  31. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1 -1
  32. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
  33. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
  34. package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -1
  35. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +1 -1
  36. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
  37. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
  38. package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
  39. package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
  40. package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
  41. package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
  42. package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
  43. package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
  44. package/dist/cjs/snk-form_2.cjs.entry.js +1 -1
  45. package/dist/cjs/snk-grid.cjs.entry.js +15 -9
  46. package/dist/cjs/{snk-guides-viewer-61701970.js → snk-guides-viewer-41c22d96.js} +2 -2
  47. package/dist/cjs/snk-guides-viewer.cjs.entry.js +4 -4
  48. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
  49. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
  50. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  51. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  52. package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
  53. package/dist/cjs/snk-simple-crud.cjs.entry.js +4 -4
  54. package/dist/cjs/snk-taskbar.cjs.entry.js +3 -3
  55. package/dist/cjs/{taskbar-elements-fb5d1e08.js → taskbar-elements-756fcbe7.js} +2 -2
  56. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  57. package/dist/collection/components/snk-grid/snk-grid.js +12 -7
  58. package/dist/components/snk-grid2.js +12 -6
  59. package/dist/esm/{SnkMultiSelectionListDataSource-2d1ea0c5.js → SnkMultiSelectionListDataSource-493ae8c8.js} +1 -1
  60. package/dist/esm/config-header.entry.js +1 -1
  61. package/dist/esm/configs-button.entry.js +1 -1
  62. package/dist/esm/field-config_2.entry.js +1 -1
  63. package/dist/esm/fields-layout.entry.js +1 -1
  64. package/dist/esm/fields-selector.entry.js +1 -1
  65. package/dist/esm/guides-configurator.entry.js +1 -1
  66. package/dist/esm/{index-446f9341.js → index-3355bd17.js} +1 -1
  67. package/dist/esm/{index-479e1293.js → index-7fd74680.js} +0 -17
  68. package/dist/esm/loader.js +2 -2
  69. package/dist/esm/pesquisa-grid_2.entry.js +1 -1
  70. package/dist/esm/sankhyablocks.js +2 -2
  71. package/dist/esm/snk-actions-button_9.entry.js +1 -1
  72. package/dist/esm/snk-actions-form.entry.js +1 -1
  73. package/dist/esm/snk-application.entry.js +1 -1
  74. package/dist/esm/snk-attach.entry.js +3 -3
  75. package/dist/esm/snk-client-confirm.entry.js +1 -1
  76. package/dist/esm/snk-configurator.entry.js +1 -1
  77. package/dist/esm/snk-crud.entry.js +3 -3
  78. package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
  79. package/dist/esm/snk-custom-slot-guide.entry.js +1 -1
  80. package/dist/esm/snk-data-exporter.entry.js +2 -2
  81. package/dist/esm/{snk-data-unit-6f31ec56.js → snk-data-unit-9e9d9d46.js} +1 -1
  82. package/dist/esm/snk-data-unit.entry.js +2 -2
  83. package/dist/esm/snk-default-filter.entry.js +1 -1
  84. package/dist/esm/snk-detail-view.entry.js +4 -4
  85. package/dist/esm/snk-entity-list.entry.js +1 -1
  86. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  87. package/dist/esm/snk-expression-group_2.entry.js +2 -2
  88. package/dist/esm/snk-filter-advanced-mode_2.entry.js +1 -1
  89. package/dist/esm/snk-filter-bar_4.entry.js +1 -1
  90. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  91. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  92. package/dist/esm/snk-filter-detail.entry.js +1 -1
  93. package/dist/esm/snk-filter-field-search_2.entry.js +1 -1
  94. package/dist/esm/snk-filter-modal-item.entry.js +1 -1
  95. package/dist/esm/snk-filter-multi-select.entry.js +1 -1
  96. package/dist/esm/snk-filter-number.entry.js +1 -1
  97. package/dist/esm/snk-filter-period.entry.js +1 -1
  98. package/dist/esm/snk-filter-search.entry.js +1 -1
  99. package/dist/esm/snk-filter-text.entry.js +1 -1
  100. package/dist/esm/snk-form-summary.entry.js +1 -1
  101. package/dist/esm/snk-form-view.entry.js +1 -1
  102. package/dist/esm/snk-form_2.entry.js +1 -1
  103. package/dist/esm/snk-grid.entry.js +15 -9
  104. package/dist/esm/{snk-guides-viewer-c31259f0.js → snk-guides-viewer-31ef5fc6.js} +2 -2
  105. package/dist/esm/snk-guides-viewer.entry.js +4 -4
  106. package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
  107. package/dist/esm/snk-personalized-filter.entry.js +2 -2
  108. package/dist/esm/snk-pesquisa.entry.js +1 -1
  109. package/dist/esm/snk-print-selector.entry.js +1 -1
  110. package/dist/esm/snk-simple-bar.entry.js +1 -1
  111. package/dist/esm/snk-simple-crud.entry.js +4 -4
  112. package/dist/esm/snk-taskbar.entry.js +3 -3
  113. package/dist/esm/{taskbar-elements-faaf5d8f.js → taskbar-elements-bf5b73f1.js} +2 -2
  114. package/dist/esm/teste-pesquisa.entry.js +1 -1
  115. package/dist/sankhyablocks/{p-6b9833c7.entry.js → p-02cb4829.entry.js} +1 -1
  116. package/dist/sankhyablocks/{p-af3aface.entry.js → p-0893a694.entry.js} +1 -1
  117. package/dist/sankhyablocks/{p-fa8c2485.entry.js → p-0da30fd9.entry.js} +1 -1
  118. package/dist/sankhyablocks/{p-4b1c26ae.js → p-156c9f38.js} +1 -1
  119. package/dist/sankhyablocks/{p-f35f2eb3.entry.js → p-17856827.entry.js} +1 -1
  120. package/dist/sankhyablocks/{p-b987e15d.js → p-1be69fd4.js} +1 -1
  121. package/dist/sankhyablocks/{p-e679c75a.entry.js → p-1dba30c9.entry.js} +1 -1
  122. package/dist/sankhyablocks/{p-21107f0d.entry.js → p-1e469905.entry.js} +1 -1
  123. package/dist/sankhyablocks/{p-96d45943.entry.js → p-227e82b2.entry.js} +1 -1
  124. package/dist/sankhyablocks/{p-7af6e6b8.entry.js → p-2624dfd2.entry.js} +1 -1
  125. package/dist/sankhyablocks/{p-99a11017.entry.js → p-301baf9c.entry.js} +1 -1
  126. package/dist/sankhyablocks/{p-52c0cade.entry.js → p-357e10e0.entry.js} +1 -1
  127. package/dist/sankhyablocks/{p-987cd79d.entry.js → p-35a26068.entry.js} +1 -1
  128. package/dist/sankhyablocks/{p-180716b2.entry.js → p-3671cdd4.entry.js} +1 -1
  129. package/dist/sankhyablocks/{p-27482793.entry.js → p-4575c4aa.entry.js} +1 -1
  130. package/dist/sankhyablocks/{p-3d41f5a8.entry.js → p-497ece60.entry.js} +1 -1
  131. package/dist/sankhyablocks/{p-5fd4f0f6.entry.js → p-4deb7f46.entry.js} +1 -1
  132. package/dist/sankhyablocks/{p-bdd4f02c.entry.js → p-4e9e570c.entry.js} +1 -1
  133. package/dist/sankhyablocks/{p-3b167a03.entry.js → p-516411de.entry.js} +1 -1
  134. package/dist/sankhyablocks/{p-162bddae.entry.js → p-522d36aa.entry.js} +1 -1
  135. package/dist/sankhyablocks/{p-825098c1.entry.js → p-56b1b397.entry.js} +1 -1
  136. package/dist/sankhyablocks/{p-3f68a254.js → p-59158ba4.js} +1 -1
  137. package/dist/sankhyablocks/{p-c98c79c3.entry.js → p-5c9bea92.entry.js} +1 -1
  138. package/dist/sankhyablocks/{p-91a9abb6.entry.js → p-613eb22e.entry.js} +1 -1
  139. package/dist/sankhyablocks/{p-49ddc27a.entry.js → p-670b8802.entry.js} +1 -1
  140. package/dist/sankhyablocks/{p-60dd1d27.entry.js → p-67137d7c.entry.js} +1 -1
  141. package/dist/sankhyablocks/{p-a5e0a780.entry.js → p-7375bf6a.entry.js} +1 -1
  142. package/dist/sankhyablocks/{p-b7e891cc.entry.js → p-7961c550.entry.js} +1 -1
  143. package/dist/sankhyablocks/{p-75af335e.entry.js → p-82b59a45.entry.js} +1 -1
  144. package/dist/sankhyablocks/p-82bb3eda.js +2 -0
  145. package/dist/sankhyablocks/{p-55798617.js → p-8336900b.js} +1 -1
  146. package/dist/sankhyablocks/{p-74389ec4.entry.js → p-8488fa7e.entry.js} +1 -1
  147. package/dist/sankhyablocks/{p-cb4343c4.entry.js → p-8783d550.entry.js} +1 -1
  148. package/dist/sankhyablocks/{p-471b34f4.entry.js → p-8d76a0ca.entry.js} +1 -1
  149. package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-8d84d6ab.entry.js} +1 -1
  150. package/dist/sankhyablocks/{p-8027f732.js → p-907e96eb.js} +1 -1
  151. package/dist/sankhyablocks/{p-e258de96.entry.js → p-939523b3.entry.js} +1 -1
  152. package/dist/sankhyablocks/{p-a9b16874.entry.js → p-959fe522.entry.js} +1 -1
  153. package/dist/sankhyablocks/{p-7e250432.entry.js → p-98c70173.entry.js} +1 -1
  154. package/dist/sankhyablocks/{p-2d133b6e.entry.js → p-98e3d0a1.entry.js} +1 -1
  155. package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-abfc9880.entry.js} +1 -1
  156. package/dist/sankhyablocks/{p-728959a6.entry.js → p-b5832fa0.entry.js} +1 -1
  157. package/dist/sankhyablocks/{p-04bbdf6f.entry.js → p-c2bb0659.entry.js} +1 -1
  158. package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-c60d864f.entry.js} +1 -1
  159. package/dist/sankhyablocks/{p-8ce94b62.entry.js → p-cb7c592f.entry.js} +1 -1
  160. package/dist/sankhyablocks/{p-f3027bc9.entry.js → p-cc68a0c1.entry.js} +1 -1
  161. package/dist/sankhyablocks/{p-c3dbf441.entry.js → p-ce207f2a.entry.js} +1 -1
  162. package/dist/sankhyablocks/{p-c4fcf1fb.entry.js → p-cfa4c183.entry.js} +1 -1
  163. package/dist/sankhyablocks/{p-20349480.entry.js → p-d5d7fe52.entry.js} +1 -1
  164. package/dist/sankhyablocks/{p-b47acee0.entry.js → p-dd89bc02.entry.js} +1 -1
  165. package/dist/sankhyablocks/{p-667cab42.entry.js → p-def17f0e.entry.js} +1 -1
  166. package/dist/sankhyablocks/p-e41c86b2.entry.js +1 -0
  167. package/dist/sankhyablocks/{p-4c2e2767.entry.js → p-e47d6f17.entry.js} +1 -1
  168. package/dist/sankhyablocks/{p-7345782c.entry.js → p-fd1a5a61.entry.js} +1 -1
  169. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  170. package/dist/types/components/snk-grid/snk-grid.d.ts +1 -0
  171. package/package.json +1 -1
  172. package/dist/sankhyablocks/p-0814b16c.entry.js +0 -1
  173. package/dist/sankhyablocks/p-d8d8169b.js +0 -2
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s,F as e,g as r}from"./p-82bb3eda.js";import{KeyboardManager as a,Action as n,ElementIDUtils as o,ApplicationContext as h,StringUtils as d}from"@sankhyalabs/core";import{SelectionMode as l}from"@sankhyalabs/core/dist/dataunit/DataUnit";import{buildFieldSearch as c}from"@sankhyalabs/ezui/dist/collection/utils";import"./p-6768f176.js";import"./p-48a5c311.js";import{C as u,a as g,S as m,R as k,b as v,c as p}from"./p-59158ba4.js";import{P as f,E as T}from"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-9e4555ab.js";import"./p-ff1990ad.js";import"./p-7ee6b1bf.js";import"./p-9019a32f.js";import{C as b}from"./p-1f310bc6.js";import{s as C}from"./p-8336900b.js";import{g as E}from"./p-7dd49d15.js";import{v as R}from"./p-76e66fd9.js";import{T as _}from"./p-1be69fd4.js";import{T as O}from"./p-1a0caadb.js";import"./p-8d884fab.js";import"./p-8f3f2306.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";class I extends u{getFilters(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getAppliedFilters()}getOrders(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getSort()}getResourceURI(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.name}getSelectedNumber(){return this.dataUnit.getSelectionInfo().length}getTotalRecords(){var i,t,s;const{total:e}=(null===(i=this.dataUnit)||void 0===i?void 0:i.getPaginationInfo())||{};return null!=e?e:null===(s=null===(t=this.dataUnit)||void 0===t?void 0:t.records)||void 0===s?void 0:s.length}getSelectedIDs(){return E(this.dataUnit)}getOffset(){return this.getExporterOffset(this.getPaginationInfo())}getPageSize(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.pageSize}getExportLimit(){return 5e3}getRecordID(){var i,t,s;return null===(s=null===(t=null===(i=this.dataUnit)||void 0===i?void 0:i.records)||void 0===t?void 0:t[0])||void 0===s?void 0:s.__record__id__}getPaginationInfo(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getPaginationInfo()}getExporterOffset(i){if(null==i)return;const t=i.firstRecord;return t>0?t-1:t}}const S=class{constructor(s){i(this,s),this.actionClick=t(this,"actionClick",7),this.gridDoubleClick=t(this,"gridDoubleClick",7),this.componentReady=t(this,"componentReady",7),this._customEditors=new Map,this._customRenders=new Map,this._keyboardManager=new a,this._topTaskbarProcessor=new O({"snkGridTopTaskbar.regular":["FORM_MODE","CONFIGURATOR","INSERT"],"snkGridTopTaskbar.regular.secondary":["FORM_MODE","CONFIGURATOR","INSERT"],"snkGridTopTaskbar.regular.singleTaskbar":[],"snkGridTopTaskbar.finish_edition":["CANCEL","SAVE",this.handleAddFormMode()],"snkGridTopTaskbar.finish_edition.secondary":[],"snkGridTopTaskbar.finish_edition.singleTaskbar":[]}),this._headerTaskbarProcessor=new O({"snkGridHeaderTaskbar.unselected":["REFRESH","DATA_EXPORTER","ACTIONS_BUTTON","MORE_OPTIONS"],"snkGridHeaderTaskbar.selected":this.getGridHeaderSelectedBtns(),"snkGridHeaderTaskbar.detail.unselected":["REFRESH","MORE_OPTIONS"],"snkGridHeaderTaskbar.detail.selected":["UPDATE","ATTACH","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","REFRESH"],"snkGridHeaderTaskbar.singleTaskbar.unselected":["INSERT","FORM_MODE","CONFIGURATOR","REFRESH","DATA_EXPORTER","ACTIONS_BUTTON","MORE_OPTIONS"],"snkGridHeaderTaskbar.singleTaskbar.selected":["UPDATE","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","ATTACH","FORM_MODE","CONFIGURATOR","REFRESH","DATA_EXPORTER","ACTIONS_BUTTON"],"snkGridHeaderTaskbar.singleTaskbar.detail.unselected":["INSERT","FORM_MODE","CONFIGURATOR","REFRESH","MORE_OPTIONS"],"snkGridHeaderTaskbar.singleTaskbar.detail.selected":["UPDATE","ATTACH","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","FORM_MODE","CONFIGURATOR","REFRESH"],"snkGridHeaderTaskbar.singleTaskbar.finish_edition":["CANCEL","SAVE",this.handleAddFormMode()]}),this.dataUnitInterceptor={interceptAction:async i=>i.type===n.METADATA_LOADED?await this.interceptMetadataLoaded(i):i.type===n.LOADING_DATA?await this.interceptLoadData(i):i},this._dataUnit=void 0,this._dataState=void 0,this._gridConfig=void 0,this._popUpGridConfig=!1,this._showSnkFilterBar=!0,this._enableContinuousInsert=!1,this._filterMode="regular",this.columnFilterDataSource=void 0,this.enableLockManagerLoadingComp=!1,this.enableLockManagerTaskbarClick=!1,this.configName=void 0,this.filterBarTitle=void 0,this.resourceID=void 0,this.selectionToastConfig=void 0,this.actionsList=void 0,this.isDetail=void 0,this.taskbarManager=void 0,this.statusResolver=void 0,this.multipleSelection=void 0,this.presentationMode=f.PRIMARY,this.messagesBuilder=void 0,this.useEnterLikeTab=!1,this.recordsValidator=void 0,this.canEdit=!0,this.taskbarCustomContainerId=void 0,this.gridHeaderCustomSlotId="GRID_HEADER_CUSTOM_ELEMENTS",this.gridHeaderDynamicSearchSlotId="GRID_HEADER_DYNAMIC_SEARCH",this.topTaskbarCustomSlotId="GRID_TASKBAR_CUSTOM_ELEMENTS",this.disablePersonalizedFilter=void 0,this.gridLegacyConfigName=void 0,this.filterBarLegacyConfigName=void 0,this.autoLoad=void 0,this.autoFocus=!0,this.enableGridInsert=!1,this.outlineMode=!1,this.suppressHorizontalScroll=!1,this.strategyExporter=T.SERVER_SIDE,this.useSearchColumn=!0,this.multipleEditionEnabled=!0,this.paginationCounterMode="auto",this.suppressCheckboxColumn=void 0,this.suppressFilterColumn=!1,this.compact=void 0,this.filterCustomConfig=void 0,this.filterCustomConfigInterceptor=void 0}getGridHeaderSelectedBtns(){const i=[_.UPDATE,_.CLONE,_.REMOVE,_.MORE_OPTIONS,_.DIVIDER,_.ATTACH,_.FORM_MODE,_.CONFIGURATOR,_.REFRESH,_.DATA_EXPORTER,_.ACTIONS_BUTTON];return this.multipleEditionEnabled&&i.unshift(_.UPDATE_MULTIPLE),i}async refreshColumnFilterDataSource(){await this._grid.refreshColumnFilterDataSource()}reloadConfig(){this.loadConfig()}async showConfig(){null!=this._grid&&this.openGridConfig()}async hideConfig(){null!=this._grid&&this.closeGridConfig()}async setConfig(i){this.setGridConfig(i)}async reloadFilterBar(){var i;null===(i=this._snkFilterBar)||void 0===i||i.reload()}async getFilterBar(){return this._snkFilterBar}async addCustomEditor(i,t,s){if(this._grid)return void this._grid.addCustomEditor(i,t,s);const e=new Map(this._customEditors);e.set(i,{customEditor:t,detailContext:s}),this._customEditors=e}async addGridCustomRender(i,t,s){if(this._grid)return void this._grid.addGridCustomRender(i,t,s);const e=new Map(this._customRenders);e.set(i,{customRender:t,detailContext:s}),this._customRenders=e}async addCustomValueFormatter(i,t){this._grid.addCustomValueFormatter(i,t)}async removeCustomValueFormatter(i){this._grid.removeCustomValueFormatter(i)}async setFocus(){this._grid.setFocus()}async handleClick(i){var t;if(this.hasToBlockEvent(i)){if(i.preventDefault(),i.stopPropagation(),!await this._dataUnit.cancelEdition())return;const s=new i.constructor(i.type,i);null===(t=i.target)||void 0===t||t.dispatchEvent(s)}this._grid&&!this._grid.contains(i.target)&&this._grid.stopEdit()}hasToBlockEvent(i){var t;return(null===(t=this._snkFilterBar)||void 0===t?void 0:t.contains(i.target))&&this.enableGridInsert&&this._dataUnit.hasNewRecord()}async handleGridLegacyConfigName(i,t){i&&i!==t&&(this.addGridLegacyConfigName(),this.loadConfig())}handleAddFormMode(){return this.enableGridInsert?_.FORM_MODE:""}openGridConfig(){this._grid.getColumnsState().then((i=>{this._snkGridConfig.columns=i.filter((i=>i.name)),this._popUpGridConfig=!0}))}closeGridConfig(){this._popUpGridConfig=!1}setGridConfig(i){this._gridConfig=i,g.assertDefaultSorting(this._gridConfig,this._dataUnit)}fixColumNameCharset(i){try{return decodeURIComponent(escape(i))}catch(t){return i}}normalizeGridConfig(i){if(!i)return i;const t=i.columns.map((i=>Object.assign(Object.assign({},i),{name:this.fixColumNameCharset(i.name)})));return Object.assign(Object.assign({},i),{columns:t})}loadConfig(){b.loadGridConfig(this.configName,this.resourceID).then((i=>{this.setGridConfig(this.normalizeGridConfig(i))})).catch((i=>{console.warn(i)}))}addGridLegacyConfigName(){this.gridLegacyConfigName&&this.configName&&b.addGridLegacyConfig(this.configName,this.gridLegacyConfigName)}hasCalculatedFields(i){let t=!1;return i.forEach((i=>{var s;"true"===(null===(s=this._dataUnit.getField(i).properties)||void 0===s?void 0:s.calculated)&&(t=!0)})),t}gridConfigChangeHandler(i){const t=this.normalizeGridConfig(i.detail);b.saveGridConfig(t,this.configName,this.resourceID),i.stopPropagation()}modalConfigChangeHandler(i){const t=this.normalizeGridConfig(i.detail);this._grid.setColumnsState(t.columns).then((()=>{this.setGridConfig(t),this.closeGridConfig(),this.dataExporterProviderStore()})),i.stopPropagation()}async hasToForceClientSideExporter(){if(!this._grid)return!1;const i=(await this._grid.getAppliedColumnFilters()).map((i=>i.name.replace("FILTRO_COLUNA_","")));return this.hasCalculatedFields(i)}async dataExporterProviderStore(){const i=await this.hasToForceClientSideExporter()||this.strategyExporter===T.CLIENT_SIDE?new p(this._dataUnit,this._grid):new I(this._dataUnit,this._grid);C.set("exporterProviders",Object.assign(Object.assign({},C.get("exporterProviders")),{[this.configName]:i}))}addElementID(){o.addIDInfo(this._element,null,{dataUnit:this._dataUnit})}loadGridCustomFormatters(i){i&&this._grid&&i.forEach((i=>{var t;(null===(t=i.properties)||void 0===t?void 0:t.rm_precision)&&this.addCustomValueFormatter(i.name,this._rmPrecisionCustomValueFormatter)}))}async interceptMetadataLoaded(i){return this.loadGridCustomFormatters(i.payload.fields),i}async interceptLoadData(i){var t;if(R(null===(t=this._snkFilterBar)||void 0===t?void 0:t.filterConfig))return i;{const i=this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.title",{}),t=this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.message",{});await this._application.error(i,t)}}initializeColumnFilterDataSource(){var i,t,s;const e=null===(i=this._dataUnit)||void 0===i?void 0:i.name.includes("InMemoryDataUnit");this.columnFilterDataSource||e||(this.columnFilterDataSource=new m),null===(t=this.columnFilterDataSource)||void 0===t||t.setApplication(this._application),null===(s=this.columnFilterDataSource)||void 0===s||s.setDataUnit(this._dataUnit)}finishLoading(){this._dataUnit.addInterceptor(this.dataUnitInterceptor),g.assertDefaultSorting(this._gridConfig,this._dataUnit),this.addElementID(),this.initializeColumnFilterDataSource()}setCustomRenders(){if(this._grid)for(const[i,t]of this._customRenders)this._grid.addGridCustomRender(i,t.customRender,t.detailContext),this._customRenders.delete(i)}setCustomEditors(){if(this._grid)for(const[i,t]of this._customEditors)this._grid.addCustomEditor(i,t.customEditor,t.detailContext),this._customEditors.delete(i)}componentWillLoad(){this._application=h.getContextValue("__SNK__APPLICATION__");let i=this._element.parentElement;for(;i;){if("SNK-DATA-UNIT"===i.tagName.toUpperCase()){this._snkDataUnit=i,this._dataUnit=this._snkDataUnit.dataUnit,this._dataUnit?this.finishLoading():this._snkDataUnit.addEventListener("dataUnitReady",(i=>{this._dataUnit=i.detail,this.finishLoading()})),this.messagesBuilder||(this.messagesBuilder=this._snkDataUnit.messagesBuilder),this._snkDataUnit.addEventListener("dataStateChange",this.handleDataStateChange.bind(this)),this._snkDataUnit.addEventListener("cancelEdition",(()=>{var i;(null===(i=this._dataState)||void 0===i?void 0:i.recordsIsEmpty)&&this._dataUnit.clearSelection()}));break}i=i.parentElement}this._rmPrecisionCustomValueFormatter=new k,this.addGridLegacyConfigName(),this.loadConfig(),this._continuousInsertUtils=new v(this._application,this.resourceID,this.configName),this.enableGridInsert&&this._continuousInsertUtils.getConfig().then((i=>this._enableContinuousInsert=i))}componentDidRender(){var i,t;this._rmPrecisionCustomValueFormatter.setGrid(this._grid),this.loadGridCustomFormatters(null===(t=null===(i=this._dataUnit)||void 0===i?void 0:i.metadata)||void 0===t?void 0:t.fields),this.setCustomRenders(),this.setCustomEditors()}async handleDataStateChange(i){this._dataState=i.detail,this._rmPrecisionCustomValueFormatter.setDataState(this._dataState)}getHeaderDisabledButtons(){var i;const t=[];return(null===(i=this._dataState)||void 0===i?void 0:i.selectionInfo)&&(this._dataState.selectionInfo.length>1&&t.push(_.CLONE,_.ATTACH,_.UPDATE),this._dataState.selectionInfo.isAllRecords()&&t.push(_.REMOVE)),t}getInvisibleButtons(){var i,t;let s=[];return this._dataUnit&&0!==this._dataUnit.records.length||s.push(_.DATA_EXPORTER),(null===(i=this._dataState)||void 0===i?void 0:i.selectionInfo.mode)===l.ALL_RECORDS&&s.push(_.ACTIONS_BUTTON),1===(null===(t=this._dataState)||void 0===t?void 0:t.selectionInfo.length)&&s.push(_.UPDATE_MULTIPLE),s}componentWillRender(){const i=this.getInvisibleButtons();this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(),this.taskbarManager,this._dataState,this.getHeaderDisabledButtons(),i),this._topTaskbarProcessor.process(this.getTopTaskBarId(),this.taskbarManager,this._dataState,void 0,i),this.dataExporterProviderStore()}getHeaderTaskbarId(){var i,t;const s=this._dataState&&!!(null===(i=this._dataState.selectionInfo)||void 0===i?void 0:i.length),e={primary:this.isDetail?"snkGridHeaderTaskbar.detail":"snkGridHeaderTaskbar",secondary:this.isDetail?"snkGridHeaderTaskbar.detail":"snkGridHeaderTaskbar",singleTaskbar:this.isDetail?"snkGridHeaderTaskbar.singleTaskbar.detail":"snkGridHeaderTaskbar.singleTaskbar"}[this.presentationMode];let r=s?`${e}.selected`:`${e}.unselected`;return(null===(t=this._dataState)||void 0===t?void 0:t.isDirty)&&this.presentationMode===f.SINGLE_TASKBAR&&(r="snkGridHeaderTaskbar.singleTaskbar.finish_edition"),r}getTopTaskBarId(){var i;const t={primary:"",secondary:".secondary",singleTaskbar:".singleTaskbar"}[this.presentationMode];return(null===(i=this._dataState)||void 0===i?void 0:i.isDirty)?`snkGridTopTaskbar.finish_edition${t}`:`snkGridTopTaskbar.regular${t}`}getPrimaryButton(){return{primary:"INSERT",secondary:"",singleTaskbar:"INSERT"}[this.presentationMode]}getColumnSearch(i){return null!=this._columnSearch||(this._columnSearch=c(i,(({argument:i})=>new Promise((t=>{this._grid.filterColumns(i).then((i=>{t(i.filter((i=>!i.hidden)).map((i=>({label:i.label,value:i.name}))))}))}))),(i=>{null!=i&&this._grid.locateColumn(i.value)}))),this._columnSearch}getActionsList(){const i=[];if(this.enableGridInsert&&i.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert,(()=>{this._enableContinuousInsert=!this._enableContinuousInsert,this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert)}))),this.isGridInsertActive())return i;if(null!=this.taskbarManager&&null!=this.taskbarManager.getMoreOptions){const t=this.getTopTaskBarId();return i.concat(this.taskbarManager.getMoreOptions(t,this.configName,this._dataState,this.actionsList))}return i.concat(this.actionsList)}getActionsSettingsList(){return[{value:d.generateUUID(),label:this.messagesBuilder.getMessage("snkGrid.findColumn",{}),disableCloseOnSelect:!0,eagerInitialize:!0,itemBuilder:(i,t)=>this.getColumnSearch(t)}]}handleFilterConfigUpdated(i){if(i.length)return 1===i.length&&"PERSONALIZED_FILTER_GROUP"===i[0].id?(this._showSnkFilterBar=!0,void(this._filterMode=i[0].groupedItems.length>0?"regular":"button")):void(this._showSnkFilterBar=!0);this._showSnkFilterBar=!1}getGridHeaderButtons(){return this.isGridInsertActive()?_.MORE_OPTIONS:this._headerTaskbarProcessor.buttons}isGridInsertActive(){return this.enableGridInsert&&this._dataUnit.hasNewRecord()}render(){if(this._dataUnit)return s("div",{class:"snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline",tabindex:"0"},s("div",{class:"snk-grid__header ez-margin-bottom--extra-small"},this._showSnkFilterBar&&s(e,null,s("snk-filter-bar",{ref:i=>this._snkFilterBar=i,title:this.filterBarTitle,dataUnit:this._dataUnit,"data-element-id":"gridFilter",class:"snk-grid__filter-bar ez-align--top",configName:this.configName,messagesBuilder:this.messagesBuilder,resourceID:this.resourceID,onConfigUpdated:i=>this.handleFilterConfigUpdated(i.detail),disablePersonalizedFilter:this.disablePersonalizedFilter,filterBarLegacyConfigName:this.filterBarLegacyConfigName,autoLoad:this.autoLoad,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,filterCustomConfig:this.filterCustomConfig,filterCustomConfigInterceptor:this.filterCustomConfigInterceptor,mode:this._filterMode}),s("hr",{class:"ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider"})),s("snk-taskbar",{class:"ez-padding-left--medium ez-padding-top--extra-small","data-element-id":"grid_top",key:"topTaskbar",configName:this.configName,dataUnit:this._dataUnit,messagesBuilder:this.messagesBuilder,buttons:this._topTaskbarProcessor.buttons,disabledButtons:this._topTaskbarProcessor.disabledButtons,customButtons:this._topTaskbarProcessor.customButtons,primaryButton:this.getPrimaryButton(),resourceID:this.resourceID,customContainerId:this.taskbarCustomContainerId,customSlotId:this.topTaskbarCustomSlotId,overflowStrategy:"none",actionsSettingsList:this.getActionsSettingsList()},s("slot",{name:this.topTaskbarCustomSlotId}))),s("ez-grid",{ref:i=>this._grid=i,class:(this.presentationMode===f.SECONDARY?"snk-grid-container__without-shadow ":"")+"snk-grid__table","data-element-id":"embedded",dataUnit:this._dataUnit,key:"grid-"+this._snkDataUnit.entityName,config:this._gridConfig,onConfigChange:i=>{this.gridConfigChangeHandler(i)},onEzColumnFilterChanged:async()=>await this.dataExporterProviderStore(),onEzDoubleClick:i=>this.gridDoubleClick.emit(i.detail),statusResolver:this.statusResolver,multipleSelection:this.multipleSelection,columnfilterDataSource:this.columnFilterDataSource,selectionToastConfig:this.selectionToastConfig,useEnterLikeTab:this.useEnterLikeTab,recordsValidator:this.recordsValidator,canEdit:this.canEdit,autoFocus:this.autoFocus,enableGridInsert:this.enableGridInsert,enableContinuousInsert:this._enableContinuousInsert,enableLockManagerTaskbarClick:this.enableLockManagerTaskbarClick,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,outlineMode:this.outlineMode,useSearchColumn:this.useSearchColumn,suppressHorizontalScroll:this.suppressHorizontalScroll,paginationCounterMode:this.paginationCounterMode,suppressCheckboxColumn:this.suppressCheckboxColumn,suppressFilterColumn:this.suppressFilterColumn,compact:this.compact},s("snk-taskbar",{id:"teste",dataUnit:this._dataUnit,configName:this.configName,messagesBuilder:this.messagesBuilder,"data-element-id":"grid_left",buttons:this.getGridHeaderButtons(),presentationMode:this.presentationMode,disabledButtons:this._headerTaskbarProcessor.disabledButtons,customButtons:this._headerTaskbarProcessor.customButtons,slot:"leftButtons",actionsList:this.getActionsList(),primaryButton:this.getPrimaryButton(),resourceID:this.resourceID,customContainerId:this.taskbarCustomContainerId,customSlotId:this.gridHeaderCustomSlotId,additionalSlotId:this.gridHeaderDynamicSearchSlotId,actionsSettingsList:this.getActionsSettingsList()},s("slot",{name:this.gridHeaderCustomSlotId}),s("slot",{name:this.gridHeaderDynamicSearchSlotId}))),s("div",{class:"ez-col ez-col--sd-12 snk-grid-container__footer"},s("slot",{name:"SnkGridFooter"})),s("ez-popup",{size:"medium",heightMode:"auto",useHeader:!1,opened:this._popUpGridConfig,onEzClosePopup:()=>this.closeGridConfig()},s("snk-grid-config",{ref:i=>this._snkGridConfig=i,config:this._gridConfig,"data-element-id":this._element.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME),selectedIndex:0,configName:this.configName,onConfigChange:i=>this.modalConfigChangeHandler(i),onConfigCancel:()=>this.closeGridConfig(),resourceID:this.resourceID})))}get _element(){return r(this)}static get watchers(){return{gridLegacyConfigName:["handleGridLegacyConfigName"]}}};S.style=".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none;--snk-grid-header--min-height:40px}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__filter-bar.sc-snk-grid{width:100%;display:flex;align-items:flex-start}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium);margin-top:var(--space--small);align-self:stretch}.snk-grid__header.sc-snk-grid snk-taskbar.sc-snk-grid{display:flex;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";export{S as snk_grid}
@@ -1 +1 @@
1
- import{r as i,c as e,h as s,H as t,g as l}from"./p-d8d8169b.js";import{S as o}from"./p-51833248.js";import{I as a}from"./p-8b4d6719.js";import{ArrayUtils as d}from"@sankhyalabs/core";import"./p-9019a32f.js";const r=class{constructor(s){i(this,s),this.fieldListChanged=e(this,"fieldListChanged",7),this.availableFields=[],this.dataUnit=void 0,this.filterTerm="",this.messagesBuilder=void 0}onAddField(i){const e=this.addItemInPosition(i.newIndex,i.item.fieldConfig);this.fieldListChanged.emit(e)}addItemInPosition(i,e){return[...this.availableFields.slice(0,i),e,...this.availableFields.slice(i)]}onRemoveField(i){const e=i.item,s=e.fieldConfig.name,t=[...this.availableFields.filter((i=>i.name!==s))];this.fieldListChanged.emit(t),requestAnimationFrame((()=>e.remove()))}renderFields(){return d.applyStringFilter(this.filterTerm,this.availableFields).map((i=>s("field-item",{key:i.name,dataUnit:this.dataUnit,fieldConfig:i,messagesBuilder:this.messagesBuilder})))}getCountText(){return this.availableFields.length?1===this.availableFields.length?this.getMessage("snkFormConfig.availableFields.labelOneField"):`${this.availableFields.length} ${this.getMessage("snkFormConfig.availableFields.labelAvailableFields")}`:this.getMessage("snkFormConfig.availableFields.labelNoFields")}initializeDraggableContainer(){new o(this.el.querySelector(`#${a}`),{group:"fields",direction:"vertical",ghostClass:"ghost",animation:15,onAdd:i=>this.onAddField(i),onRemove:i=>this.onRemoveField(i)})}getMessage(i,e){var s;return null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(i,e)}componentDidRender(){this.initializeDraggableContainer()}render(){return s(t,{class:"ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium"},s("span",{class:"fields-label ez-padding-bottom--small"},this.getMessage("snkFormConfig.availableFields.title")),s("ez-filter-input",{class:"filter-input",slot:"content",mode:"slim",label:this.getMessage("snkFormConfig.availableFields.labelSearchField"),onEzChange:i=>this.filterTerm=i.detail}),s("span",{class:"fields-count"},this.getCountText()),s("ez-scroller",{direction:"vertical",activeShadow:!0},s("div",{id:a,class:"fields-container"},this.renderFields())))}get el(){return l(this)}};r.style=".sc-fields-selector-h{width:33.33333%;display:flex;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);max-width:260px}.fields-label.sc-fields-selector{display:block;font-size:16px;font-weight:500;width:100%}.fields-count.sc-fields-selector{display:block;color:#AFB6C0;font-size:14px;padding:12px 0;font-weight:400;width:100%}.fields-container.sc-fields-selector{display:flex;flex-direction:column;gap:12px;height:calc(100vh - 220px);width:100%}.ghost.sc-fields-selector{opacity:.5;background:#c8fbe2}.filter-input.sc-fields-selector{padding-right:var(--space--2xs, 8px)}";export{r as fields_selector}
1
+ import{r as i,c as e,h as s,H as t,g as l}from"./p-82bb3eda.js";import{S as a}from"./p-51833248.js";import{I as o}from"./p-8b4d6719.js";import{ArrayUtils as d}from"@sankhyalabs/core";import"./p-9019a32f.js";const r=class{constructor(s){i(this,s),this.fieldListChanged=e(this,"fieldListChanged",7),this.availableFields=[],this.dataUnit=void 0,this.filterTerm="",this.messagesBuilder=void 0}onAddField(i){const e=this.addItemInPosition(i.newIndex,i.item.fieldConfig);this.fieldListChanged.emit(e)}addItemInPosition(i,e){return[...this.availableFields.slice(0,i),e,...this.availableFields.slice(i)]}onRemoveField(i){const e=i.item,s=e.fieldConfig.name,t=[...this.availableFields.filter((i=>i.name!==s))];this.fieldListChanged.emit(t),requestAnimationFrame((()=>e.remove()))}renderFields(){return d.applyStringFilter(this.filterTerm,this.availableFields).map((i=>s("field-item",{key:i.name,dataUnit:this.dataUnit,fieldConfig:i,messagesBuilder:this.messagesBuilder})))}getCountText(){return this.availableFields.length?1===this.availableFields.length?this.getMessage("snkFormConfig.availableFields.labelOneField"):`${this.availableFields.length} ${this.getMessage("snkFormConfig.availableFields.labelAvailableFields")}`:this.getMessage("snkFormConfig.availableFields.labelNoFields")}initializeDraggableContainer(){new a(this.el.querySelector(`#${o}`),{group:"fields",direction:"vertical",ghostClass:"ghost",animation:15,onAdd:i=>this.onAddField(i),onRemove:i=>this.onRemoveField(i)})}getMessage(i,e){var s;return null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(i,e)}componentDidRender(){this.initializeDraggableContainer()}render(){return s(t,{class:"ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium"},s("span",{class:"fields-label ez-padding-bottom--small"},this.getMessage("snkFormConfig.availableFields.title")),s("ez-filter-input",{class:"filter-input",slot:"content",mode:"slim",label:this.getMessage("snkFormConfig.availableFields.labelSearchField"),onEzChange:i=>this.filterTerm=i.detail}),s("span",{class:"fields-count"},this.getCountText()),s("ez-scroller",{direction:"vertical",activeShadow:!0},s("div",{id:o,class:"fields-container"},this.renderFields())))}get el(){return l(this)}};r.style=".sc-fields-selector-h{width:33.33333%;display:flex;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);max-width:260px}.fields-label.sc-fields-selector{display:block;font-size:16px;font-weight:500;width:100%}.fields-count.sc-fields-selector{display:block;color:#AFB6C0;font-size:14px;padding:12px 0;font-weight:400;width:100%}.fields-container.sc-fields-selector{display:flex;flex-direction:column;gap:12px;height:calc(100vh - 220px);width:100%}.ghost.sc-fields-selector{opacity:.5;background:#c8fbe2}.filter-input.sc-fields-selector{padding-right:var(--space--2xs, 8px)}";export{r as fields_selector}
@@ -1 +1 @@
1
- import{r as t,h as e}from"./p-d8d8169b.js";import{DataUnit as s,UserInterface as i,DataType as r,ApplicationContext as a}from"@sankhyalabs/core";import{P as n}from"./p-eaad0aa8.js";const o=class{constructor(e){t(this,e),this.APPLY="OK",this.CANCEL="CANCEL",this.CLOSE="CLOSE",this.action=void 0,this.applyParameters=void 0,this.dataUnit=new s}async openPopup(){this._ezPopup.opened=!0}exitPopup(){this._ezPopup.opened=!1}async handleApply(){try{await this._ezForm.validate();let t=this.dataUnit.getSelectedRecord();t&&(this._params.forEach(((e,s)=>{if(t.hasOwnProperty(e.name)){if(e.paramType==n.ENTITY){let s=t[e.name];return s?void(e.value="object"==typeof s?s.value:s):void(e.value=null)}this._params[s].value=t[e.name]}else this._params[s].value=void 0})),this.action.actionConfig.params.promptParam=this._params),this.exitPopup(),this.applyParameters(this.action)}catch(t){}}searchLoader(t,e){return this._application.executePreparedSearch(t.mode,t.argument,{entity:e.entityName,entityDescription:e.label})}getUserInterface(t){switch(t){case n.TEXT:return i.SHORTTEXT;case n.INTEGER:return i.INTEGERNUMBER;case n.DECIMAL:return i.DECIMALNUMBER;case n.DATE:return i.DATE;case n.DATETIME:return i.DATETIME;case n.BOOLEAN:return i.CHECKBOX;case n.ENTITY:return i.SEARCH;case n.OPTIONS:return i.OPTIONSELECTOR}}getDataType(t){switch(t){case n.TEXT:case n.OPTIONS:return r.TEXT;case n.INTEGER:case n.DECIMAL:return r.NUMBER;case n.DATE:case n.DATETIME:return r.DATE;case n.BOOLEAN:return r.BOOLEAN;case n.ENTITY:return r.OBJECT}}getProps(t){switch(t.paramType){case n.DECIMAL:return t.precision?{precision:Number(t.precision)}:void 0;case n.ENTITY:return{ENTITYNAME:t.entityName};case n.OPTIONS:return{options:this.prepareOptions(t.options)};default:return}}buildFields(){let t=[];this._params.forEach(((e,s)=>{const i=!!e.name;let r=i?e.name:`param_${s}`;t.push({name:r,label:e.label,dataType:this.getDataType(e.paramType),userInterface:this.getUserInterface(e.paramType),readOnly:!1,required:"B"!=e.paramType&&"true"===e.required,properties:this.getProps(e)}),this._params[s].name=r,this._params[s].isGeneratedName=!i})),this._metadata={name:"params",label:"params",fields:t}}fillFields(){this._params.forEach((t=>{"true"==t.saveLast&&this.dataUnit.setFieldValue(t.name,t.value)}))}prepareOptions(t){return t.split(";").map((function(t,e){let s,i;if(t.indexOf("=")>-1){let e=t.split("=");s=e[0],i=e[1]}else s=(e+1).toString(),i=t;return{value:s,label:i}}))}componentWillLoad(){this._application=a.getContextValue("__SNK__APPLICATION__"),this._params=[...this.action.actionConfig.params.promptParam],this.dataUnit.metadataLoader=this.metadataLoader.bind(this),this.dataUnit.loadMetadata().then((()=>{this.fillFields()})),this.dataUnit.addRecord()}async metadataLoader(){return new Promise((t=>{this.buildFields(),t(this._metadata)}))}handleModalAction(t){switch(t){case this.APPLY:this.handleApply();break;case this.CANCEL:case this.CLOSE:this.exitPopup()}}render(){return e("ez-popup",{size:"medium",heightMode:"auto",useHeader:!1,ref:t=>this._ezPopup=t},e("ez-modal-container",{modalTitle:this._application.messagesBuilder.getMessage("snkActionsButton.form.fillParams",void 0),okButtonLabel:this._application.messagesBuilder.getMessage("snkActionsButton.buttons.apply",void 0),cancelButtonLabel:this._application.messagesBuilder.getMessage("snkActionsButton.buttons.cancel",void 0),onEzModalAction:t=>this.handleModalAction(t.detail)},e("div",{class:"ez-margin-vertical--medium"},e("ez-form",{ref:t=>this._ezForm=t,dataUnit:this.dataUnit}))))}};export{o as snk_actions_form}
1
+ import{r as t,h as e}from"./p-82bb3eda.js";import{DataUnit as s,UserInterface as i,DataType as r,ApplicationContext as a}from"@sankhyalabs/core";import{P as n}from"./p-eaad0aa8.js";const o=class{constructor(e){t(this,e),this.APPLY="OK",this.CANCEL="CANCEL",this.CLOSE="CLOSE",this.action=void 0,this.applyParameters=void 0,this.dataUnit=new s}async openPopup(){this._ezPopup.opened=!0}exitPopup(){this._ezPopup.opened=!1}async handleApply(){try{await this._ezForm.validate();let t=this.dataUnit.getSelectedRecord();t&&(this._params.forEach(((e,s)=>{if(t.hasOwnProperty(e.name)){if(e.paramType==n.ENTITY){let s=t[e.name];return s?void(e.value="object"==typeof s?s.value:s):void(e.value=null)}this._params[s].value=t[e.name]}else this._params[s].value=void 0})),this.action.actionConfig.params.promptParam=this._params),this.exitPopup(),this.applyParameters(this.action)}catch(t){}}searchLoader(t,e){return this._application.executePreparedSearch(t.mode,t.argument,{entity:e.entityName,entityDescription:e.label})}getUserInterface(t){switch(t){case n.TEXT:return i.SHORTTEXT;case n.INTEGER:return i.INTEGERNUMBER;case n.DECIMAL:return i.DECIMALNUMBER;case n.DATE:return i.DATE;case n.DATETIME:return i.DATETIME;case n.BOOLEAN:return i.CHECKBOX;case n.ENTITY:return i.SEARCH;case n.OPTIONS:return i.OPTIONSELECTOR}}getDataType(t){switch(t){case n.TEXT:case n.OPTIONS:return r.TEXT;case n.INTEGER:case n.DECIMAL:return r.NUMBER;case n.DATE:case n.DATETIME:return r.DATE;case n.BOOLEAN:return r.BOOLEAN;case n.ENTITY:return r.OBJECT}}getProps(t){switch(t.paramType){case n.DECIMAL:return t.precision?{precision:Number(t.precision)}:void 0;case n.ENTITY:return{ENTITYNAME:t.entityName};case n.OPTIONS:return{options:this.prepareOptions(t.options)};default:return}}buildFields(){let t=[];this._params.forEach(((e,s)=>{const i=!!e.name;let r=i?e.name:`param_${s}`;t.push({name:r,label:e.label,dataType:this.getDataType(e.paramType),userInterface:this.getUserInterface(e.paramType),readOnly:!1,required:"B"!=e.paramType&&"true"===e.required,properties:this.getProps(e)}),this._params[s].name=r,this._params[s].isGeneratedName=!i})),this._metadata={name:"params",label:"params",fields:t}}fillFields(){this._params.forEach((t=>{"true"==t.saveLast&&this.dataUnit.setFieldValue(t.name,t.value)}))}prepareOptions(t){return t.split(";").map((function(t,e){let s,i;if(t.indexOf("=")>-1){let e=t.split("=");s=e[0],i=e[1]}else s=(e+1).toString(),i=t;return{value:s,label:i}}))}componentWillLoad(){this._application=a.getContextValue("__SNK__APPLICATION__"),this._params=[...this.action.actionConfig.params.promptParam],this.dataUnit.metadataLoader=this.metadataLoader.bind(this),this.dataUnit.loadMetadata().then((()=>{this.fillFields()})),this.dataUnit.addRecord()}async metadataLoader(){return new Promise((t=>{this.buildFields(),t(this._metadata)}))}handleModalAction(t){switch(t){case this.APPLY:this.handleApply();break;case this.CANCEL:case this.CLOSE:this.exitPopup()}}render(){return e("ez-popup",{size:"medium",heightMode:"auto",useHeader:!1,ref:t=>this._ezPopup=t},e("ez-modal-container",{modalTitle:this._application.messagesBuilder.getMessage("snkActionsButton.form.fillParams",void 0),okButtonLabel:this._application.messagesBuilder.getMessage("snkActionsButton.buttons.apply",void 0),cancelButtonLabel:this._application.messagesBuilder.getMessage("snkActionsButton.buttons.cancel",void 0),onEzModalAction:t=>this.handleModalAction(t.detail)},e("div",{class:"ez-margin-vertical--medium"},e("ez-form",{ref:t=>this._ezForm=t,dataUnit:this.dataUnit}))))}};export{o as snk_actions_form}
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-d8d8169b.js";export{s as setNonce}from"./p-d8d8169b.js";(()=>{const a=import.meta.url,i={};return""!==a&&(i.resourcesUrl=new URL(".",a).href),e(i)})().then((e=>a(JSON.parse('[["p-7345782c",[[2,"snk-actions-form",{"action":[16],"applyParameters":[16],"dataUnit":[32],"openPopup":[64]}]]],["p-180716b2",[[2,"snk-client-confirm",{"titleMessage":[1,"title-message"],"message":[1],"accept":[16],"cancel":[16],"openPopup":[64]}]]],["p-667cab42",[[6,"snk-custom-slot-elements",{"slotName":[1,"slot-name"]}]]],["p-987cd79d",[[6,"snk-custom-slot-guide",{"slotName":[1,"slot-name"]},[[8,"snkShowGuide","onGuideChange"],[8,"formConfigVisibilityChanged","onFormConfigVisibilityChange"]]]]],["p-825098c1",[[2,"snk-entity-list",{"config":[1040],"rightListSlotBuilder":[1040],"maxHeightList":[1,"max-height-list"],"value":[1040],"errorMessage":[1537,"error-message"],"_ezListSource":[32],"reloadList":[64]}]]],["p-96d45943",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"resetValues":[64],"clearValue":[64],"setFocus":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-7f7fe6c4",[[0,"snk-filter-checkbox-list",{"config":[1040],"errorMessage":[1537,"error-message"],"optionsList":[32],"setFocus":[64],"clearValue":[64]}]]],["p-e258de96",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-99a11017",[[0,"snk-filter-number",{"config":[16],"getMessage":[16],"value":[1026],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"show":[64],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-e679c75a",[[0,"snk-filter-period",{"config":[16],"getMessage":[16],"value":[1040],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64],"show":[64]}]]],["p-cb4343c4",[[0,"snk-filter-search",{"config":[16],"value":[16],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-a9b16874",[[0,"snk-filter-text",{"config":[16],"value":[1],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-162bddae",[[2,"snk-personalized-filter-editor",{"messagesBuilder":[1040],"presentationMode":[2,"presentation-mode"],"config":[16],"value":[1040],"items":[32],"show":[64]}]]],["p-3d41f5a8",[[2,"snk-print-selector",{"_printServerActive":[32],"_selectedPrinter":[32],"_remotePrintersDataSource":[32],"_localPrintersDataSource":[32],"_printJobData":[32],"openPrintSelector":[64]}]]],["p-2d133b6e",[[6,"snk-simple-crud",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"dataState":[1040],"dataUnit":[16],"entityName":[1,"entity-name"],"mode":[2],"gridConfig":[1040],"formConfig":[1040],"enableContinuousInsert":[1028,"enable-continuous-insert"],"multipleSelection":[4,"multiple-selection"],"useCancelConfirm":[4,"use-cancel-confirm"],"pageSize":[2,"page-size"],"resourceID":[1,"resource-i-d"],"enableGridInsert":[4,"enable-grid-insert"],"paginationCounterMode":[1,"pagination-counter-mode"],"taskbarManager":[16],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"actionsList":[16],"configName":[1025,"config-name"],"showConfiguratorButtons":[4,"show-configurator-buttons"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"autoFocus":[4,"auto-focus"],"domainMessagesBuilder":[1,"domain-messages-builder"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"layoutFormConfig":[4,"layout-form-config"],"autoLoad":[4,"auto-load"],"outlineMode":[4,"outline-mode"],"_container":[32],"_showPopUpGridConfig":[32],"_currentViewMode":[32],"_config":[32],"_fieldToGetFocus":[32],"_customContainerId":[32],"_formFields":[32],"_fieldsProps":[32],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFieldProp":[64],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64],"openConfigurator":[64],"closeConfigurator":[64],"updateConfig":[64]},[[0,"actionClick","actionClickListener"]]]]],["p-04bbdf6f",[[2,"pesquisa-grid",{"metadata":[16],"dataSource":[16],"pkField":[1,"pk-field"],"descriptionField":[1,"description-field"],"entityName":[1,"entity-name"],"shouldLoadConfig":[4,"should-load-config"],"_gridConfig":[32],"_inMemoryLoader":[32],"_dataunit":[32]}],[2,"pesquisa-tree",{"treeLoader":[16],"argument":[1025],"allowsNonAnalytic":[4,"allows-non-analytic"],"shouldLoadTree":[4,"should-load-tree"],"messagesBuilder":[1040],"items":[32],"applyFilter":[64]}]]],["p-fa8c2485",[[2,"snk-pesquisa",{"searchLoader":[16],"treeLoader":[16],"selectItem":[16],"entityName":[1,"entity-name"],"argument":[1025],"isHierarchyEntity":[4,"is-hierarchy-entity"],"allowsNonAnalytic":[4,"allows-non-analytic"],"_itemList":[32],"_startLoading":[32],"_presentationMode":[32],"_currentView":[32],"_valideDataSource":[32],"executeSearch":[64]}]]],["p-8ce94b62",[[2,"snk-application",{"enableLockManagerLoadingApp":[4,"enable-lock-manager-loading-app"],"messagesBuilder":[1040],"configName":[1,"config-name"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"loadByPK":[16],"_applicationReady":[32],"_templateSkeleton":[32],"_activeScrimWindow":[32],"getKeyboardManager":[64],"getLayoutFormConfig":[64],"isUserSup":[64],"addPendingAction":[64],"callServiceBroker":[64],"initOnboarding":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"showAlerts":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"isFeatureActive":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"addClientEvent":[64],"removeClientEvent":[64],"hasClientEvent":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadTotals":[64],"isLoadedByPk":[64],"preloadMangerRemoveRecord":[64],"executeSearch":[64],"executePreparedSearchPlus":[64],"executePreparedSearch":[64],"executePreparedSearchWithFullResponse":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64],"importScript":[64],"getApplicationPath":[64],"executeSelectDistinct":[64],"getDataFetcher":[64],"whenApplicationReady":[64],"setSearchFilterContext":[64],"clearPopUpTitle":[64],"setPopUpTitle":[64],"showScrimApp":[64],"markToReload":[64],"addLoadingLock":[64]}]]],["p-27482793",[[1,"teste-pesquisa"]]],["p-f35f2eb3",[[2,"field-item",{"fieldConfig":[8,"field-config"],"onLayoutConfig":[4,"on-layout-config"],"dataUnit":[16],"messagesBuilder":[1040],"fieldDescriptor":[32]}],[2,"field-config",{"dataUnit":[16],"fieldConfig":[1544,"field-config"],"fieldDescriptor":[16],"messagesBuilder":[1040],"fieldLabel":[32],"fieldLabelErrorMessage":[32],"fieldDefaultValue":[32],"fieldCleanOnCopy":[32],"fieldRequired":[32],"fieldReadOnly":[32],"_defaultType":[32],"show":[64]}]]],["p-f3027bc9",[[2,"fields-layout",{"selectedGuide":[16],"groupsList":[16],"guideNames":[16],"dataUnit":[16],"messagesBuilder":[1040],"isEditGuideNameActive":[32],"addFieldToLayout":[64]},[[16,"fieldConfigChanged","handleFieldConfigChanged"]]]]],["p-4c2e2767",[[2,"fields-selector",{"availableFields":[16],"dataUnit":[16],"messagesBuilder":[1040],"filterTerm":[32]}]]],["p-728959a6",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"messagesBuilder":[1040],"formLegacyConfigName":[1,"form-legacy-config-name"],"resourceID":[1,"resource-i-d"],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64],"addCustomEditor":[64],"setFieldProp":[64],"validate":[64]}],[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"messagesBuilder":[1040],"customGuidesConfig":[16],"availableFields":[32],"guidesList":[32],"groupsList":[32],"selectedGuide":[32],"_formConfig":[32],"configOptions":[32],"originalConfigSelected":[32],"configSelected":[32],"hasChanges":[32],"optionConfigChanged":[32]},[[16,"fieldConfigChanged","handleFieldConfigChanged"],[16,"formConfigOptionSelected","handleFormConfigOptionSelected"],[16,"addFieldToGuide","handleAddFieldToGuide"],[16,"setFieldAsAvailable","handleSetFieldAsAvailable"],[16,"removeFieldFromAvailable","handleRemoveFieldFromAvailable"]]]]],["p-2fdac5e6",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["p-b7e891cc",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"fieldSearch":[16],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"customEditors":[16],"fieldsProps":[16],"_singleColumn":[32],"showUp":[64],"addCustomEditor":[64],"setFieldProp":[64],"showSearchField":[64]}]]],["p-75af335e",[[2,"config-header",{"configOptions":[16],"selectedConfig":[16],"messagesBuilder":[1040],"hasChanges":[4,"has-changes"],"optionConfigChanged":[4,"option-config-changed"],"isEditingGuide":[32],"isEditingGroup":[32]},[[16,"isEditingGuideName","handleIsEditingGuideName"],[16,"isEditingGroupName","handleIsEditingGroupName"]]]]],["p-3b167a03",[[2,"guides-configurator",{"guidesList":[16],"selectedGuide":[16],"messagesBuilder":[1040],"mainGuide":[32],"filterTerm":[32],"visibleGuides":[32],"hiddenGuides":[32]}]]],["p-a5e0a780",[[2,"snk-personalized-filter",{"messagesBuilder":[1040],"entityUri":[1025,"entity-uri"],"filterId":[1025,"filter-id"],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"],"isDefaultFilter":[4,"is-default-filter"],"_filterAssistentMode":[32],"_filterAssistent":[32],"createPersonalizedFilter":[64]}]]],["p-c4fcf1fb",[[2,"snk-configurator",{"showActionButtons":[4,"show-action-buttons"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"viewMode":[2,"view-mode"],"customContainerId":[1,"custom-container-id"],"layoutFormConfig":[4,"layout-form-config"],"entityName":[1,"entity-name"],"disableNumberingConfig":[4,"disable-numbering-config"],"messagesBuilder":[1040],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["p-7e250432",[[2,"configs-button",{"configOptions":[16],"selectedConfig":[16],"hasChanges":[4,"has-changes"],"messagesBuilder":[1040]}]]],["p-6b9833c7",[[2,"snk-data-unit",{"dataState":[1040],"messagesBuilder":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"useCancelConfirm":[4,"use-cancel-confirm"],"ignoreSaveMessage":[4,"ignore-save-message"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"domainMessagesBuilder":[1,"domain-messages-builder"],"fieldsToLink":[32],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64],"getFieldsWithRmp":[64],"getFieldsWithRmPrecision":[64],"getRowMetadata":[64]},[[0,"snkMasterFormConfigChange","onMasterFormConfigChange"]]]]],["p-60dd1d27",[[2,"snk-default-filter",{"getMessage":[16],"hasDefaultFilter":[4,"has-default-filter"],"_opened":[32]}]]],["p-49ddc27a",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"showHardFixed":[4,"show-hard-fixed"],"removalBlocked":[4,"removal-blocked"],"setFocusField":[64],"clearValue":[64]}]]],["p-20349480",[[0,"snk-filter-modal-item",{"filterItem":[1040],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-91a9abb6",[[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16],"messagesBuilder":[1040]}]]],["p-9a63f3f7",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["p-bdd4f02c",[[2,"snk-data-exporter",{"provider":[16],"messagesBuilder":[1040],"_items":[32],"_showDropdown":[32]}]]],["p-5fd4f0f6",[[0,"snk-simple-form-config",{"dataUnit":[16],"configName":[1,"config-name"],"messagesBuilder":[16],"avaliableFields":[32],"selectedFields":[32],"show":[64]}],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"columns":[1040],"config":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"_collapsibleBoxListOrder":[32],"_collapsibleBoxListSelect":[32]}],[2,"snk-layout-form-config",{"messagesBuilder":[16],"layoutType":[32],"save":[64]}],[2,"snk-numbering-config",{"messagesBuilder":[16],"entityName":[1,"entity-name"],"resourceID":[1,"resource-i-d"],"autoNumbering":[32],"initialNumber":[32],"save":[64]}],[2,"snk-actions-button",{"_items":[32],"_showDropdown":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"],"preventAutoFocus":[4,"prevent-auto-focus"]}],[2,"snk-view-representation",{"mode":[8]}],[2,"taskbar-actions-button",{"title":[1],"enabled":[4],"actions":[16],"_showDropdown":[32],"showActions":[64],"hideActions":[64],"isOpened":[64]},[[8,"keydown","handleKeyDown"],[8,"ezOpenModal","handleClose"]]],[2,"taskbar-split-button",{"iconName":[1,"icon-name"],"action":[16],"name":[1],"className":[1,"class-name"],"dataElementId":[1,"data-element-id"],"title":[1],"enabled":[4],"actions":[16],"_showDropdown":[32]}]]],["p-c98c79c3",[[6,"snk-taskbar",{"alignRigth":[4,"align-rigth"],"customSlotId":[1,"custom-slot-id"],"additionalSlotId":[1,"additional-slot-id"],"customContainerId":[1,"custom-container-id"],"overflowStrategy":[1,"overflow-strategy"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"buttons":[1],"customButtons":[16],"actionsList":[16],"actionsSettingsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"messagesBuilder":[1040],"_permissions":[32],"_overFlowedElements":[32],"_customElements":[32],"_customElementsId":[32],"_slotContainer":[32],"_hiddenActionsList":[32],"_lastWidth":[32],"_hasToUpdateOverFlow":[32],"_isWaitingForSave":[32]},[[8,"snkCustomSlotElementsLoaded","handleCustomSlotElementsLoaded"],[8,"taskbarSaveLocker","handleTaskbarSaveLocker"],[8,"taskbarSaveUnlocker","handleTaskbarSaveUnlocker"]]]]],["p-471b34f4",[[2,"snk-filter-field-search",{"searchable":[4],"fieldsDataSource":[16],"breadcrumbItems":[32],"linkItems":[32],"fieldItems":[32],"searchEmpty":[32],"groupEmpty":[32],"show":[64],"applyFilter":[64]}],[0,"snk-filter-param-config",{"messagesBuilder":[1040],"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["p-c3dbf441",[[2,"snk-expression-group",{"parentTop":[1026,"parent-top"],"group":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityURI":[1025,"entity-u-r-i"],"isDefaultFilter":[4,"is-default-filter"],"_conditionOperator":[32],"_group":[32],"_selfTop":[32],"canAddExpression":[32],"_showDashes":[32],"getExpressionGroup":[64]},[[8,"ezExpressionLayoutChanged","todoCompletedHandler"]]],[2,"snk-expression-item",{"expression":[16],"canRemove":[516,"can-remove"],"messagesBuilder":[1040],"isDefaultFilter":[4,"is-default-filter"],"entityURI":[1025,"entity-u-r-i"],"_showValueVariable":[32],"_fieldSelected":[32],"_optionNotNull":[32]}]]],["p-21107f0d",[[2,"snk-filter-assistent-mode",{"filterAssistent":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityUri":[1025,"entity-uri"],"application":[1040],"isDefaultFilter":[4,"is-default-filter"]}],[2,"snk-filter-advanced-mode",{"filterAssistent":[1040],"application":[1040]}]]],["p-b47acee0",[[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"]]],[2,"snk-filter-bar",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"customFilterBarConfig":[16],"dataUnit":[1040],"title":[1],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"mode":[1],"filterConfig":[1040],"messagesBuilder":[1040],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"autoLoad":[4,"auto-load"],"afterApplyConfig":[16],"filterCustomConfig":[16],"filterCustomConfigInterceptor":[16],"allowDefault":[32],"scrollerLocked":[32],"showPersonalizedFilter":[32],"personalizedFilterId":[32],"isFilterModalOpen":[32],"reload":[64],"getFilterItem":[64],"updateFilterItem":[64],"addFilterItem":[64],"removeFilterItem":[64],"getFilters":[64],"showFilterModal":[64]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-modal",{"getMessage":[16],"configName":[1025,"config-name"],"filterConfig":[1040],"opened":[4],"applyFilters":[16],"closeModal":[16],"addPersonalizedFilter":[16],"editPersonalizedFilter":[16],"deletePersonalizedFilter":[16],"filtersToDelete":[1040],"filterDefaultToDelete":[1040],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"filterCustomConfigInterceptor":[16],"filtersWithError":[32]},[[0,"deleteFilter","deletePersonalizedFilterListener"]]],[2,"snk-filter-item",{"config":[1040],"getMessage":[16],"showChips":[4,"show-chips"],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[0,"filterChange","filterChangeListener"]]]]],["p-0814b16c",[[6,"snk-grid",{"columnFilterDataSource":[1040],"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"configName":[1,"config-name"],"filterBarTitle":[1,"filter-bar-title"],"resourceID":[1,"resource-i-d"],"selectionToastConfig":[16],"actionsList":[16],"isDetail":[4,"is-detail"],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"gridHeaderCustomSlotId":[1,"grid-header-custom-slot-id"],"gridHeaderDynamicSearchSlotId":[1,"grid-header-dynamic-search-slot-id"],"topTaskbarCustomSlotId":[1,"top-taskbar-custom-slot-id"],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"autoLoad":[4,"auto-load"],"autoFocus":[4,"auto-focus"],"enableGridInsert":[4,"enable-grid-insert"],"outlineMode":[4,"outline-mode"],"suppressHorizontalScroll":[4,"suppress-horizontal-scroll"],"strategyExporter":[1025,"strategy-exporter"],"useSearchColumn":[4,"use-search-column"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"paginationCounterMode":[1,"pagination-counter-mode"],"suppressCheckboxColumn":[4,"suppress-checkbox-column"],"suppressFilterColumn":[1028,"suppress-filter-column"],"compact":[4],"filterCustomConfig":[16],"filterCustomConfigInterceptor":[16],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"_showSnkFilterBar":[32],"_enableContinuousInsert":[32],"_filterMode":[32],"refreshColumnFilterDataSource":[64],"reloadConfig":[64],"showConfig":[64],"hideConfig":[64],"setConfig":[64],"reloadFilterBar":[64],"getFilterBar":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFocus":[64]},[[2,"click","handleClick"]]]]],["p-52c0cade",[[2,"snk-attach",{"gridLegacyConfigName":[1,"grid-legacy-config-name"],"fetcherType":[1025,"fetcher-type"],"fetcher":[16],"dataUnit":[16],"dataUnitBuilder":[16],"registerKey":[1,"register-key"],"entityName":[1,"entity-name"],"messagesBuilder":[1040],"_currentFetcher":[32],"_currentDataUnit":[32],"crudConfig":[32]}]]],["p-af3aface",[[6,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"resourceID":[1,"resource-i-d"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"messagesBuilder":[1040],"branchGuide":[1040],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"customEditors":[16],"customRenders":[16],"presentationMode":[1,"presentation-mode"],"_disabledButtons":[32],"_currentView":[32],"attachmentRegisterKey":[32],"_fieldToGetFocus":[32],"_hasToCreateFieldSearch":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64],"addCustomEditor":[64],"addGridCustomRender":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-7af6e6b8",[[6,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[1040],"taskbarManager":[16],"messagesBuilder":[1040],"canEdit":[4,"can-edit"],"presentationMode":[1,"presentation-mode"],"resourceID":[1,"resource-i-d"],"detailTaskbarCustomContainerId":[1,"detail-taskbar-custom-container-id"],"formLegacyConfigName":[1,"form-legacy-config-name"],"enableGridInsert":[4,"enable-grid-insert"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"getCustomTitle":[16],"customGuidesConfig":[16],"_hasToCreateFieldSearch":[32],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"_fieldToGetFocus":[32],"_customEditors":[32],"_customRenders":[32],"_fieldsProps":[32],"_mainForm":[32],"showFormConfig":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"setFieldProp":[64],"setFocus":[64],"reloadGuides":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-74389ec4",[[6,"snk-crud",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"configName":[1025,"config-name"],"filterBarTitle":[1,"filter-bar-title"],"selectionToastConfig":[16],"showActionButtons":[4,"show-action-buttons"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"autoLoad":[4,"auto-load"],"autoFocus":[4,"auto-focus"],"enableGridInsert":[4,"enable-grid-insert"],"domainMessagesBuilder":[1,"domain-messages-builder"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"setCustomFormTitle":[16],"strategyExporter":[1025,"strategy-exporter"],"layoutFormConfig":[4,"layout-form-config"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"paginationCounterMode":[1,"pagination-counter-mode"],"customGuidesConfig":[16],"showEntitySearch":[4,"show-entity-search"],"disableNumberingConfig":[4,"disable-numbering-config"],"_dataUnit":[32],"_dataState":[32],"attachmentRegisterKey":[32],"_currentViewMode":[32],"_canEdit":[32],"_resourceID":[32],"customContainerId":[32],"numberingConfig":[32],"_showMoreOnSearch":[32],"_entityPKField":[32],"goToView":[64],"openConfigurator":[64],"closeConfigurator":[64],"reloadFilterBar":[64],"getFilterBar":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFieldProp":[64],"getNumberingConfig":[64],"updateNumberingConfig":[64]}]]]]'),e)));
1
+ import{p as e,b as a}from"./p-82bb3eda.js";export{s as setNonce}from"./p-82bb3eda.js";(()=>{const a=import.meta.url,i={};return""!==a&&(i.resourcesUrl=new URL(".",a).href),e(i)})().then((e=>a(JSON.parse('[["p-fd1a5a61",[[2,"snk-actions-form",{"action":[16],"applyParameters":[16],"dataUnit":[32],"openPopup":[64]}]]],["p-3671cdd4",[[2,"snk-client-confirm",{"titleMessage":[1,"title-message"],"message":[1],"accept":[16],"cancel":[16],"openPopup":[64]}]]],["p-def17f0e",[[6,"snk-custom-slot-elements",{"slotName":[1,"slot-name"]}]]],["p-35a26068",[[6,"snk-custom-slot-guide",{"slotName":[1,"slot-name"]},[[8,"snkShowGuide","onGuideChange"],[8,"formConfigVisibilityChanged","onFormConfigVisibilityChange"]]]]],["p-56b1b397",[[2,"snk-entity-list",{"config":[1040],"rightListSlotBuilder":[1040],"maxHeightList":[1,"max-height-list"],"value":[1040],"errorMessage":[1537,"error-message"],"_ezListSource":[32],"reloadList":[64]}]]],["p-227e82b2",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"resetValues":[64],"clearValue":[64],"setFocus":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-c60d864f",[[0,"snk-filter-checkbox-list",{"config":[1040],"errorMessage":[1537,"error-message"],"optionsList":[32],"setFocus":[64],"clearValue":[64]}]]],["p-939523b3",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-301baf9c",[[0,"snk-filter-number",{"config":[16],"getMessage":[16],"value":[1026],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"show":[64],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-1dba30c9",[[0,"snk-filter-period",{"config":[16],"getMessage":[16],"value":[1040],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64],"show":[64]}]]],["p-8783d550",[[0,"snk-filter-search",{"config":[16],"value":[16],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-959fe522",[[0,"snk-filter-text",{"config":[16],"value":[1],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-522d36aa",[[2,"snk-personalized-filter-editor",{"messagesBuilder":[1040],"presentationMode":[2,"presentation-mode"],"config":[16],"value":[1040],"items":[32],"show":[64]}]]],["p-497ece60",[[2,"snk-print-selector",{"_printServerActive":[32],"_selectedPrinter":[32],"_remotePrintersDataSource":[32],"_localPrintersDataSource":[32],"_printJobData":[32],"openPrintSelector":[64]}]]],["p-98e3d0a1",[[6,"snk-simple-crud",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"dataState":[1040],"dataUnit":[16],"entityName":[1,"entity-name"],"mode":[2],"gridConfig":[1040],"formConfig":[1040],"enableContinuousInsert":[1028,"enable-continuous-insert"],"multipleSelection":[4,"multiple-selection"],"useCancelConfirm":[4,"use-cancel-confirm"],"pageSize":[2,"page-size"],"resourceID":[1,"resource-i-d"],"enableGridInsert":[4,"enable-grid-insert"],"paginationCounterMode":[1,"pagination-counter-mode"],"taskbarManager":[16],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"actionsList":[16],"configName":[1025,"config-name"],"showConfiguratorButtons":[4,"show-configurator-buttons"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"autoFocus":[4,"auto-focus"],"domainMessagesBuilder":[1,"domain-messages-builder"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"layoutFormConfig":[4,"layout-form-config"],"autoLoad":[4,"auto-load"],"outlineMode":[4,"outline-mode"],"_container":[32],"_showPopUpGridConfig":[32],"_currentViewMode":[32],"_config":[32],"_fieldToGetFocus":[32],"_customContainerId":[32],"_formFields":[32],"_fieldsProps":[32],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFieldProp":[64],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64],"openConfigurator":[64],"closeConfigurator":[64],"updateConfig":[64]},[[0,"actionClick","actionClickListener"]]]]],["p-c2bb0659",[[2,"pesquisa-grid",{"metadata":[16],"dataSource":[16],"pkField":[1,"pk-field"],"descriptionField":[1,"description-field"],"entityName":[1,"entity-name"],"shouldLoadConfig":[4,"should-load-config"],"_gridConfig":[32],"_inMemoryLoader":[32],"_dataunit":[32]}],[2,"pesquisa-tree",{"treeLoader":[16],"argument":[1025],"allowsNonAnalytic":[4,"allows-non-analytic"],"shouldLoadTree":[4,"should-load-tree"],"messagesBuilder":[1040],"items":[32],"applyFilter":[64]}]]],["p-0da30fd9",[[2,"snk-pesquisa",{"searchLoader":[16],"treeLoader":[16],"selectItem":[16],"entityName":[1,"entity-name"],"argument":[1025],"isHierarchyEntity":[4,"is-hierarchy-entity"],"allowsNonAnalytic":[4,"allows-non-analytic"],"_itemList":[32],"_startLoading":[32],"_presentationMode":[32],"_currentView":[32],"_valideDataSource":[32],"executeSearch":[64]}]]],["p-cb7c592f",[[2,"snk-application",{"enableLockManagerLoadingApp":[4,"enable-lock-manager-loading-app"],"messagesBuilder":[1040],"configName":[1,"config-name"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"loadByPK":[16],"_applicationReady":[32],"_templateSkeleton":[32],"_activeScrimWindow":[32],"getKeyboardManager":[64],"getLayoutFormConfig":[64],"isUserSup":[64],"addPendingAction":[64],"callServiceBroker":[64],"initOnboarding":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"showAlerts":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"isFeatureActive":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"addClientEvent":[64],"removeClientEvent":[64],"hasClientEvent":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadTotals":[64],"isLoadedByPk":[64],"preloadMangerRemoveRecord":[64],"executeSearch":[64],"executePreparedSearchPlus":[64],"executePreparedSearch":[64],"executePreparedSearchWithFullResponse":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64],"importScript":[64],"getApplicationPath":[64],"executeSelectDistinct":[64],"getDataFetcher":[64],"whenApplicationReady":[64],"setSearchFilterContext":[64],"clearPopUpTitle":[64],"setPopUpTitle":[64],"showScrimApp":[64],"markToReload":[64],"addLoadingLock":[64]}]]],["p-4575c4aa",[[1,"teste-pesquisa"]]],["p-17856827",[[2,"field-item",{"fieldConfig":[8,"field-config"],"onLayoutConfig":[4,"on-layout-config"],"dataUnit":[16],"messagesBuilder":[1040],"fieldDescriptor":[32]}],[2,"field-config",{"dataUnit":[16],"fieldConfig":[1544,"field-config"],"fieldDescriptor":[16],"messagesBuilder":[1040],"fieldLabel":[32],"fieldLabelErrorMessage":[32],"fieldDefaultValue":[32],"fieldCleanOnCopy":[32],"fieldRequired":[32],"fieldReadOnly":[32],"_defaultType":[32],"show":[64]}]]],["p-cc68a0c1",[[2,"fields-layout",{"selectedGuide":[16],"groupsList":[16],"guideNames":[16],"dataUnit":[16],"messagesBuilder":[1040],"isEditGuideNameActive":[32],"addFieldToLayout":[64]},[[16,"fieldConfigChanged","handleFieldConfigChanged"]]]]],["p-e47d6f17",[[2,"fields-selector",{"availableFields":[16],"dataUnit":[16],"messagesBuilder":[1040],"filterTerm":[32]}]]],["p-b5832fa0",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"messagesBuilder":[1040],"formLegacyConfigName":[1,"form-legacy-config-name"],"resourceID":[1,"resource-i-d"],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64],"addCustomEditor":[64],"setFieldProp":[64],"validate":[64]}],[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"messagesBuilder":[1040],"customGuidesConfig":[16],"availableFields":[32],"guidesList":[32],"groupsList":[32],"selectedGuide":[32],"_formConfig":[32],"configOptions":[32],"originalConfigSelected":[32],"configSelected":[32],"hasChanges":[32],"optionConfigChanged":[32]},[[16,"fieldConfigChanged","handleFieldConfigChanged"],[16,"formConfigOptionSelected","handleFormConfigOptionSelected"],[16,"addFieldToGuide","handleAddFieldToGuide"],[16,"setFieldAsAvailable","handleSetFieldAsAvailable"],[16,"removeFieldFromAvailable","handleRemoveFieldFromAvailable"]]]]],["p-abfc9880",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["p-7961c550",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"fieldSearch":[16],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"customEditors":[16],"fieldsProps":[16],"_singleColumn":[32],"showUp":[64],"addCustomEditor":[64],"setFieldProp":[64],"showSearchField":[64]}]]],["p-82b59a45",[[2,"config-header",{"configOptions":[16],"selectedConfig":[16],"messagesBuilder":[1040],"hasChanges":[4,"has-changes"],"optionConfigChanged":[4,"option-config-changed"],"isEditingGuide":[32],"isEditingGroup":[32]},[[16,"isEditingGuideName","handleIsEditingGuideName"],[16,"isEditingGroupName","handleIsEditingGroupName"]]]]],["p-516411de",[[2,"guides-configurator",{"guidesList":[16],"selectedGuide":[16],"messagesBuilder":[1040],"mainGuide":[32],"filterTerm":[32],"visibleGuides":[32],"hiddenGuides":[32]}]]],["p-7375bf6a",[[2,"snk-personalized-filter",{"messagesBuilder":[1040],"entityUri":[1025,"entity-uri"],"filterId":[1025,"filter-id"],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"],"isDefaultFilter":[4,"is-default-filter"],"_filterAssistentMode":[32],"_filterAssistent":[32],"createPersonalizedFilter":[64]}]]],["p-cfa4c183",[[2,"snk-configurator",{"showActionButtons":[4,"show-action-buttons"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"viewMode":[2,"view-mode"],"customContainerId":[1,"custom-container-id"],"layoutFormConfig":[4,"layout-form-config"],"entityName":[1,"entity-name"],"disableNumberingConfig":[4,"disable-numbering-config"],"messagesBuilder":[1040],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["p-98c70173",[[2,"configs-button",{"configOptions":[16],"selectedConfig":[16],"hasChanges":[4,"has-changes"],"messagesBuilder":[1040]}]]],["p-02cb4829",[[2,"snk-data-unit",{"dataState":[1040],"messagesBuilder":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"useCancelConfirm":[4,"use-cancel-confirm"],"ignoreSaveMessage":[4,"ignore-save-message"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"domainMessagesBuilder":[1,"domain-messages-builder"],"fieldsToLink":[32],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64],"getFieldsWithRmp":[64],"getFieldsWithRmPrecision":[64],"getRowMetadata":[64]},[[0,"snkMasterFormConfigChange","onMasterFormConfigChange"]]]]],["p-67137d7c",[[2,"snk-default-filter",{"getMessage":[16],"hasDefaultFilter":[4,"has-default-filter"],"_opened":[32]}]]],["p-670b8802",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"showHardFixed":[4,"show-hard-fixed"],"removalBlocked":[4,"removal-blocked"],"setFocusField":[64],"clearValue":[64]}]]],["p-d5d7fe52",[[0,"snk-filter-modal-item",{"filterItem":[1040],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-613eb22e",[[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16],"messagesBuilder":[1040]}]]],["p-8d84d6ab",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["p-4e9e570c",[[2,"snk-data-exporter",{"provider":[16],"messagesBuilder":[1040],"_items":[32],"_showDropdown":[32]}]]],["p-4deb7f46",[[0,"snk-simple-form-config",{"dataUnit":[16],"configName":[1,"config-name"],"messagesBuilder":[16],"avaliableFields":[32],"selectedFields":[32],"show":[64]}],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"columns":[1040],"config":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"_collapsibleBoxListOrder":[32],"_collapsibleBoxListSelect":[32]}],[2,"snk-layout-form-config",{"messagesBuilder":[16],"layoutType":[32],"save":[64]}],[2,"snk-numbering-config",{"messagesBuilder":[16],"entityName":[1,"entity-name"],"resourceID":[1,"resource-i-d"],"autoNumbering":[32],"initialNumber":[32],"save":[64]}],[2,"snk-actions-button",{"_items":[32],"_showDropdown":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"],"preventAutoFocus":[4,"prevent-auto-focus"]}],[2,"snk-view-representation",{"mode":[8]}],[2,"taskbar-actions-button",{"title":[1],"enabled":[4],"actions":[16],"_showDropdown":[32],"showActions":[64],"hideActions":[64],"isOpened":[64]},[[8,"keydown","handleKeyDown"],[8,"ezOpenModal","handleClose"]]],[2,"taskbar-split-button",{"iconName":[1,"icon-name"],"action":[16],"name":[1],"className":[1,"class-name"],"dataElementId":[1,"data-element-id"],"title":[1],"enabled":[4],"actions":[16],"_showDropdown":[32]}]]],["p-5c9bea92",[[6,"snk-taskbar",{"alignRigth":[4,"align-rigth"],"customSlotId":[1,"custom-slot-id"],"additionalSlotId":[1,"additional-slot-id"],"customContainerId":[1,"custom-container-id"],"overflowStrategy":[1,"overflow-strategy"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"buttons":[1],"customButtons":[16],"actionsList":[16],"actionsSettingsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"messagesBuilder":[1040],"_permissions":[32],"_overFlowedElements":[32],"_customElements":[32],"_customElementsId":[32],"_slotContainer":[32],"_hiddenActionsList":[32],"_lastWidth":[32],"_hasToUpdateOverFlow":[32],"_isWaitingForSave":[32]},[[8,"snkCustomSlotElementsLoaded","handleCustomSlotElementsLoaded"],[8,"taskbarSaveLocker","handleTaskbarSaveLocker"],[8,"taskbarSaveUnlocker","handleTaskbarSaveUnlocker"]]]]],["p-8d76a0ca",[[2,"snk-filter-field-search",{"searchable":[4],"fieldsDataSource":[16],"breadcrumbItems":[32],"linkItems":[32],"fieldItems":[32],"searchEmpty":[32],"groupEmpty":[32],"show":[64],"applyFilter":[64]}],[0,"snk-filter-param-config",{"messagesBuilder":[1040],"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["p-ce207f2a",[[2,"snk-expression-group",{"parentTop":[1026,"parent-top"],"group":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityURI":[1025,"entity-u-r-i"],"isDefaultFilter":[4,"is-default-filter"],"_conditionOperator":[32],"_group":[32],"_selfTop":[32],"canAddExpression":[32],"_showDashes":[32],"getExpressionGroup":[64]},[[8,"ezExpressionLayoutChanged","todoCompletedHandler"]]],[2,"snk-expression-item",{"expression":[16],"canRemove":[516,"can-remove"],"messagesBuilder":[1040],"isDefaultFilter":[4,"is-default-filter"],"entityURI":[1025,"entity-u-r-i"],"_showValueVariable":[32],"_fieldSelected":[32],"_optionNotNull":[32]}]]],["p-1e469905",[[2,"snk-filter-assistent-mode",{"filterAssistent":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityUri":[1025,"entity-uri"],"application":[1040],"isDefaultFilter":[4,"is-default-filter"]}],[2,"snk-filter-advanced-mode",{"filterAssistent":[1040],"application":[1040]}]]],["p-dd89bc02",[[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"]]],[2,"snk-filter-bar",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"customFilterBarConfig":[16],"dataUnit":[1040],"title":[1],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"mode":[1],"filterConfig":[1040],"messagesBuilder":[1040],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"autoLoad":[4,"auto-load"],"afterApplyConfig":[16],"filterCustomConfig":[16],"filterCustomConfigInterceptor":[16],"allowDefault":[32],"scrollerLocked":[32],"showPersonalizedFilter":[32],"personalizedFilterId":[32],"isFilterModalOpen":[32],"reload":[64],"getFilterItem":[64],"updateFilterItem":[64],"addFilterItem":[64],"removeFilterItem":[64],"getFilters":[64],"showFilterModal":[64]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-modal",{"getMessage":[16],"configName":[1025,"config-name"],"filterConfig":[1040],"opened":[4],"applyFilters":[16],"closeModal":[16],"addPersonalizedFilter":[16],"editPersonalizedFilter":[16],"deletePersonalizedFilter":[16],"filtersToDelete":[1040],"filterDefaultToDelete":[1040],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"filterCustomConfigInterceptor":[16],"filtersWithError":[32]},[[0,"deleteFilter","deletePersonalizedFilterListener"]]],[2,"snk-filter-item",{"config":[1040],"getMessage":[16],"showChips":[4,"show-chips"],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[0,"filterChange","filterChangeListener"]]]]],["p-e41c86b2",[[6,"snk-grid",{"columnFilterDataSource":[1040],"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"configName":[1,"config-name"],"filterBarTitle":[1,"filter-bar-title"],"resourceID":[1,"resource-i-d"],"selectionToastConfig":[16],"actionsList":[16],"isDetail":[4,"is-detail"],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"gridHeaderCustomSlotId":[1,"grid-header-custom-slot-id"],"gridHeaderDynamicSearchSlotId":[1,"grid-header-dynamic-search-slot-id"],"topTaskbarCustomSlotId":[1,"top-taskbar-custom-slot-id"],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"autoLoad":[4,"auto-load"],"autoFocus":[4,"auto-focus"],"enableGridInsert":[4,"enable-grid-insert"],"outlineMode":[4,"outline-mode"],"suppressHorizontalScroll":[4,"suppress-horizontal-scroll"],"strategyExporter":[1025,"strategy-exporter"],"useSearchColumn":[4,"use-search-column"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"paginationCounterMode":[1,"pagination-counter-mode"],"suppressCheckboxColumn":[4,"suppress-checkbox-column"],"suppressFilterColumn":[1028,"suppress-filter-column"],"compact":[4],"filterCustomConfig":[16],"filterCustomConfigInterceptor":[16],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"_showSnkFilterBar":[32],"_enableContinuousInsert":[32],"_filterMode":[32],"refreshColumnFilterDataSource":[64],"reloadConfig":[64],"showConfig":[64],"hideConfig":[64],"setConfig":[64],"reloadFilterBar":[64],"getFilterBar":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFocus":[64]},[[2,"click","handleClick"]]]]],["p-357e10e0",[[2,"snk-attach",{"gridLegacyConfigName":[1,"grid-legacy-config-name"],"fetcherType":[1025,"fetcher-type"],"fetcher":[16],"dataUnit":[16],"dataUnitBuilder":[16],"registerKey":[1,"register-key"],"entityName":[1,"entity-name"],"messagesBuilder":[1040],"_currentFetcher":[32],"_currentDataUnit":[32],"crudConfig":[32]}]]],["p-0893a694",[[6,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"resourceID":[1,"resource-i-d"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"messagesBuilder":[1040],"branchGuide":[1040],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"customEditors":[16],"customRenders":[16],"presentationMode":[1,"presentation-mode"],"_disabledButtons":[32],"_currentView":[32],"attachmentRegisterKey":[32],"_fieldToGetFocus":[32],"_hasToCreateFieldSearch":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64],"addCustomEditor":[64],"addGridCustomRender":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-2624dfd2",[[6,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[1040],"taskbarManager":[16],"messagesBuilder":[1040],"canEdit":[4,"can-edit"],"presentationMode":[1,"presentation-mode"],"resourceID":[1,"resource-i-d"],"detailTaskbarCustomContainerId":[1,"detail-taskbar-custom-container-id"],"formLegacyConfigName":[1,"form-legacy-config-name"],"enableGridInsert":[4,"enable-grid-insert"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"getCustomTitle":[16],"customGuidesConfig":[16],"_hasToCreateFieldSearch":[32],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"_fieldToGetFocus":[32],"_customEditors":[32],"_customRenders":[32],"_fieldsProps":[32],"_mainForm":[32],"showFormConfig":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"setFieldProp":[64],"setFocus":[64],"reloadGuides":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-8488fa7e",[[6,"snk-crud",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"configName":[1025,"config-name"],"filterBarTitle":[1,"filter-bar-title"],"selectionToastConfig":[16],"showActionButtons":[4,"show-action-buttons"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"autoLoad":[4,"auto-load"],"autoFocus":[4,"auto-focus"],"enableGridInsert":[4,"enable-grid-insert"],"domainMessagesBuilder":[1,"domain-messages-builder"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"setCustomFormTitle":[16],"strategyExporter":[1025,"strategy-exporter"],"layoutFormConfig":[4,"layout-form-config"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"paginationCounterMode":[1,"pagination-counter-mode"],"customGuidesConfig":[16],"showEntitySearch":[4,"show-entity-search"],"disableNumberingConfig":[4,"disable-numbering-config"],"_dataUnit":[32],"_dataState":[32],"attachmentRegisterKey":[32],"_currentViewMode":[32],"_canEdit":[32],"_resourceID":[32],"customContainerId":[32],"numberingConfig":[32],"_showMoreOnSearch":[32],"_entityPKField":[32],"goToView":[64],"openConfigurator":[64],"closeConfigurator":[64],"reloadFilterBar":[64],"getFilterBar":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFieldProp":[64],"getNumberingConfig":[64],"updateNumberingConfig":[64]}]]]]'),e)));
@@ -332,6 +332,7 @@ export declare class SnkGrid {
332
332
  private interceptMetadataLoaded;
333
333
  private interceptLoadData;
334
334
  private dataUnitInterceptor;
335
+ private initializeColumnFilterDataSource;
335
336
  private finishLoading;
336
337
  private setCustomRenders;
337
338
  private setCustomEditors;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/sankhyablocks",
3
- "version": "10.1.0-dev.14",
3
+ "version": "10.1.0-dev.15",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as s,F as e,g as r}from"./p-d8d8169b.js";import{KeyboardManager as a,Action as n,ElementIDUtils as o,ApplicationContext as h,StringUtils as d}from"@sankhyalabs/core";import{SelectionMode as l}from"@sankhyalabs/core/dist/dataunit/DataUnit";import{buildFieldSearch as c}from"@sankhyalabs/ezui/dist/collection/utils";import"./p-6768f176.js";import"./p-48a5c311.js";import{C as u,S as g,a as m,R as k,b as v,c as p}from"./p-3f68a254.js";import{P as f,E as T}from"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-9e4555ab.js";import"./p-ff1990ad.js";import"./p-7ee6b1bf.js";import"./p-9019a32f.js";import{C as b}from"./p-1f310bc6.js";import{s as C}from"./p-55798617.js";import{g as E}from"./p-7dd49d15.js";import{v as R}from"./p-76e66fd9.js";import{T as _}from"./p-b987e15d.js";import{T as O}from"./p-1a0caadb.js";import"./p-8d884fab.js";import"./p-8f3f2306.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";class I extends u{getFilters(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getAppliedFilters()}getOrders(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getSort()}getResourceURI(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.name}getSelectedNumber(){return this.dataUnit.getSelectionInfo().length}getTotalRecords(){var i,t,s;const{total:e}=(null===(i=this.dataUnit)||void 0===i?void 0:i.getPaginationInfo())||{};return null!=e?e:null===(s=null===(t=this.dataUnit)||void 0===t?void 0:t.records)||void 0===s?void 0:s.length}getSelectedIDs(){return E(this.dataUnit)}getOffset(){return this.getExporterOffset(this.getPaginationInfo())}getPageSize(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.pageSize}getExportLimit(){return 5e3}getRecordID(){var i,t,s;return null===(s=null===(t=null===(i=this.dataUnit)||void 0===i?void 0:i.records)||void 0===t?void 0:t[0])||void 0===s?void 0:s.__record__id__}getPaginationInfo(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getPaginationInfo()}getExporterOffset(i){if(null==i)return;const t=i.firstRecord;return t>0?t-1:t}}const S=class{constructor(s){i(this,s),this.actionClick=t(this,"actionClick",7),this.gridDoubleClick=t(this,"gridDoubleClick",7),this.componentReady=t(this,"componentReady",7),this._customEditors=new Map,this._customRenders=new Map,this._keyboardManager=new a,this._topTaskbarProcessor=new O({"snkGridTopTaskbar.regular":["FORM_MODE","CONFIGURATOR","INSERT"],"snkGridTopTaskbar.regular.secondary":["FORM_MODE","CONFIGURATOR","INSERT"],"snkGridTopTaskbar.regular.singleTaskbar":[],"snkGridTopTaskbar.finish_edition":["CANCEL","SAVE",this.handleAddFormMode()],"snkGridTopTaskbar.finish_edition.secondary":[],"snkGridTopTaskbar.finish_edition.singleTaskbar":[]}),this._headerTaskbarProcessor=new O({"snkGridHeaderTaskbar.unselected":["REFRESH","DATA_EXPORTER","ACTIONS_BUTTON","MORE_OPTIONS"],"snkGridHeaderTaskbar.selected":this.getGridHeaderSelectedBtns(),"snkGridHeaderTaskbar.detail.unselected":["REFRESH","MORE_OPTIONS"],"snkGridHeaderTaskbar.detail.selected":["UPDATE","ATTACH","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","REFRESH"],"snkGridHeaderTaskbar.singleTaskbar.unselected":["INSERT","FORM_MODE","CONFIGURATOR","REFRESH","DATA_EXPORTER","ACTIONS_BUTTON","MORE_OPTIONS"],"snkGridHeaderTaskbar.singleTaskbar.selected":["UPDATE","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","ATTACH","FORM_MODE","CONFIGURATOR","REFRESH","DATA_EXPORTER","ACTIONS_BUTTON"],"snkGridHeaderTaskbar.singleTaskbar.detail.unselected":["INSERT","FORM_MODE","CONFIGURATOR","REFRESH","MORE_OPTIONS"],"snkGridHeaderTaskbar.singleTaskbar.detail.selected":["UPDATE","ATTACH","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","FORM_MODE","CONFIGURATOR","REFRESH"],"snkGridHeaderTaskbar.singleTaskbar.finish_edition":["CANCEL","SAVE",this.handleAddFormMode()]}),this.dataUnitInterceptor={interceptAction:async i=>i.type===n.METADATA_LOADED?await this.interceptMetadataLoaded(i):i.type===n.LOADING_DATA?await this.interceptLoadData(i):i},this._dataUnit=void 0,this._dataState=void 0,this._gridConfig=void 0,this._popUpGridConfig=!1,this._showSnkFilterBar=!0,this._enableContinuousInsert=!1,this._filterMode="regular",this.columnFilterDataSource=new g,this.enableLockManagerLoadingComp=!1,this.enableLockManagerTaskbarClick=!1,this.configName=void 0,this.filterBarTitle=void 0,this.resourceID=void 0,this.selectionToastConfig=void 0,this.actionsList=void 0,this.isDetail=void 0,this.taskbarManager=void 0,this.statusResolver=void 0,this.multipleSelection=void 0,this.presentationMode=f.PRIMARY,this.messagesBuilder=void 0,this.useEnterLikeTab=!1,this.recordsValidator=void 0,this.canEdit=!0,this.taskbarCustomContainerId=void 0,this.gridHeaderCustomSlotId="GRID_HEADER_CUSTOM_ELEMENTS",this.gridHeaderDynamicSearchSlotId="GRID_HEADER_DYNAMIC_SEARCH",this.topTaskbarCustomSlotId="GRID_TASKBAR_CUSTOM_ELEMENTS",this.disablePersonalizedFilter=void 0,this.gridLegacyConfigName=void 0,this.filterBarLegacyConfigName=void 0,this.autoLoad=void 0,this.autoFocus=!0,this.enableGridInsert=!1,this.outlineMode=!1,this.suppressHorizontalScroll=!1,this.strategyExporter=T.SERVER_SIDE,this.useSearchColumn=!0,this.multipleEditionEnabled=!0,this.paginationCounterMode="auto",this.suppressCheckboxColumn=void 0,this.suppressFilterColumn=!1,this.compact=void 0,this.filterCustomConfig=void 0,this.filterCustomConfigInterceptor=void 0}getGridHeaderSelectedBtns(){const i=[_.UPDATE,_.CLONE,_.REMOVE,_.MORE_OPTIONS,_.DIVIDER,_.ATTACH,_.FORM_MODE,_.CONFIGURATOR,_.REFRESH,_.DATA_EXPORTER,_.ACTIONS_BUTTON];return this.multipleEditionEnabled&&i.unshift(_.UPDATE_MULTIPLE),i}async refreshColumnFilterDataSource(){await this._grid.refreshColumnFilterDataSource()}reloadConfig(){this.loadConfig()}async showConfig(){null!=this._grid&&this.openGridConfig()}async hideConfig(){null!=this._grid&&this.closeGridConfig()}async setConfig(i){this.setGridConfig(i)}async reloadFilterBar(){var i;null===(i=this._snkFilterBar)||void 0===i||i.reload()}async getFilterBar(){return this._snkFilterBar}async addCustomEditor(i,t,s){if(this._grid)return void this._grid.addCustomEditor(i,t,s);const e=new Map(this._customEditors);e.set(i,{customEditor:t,detailContext:s}),this._customEditors=e}async addGridCustomRender(i,t,s){if(this._grid)return void this._grid.addGridCustomRender(i,t,s);const e=new Map(this._customRenders);e.set(i,{customRender:t,detailContext:s}),this._customRenders=e}async addCustomValueFormatter(i,t){this._grid.addCustomValueFormatter(i,t)}async removeCustomValueFormatter(i){this._grid.removeCustomValueFormatter(i)}async setFocus(){this._grid.setFocus()}async handleClick(i){var t;if(this.hasToBlockEvent(i)){if(i.preventDefault(),i.stopPropagation(),!await this._dataUnit.cancelEdition())return;const s=new i.constructor(i.type,i);null===(t=i.target)||void 0===t||t.dispatchEvent(s)}this._grid&&!this._grid.contains(i.target)&&this._grid.stopEdit()}hasToBlockEvent(i){var t;return(null===(t=this._snkFilterBar)||void 0===t?void 0:t.contains(i.target))&&this.enableGridInsert&&this._dataUnit.hasNewRecord()}async handleGridLegacyConfigName(i,t){i&&i!==t&&(this.addGridLegacyConfigName(),this.loadConfig())}handleAddFormMode(){return this.enableGridInsert?_.FORM_MODE:""}openGridConfig(){this._grid.getColumnsState().then((i=>{this._snkGridConfig.columns=i.filter((i=>i.name)),this._popUpGridConfig=!0}))}closeGridConfig(){this._popUpGridConfig=!1}setGridConfig(i){this._gridConfig=i,m.assertDefaultSorting(this._gridConfig,this._dataUnit)}fixColumNameCharset(i){try{return decodeURIComponent(escape(i))}catch(t){return i}}normalizeGridConfig(i){if(!i)return i;const t=i.columns.map((i=>Object.assign(Object.assign({},i),{name:this.fixColumNameCharset(i.name)})));return Object.assign(Object.assign({},i),{columns:t})}loadConfig(){b.loadGridConfig(this.configName,this.resourceID).then((i=>{this.setGridConfig(this.normalizeGridConfig(i))})).catch((i=>{console.warn(i)}))}addGridLegacyConfigName(){this.gridLegacyConfigName&&this.configName&&b.addGridLegacyConfig(this.configName,this.gridLegacyConfigName)}hasCalculatedFields(i){let t=!1;return i.forEach((i=>{var s;"true"===(null===(s=this._dataUnit.getField(i).properties)||void 0===s?void 0:s.calculated)&&(t=!0)})),t}gridConfigChangeHandler(i){const t=this.normalizeGridConfig(i.detail);b.saveGridConfig(t,this.configName,this.resourceID),i.stopPropagation()}modalConfigChangeHandler(i){const t=this.normalizeGridConfig(i.detail);this._grid.setColumnsState(t.columns).then((()=>{this.setGridConfig(t),this.closeGridConfig(),this.dataExporterProviderStore()})),i.stopPropagation()}async hasToForceClientSideExporter(){if(!this._grid)return!1;const i=(await this._grid.getAppliedColumnFilters()).map((i=>i.name.replace("FILTRO_COLUNA_","")));return this.hasCalculatedFields(i)}async dataExporterProviderStore(){const i=await this.hasToForceClientSideExporter()||this.strategyExporter===T.CLIENT_SIDE?new p(this._dataUnit,this._grid):new I(this._dataUnit,this._grid);C.set("exporterProviders",Object.assign(Object.assign({},C.get("exporterProviders")),{[this.configName]:i}))}addElementID(){o.addIDInfo(this._element,null,{dataUnit:this._dataUnit})}loadGridCustomFormatters(i){i&&this._grid&&i.forEach((i=>{var t;(null===(t=i.properties)||void 0===t?void 0:t.rm_precision)&&this.addCustomValueFormatter(i.name,this._rmPrecisionCustomValueFormatter)}))}async interceptMetadataLoaded(i){return this.loadGridCustomFormatters(i.payload.fields),i}async interceptLoadData(i){var t;if(R(null===(t=this._snkFilterBar)||void 0===t?void 0:t.filterConfig))return i;{const i=this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.title",{}),t=this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.message",{});await this._application.error(i,t)}}finishLoading(){this._dataUnit.addInterceptor(this.dataUnitInterceptor),m.assertDefaultSorting(this._gridConfig,this._dataUnit),this.addElementID(),null!=this.columnFilterDataSource&&(this.columnFilterDataSource.setApplication(this._application),this.columnFilterDataSource.setDataUnit(this._dataUnit))}setCustomRenders(){if(this._grid)for(const[i,t]of this._customRenders)this._grid.addGridCustomRender(i,t.customRender,t.detailContext),this._customRenders.delete(i)}setCustomEditors(){if(this._grid)for(const[i,t]of this._customEditors)this._grid.addCustomEditor(i,t.customEditor,t.detailContext),this._customEditors.delete(i)}componentWillLoad(){this._application=h.getContextValue("__SNK__APPLICATION__");let i=this._element.parentElement;for(;i;){if("SNK-DATA-UNIT"===i.tagName.toUpperCase()){this._snkDataUnit=i,this._dataUnit=this._snkDataUnit.dataUnit,this._dataUnit?this.finishLoading():this._snkDataUnit.addEventListener("dataUnitReady",(i=>{this._dataUnit=i.detail,this.finishLoading()})),this.messagesBuilder||(this.messagesBuilder=this._snkDataUnit.messagesBuilder),this._snkDataUnit.addEventListener("dataStateChange",this.handleDataStateChange.bind(this)),this._snkDataUnit.addEventListener("cancelEdition",(()=>{var i;(null===(i=this._dataState)||void 0===i?void 0:i.recordsIsEmpty)&&this._dataUnit.clearSelection()}));break}i=i.parentElement}this._rmPrecisionCustomValueFormatter=new k,this.addGridLegacyConfigName(),this.loadConfig(),this._continuousInsertUtils=new v(this._application,this.resourceID,this.configName),this.enableGridInsert&&this._continuousInsertUtils.getConfig().then((i=>this._enableContinuousInsert=i))}componentDidRender(){var i,t;this._rmPrecisionCustomValueFormatter.setGrid(this._grid),this.loadGridCustomFormatters(null===(t=null===(i=this._dataUnit)||void 0===i?void 0:i.metadata)||void 0===t?void 0:t.fields),this.setCustomRenders(),this.setCustomEditors()}async handleDataStateChange(i){this._dataState=i.detail,this._rmPrecisionCustomValueFormatter.setDataState(this._dataState)}getHeaderDisabledButtons(){var i;const t=[];return(null===(i=this._dataState)||void 0===i?void 0:i.selectionInfo)&&(this._dataState.selectionInfo.length>1&&t.push(_.CLONE,_.ATTACH,_.UPDATE),this._dataState.selectionInfo.isAllRecords()&&t.push(_.REMOVE)),t}getInvisibleButtons(){var i,t;let s=[];return this._dataUnit&&0!==this._dataUnit.records.length||s.push(_.DATA_EXPORTER),(null===(i=this._dataState)||void 0===i?void 0:i.selectionInfo.mode)===l.ALL_RECORDS&&s.push(_.ACTIONS_BUTTON),1===(null===(t=this._dataState)||void 0===t?void 0:t.selectionInfo.length)&&s.push(_.UPDATE_MULTIPLE),s}componentWillRender(){const i=this.getInvisibleButtons();this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(),this.taskbarManager,this._dataState,this.getHeaderDisabledButtons(),i),this._topTaskbarProcessor.process(this.getTopTaskBarId(),this.taskbarManager,this._dataState,void 0,i),this.dataExporterProviderStore()}getHeaderTaskbarId(){var i,t;const s=this._dataState&&!!(null===(i=this._dataState.selectionInfo)||void 0===i?void 0:i.length),e={primary:this.isDetail?"snkGridHeaderTaskbar.detail":"snkGridHeaderTaskbar",secondary:this.isDetail?"snkGridHeaderTaskbar.detail":"snkGridHeaderTaskbar",singleTaskbar:this.isDetail?"snkGridHeaderTaskbar.singleTaskbar.detail":"snkGridHeaderTaskbar.singleTaskbar"}[this.presentationMode];let r=s?`${e}.selected`:`${e}.unselected`;return(null===(t=this._dataState)||void 0===t?void 0:t.isDirty)&&this.presentationMode===f.SINGLE_TASKBAR&&(r="snkGridHeaderTaskbar.singleTaskbar.finish_edition"),r}getTopTaskBarId(){var i;const t={primary:"",secondary:".secondary",singleTaskbar:".singleTaskbar"}[this.presentationMode];return(null===(i=this._dataState)||void 0===i?void 0:i.isDirty)?`snkGridTopTaskbar.finish_edition${t}`:`snkGridTopTaskbar.regular${t}`}getPrimaryButton(){return{primary:"INSERT",secondary:"",singleTaskbar:"INSERT"}[this.presentationMode]}getColumnSearch(i){return null!=this._columnSearch||(this._columnSearch=c(i,(({argument:i})=>new Promise((t=>{this._grid.filterColumns(i).then((i=>{t(i.filter((i=>!i.hidden)).map((i=>({label:i.label,value:i.name}))))}))}))),(i=>{null!=i&&this._grid.locateColumn(i.value)}))),this._columnSearch}getActionsList(){const i=[];if(this.enableGridInsert&&i.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert,(()=>{this._enableContinuousInsert=!this._enableContinuousInsert,this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert)}))),this.isGridInsertActive())return i;if(null!=this.taskbarManager&&null!=this.taskbarManager.getMoreOptions){const t=this.getTopTaskBarId();return i.concat(this.taskbarManager.getMoreOptions(t,this.configName,this._dataState,this.actionsList))}return i.concat(this.actionsList)}getActionsSettingsList(){return[{value:d.generateUUID(),label:this.messagesBuilder.getMessage("snkGrid.findColumn",{}),disableCloseOnSelect:!0,eagerInitialize:!0,itemBuilder:(i,t)=>this.getColumnSearch(t)}]}handleFilterConfigUpdated(i){if(i.length)return 1===i.length&&"PERSONALIZED_FILTER_GROUP"===i[0].id?(this._showSnkFilterBar=!0,void(this._filterMode=i[0].groupedItems.length>0?"regular":"button")):void(this._showSnkFilterBar=!0);this._showSnkFilterBar=!1}getGridHeaderButtons(){return this.isGridInsertActive()?_.MORE_OPTIONS:this._headerTaskbarProcessor.buttons}isGridInsertActive(){return this.enableGridInsert&&this._dataUnit.hasNewRecord()}render(){if(this._dataUnit)return s("div",{class:"snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline",tabindex:"0"},s("div",{class:"snk-grid__header ez-margin-bottom--extra-small"},this._showSnkFilterBar&&s(e,null,s("snk-filter-bar",{ref:i=>this._snkFilterBar=i,title:this.filterBarTitle,dataUnit:this._dataUnit,"data-element-id":"gridFilter",class:"snk-grid__filter-bar ez-align--top",configName:this.configName,messagesBuilder:this.messagesBuilder,resourceID:this.resourceID,onConfigUpdated:i=>this.handleFilterConfigUpdated(i.detail),disablePersonalizedFilter:this.disablePersonalizedFilter,filterBarLegacyConfigName:this.filterBarLegacyConfigName,autoLoad:this.autoLoad,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,filterCustomConfig:this.filterCustomConfig,filterCustomConfigInterceptor:this.filterCustomConfigInterceptor,mode:this._filterMode}),s("hr",{class:"ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider"})),s("snk-taskbar",{class:"ez-padding-left--medium ez-padding-top--extra-small","data-element-id":"grid_top",key:"topTaskbar",configName:this.configName,dataUnit:this._dataUnit,messagesBuilder:this.messagesBuilder,buttons:this._topTaskbarProcessor.buttons,disabledButtons:this._topTaskbarProcessor.disabledButtons,customButtons:this._topTaskbarProcessor.customButtons,primaryButton:this.getPrimaryButton(),resourceID:this.resourceID,customContainerId:this.taskbarCustomContainerId,customSlotId:this.topTaskbarCustomSlotId,overflowStrategy:"none",actionsSettingsList:this.getActionsSettingsList()},s("slot",{name:this.topTaskbarCustomSlotId}))),s("ez-grid",{ref:i=>this._grid=i,class:(this.presentationMode===f.SECONDARY?"snk-grid-container__without-shadow ":"")+"snk-grid__table","data-element-id":"embedded",dataUnit:this._dataUnit,key:"grid-"+this._snkDataUnit.entityName,config:this._gridConfig,onConfigChange:i=>{this.gridConfigChangeHandler(i)},onEzColumnFilterChanged:async()=>await this.dataExporterProviderStore(),onEzDoubleClick:i=>this.gridDoubleClick.emit(i.detail),statusResolver:this.statusResolver,multipleSelection:this.multipleSelection,columnfilterDataSource:this.columnFilterDataSource,selectionToastConfig:this.selectionToastConfig,useEnterLikeTab:this.useEnterLikeTab,recordsValidator:this.recordsValidator,canEdit:this.canEdit,autoFocus:this.autoFocus,enableGridInsert:this.enableGridInsert,enableContinuousInsert:this._enableContinuousInsert,enableLockManagerTaskbarClick:this.enableLockManagerTaskbarClick,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,outlineMode:this.outlineMode,useSearchColumn:this.useSearchColumn,suppressHorizontalScroll:this.suppressHorizontalScroll,paginationCounterMode:this.paginationCounterMode,suppressCheckboxColumn:this.suppressCheckboxColumn,suppressFilterColumn:this.suppressFilterColumn,compact:this.compact},s("snk-taskbar",{id:"teste",dataUnit:this._dataUnit,configName:this.configName,messagesBuilder:this.messagesBuilder,"data-element-id":"grid_left",buttons:this.getGridHeaderButtons(),presentationMode:this.presentationMode,disabledButtons:this._headerTaskbarProcessor.disabledButtons,customButtons:this._headerTaskbarProcessor.customButtons,slot:"leftButtons",actionsList:this.getActionsList(),primaryButton:this.getPrimaryButton(),resourceID:this.resourceID,customContainerId:this.taskbarCustomContainerId,customSlotId:this.gridHeaderCustomSlotId,additionalSlotId:this.gridHeaderDynamicSearchSlotId,actionsSettingsList:this.getActionsSettingsList()},s("slot",{name:this.gridHeaderCustomSlotId}),s("slot",{name:this.gridHeaderDynamicSearchSlotId}))),s("div",{class:"ez-col ez-col--sd-12 snk-grid-container__footer"},s("slot",{name:"SnkGridFooter"})),s("ez-popup",{size:"medium",heightMode:"auto",useHeader:!1,opened:this._popUpGridConfig,onEzClosePopup:()=>this.closeGridConfig()},s("snk-grid-config",{ref:i=>this._snkGridConfig=i,config:this._gridConfig,"data-element-id":this._element.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME),selectedIndex:0,configName:this.configName,onConfigChange:i=>this.modalConfigChangeHandler(i),onConfigCancel:()=>this.closeGridConfig(),resourceID:this.resourceID})))}get _element(){return r(this)}static get watchers(){return{gridLegacyConfigName:["handleGridLegacyConfigName"]}}};S.style=".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none;--snk-grid-header--min-height:40px}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__filter-bar.sc-snk-grid{width:100%;display:flex;align-items:flex-start}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium);margin-top:var(--space--small);align-self:stretch}.snk-grid__header.sc-snk-grid snk-taskbar.sc-snk-grid{display:flex;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";export{S as snk_grid}
@@ -1,2 +0,0 @@
1
- let e,t,n,l=!1,o=!1,s=!1,i=null,c=!1;const r="http://www.w3.org/1999/xlink",a={},f=e=>"object"==(e=typeof e)||"function"===e;function u(e){var t,n,l;return null!==(l=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const d=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,c=!1;const r=[],a=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!f(l))&&(l+=""),i&&c?r[r.length-1].t+=l:r.push(i?p(null,l):l),c=i)};if(a(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,r,m);const u=p(e,null);return u.l=t,r.length>0&&(u.o=r),u.i=o,u.u=s,u},p=(e,t)=>({p:0,$:e,t,m:null,o:null,l:null,i:null,u:null}),$={},m={forEach:(e,t)=>e.map(y).forEach(t),map:(e,t)=>e.map(y).map(t).map(h)},y=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.$,vtext:e.t}),h=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),d(e.vtag,t,...e.vchildren||[])}const t=p(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.i=e.vkey,t.u=e.vname,t},b=e=>re(e).h,v=(e,t,n)=>{const l=b(e);return{emit:e=>w(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},w=(e,t,n)=>{const l=be.ce(t,n);return e.dispatchEvent(l),l},k=new WeakMap,g=e=>"sc-"+e.v,S=(e,t,n,l,o,s)=>{if(n!==l){let i=ue(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=C(n),s=C(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const a=f(l);if((i||a&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let u=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,u=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(u?e.removeAttributeNS(r,t):e.removeAttribute(t)):(!i||4&s||o)&&!a&&(l=!0===l?"":l,u?e.setAttributeNS(r,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):ue(ye,c)?c.slice(2):c[2]+t.slice(3),n&&be.rel(e,t,n,!1),l&&be.ael(e,t,l,!1)}},j=/\s/,C=e=>e?e.split(j):[],M=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.l||a,i=t.l||a;for(l in s)l in i||S(o,l,s[l],void 0,n,t.p);for(l in i)S(o,l,s[l],i[l],n,t.p)},O=(o,i,c,r)=>{const a=i.o[c];let f,u,d,p=0;if(l||(s=!0,"slot"===a.$&&(e&&r.classList.add(e+"-s"),a.p|=a.o?2:1)),null!==a.t)f=a.m=he.createTextNode(a.t);else if(1&a.p)f=a.m=he.createTextNode("");else if(f=a.m=he.createElement(2&a.p?"slot-fb":a.$),M(null,a,!1),null!=e&&f["s-si"]!==e&&f.classList.add(f["s-si"]=e),a.o)for(p=0;p<a.o.length;++p)u=O(o,a,p,f),u&&f.appendChild(u);return f["s-hn"]=n,3&a.p&&(f["s-sr"]=!0,f["s-cr"]=t,f["s-sn"]=a.u||"",d=o&&o.o&&o.o[c],d&&d.$===a.$&&o.m&&R(o.m,!1)),f},R=(e,t)=>{be.p|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(E(o).insertBefore(o,W(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&R(o,t)}be.p&=-2},x=(e,t,l,o,s,i)=>{let c,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=O(null,l,s,e),c&&(o[s].m=c,r.insertBefore(c,W(t))))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,A(l),o=!0,s["s-ol"]?s["s-ol"].remove():R(s,!0),s.remove())},T=(e,t)=>e.$===t.$&&("slot"===e.$?e.u===t.u:e.i===t.i),W=e=>e&&e["s-ol"]||e,E=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,L=(e,t)=>{const n=t.m=e.m,l=e.o,o=t.o,s=t.t;let i;null===s?("slot"===t.$||M(e,t,!1),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,c=0,r=0,a=0,f=t.length-1,u=t[0],d=t[f],p=l.length-1,$=l[0],m=l[p];for(;i<=f&&c<=p;)if(null==u)u=t[++i];else if(null==d)d=t[--f];else if(null==$)$=l[++c];else if(null==m)m=l[--p];else if(T(u,$))L(u,$),u=t[++i],$=l[++c];else if(T(d,m))L(d,m),d=t[--f],m=l[--p];else if(T(u,m))"slot"!==u.$&&"slot"!==m.$||R(u.m.parentNode,!1),L(u,m),e.insertBefore(u.m,d.m.nextSibling),u=t[++i],m=l[--p];else if(T(d,$))"slot"!==u.$&&"slot"!==m.$||R(d.m.parentNode,!1),L(d,$),e.insertBefore(d.m,u.m),d=t[--f],$=l[++c];else{for(r=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].i&&t[a].i===$.i){r=a;break}r>=0?(s=t[r],s.$!==$.$?o=O(t&&t[c],n,r,e):(L(s,$),t[r]=void 0,o=s.m),$=l[++c]):(o=O(t&&t[c],n,c,e),$=l[++c]),o&&E(u.m).insertBefore(o,W(u.m))}i>f?x(e,null==l[p+1]?null:l[p+1].m,n,l,c,p):c>p&&P(t,i,f)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),x(n,null,t,o,0,o.length-1)):null!==l&&P(l,0,l.length-1)):(i=n["s-cr"])?i.parentNode.textContent=s:e.t!==s&&(n.data=s)},N=e=>{const t=e.childNodes;let n,l,o,s,i,c;for(l=0,o=t.length;l<o;l++)if(n=t[l],1===n.nodeType){if(n["s-sr"])for(i=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(c=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||""!==i){if(1===c&&i===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===c||3===c&&""!==t[s].textContent.trim()){n.hidden=!0;break}N(n)}},U=[],D=e=>{let t,n,l,s,i,c,r=0;const a=e.childNodes,f=a.length;for(;r<f;r++){if(t=a[r],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],c=l.length-1;c>=0;c--)n=l[c],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(F(n,s)?(i=U.find((e=>e.k===n)),o=!0,n["s-sn"]=n["s-sn"]||s,i?i.g=t:U.push({g:t,k:n}),n["s-sr"]&&U.map((e=>{F(e.k,n["s-sn"])&&(i=U.find((e=>e.k===n)),i&&!e.g&&(e.g=i.g))}))):U.some((e=>e.k===n))||U.push({k:n}));1===t.nodeType&&D(t)}},F=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,A=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(A)},H=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},q=(e,t)=>{if(e.p|=16,!(4&e.p))return H(e,e.j),Oe((()=>V(e,t)));e.p|=512},V=(e,t)=>{const n=e.C;let l;return t?(e.p|=256,e.M&&(e.M.map((([e,t])=>K(n,e,t))),e.M=null),l=K(n,"componentWillLoad")):l=K(n,"componentWillUpdate"),l=Q(l,(()=>K(n,"componentWillRender"))),Q(l,(()=>_(e,n,t)))},_=async(e,t,n)=>{const l=e.h,o=l["s-rc"];n&&(e=>{const t=e.O,n=e.h,l=t.p,o=((e,t)=>{var n;let l=g(t);const o=me.get(l);if(e=11===e.nodeType?e:he,o)if("string"==typeof o){let t,s=k.get(e=e.head||e);if(s||k.set(e,s=new Set),!s.has(l)){{t=he.createElement("style"),t.innerHTML=o;const l=null!==(n=be.R)&&void 0!==n?n:u(he);null!=l&&t.setAttribute("nonce",l),e.insertBefore(t,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"),2&l&&n.classList.add(o+"-s"))})(e);z(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>G(e);0===t.length?n():(Promise.all(t).then(n),e.p|=4,t.length=0)}},z=(c,r)=>{try{i=r,r=r.render(),c.p&=-17,c.p|=2,((i,c)=>{const r=i.h,a=i.O,f=i.P||p(null,null),u=(e=>e&&e.$===$)(c)?c:d(null,null,c);if(n=r.tagName,a.T&&(u.l=u.l||{},a.T.map((([e,t])=>u.l[t]=r[e]))),u.$=null,u.p|=4,i.P=u,u.m=f.m=r.shadowRoot||r,e=r["s-sc"],t=r["s-cr"],l=0!=(1&a.p),o=!1,L(f,u),be.p|=1,s){let e,t,n,l,o,s;D(u.m);let i=0;for(;i<U.length;i++)e=U[i],t=e.k,t["s-ol"]||(n=he.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<U.length;i++)if(e=U[i],t=e.k,e.g){for(l=e.g.parentNode,o=e.g.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&N(u.m),be.p&=-2,U.length=0})(c,r)}catch(e){de(e,c.h)}return i=null,null},B=()=>i,G=e=>{const t=e.h,n=e.C,l=e.j;K(n,"componentDidRender"),64&e.p?K(n,"componentDidUpdate"):(e.p|=64,X(t),K(n,"componentDidLoad"),e.W(t),l||J()),e.L(t),e.S&&(e.S(),e.S=void 0),512&e.p&&Me((()=>q(e,!1))),e.p&=-517},I=e=>{{const t=re(e),n=t.h.isConnected;return n&&2==(18&t.p)&&q(t,!1),n}},J=()=>{X(he.documentElement),Me((()=>w(ye,"appload",{detail:{namespace:"sankhyablocks"}})))},K=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){de(e)}},Q=(e,t)=>e&&e.then?e.then(t):t(),X=e=>e.classList.add("hydrated"),Y=(e,t,n)=>{if(t.N){e.watchers&&(t.U=e.watchers);const l=Object.entries(t.N),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>re(this).D.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=re(e),s=o.h,i=o.D.get(t),c=o.p,r=o.C;if(n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.N[t][0]),(!(8&c)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.D.set(t,n),r)){if(l.U&&128&c){const e=l.U[t];e&&e.map((e=>{try{r[e](n,i,t)}catch(e){de(e,s)}}))}if(2==(18&c)){if(r.componentShouldUpdate&&!1===r.componentShouldUpdate(n,i,t))return;q(o,!1)}}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=re(this);return n.F.then((()=>n.C[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){be.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.T.push([e,o]),o}))}}return e},Z=e=>{K(e,"connectedCallback")},ee=(e,t={})=>{var n;const l=[],o=t.exclude||[],s=ye.customElements,i=he.head,c=i.querySelector("meta[charset]"),r=he.createElement("style"),a=[];let f,d=!0;Object.assign(be,t),be.A=new URL(t.resourcesUrl||"./",he.baseURI).href,e.map((e=>{e[1].map((t=>{const n={p:t[0],v:t[1],N:t[2],H:t[3]};n.N=t[2],n.H=t[3],n.T=[],n.U={};const i=n.v,c=class extends HTMLElement{constructor(e){super(e),fe(e=this,n),1&n.p&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):be.jmp((()=>(e=>{if(0==(1&be.p)){const t=re(e),n=t.O,l=()=>{};if(1&t.p)ne(e,t,n.H),Z(t.C);else{t.p|=1,12&n.p&&(e=>{const t=e["s-cr"]=he.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){H(t,t.j=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.p)){{if(t.p|=32,(o=$e(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.U=o.watchers,Y(o,n,2),o.isProxied=!0);const e=()=>{};t.p|=8;try{new o(t)}catch(e){de(e)}t.p&=-9,t.p|=128,e(),Z(t.C)}if(o.style){let e=o.style;const t=g(n);if(!me.has(t)){const l=()=>{};((e,t,n)=>{let l=me.get(e);we&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,me.set(e,l)})(t,e,!!(1&n.p)),l()}}}const s=t.j,i=()=>q(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){be.jmp((()=>(()=>{if(0==(1&be.p)){const e=re(this),t=e.C;e.q&&(e.q.map((e=>e())),e.q=void 0),K(t,"disconnectedCallback")}})()))}componentOnReady(){return re(this).V}};n._=e[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,Y(c,n,1)))}))}));{r.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles","");const e=null!==(n=be.R)&&void 0!==n?n:u(he);null!=e&&r.setAttribute("nonce",e),i.insertBefore(r,c?c.nextSibling:i.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):be.jmp((()=>f=setTimeout(J,30)))},te=(e,t)=>t,ne=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=oe(e,n),i=le(t,o),c=se(n);be.ael(s,l,i,c),(t.q=t.q||[]).push((()=>be.rel(s,l,i,c)))}))},le=(e,t)=>n=>{try{256&e.p?e.C[t](n):(e.M=e.M||[]).push([t,n])}catch(e){de(e)}},oe=(e,t)=>8&t?ye:16&t?he.body:e,se=e=>0!=(2&e),ie=e=>be.R=e,ce=new WeakMap,re=e=>ce.get(e),ae=(e,t)=>ce.set(t.C=e,t),fe=(e,t)=>{const n={p:0,h:e,O:t,D:new Map};return n.F=new Promise((e=>n.L=e)),n.V=new Promise((e=>n.W=e)),e["s-p"]=[],e["s-rc"]=[],ne(e,n,t.H),ce.set(e,n)},ue=(e,t)=>t in e,de=(e,t)=>(0,console.error)(e,t),pe=new Map,$e=e=>{const t=e.v.replace(/-/g,"_"),n=e._,l=pe.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(pe.set(n,e),e[t])),de)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},me=new Map,ye="undefined"!=typeof window?window:{},he=ye.document||{head:{}},be={p:0,A:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},ve=e=>Promise.resolve(e),we=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),ke=[],ge=[],Se=(e,t)=>n=>{e.push(n),c||(c=!0,t&&4&be.p?Me(Ce):be.raf(Ce))},je=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){de(e)}e.length=0},Ce=()=>{je(ke),je(ge),(c=ke.length>0)&&be.raf(Ce)},Me=e=>ve().then(e),Oe=Se(ge,!0);export{te as F,$ as H,B as a,ee as b,v as c,I as f,b as g,d as h,ve as p,ae as r,ie as s}