@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-74246.2 → 0.0.0-bugfix-dev-KB-80932.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/dist/cjs/{ConfigStorage-9b965af9.js → ConfigStorage-d024aec8.js} +2 -2
  2. package/dist/cjs/{ContinuousInsertUtils-42636ac1.js → ContinuousInsertUtils-54d44192.js} +5 -5
  3. package/dist/cjs/{DataFetcher-e059eb72.js → DataFetcher-65879b2c.js} +188 -56
  4. package/dist/cjs/{SnkFormConfigManager-46e90d8d.js → SnkFormConfigManager-ae3185b2.js} +6 -8
  5. package/dist/cjs/{auth-fetcher-a78242d1.js → auth-fetcher-8480751c.js} +1 -1
  6. package/dist/cjs/{dataunit-fetcher-228016f4.js → dataunit-fetcher-8ea97d88.js} +2 -2
  7. package/dist/cjs/{form-config-fetcher-91fba2b1.js → form-config-fetcher-90126e4c.js} +1 -1
  8. package/dist/cjs/index-f9e81701.js +4 -0
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{pesquisa-fetcher-2ec4811b.js → pesquisa-fetcher-f3454c23.js} +176 -1
  11. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +133 -0
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/snk-actions-button_5.cjs.entry.js +12 -10
  14. package/dist/cjs/snk-application.cjs.entry.js +144 -21
  15. package/dist/cjs/snk-attach.cjs.entry.js +5 -5
  16. package/dist/cjs/snk-config-options_3.cjs.entry.js +4 -4
  17. package/dist/cjs/snk-crud.cjs.entry.js +8 -7
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +25 -12
  19. package/dist/cjs/{snk-data-unit-3d9b6ed4.js → snk-data-unit-72ef8777.js} +1 -1
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  22. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +24 -10
  23. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  24. package/dist/cjs/snk-grid.cjs.entry.js +9 -8
  25. package/dist/cjs/{snk-guides-viewer-7d85e2fb.js → snk-guides-viewer-ea5d0907.js} +5 -5
  26. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  27. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  28. package/dist/cjs/snk-pesquisa.cjs.entry.js +105 -31
  29. package/dist/cjs/snk-simple-crud.cjs.entry.js +15 -10
  30. package/dist/collection/collection-manifest.json +2 -0
  31. package/dist/collection/components/snk-actions-button/actions/index.js +4 -4
  32. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +4 -3
  33. package/dist/collection/components/snk-application/snk-application.css +34 -0
  34. package/dist/collection/components/snk-application/snk-application.js +197 -14
  35. package/dist/collection/components/snk-crud/snk-crud.js +39 -20
  36. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +8 -2
  37. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +11 -4
  38. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -1
  39. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
  40. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +40 -8
  41. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +4 -6
  42. package/dist/collection/components/snk-grid/snk-grid.js +39 -20
  43. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +10 -0
  44. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +190 -0
  45. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +25 -0
  46. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +179 -0
  47. package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +89 -0
  48. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +24 -5
  49. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +168 -32
  50. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +44 -21
  51. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +3 -1
  52. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +1 -1
  53. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +89 -3
  54. package/dist/components/ContinuousInsertUtils.js +2 -3
  55. package/dist/components/DataFetcher.js +188 -56
  56. package/dist/components/ISave.js +346 -1
  57. package/dist/components/SnkFormConfigManager.js +4 -6
  58. package/dist/components/dataunit-fetcher.js +1 -1
  59. package/dist/components/index.d.ts +2 -0
  60. package/dist/components/index.js +2 -0
  61. package/dist/components/pesquisa-grid.d.ts +11 -0
  62. package/dist/components/pesquisa-grid.js +6 -0
  63. package/dist/components/pesquisa-grid2.js +86 -0
  64. package/dist/components/pesquisa-tree.d.ts +11 -0
  65. package/dist/components/pesquisa-tree.js +6 -0
  66. package/dist/components/pesquisa-tree2.js +82 -0
  67. package/dist/components/snk-actions-button2.js +4 -5
  68. package/dist/components/snk-application2.js +159 -20
  69. package/dist/components/snk-attach2.js +0 -1
  70. package/dist/components/snk-crud.js +5 -4
  71. package/dist/components/snk-data-exporter2.js +21 -9
  72. package/dist/components/snk-detail-view2.js +0 -1
  73. package/dist/components/snk-filter-bar2.js +23 -8
  74. package/dist/components/snk-grid2.js +5 -4
  75. package/dist/components/snk-pesquisa2.js +118 -33
  76. package/dist/components/snk-simple-crud2.js +11 -6
  77. package/dist/components/snk-simple-form-config2.js +4 -3
  78. package/dist/components/teste-pesquisa.js +13 -1
  79. package/dist/esm/{ConfigStorage-ff99377a.js → ConfigStorage-373bb440.js} +2 -2
  80. package/dist/esm/{ContinuousInsertUtils-071e0b6a.js → ContinuousInsertUtils-25e7bd9a.js} +5 -5
  81. package/dist/esm/{DataFetcher-5034df59.js → DataFetcher-5221b992.js} +188 -56
  82. package/dist/esm/{SnkFormConfigManager-035f2975.js → SnkFormConfigManager-b65e6db0.js} +6 -8
  83. package/dist/esm/{auth-fetcher-0b78ca31.js → auth-fetcher-e32fe8a4.js} +1 -1
  84. package/dist/esm/{dataunit-fetcher-56cb648b.js → dataunit-fetcher-8dd93d8b.js} +2 -2
  85. package/dist/esm/{form-config-fetcher-0c2620ef.js → form-config-fetcher-126e2471.js} +1 -1
  86. package/dist/esm/index-a7d3d3f1.js +4 -0
  87. package/dist/esm/loader.js +1 -1
  88. package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-0af41f09.js} +177 -3
  89. package/dist/esm/pesquisa-grid_2.entry.js +128 -0
  90. package/dist/esm/sankhyablocks.js +1 -1
  91. package/dist/esm/snk-actions-button_5.entry.js +12 -10
  92. package/dist/esm/snk-application.entry.js +146 -23
  93. package/dist/esm/snk-attach.entry.js +5 -5
  94. package/dist/esm/snk-config-options_3.entry.js +4 -4
  95. package/dist/esm/snk-crud.entry.js +8 -7
  96. package/dist/esm/snk-data-exporter.entry.js +25 -12
  97. package/dist/esm/{snk-data-unit-9fa7d2b9.js → snk-data-unit-11a49fc3.js} +1 -1
  98. package/dist/esm/snk-data-unit.entry.js +3 -3
  99. package/dist/esm/snk-detail-view.entry.js +7 -7
  100. package/dist/esm/snk-filter-bar_4.entry.js +25 -11
  101. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  102. package/dist/esm/snk-grid.entry.js +9 -8
  103. package/dist/esm/{snk-guides-viewer-2fd50f6b.js → snk-guides-viewer-830f5fb9.js} +5 -5
  104. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  105. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  106. package/dist/esm/snk-pesquisa.entry.js +105 -31
  107. package/dist/esm/snk-simple-crud.entry.js +15 -10
  108. package/dist/sankhyablocks/p-05b6ff91.js +1 -0
  109. package/dist/sankhyablocks/p-09067bee.entry.js +1 -0
  110. package/dist/sankhyablocks/p-0cda2226.entry.js +11 -0
  111. package/dist/sankhyablocks/{p-acca8a69.js → p-1435701f.js} +1 -1
  112. package/dist/sankhyablocks/{p-4c5fde50.js → p-171b7623.js} +1 -1
  113. package/dist/sankhyablocks/{p-763edad2.js → p-19dc71e9.js} +1 -1
  114. package/dist/sankhyablocks/{p-0d2a2e9e.entry.js → p-1a91d1f3.entry.js} +1 -1
  115. package/dist/sankhyablocks/{p-e9432f45.entry.js → p-1cf39cfd.entry.js} +1 -1
  116. package/dist/sankhyablocks/{p-e7067256.entry.js → p-254c59d2.entry.js} +1 -1
  117. package/dist/sankhyablocks/p-422eb699.entry.js +1 -0
  118. package/dist/sankhyablocks/{p-c629c07a.entry.js → p-469384a2.entry.js} +1 -1
  119. package/dist/sankhyablocks/p-54f5354a.entry.js +1 -0
  120. package/dist/sankhyablocks/{p-342eeb3b.js → p-60e4db34.js} +1 -1
  121. package/dist/sankhyablocks/p-618a29ed.entry.js +1 -0
  122. package/dist/sankhyablocks/p-798386c7.js +6 -0
  123. package/dist/sankhyablocks/{p-35882caf.entry.js → p-82ee6dc3.entry.js} +1 -1
  124. package/dist/sankhyablocks/{p-c271fbf1.js → p-8a1ee5b5.js} +1 -1
  125. package/dist/sankhyablocks/p-8bd86610.entry.js +1 -0
  126. package/dist/sankhyablocks/p-b50a0753.entry.js +1 -0
  127. package/dist/sankhyablocks/p-d62228fb.js +1 -0
  128. package/dist/sankhyablocks/p-d92d4f91.entry.js +1 -0
  129. package/dist/sankhyablocks/{p-47d24ac8.js → p-ddefbbc7.js} +1 -1
  130. package/dist/sankhyablocks/p-e5430b29.entry.js +1 -0
  131. package/dist/sankhyablocks/p-f0b9303b.js +1 -0
  132. package/dist/sankhyablocks/p-f258690a.entry.js +1 -0
  133. package/dist/sankhyablocks/{p-5136d9f0.entry.js → p-f975370f.entry.js} +1 -1
  134. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  135. package/dist/types/components/snk-application/snk-application.d.ts +22 -4
  136. package/dist/types/components/snk-crud/snk-crud.d.ts +8 -4
  137. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +1 -0
  138. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
  139. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
  140. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +6 -1
  141. package/dist/types/components/snk-grid/snk-grid.d.ts +8 -4
  142. package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +38 -0
  143. package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +29 -0
  144. package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +19 -0
  145. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +35 -1
  146. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +8 -1
  147. package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +1 -0
  148. package/dist/types/components.d.ts +206 -23
  149. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +10 -1
  150. package/package.json +1 -1
  151. package/react/components.d.ts +2 -0
  152. package/react/components.js +2 -0
  153. package/react/components.js.map +1 -1
  154. package/dist/esm/pesquisa-fetcher-24e5bba0.js +0 -172
  155. package/dist/sankhyablocks/p-00278e07.js +0 -1
  156. package/dist/sankhyablocks/p-262583c6.entry.js +0 -1
  157. package/dist/sankhyablocks/p-29643bef.entry.js +0 -1
  158. package/dist/sankhyablocks/p-365d8ed4.entry.js +0 -1
  159. package/dist/sankhyablocks/p-399e1b74.entry.js +0 -1
  160. package/dist/sankhyablocks/p-65650e05.entry.js +0 -1
  161. package/dist/sankhyablocks/p-70ed0b0f.js +0 -1
  162. package/dist/sankhyablocks/p-82274cb0.js +0 -1
  163. package/dist/sankhyablocks/p-8cf0a9fe.entry.js +0 -1
  164. package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
  165. package/dist/sankhyablocks/p-e6683406.js +0 -6
  166. package/dist/sankhyablocks/p-eda55eef.entry.js +0 -11
  167. package/dist/sankhyablocks/p-ff6c8f52.entry.js +0 -1
