@sankhyalabs/sankhyablocks 1.1.28 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +75 -75
  3. package/package.json +94 -52
  4. package/react/.keepfolder +1 -0
  5. package/dist/cjs/ApplicationUtils-05b74ee9.js +0 -39
  6. package/dist/cjs/AssetsUtils-7e3c38f9.js +0 -24
  7. package/dist/cjs/CSSVarsUtils-75ca9c64.js +0 -19
  8. package/dist/cjs/_commonjsHelpers-537d719a.js +0 -20
  9. package/dist/cjs/ez-action-chip.cjs.entry.js +0 -27
  10. package/dist/cjs/ez-application.cjs.entry.js +0 -26
  11. package/dist/cjs/ez-button_4.cjs.entry.js +0 -660
  12. package/dist/cjs/ez-calendar.cjs.entry.js +0 -223
  13. package/dist/cjs/ez-collapsible-box.cjs.entry.js +0 -47
  14. package/dist/cjs/ez-combo-box.cjs.entry.js +0 -278
  15. package/dist/cjs/ez-date-input.cjs.entry.js +0 -102
  16. package/dist/cjs/ez-date-time-input.cjs.entry.js +0 -145
  17. package/dist/cjs/ez-dialog.cjs.entry.js +0 -89
  18. package/dist/cjs/ez-form.cjs.entry.js +0 -785
  19. package/dist/cjs/ez-grid.cjs.entry.js +0 -110485
  20. package/dist/cjs/ez-icon.cjs.entry.js +0 -41
  21. package/dist/cjs/ez-label-chip.cjs.entry.js +0 -104
  22. package/dist/cjs/ez-modal_2.cjs.entry.js +0 -316
  23. package/dist/cjs/ez-number-input.cjs.entry.js +0 -86
  24. package/dist/cjs/ez-popover.cjs.entry.js +0 -120
  25. package/dist/cjs/ez-popup.cjs.entry.js +0 -48
  26. package/dist/cjs/ez-search.cjs.entry.js +0 -64
  27. package/dist/cjs/ez-tabselector.cjs.entry.js +0 -198
  28. package/dist/cjs/ez-text-area.cjs.entry.js +0 -114
  29. package/dist/cjs/ez-text-input.cjs.entry.js +0 -201
  30. package/dist/cjs/ez-time-input.cjs.entry.js +0 -118
  31. package/dist/cjs/ez-toast.cjs.entry.js +0 -44
  32. package/dist/cjs/ez-upload.cjs.entry.js +0 -356
  33. package/dist/cjs/index-682c98b2.js +0 -1771
  34. package/dist/cjs/index.cjs.js +0 -2
  35. package/dist/cjs/loader.cjs.js +0 -21
  36. package/dist/cjs/sankhyablocks.cjs.js +0 -19
  37. package/dist/cjs/snk-application.cjs.entry.js +0 -7050
  38. package/dist/cjs/test-du.cjs.entry.js +0 -76
  39. package/dist/collection/collection-manifest.json +0 -47
  40. package/dist/collection/components/snk-application/snk-application.css +0 -5
  41. package/dist/collection/components/snk-application/snk-application.js +0 -492
  42. package/dist/collection/index.js +0 -1
  43. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +0 -158
  44. package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js +0 -23
  45. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +0 -188
  46. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +0 -25
  47. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +0 -2
  48. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +0 -59
  49. package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +0 -30
  50. package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js +0 -66
  51. package/dist/collection/lib/utils/pesquisa.js +0 -16
  52. package/dist/collection/lib/utils/urlutils.js +0 -23
  53. package/dist/collection/lib/workspace/workspace.js +0 -7
  54. package/dist/components/ApplicationUtils.js +0 -37
  55. package/dist/components/AssetsUtils.js +0 -22
  56. package/dist/components/CSSVarsUtils.js +0 -17
  57. package/dist/components/_commonjsHelpers.js +0 -17
  58. package/dist/components/ez-action-chip.js +0 -44
  59. package/dist/components/ez-application.js +0 -39
  60. package/dist/components/ez-button.js +0 -6
  61. package/dist/components/ez-button2.js +0 -105
  62. package/dist/components/ez-calendar.js +0 -6
  63. package/dist/components/ez-calendar2.js +0 -242
  64. package/dist/components/ez-check.js +0 -6
  65. package/dist/components/ez-check2.js +0 -94
  66. package/dist/components/ez-collapsible-box.js +0 -67
  67. package/dist/components/ez-combo-box.js +0 -6
  68. package/dist/components/ez-combo-box2.js +0 -311
  69. package/dist/components/ez-date-input.js +0 -135
  70. package/dist/components/ez-date-time-input.js +0 -179
  71. package/dist/components/ez-dialog.js +0 -124
  72. package/dist/components/ez-form.js +0 -6
  73. package/dist/components/ez-form2.js +0 -807
  74. package/dist/components/ez-grid.js +0 -110576
  75. package/dist/components/ez-icon.js +0 -6
  76. package/dist/components/ez-icon2.js +0 -56
  77. package/dist/components/ez-label-chip.js +0 -125
  78. package/dist/components/ez-list.js +0 -6
  79. package/dist/components/ez-list2.js +0 -523
  80. package/dist/components/ez-modal.js +0 -6
  81. package/dist/components/ez-modal2.js +0 -82
  82. package/dist/components/ez-number-input.js +0 -115
  83. package/dist/components/ez-popover.js +0 -145
  84. package/dist/components/ez-popup.js +0 -67
  85. package/dist/components/ez-search.js +0 -100
  86. package/dist/components/ez-tabselector.js +0 -6
  87. package/dist/components/ez-tabselector2.js +0 -213
  88. package/dist/components/ez-text-area.js +0 -137
  89. package/dist/components/ez-text-input.js +0 -6
  90. package/dist/components/ez-text-input2.js +0 -223
  91. package/dist/components/ez-time-input.js +0 -153
  92. package/dist/components/ez-toast.js +0 -64
  93. package/dist/components/ez-upload.js +0 -382
  94. package/dist/components/grid-config.js +0 -6
  95. package/dist/components/grid-config2.js +0 -318
  96. package/dist/components/index.d.ts +0 -26
  97. package/dist/components/index.js +0 -1
  98. package/dist/components/select-box.js +0 -6
  99. package/dist/components/select-box2.js +0 -47
  100. package/dist/components/snk-application.d.ts +0 -11
  101. package/dist/components/snk-application.js +0 -7079
  102. package/dist/components/test-du.js +0 -101
  103. package/dist/esm/ApplicationUtils-e0b6d857.js +0 -37
  104. package/dist/esm/AssetsUtils-6e6624dc.js +0 -22
  105. package/dist/esm/CSSVarsUtils-0787c3f3.js +0 -17
  106. package/dist/esm/_commonjsHelpers-9943807e.js +0 -17
  107. package/dist/esm/ez-action-chip.entry.js +0 -23
  108. package/dist/esm/ez-application.entry.js +0 -22
  109. package/dist/esm/ez-button_4.entry.js +0 -653
  110. package/dist/esm/ez-calendar.entry.js +0 -219
  111. package/dist/esm/ez-collapsible-box.entry.js +0 -43
  112. package/dist/esm/ez-combo-box.entry.js +0 -274
  113. package/dist/esm/ez-date-input.entry.js +0 -98
  114. package/dist/esm/ez-date-time-input.entry.js +0 -141
  115. package/dist/esm/ez-dialog.entry.js +0 -85
  116. package/dist/esm/ez-form.entry.js +0 -781
  117. package/dist/esm/ez-grid.entry.js +0 -110481
  118. package/dist/esm/ez-icon.entry.js +0 -37
  119. package/dist/esm/ez-label-chip.entry.js +0 -100
  120. package/dist/esm/ez-modal_2.entry.js +0 -311
  121. package/dist/esm/ez-number-input.entry.js +0 -82
  122. package/dist/esm/ez-popover.entry.js +0 -116
  123. package/dist/esm/ez-popup.entry.js +0 -44
  124. package/dist/esm/ez-search.entry.js +0 -60
  125. package/dist/esm/ez-tabselector.entry.js +0 -194
  126. package/dist/esm/ez-text-area.entry.js +0 -110
  127. package/dist/esm/ez-text-input.entry.js +0 -197
  128. package/dist/esm/ez-time-input.entry.js +0 -114
  129. package/dist/esm/ez-toast.entry.js +0 -40
  130. package/dist/esm/ez-upload.entry.js +0 -352
  131. package/dist/esm/index-35088a3f.js +0 -1740
  132. package/dist/esm/index.js +0 -1
  133. package/dist/esm/loader.js +0 -17
  134. package/dist/esm/polyfills/core-js.js +0 -11
  135. package/dist/esm/polyfills/css-shim.js +0 -1
  136. package/dist/esm/polyfills/dom.js +0 -79
  137. package/dist/esm/polyfills/es5-html-element.js +0 -1
  138. package/dist/esm/polyfills/index.js +0 -34
  139. package/dist/esm/polyfills/system.js +0 -6
  140. package/dist/esm/sankhyablocks.js +0 -17
  141. package/dist/esm/snk-application.entry.js +0 -7046
  142. package/dist/esm/test-du.entry.js +0 -72
  143. package/dist/index.cjs.js +0 -1
  144. package/dist/index.js +0 -1
  145. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-action-chip/ez-action-chip.css +0 -67
  146. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-application/ez-application.css +0 -3
  147. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-button/ez-button.css +0 -180
  148. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-calendar/ez-calendar.css +0 -319
  149. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-check/ez-check.css +0 -327
  150. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +0 -162
  151. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-combo-box/ez-combo-box.css +0 -217
  152. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-input/ez-date-input.css +0 -49
  153. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-time-input/ez-date-time-input.css +0 -44
  154. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-dialog/ez-dialog.css +0 -527
  155. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-form/ez-form.css +0 -5
  156. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/ez-grid.css +0 -31
  157. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +0 -129
  158. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +0 -10
  159. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-icon/ez-icon.css +0 -176
  160. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-label-chip/ez-label-chip.css +0 -139
  161. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-list/ez-list.css +0 -335
  162. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-modal/ez-modal.css +0 -358
  163. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-number-input/ez-number-input.css +0 -4
  164. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popover/ez-popover.css +0 -44
  165. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popup/ez-popup.css +0 -405
  166. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-search/ez-search.css +0 -3
  167. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -138
  168. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-area/ez-text-area.css +0 -165
  169. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-input/ez-text-input.css +0 -196
  170. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-time-input/ez-time-input.css +0 -10
  171. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-toast/ez-toast.css +0 -127
  172. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-upload/ez-upload.css +0 -568
  173. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/test-du/test-du.css +0 -3
  174. package/dist/sankhyablocks/index.esm.js +0 -0
  175. package/dist/sankhyablocks/p-0183d259.entry.js +0 -1
  176. package/dist/sankhyablocks/p-01f23a70.entry.js +0 -1
  177. package/dist/sankhyablocks/p-07c32f68.entry.js +0 -1
  178. package/dist/sankhyablocks/p-0f90499d.entry.js +0 -1
  179. package/dist/sankhyablocks/p-105724a3.entry.js +0 -1
  180. package/dist/sankhyablocks/p-112455b1.js +0 -1
  181. package/dist/sankhyablocks/p-2ac02d48.entry.js +0 -1
  182. package/dist/sankhyablocks/p-35364a97.entry.js +0 -1
  183. package/dist/sankhyablocks/p-3f6aa9a7.entry.js +0 -1
  184. package/dist/sankhyablocks/p-4811bc0a.entry.js +0 -369
  185. package/dist/sankhyablocks/p-5f9af495.entry.js +0 -1
  186. package/dist/sankhyablocks/p-60967cf0.js +0 -1
  187. package/dist/sankhyablocks/p-70ad6c16.entry.js +0 -1
  188. package/dist/sankhyablocks/p-710bfffe.entry.js +0 -1
  189. package/dist/sankhyablocks/p-73397a0f.entry.js +0 -57
  190. package/dist/sankhyablocks/p-811b4b9d.js +0 -1
  191. package/dist/sankhyablocks/p-813fe4f7.js +0 -1
  192. package/dist/sankhyablocks/p-85a9446b.js +0 -2
  193. package/dist/sankhyablocks/p-89a1100f.entry.js +0 -1
  194. package/dist/sankhyablocks/p-8b543003.entry.js +0 -1
  195. package/dist/sankhyablocks/p-9750632b.entry.js +0 -1
  196. package/dist/sankhyablocks/p-a96272f7.entry.js +0 -1
  197. package/dist/sankhyablocks/p-ac8842e5.entry.js +0 -1
  198. package/dist/sankhyablocks/p-ba64cc41.entry.js +0 -1
  199. package/dist/sankhyablocks/p-c1ede043.entry.js +0 -1
  200. package/dist/sankhyablocks/p-d90ebb85.entry.js +0 -1
  201. package/dist/sankhyablocks/p-e5355a29.entry.js +0 -1
  202. package/dist/sankhyablocks/p-ef04b633.entry.js +0 -1
  203. package/dist/sankhyablocks/p-f6db07fb.entry.js +0 -1
  204. package/dist/sankhyablocks/p-f80cabc7.entry.js +0 -1
  205. package/dist/sankhyablocks/p-fcd9bd92.entry.js +0 -1
  206. package/dist/sankhyablocks/sankhyablocks.esm.js +0 -1
  207. package/dist/types/components/snk-application/snk-application.d.ts +0 -44
  208. package/dist/types/components.d.ts +0 -66
  209. package/dist/types/index.d.ts +0 -1
  210. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +0 -15
  211. package/dist/types/lib/http/data-fetcher/fetchers/application-config-fetcher.d.ts +0 -6
  212. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +0 -12
  213. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +0 -5
  214. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +0 -2
  215. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +0 -13
  216. package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +0 -6
  217. package/dist/types/lib/http/data-fetcher/state/LoadStateManager.d.ts +0 -23
  218. package/dist/types/lib/utils/pesquisa.d.ts +0 -2
  219. package/dist/types/lib/utils/urlutils.d.ts +0 -4
  220. package/dist/types/lib/workspace/workspace.d.ts +0 -4
  221. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  222. package/loader/cdn.js +0 -3
  223. package/loader/index.cjs.js +0 -3
  224. package/loader/index.d.ts +0 -12
  225. package/loader/index.es2017.js +0 -3
  226. package/loader/index.js +0 -4
  227. package/loader/package.json +0 -10
  228. package/react/components.d.ts +0 -32
  229. package/react/components.js +0 -35
  230. package/react/components.js.map +0 -1
  231. package/react/react-component-lib/createComponent.d.ts +0 -10
  232. package/react/react-component-lib/createComponent.js +0 -75
  233. package/react/react-component-lib/createComponent.js.map +0 -1
  234. package/react/react-component-lib/createOverlayComponent.d.ts +0 -21
  235. package/react/react-component-lib/createOverlayComponent.js +0 -109
  236. package/react/react-component-lib/createOverlayComponent.js.map +0 -1
  237. package/react/react-component-lib/index.d.ts +0 -2
  238. package/react/react-component-lib/index.js +0 -3
  239. package/react/react-component-lib/index.js.map +0 -1
  240. package/react/react-component-lib/interfaces.d.ts +0 -29
  241. package/react/react-component-lib/interfaces.js +0 -1
  242. package/react/react-component-lib/interfaces.js.map +0 -1
  243. package/react/react-component-lib/utils/attachProps.d.ts +0 -12
  244. package/react/react-component-lib/utils/attachProps.js +0 -98
  245. package/react/react-component-lib/utils/attachProps.js.map +0 -1
  246. package/react/react-component-lib/utils/case.d.ts +0 -2
  247. package/react/react-component-lib/utils/case.js +0 -7
  248. package/react/react-component-lib/utils/case.js.map +0 -1
  249. package/react/react-component-lib/utils/dev.d.ts +0 -2
  250. package/react/react-component-lib/utils/dev.js +0 -13
  251. package/react/react-component-lib/utils/dev.js.map +0 -1
  252. package/react/react-component-lib/utils/index.d.ts +0 -10
  253. package/react/react-component-lib/utils/index.js +0 -34
  254. package/react/react-component-lib/utils/index.js.map +0 -1
