@sankhyalabs/sankhyablocks 1.3.34 → 1.4.0-beta.10

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 (285) hide show
  1. package/dist/cjs/SnkMessageBuilder-6c2f7bcd.js +302 -0
  2. package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
  3. package/dist/cjs/configurableElementsStorage-93459c72.js +20 -0
  4. package/dist/cjs/constants-9056ca9e.js +84 -0
  5. package/dist/cjs/draggable.bundle-82a25c06.js +6886 -0
  6. package/dist/cjs/filter-item-type.enum-3daf58d3.js +16 -0
  7. package/dist/cjs/form-config-fetcher-2de7c16a.js +6895 -0
  8. package/dist/cjs/{index-1133bc2a.js → index-20e8b68a.js} +964 -209
  9. package/dist/cjs/loader.cjs.js +3 -3
  10. package/dist/cjs/sankhyablocks.cjs.js +3 -3
  11. package/dist/cjs/snk-application.cjs.entry.js +680 -6994
  12. package/dist/cjs/snk-config-modal.cjs.entry.js +62 -0
  13. package/dist/cjs/snk-config-options.cjs.entry.js +230 -0
  14. package/dist/cjs/snk-configurator_6.cjs.entry.js +1156 -0
  15. package/dist/cjs/snk-crud.cjs.entry.js +78 -0
  16. package/dist/cjs/snk-data-unit.cjs.entry.js +272 -0
  17. package/dist/cjs/snk-field-config_2.cjs.entry.js +135 -0
  18. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +50 -0
  19. package/dist/cjs/snk-filter-detail.cjs.entry.js +106 -0
  20. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +26 -0
  21. package/dist/cjs/snk-filter-number.cjs.entry.js +27 -0
  22. package/dist/cjs/snk-filter-period.cjs.entry.js +40 -0
  23. package/dist/cjs/snk-filter-personalized.cjs.entry.js +89 -0
  24. package/dist/cjs/snk-filter-search.cjs.entry.js +38 -0
  25. package/dist/cjs/snk-filter-text.cjs.entry.js +22 -0
  26. package/dist/cjs/snk-form-config.cjs.entry.js +957 -0
  27. package/dist/cjs/snk-form.cjs.entry.js +146 -0
  28. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  29. package/dist/cjs/snk-tab-config.cjs.entry.js +321 -0
  30. package/dist/cjs/taskbar-elements-9a4b1e19.js +97 -0
  31. package/dist/cjs/taskbar-processor-6bd0d35c.js +47 -0
  32. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  33. package/dist/collection/collection-manifest.json +45 -2
  34. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +9 -2
  35. package/dist/collection/components/snk-application/snk-application.js +1346 -642
  36. package/dist/collection/components/snk-configurator/snk-configurator.js +261 -0
  37. package/dist/collection/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.js +16 -0
  38. package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.css +122 -0
  39. package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.js +137 -0
  40. package/dist/collection/components/snk-crud/snk-crud.css +6 -0
  41. package/dist/collection/components/snk-crud/snk-crud.js +232 -0
  42. package/dist/collection/components/snk-data-unit/snk-data-unit.css +6 -0
  43. package/dist/collection/components/snk-data-unit/snk-data-unit.js +517 -0
  44. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +100 -0
  45. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +111 -0
  46. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +87 -0
  47. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +88 -0
  48. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +101 -0
  49. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +180 -0
  50. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +102 -0
  51. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +63 -0
  52. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +12 -0
  53. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +178 -0
  54. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +289 -0
  55. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +299 -0
  56. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +222 -0
  57. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +149 -0
  58. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +462 -0
  59. package/dist/collection/components/snk-form/snk-form.css +38 -0
  60. package/dist/collection/components/snk-form/snk-form.js +336 -0
  61. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.css +9 -0
  62. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +315 -0
  63. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.css +164 -0
  64. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +140 -0
  65. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css +185 -0
  66. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +1062 -0
  67. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.css +272 -0
  68. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +476 -0
  69. package/dist/collection/components/snk-grid/snk-grid.css +18 -0
  70. package/dist/collection/components/snk-grid/snk-grid.js +273 -0
  71. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +80 -79
  72. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +90 -0
  73. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +43 -0
  74. package/dist/collection/components/snk-taskbar/snk-taskbar.css +3 -0
  75. package/dist/collection/components/snk-taskbar/snk-taskbar.js +339 -0
  76. package/dist/collection/components/teste-pesquisa/teste-pesquisa.js +12 -9
  77. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +39 -14
  78. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +87 -21
  79. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +62 -0
  80. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +106 -3
  81. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +4 -3
  82. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +15 -15
  83. package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +9 -1
  84. package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js +47 -0
  85. package/dist/collection/lib/index.js +2 -0
  86. package/dist/collection/lib/message/SnkMessageBuilder.js +130 -0
  87. package/dist/collection/lib/message/resources/crud-utils.msg.js +4 -0
  88. package/dist/collection/lib/message/resources/snk-configurator.msg.js +11 -0
  89. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +23 -0
  90. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +30 -0
  91. package/dist/collection/lib/message/resources/snk-form.msg.js +67 -0
  92. package/dist/collection/lib/message/resources/snk-taskbar.msg.js +17 -0
  93. package/dist/collection/lib/utils/CrudUtils.js +73 -0
  94. package/dist/collection/lib/utils/constants.js +72 -0
  95. package/dist/components/SnkMessageBuilder.js +280 -0
  96. package/dist/components/_commonjsHelpers.js +17 -0
  97. package/dist/components/constants.js +74 -0
  98. package/dist/components/filter-item-type.enum.js +14 -0
  99. package/dist/components/form-config-fetcher.js +6889 -0
  100. package/dist/components/index.d.ts +26 -5
  101. package/dist/components/index.js +26 -0
  102. package/dist/components/snk-application2.js +681 -6980
  103. package/dist/components/snk-config-modal.d.ts +11 -0
  104. package/dist/components/snk-config-modal.js +6 -0
  105. package/dist/components/snk-config-modal2.js +91 -0
  106. package/dist/components/snk-config-options.d.ts +11 -0
  107. package/dist/components/snk-config-options.js +6 -0
  108. package/dist/components/snk-config-options2.js +245 -0
  109. package/dist/components/snk-configurator.d.ts +11 -0
  110. package/dist/components/snk-configurator.js +6 -0
  111. package/dist/components/snk-configurator2.js +212 -0
  112. package/dist/components/snk-crud.d.ts +11 -0
  113. package/dist/components/snk-crud.js +183 -0
  114. package/dist/components/snk-data-unit.d.ts +11 -0
  115. package/dist/components/snk-data-unit.js +294 -0
  116. package/dist/components/snk-field-config.d.ts +11 -0
  117. package/dist/components/snk-field-config.js +6 -0
  118. package/dist/components/snk-field-config2.js +70 -0
  119. package/dist/components/snk-filter-bar.d.ts +11 -0
  120. package/dist/components/snk-filter-bar.js +6 -0
  121. package/dist/components/snk-filter-bar2.js +516 -0
  122. package/dist/components/snk-filter-binary-select.d.ts +11 -0
  123. package/dist/components/snk-filter-binary-select.js +67 -0
  124. package/dist/components/snk-filter-detail.d.ts +11 -0
  125. package/dist/components/snk-filter-detail.js +6 -0
  126. package/dist/components/snk-filter-detail2.js +120 -0
  127. package/dist/components/snk-filter-item.d.ts +11 -0
  128. package/dist/components/snk-filter-item.js +6 -0
  129. package/dist/components/snk-filter-item2.js +194 -0
  130. package/dist/components/snk-filter-list.d.ts +11 -0
  131. package/dist/components/snk-filter-list.js +6 -0
  132. package/dist/components/snk-filter-list2.js +149 -0
  133. package/dist/components/snk-filter-modal.d.ts +11 -0
  134. package/dist/components/snk-filter-modal.js +6 -0
  135. package/dist/components/snk-filter-modal2.js +84 -0
  136. package/dist/components/snk-filter-multi-select.d.ts +11 -0
  137. package/dist/components/snk-filter-multi-select.js +43 -0
  138. package/dist/components/snk-filter-number.d.ts +11 -0
  139. package/dist/components/snk-filter-number.js +44 -0
  140. package/dist/components/snk-filter-period.d.ts +11 -0
  141. package/dist/components/snk-filter-period.js +57 -0
  142. package/dist/components/snk-filter-personalized.d.ts +11 -0
  143. package/dist/components/snk-filter-personalized.js +108 -0
  144. package/dist/components/snk-filter-search.d.ts +11 -0
  145. package/dist/components/snk-filter-search.js +55 -0
  146. package/dist/components/snk-filter-text.d.ts +11 -0
  147. package/dist/components/snk-filter-text.js +38 -0
  148. package/dist/components/snk-form-config.d.ts +11 -0
  149. package/dist/components/snk-form-config.js +6 -0
  150. package/dist/components/snk-form-config2.js +996 -0
  151. package/dist/components/snk-form.d.ts +11 -0
  152. package/dist/components/snk-form.js +6 -0
  153. package/dist/components/snk-form2.js +209 -0
  154. package/dist/components/snk-grid.d.ts +11 -0
  155. package/dist/components/snk-grid.js +6 -0
  156. package/dist/components/snk-grid2.js +152 -0
  157. package/dist/components/snk-tab-config.d.ts +11 -0
  158. package/dist/components/snk-tab-config.js +6 -0
  159. package/dist/components/snk-tab-config2.js +7220 -0
  160. package/dist/components/snk-taskbar.d.ts +11 -0
  161. package/dist/components/snk-taskbar.js +6 -0
  162. package/dist/components/snk-taskbar2.js +282 -0
  163. package/dist/components/taskbar-processor.js +45 -0
  164. package/dist/esm/SnkMessageBuilder-5792c260.js +280 -0
  165. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  166. package/dist/esm/configurableElementsStorage-cdc144b5.js +18 -0
  167. package/dist/esm/constants-c6039d3d.js +74 -0
  168. package/dist/esm/draggable.bundle-41d56f06.js +6884 -0
  169. package/dist/esm/filter-item-type.enum-a79b2fa8.js +14 -0
  170. package/dist/esm/form-config-fetcher-96c6c2dc.js +6889 -0
  171. package/dist/esm/{index-ffda6382.js → index-e4121713.js} +963 -210
  172. package/dist/esm/loader.js +3 -3
  173. package/dist/esm/polyfills/css-shim.js +1 -1
  174. package/dist/esm/sankhyablocks.js +3 -3
  175. package/dist/esm/snk-application.entry.js +667 -6981
  176. package/dist/esm/snk-config-modal.entry.js +58 -0
  177. package/dist/esm/snk-config-options.entry.js +226 -0
  178. package/dist/esm/snk-configurator_6.entry.js +1147 -0
  179. package/dist/esm/snk-crud.entry.js +74 -0
  180. package/dist/esm/snk-data-unit.entry.js +268 -0
  181. package/dist/esm/snk-field-config_2.entry.js +130 -0
  182. package/dist/esm/snk-filter-binary-select.entry.js +46 -0
  183. package/dist/esm/snk-filter-detail.entry.js +102 -0
  184. package/dist/esm/snk-filter-multi-select.entry.js +22 -0
  185. package/dist/esm/snk-filter-number.entry.js +23 -0
  186. package/dist/esm/snk-filter-period.entry.js +36 -0
  187. package/dist/esm/snk-filter-personalized.entry.js +85 -0
  188. package/dist/esm/snk-filter-search.entry.js +34 -0
  189. package/dist/esm/snk-filter-text.entry.js +18 -0
  190. package/dist/esm/snk-form-config.entry.js +953 -0
  191. package/dist/esm/snk-form.entry.js +142 -0
  192. package/dist/esm/snk-pesquisa.entry.js +1 -1
  193. package/dist/esm/snk-tab-config.entry.js +317 -0
  194. package/dist/esm/taskbar-elements-e2ed0536.js +94 -0
  195. package/dist/esm/taskbar-processor-aa6772c9.js +45 -0
  196. package/dist/esm/teste-pesquisa.entry.js +1 -1
  197. package/dist/sankhyablocks/p-029ae4e4.entry.js +1 -0
  198. package/dist/sankhyablocks/p-03f9c407.js +1 -0
  199. package/dist/sankhyablocks/p-112455b1.js +1 -0
  200. package/dist/sankhyablocks/p-12ad2a19.entry.js +1 -0
  201. package/dist/sankhyablocks/p-1feabfc7.entry.js +1 -0
  202. package/dist/sankhyablocks/p-21c8929b.js +1 -0
  203. package/dist/sankhyablocks/p-2284c850.entry.js +1 -0
  204. package/dist/sankhyablocks/p-2b891c4a.entry.js +1 -0
  205. package/dist/sankhyablocks/p-2dc76d79.entry.js +1 -0
  206. package/dist/sankhyablocks/p-361299e8.js +26 -0
  207. package/dist/sankhyablocks/p-3a276f3d.entry.js +1 -0
  208. package/dist/sankhyablocks/p-400cc777.entry.js +1 -0
  209. package/dist/sankhyablocks/{p-2a7b4cb3.entry.js → p-44ce5b90.entry.js} +1 -1
  210. package/dist/sankhyablocks/p-521c96f0.entry.js +1 -0
  211. package/dist/sankhyablocks/{p-9520d78a.entry.js → p-6988f4a6.entry.js} +1 -1
  212. package/dist/sankhyablocks/p-776ff4d1.entry.js +1 -0
  213. package/dist/sankhyablocks/p-7b4a4a50.entry.js +1 -0
  214. package/dist/sankhyablocks/p-9ba3df4c.js +2 -0
  215. package/dist/sankhyablocks/p-9dc4426d.entry.js +1 -0
  216. package/dist/sankhyablocks/p-9dd2b8cb.js +1 -0
  217. package/dist/sankhyablocks/p-a17a4fca.entry.js +1 -0
  218. package/dist/sankhyablocks/p-a5b26df2.js +1 -0
  219. package/dist/sankhyablocks/p-b6d6b172.js +1 -0
  220. package/dist/sankhyablocks/p-cc4bef9f.entry.js +1 -0
  221. package/dist/sankhyablocks/p-d50651a3.js +1 -0
  222. package/dist/sankhyablocks/p-d690b6b5.entry.js +75 -0
  223. package/dist/sankhyablocks/p-d9fbb26f.js +1 -0
  224. package/dist/sankhyablocks/p-deb1f523.entry.js +1 -0
  225. package/dist/sankhyablocks/p-e871aa92.entry.js +1 -0
  226. package/dist/sankhyablocks/p-e9beab79.entry.js +1 -0
  227. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  228. package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
  229. package/dist/types/components/snk-application/snk-application.d.ts +178 -26
  230. package/dist/types/components/snk-configurator/snk-configurator.d.ts +46 -0
  231. package/dist/types/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.d.ts +8 -0
  232. package/dist/types/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.d.ts +38 -0
  233. package/dist/types/components/snk-crud/snk-crud.d.ts +50 -0
  234. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +92 -0
  235. package/dist/types/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.d.ts +4 -0
  236. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +13 -0
  237. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +9 -0
  238. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +9 -0
  239. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +15 -0
  240. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +24 -0
  241. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +11 -0
  242. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +8 -0
  243. package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +11 -0
  244. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +20 -0
  245. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +40 -0
  246. package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +45 -0
  247. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +26 -0
  248. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +65 -0
  249. package/dist/types/components/snk-form/snk-form.d.ts +71 -0
  250. package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +51 -0
  251. package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +32 -0
  252. package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +139 -0
  253. package/dist/types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.d.ts +97 -0
  254. package/dist/types/components/snk-grid/snk-grid.d.ts +59 -0
  255. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +30 -0
  256. package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +12 -0
  257. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +92 -0
  258. package/dist/types/components.d.ts +1100 -12
  259. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +7 -6
  260. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +3 -0
  261. package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +6 -0
  262. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +21 -3
  263. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -1
  264. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +7 -7
  265. package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
  266. package/dist/types/lib/http/data-fetcher/fetchers/totals-fetcher.d.ts +8 -0
  267. package/dist/types/lib/index.d.ts +2 -0
  268. package/dist/types/lib/message/SnkMessageBuilder.d.ts +42 -0
  269. package/dist/types/lib/message/resources/crud-utils.msg.d.ts +2 -0
  270. package/dist/types/lib/message/resources/snk-configurator.msg.d.ts +2 -0
  271. package/dist/types/lib/message/resources/snk-data-unit.msg.d.ts +2 -0
  272. package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +2 -0
  273. package/dist/types/lib/message/resources/snk-form.msg.d.ts +5 -0
  274. package/dist/types/lib/message/resources/snk-taskbar.msg.d.ts +2 -0
  275. package/dist/types/lib/utils/CrudUtils.d.ts +6 -0
  276. package/dist/types/lib/utils/constants.d.ts +76 -0
  277. package/dist/types/lib/utils/pesquisa.d.ts +2 -1
  278. package/dist/types/stencil-public-runtime.d.ts +15 -4
  279. package/loader/package.json +1 -0
  280. package/package.json +6 -5
  281. package/react/components.d.ts +23 -0
  282. package/react/components.js +23 -0
  283. package/react/components.js.map +1 -1
  284. package/dist/sankhyablocks/p-98e8490d.entry.js +0 -69
  285. package/dist/sankhyablocks/p-edcb9d8e.js +0 -2
