@sankhyalabs/sankhyablocks 1.4.0-beta.1 → 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 (286) hide show
  1. package/dist/cjs/{SnkMessageBuilder-7717f1e4.js → SnkMessageBuilder-6c2f7bcd.js} +107 -131
  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-e2e1bc5b.js → filter-item-type.enum-3daf58d3.js} +2 -0
  7. package/dist/cjs/form-config-fetcher-2de7c16a.js +6895 -0
  8. package/dist/cjs/{index-b0b676c5.js → index-20e8b68a.js} +165 -1473
  9. package/dist/cjs/loader.cjs.js +2 -18
  10. package/dist/cjs/sankhyablocks.cjs.js +4 -116
  11. package/dist/cjs/snk-application.cjs.entry.js +330 -7196
  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 +21 -13
  16. package/dist/cjs/snk-data-unit.cjs.entry.js +24 -32
  17. package/dist/cjs/snk-field-config_2.cjs.entry.js +135 -0
  18. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +5 -2
  19. package/dist/cjs/snk-filter-detail.cjs.entry.js +62 -5
  20. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +6 -3
  21. package/dist/cjs/snk-filter-number.cjs.entry.js +6 -3
  22. package/dist/cjs/snk-filter-period.cjs.entry.js +5 -2
  23. package/dist/cjs/snk-filter-personalized.cjs.entry.js +89 -0
  24. package/dist/cjs/snk-filter-search.cjs.entry.js +7 -13
  25. package/dist/cjs/snk-filter-text.cjs.entry.js +2 -2
  26. package/dist/cjs/snk-form-config.cjs.entry.js +957 -0
  27. package/dist/cjs/snk-form.cjs.entry.js +41 -28
  28. package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
  29. package/dist/cjs/snk-tab-config.cjs.entry.js +321 -0
  30. package/dist/cjs/{taskbar-elements-283c737e.js → taskbar-elements-9a4b1e19.js} +10 -6
  31. package/dist/cjs/teste-pesquisa.cjs.entry.js +5 -5
  32. package/dist/collection/collection-manifest.json +29 -1
  33. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +1 -1
  34. package/dist/collection/components/snk-application/snk-application.js +236 -37
  35. package/dist/collection/components/snk-configurator/snk-configurator.js +261 -0
  36. package/dist/collection/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.js +16 -0
  37. package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.css +122 -0
  38. package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.js +137 -0
  39. package/dist/collection/components/snk-crud/snk-crud.js +46 -17
  40. package/dist/collection/components/snk-data-unit/snk-data-unit.js +1 -28
  41. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +100 -0
  42. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +23 -0
  43. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +24 -1
  44. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +24 -1
  45. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +23 -0
  46. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +180 -0
  47. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +22 -38
  48. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +1 -1
  49. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +2 -0
  50. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +80 -20
  51. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +65 -31
  52. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +85 -19
  53. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +222 -0
  54. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +39 -4
  55. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +250 -141
  56. package/dist/collection/components/snk-form/snk-form.css +4 -0
  57. package/dist/collection/components/snk-form/snk-form.js +108 -30
  58. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.css +9 -0
  59. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +315 -0
  60. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.css +164 -0
  61. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +140 -0
  62. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css +185 -0
  63. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +1062 -0
  64. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.css +272 -0
  65. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +476 -0
  66. package/dist/collection/components/snk-grid/snk-grid.js +94 -26
  67. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +9 -5
  68. package/dist/collection/components/snk-taskbar/snk-taskbar.js +35 -3
  69. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +3 -3
  70. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +35 -0
  71. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +18 -10
  72. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +106 -3
  73. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +15 -15
  74. package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +9 -1
  75. package/dist/collection/lib/index.js +1 -0
  76. package/dist/collection/lib/message/SnkMessageBuilder.js +11 -2
  77. package/dist/collection/lib/message/resources/crud-utils.msg.js +4 -0
  78. package/dist/collection/lib/message/resources/snk-configurator.msg.js +11 -0
  79. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +14 -2
  80. package/dist/collection/lib/message/resources/snk-form.msg.js +59 -2
  81. package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -1
  82. package/dist/collection/lib/utils/CrudUtils.js +73 -0
  83. package/dist/collection/lib/utils/constants.js +72 -0
  84. package/dist/components/SnkMessageBuilder.js +108 -131
  85. package/dist/components/_commonjsHelpers.js +17 -0
  86. package/dist/components/constants.js +74 -0
  87. package/dist/components/filter-item-type.enum.js +2 -0
  88. package/dist/{sankhyablocks/snk-application.entry.js → components/form-config-fetcher.js} +88 -1347
  89. package/dist/components/index.d.ts +8 -0
  90. package/dist/components/index.js +8 -4
  91. package/dist/components/snk-application2.js +313 -7173
  92. package/dist/components/snk-config-modal.d.ts +11 -0
  93. package/dist/components/snk-config-modal.js +6 -0
  94. package/dist/components/snk-config-modal2.js +91 -0
  95. package/dist/components/snk-config-options.d.ts +11 -0
  96. package/dist/components/snk-config-options.js +6 -0
  97. package/dist/components/snk-config-options2.js +245 -0
  98. package/dist/components/snk-configurator.d.ts +11 -0
  99. package/dist/components/snk-configurator.js +6 -0
  100. package/dist/components/snk-configurator2.js +212 -0
  101. package/dist/components/snk-crud.js +76 -26
  102. package/dist/components/snk-data-unit.js +4 -13
  103. package/dist/components/snk-field-config.d.ts +11 -0
  104. package/dist/components/snk-field-config.js +6 -0
  105. package/dist/components/snk-field-config2.js +70 -0
  106. package/dist/components/snk-filter-bar2.js +354 -148
  107. package/dist/components/snk-filter-binary-select.js +5 -1
  108. package/dist/components/snk-filter-detail2.js +62 -5
  109. package/dist/components/snk-filter-item2.js +52 -33
  110. package/dist/components/snk-filter-list2.js +60 -22
  111. package/dist/components/snk-filter-modal.d.ts +11 -0
  112. package/dist/components/snk-filter-modal.js +6 -0
  113. package/dist/components/snk-filter-modal2.js +84 -0
  114. package/dist/components/snk-filter-multi-select.js +6 -2
  115. package/dist/components/snk-filter-number.js +6 -2
  116. package/dist/components/snk-filter-period.js +5 -1
  117. package/dist/components/snk-filter-personalized.d.ts +11 -0
  118. package/dist/components/snk-filter-personalized.js +108 -0
  119. package/dist/components/snk-filter-search.js +5 -12
  120. package/dist/components/snk-filter-text.js +1 -1
  121. package/dist/components/snk-form-config.d.ts +11 -0
  122. package/dist/components/snk-form-config.js +6 -0
  123. package/dist/components/snk-form-config2.js +996 -0
  124. package/dist/components/snk-form2.js +79 -29
  125. package/dist/components/snk-grid2.js +57 -32
  126. package/dist/components/snk-pesquisa2.js +1 -1
  127. package/dist/components/snk-tab-config.d.ts +11 -0
  128. package/dist/components/snk-tab-config.js +6 -0
  129. package/dist/components/snk-tab-config2.js +7220 -0
  130. package/dist/components/snk-taskbar2.js +28 -10
  131. package/dist/components/teste-pesquisa.js +1 -1
  132. package/dist/{sankhyablocks/SnkMessageBuilder-a7da466b.js → esm/SnkMessageBuilder-5792c260.js} +108 -131
  133. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  134. package/dist/esm/configurableElementsStorage-cdc144b5.js +18 -0
  135. package/dist/esm/constants-c6039d3d.js +74 -0
  136. package/dist/esm/draggable.bundle-41d56f06.js +6884 -0
  137. package/dist/esm/{filter-item-type.enum-61fbf80a.js → filter-item-type.enum-a79b2fa8.js} +2 -0
  138. package/dist/esm/form-config-fetcher-96c6c2dc.js +6889 -0
  139. package/dist/{sankhyablocks/index-2b4d2d14.js → esm/index-e4121713.js} +165 -1466
  140. package/dist/esm/loader.js +2 -18
  141. package/dist/esm/sankhyablocks.js +4 -116
  142. package/dist/esm/snk-application.entry.js +308 -7174
  143. package/dist/esm/snk-config-modal.entry.js +58 -0
  144. package/dist/esm/snk-config-options.entry.js +226 -0
  145. package/dist/esm/snk-configurator_6.entry.js +1147 -0
  146. package/dist/esm/snk-crud.entry.js +20 -12
  147. package/dist/esm/snk-data-unit.entry.js +5 -13
  148. package/dist/esm/snk-field-config_2.entry.js +130 -0
  149. package/dist/esm/snk-filter-binary-select.entry.js +5 -2
  150. package/dist/esm/snk-filter-detail.entry.js +62 -5
  151. package/dist/esm/snk-filter-multi-select.entry.js +6 -3
  152. package/dist/esm/snk-filter-number.entry.js +6 -3
  153. package/dist/esm/snk-filter-period.entry.js +5 -2
  154. package/dist/esm/snk-filter-personalized.entry.js +85 -0
  155. package/dist/esm/snk-filter-search.entry.js +6 -12
  156. package/dist/esm/snk-filter-text.entry.js +2 -2
  157. package/dist/esm/snk-form-config.entry.js +953 -0
  158. package/dist/esm/snk-form.entry.js +40 -27
  159. package/dist/esm/snk-pesquisa.entry.js +2 -2
  160. package/dist/esm/snk-tab-config.entry.js +317 -0
  161. package/dist/{sankhyablocks/taskbar-elements-35d64ff9.js → esm/taskbar-elements-e2ed0536.js} +10 -6
  162. package/dist/esm/teste-pesquisa.entry.js +2 -2
  163. package/dist/sankhyablocks/index.esm.js +0 -1
  164. package/dist/sankhyablocks/p-029ae4e4.entry.js +1 -0
  165. package/dist/sankhyablocks/p-03f9c407.js +1 -0
  166. package/dist/sankhyablocks/p-112455b1.js +1 -0
  167. package/dist/sankhyablocks/p-12ad2a19.entry.js +1 -0
  168. package/dist/sankhyablocks/p-1feabfc7.entry.js +1 -0
  169. package/dist/sankhyablocks/p-21c8929b.js +1 -0
  170. package/dist/sankhyablocks/p-2284c850.entry.js +1 -0
  171. package/dist/sankhyablocks/p-2b891c4a.entry.js +1 -0
  172. package/dist/sankhyablocks/p-2dc76d79.entry.js +1 -0
  173. package/dist/sankhyablocks/p-361299e8.js +26 -0
  174. package/dist/sankhyablocks/p-3a276f3d.entry.js +1 -0
  175. package/dist/sankhyablocks/p-400cc777.entry.js +1 -0
  176. package/dist/sankhyablocks/p-44ce5b90.entry.js +1 -0
  177. package/dist/sankhyablocks/p-521c96f0.entry.js +1 -0
  178. package/dist/sankhyablocks/p-6988f4a6.entry.js +1 -0
  179. package/dist/sankhyablocks/p-776ff4d1.entry.js +1 -0
  180. package/dist/sankhyablocks/p-7b4a4a50.entry.js +1 -0
  181. package/dist/sankhyablocks/p-9ba3df4c.js +2 -0
  182. package/dist/sankhyablocks/p-9dc4426d.entry.js +1 -0
  183. package/dist/sankhyablocks/p-9dd2b8cb.js +1 -0
  184. package/dist/sankhyablocks/p-a17a4fca.entry.js +1 -0
  185. package/dist/sankhyablocks/p-a5b26df2.js +1 -0
  186. package/dist/sankhyablocks/p-b6d6b172.js +1 -0
  187. package/dist/sankhyablocks/p-cc4bef9f.entry.js +1 -0
  188. package/dist/sankhyablocks/p-d50651a3.js +1 -0
  189. package/dist/sankhyablocks/p-d690b6b5.entry.js +75 -0
  190. package/dist/sankhyablocks/p-d9fbb26f.js +1 -0
  191. package/dist/sankhyablocks/p-deb1f523.entry.js +1 -0
  192. package/dist/sankhyablocks/p-e871aa92.entry.js +1 -0
  193. package/dist/sankhyablocks/p-e9beab79.entry.js +1 -0
  194. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -129
  195. package/dist/types/components/snk-application/snk-application.d.ts +38 -16
  196. package/dist/types/components/snk-configurator/snk-configurator.d.ts +46 -0
  197. package/dist/types/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.d.ts +8 -0
  198. package/dist/types/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.d.ts +38 -0
  199. package/dist/types/components/snk-crud/snk-crud.d.ts +50 -0
  200. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +92 -0
  201. package/dist/types/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.d.ts +4 -0
  202. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +1 -0
  203. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +2 -0
  204. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +2 -0
  205. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
  206. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +24 -0
  207. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +4 -5
  208. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +1 -0
  209. package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +3 -1
  210. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +7 -1
  211. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +40 -0
  212. package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +8 -3
  213. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +26 -0
  214. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +31 -17
  215. package/dist/types/components/snk-form/snk-form.d.ts +71 -0
  216. package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +51 -0
  217. package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +32 -0
  218. package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +139 -0
  219. package/dist/types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.d.ts +97 -0
  220. package/dist/types/components/snk-grid/snk-grid.d.ts +59 -0
  221. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +6 -5
  222. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -3
  223. package/dist/types/components.d.ts +424 -24
  224. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +1 -0
  225. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +21 -3
  226. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +7 -7
  227. package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
  228. package/dist/types/lib/index.d.ts +1 -0
  229. package/dist/types/lib/message/resources/crud-utils.msg.d.ts +2 -0
  230. package/dist/types/lib/message/resources/snk-configurator.msg.d.ts +2 -0
  231. package/dist/types/lib/message/resources/snk-form.msg.d.ts +5 -2
  232. package/dist/types/lib/utils/CrudUtils.d.ts +6 -0
  233. package/dist/types/lib/utils/constants.d.ts +76 -0
  234. package/dist/types/lib/utils/pesquisa.d.ts +2 -1
  235. package/package.json +4 -3
  236. package/react/components.d.ts +25 -0
  237. package/react/components.js +25 -0
  238. package/react/components.js.map +1 -1
  239. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  240. package/dist/cjs/css-shim-b8158822.js +0 -6
  241. package/dist/cjs/dom-36862b77.js +0 -75
  242. package/dist/cjs/index-02201bc9.js +0 -2397
  243. package/dist/cjs/shadow-css-346c0795.js +0 -389
  244. package/dist/cjs/snk-filter-bar.cjs.entry.js +0 -278
  245. package/dist/cjs/snk-filter-item.cjs.entry.js +0 -154
  246. package/dist/cjs/snk-filter-list.cjs.entry.js +0 -91
  247. package/dist/cjs/snk-grid.cjs.entry.js +0 -79
  248. package/dist/cjs/snk-taskbar.cjs.entry.js +0 -160
  249. package/dist/components/index2.js +0 -2384
  250. package/dist/esm/SnkMessageBuilder-a7da466b.js +0 -303
  251. package/dist/esm/app-globals-0f993ce5.js +0 -3
  252. package/dist/esm/css-shim-b3f2ee8d.js +0 -4
  253. package/dist/esm/dom-665d6011.js +0 -73
  254. package/dist/esm/index-2b4d2d14.js +0 -3262
  255. package/dist/esm/index-f1d3e4da.js +0 -2384
  256. package/dist/esm/shadow-css-b18e99d7.js +0 -387
  257. package/dist/esm/snk-filter-bar.entry.js +0 -274
  258. package/dist/esm/snk-filter-item.entry.js +0 -150
  259. package/dist/esm/snk-filter-list.entry.js +0 -87
  260. package/dist/esm/snk-grid.entry.js +0 -75
  261. package/dist/esm/snk-taskbar.entry.js +0 -156
  262. package/dist/esm/taskbar-elements-35d64ff9.js +0 -90
  263. package/dist/sankhyablocks/app-globals-0f993ce5.js +0 -3
  264. package/dist/sankhyablocks/css-shim-b3f2ee8d.js +0 -4
  265. package/dist/sankhyablocks/dom-665d6011.js +0 -73
  266. package/dist/sankhyablocks/filter-item-type.enum-61fbf80a.js +0 -12
  267. package/dist/sankhyablocks/index-f1d3e4da.js +0 -2384
  268. package/dist/sankhyablocks/shadow-css-b18e99d7.js +0 -387
  269. package/dist/sankhyablocks/snk-crud.entry.js +0 -66
  270. package/dist/sankhyablocks/snk-data-unit.entry.js +0 -276
  271. package/dist/sankhyablocks/snk-filter-bar.entry.js +0 -274
  272. package/dist/sankhyablocks/snk-filter-binary-select.entry.js +0 -43
  273. package/dist/sankhyablocks/snk-filter-detail.entry.js +0 -45
  274. package/dist/sankhyablocks/snk-filter-item.entry.js +0 -150
  275. package/dist/sankhyablocks/snk-filter-list.entry.js +0 -87
  276. package/dist/sankhyablocks/snk-filter-multi-select.entry.js +0 -19
  277. package/dist/sankhyablocks/snk-filter-number.entry.js +0 -20
  278. package/dist/sankhyablocks/snk-filter-period.entry.js +0 -33
  279. package/dist/sankhyablocks/snk-filter-search.entry.js +0 -40
  280. package/dist/sankhyablocks/snk-filter-text.entry.js +0 -18
  281. package/dist/sankhyablocks/snk-form.entry.js +0 -129
  282. package/dist/sankhyablocks/snk-grid.entry.js +0 -75
  283. package/dist/sankhyablocks/snk-pesquisa.entry.js +0 -311
  284. package/dist/sankhyablocks/snk-taskbar.entry.js +0 -156
  285. package/dist/sankhyablocks/taskbar-processor-aa6772c9.js +0 -45
  286. package/dist/sankhyablocks/teste-pesquisa.entry.js +0 -33