@@ -1,223 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-682c98b2.js');
6
- const core = require('@sankhyalabs/core');
7
-
8
- const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);padding:0px;font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
9
-
10
- const EzCalendar = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.ezChange = index.createEvent(this, "ezChange", 7);
14
- this._firstRender = true;
15
- this._todayLabel = "Hoje";
16
- this._weekDayLabels = ["D", "S", "T", "Q", "Q", "S", "S"];
17
- this._monthLabels = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
18
- this._hoursLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"];
19
- this._minutosLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"];
20
- /**
21
- * A data selecionada no calendário
22
- */
23
- this.value = new Date();
24
- /**
25
- * No modo floating o calendário só se tornará visível
26
- * quando o método show() for acionado.
27
- */
28
- this.floating = false;
29
- /**
30
- * Exibe ou não as horas e minutos no calendario
31
- */
32
- this.time = false;
33
- /**
34
- * Exibe ou não os segundos no calendario
35
- */
36
- this.showSeconds = false;
37
- }
38
- /**
39
- * Usado no modo floating. Faz com que o componente seja exibido.
40
- * É possível determinar ajustes de posicionamento através dos parâmetros
41
- * top, left, bottom e right. Esses parâmetros devem ser informados como
42
- * strings no formato css.
43
- */
44
- async show(top, left, bottom, right) {
45
- if (this.floating) {
46
- this._floatingID = core.FloatingManager.float(this._box, this._container, { autoClose: true, top, left, bottom, right });
47
- window.requestAnimationFrame(() => {
48
- this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
49
- });
50
- this.scroll();
51
- }
52
- }
53
- /**
54
- * Método necessário para ajustar o posicionamento do calendar acima ou abaixo do ez-date-input conforme a disponibilidade de espaço.
55
- */
56
- async fitVertical(topOffset, bottomOffset) {
57
- const neededHeight = this._container.getBoundingClientRect().bottom + this._calendarHeight;
58
- const availableBottom = (window.innerHeight || document.documentElement.clientHeight) > neededHeight;
59
- if (availableBottom) {
60
- this.show(topOffset + "px", undefined, "unset");
61
- }
62
- else {
63
- this.show("unset", undefined, bottomOffset + "px");
64
- }
65
- }
66
- /**
67
- * Usado no modo floating. Faz com que o componente seja ocultado.
68
- */
69
- async hide() {
70
- if (this._floatingID !== undefined) {
71
- core.FloatingManager.close(this._floatingID);
72
- this._floatingID = undefined;
73
- }
74
- }
75
- valueChanged() {
76
- if (this.value) {
77
- this._currentPosition.setTime(this.value.getTime());
78
- this._currentPosition.setDate(1);
79
- }
80
- }
81
- getMonthLabel() {
82
- return this._monthLabels[this._currentPosition.getMonth()] + " " + this._currentPosition.getFullYear();
83
- }
84
- isSelectedDate(d) {
85
- if (this.value) {
86
- return this.value.getDate() == d.getDate() && this.value.getMonth() == d.getMonth() && this.value.getFullYear() == d.getFullYear();
87
- }
88
- return false;
89
- }
90
- changeMonth(offset) {
91
- this._currentPosition.setMonth(this._currentPosition.getMonth() + offset);
92
- index.forceUpdate(this);
93
- }
94
- selectDate(d) {
95
- let newDate = d;
96
- if (this.value && (this.time || this.showSeconds)) {
97
- newDate.setHours(this.value.getHours());
98
- newDate.setMinutes(this.value.getMinutes());
99
- if (this.showSeconds) {
100
- newDate.setSeconds(this.value.getSeconds());
101
- }
102
- else {
103
- newDate.setSeconds(0);
104
- }
105
- }
106
- this.value = newDate;
107
- this.ezChange.emit(this.value);
108
- }
109
- selectHours(hour) {
110
- if (!this.value) {
111
- this.value = new Date();
112
- }
113
- this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), hour, this.value.getMinutes(), this.value.getSeconds());
114
- this.ezChange.emit(this.value);
115
- }
116
- selectMinutes(minute) {
117
- if (!this.value) {
118
- this.value = new Date();
119
- }
120
- this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), minute, this.value.getSeconds());
121
- this.ezChange.emit(this.value);
122
- }
123
- selectSeconds(second) {
124
- if (!this.value) {
125
- this.value = new Date();
126
- }
127
- this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), this.value.getMinutes(), second);
128
- this.ezChange.emit(this.value);
129
- }
130
- updateScroll(element) {
131
- if (element) {
132
- const { scrollHeight, clientHeight, scrollTop } = element;
133
- const remainingScroll = scrollHeight - clientHeight - Math.ceil(scrollTop);
134
- if (remainingScroll > 0) {
135
- element.classList.add("endHidden");
136
- }
137
- else {
138
- element.classList.remove("endHidden");
139
- }
140
- }
141
- }
142
- componentDidRender() {
143
- if (this.floating && this._firstRender) {
144
- this._calendarHeight = this._box.clientHeight;
145
- this._box.remove();
146
- this._firstRender = false;
147
- }
148
- this.updateScroll(this._hoursScroll);
149
- this.updateScroll(this._minutesScroll);
150
- this.updateScroll(this._secondsScroll);
151
- }
152
- componentDidLoad() {
153
- this.scroll();
154
- }
155
- scroll() {
156
- if (this.time || this.showSeconds) {
157
- this._hoursScroll.scrollTop = this._hoursSelect.offsetTop - 64;
158
- this._minutesScroll.scrollTop = this._minutesSelect.offsetTop - 64;
159
- this.updateScroll(this._hoursScroll);
160
- this.updateScroll(this._minutesScroll);
161
- if (this.showSeconds) {
162
- this._secondsScroll.scrollTop = this._secondsSelect.offsetTop - 64;
163
- this.updateScroll(this._secondsScroll);
164
- }
165
- }
166
- }
167
- render() {
168
- if (this._currentPosition == null) {
169
- this._currentPosition = new Date();
170
- if (this.value) {
171
- this._currentPosition.setTime(this.value.getTime());
172
- }
173
- this._currentPosition.setDate(1);
174
- }
175
- const firstDate = new Date();
176
- firstDate.setTime(this._currentPosition.getTime());
177
- firstDate.setDate(1 - firstDate.getDay());
178
- return (index.h("section", { ref: elem => this._container = elem }, index.h("div", { ref: elem => this._box = elem, class: "calendar__container" }, index.h("div", { class: "calendar" }, index.h("div", { class: "calendar__header" }, index.h("button", { class: "calendar__btn-previous", onClick: () => this.changeMonth(-1) }), index.h("label", { class: "calendar__lbl-month" }, this.getMonthLabel()), index.h("button", { class: "calendar__btn-next", onClick: () => this.changeMonth(1) })), index.h("div", { class: "calendar__body" }, index.h("div", { class: "calendar__line" }, this._weekDayLabels.map(day => index.h("div", { class: "calendar__cell calendar__cell--unselectable" }, day))), [0, 7, 14, 21, 28, 35].map(offset => index.h("div", { class: "calendar__line" }, [0, 1, 2, 3, 4, 5, 6].map(index$1 => {
179
- const date = new Date();
180
- date.setTime(firstDate.getTime());
181
- date.setDate(date.getDate() + offset + index$1);
182
- let classNames = "calendar__cell";
183
- if (this._currentPosition.getMonth() != date.getMonth()) {
184
- classNames += " calendar__cell--secondary";
185
- }
186
- else if (this.isSelectedDate(date)) {
187
- classNames += " calendar__cell--selected";
188
- }
189
- return index.h("div", { class: classNames, onClick: () => this.selectDate(date) }, date.getDate());
190
- })))), index.h("div", { class: "calendar__footer" }, index.h("button", { class: "calendar__btn-today", onClick: () => this.selectDate(new Date()) }, this._todayLabel))), (this.time || this.showSeconds) &&
191
- index.h("div", { class: "calendar-time" }, index.h("div", { class: "calendar-time__header" }, index.h("div", null, "H"), index.h("div", { class: "separatorTime" }, ":"), index.h("div", null, "M"), this.showSeconds &&
192
- index.h("div", { class: "separatorTime" }, ":"), this.showSeconds &&
193
- index.h("div", null, "S")), index.h("div", { class: "calendar__body ", style: { display: 'flex', paddingLeft: '12px', paddingRight: '12px' } }, index.h("div", { class: "calendar__column", ref: elem => this._hoursScroll = elem, onScroll: () => this.updateScroll(this._hoursScroll) }, this._hoursLabel.map((offset, index$1) => {
194
- if (index$1 === this.value.getHours()) {
195
- return (index.h("div", { style: { display: 'flex' }, ref: elem => this._hoursSelect = elem }, index.h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectHours(index$1) }, offset), index.h("div", { class: "separatorTime" }, ":")));
196
- }
197
- else {
198
- return (index.h("div", { style: { display: 'flex' } }, index.h("div", { class: "calendar__cell", onClick: () => this.selectHours(index$1) }, offset), index.h("div", { class: "separatorTime" }, ":")));
199
- }
200
- })), index.h("div", { class: "calendar__column", ref: elem => this._minutesScroll = elem, onScroll: () => this.updateScroll(this._minutesScroll) }, this._minutosLabel.map((offset, index$1) => {
201
- if (index$1 === this.value.getMinutes()) {
202
- return (index.h("div", { style: { display: 'flex' }, ref: elem => this._minutesSelect = elem }, index.h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectMinutes(index$1) }, offset), this.showSeconds && index.h("div", { class: "separatorTime" }, ":")));
203
- }
204
- else {
205
- return (index.h("div", { style: { display: 'flex' } }, index.h("div", { class: "calendar__cell", onClick: () => this.selectMinutes(index$1) }, offset), this.showSeconds && index.h("div", { class: "separatorTime" }, ":")));
206
- }
207
- })), this.showSeconds &&
208
- index.h("div", { class: "calendar__column", ref: elem => this._secondsScroll = elem, onScroll: () => this.updateScroll(this._secondsScroll) }, this._minutosLabel.map((offset, index$1) => {
209
- if (index$1 === this.value.getSeconds()) {
210
- return (index.h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectSeconds(index$1), ref: elem => this._secondsSelect = elem }, offset));
211
- }
212
- else {
213
- return (index.h("div", { class: "calendar__cell", onClick: () => this.selectSeconds(index$1) }, offset));
214
- }
215
- })))))));
216
- }
217
- static get watchers() { return {
218
- "value": ["valueChanged"]
219
- }; }
220
- };
221
- EzCalendar.style = ezCalendarCss;
222
-
223
- exports.ez_calendar = EzCalendar;
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-682c98b2.js');
6
-
7
- const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--height:42px;--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box__btn--image--xsmall:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"12px\" width=\"7.5px\"><path d=\"M 0,10.56 4.5967752,6.0000006 0,1.3800006 1.4516132,0 7.5,6.0000006 1.4516132,12 Z\"/></svg>');--ez-collapsible-box__btn--image--small:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"14px\" width=\"8.68px\"><path d=\"M 0,12.32 5.3200012,7.0000007 0,1.6100007 1.6800004,0 8.68,7.0000007 1.6800004,14 Z\"/></svg>');--ez-collapsible-box__btn--image--medium:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-collapsible-box__btn--image--large:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"18px\" width=\"11.25px\"><path d=\"M 0,15.84 6.8951628,9.0000009 0,2.0700009 2.1774198,0 11.25,9.0000009 2.1774198,18 Z\"/></svg>');--ez-collapsible-box__btn--image--xlarge:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"20px\" width=\"12.5px\"><path d=\"M 0,17.6 7.661292,10.000001 0,2.300001 2.4193553,0 12.5,10.000001 2.4193553,20 Z\"/></svg>');--ez-collapsible-box__btn--fill:var(--ez-collapsible-box--color);--ez-collapsible-box__btn--width:10px;--ez-collapsible-box__btn--height:16px;display:flex;flex-wrap:wrap;width:100%}.collapsible-box__title{width:100%;align-self:center;display:flex;box-sizing:border-box}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;width:100%;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__label--icon-right{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__btn{outline:none;border:none;background-color:unset;cursor:pointer;padding:1px 6px}.collapsible-box__btn::after{content:'';display:flex;background-color:var(--ez-collapsible-box__btn--fill);width:var(--ez-collapsible-box__btn--width);height:var(--ez-collapsible-box__btn--height);transition:transform var(--transition);transform:rotate(90deg)}.collapsible-box__btn--xsmall::after{width:7.5px;height:12px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xsmall);mask-image:var(--ez-collapsible-box__btn--image--xsmall)}.collapsible-box__btn--small::after{width:8.68px;height:14px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--small);mask-image:var(--ez-collapsible-box__btn--image--small)}.collapsible-box__btn--medium::after{width:10px;height:16px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--medium);mask-image:var(--ez-collapsible-box__btn--image--medium)}.collapsible-box__btn--large::after{width:11.25px;height:18px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--large);mask-image:var(--ez-collapsible-box__btn--image--large)}.collapsible-box__btn--xlarge::after{width:12.5px;height:20px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xlarge);mask-image:var(--ez-collapsible-box__btn--image--xlarge)}.collapsible-box__btn--collapsed::after{transform:rotate(0deg)}.font--xsmall{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--xlarge{font-size:20px}";
8
-
9
- const EzCollapsibleBox = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.ezChange = index.createEvent(this, "ezChange", 7);
13
- /**
14
- * Valor externalizado que garante a exibição ou não do componente
15
- */
16
- this.value = false;
17
- /**
18
- * Define o tamanho do texto e do ícone do componente.
19
- */
20
- this.headerSize = "small";
21
- /**
22
- * Define o local onde o ícone será renderizado.
23
- */
24
- this.iconPlacement = "left";
25
- }
26
- observeValue() {
27
- this.ezChange.emit(this.value);
28
- }
29
- /**
30
- * Esconde ou revela o conteúdo do componente
31
- */
32
- async showHide() {
33
- this.value = !this.value;
34
- }
35
- render() {
36
- return (index.h(index.Host, null, this.iconPlacement == "right" ?
37
- index.h("div", { class: "collapsible-box__title" }, index.h("label", { class: (this.iconPlacement == "right" ? "collapsible-box__label--icon-right " : "collapsible-box__label ") + (this.headerSize ? "font--" + this.headerSize : ""), onClick: () => this.showHide(), title: this.label }, this.label), index.h("button", { class: this.value ? "collapsible-box__btn collapsible-box__btn--collapsed " + "collapsible-box__btn--" + this.headerSize : "collapsible-box__btn " + "collapsible-box__btn--" + this.headerSize, onClick: () => this.showHide() }))
38
- :
39
- index.h("div", { class: "collapsible-box__title" }, index.h("button", { class: this.value ? "collapsible-box__btn collapsible-box__btn--collapsed " + "collapsible-box__btn--" + this.headerSize : "collapsible-box__btn " + "collapsible-box__btn--" + this.headerSize, onClick: () => this.showHide() }), index.h("label", { class: (this.iconPlacement == "right" ? "collapsible-box__label--icon-right " : "collapsible-box__label ") + (this.headerSize ? "font--" + this.headerSize : ""), onClick: () => this.showHide(), title: this.label }, this.label)), !this.value ? index.h("slot", null) : null));
40
- }
41
- static get watchers() { return {
42
- "value": ["observeValue"]
43
- }; }
44
- };
45
- EzCollapsibleBox.style = ezCollapsibleBoxCss;
46
-
47
- exports.ez_collapsible_box = EzCollapsibleBox;
@@ -1,278 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-682c98b2.js');
6
- const core = require('@sankhyalabs/core');
7
- const CSSVarsUtils = require('./CSSVarsUtils-75ca9c64.js');
8
-
9
- const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn-search--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-search-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-search-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__btn-options--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-options-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-options-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #919191);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box__drop-down-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"16px\"><path d=\"M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z\"/></svg>');--ez-combo-box__search-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"22px\" width=\"22px\"><path d=\"m 9.4,2.3 c 4.1,0 7.4,3.2 7.4,7.2 0,1.8 -0.7,3.4 -1.8,4.7 l 0.3,0.3 h 0.9 l 5.7,5.6 -1.7,1.7 -5.7,-5.6 V 15.3 L 14.3,15 C 13,16.1 11.3,16.7 9.5,16.7 5.3,16.7 2,13.5 2,9.5 2,5.5 5.3,2.3 9.4,2.3 m 0,2.2 c -2.9,0 -5.1,2.2 -5.1,5 0,2.8 2.3,5 5.1,5 2.8,0 5.1,-2.2 5.1,-5 0,-2.8 -2.2,-5 -5.1,-5 z\"/></svg>');--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}.list-container{position:relative;width:100%}.options-list{box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-combo-box--background-color--xlight);padding:var(--ez-combo-box--space--small);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);scroll-behavior:smooth;max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));overflow:auto}.item{text-align:left;display:flex;justify-content:space-between;align-items:center;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);list-style-type:none;min-height:var(--ez-combo-box__list-height)}.item--label{text-align:left;flex-basis:85%;flex-grow:1;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item--value{text-align:right;flex-basis:15%;flex-grow:0;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn-open-options{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-options:disabled{cursor:unset}.btn-open-options::after{content:'';display:flex;background-color:var(--ez-combo-box__btn-options--background-color);width:16px;height:16px;-webkit-mask-image:var(--ez-combo-box__drop-down-image);mask-image:var(--ez-combo-box__drop-down-image)}.btn-open-options:disabled:after{background-color:var(--ez-combo-box__btn-options-disabled--background-color)}.btn-open-options:enabled:hover::after{background-color:var(--ez-combo-box__btn-options-hover--background-color)}.btn-open-search{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-search:disabled{cursor:unset}.btn-open-search::after{content:'';display:flex;background-color:var(--ez-combo-box__btn-search--background-color);width:22px;height:22px;-webkit-mask-image:var(--ez-combo-box__search-image);mask-image:var(--ez-combo-box__search-image)}.btn-open-search:disabled:after{background-color:var(--ez-combo-box__btn-search-disabled--background-color)}.btn-open-search:enabled:hover::after{background-color:var(--ez-combo-box__btn-search-hover--background-color)}";
10
-
11
- const EzComboBox = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- this.ezChange = index.createEvent(this, "ezChange", 7);
15
- /**
16
- * Deixa o campo disponível ou não para interação com usuário.
17
- */
18
- this.enabled = true;
19
- /**
20
- * Ajusta a opção de mostrar o "value" ao selecionar uma opção. Por padrão não mostra.
21
- */
22
- this.showSelectedValue = false;
23
- /**
24
- * Ajusta a opção de mostrar o "value" para cada opção. Por padrão não mostra
25
- */
26
- this.showOptionValue = false;
27
- /**
28
- * Remove a opção vazia da lista de opções
29
- */
30
- this.suppressEmptyOption = false;
31
- /**
32
- * Permite exibir a mensagem de erro.
33
- */
34
- this.canShowError = true;
35
- }
36
- internalUpdate() {
37
- if (this._inputElement) {
38
- this._inputElement.value = this.getText();
39
- }
40
- this.hideOptions();
41
- this._criteria = undefined;
42
- this._preSelection = undefined;
43
- this.updateVisibleOptions();
44
- }
45
- /**
46
- * Realiza o foco no componente de seleção
47
- */
48
- async setFocus() {
49
- this._inputElement.setFocus();
50
- }
51
- /**
52
- * Remove o foco no componente de seleção
53
- */
54
- async setBlur() {
55
- this._inputElement.setBlur();
56
- }
57
- getText() {
58
- let text = "";
59
- const selected = this.getSelectedOption();
60
- if (selected) {
61
- text = this.showSelectedValue ? `${selected.value} - ${selected.label}` : selected.label;
62
- }
63
- return text;
64
- }
65
- getSelectedOption() {
66
- if (typeof this.value === "string" || this.value instanceof String) {
67
- return this._visibleOptions.find(o => o.value === this.value);
68
- }
69
- return this.value;
70
- }
71
- updateVisibleOptions() {
72
- let opts = this._source || [];
73
- if (!this.searchMode && this._criteria) {
74
- const upperCriteria = this._criteria.toUpperCase();
75
- opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
76
- }
77
- if (this.suppressEmptyOption) {
78
- this._visibleOptions = opts;
79
- }
80
- else {
81
- this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
82
- }
83
- }
84
- buildItem(opt, index$1) {
85
- return index.h("li", { class: index$1 === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.selectOption(opt), onMouseOver: () => this._preSelection = undefined }, index.h("span", { class: "item--label", title: opt.label }, opt.label), this.showOptionValue ? index.h("span", { class: "item--value", title: opt.value }, opt.value) : undefined);
86
- }
87
- showOptions() {
88
- if (!this.enabled) {
89
- return;
90
- }
91
- //FIXME: Provavelmente isso fará com que o popup abra em uma
92
- //posição errada no futuro. Preferi fazer simples no começo,
93
- //porque não quis onerar o text input com essa funcionalidade...
94
- const top = (this.errorMessage || !this.canShowError) ? "0px" : "-17px";
95
- this._floatingID = core.FloatingManager.float(this._optionsList, this._listContainer, { autoClose: true, top });
96
- window.requestAnimationFrame(() => {
97
- this._optionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
98
- });
99
- }
100
- hideOptions() {
101
- if (this._floatingID !== undefined) {
102
- core.FloatingManager.close(this._floatingID);
103
- }
104
- this._floatingID = undefined;
105
- }
106
- isOptionsVisible() {
107
- return this._floatingID !== undefined && core.FloatingManager.isFloating(this._floatingID);
108
- }
109
- nextOption() {
110
- if (this.searchMode && !this.isOptionsVisible()) {
111
- return;
112
- }
113
- this.showOptions();
114
- this._preSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this._visibleOptions.length - 1);
115
- this.scrollToOption(this._visibleOptions[this._preSelection], true);
116
- }
117
- previousOption() {
118
- this._preSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
119
- this.scrollToOption(this._visibleOptions[this._preSelection], false);
120
- }
121
- scrollToOption(opt, down) {
122
- window.requestAnimationFrame(() => {
123
- const liElem = this._optionsList.querySelector(`li#item_${opt.value}`);
124
- if (liElem) {
125
- const parent = liElem.parentElement;
126
- const parentRect = parent.getBoundingClientRect();
127
- const itemRect = liElem.getBoundingClientRect();
128
- if (down && itemRect.bottom > parentRect.bottom) {
129
- parent.scrollTop = itemRect.top;
130
- }
131
- else if (!down && itemRect.top < parentRect.top) {
132
- parent.scrollTop = 0;
133
- }
134
- }
135
- });
136
- }
137
- selectCurrentOption() {
138
- if (this._preSelection !== undefined) {
139
- this.selectOption(this._visibleOptions[this._preSelection]);
140
- this._preSelection = undefined;
141
- }
142
- }
143
- selectOption(opt) {
144
- const currentOpt = this.getSelectedOption();
145
- if (currentOpt !== opt) {
146
- const adjustedOpt = !(opt === null || opt === void 0 ? void 0 : opt.value) ? undefined : opt;
147
- this.value = adjustedOpt;
148
- this.errorMessage = "";
149
- this.ezChange.emit(adjustedOpt);
150
- }
151
- else {
152
- this.internalUpdate();
153
- }
154
- }
155
- updateSource(source) {
156
- if (source instanceof Promise) {
157
- source.then(result => this.updateSource(result));
158
- this.updateVisibleOptions();
159
- }
160
- else {
161
- this._source = source;
162
- this.updateVisibleOptions();
163
- }
164
- }
165
- loadOptions(mode, argument = "") {
166
- this._criteria = argument;
167
- if (this.optionLoader) {
168
- this.updateSource(this.optionLoader({ mode, argument }));
169
- }
170
- else {
171
- this.updateSource(this.options);
172
- }
173
- }
174
- cancelPreselection() {
175
- if (!this._inputElement.value && this.value) {
176
- this.selectOption(undefined);
177
- }
178
- else {
179
- this.internalUpdate();
180
- }
181
- }
182
- //---------------------------------------------
183
- // Lifecycle web component
184
- //---------------------------------------------
185
- componentWillLoad() {
186
- if (this.options === undefined) {
187
- this.options = [];
188
- const optionsTags = this.el.querySelectorAll("option");
189
- if (optionsTags) {
190
- optionsTags.forEach(e => {
191
- let label = e.innerText;
192
- let value = e.getAttribute("value");
193
- if (!value) {
194
- value = label;
195
- }
196
- this.options.push({ label, value });
197
- e.hidden = true;
198
- });
199
- }
200
- }
201
- if (this.searchMode) {
202
- this.updateSource([]);
203
- }
204
- else {
205
- this.loadOptions("PRELOAD");
206
- }
207
- }
208
- componentDidRender() {
209
- if (this._floatingID === undefined) {
210
- this._optionsList.remove();
211
- }
212
- }
213
- componentDidLoad() {
214
- CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this.el, this._inputElement);
215
- }
216
- //---------------------------------------------
217
- // Event handlers
218
- //---------------------------------------------
219
- onTextInputChangeHandler(event) {
220
- if (!this._criteria) {
221
- this._inputElement.value = event.data;
222
- }
223
- const argument = event.target.value;
224
- this._criteria = argument;
225
- if (this._criteria) {
226
- if (this.searchMode) {
227
- if (this._changeDeboucingTimeout) {
228
- window.clearTimeout(this._changeDeboucingTimeout);
229
- }
230
- this._changeDeboucingTimeout = window.setTimeout(() => {
231
- this.loadOptions("PREDICTIVE", argument);
232
- }, 200);
233
- }
234
- else {
235
- this.updateVisibleOptions();
236
- }
237
- this.showOptions();
238
- }
239
- }
240
- onTextInputClickHandler() {
241
- if (!this.searchMode) {
242
- this.showOptions();
243
- }
244
- }
245
- keyDownHandler(event) {
246
- switch (event.key) {
247
- case "ArrowDown":
248
- this.nextOption();
249
- break;
250
- case "ArrowUp":
251
- this.previousOption();
252
- break;
253
- case "Enter":
254
- this.selectCurrentOption();
255
- break;
256
- case "Escape":
257
- this.cancelPreselection();
258
- break;
259
- }
260
- event.stopPropagation();
261
- }
262
- onTextInputFocusOutHandler() {
263
- this.cancelPreselection();
264
- }
265
- render() {
266
- return (index.h(index.Host, null, index.h("ez-text-input", { ref: elem => this._inputElement = elem, enabled: this.enabled, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage }, this.searchMode ?
267
- index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-search", onClick: () => { this.loadOptions("ADVANCED"); }, slot: "leftIcon" })
268
- :
269
- index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-options", slot: "rightIcon", onClick: () => this.showOptions() })), index.h("section", { class: "list-container", ref: elem => this._listContainer = elem }, index.h("div", { class: "options-list", ref: elem => this._optionsList = elem }, this._visibleOptions.map((opt, index) => this.buildItem(opt, index))))));
270
- }
271
- get el() { return index.getElement(this); }
272
- static get watchers() { return {
273
- "value": ["internalUpdate"]
274
- }; }
275
- };
276
- EzComboBox.style = ezComboBoxCss;
277
-
278
- exports.ez_combo_box = EzComboBox;