@@ -0,0 +1,273 @@
1
+ import { h } from '@stencil/core';
2
+ import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
3
+ import ConfigurableElementsStorage from '../snk-configurator/subcomponents/configModalProvider/configurableElementsStorage';
4
+ export class SnkGrid {
5
+ constructor() {
6
+ this._topTaskbarProcessor = new TaskbarProcessor({
7
+ "snkGridTopTaskbar": ["FORM_MODE", "CONFIGURATOR", "INSERT"]
8
+ });
9
+ this._headerTaskbarProcessor = new TaskbarProcessor({
10
+ "snkGridHeaderTaskbar.unselected": ["REFRESH"],
11
+ "snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
12
+ });
13
+ }
14
+ /**
15
+ * Método responsável em abrir ou fechar o modal de configurações da grade.
16
+ */
17
+ async setShowGridConfig(value) {
18
+ if (this._grid == undefined) {
19
+ return;
20
+ }
21
+ if (value === true) {
22
+ this._grid.openGridConfig();
23
+ }
24
+ else {
25
+ this._grid.closeGridConfig();
26
+ }
27
+ }
28
+ /**
29
+ * Método responsável por setar as configurações da grade.
30
+ */
31
+ async setConfig(config) {
32
+ this._gridConfig = config;
33
+ }
34
+ changeConfig(config) {
35
+ this.configChanged.emit(config);
36
+ }
37
+ componentDidRender() {
38
+ ConfigurableElementsStorage.setGrid(this.configName, this._element);
39
+ }
40
+ componentWillLoad() {
41
+ let parent = this._element.parentElement;
42
+ while (parent) {
43
+ if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
44
+ this._snkDataUnit = parent;
45
+ this._dataUnit = this._snkDataUnit.dataUnit;
46
+ if (!this._dataUnit) {
47
+ this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
48
+ this._dataUnit = evt.detail;
49
+ });
50
+ }
51
+ this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
52
+ this._dataState = evt.detail;
53
+ });
54
+ break;
55
+ }
56
+ parent = parent.parentElement;
57
+ }
58
+ }
59
+ componentWillRender() {
60
+ const headerTaskbarId = this._dataState && this._dataState.selectedRecords.length > 0 ? "snkGridHeaderTaskbar.selected" : "snkGridHeaderTaskbar.unselected";
61
+ this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState);
62
+ this._topTaskbarProcessor.process("snkGridTopTaskbar", this.taskbarManager, this._dataState);
63
+ }
64
+ render() {
65
+ if (!this._dataUnit) {
66
+ return undefined;
67
+ }
68
+ return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-padding-bottom--medium ez-margin-bottom--medium" }, h("snk-filter-bar", { dataUnit: this._dataUnit, class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: "INSERT" })), h("ez-grid", { ref: ref => this._grid = ref, dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.changeConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver }, h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" }))));
69
+ }
70
+ static get is() { return "snk-grid"; }
71
+ static get encapsulation() { return "scoped"; }
72
+ static get originalStyleUrls() {
73
+ return {
74
+ "$": ["snk-grid.css"]
75
+ };
76
+ }
77
+ static get styleUrls() {
78
+ return {
79
+ "$": ["snk-grid.css"]
80
+ };
81
+ }
82
+ static get properties() {
83
+ return {
84
+ "configName": {
85
+ "type": "string",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "string",
89
+ "resolved": "string",
90
+ "references": {}
91
+ },
92
+ "required": false,
93
+ "optional": false,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": "Nome usado para salvar/recuperar a configura\u00E7\u00E3o"
97
+ },
98
+ "attribute": "config-name",
99
+ "reflect": false
100
+ },
101
+ "actionsList": {
102
+ "type": "unknown",
103
+ "mutable": false,
104
+ "complexType": {
105
+ "original": "Array<Action>",
106
+ "resolved": "Action[]",
107
+ "references": {
108
+ "Array": {
109
+ "location": "global"
110
+ },
111
+ "Action": {
112
+ "location": "import",
113
+ "path": "../snk-taskbar/snk-taskbar"
114
+ }
115
+ }
116
+ },
117
+ "required": false,
118
+ "optional": false,
119
+ "docs": {
120
+ "tags": [],
121
+ "text": "Lista de a\u00E7\u00F5es que devem ser usadas no bot\u00E3o \"Mais op\u00E7\u00F5es\""
122
+ }
123
+ },
124
+ "taskbarManager": {
125
+ "type": "unknown",
126
+ "mutable": false,
127
+ "complexType": {
128
+ "original": "TaskbarManager",
129
+ "resolved": "TaskbarManager",
130
+ "references": {
131
+ "TaskbarManager": {
132
+ "location": "import",
133
+ "path": "../snk-taskbar/snk-taskbar"
134
+ }
135
+ }
136
+ },
137
+ "required": false,
138
+ "optional": false,
139
+ "docs": {
140
+ "tags": [],
141
+ "text": "Gerenciador das barras de tarefas. \u00C9 poss\u00EDvel determinar bot\u00F5es espec\u00EDficos\nou mesmo gerenciar o estado dos bot\u00F5es."
142
+ }
143
+ },
144
+ "statusResolver": {
145
+ "type": "unknown",
146
+ "mutable": false,
147
+ "complexType": {
148
+ "original": "IStatusResolver",
149
+ "resolved": "IStatusResolver",
150
+ "references": {
151
+ "IStatusResolver": {
152
+ "location": "import",
153
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
154
+ }
155
+ }
156
+ },
157
+ "required": false,
158
+ "optional": false,
159
+ "docs": {
160
+ "tags": [],
161
+ "text": "Configura\u00E7\u00E3o do valor da coluna de status.\nExemplo: { \"RECDESP\": { \"-1\" : \"#BD0025\", \"1\" : \"#157A00\" } }"
162
+ }
163
+ }
164
+ };
165
+ }
166
+ static get states() {
167
+ return {
168
+ "_dataUnit": {},
169
+ "_dataState": {},
170
+ "_gridConfig": {}
171
+ };
172
+ }
173
+ static get events() {
174
+ return [{
175
+ "method": "actionClick",
176
+ "name": "actionClick",
177
+ "bubbles": true,
178
+ "cancelable": true,
179
+ "composed": true,
180
+ "docs": {
181
+ "tags": [],
182
+ "text": "Emitido sempre que houver click de bot\u00E3o ou a\u00E7\u00E3o"
183
+ },
184
+ "complexType": {
185
+ "original": "string",
186
+ "resolved": "string",
187
+ "references": {}
188
+ }
189
+ }, {
190
+ "method": "gridDoubleClick",
191
+ "name": "gridDoubleClick",
192
+ "bubbles": true,
193
+ "cancelable": true,
194
+ "composed": true,
195
+ "docs": {
196
+ "tags": [],
197
+ "text": "Emitido sempre que houver duplo click na grade"
198
+ },
199
+ "complexType": {
200
+ "original": "void",
201
+ "resolved": "void",
202
+ "references": {}
203
+ }
204
+ }, {
205
+ "method": "configChanged",
206
+ "name": "configChanged",
207
+ "bubbles": true,
208
+ "cancelable": true,
209
+ "composed": true,
210
+ "docs": {
211
+ "tags": [],
212
+ "text": "Evento disparado quando as configura\u00E7\u00F5es s\u00E3o alteradas."
213
+ },
214
+ "complexType": {
215
+ "original": "IGridConfig",
216
+ "resolved": "IGridConfig",
217
+ "references": {
218
+ "IGridConfig": {
219
+ "location": "import",
220
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
221
+ }
222
+ }
223
+ }
224
+ }];
225
+ }
226
+ static get methods() {
227
+ return {
228
+ "setShowGridConfig": {
229
+ "complexType": {
230
+ "signature": "(value: boolean) => Promise<void>",
231
+ "parameters": [{
232
+ "tags": [],
233
+ "text": ""
234
+ }],
235
+ "references": {
236
+ "Promise": {
237
+ "location": "global"
238
+ }
239
+ },
240
+ "return": "Promise<void>"
241
+ },
242
+ "docs": {
243
+ "text": "M\u00E9todo respons\u00E1vel em abrir ou fechar o modal de configura\u00E7\u00F5es da grade.",
244
+ "tags": []
245
+ }
246
+ },
247
+ "setConfig": {
248
+ "complexType": {
249
+ "signature": "(config: IGridConfig) => Promise<void>",
250
+ "parameters": [{
251
+ "tags": [],
252
+ "text": ""
253
+ }],
254
+ "references": {
255
+ "Promise": {
256
+ "location": "global"
257
+ },
258
+ "IGridConfig": {
259
+ "location": "import",
260
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
261
+ }
262
+ },
263
+ "return": "Promise<void>"
264
+ },
265
+ "docs": {
266
+ "text": "M\u00E9todo respons\u00E1vel por setar as configura\u00E7\u00F5es da grade.",
267
+ "tags": []
268
+ }
269
+ }
270
+ };
271
+ }
272
+ static get elementRef() { return "_element"; }
273
+ }
@@ -1,5 +1,5 @@
1
1
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
2
- import { Component, h, Host, Prop, State, Watch } from '@stencil/core';
2
+ import { h, Host } from '@stencil/core';
3
3
  export class SnkPesquisa {
4
4
  constructor() {
5
5
  this._mdByName = {};
@@ -292,92 +292,93 @@ export class SnkPesquisa {
292
292
  }
293
293
  render() {
294
294
  var _a;
295
- return (h(Host, null,
296
- h("div", { class: "snk-pesquisa" },
297
- h("div", { class: "snk-pesquisa__input" },
298
- 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 },
299
- h("ez-icon", { slot: "leftIcon", iconName: "search" }),
300
- this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
301
- ? h("button", { slot: "rightIcon", class: "snk-pesquisa__btn", onClick: () => this.clearSearch() },
302
- h("ez-icon", { iconName: "close" }))
303
- : undefined),
304
- h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() })),
305
- h("label", { class: "snk-pesquisa__records" }, this.getMessageView()),
306
- h("div", { class: "snk-pesquisa__content" }, this._itemList && this._itemList.map((item) => {
307
- return (h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
308
- })))));
295
+ 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 }, h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
296
+ ? h("button", { slot: "rightIcon", class: "snk-pesquisa__btn", onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
297
+ : 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) => {
298
+ return (h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
299
+ })))));
309
300
  }