@@ -1,150 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-2b4d2d14.js';
2
- import { F as FloatingManager } from './index-f1d3e4da.js';
3
- import { F as FilterItemType } from './filter-item-type.enum-61fbf80a.js';
4
-
5
- const SnkFilterItem = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.filterChange = createEvent(this, "filterChange", 7);
9
- this.innerClickCheck = (floatingContainer, node) => {
10
- if (this._popover.keepOpened) {
11
- return true;
12
- }
13
- if (node && floatingContainer) {
14
- if (!node.offsetParent) {
15
- return true;
16
- }
17
- let current = node;
18
- do {
19
- if (current === floatingContainer) {
20
- return true;
21
- }
22
- } while ((current = current.offsetParent) != null);
23
- }
24
- this.detailIsVisible = false;
25
- return false;
26
- };
27
- }
28
- async showUp(open = false) {
29
- this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
30
- if (open) {
31
- window.requestAnimationFrame(() => {
32
- this.showDetail();
33
- });
34
- }
35
- }
36
- showDetail() {
37
- this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: this.getScrollOffset() });
38
- this.detailIsVisible = true;
39
- }
40
- getScrollOffset() {
41
- return `${this._filterItemElement.getBoundingClientRect().left + 12}px`;
42
- }
43
- hideDetail() {
44
- if (this._floatingID != undefined) {
45
- FloatingManager.close(this._floatingID);
46
- }
47
- this._floatingID = undefined;
48
- this.detailIsVisible = false;
49
- }
50
- //---------------------------------------------
51
- // Event handlers
52
- //---------------------------------------------
53
- clickListener(evt) {
54
- if ([this._chipElement, this._leftIconElement, this._rightIconElement].includes(evt.target)) {
55
- if (evt.target === this._rightIconElement && this.config.value != undefined) {
56
- this.filterChange.emit(Object.assign(Object.assign({}, this.config), { value: undefined }));
57
- }
58
- else {
59
- if (this.detailIsVisible) {
60
- this.hideDetail();
61
- }
62
- else {
63
- this.showDetail();
64
- }
65
- }
66
- evt.preventDefault();
67
- evt.stopImmediatePropagation();
68
- evt.stopPropagation();
69
- }
70
- }
71
- mouseDownListener(evt) {
72
- if (this.detailIsVisible && [this._chipElement, this._leftIconElement, this._rightIconElement].includes(evt.target)) {
73
- evt.preventDefault();
74
- evt.stopImmediatePropagation();
75
- evt.stopPropagation();
76
- }
77
- }
78
- getLabel() {
79
- const { type, value, label, props } = this.config;
80
- if (value) {
81
- if (type === FilterItemType.BINARY_SELECT) {
82
- const [optOne, optTwo] = props.options;
83
- if (optOne.name === value) {
84
- return optOne.label;
85
- }
86
- if (optTwo.name === value) {
87
- return optTwo.label;
88
- }
89
- }
90
- if (type === FilterItemType.MULTI_SELECT) {
91
- const opt = props.options.find(opt => opt.value === value);
92
- return `${label}: ${opt.label}`;
93
- }
94
- if (type === FilterItemType.PERIOD) {
95
- let { end, start } = value;
96
- if (typeof end === "string") {
97
- end = new Date(end);
98
- end.setMinutes(end.getMinutes() + end.getTimezoneOffset());
99
- }
100
- if (typeof start === "string") {
101
- start = new Date(start);
102
- start.setMinutes(start.getMinutes() + start.getTimezoneOffset());
103
- }
104
- const dateFormater = new Intl.DateTimeFormat("pt-BR");
105
- if (end && start) {
106
- return `${label}: ${dateFormater.format(start)} a ${dateFormater.format(end)}`;
107
- }
108
- else {
109
- if (start) {
110
- return `${label}: A partir de ${dateFormater.format(start)}`;
111
- }
112
- else if (end) {
113
- return `${label}: Até ${dateFormater.format(end)}`;
114
- }
115
- else {
116
- return label;
117
- }
118
- }
119
- }
120
- if (type === FilterItemType.SEARCH) {
121
- return `${label}: ${value.value} - ${value.label}`;
122
- }
123
- return `${label}: ${value}`;
124
- }
125
- return label;
126
- }
127
- componentDidRender() {
128
- if (this._floatingID == undefined) {
129
- if (this._popover) {
130
- this._popover.remove();
131
- }
132
- }
133
- }
134
- filterChangeListener() {
135
- this.hideDetail();
136
- }
137
- getIconName() {
138
- if (this.config.value != undefined) {
139
- return "close";
140
- }
141
- return this.detailIsVisible ? "chevron-up" : "chevron-down";
142
- }
143
- render() {
144
- const leftIcon = this.config.type === FilterItemType.PERIOD ? "calendar" : undefined;
145
- return (h(Host, null, h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getIconName(), class: "ez-padding-left--small", slot: "rightIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem, key: this.config.id }))));
146
- }
147
- get _filterItemElement() { return getElement(this); }
148
- };
149
-
150
- export { SnkFilterItem as snk_filter_item };
@@ -1,87 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-2b4d2d14.js';
2
- import { F as FloatingManager, g as ArrayUtils } from './index-f1d3e4da.js';
3
-
4
- const SHOW_MORE_ITEM_NAME = "__SHOWMORE__";
5
- const MAX_FILTERS = 5;
6
- const SnkFilterList = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.snkItemSelected = createEvent(this, "snkItemSelected", 7);
10
- this.innerClickCheck = (floatingContainer, node) => {
11
- if (node && floatingContainer) {
12
- if (!node.offsetParent) {
13
- return true;
14
- }
15
- let current = node;
16
- do {
17
- if (current === floatingContainer || current === this._element) {
18
- return true;
19
- }
20
- } while ((current = current.offsetParent) != null);
21
- }
22
- this._detailIsVisible = false;
23
- return false;
24
- };
25
- }
26
- showList() {
27
- this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck });
28
- this._detailIsVisible = true;
29
- this._showAll = false;
30
- this._filterArgument = "";
31
- }
32
- hideList() {
33
- if (this._floatingID != undefined) {
34
- FloatingManager.close(this._floatingID);
35
- }
36
- this._floatingID = undefined;
37
- this._detailIsVisible = false;
38
- }
39
- buttonClick() {
40
- if (this._detailIsVisible) {
41
- this.hideList();
42
- }
43
- else {
44
- this.showList();
45
- }
46
- }
47
- componentDidRender() {
48
- if (this._floatingID == undefined) {
49
- if (this._popover) {
50
- this._popover.remove();
51
- }
52
- }
53
- }
54
- buildItemElement(item) {
55
- return (h("div", { class: "ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item", onClick: () => this.itemSelected(item.name) }, item.iconName ? h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
56
- }
57
- itemSelected(itemName) {
58
- if (itemName === SHOW_MORE_ITEM_NAME) {
59
- this._showAll = true;
60
- }
61
- else {
62
- this.hideList();
63
- this.snkItemSelected.emit(itemName);
64
- }
65
- }
66
- getFilterItems() {
67
- const items = this.items ? ArrayUtils.applyStringFilter(this._filterArgument, this.items.filter(item => item.kind === "FILTER")) : [];
68
- if (items.length === 0) {
69
- return h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-items-container--empty" }, this.emptyText);
70
- }
71
- const hideItems = !this._filterArgument && !this._showAll && (items.length > MAX_FILTERS + 1);
72
- if (hideItems) {
73
- items.splice(MAX_FILTERS);
74
- items.push({ kind: "INTERNAL", label: "Mostrar mais", iconName: "dots-horizontal", name: SHOW_MORE_ITEM_NAME, iconClass: "snk-filter-bar__filter-list-item__icon--secondary", labelClass: "snk-filter-bar__filter-list-item__label--secondary" });
75
- }
76
- return h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-list-items-container" }, items.map(item => this.buildItemElement(item)));
77
- }
78
- getFooterItems() {
79
- return this.items.filter(item => item.kind === "FOOTER");
80
- }
81
- render() {
82
- return (h(Host, { class: "ez-flex ez-flex--column" }, h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, h("slot", { name: "leftIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, h("ez-filter-input", { ref: ref => this._filterInput = ref, mode: "slim", label: this.findFilterText, value: this._filterArgument, onEzChange: (evt) => this._filterArgument = evt.detail }), this.getFilterItems(), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
83
- }
84
- get _element() { return getElement(this); }
85
- };
86
-
87
- export { SnkFilterList as snk_filter_list };
@@ -1,75 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, g as getElement } from './index-2b4d2d14.js';
2
- import { A as ApplicationContext } from './index-f1d3e4da.js';
3
- import { T as TaskbarElement } from './taskbar-elements-35d64ff9.js';
4
- import { T as TaskbarProcessor } from './taskbar-processor-aa6772c9.js';
5
-
6
- const snkGridCss = ".snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{display:flex;flex-wrap:nowrap;width:100%}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--small)}";
7
-
8
- const SnkGrid = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.actionClick = createEvent(this, "actionClick", 7);
12
- this.gridDoubleClick = createEvent(this, "gridDoubleClick", 7);
13
- this._topTaskbarProcessor = new TaskbarProcessor({
14
- "snkGridTopTaskbar": ["FORM_MODE", "CONFIG_GRID", "INSERT"]
15
- });
16
- this._headerTaskbarProcessor = new TaskbarProcessor({
17
- "snkGridHeaderTaskbar.unselected": ["REFRESH"],
18
- "snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
19
- });
20
- }
21
- actionClickHandler(evt) {
22
- if (evt.detail === TaskbarElement.CONFIG_GRID && this._grid) {
23
- this._grid.openGridConfig();
24
- }
25
- }
26
- saveConfig(config) {
27
- const snkApplication = ApplicationContext.getContextValue("__SNK__APPLICATION__");
28
- if (snkApplication) {
29
- snkApplication.saveGridConfig(config);
30
- }
31
- }
32
- componentWillLoad() {
33
- const snkApplication = ApplicationContext.getContextValue("__SNK__APPLICATION__");
34
- if (snkApplication) {
35
- snkApplication.loadGridConfig(this.configName).then(cfg => {
36
- this._gridConfig = cfg;
37
- this._configLoaded = true;
38
- });
39
- //Forçamos a carga dos acessos pra aproveitar a request inicial.
40
- snkApplication.getAllAccess();
41
- }
42
- let parent = this._element.parentElement;
43
- while (parent) {
44
- if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
45
- this._snkDataUnit = parent;
46
- this._dataUnit = this._snkDataUnit.dataUnit;
47
- if (!this._dataUnit) {
48
- this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
49
- this._dataUnit = evt.detail;
50
- });
51
- }
52
- this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
53
- this._dataState = evt.detail;
54
- });
55
- break;
56
- }
57
- parent = parent.parentElement;
58
- }
59
- }
60
- componentWillRender() {
61
- const headerTaskbarId = this._dataState && this._dataState.selectedRecords.length > 0 ? "snkGridHeaderTaskbar.selected" : "snkGridHeaderTaskbar.unselected";
62
- this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState);
63
- this._topTaskbarProcessor.process("snkGridTopTaskbar", this.taskbarManager, this._dataState);
64
- }
65
- render() {
66
- if (!this._configLoaded || !this._dataUnit) {
67
- return undefined;
68
- }
69
- 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", onActionClick: evt => this.actionClickHandler(evt), key: "topTaskbar", 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.saveConfig(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" }))));
70
- }
71
- get _element() { return getElement(this); }
72
- };
73
- SnkGrid.style = snkGridCss;
74
-
75
- export { SnkGrid as snk_grid };
@@ -1,156 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, f as Host } from './index-2b4d2d14.js';
2
- import { A as ApplicationContext } from './index-f1d3e4da.js';
3
- import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-35d64ff9.js';
4
-
5
- const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
6
-
7
- const SnkTaskbar = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.actionClick = createEvent(this, "actionClick", 7);
11
- this._titleKeyByElement = {
12
- [TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
13
- [TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
14
- [TaskbarElement.NEXT]: "snkTaskbar.titleNext",
15
- [TaskbarElement.REFRESH]: "snkTaskbar.titleRefresh",
16
- [TaskbarElement.CLONE]: "snkTaskbar.titleClone",
17
- [TaskbarElement.REMOVE]: "snkTaskbar.titleRemove",
18
- [TaskbarElement.MORE_OPTIONS]: "snkTaskbar.titleMoreOptions",
19
- [TaskbarElement.INSERT]: "snkTaskbar.titleInsert",
20
- [TaskbarElement.CANCEL]: "snkTaskbar.titleCancel",
21
- [TaskbarElement.SAVE]: "snkTaskbar.titleSave",
22
- [TaskbarElement.GRID_MODE]: "snkTaskbar.titleGridMode",
23
- [TaskbarElement.CONFIG_GRID]: "snkTaskbar.titleConfigGrid",
24
- [TaskbarElement.FORM_MODE]: "snkTaskbar.titleFormMode"
25
- };
26
- }
27
- observeButtons() {
28
- this._definitions = undefined;
29
- }
30
- // Internal methods
31
- elementsFromString(strButtons) {
32
- const elements = [];
33
- if (strButtons) {
34
- strButtons.split(",").forEach(buttonName => {
35
- buttonName = buttonName.trim();
36
- if (VisibleWhenForbidden[buttonName] || this.isAllowed(buttonName)) {
37
- elements.push(buttonName.trim());
38
- }
39
- });
40
- }
41
- return elements;
42
- }
43
- isAllowed(buttonName) {
44
- if (AuthorizationElements[buttonName]) {
45
- return this._permissions ? this._permissions.isSup || this._permissions[buttonName] : false;
46
- }
47
- return true;
48
- }
49
- /**
50
- * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
51
- * através de um pequeno modulo na estrutura da aplicação:
52
- * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
53
- * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-taskbar.msg.ts"
54
- */
55
- getTitle(element) {
56
- let key;
57
- if (this.isAllowed(element)) {
58
- key = this._titleKeyByElement[element];
59
- }
60
- else {
61
- key = "snkTaskbar.forbidden";
62
- }
63
- return key ? this._application.messagesBuilder.getMessage(key, {}) : "";
64
- }
65
- elementClick(elem) {
66
- if (this.dataUnit) {
67
- switch (elem) {
68
- case TaskbarElement.PREVIOUS:
69
- this.dataUnit.previousRecord();
70
- break;
71
- case TaskbarElement.NEXT:
72
- this.dataUnit.nextRecord();
73
- break;
74
- case TaskbarElement.REFRESH:
75
- this.dataUnit.loadData();
76
- break;
77
- case TaskbarElement.CLONE:
78
- this.dataUnit.copySelected();
79
- break;
80
- case TaskbarElement.REMOVE:
81
- this.dataUnit.removeSelectedRecords();
82
- break;
83
- case TaskbarElement.INSERT:
84
- this.dataUnit.addRecord();
85
- break;
86
- case TaskbarElement.CANCEL:
87
- this.dataUnit.cancelEdition();
88
- break;
89
- case TaskbarElement.SAVE:
90
- this.dataUnit.saveData();
91
- break;
92
- }
93
- }
94
- this.actionClick.emit(elem);
95
- }
96
- isEnabled(elem) {
97
- if (!this.isAllowed(elem)) {
98
- return false;
99
- }
100
- return !(this.disabledButtons && this.disabledButtons.includes(elem));
101
- }
102
- getElement(index, def) {
103
- let className = def === this.primaryButton ? "ez-button--primary " : "";
104
- if (index > 1) {
105
- className += "ez-padding-left--medium";
106
- }
107
- if (TaskbarElement[def.toString()]) {
108
- return buildElem(def, className, elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.actionsList);
109
- }
110
- else {
111
- return buildCustomButton(def, className, elem => this.elementClick(elem), elem => this.isEnabled(elem));
112
- }
113
- }
114
- // Lifecycle
115
- componentWillLoad() {
116
- this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
117
- if (this._application) {
118
- this._application.getAllAccess().then(access => this._permissions = access);
119
- }
120
- else {
121
- this._permissions = {};
122
- }
123
- }
124
- componentWillRender() {
125
- if (this._definitions == undefined && this._permissions) {
126
- this._definitions = this.elementsFromString(this.buttons);
127
- }
128
- }
129
- render() {
130
- if (this._definitions === undefined) {
131
- return undefined;
132
- }
133
- let index = 0;
134
- return (h(Host, null, this._definitions.map((elem) => {
135
- if (elem === TaskbarElement.DIVIDER) {
136
- index = 0;
137
- }
138
- else {
139
- index++;
140
- }
141
- if (TaskbarElement[elem]) {
142
- return this.getElement(index, TaskbarElement[elem]);
143
- }
144
- if (this.customButtons.has(elem)) {
145
- return this.getElement(index, this.customButtons.get(elem));
146
- }
147
- return h("slot", { name: elem });
148
- })));
149
- }
150
- static get watchers() { return {
151
- "buttons": ["observeButtons"]
152
- }; }
153
- };
154
- SnkTaskbar.style = snkTaskbarCss;
155
-
156
- export { SnkTaskbar as snk_taskbar };
@@ -1,90 +0,0 @@
1
- import { h } from './index-2b4d2d14.js';
2
-
3
- var TaskbarElement;
4
- (function (TaskbarElement) {
5
- TaskbarElement["PREVIOUS"] = "PREVIOUS";
6
- TaskbarElement["NEXT"] = "NEXT";
7
- TaskbarElement["REFRESH"] = "REFRESH";
8
- TaskbarElement["UPDATE"] = "UPDATE";
9
- TaskbarElement["CLONE"] = "CLONE";
10
- TaskbarElement["REMOVE"] = "REMOVE";
11
- TaskbarElement["INSERT"] = "INSERT";
12
- TaskbarElement["CANCEL"] = "CANCEL";
13
- TaskbarElement["SAVE"] = "SAVE";
14
- TaskbarElement["GRID_MODE"] = "GRID_MODE";
15
- TaskbarElement["FORM_MODE"] = "FORM_MODE";
16
- TaskbarElement["CONFIG_GRID"] = "CONFIG_GRID";
17
- TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
18
- TaskbarElement["DIVIDER"] = "DIVIDER";
19
- })(TaskbarElement || (TaskbarElement = {}));
20
- var AuthorizationElements;
21
- (function (AuthorizationElements) {
22
- AuthorizationElements["UPDATE"] = "UPDATE";
23
- AuthorizationElements["CLONE"] = "CLONE";
24
- AuthorizationElements["REMOVE"] = "REMOVE";
25
- AuthorizationElements["INSERT"] = "INSERT";
26
- AuthorizationElements["CONFIG_GRID"] = "CONFIG_GRID";
27
- })(AuthorizationElements || (AuthorizationElements = {}));
28
- var VisibleWhenForbidden;
29
- (function (VisibleWhenForbidden) {
30
- VisibleWhenForbidden["CONFIG_GRID"] = "CONFIG_GRID";
31
- })(VisibleWhenForbidden || (VisibleWhenForbidden = {}));
32
- 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
- const buildElem = (element, className, getTitle, action, isEnabled, actions) => {
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.CONFIG_GRID:
72
- return iconButton("settings-inverted", element, className, title, action, isEnabled);
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) },
87
- h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
88
- }
89
-
90
- export { AuthorizationElements as A, TaskbarElement as T, VisibleWhenForbidden as V, buildCustomButton as a, buildElem as b };
@@ -1,3 +0,0 @@
1
- const globalScripts = () => {};
2
-
3
- export { globalScripts as g };
@@ -1,4 +0,0 @@
1
- /*
2
- Stencil Client Patch Esm v2.18.1 | MIT Licensed | https://stenciljs.com
3
- */
4
- var __assign=undefined&&undefined.__assign||function(){return (__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r);}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE;}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return "\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return {start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return {start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t);}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else {if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s);}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value;}));}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0);})),!t)return "break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return [];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove();}})).catch((function(e){console.error(e);}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window);