@@ -1,7 +1,17 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { ObjectUtils, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
+ import { a as PesquisaFetcher, d as buildGridMetadata } from './ISave.js';
4
+ import './DataFetcher.js';
5
+ import '@sankhyalabs/ezui/dist/collection/utils/constants';
6
+ import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
7
+ import './dataunit-fetcher.js';
8
+ import './filter-item-type.enum.js';
9
+ import './form-config-fetcher.js';
10
+ import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
11
+ import { d as defineCustomElement$2 } from './pesquisa-grid2.js';
12
+ import { d as defineCustomElement$1 } from './pesquisa-tree2.js';
3
13
 
4
- const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--medium, 12px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records.sc-snk-pesquisa{font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);color:var(--snk-pesquisa__records--color);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";
14
+ const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--medium, 12px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records-label.sc-snk-pesquisa{display:flex;flex-direction:row;justify-content:space-between;font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__records.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color)}.snk-pesquisa__records-limit.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color-secondary)}.snk-pesquisa__records-limit.hidden.sc-snk-pesquisa,.snk-pesquisa__records.hidden.sc-snk-pesquisa{visibility:hidden}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";
5
15
 
6
16
  const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
17
  constructor() {
@@ -16,11 +26,18 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
16
26
  this._changeDeboucingTimeout = null;
17
27
  this._limitCharsToSearch = 3;
18
28
  this._deboucingTime = 450;
29
+ this._gridDataSource = [];
30
+ this.pesquisaFetcher = new PesquisaFetcher();
19
31
  this._itemList = undefined;
20
32
  this._startLoading = false;
33
+ this._presentationMode = "list";
21
34
  this.searchLoader = undefined;
35
+ this.treeLoader = undefined;
22
36
  this.selectItem = undefined;
37
+ this.entityName = undefined;
23
38
  this.argument = undefined;
39
+ this.isHierarchyEntity = false;
40
+ this.allowsNonAnalytic = false;
24
41
  }