310
301
  static get is() { return "snk-pesquisa"; }
311
302
  static get encapsulation() { return "scoped"; }
312
- static get originalStyleUrls() { return {
313
- "$": ["snk-pesquisa.css"]
314
- }; }
315
- static get styleUrls() { return {
316
- "$": ["snk-pesquisa.css"]
317
- }; }
318
- static get properties() { return {
319
- "searchLoader": {
320
- "type": "unknown",
321
- "mutable": false,
322
- "complexType": {
323
- "original": "Function",
324
- "resolved": "Function",
325
- "references": {
326
- "Function": {
327
- "location": "global"
303
+ static get originalStyleUrls() {
304
+ return {
305
+ "$": ["snk-pesquisa.css"]
306
+ };
307
+ }
308
+ static get styleUrls() {
309
+ return {
310
+ "$": ["snk-pesquisa.css"]
311
+ };
312
+ }
313
+ static get properties() {
314
+ return {
315
+ "searchLoader": {
316
+ "type": "unknown",
317
+ "mutable": false,
318
+ "complexType": {
319
+ "original": "Function",
320
+ "resolved": "Function",
321
+ "references": {
322
+ "Function": {
323
+ "location": "global"
324
+ }
328
325
  }
326
+ },
327
+ "required": false,
328
+ "optional": false,
329
+ "docs": {
330
+ "tags": [],
331
+ "text": ""
329
332
  }
330
333
  },
331
- "required": false,
332
- "optional": false,
333
- "docs": {
334
- "tags": [],
335
- "text": ""
336
- }
337
- },
338
- "selectItem": {
339
- "type": "unknown",
340
- "mutable": false,
341
- "complexType": {
342
- "original": "Function",
343
- "resolved": "Function",
344
- "references": {
345
- "Function": {
346
- "location": "global"
334
+ "selectItem": {
335
+ "type": "unknown",
336
+ "mutable": false,
337
+ "complexType": {
338
+ "original": "Function",
339
+ "resolved": "Function",
340
+ "references": {
341
+ "Function": {
342
+ "location": "global"
343
+ }
347
344
  }
345
+ },
346
+ "required": false,
347
+ "optional": false,
348
+ "docs": {
349
+ "tags": [],
350
+ "text": ""
348
351
  }
349
352
  },
350
- "required": false,
351
- "optional": false,
352
- "docs": {
353
- "tags": [],
354
- "text": ""
353
+ "argument": {
354
+ "type": "string",
355
+ "mutable": true,
356
+ "complexType": {
357
+ "original": "string",
358
+ "resolved": "string",
359
+ "references": {}
360
+ },
361
+ "required": false,
362
+ "optional": false,
363
+ "docs": {
364
+ "tags": [],
365
+ "text": ""
366
+ },
367
+ "attribute": "argument",
368
+ "reflect": false
355
369
  }
356
- },
357
- "argument": {
358
- "type": "string",
359
- "mutable": true,
360
- "complexType": {
361
- "original": "string",
362
- "resolved": "string",
363
- "references": {}
364
- },
365
- "required": false,
366
- "optional": false,
367
- "docs": {
368
- "tags": [],
369
- "text": ""
370
- },
371
- "attribute": "argument",
372
- "reflect": false
373
- }
374
- }; }
375
- static get states() { return {
376
- "_itemList": {},
377
- "_startLoading": {}
378
- }; }
379
- static get watchers() { return [{
380
- "propName": "argument",
381
- "methodName": "observeArgument"
382
- }]; }
370
+ };
371
+ }
372
+ static get states() {
373
+ return {
374
+ "_itemList": {},
375
+ "_startLoading": {}
376
+ };
377
+ }
378
+ static get watchers() {
379
+ return [{
380
+ "propName": "argument",
381
+ "methodName": "observeArgument"
382
+ }];
383
+ }
383
384
  }
@@ -0,0 +1,90 @@
1
+ import { h } from "@stencil/core";
2
+ export var TaskbarElement;
3
+ (function (TaskbarElement) {
4
+ TaskbarElement["PREVIOUS"] = "PREVIOUS";
5
+ TaskbarElement["NEXT"] = "NEXT";
6
+ TaskbarElement["REFRESH"] = "REFRESH";
7
+ TaskbarElement["UPDATE"] = "UPDATE";
8
+ TaskbarElement["CLONE"] = "CLONE";
9
+ TaskbarElement["REMOVE"] = "REMOVE";
10
+ TaskbarElement["INSERT"] = "INSERT";
11
+ TaskbarElement["CANCEL"] = "CANCEL";
12
+ TaskbarElement["SAVE"] = "SAVE";
13
+ TaskbarElement["GRID_MODE"] = "GRID_MODE";
14
+ TaskbarElement["FORM_MODE"] = "FORM_MODE";
15
+ TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
16
+ TaskbarElement["DIVIDER"] = "DIVIDER";
17
+ TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
18
+ })(TaskbarElement || (TaskbarElement = {}));
19
+ export var AuthorizationElements;
20
+ (function (AuthorizationElements) {
21
+ AuthorizationElements["UPDATE"] = "UPDATE";
22
+ AuthorizationElements["CLONE"] = "CLONE";
23
+ AuthorizationElements["REMOVE"] = "REMOVE";
24
+ AuthorizationElements["INSERT"] = "INSERT";
25
+ AuthorizationElements["CONFIGURATOR"] = "CONFIGURATOR";
26
+ })(AuthorizationElements || (AuthorizationElements = {}));
27
+ export var VisibleWhenForbidden;
28
+ (function (VisibleWhenForbidden) {
29
+ VisibleWhenForbidden["CONFIG_GRID"] = "CONFIG_GRID";
30
+ VisibleWhenForbidden["CONFIGURATOR"] = "CONFIGURATOR";
31
+ })(VisibleWhenForbidden || (VisibleWhenForbidden = {}));
32
+ export const buildCustomButton = (def, className, action, isEnabled) => {
33
+ const { hint, text, iconName } = def;
34
+ if (iconName) {
35
+ if (text) {
36
+ return iconTextButton(iconName, def.name, className, hint, text, action, isEnabled);
37
+ }
38
+ else {
39
+ return iconButton(iconName, def.name, className, hint, action, isEnabled);
40
+ }
41
+ }
42
+ else {
43
+ return textButton(def.name, className, text, hint, action, isEnabled);
44
+ }
45
+ };
46
+ export const buildElem = (element, className, getTitle, action, isEnabled, actions, configName) => {
47
+ const title = getTitle(element);
48
+ switch (element) {
49
+ case TaskbarElement.PREVIOUS:
50
+ return iconButton("chevron-left", element, className, title, action, isEnabled);
51
+ case TaskbarElement.NEXT:
52
+ return iconButton("chevron-right", element, className, title, action, isEnabled);
53
+ case TaskbarElement.REFRESH:
54
+ return iconButton("sync", element, className, title, action, isEnabled);
55
+ case TaskbarElement.UPDATE:
56
+ return iconButton("edit", element, className, title, action, isEnabled);
57
+ case TaskbarElement.CLONE:
58
+ return iconButton("copy", element, className, title, action, isEnabled);
59
+ case TaskbarElement.REMOVE:
60
+ return iconButton("delete", element, className, title, action, isEnabled);
61
+ case TaskbarElement.INSERT:
62
+ return iconTextButton("plus", element, className, title, title, action, isEnabled);
63
+ case TaskbarElement.CANCEL:
64
+ return textButton(element, className, title, title, action, isEnabled);
65
+ case TaskbarElement.SAVE:
66
+ return iconTextButton("save", element, className, title, title, action, isEnabled);
67
+ case TaskbarElement.GRID_MODE:
68
+ return iconButton("table", element, className, title, action, isEnabled);
69
+ case TaskbarElement.FORM_MODE:
70
+ return iconButton("list", element, className, title, action, isEnabled);
71
+ case TaskbarElement.CONFIGURATOR:
72
+ return configButton(element, className, getTitle, action, isEnabled, configName);
73
+ case TaskbarElement.MORE_OPTIONS:
74
+ return actions && actions.length > 0 ? h("ez-actions-button", { title: title, size: "small", class: className, enabled: isEnabled(element), onEzAction: (evt) => action(evt.detail.value), actions: actions }) : undefined;
75
+ case TaskbarElement.DIVIDER:
76
+ return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--medium" });
77
+ }
78
+ };
79
+ function textButton(name, className, text, title, action, isEnabled) {
80
+ return h("ez-button", { title: title, label: text, size: "small", class: className, enabled: isEnabled(name), onClick: () => action(name) });
81
+ }
82
+ function iconButton(iconName, name, className, title, action, isEnabled) {
83
+ return h("ez-button", { name: iconName, title: title, mode: "icon", size: "small", class: className, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
84
+ }
85
+ function iconTextButton(iconName, name, className, text, title, action, isEnabled) {
86
+ return h("ez-button", { name: iconName, title: title, label: text, size: "small", class: className, enabled: isEnabled(name), onClick: () => action(name) }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
87
+ }
88
+ function configButton(element, className, getTitle, action, isEnabled, configName) {
89
+ return h("snk-configurator", { key: "configurator", configName: configName, title: getTitle(element), class: className, enabled: isEnabled(element), onChangeViewMode: (evt) => action(evt === null || evt === void 0 ? void 0 : evt.detail) });
90
+ }
@@ -0,0 +1,43 @@
1
+ export default class TaskbarProcessor {
2
+ constructor(defaultButtons) {
3
+ this._defaultButtons = defaultButtons;
4
+ }
5
+ process(taskbarId, taskbarManager, dataState, disabledButtons = []) {
6
+ var _a;
7
+ this.customButtons = new Map();
8
+ this.buttons = "";
9
+ this.disabledButtons = [];
10
+ (_a = this.getButtonsArray(taskbarId, taskbarManager, dataState)) === null || _a === void 0 ? void 0 : _a.forEach(btnDef => {
11
+ let buttonName;
12
+ if (typeof btnDef === "string") {
13
+ buttonName = btnDef;
14
+ }
15
+ else {
16
+ const customBtn = btnDef;
17
+ this.customButtons.set(customBtn.name, customBtn);
18
+ buttonName = customBtn.name;
19
+ }
20
+ if (!this.isEnabled(taskbarId, taskbarManager, buttonName, dataState, disabledButtons)) {
21
+ this.disabledButtons.push(buttonName);
22
+ }
23
+ if (this.buttons.length > 0) {
24
+ this.buttons += ",";
25
+ }
26
+ this.buttons += buttonName;
27
+ });
28
+ }
29
+ getButtonsArray(taskbarId, taskbarManager, dataState) {
30
+ const defaults = this._defaultButtons[taskbarId];
31
+ if (taskbarManager) {
32
+ return taskbarManager.getButtons(taskbarId, dataState, [...defaults]);
33
+ }
34
+ return defaults;
35
+ }
36
+ isEnabled(taskbarId, taskbarManager, buttonName, dataState, disabled) {
37
+ const originalValue = disabled.includes(buttonName) ? false : true;
38
+ if (taskbarManager && taskbarManager.isEnabled) {
39
+ return taskbarManager.isEnabled(taskbarId, dataState, buttonName, originalValue);
40
+ }
41
+ return originalValue;
42
+ }
43
+ }
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: flex;
3
+ }