25
42
  observeArgument() {
26
43
  if (this._textInput) {
@@ -58,36 +75,42 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
58
75
  this._startLoading = true;
59
76
  this.searchLoader(argument)
60
77
  .then((resp) => {
78
+ if (!resp)
79
+ return;
80
+ this.processSearchResponse(resp);
81
+ }).finally(() => {
61
82
  this._startLoading = false;
62
- if (resp) {
63
- resp = ObjectUtils.stringToObject(resp.json.$);
64
- let descriptionField = resp.descriptionField;
65
- let pkField = resp.pkField;
66
- if (pkField) {
67
- let newItemList = [];
68
- resp.data.forEach((item) => {
69
- var _a;
70
- let fieldsMetadata = this.filterFieldsMetadata(resp, item);
71
- let fields = this.buildFirstFields(item['__matchFields'], fieldsMetadata);
72
- let exibitionItem = {
73
- key: this.highlightValue(item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
74
- title: descriptionField ? this.highlightValue(item['__matchFields'], item[descriptionField], fields, true) : "",
75
- details: this.buildDetails(fields, item)
76
- };
77
- newItemList.push(exibitionItem);
78
- });
79
- this._itemList = newItemList;
80
- }
81
- }
82
- }).catch((error) => {
83
- this._startLoading = false;
84
- this._itemList = [];
85
- console.warn(error);
86
83
  });
87
84
  }
88
85
  }
86
+ processSearchResponse(resp) {
87
+ resp = ObjectUtils.stringToObject(resp.json.$);
88
+ let descriptionField = resp.descriptionField;
89
+ let pkField = resp.pkField;
90
+ if (!pkField)
91
+ return;
92
+ this._gridMetadata = buildGridMetadata(resp);
93
+ this._gridDataSource = [...resp.data];
94
+ this._pkField = pkField;
95
+ this._descriptionField = descriptionField;
96
+ this._itemList = this.buildCardItemList(resp, pkField, descriptionField);
97
+ }
98
+ buildCardItemList(resp, pkField, descriptionField) {
99
+ var _a;
100
+ let newItemList = (_a = resp.data) === null || _a === void 0 ? void 0 : _a.map((item) => {
101
+ var _a;
102
+ let fieldsMetadata = this.filterFieldsMetadata(resp, item);
103
+ let fields = this.buildFirstFields(item['__matchFields'], fieldsMetadata);
104
+ return {
105
+ key: this.highlightValue(item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
106
+ title: descriptionField ? this.highlightValue(item['__matchFields'], item[descriptionField], fields, true) : '',
107
+ details: this.buildDetails(fields, item),
108
+ };
109
+ });
110
+ return newItemList;
111
+ }
89
112
  filterFieldsMetadata(resp, item) {
90
- let fieldsMetadata = resp.fieldsMetadata.filter((field) => {
113
+ return resp.fieldsMetadata.filter((field) => {
91
114
  let accept = !StringUtils.isEmpty(item[field.fieldName]) &&
92
115
  field.visible !== false &&
93
116
  field.type !== 'B' &&
@@ -104,7 +127,6 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
104
127
  }
105
128
  return accept;
106
129
  });
107
- return fieldsMetadata;
108
130
  }
109
131
  removeAtIndex(array, index) {
110
132
  if (index >= 0 && index < array.length) {
@@ -262,6 +284,7 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
262
284
  this.selectItem(option);
263
285
  }
264
286
  onChangeValue(event) {
287
+ var _a;
265
288
  this.clearDeboucingTimeout();
266
289
  if (this._startLoading) {
267
290
  this._changeDeboucingTimeout = setTimeout(() => {
@@ -270,6 +293,10 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
270
293
  return;
271
294
  }
272
295
  this.argument = (event.detail || "").trim();
296
+ if (this.isHierarchyEntity && this._presentationMode === 'list') {
297
+ (_a = this._pesquisaTree) === null || _a === void 0 ? void 0 : _a.applyFilter();
298
+ return;
299
+ }
273
300
  const argumentNumber = this.getArgumentNumber();
274
301
  if (this.argument && (!isNaN(argumentNumber) || this.argument.length >= this._limitCharsToSearch)) {
275
302
  this._changeDeboucingTimeout = setTimeout(() => {
@@ -300,16 +327,59 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
300
327
  : 'Nenhum registro encontrado'
301
328
  : 'Os resultados de sua pesquisa aparecerão aqui...';
302
329
  }
303
- componentDidLoad() {
330
+ async componentWillLoad() {
331
+ const mode = await this.pesquisaFetcher.loadPresentationConfig(this.entityName);
332
+ this._presentationMode = mode === 'list' ? 'list' : 'table';
333
+ }
334
+ async componentDidLoad() {
304
335
  ElementIDUtils.addIDInfo(this._element);
305
336
  }
337
+ async onClickList() {
338
+ this._presentationMode = this._presentationMode === 'list' ? 'table' : 'list';
339
+ await this.pesquisaFetcher.savePresentationConfig(this.entityName, this._presentationMode);
340
+ }
341
+ enableListButton() {
342
+ var _a;
343
+ return ((_a = this._itemList) === null || _a === void 0 ? void 0 : _a.length) > 0;
344
+ }
345
+ //Os limites de exibição são diferentes para lista e grade
346
+ hideLimitMessage() {
347
+ if (!this._itemList)
348
+ return true;
349
+ if (this._presentationMode === "list") {
350
+ if (this.isHierarchyEntity)
351
+ return true;
352
+ return this._itemList.length <= 100;
353
+ }
354
+ return this._itemList.length <= 150;
355
+ }
356
+ hideRecordsMessage() {
357
+ return (this._presentationMode === "list" && this.isHierarchyEntity);
358
+ }
359
+ renderContent() {
360
+ if (!this._itemList)
361
+ return;
362
+ if (this._presentationMode === 'list') {
363
+ return this.isHierarchyEntity ? this.renderTree() : this.renderCards();
364
+ }
365
+ return this.renderPesquisaGrid();
366
+ }
367
+ renderTree() {
368
+ return h("ez-scroller", { direction: EzScrollDirection.VERTICAL }, h("pesquisa-tree", { ref: (element) => this._pesquisaTree = element, argument: this.argument, treeLoader: this.treeLoader, allowsNonAnalytic: this.allowsNonAnalytic, onPesquisaTreeSelectItem: ({ detail }) => this.selectItem(detail) }));
369
+ }
370
+ renderCards() {
371
+ return (h("ez-scroller", { direction: EzScrollDirection.VERTICAL }, h("div", { class: "snk-pesquisa__cards-container" }, this._itemList.map((item) => {
372
+ return (h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
373
+ }))));
374
+ }
375
+ renderPesquisaGrid() {
376
+ return h("pesquisa-grid", { metadata: this._gridMetadata, dataSource: this._gridDataSource, pkField: this._pkField, descriptionField: this._descriptionField, entityName: this.entityName, onPesquisaGridSelectItem: ({ detail }) => this.selectItem(detail) });
377
+ }
306
378
  render() {
307
379
  var _a;
308
380
  return (h(Host, null, h("div", { class: "snk-pesquisa" }, h("div", { class: "snk-pesquisa__input" }, h("ez-text-input", { label: "Buscar", class: "ez-margin-right--medium", canShowError: false, ref: (ref) => this._textInput = ref, onEzChange: (event) => this.onChangeValue(event), value: this.argument, "data-element-id": "searchInput" }, h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
309
381
  ? h("button", { slot: "rightIcon", class: "snk-pesquisa__btn", onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
310
- : undefined), h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() })), h("label", { class: "snk-pesquisa__records" }, this.getMessageView()), h("div", { class: "snk-pesquisa__content" }, this._itemList && this._itemList.map((item) => {
311
- return (h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
312
- })))));
382
+ : undefined), h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() }), h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this._presentationMode === 'list' ? 'table' : 'list', title: this._presentationMode === 'list' ? 'Modo grade' : 'Modo lista', onClick: async () => await this.onClickList(), enabled: this.enableListButton() })), h("div", { class: "snk-pesquisa__records-label" }, h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, "Essa pesquisa foi limitada, existem mais resultados.")), h("div", { class: "snk-pesquisa__content" }, this.renderContent()))));
313
383
  }
314
384
  get _element() { return this; }
315
385
  static get watchers() { return {
@@ -318,22 +388,37 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
318
388
  static get style() { return snkPesquisaCss; }
319
389
  }, [2, "snk-pesquisa", {
320
390
  "searchLoader": [16],
391
+ "treeLoader": [16],
321
392
  "selectItem": [16],
393
+ "entityName": [1, "entity-name"],
322
394
  "argument": [1025],
395
+ "isHierarchyEntity": [4, "is-hierarchy-entity"],
396
+ "allowsNonAnalytic": [4, "allows-non-analytic"],
323
397
  "_itemList": [32],
324
- "_startLoading": [32]
398
+ "_startLoading": [32],
399
+ "_presentationMode": [32]
325
400
  }]);
326
401
  function defineCustomElement() {
327
402
  if (typeof customElements === "undefined") {
328
403
  return;
329
404
  }
330
- const components = ["snk-pesquisa"];
405
+ const components = ["snk-pesquisa", "pesquisa-grid", "pesquisa-tree"];
331
406
  components.forEach(tagName => { switch (tagName) {
332
407
  case "snk-pesquisa":
333
408
  if (!customElements.get(tagName)) {
334
409
  customElements.define(tagName, SnkPesquisa);
335
410
  }
336
411
  break;
412
+ case "pesquisa-grid":
413
+ if (!customElements.get(tagName)) {
414
+ defineCustomElement$2();
415
+ }
416
+ break;
417
+ case "pesquisa-tree":
418
+ if (!customElements.get(tagName)) {
419
+ defineCustomElement$1();
420
+ }
421
+ break;
337
422
  } });
338
423
  }
339
424
 
@@ -4,9 +4,8 @@ import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
4
  import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants.js';
5
5
  import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
6
6
  import './DataFetcher.js';
7
- import './pesquisa-fetcher.js';
8
- import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, T as TaskbarProcessor, R as RmPrecisionCustomValueFormatter, c as ContinuousInsertUtils, b as buildFieldSearch, o as openFieldSearch, a as CrudUtils } from './ContinuousInsertUtils.js';
9
7
  import { D as DataExporterOption, P as PresentationMode } from './ISave.js';
8
+ import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, T as TaskbarProcessor, R as RmPrecisionCustomValueFormatter, c as ContinuousInsertUtils, b as buildFieldSearch, o as openFieldSearch, a as CrudUtils } from './ContinuousInsertUtils.js';
10
9
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
11
10
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
12
11
  import { I as InMemoryLoader } from './dataunit-fetcher.js';
@@ -113,13 +112,14 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
113
112
  this._config = undefined;
114
113
  this._fieldToGetFocus = undefined;
115
114
  this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
115
+ this.enableLockManagerLoadingComp = false;
116
+ this.enableLockManagerTaskbarClick = false;
116
117
  this.dataState = undefined;
117
118
  this.dataUnit = undefined;
118
119
  this.entityName = undefined;
119
120
  this.mode = SIMPLE_CRUD_MODE.SERVER;
120
121
  this.gridConfig = undefined;
121
122
  this.formConfig = undefined;
122
- this.enableLockManger = false;
123
123
  this._formFields = [];
124
124
  this._fieldsProps = new Map();
125
125
  this._enableContinuousInsert = true;
@@ -797,8 +797,12 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
797
797
  this.goToView(VIEW_MODE.FORM);
798
798
  }
799
799
  async initKeyboardManager() {
800
+ var _a;
800
801
  const keyboardManager = new KeyboardManager();
801
- const dataUnit = this.dataUnit || await this._snkDataUnit.getDataUnit();
802
+ const dataUnit = this.dataUnit || await ((_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
803
+ if (dataUnit == undefined) {
804
+ return;
805
+ }
802
806
  keyboardManager
803
807
  .bind("F7", () => dataUnit.saveData(), { description: "Salva os dados.", element: this._element })
804
808
  .bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro.", element: this._element })
@@ -827,7 +831,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
827
831
  }
828
832
  return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
829
833
  ? undefined
830
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
834
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
831
835
  }
832
836
  get _element() { return this; }
833
837
  static get watchers() { return {
@@ -840,13 +844,14 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
840
844
  }; }
841
845
  static get style() { return snkSimpleCrudCss; }
842
846
  }, [6, "snk-simple-crud", {
847
+ "enableLockManagerLoadingComp": [4, "enable-lock-manager-loading-comp"],
848
+ "enableLockManagerTaskbarClick": [4, "enable-lock-manager-taskbar-click"],
843
849
  "dataState": [16],
844
850
  "dataUnit": [16],
845
851
  "entityName": [1, "entity-name"],
846
852
  "mode": [2],
847
853
  "gridConfig": [1040],
848
854
  "formConfig": [1040],
849
- "enableLockManger": [4, "enable-lock-manger"],
850
855
  "multipleSelection": [4, "multiple-selection"],
851
856
  "useCancelConfirm": [4, "use-cancel-confirm"],
852
857
  "pageSize": [2, "page-size"],
@@ -1,8 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import './DataFetcher.js';
3
- import './pesquisa-fetcher.js';
4
- import '@sankhyalabs/core';
5
3
  import './ISave.js';
4
+ import '@sankhyalabs/core';
6
5
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
7
6
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
8
7
  import './dataunit-fetcher.js';
@@ -27,6 +26,8 @@ const SnkSimpleFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
27
26
  * Responsável por abrir o configurador.
28
27
  */
29
28
  async show() {
29
+ var _a;
30
+ await ((_a = this.ezDoubleListRef) === null || _a === void 0 ? void 0 : _a.resetSelectedLists());
30
31
  await this.initializeFormConfig();
31
32
  this.ezPopupRef.opened = true;
32
33
  }
@@ -92,7 +93,7 @@ const SnkSimpleFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
92
93
  this.snkConfigSaved.emit();
93
94
  }
94
95
  render() {
95
- return (h("ez-popup", { ref: (ref) => this.ezPopupRef = ref, heightMode: 'auto', size: 'auto', ezTitle: 'Configurar formul\u00E1rio' }, h("div", { class: 'config-container' }, h("div", { class: 'config-lists' }, h("ez-double-list", { leftList: this.avaliableFields, leftTitle: 'Campos disponíveis', rightList: this.selectedFields, rightTitle: 'Campos selecionados', onEzRightListChanged: ({ detail }) => this.fieldsToSave = [...detail], entityLabel: 'campo', entityLabelPlural: 'campos' })), h("div", { class: 'config-actions' }, h("ez-button", { label: 'Restaurar', onClick: this.handleResetConfigs.bind(this), size: 'small' }), h("ez-button", { label: 'Cancelar', onClick: this.handleCancel.bind(this), size: 'small' }), h("ez-button", { label: 'Salvar', class: 'ez-button--primary', onClick: this.handleSave.bind(this), size: 'small' })))));
96
+ return (h("ez-popup", { ref: (ref) => this.ezPopupRef = ref, heightMode: 'auto', size: 'auto', ezTitle: 'Configurar formul\u00E1rio' }, h("div", { class: 'config-container' }, h("div", { class: 'config-lists' }, h("ez-double-list", { ref: (ref) => this.ezDoubleListRef = ref, leftList: this.avaliableFields, leftTitle: 'Campos disponíveis', rightList: this.selectedFields, rightTitle: 'Campos selecionados', onEzRightListChanged: ({ detail }) => this.fieldsToSave = [...detail], entityLabel: 'campo', entityLabelPlural: 'campos' })), h("div", { class: 'config-actions' }, h("ez-button", { label: 'Restaurar', onClick: this.handleResetConfigs.bind(this), size: 'small' }), h("ez-button", { label: 'Cancelar', onClick: this.handleCancel.bind(this), size: 'small' }), h("ez-button", { label: 'Salvar', class: 'ez-button--primary', onClick: this.handleSave.bind(this), size: 'small' })))));
96
97
  }
97
98
  static get style() { return snkSimpleFormConfigCss; }
98
99
  }, [0, "snk-simple-form-config", {
@@ -1,5 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
  import { DataUnit, DataType, UserInterface } from '@sankhyalabs/core';
3
+ import { d as defineCustomElement$5 } from './pesquisa-grid2.js';
4
+ import { d as defineCustomElement$4 } from './pesquisa-tree2.js';
3
5
  import { d as defineCustomElement$3 } from './snk-application2.js';
4
6
  import { d as defineCustomElement$2 } from './snk-pesquisa2.js';
5
7
 
@@ -37,13 +39,23 @@ function defineCustomElement$1() {
37
39
  if (typeof customElements === "undefined") {
38
40
  return;
39
41
  }
40
- const components = ["teste-pesquisa", "snk-application", "snk-pesquisa"];
42
+ const components = ["teste-pesquisa", "pesquisa-grid", "pesquisa-tree", "snk-application", "snk-pesquisa"];
41
43
  components.forEach(tagName => { switch (tagName) {
42
44
  case "teste-pesquisa":
43
45
  if (!customElements.get(tagName)) {
44
46
  customElements.define(tagName, TestePesquisa$1);
45
47
  }
46
48
  break;
49
+ case "pesquisa-grid":
50
+ if (!customElements.get(tagName)) {
51
+ defineCustomElement$5();
52
+ }
53
+ break;
54
+ case "pesquisa-tree":
55
+ if (!customElements.get(tagName)) {
56
+ defineCustomElement$4();
57
+ }
58
+ break;
47
59
  case "snk-application":
48
60
  if (!customElements.get(tagName)) {
49
61
  defineCustomElement$3();
@@ -1,7 +1,7 @@
1
- import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-0c2620ef.js';
1
+ import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-126e2471.js';
2
2
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
3
3
  import { ObjectUtils } from '@sankhyalabs/core';
4
- import { d as dist, D as DataFetcher } from './DataFetcher-5034df59.js';
4
+ import { d as dist, D as DataFetcher } from './DataFetcher-5221b992.js';
5
5
 
6
6
  class GridConfigFetcher extends ResourceFetcher {
7
7
  constructor() {
@@ -1,13 +1,13 @@
1
- import { D as DataFetcher } from './DataFetcher-5034df59.js';
2
- import './pesquisa-fetcher-24e5bba0.js';
1
+ import { D as DataFetcher } from './DataFetcher-5221b992.js';
2
+ import './pesquisa-fetcher-0af41f09.js';
3
3
  import { SortMode, ApplicationContext, UserInterface, DateUtils, ObjectUtils, StringUtils, NumberUtils, DataType } from '@sankhyalabs/core';
4
4
  import './index-3aa4977a.js';
5
5
  import './ISave-d8c8bc59.js';
6
6
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
7
7
  import { UserInterface as UserInterface$1 } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
8
- import { P as PreloadManager } from './dataunit-fetcher-56cb648b.js';
8
+ import { P as PreloadManager } from './dataunit-fetcher-8dd93d8b.js';
9
9
  import './filter-item-type.enum-d45e026f.js';
10
- import './form-config-fetcher-0c2620ef.js';
10
+ import './form-config-fetcher-126e2471.js';
11
11
  import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
12
12
  import { h } from './index-a7d3d3f1.js';
13
13
 
@@ -204,7 +204,7 @@ class CommonsExporter {
204
204
  const columnData = {
205
205
  label: column.label,
206
206
  id: column.name,
207
- width: column.width,
207
+ width: (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UserInterface$1.SEARCH ? 60 : column.width,
208
208
  type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
209
209
  userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
210
210
  customFormatter