@ember-eui/validated-form 11.0.3 → 12.0.1

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 (783) hide show
  1. package/README.md +9 -20
  2. package/declarations/-private/random-id.d.ts +1 -1
  3. package/declarations/-private/random-id.d.ts.map +1 -1
  4. package/declarations/components/validated-form/field-base.d.ts +9 -6
  5. package/declarations/components/validated-form/field-base.d.ts.map +1 -1
  6. package/declarations/components/validated-form/field-checkbox-group.d.ts +2 -2
  7. package/declarations/components/validated-form/field-combo-box.d.ts +2 -2
  8. package/declarations/components/validated-form/field-dual-range-slider.d.ts +2 -2
  9. package/declarations/components/validated-form/field-markdown-editor.d.ts +2 -2
  10. package/declarations/components/validated-form/field-number.d.ts +2 -2
  11. package/declarations/components/validated-form/field-password.d.ts +2 -2
  12. package/declarations/components/validated-form/field-radio-group.d.ts +2 -2
  13. package/declarations/components/validated-form/field-range-slider.d.ts +2 -2
  14. package/declarations/components/validated-form/field-select.d.ts +2 -2
  15. package/declarations/components/validated-form/field-switch.d.ts +2 -2
  16. package/declarations/components/validated-form/field-text-area.d.ts +2 -2
  17. package/declarations/components/validated-form/field-text.d.ts +2 -2
  18. package/declarations/components/validated-form.d.ts +6 -3
  19. package/declarations/components/validated-form.d.ts.map +1 -1
  20. package/declarations/validators/messages.d.ts +1 -2
  21. package/declarations/validators/messages.d.ts.map +1 -1
  22. package/dist/-private/random-id.js.map +1 -1
  23. package/dist/components/default-theme.js +4 -4
  24. package/dist/components/default-theme.js.map +1 -1
  25. package/dist/components/validated-form/field-base.js +16 -16
  26. package/dist/components/validated-form/field-base.js.map +1 -1
  27. package/dist/components/validated-form/field-checkbox-group.js +17 -17
  28. package/dist/components/validated-form/field-checkbox-group.js.map +1 -1
  29. package/dist/components/validated-form/field-combo-box.js +2 -2
  30. package/dist/components/validated-form/field-combo-box.js.map +1 -1
  31. package/dist/components/validated-form/field-dual-range-slider.js +3 -3
  32. package/dist/components/validated-form/field-dual-range-slider.js.map +1 -1
  33. package/dist/components/validated-form/field-markdown-editor.js +2 -2
  34. package/dist/components/validated-form/field-markdown-editor.js.map +1 -1
  35. package/dist/components/validated-form/field-number.js.map +1 -1
  36. package/dist/components/validated-form/field-password.js.map +1 -1
  37. package/dist/components/validated-form/field-radio-group.js +17 -17
  38. package/dist/components/validated-form/field-radio-group.js.map +1 -1
  39. package/dist/components/validated-form/field-range-slider.js.map +1 -1
  40. package/dist/components/validated-form/field-select.js.map +1 -1
  41. package/dist/components/validated-form/field-switch.js +4 -4
  42. package/dist/components/validated-form/field-switch.js.map +1 -1
  43. package/dist/components/validated-form/field-text-area.js.map +1 -1
  44. package/dist/components/validated-form/field-text.js.map +1 -1
  45. package/dist/components/validated-form.js +24 -24
  46. package/dist/components/validated-form.js.map +1 -1
  47. package/dist/field-base-CPyNVTul.js +207 -0
  48. package/dist/field-base-CPyNVTul.js.map +1 -0
  49. package/dist/utils/build-validation-messages.js.map +1 -1
  50. package/dist/utils/get-messages.js.map +1 -1
  51. package/dist/utils/validation-errors.js.map +1 -1
  52. package/dist/utils/with-defaults.js.map +1 -1
  53. package/package.json +48 -39
  54. package/declarations/core/src/-private/random-id.d.ts +0 -9
  55. package/declarations/core/src/-private/random-id.d.ts.map +0 -1
  56. package/declarations/core/src/components/common.d.ts +0 -42
  57. package/declarations/core/src/components/common.d.ts.map +0 -1
  58. package/declarations/core/src/components/eui-accordion.d.ts +0 -101
  59. package/declarations/core/src/components/eui-accordion.d.ts.map +0 -1
  60. package/declarations/core/src/components/eui-auto-sizer.d.ts +0 -64
  61. package/declarations/core/src/components/eui-auto-sizer.d.ts.map +0 -1
  62. package/declarations/core/src/components/eui-avatar.d.ts +0 -22
  63. package/declarations/core/src/components/eui-avatar.d.ts.map +0 -1
  64. package/declarations/core/src/components/eui-badge-group.d.ts +0 -23
  65. package/declarations/core/src/components/eui-badge-group.d.ts.map +0 -1
  66. package/declarations/core/src/components/eui-badge.d.ts +0 -30
  67. package/declarations/core/src/components/eui-badge.d.ts.map +0 -1
  68. package/declarations/core/src/components/eui-beta-badge.d.ts +0 -63
  69. package/declarations/core/src/components/eui-beta-badge.d.ts.map +0 -1
  70. package/declarations/core/src/components/eui-bottom-bar.d.ts +0 -35
  71. package/declarations/core/src/components/eui-bottom-bar.d.ts.map +0 -1
  72. package/declarations/core/src/components/eui-breadcrumbs.d.ts +0 -70
  73. package/declarations/core/src/components/eui-breadcrumbs.d.ts.map +0 -1
  74. package/declarations/core/src/components/eui-button-content.d.ts +0 -21
  75. package/declarations/core/src/components/eui-button-content.d.ts.map +0 -1
  76. package/declarations/core/src/components/eui-button-empty.d.ts +0 -33
  77. package/declarations/core/src/components/eui-button-empty.d.ts.map +0 -1
  78. package/declarations/core/src/components/eui-button-group-button.d.ts +0 -29
  79. package/declarations/core/src/components/eui-button-group-button.d.ts.map +0 -1
  80. package/declarations/core/src/components/eui-button-group.d.ts +0 -41
  81. package/declarations/core/src/components/eui-button-group.d.ts.map +0 -1
  82. package/declarations/core/src/components/eui-button-icon.d.ts +0 -25
  83. package/declarations/core/src/components/eui-button-icon.d.ts.map +0 -1
  84. package/declarations/core/src/components/eui-button.d.ts +0 -34
  85. package/declarations/core/src/components/eui-button.d.ts.map +0 -1
  86. package/declarations/core/src/components/eui-call-out.d.ts +0 -21
  87. package/declarations/core/src/components/eui-call-out.d.ts.map +0 -1
  88. package/declarations/core/src/components/eui-card-select.d.ts +0 -29
  89. package/declarations/core/src/components/eui-card-select.d.ts.map +0 -1
  90. package/declarations/core/src/components/eui-card.d.ts +0 -68
  91. package/declarations/core/src/components/eui-card.d.ts.map +0 -1
  92. package/declarations/core/src/components/eui-checkable-card.d.ts +0 -21
  93. package/declarations/core/src/components/eui-checkable-card.d.ts.map +0 -1
  94. package/declarations/core/src/components/eui-checkbox-group.d.ts +0 -27
  95. package/declarations/core/src/components/eui-checkbox-group.d.ts.map +0 -1
  96. package/declarations/core/src/components/eui-checkbox.d.ts +0 -27
  97. package/declarations/core/src/components/eui-checkbox.d.ts.map +0 -1
  98. package/declarations/core/src/components/eui-code-block/controls.d.ts +0 -13
  99. package/declarations/core/src/components/eui-code-block/controls.d.ts.map +0 -1
  100. package/declarations/core/src/components/eui-code-block/full-screen-display.d.ts +0 -11
  101. package/declarations/core/src/components/eui-code-block/full-screen-display.d.ts.map +0 -1
  102. package/declarations/core/src/components/eui-code-block/virtualized.d.ts +0 -20
  103. package/declarations/core/src/components/eui-code-block/virtualized.d.ts.map +0 -1
  104. package/declarations/core/src/components/eui-code-block.d.ts +0 -92
  105. package/declarations/core/src/components/eui-code-block.d.ts.map +0 -1
  106. package/declarations/core/src/components/eui-code.d.ts +0 -21
  107. package/declarations/core/src/components/eui-code.d.ts.map +0 -1
  108. package/declarations/core/src/components/eui-collapsible-nav.d.ts +0 -66
  109. package/declarations/core/src/components/eui-collapsible-nav.d.ts.map +0 -1
  110. package/declarations/core/src/components/eui-combo-box/create-option.d.ts +0 -18
  111. package/declarations/core/src/components/eui-combo-box/create-option.d.ts.map +0 -1
  112. package/declarations/core/src/components/eui-combo-box/group.d.ts +0 -16
  113. package/declarations/core/src/components/eui-combo-box/group.d.ts.map +0 -1
  114. package/declarations/core/src/components/eui-combo-box/no-matches-message.d.ts +0 -11
  115. package/declarations/core/src/components/eui-combo-box/no-matches-message.d.ts.map +0 -1
  116. package/declarations/core/src/components/eui-combo-box/options.d.ts +0 -12
  117. package/declarations/core/src/components/eui-combo-box/options.d.ts.map +0 -1
  118. package/declarations/core/src/components/eui-combo-box/search-message.d.ts +0 -11
  119. package/declarations/core/src/components/eui-combo-box/search-message.d.ts.map +0 -1
  120. package/declarations/core/src/components/eui-combo-box/trigger/input.d.ts +0 -6
  121. package/declarations/core/src/components/eui-combo-box/trigger/input.d.ts.map +0 -1
  122. package/declarations/core/src/components/eui-combo-box/trigger.d.ts +0 -4
  123. package/declarations/core/src/components/eui-combo-box/trigger.d.ts.map +0 -1
  124. package/declarations/core/src/components/eui-combo-box-pill.d.ts +0 -22
  125. package/declarations/core/src/components/eui-combo-box-pill.d.ts.map +0 -1
  126. package/declarations/core/src/components/eui-combo-box.d.ts +0 -93
  127. package/declarations/core/src/components/eui-combo-box.d.ts.map +0 -1
  128. package/declarations/core/src/components/eui-comment-list.d.ts +0 -10
  129. package/declarations/core/src/components/eui-comment-list.d.ts.map +0 -1
  130. package/declarations/core/src/components/eui-comment-timeline.d.ts +0 -15
  131. package/declarations/core/src/components/eui-comment-timeline.d.ts.map +0 -1
  132. package/declarations/core/src/components/eui-comment.d.ts +0 -20
  133. package/declarations/core/src/components/eui-comment.d.ts.map +0 -1
  134. package/declarations/core/src/components/eui-confirm-modal.d.ts +0 -23
  135. package/declarations/core/src/components/eui-confirm-modal.d.ts.map +0 -1
  136. package/declarations/core/src/components/eui-context-menu-item.d.ts +0 -25
  137. package/declarations/core/src/components/eui-context-menu-item.d.ts.map +0 -1
  138. package/declarations/core/src/components/eui-context-menu-panel.d.ts +0 -10
  139. package/declarations/core/src/components/eui-context-menu-panel.d.ts.map +0 -1
  140. package/declarations/core/src/components/eui-copy.d.ts +0 -36
  141. package/declarations/core/src/components/eui-copy.d.ts.map +0 -1
  142. package/declarations/core/src/components/eui-described-form-group.d.ts +0 -27
  143. package/declarations/core/src/components/eui-described-form-group.d.ts.map +0 -1
  144. package/declarations/core/src/components/eui-description-list-description.d.ts +0 -10
  145. package/declarations/core/src/components/eui-description-list-description.d.ts.map +0 -1
  146. package/declarations/core/src/components/eui-description-list-title.d.ts +0 -10
  147. package/declarations/core/src/components/eui-description-list-title.d.ts.map +0 -1
  148. package/declarations/core/src/components/eui-description-list.d.ts +0 -27
  149. package/declarations/core/src/components/eui-description-list.d.ts.map +0 -1
  150. package/declarations/core/src/components/eui-dual-range.d.ts +0 -141
  151. package/declarations/core/src/components/eui-dual-range.d.ts.map +0 -1
  152. package/declarations/core/src/components/eui-empty-prompt.d.ts +0 -29
  153. package/declarations/core/src/components/eui-empty-prompt.d.ts.map +0 -1
  154. package/declarations/core/src/components/eui-field-number.d.ts +0 -57
  155. package/declarations/core/src/components/eui-field-number.d.ts.map +0 -1
  156. package/declarations/core/src/components/eui-field-password.d.ts +0 -28
  157. package/declarations/core/src/components/eui-field-password.d.ts.map +0 -1
  158. package/declarations/core/src/components/eui-field-search.d.ts +0 -52
  159. package/declarations/core/src/components/eui-field-search.d.ts.map +0 -1
  160. package/declarations/core/src/components/eui-field-text.d.ts +0 -29
  161. package/declarations/core/src/components/eui-field-text.d.ts.map +0 -1
  162. package/declarations/core/src/components/eui-file-picker.d.ts +0 -60
  163. package/declarations/core/src/components/eui-file-picker.d.ts.map +0 -1
  164. package/declarations/core/src/components/eui-flex-grid.d.ts +0 -33
  165. package/declarations/core/src/components/eui-flex-grid.d.ts.map +0 -1
  166. package/declarations/core/src/components/eui-flex-group.d.ts +0 -20
  167. package/declarations/core/src/components/eui-flex-group.d.ts.map +0 -1
  168. package/declarations/core/src/components/eui-flex-item.d.ts +0 -15
  169. package/declarations/core/src/components/eui-flex-item.d.ts.map +0 -1
  170. package/declarations/core/src/components/eui-flyout-body.d.ts +0 -12
  171. package/declarations/core/src/components/eui-flyout-body.d.ts.map +0 -1
  172. package/declarations/core/src/components/eui-flyout-footer.d.ts +0 -10
  173. package/declarations/core/src/components/eui-flyout-footer.d.ts.map +0 -1
  174. package/declarations/core/src/components/eui-flyout-header.d.ts +0 -13
  175. package/declarations/core/src/components/eui-flyout-header.d.ts.map +0 -1
  176. package/declarations/core/src/components/eui-flyout.d.ts +0 -92
  177. package/declarations/core/src/components/eui-flyout.d.ts.map +0 -1
  178. package/declarations/core/src/components/eui-form-control-layout-clear-button.d.ts +0 -14
  179. package/declarations/core/src/components/eui-form-control-layout-clear-button.d.ts.map +0 -1
  180. package/declarations/core/src/components/eui-form-control-layout-custom-icon.d.ts +0 -16
  181. package/declarations/core/src/components/eui-form-control-layout-custom-icon.d.ts.map +0 -1
  182. package/declarations/core/src/components/eui-form-control-layout-delimited.d.ts +0 -25
  183. package/declarations/core/src/components/eui-form-control-layout-delimited.d.ts.map +0 -1
  184. package/declarations/core/src/components/eui-form-control-layout-icons.d.ts +0 -17
  185. package/declarations/core/src/components/eui-form-control-layout-icons.d.ts.map +0 -1
  186. package/declarations/core/src/components/eui-form-control-layout.d.ts +0 -30
  187. package/declarations/core/src/components/eui-form-control-layout.d.ts.map +0 -1
  188. package/declarations/core/src/components/eui-form-error-text.d.ts +0 -10
  189. package/declarations/core/src/components/eui-form-error-text.d.ts.map +0 -1
  190. package/declarations/core/src/components/eui-form-fieldset.d.ts +0 -18
  191. package/declarations/core/src/components/eui-form-fieldset.d.ts.map +0 -1
  192. package/declarations/core/src/components/eui-form-help-text.d.ts +0 -13
  193. package/declarations/core/src/components/eui-form-help-text.d.ts.map +0 -1
  194. package/declarations/core/src/components/eui-form-label.d.ts +0 -17
  195. package/declarations/core/src/components/eui-form-label.d.ts.map +0 -1
  196. package/declarations/core/src/components/eui-form-legend.d.ts +0 -14
  197. package/declarations/core/src/components/eui-form-legend.d.ts.map +0 -1
  198. package/declarations/core/src/components/eui-form-row.d.ts +0 -35
  199. package/declarations/core/src/components/eui-form-row.d.ts.map +0 -1
  200. package/declarations/core/src/components/eui-form.d.ts +0 -20
  201. package/declarations/core/src/components/eui-form.d.ts.map +0 -1
  202. package/declarations/core/src/components/eui-header-alert.d.ts +0 -14
  203. package/declarations/core/src/components/eui-header-alert.d.ts.map +0 -1
  204. package/declarations/core/src/components/eui-header-breadcrumbs.d.ts +0 -14
  205. package/declarations/core/src/components/eui-header-breadcrumbs.d.ts.map +0 -1
  206. package/declarations/core/src/components/eui-header-link.d.ts +0 -14
  207. package/declarations/core/src/components/eui-header-link.d.ts.map +0 -1
  208. package/declarations/core/src/components/eui-header-links.d.ts +0 -20
  209. package/declarations/core/src/components/eui-header-links.d.ts.map +0 -1
  210. package/declarations/core/src/components/eui-header-logo.d.ts +0 -17
  211. package/declarations/core/src/components/eui-header-logo.d.ts.map +0 -1
  212. package/declarations/core/src/components/eui-header-section-item-button.d.ts +0 -26
  213. package/declarations/core/src/components/eui-header-section-item-button.d.ts.map +0 -1
  214. package/declarations/core/src/components/eui-header-section-item.d.ts +0 -14
  215. package/declarations/core/src/components/eui-header-section-item.d.ts.map +0 -1
  216. package/declarations/core/src/components/eui-header-section.d.ts +0 -15
  217. package/declarations/core/src/components/eui-header-section.d.ts.map +0 -1
  218. package/declarations/core/src/components/eui-header.d.ts +0 -23
  219. package/declarations/core/src/components/eui-header.d.ts.map +0 -1
  220. package/declarations/core/src/components/eui-health.d.ts +0 -21
  221. package/declarations/core/src/components/eui-health.d.ts.map +0 -1
  222. package/declarations/core/src/components/eui-hide-for.d.ts +0 -21
  223. package/declarations/core/src/components/eui-hide-for.d.ts.map +0 -1
  224. package/declarations/core/src/components/eui-horizontal-rule.d.ts +0 -12
  225. package/declarations/core/src/components/eui-horizontal-rule.d.ts.map +0 -1
  226. package/declarations/core/src/components/eui-i18n/render.d.ts +0 -12
  227. package/declarations/core/src/components/eui-i18n/render.d.ts.map +0 -1
  228. package/declarations/core/src/components/eui-i18n.d.ts +0 -32
  229. package/declarations/core/src/components/eui-i18n.d.ts.map +0 -1
  230. package/declarations/core/src/components/eui-icon-tip.d.ts +0 -29
  231. package/declarations/core/src/components/eui-icon-tip.d.ts.map +0 -1
  232. package/declarations/core/src/components/eui-icon.d.ts +0 -80
  233. package/declarations/core/src/components/eui-icon.d.ts.map +0 -1
  234. package/declarations/core/src/components/eui-image.d.ts +0 -62
  235. package/declarations/core/src/components/eui-image.d.ts.map +0 -1
  236. package/declarations/core/src/components/eui-inner-text.d.ts +0 -21
  237. package/declarations/core/src/components/eui-inner-text.d.ts.map +0 -1
  238. package/declarations/core/src/components/eui-input-popover.d.ts +0 -44
  239. package/declarations/core/src/components/eui-input-popover.d.ts.map +0 -1
  240. package/declarations/core/src/components/eui-key-pad-menu-item.d.ts +0 -26
  241. package/declarations/core/src/components/eui-key-pad-menu-item.d.ts.map +0 -1
  242. package/declarations/core/src/components/eui-key-pad-menu.d.ts +0 -23
  243. package/declarations/core/src/components/eui-key-pad-menu.d.ts.map +0 -1
  244. package/declarations/core/src/components/eui-link.d.ts +0 -18
  245. package/declarations/core/src/components/eui-link.d.ts.map +0 -1
  246. package/declarations/core/src/components/eui-list-group-item.d.ts +0 -26
  247. package/declarations/core/src/components/eui-list-group-item.d.ts.map +0 -1
  248. package/declarations/core/src/components/eui-list-group.d.ts +0 -16
  249. package/declarations/core/src/components/eui-list-group.d.ts.map +0 -1
  250. package/declarations/core/src/components/eui-loading-content.d.ts +0 -14
  251. package/declarations/core/src/components/eui-loading-content.d.ts.map +0 -1
  252. package/declarations/core/src/components/eui-loading-logo.d.ts +0 -13
  253. package/declarations/core/src/components/eui-loading-logo.d.ts.map +0 -1
  254. package/declarations/core/src/components/eui-loading-spinner.d.ts +0 -11
  255. package/declarations/core/src/components/eui-loading-spinner.d.ts.map +0 -1
  256. package/declarations/core/src/components/eui-markdown-editor-drop-zone.d.ts +0 -17
  257. package/declarations/core/src/components/eui-markdown-editor-drop-zone.d.ts.map +0 -1
  258. package/declarations/core/src/components/eui-markdown-editor-footer/icons/markdown-logo.d.ts +0 -10
  259. package/declarations/core/src/components/eui-markdown-editor-footer/icons/markdown-logo.d.ts.map +0 -1
  260. package/declarations/core/src/components/eui-markdown-editor-footer.d.ts +0 -13
  261. package/declarations/core/src/components/eui-markdown-editor-footer.d.ts.map +0 -1
  262. package/declarations/core/src/components/eui-markdown-editor-text-area.d.ts +0 -14
  263. package/declarations/core/src/components/eui-markdown-editor-text-area.d.ts.map +0 -1
  264. package/declarations/core/src/components/eui-markdown-editor-toolbar/icons/markdown-checkmark.d.ts +0 -11
  265. package/declarations/core/src/components/eui-markdown-editor-toolbar/icons/markdown-checkmark.d.ts.map +0 -1
  266. package/declarations/core/src/components/eui-markdown-editor-toolbar.d.ts +0 -61
  267. package/declarations/core/src/components/eui-markdown-editor-toolbar.d.ts.map +0 -1
  268. package/declarations/core/src/components/eui-markdown-editor.d.ts +0 -99
  269. package/declarations/core/src/components/eui-markdown-editor.d.ts.map +0 -1
  270. package/declarations/core/src/components/eui-markdown-format/markdown-checkbox.d.ts +0 -24
  271. package/declarations/core/src/components/eui-markdown-format/markdown-checkbox.d.ts.map +0 -1
  272. package/declarations/core/src/components/eui-markdown-format/markdown-code-block.d.ts +0 -15
  273. package/declarations/core/src/components/eui-markdown-format/markdown-code-block.d.ts.map +0 -1
  274. package/declarations/core/src/components/eui-markdown-format/markdown-code.d.ts +0 -13
  275. package/declarations/core/src/components/eui-markdown-format/markdown-code.d.ts.map +0 -1
  276. package/declarations/core/src/components/eui-markdown-format/markdown-tooltip.d.ts +0 -15
  277. package/declarations/core/src/components/eui-markdown-format/markdown-tooltip.d.ts.map +0 -1
  278. package/declarations/core/src/components/eui-markdown-format.d.ts +0 -23
  279. package/declarations/core/src/components/eui-markdown-format.d.ts.map +0 -1
  280. package/declarations/core/src/components/eui-modal-body.d.ts +0 -10
  281. package/declarations/core/src/components/eui-modal-body.d.ts.map +0 -1
  282. package/declarations/core/src/components/eui-modal-footer.d.ts +0 -10
  283. package/declarations/core/src/components/eui-modal-footer.d.ts.map +0 -1
  284. package/declarations/core/src/components/eui-modal-header-title.d.ts +0 -10
  285. package/declarations/core/src/components/eui-modal-header-title.d.ts.map +0 -1
  286. package/declarations/core/src/components/eui-modal-header.d.ts +0 -10
  287. package/declarations/core/src/components/eui-modal-header.d.ts.map +0 -1
  288. package/declarations/core/src/components/eui-modal.d.ts +0 -27
  289. package/declarations/core/src/components/eui-modal.d.ts.map +0 -1
  290. package/declarations/core/src/components/eui-notification-badge.d.ts +0 -15
  291. package/declarations/core/src/components/eui-notification-badge.d.ts.map +0 -1
  292. package/declarations/core/src/components/eui-notification-event-messages.d.ts +0 -13
  293. package/declarations/core/src/components/eui-notification-event-messages.d.ts.map +0 -1
  294. package/declarations/core/src/components/eui-notification-event-meta.d.ts +0 -24
  295. package/declarations/core/src/components/eui-notification-event-meta.d.ts.map +0 -1
  296. package/declarations/core/src/components/eui-notification-event-read-button.d.ts +0 -13
  297. package/declarations/core/src/components/eui-notification-event-read-button.d.ts.map +0 -1
  298. package/declarations/core/src/components/eui-notification-event-read-icon.d.ts +0 -14
  299. package/declarations/core/src/components/eui-notification-event-read-icon.d.ts.map +0 -1
  300. package/declarations/core/src/components/eui-notification-event.d.ts +0 -40
  301. package/declarations/core/src/components/eui-notification-event.d.ts.map +0 -1
  302. package/declarations/core/src/components/eui-overlay-mask.d.ts +0 -20
  303. package/declarations/core/src/components/eui-overlay-mask.d.ts.map +0 -1
  304. package/declarations/core/src/components/eui-page-body.d.ts +0 -22
  305. package/declarations/core/src/components/eui-page-body.d.ts.map +0 -1
  306. package/declarations/core/src/components/eui-page-content-body.d.ts +0 -18
  307. package/declarations/core/src/components/eui-page-content-body.d.ts.map +0 -1
  308. package/declarations/core/src/components/eui-page-content-header-section.d.ts +0 -10
  309. package/declarations/core/src/components/eui-page-content-header-section.d.ts.map +0 -1
  310. package/declarations/core/src/components/eui-page-content-header.d.ts +0 -13
  311. package/declarations/core/src/components/eui-page-content-header.d.ts.map +0 -1
  312. package/declarations/core/src/components/eui-page-content.d.ts +0 -22
  313. package/declarations/core/src/components/eui-page-content.d.ts.map +0 -1
  314. package/declarations/core/src/components/eui-page-header-content.d.ts +0 -98
  315. package/declarations/core/src/components/eui-page-header-content.d.ts.map +0 -1
  316. package/declarations/core/src/components/eui-page-header-section.d.ts +0 -10
  317. package/declarations/core/src/components/eui-page-header-section.d.ts.map +0 -1
  318. package/declarations/core/src/components/eui-page-header.d.ts +0 -89
  319. package/declarations/core/src/components/eui-page-header.d.ts.map +0 -1
  320. package/declarations/core/src/components/eui-page-side-bar.d.ts +0 -15
  321. package/declarations/core/src/components/eui-page-side-bar.d.ts.map +0 -1
  322. package/declarations/core/src/components/eui-page-template.d.ts +0 -77
  323. package/declarations/core/src/components/eui-page-template.d.ts.map +0 -1
  324. package/declarations/core/src/components/eui-page.d.ts +0 -17
  325. package/declarations/core/src/components/eui-page.d.ts.map +0 -1
  326. package/declarations/core/src/components/eui-pagination/button-wrapper.d.ts +0 -16
  327. package/declarations/core/src/components/eui-pagination/button-wrapper.d.ts.map +0 -1
  328. package/declarations/core/src/components/eui-pagination/next-button.d.ts +0 -19
  329. package/declarations/core/src/components/eui-pagination/next-button.d.ts.map +0 -1
  330. package/declarations/core/src/components/eui-pagination/previous-button.d.ts +0 -18
  331. package/declarations/core/src/components/eui-pagination/previous-button.d.ts.map +0 -1
  332. package/declarations/core/src/components/eui-pagination-button.d.ts +0 -20
  333. package/declarations/core/src/components/eui-pagination-button.d.ts.map +0 -1
  334. package/declarations/core/src/components/eui-pagination.d.ts +0 -79
  335. package/declarations/core/src/components/eui-pagination.d.ts.map +0 -1
  336. package/declarations/core/src/components/eui-panel.d.ts +0 -45
  337. package/declarations/core/src/components/eui-panel.d.ts.map +0 -1
  338. package/declarations/core/src/components/eui-popover-footer.d.ts +0 -14
  339. package/declarations/core/src/components/eui-popover-footer.d.ts.map +0 -1
  340. package/declarations/core/src/components/eui-popover-title.d.ts +0 -14
  341. package/declarations/core/src/components/eui-popover-title.d.ts.map +0 -1
  342. package/declarations/core/src/components/eui-popover.d.ts +0 -217
  343. package/declarations/core/src/components/eui-popover.d.ts.map +0 -1
  344. package/declarations/core/src/components/eui-portal.d.ts +0 -28
  345. package/declarations/core/src/components/eui-portal.d.ts.map +0 -1
  346. package/declarations/core/src/components/eui-progress.d.ts +0 -22
  347. package/declarations/core/src/components/eui-progress.d.ts.map +0 -1
  348. package/declarations/core/src/components/eui-radio-group.d.ts +0 -25
  349. package/declarations/core/src/components/eui-radio-group.d.ts.map +0 -1
  350. package/declarations/core/src/components/eui-radio.d.ts +0 -24
  351. package/declarations/core/src/components/eui-radio.d.ts.map +0 -1
  352. package/declarations/core/src/components/eui-range-highlight.d.ts +0 -16
  353. package/declarations/core/src/components/eui-range-highlight.d.ts.map +0 -1
  354. package/declarations/core/src/components/eui-range-input.d.ts +0 -25
  355. package/declarations/core/src/components/eui-range-input.d.ts.map +0 -1
  356. package/declarations/core/src/components/eui-range-label.d.ts +0 -13
  357. package/declarations/core/src/components/eui-range-label.d.ts.map +0 -1
  358. package/declarations/core/src/components/eui-range-levels.d.ts +0 -27
  359. package/declarations/core/src/components/eui-range-levels.d.ts.map +0 -1
  360. package/declarations/core/src/components/eui-range-slider.d.ts +0 -25
  361. package/declarations/core/src/components/eui-range-slider.d.ts.map +0 -1
  362. package/declarations/core/src/components/eui-range-thumb.d.ts +0 -15
  363. package/declarations/core/src/components/eui-range-thumb.d.ts.map +0 -1
  364. package/declarations/core/src/components/eui-range-ticks.d.ts +0 -29
  365. package/declarations/core/src/components/eui-range-ticks.d.ts.map +0 -1
  366. package/declarations/core/src/components/eui-range-tooltip.d.ts +0 -33
  367. package/declarations/core/src/components/eui-range-tooltip.d.ts.map +0 -1
  368. package/declarations/core/src/components/eui-range-track.d.ts +0 -43
  369. package/declarations/core/src/components/eui-range-track.d.ts.map +0 -1
  370. package/declarations/core/src/components/eui-range-wrapper.d.ts +0 -14
  371. package/declarations/core/src/components/eui-range-wrapper.d.ts.map +0 -1
  372. package/declarations/core/src/components/eui-range.d.ts +0 -112
  373. package/declarations/core/src/components/eui-range.d.ts.map +0 -1
  374. package/declarations/core/src/components/eui-select.d.ts +0 -31
  375. package/declarations/core/src/components/eui-select.d.ts.map +0 -1
  376. package/declarations/core/src/components/eui-selectable-list-item.d.ts +0 -15
  377. package/declarations/core/src/components/eui-selectable-list-item.d.ts.map +0 -1
  378. package/declarations/core/src/components/eui-show-for.d.ts +0 -30
  379. package/declarations/core/src/components/eui-show-for.d.ts.map +0 -1
  380. package/declarations/core/src/components/eui-side-nav-item/button.d.ts +0 -16
  381. package/declarations/core/src/components/eui-side-nav-item/button.d.ts.map +0 -1
  382. package/declarations/core/src/components/eui-side-nav-item.d.ts +0 -32
  383. package/declarations/core/src/components/eui-side-nav-item.d.ts.map +0 -1
  384. package/declarations/core/src/components/eui-side-nav.d.ts +0 -48
  385. package/declarations/core/src/components/eui-side-nav.d.ts.map +0 -1
  386. package/declarations/core/src/components/eui-spacer.d.ts +0 -11
  387. package/declarations/core/src/components/eui-spacer.d.ts.map +0 -1
  388. package/declarations/core/src/components/eui-stat/description.d.ts +0 -15
  389. package/declarations/core/src/components/eui-stat/description.d.ts.map +0 -1
  390. package/declarations/core/src/components/eui-stat/title.d.ts +0 -17
  391. package/declarations/core/src/components/eui-stat/title.d.ts.map +0 -1
  392. package/declarations/core/src/components/eui-stat.d.ts +0 -28
  393. package/declarations/core/src/components/eui-stat.d.ts.map +0 -1
  394. package/declarations/core/src/components/eui-step-horizontal.d.ts +0 -38
  395. package/declarations/core/src/components/eui-step-horizontal.d.ts.map +0 -1
  396. package/declarations/core/src/components/eui-step-number.d.ts +0 -31
  397. package/declarations/core/src/components/eui-step-number.d.ts.map +0 -1
  398. package/declarations/core/src/components/eui-step.d.ts +0 -18
  399. package/declarations/core/src/components/eui-step.d.ts.map +0 -1
  400. package/declarations/core/src/components/eui-steps.d.ts +0 -13
  401. package/declarations/core/src/components/eui-steps.d.ts.map +0 -1
  402. package/declarations/core/src/components/eui-sub-steps.d.ts +0 -10
  403. package/declarations/core/src/components/eui-sub-steps.d.ts.map +0 -1
  404. package/declarations/core/src/components/eui-super-date-picker/date-popover/absolute-tab.d.ts +0 -27
  405. package/declarations/core/src/components/eui-super-date-picker/date-popover/absolute-tab.d.ts.map +0 -1
  406. package/declarations/core/src/components/eui-super-date-picker/date-popover/datetime-picker.d.ts +0 -65
  407. package/declarations/core/src/components/eui-super-date-picker/date-popover/datetime-picker.d.ts.map +0 -1
  408. package/declarations/core/src/components/eui-super-date-picker/date-popover/eui-date-popover-button.d.ts +0 -45
  409. package/declarations/core/src/components/eui-super-date-picker/date-popover/eui-date-popover-button.d.ts.map +0 -1
  410. package/declarations/core/src/components/eui-super-date-picker/date-popover/eui-date-popover-content.d.ts +0 -49
  411. package/declarations/core/src/components/eui-super-date-picker/date-popover/eui-date-popover-content.d.ts.map +0 -1
  412. package/declarations/core/src/components/eui-super-date-picker/date-popover/now-tab.d.ts +0 -10
  413. package/declarations/core/src/components/eui-super-date-picker/date-popover/now-tab.d.ts.map +0 -1
  414. package/declarations/core/src/components/eui-super-date-picker/date-popover/relative-tab.d.ts +0 -31
  415. package/declarations/core/src/components/eui-super-date-picker/date-popover/relative-tab.d.ts.map +0 -1
  416. package/declarations/core/src/components/eui-super-date-picker/eui-date-picker-range.d.ts +0 -18
  417. package/declarations/core/src/components/eui-super-date-picker/eui-date-picker-range.d.ts.map +0 -1
  418. package/declarations/core/src/components/eui-super-date-picker/eui-quick-select-popover/eui-commonly-used-time-ranges.d.ts +0 -14
  419. package/declarations/core/src/components/eui-super-date-picker/eui-quick-select-popover/eui-commonly-used-time-ranges.d.ts.map +0 -1
  420. package/declarations/core/src/components/eui-super-date-picker/eui-quick-select-popover/eui-quick-select.d.ts +0 -37
  421. package/declarations/core/src/components/eui-super-date-picker/eui-quick-select-popover/eui-quick-select.d.ts.map +0 -1
  422. package/declarations/core/src/components/eui-super-date-picker/eui-quick-select-popover/eui-recently-used.d.ts +0 -14
  423. package/declarations/core/src/components/eui-super-date-picker/eui-quick-select-popover/eui-recently-used.d.ts.map +0 -1
  424. package/declarations/core/src/components/eui-super-date-picker/eui-quick-select-popover.d.ts +0 -33
  425. package/declarations/core/src/components/eui-super-date-picker/eui-quick-select-popover.d.ts.map +0 -1
  426. package/declarations/core/src/components/eui-super-date-picker/eui-super-update-button.d.ts +0 -20
  427. package/declarations/core/src/components/eui-super-date-picker/eui-super-update-button.d.ts.map +0 -1
  428. package/declarations/core/src/components/eui-super-date-picker/utils/index.d.ts +0 -31
  429. package/declarations/core/src/components/eui-super-date-picker/utils/index.d.ts.map +0 -1
  430. package/declarations/core/src/components/eui-super-date-picker/utils/quick-select.d.ts +0 -14
  431. package/declarations/core/src/components/eui-super-date-picker/utils/quick-select.d.ts.map +0 -1
  432. package/declarations/core/src/components/eui-super-date-picker/utils/time-options.d.ts +0 -20
  433. package/declarations/core/src/components/eui-super-date-picker/utils/time-options.d.ts.map +0 -1
  434. package/declarations/core/src/components/eui-super-date-picker.d.ts +0 -102
  435. package/declarations/core/src/components/eui-super-date-picker.d.ts.map +0 -1
  436. package/declarations/core/src/components/eui-switch.d.ts +0 -30
  437. package/declarations/core/src/components/eui-switch.d.ts.map +0 -1
  438. package/declarations/core/src/components/eui-tab.d.ts +0 -21
  439. package/declarations/core/src/components/eui-tab.d.ts.map +0 -1
  440. package/declarations/core/src/components/eui-tabbed-content.d.ts +0 -65
  441. package/declarations/core/src/components/eui-tabbed-content.d.ts.map +0 -1
  442. package/declarations/core/src/components/eui-tabs.d.ts +0 -18
  443. package/declarations/core/src/components/eui-tabs.d.ts.map +0 -1
  444. package/declarations/core/src/components/eui-text-align.d.ts +0 -13
  445. package/declarations/core/src/components/eui-text-align.d.ts.map +0 -1
  446. package/declarations/core/src/components/eui-text-area.d.ts +0 -22
  447. package/declarations/core/src/components/eui-text-area.d.ts.map +0 -1
  448. package/declarations/core/src/components/eui-text-color.d.ts +0 -14
  449. package/declarations/core/src/components/eui-text-color.d.ts.map +0 -1
  450. package/declarations/core/src/components/eui-text.d.ts +0 -19
  451. package/declarations/core/src/components/eui-text.d.ts.map +0 -1
  452. package/declarations/core/src/components/eui-title.d.ts +0 -17
  453. package/declarations/core/src/components/eui-title.d.ts.map +0 -1
  454. package/declarations/core/src/components/eui-toast.d.ts +0 -35
  455. package/declarations/core/src/components/eui-toast.d.ts.map +0 -1
  456. package/declarations/core/src/components/eui-tool-tip-popover.d.ts +0 -26
  457. package/declarations/core/src/components/eui-tool-tip-popover.d.ts.map +0 -1
  458. package/declarations/core/src/components/eui-tool-tip.d.ts +0 -108
  459. package/declarations/core/src/components/eui-tool-tip.d.ts.map +0 -1
  460. package/declarations/core/src/components/text-block.d.ts +0 -13
  461. package/declarations/core/src/components/text-block.d.ts.map +0 -1
  462. package/declarations/core/src/components.d.ts +0 -150
  463. package/declarations/core/src/components.d.ts.map +0 -1
  464. package/declarations/core/src/helpers/arg-or-default.d.ts +0 -21
  465. package/declarations/core/src/helpers/arg-or-default.d.ts.map +0 -1
  466. package/declarations/core/src/helpers/cast-to.d.ts +0 -14
  467. package/declarations/core/src/helpers/cast-to.d.ts.map +0 -1
  468. package/declarations/core/src/helpers/class-names.d.ts +0 -47
  469. package/declarations/core/src/helpers/class-names.d.ts.map +0 -1
  470. package/declarations/core/src/helpers/eui-page-restrict-width.d.ts +0 -30
  471. package/declarations/core/src/helpers/eui-page-restrict-width.d.ts.map +0 -1
  472. package/declarations/core/src/helpers/get-eui-config.d.ts +0 -14
  473. package/declarations/core/src/helpers/get-eui-config.d.ts.map +0 -1
  474. package/declarations/core/src/helpers/get-range-tick.d.ts +0 -21
  475. package/declarations/core/src/helpers/get-range-tick.d.ts.map +0 -1
  476. package/declarations/core/src/helpers/hex-to-rgb.d.ts +0 -10
  477. package/declarations/core/src/helpers/hex-to-rgb.d.ts.map +0 -1
  478. package/declarations/core/src/helpers/inline-styles.d.ts +0 -19
  479. package/declarations/core/src/helpers/inline-styles.d.ts.map +0 -1
  480. package/declarations/core/src/helpers/is-color-dark.d.ts +0 -10
  481. package/declarations/core/src/helpers/is-color-dark.d.ts.map +0 -1
  482. package/declarations/core/src/helpers/is-item-open.d.ts +0 -16
  483. package/declarations/core/src/helpers/is-item-open.d.ts.map +0 -1
  484. package/declarations/core/src/helpers/is-valid-hex.d.ts +0 -10
  485. package/declarations/core/src/helpers/is-valid-hex.d.ts.map +0 -1
  486. package/declarations/core/src/helpers/merge.d.ts +0 -9
  487. package/declarations/core/src/helpers/merge.d.ts.map +0 -1
  488. package/declarations/core/src/helpers/to-initials.d.ts +0 -11
  489. package/declarations/core/src/helpers/to-initials.d.ts.map +0 -1
  490. package/declarations/core/src/helpers/type-of.d.ts +0 -10
  491. package/declarations/core/src/helpers/type-of.d.ts.map +0 -1
  492. package/declarations/core/src/helpers/use-state.d.ts +0 -21
  493. package/declarations/core/src/helpers/use-state.d.ts.map +0 -1
  494. package/declarations/core/src/helpers.d.ts +0 -9
  495. package/declarations/core/src/helpers.d.ts.map +0 -1
  496. package/declarations/core/src/i18n/util.d.ts +0 -12
  497. package/declarations/core/src/i18n/util.d.ts.map +0 -1
  498. package/declarations/core/src/modifiers/mutation-observer.d.ts +0 -12
  499. package/declarations/core/src/modifiers/mutation-observer.d.ts.map +0 -1
  500. package/declarations/core/src/modifiers/outside-click-detector.d.ts +0 -38
  501. package/declarations/core/src/modifiers/outside-click-detector.d.ts.map +0 -1
  502. package/declarations/core/src/modifiers/resize-observer.d.ts +0 -36
  503. package/declarations/core/src/modifiers/resize-observer.d.ts.map +0 -1
  504. package/declarations/core/src/modifiers/screen-reader-only.d.ts +0 -9
  505. package/declarations/core/src/modifiers/screen-reader-only.d.ts.map +0 -1
  506. package/declarations/core/src/modifiers/simple-style.d.ts +0 -12
  507. package/declarations/core/src/modifiers/simple-style.d.ts.map +0 -1
  508. package/declarations/core/src/modifiers/use-is-within-breakpoints.d.ts +0 -15
  509. package/declarations/core/src/modifiers/use-is-within-breakpoints.d.ts.map +0 -1
  510. package/declarations/core/src/modifiers/validatable-control.d.ts +0 -9
  511. package/declarations/core/src/modifiers/validatable-control.d.ts.map +0 -1
  512. package/declarations/core/src/services/eui-config.d.ts +0 -15
  513. package/declarations/core/src/services/eui-config.d.ts.map +0 -1
  514. package/declarations/core/src/services/eui-i18n.d.ts +0 -24
  515. package/declarations/core/src/services/eui-i18n.d.ts.map +0 -1
  516. package/declarations/core/src/utils/accesibility/accessible-click-keys.d.ts +0 -5
  517. package/declarations/core/src/utils/accesibility/accessible-click-keys.d.ts.map +0 -1
  518. package/declarations/core/src/utils/accesibility/cascading-menu-keys.d.ts +0 -9
  519. package/declarations/core/src/utils/accesibility/cascading-menu-keys.d.ts.map +0 -1
  520. package/declarations/core/src/utils/accesibility/combo-box-keys.d.ts +0 -8
  521. package/declarations/core/src/utils/accesibility/combo-box-keys.d.ts.map +0 -1
  522. package/declarations/core/src/utils/accesibility/index.d.ts +0 -4
  523. package/declarations/core/src/utils/accesibility/index.d.ts.map +0 -1
  524. package/declarations/core/src/utils/breakpoint.d.ts +0 -50
  525. package/declarations/core/src/utils/breakpoint.d.ts.map +0 -1
  526. package/declarations/core/src/utils/browser/browser.d.ts +0 -6
  527. package/declarations/core/src/utils/browser/browser.d.ts.map +0 -1
  528. package/declarations/core/src/utils/browser/index.d.ts +0 -2
  529. package/declarations/core/src/utils/browser/index.d.ts.map +0 -1
  530. package/declarations/core/src/utils/code/utils.d.ts +0 -32
  531. package/declarations/core/src/utils/code/utils.d.ts.map +0 -1
  532. package/declarations/core/src/utils/color/color_palette.d.ts +0 -24
  533. package/declarations/core/src/utils/color/color_palette.d.ts.map +0 -1
  534. package/declarations/core/src/utils/color/eui_palettes.d.ts +0 -37
  535. package/declarations/core/src/utils/color/eui_palettes.d.ts.map +0 -1
  536. package/declarations/core/src/utils/color/index.d.ts +0 -6
  537. package/declarations/core/src/utils/color/index.d.ts.map +0 -1
  538. package/declarations/core/src/utils/copy-to-clipboard.d.ts +0 -2
  539. package/declarations/core/src/utils/copy-to-clipboard.d.ts.map +0 -1
  540. package/declarations/core/src/utils/css-mappings/eui-accordion.d.ts +0 -12
  541. package/declarations/core/src/utils/css-mappings/eui-accordion.d.ts.map +0 -1
  542. package/declarations/core/src/utils/css-mappings/eui-avatar.d.ts +0 -23
  543. package/declarations/core/src/utils/css-mappings/eui-avatar.d.ts.map +0 -1
  544. package/declarations/core/src/utils/css-mappings/eui-badge-group.d.ts +0 -8
  545. package/declarations/core/src/utils/css-mappings/eui-badge-group.d.ts.map +0 -1
  546. package/declarations/core/src/utils/css-mappings/eui-badge.d.ts +0 -31
  547. package/declarations/core/src/utils/css-mappings/eui-badge.d.ts.map +0 -1
  548. package/declarations/core/src/utils/css-mappings/eui-beta-badge.d.ts +0 -13
  549. package/declarations/core/src/utils/css-mappings/eui-beta-badge.d.ts.map +0 -1
  550. package/declarations/core/src/utils/css-mappings/eui-bottom-bar.d.ts +0 -4
  551. package/declarations/core/src/utils/css-mappings/eui-bottom-bar.d.ts.map +0 -1
  552. package/declarations/core/src/utils/css-mappings/eui-button-empty.d.ts +0 -22
  553. package/declarations/core/src/utils/css-mappings/eui-button-empty.d.ts.map +0 -1
  554. package/declarations/core/src/utils/css-mappings/eui-button-group-button.d.ts +0 -4
  555. package/declarations/core/src/utils/css-mappings/eui-button-group-button.d.ts.map +0 -1
  556. package/declarations/core/src/utils/css-mappings/eui-button-group.d.ts +0 -4
  557. package/declarations/core/src/utils/css-mappings/eui-button-group.d.ts.map +0 -1
  558. package/declarations/core/src/utils/css-mappings/eui-button-icon.d.ts +0 -23
  559. package/declarations/core/src/utils/css-mappings/eui-button-icon.d.ts.map +0 -1
  560. package/declarations/core/src/utils/css-mappings/eui-button.d.ts +0 -13
  561. package/declarations/core/src/utils/css-mappings/eui-button.d.ts.map +0 -1
  562. package/declarations/core/src/utils/css-mappings/eui-call-out.d.ts +0 -13
  563. package/declarations/core/src/utils/css-mappings/eui-call-out.d.ts.map +0 -1
  564. package/declarations/core/src/utils/css-mappings/eui-card-select.d.ts +0 -4
  565. package/declarations/core/src/utils/css-mappings/eui-card-select.d.ts.map +0 -1
  566. package/declarations/core/src/utils/css-mappings/eui-card.d.ts +0 -9
  567. package/declarations/core/src/utils/css-mappings/eui-card.d.ts.map +0 -1
  568. package/declarations/core/src/utils/css-mappings/eui-code-block.d.ts +0 -15
  569. package/declarations/core/src/utils/css-mappings/eui-code-block.d.ts.map +0 -1
  570. package/declarations/core/src/utils/css-mappings/eui-collapsible-nav-group.d.ts +0 -9
  571. package/declarations/core/src/utils/css-mappings/eui-collapsible-nav-group.d.ts.map +0 -1
  572. package/declarations/core/src/utils/css-mappings/eui-comment-event.d.ts +0 -4
  573. package/declarations/core/src/utils/css-mappings/eui-comment-event.d.ts.map +0 -1
  574. package/declarations/core/src/utils/css-mappings/eui-comment-timeline-icon.d.ts +0 -7
  575. package/declarations/core/src/utils/css-mappings/eui-comment-timeline-icon.d.ts.map +0 -1
  576. package/declarations/core/src/utils/css-mappings/eui-context-menu-item.d.ts +0 -15
  577. package/declarations/core/src/utils/css-mappings/eui-context-menu-item.d.ts.map +0 -1
  578. package/declarations/core/src/utils/css-mappings/eui-described-form-group.d.ts +0 -12
  579. package/declarations/core/src/utils/css-mappings/eui-described-form-group.d.ts.map +0 -1
  580. package/declarations/core/src/utils/css-mappings/eui-description-list.d.ts +0 -18
  581. package/declarations/core/src/utils/css-mappings/eui-description-list.d.ts.map +0 -1
  582. package/declarations/core/src/utils/css-mappings/eui-empty-prompt.d.ts +0 -10
  583. package/declarations/core/src/utils/css-mappings/eui-empty-prompt.d.ts.map +0 -1
  584. package/declarations/core/src/utils/css-mappings/eui-file-picker.d.ts +0 -8
  585. package/declarations/core/src/utils/css-mappings/eui-file-picker.d.ts.map +0 -1
  586. package/declarations/core/src/utils/css-mappings/eui-flex-grid.d.ts +0 -22
  587. package/declarations/core/src/utils/css-mappings/eui-flex-grid.d.ts.map +0 -1
  588. package/declarations/core/src/utils/css-mappings/eui-flex-group.d.ts +0 -33
  589. package/declarations/core/src/utils/css-mappings/eui-flex-group.d.ts.map +0 -1
  590. package/declarations/core/src/utils/css-mappings/eui-flex-item.d.ts +0 -17
  591. package/declarations/core/src/utils/css-mappings/eui-flex-item.d.ts.map +0 -1
  592. package/declarations/core/src/utils/css-mappings/eui-flyout.d.ts +0 -23
  593. package/declarations/core/src/utils/css-mappings/eui-flyout.d.ts.map +0 -1
  594. package/declarations/core/src/utils/css-mappings/eui-form-control-layout-clear-button.d.ts +0 -8
  595. package/declarations/core/src/utils/css-mappings/eui-form-control-layout-clear-button.d.ts.map +0 -1
  596. package/declarations/core/src/utils/css-mappings/eui-form-row.d.ts +0 -12
  597. package/declarations/core/src/utils/css-mappings/eui-form-row.d.ts.map +0 -1
  598. package/declarations/core/src/utils/css-mappings/eui-global-toast-list.d.ts +0 -8
  599. package/declarations/core/src/utils/css-mappings/eui-global-toast-list.d.ts.map +0 -1
  600. package/declarations/core/src/utils/css-mappings/eui-header-links.d.ts +0 -18
  601. package/declarations/core/src/utils/css-mappings/eui-header-links.d.ts.map +0 -1
  602. package/declarations/core/src/utils/css-mappings/eui-header-section-item.d.ts +0 -9
  603. package/declarations/core/src/utils/css-mappings/eui-header-section-item.d.ts.map +0 -1
  604. package/declarations/core/src/utils/css-mappings/eui-header-section.d.ts +0 -12
  605. package/declarations/core/src/utils/css-mappings/eui-header-section.d.ts.map +0 -1
  606. package/declarations/core/src/utils/css-mappings/eui-header.d.ts +0 -12
  607. package/declarations/core/src/utils/css-mappings/eui-header.d.ts.map +0 -1
  608. package/declarations/core/src/utils/css-mappings/eui-health.d.ts +0 -10
  609. package/declarations/core/src/utils/css-mappings/eui-health.d.ts.map +0 -1
  610. package/declarations/core/src/utils/css-mappings/eui-horizontal-rule.d.ts +0 -18
  611. package/declarations/core/src/utils/css-mappings/eui-horizontal-rule.d.ts.map +0 -1
  612. package/declarations/core/src/utils/css-mappings/eui-icon.d.ts +0 -494
  613. package/declarations/core/src/utils/css-mappings/eui-icon.d.ts.map +0 -1
  614. package/declarations/core/src/utils/css-mappings/eui-image.d.ts +0 -22
  615. package/declarations/core/src/utils/css-mappings/eui-image.d.ts.map +0 -1
  616. package/declarations/core/src/utils/css-mappings/eui-link.d.ts +0 -14
  617. package/declarations/core/src/utils/css-mappings/eui-link.d.ts.map +0 -1
  618. package/declarations/core/src/utils/css-mappings/eui-list-group-item.d.ts +0 -17
  619. package/declarations/core/src/utils/css-mappings/eui-list-group-item.d.ts.map +0 -1
  620. package/declarations/core/src/utils/css-mappings/eui-list-group.d.ts +0 -12
  621. package/declarations/core/src/utils/css-mappings/eui-list-group.d.ts.map +0 -1
  622. package/declarations/core/src/utils/css-mappings/eui-loading-spinner.d.ts +0 -10
  623. package/declarations/core/src/utils/css-mappings/eui-loading-spinner.d.ts.map +0 -1
  624. package/declarations/core/src/utils/css-mappings/eui-modal.d.ts +0 -7
  625. package/declarations/core/src/utils/css-mappings/eui-modal.d.ts.map +0 -1
  626. package/declarations/core/src/utils/css-mappings/eui-notification-badge.d.ts +0 -11
  627. package/declarations/core/src/utils/css-mappings/eui-notification-badge.d.ts.map +0 -1
  628. package/declarations/core/src/utils/css-mappings/eui-page-body.d.ts +0 -16
  629. package/declarations/core/src/utils/css-mappings/eui-page-body.d.ts.map +0 -1
  630. package/declarations/core/src/utils/css-mappings/eui-page-content-body.d.ts +0 -10
  631. package/declarations/core/src/utils/css-mappings/eui-page-content-body.d.ts.map +0 -1
  632. package/declarations/core/src/utils/css-mappings/eui-page-content.d.ts +0 -10
  633. package/declarations/core/src/utils/css-mappings/eui-page-content.d.ts.map +0 -1
  634. package/declarations/core/src/utils/css-mappings/eui-page-header.d.ts +0 -10
  635. package/declarations/core/src/utils/css-mappings/eui-page-header.d.ts.map +0 -1
  636. package/declarations/core/src/utils/css-mappings/eui-page-side-bar.d.ts +0 -10
  637. package/declarations/core/src/utils/css-mappings/eui-page-side-bar.d.ts.map +0 -1
  638. package/declarations/core/src/utils/css-mappings/eui-page.d.ts +0 -24
  639. package/declarations/core/src/utils/css-mappings/eui-page.d.ts.map +0 -1
  640. package/declarations/core/src/utils/css-mappings/eui-panel.d.ts +0 -24
  641. package/declarations/core/src/utils/css-mappings/eui-panel.d.ts.map +0 -1
  642. package/declarations/core/src/utils/css-mappings/eui-popover-footer.d.ts +0 -10
  643. package/declarations/core/src/utils/css-mappings/eui-popover-footer.d.ts.map +0 -1
  644. package/declarations/core/src/utils/css-mappings/eui-popover-title.d.ts +0 -10
  645. package/declarations/core/src/utils/css-mappings/eui-popover-title.d.ts.map +0 -1
  646. package/declarations/core/src/utils/css-mappings/eui-popover.d.ts +0 -22
  647. package/declarations/core/src/utils/css-mappings/eui-popover.d.ts.map +0 -1
  648. package/declarations/core/src/utils/css-mappings/eui-progress-data.d.ts +0 -3
  649. package/declarations/core/src/utils/css-mappings/eui-progress-data.d.ts.map +0 -1
  650. package/declarations/core/src/utils/css-mappings/eui-progress.d.ts +0 -50
  651. package/declarations/core/src/utils/css-mappings/eui-progress.d.ts.map +0 -1
  652. package/declarations/core/src/utils/css-mappings/eui-range-highlight.d.ts +0 -11
  653. package/declarations/core/src/utils/css-mappings/eui-range-highlight.d.ts.map +0 -1
  654. package/declarations/core/src/utils/css-mappings/eui-range-input.d.ts +0 -8
  655. package/declarations/core/src/utils/css-mappings/eui-range-input.d.ts.map +0 -1
  656. package/declarations/core/src/utils/css-mappings/eui-range-levels.d.ts +0 -13
  657. package/declarations/core/src/utils/css-mappings/eui-range-levels.d.ts.map +0 -1
  658. package/declarations/core/src/utils/css-mappings/eui-selectable-list-item.d.ts +0 -7
  659. package/declarations/core/src/utils/css-mappings/eui-selectable-list-item.d.ts.map +0 -1
  660. package/declarations/core/src/utils/css-mappings/eui-spacer.d.ts +0 -12
  661. package/declarations/core/src/utils/css-mappings/eui-spacer.d.ts.map +0 -1
  662. package/declarations/core/src/utils/css-mappings/eui-stat.d.ts +0 -17
  663. package/declarations/core/src/utils/css-mappings/eui-stat.d.ts.map +0 -1
  664. package/declarations/core/src/utils/css-mappings/eui-step-number.d.ts +0 -11
  665. package/declarations/core/src/utils/css-mappings/eui-step-number.d.ts.map +0 -1
  666. package/declarations/core/src/utils/css-mappings/eui-tabs.d.ts +0 -14
  667. package/declarations/core/src/utils/css-mappings/eui-tabs.d.ts.map +0 -1
  668. package/declarations/core/src/utils/css-mappings/eui-text-align.d.ts +0 -9
  669. package/declarations/core/src/utils/css-mappings/eui-text-align.d.ts.map +0 -1
  670. package/declarations/core/src/utils/css-mappings/eui-text-area.d.ts +0 -10
  671. package/declarations/core/src/utils/css-mappings/eui-text-area.d.ts.map +0 -1
  672. package/declarations/core/src/utils/css-mappings/eui-text-color.d.ts +0 -14
  673. package/declarations/core/src/utils/css-mappings/eui-text-color.d.ts.map +0 -1
  674. package/declarations/core/src/utils/css-mappings/eui-text.d.ts +0 -9
  675. package/declarations/core/src/utils/css-mappings/eui-text.d.ts.map +0 -1
  676. package/declarations/core/src/utils/css-mappings/eui-title.d.ts +0 -15
  677. package/declarations/core/src/utils/css-mappings/eui-title.d.ts.map +0 -1
  678. package/declarations/core/src/utils/css-mappings/eui-toast.d.ts +0 -11
  679. package/declarations/core/src/utils/css-mappings/eui-toast.d.ts.map +0 -1
  680. package/declarations/core/src/utils/css-mappings/eui-tool-tip.d.ts +0 -10
  681. package/declarations/core/src/utils/css-mappings/eui-tool-tip.d.ts.map +0 -1
  682. package/declarations/core/src/utils/css-mappings/index.d.ts +0 -3
  683. package/declarations/core/src/utils/css-mappings/index.d.ts.map +0 -1
  684. package/declarations/core/src/utils/detect-element-resize.d.ts +0 -17
  685. package/declarations/core/src/utils/detect-element-resize.d.ts.map +0 -1
  686. package/declarations/core/src/utils/keys.d.ts +0 -31
  687. package/declarations/core/src/utils/keys.d.ts.map +0 -1
  688. package/declarations/core/src/utils/markdown/markdown-actions.d.ts +0 -45
  689. package/declarations/core/src/utils/markdown/markdown-actions.d.ts.map +0 -1
  690. package/declarations/core/src/utils/markdown/markdown-modes.d.ts +0 -4
  691. package/declarations/core/src/utils/markdown/markdown-modes.d.ts.map +0 -1
  692. package/declarations/core/src/utils/markdown/markdown-types.d.ts +0 -100
  693. package/declarations/core/src/utils/markdown/markdown-types.d.ts.map +0 -1
  694. package/declarations/core/src/utils/markdown/plugins/markdown-add-components/index.d.ts +0 -3
  695. package/declarations/core/src/utils/markdown/plugins/markdown-add-components/index.d.ts.map +0 -1
  696. package/declarations/core/src/utils/markdown/plugins/markdown-add-components/processor.d.ts +0 -6
  697. package/declarations/core/src/utils/markdown/plugins/markdown-add-components/processor.d.ts.map +0 -1
  698. package/declarations/core/src/utils/markdown/plugins/markdown-checkbox/index.d.ts +0 -2
  699. package/declarations/core/src/utils/markdown/plugins/markdown-checkbox/index.d.ts.map +0 -1
  700. package/declarations/core/src/utils/markdown/plugins/markdown-checkbox/parser.d.ts +0 -3
  701. package/declarations/core/src/utils/markdown/plugins/markdown-checkbox/parser.d.ts.map +0 -1
  702. package/declarations/core/src/utils/markdown/plugins/markdown-default-plugins/index.d.ts +0 -5
  703. package/declarations/core/src/utils/markdown/plugins/markdown-default-plugins/index.d.ts.map +0 -1
  704. package/declarations/core/src/utils/markdown/plugins/markdown-default-plugins/parsing-plugins.d.ts +0 -7
  705. package/declarations/core/src/utils/markdown/plugins/markdown-default-plugins/parsing-plugins.d.ts.map +0 -1
  706. package/declarations/core/src/utils/markdown/plugins/markdown-default-plugins/plugins.d.ts +0 -11
  707. package/declarations/core/src/utils/markdown/plugins/markdown-default-plugins/plugins.d.ts.map +0 -1
  708. package/declarations/core/src/utils/markdown/plugins/markdown-default-plugins/processing-plugins.d.ts +0 -21
  709. package/declarations/core/src/utils/markdown/plugins/markdown-default-plugins/processing-plugins.d.ts.map +0 -1
  710. package/declarations/core/src/utils/markdown/plugins/markdown-default-plugins/ui-plugins.d.ts +0 -7
  711. package/declarations/core/src/utils/markdown/plugins/markdown-default-plugins/ui-plugins.d.ts.map +0 -1
  712. package/declarations/core/src/utils/markdown/plugins/markdown-tooltip/index.d.ts +0 -3
  713. package/declarations/core/src/utils/markdown/plugins/markdown-tooltip/index.d.ts.map +0 -1
  714. package/declarations/core/src/utils/markdown/plugins/markdown-tooltip/parser.d.ts +0 -3
  715. package/declarations/core/src/utils/markdown/plugins/markdown-tooltip/parser.d.ts.map +0 -1
  716. package/declarations/core/src/utils/markdown/plugins/markdown-tooltip/plugin.d.ts +0 -14
  717. package/declarations/core/src/utils/markdown/plugins/markdown-tooltip/plugin.d.ts.map +0 -1
  718. package/declarations/core/src/utils/markdown/plugins/to-dom.d.ts +0 -20
  719. package/declarations/core/src/utils/markdown/plugins/to-dom.d.ts.map +0 -1
  720. package/declarations/core/src/utils/markdown/remark/remark-prismjs.d.ts +0 -5
  721. package/declarations/core/src/utils/markdown/remark/remark-prismjs.d.ts.map +0 -1
  722. package/declarations/core/src/utils/maybe-unwrap-proxy.d.ts +0 -5
  723. package/declarations/core/src/utils/maybe-unwrap-proxy.d.ts.map +0 -1
  724. package/declarations/core/src/utils/number/index.d.ts +0 -2
  725. package/declarations/core/src/utils/number/index.d.ts.map +0 -1
  726. package/declarations/core/src/utils/number/number.d.ts +0 -3
  727. package/declarations/core/src/utils/number/number.d.ts.map +0 -1
  728. package/declarations/core/src/utils/popover/index.d.ts +0 -154
  729. package/declarations/core/src/utils/popover/index.d.ts.map +0 -1
  730. package/declarations/core/src/utils/popover/types.d.ts +0 -2
  731. package/declarations/core/src/utils/popover/types.d.ts.map +0 -1
  732. package/declarations/core/src/utils/predicate/common_predicates.d.ts +0 -6
  733. package/declarations/core/src/utils/predicate/common_predicates.d.ts.map +0 -1
  734. package/declarations/core/src/utils/predicate/index.d.ts +0 -3
  735. package/declarations/core/src/utils/predicate/index.d.ts.map +0 -1
  736. package/declarations/core/src/utils/predicate/lodash_predicates.d.ts +0 -8
  737. package/declarations/core/src/utils/predicate/lodash_predicates.d.ts.map +0 -1
  738. package/declarations/core/src/utils/range/index.d.ts +0 -2
  739. package/declarations/core/src/utils/range/index.d.ts.map +0 -1
  740. package/declarations/core/src/utils/transition.d.ts +0 -8
  741. package/declarations/core/src/utils/transition.d.ts.map +0 -1
  742. package/declarations/validated-form/src/-private/random-id.d.ts +0 -9
  743. package/declarations/validated-form/src/-private/random-id.d.ts.map +0 -1
  744. package/declarations/validated-form/src/components/default-theme.d.ts +0 -18
  745. package/declarations/validated-form/src/components/default-theme.d.ts.map +0 -1
  746. package/declarations/validated-form/src/components/validated-form/field-base.d.ts +0 -58
  747. package/declarations/validated-form/src/components/validated-form/field-base.d.ts.map +0 -1
  748. package/declarations/validated-form/src/components/validated-form/field-checkbox-group.d.ts +0 -30
  749. package/declarations/validated-form/src/components/validated-form/field-checkbox-group.d.ts.map +0 -1
  750. package/declarations/validated-form/src/components/validated-form/field-combo-box.d.ts +0 -27
  751. package/declarations/validated-form/src/components/validated-form/field-combo-box.d.ts.map +0 -1
  752. package/declarations/validated-form/src/components/validated-form/field-dual-range-slider.d.ts +0 -32
  753. package/declarations/validated-form/src/components/validated-form/field-dual-range-slider.d.ts.map +0 -1
  754. package/declarations/validated-form/src/components/validated-form/field-markdown-editor.d.ts +0 -25
  755. package/declarations/validated-form/src/components/validated-form/field-markdown-editor.d.ts.map +0 -1
  756. package/declarations/validated-form/src/components/validated-form/field-number.d.ts +0 -24
  757. package/declarations/validated-form/src/components/validated-form/field-number.d.ts.map +0 -1
  758. package/declarations/validated-form/src/components/validated-form/field-password.d.ts +0 -24
  759. package/declarations/validated-form/src/components/validated-form/field-password.d.ts.map +0 -1
  760. package/declarations/validated-form/src/components/validated-form/field-radio-group.d.ts +0 -29
  761. package/declarations/validated-form/src/components/validated-form/field-radio-group.d.ts.map +0 -1
  762. package/declarations/validated-form/src/components/validated-form/field-range-slider.d.ts +0 -28
  763. package/declarations/validated-form/src/components/validated-form/field-range-slider.d.ts.map +0 -1
  764. package/declarations/validated-form/src/components/validated-form/field-select.d.ts +0 -23
  765. package/declarations/validated-form/src/components/validated-form/field-select.d.ts.map +0 -1
  766. package/declarations/validated-form/src/components/validated-form/field-switch.d.ts +0 -24
  767. package/declarations/validated-form/src/components/validated-form/field-switch.d.ts.map +0 -1
  768. package/declarations/validated-form/src/components/validated-form/field-text-area.d.ts +0 -29
  769. package/declarations/validated-form/src/components/validated-form/field-text-area.d.ts.map +0 -1
  770. package/declarations/validated-form/src/components/validated-form/field-text.d.ts +0 -22
  771. package/declarations/validated-form/src/components/validated-form/field-text.d.ts.map +0 -1
  772. package/declarations/validated-form/src/components/validated-form.d.ts +0 -93
  773. package/declarations/validated-form/src/components/validated-form.d.ts.map +0 -1
  774. package/declarations/validated-form/src/utils/build-validation-messages.d.ts +0 -13
  775. package/declarations/validated-form/src/utils/build-validation-messages.d.ts.map +0 -1
  776. package/declarations/validated-form/src/utils/get-messages.d.ts +0 -11
  777. package/declarations/validated-form/src/utils/get-messages.d.ts.map +0 -1
  778. package/declarations/validated-form/src/utils/validation-errors.d.ts +0 -2
  779. package/declarations/validated-form/src/utils/validation-errors.d.ts.map +0 -1
  780. package/declarations/validated-form/src/utils/with-defaults.d.ts +0 -10
  781. package/declarations/validated-form/src/utils/with-defaults.d.ts.map +0 -1
  782. package/declarations/validated-form/src/validators/messages.d.ts +0 -4
  783. package/declarations/validated-form/src/validators/messages.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"field-text.js","sources":["../../../src/components/validated-form/field-text.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport EuiFieldText from '@ember-eui/core/components/eui-field-text';\nimport EuiFormRow from '@ember-eui/core/components/eui-form-row';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id.ts';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFieldTextSignature } from '@ember-eui/core/components/eui-field-text';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldTextSignature {\n Element: EuiFieldTextSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiFieldTextSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n };\n Blocks: {\n label: [];\n prepend: [...EuiFieldTextSignature['Blocks']['prepend']];\n append: [...EuiFieldTextSignature['Blocks']['append']];\n };\n}\nexport default class ValidatedFormFieldText extends ValidatedFormFieldBase<FieldTextSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiFieldText\n class={{@fieldClasses}}\n aria-label={{@ariaLabel}}\n form={{@formId}}\n @value={{@value}}\n @icon={{@icon}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @disabled={{@disabled}}\n @readOnly={{@readOnly}}\n @inputRef={{@inputRef}}\n @controlOnly={{@controlOnly}}\n @compressed={{@compressed}}\n @clear={{@clear}}\n @id={{theId}}\n @isFakePrependBlock={{not (has-block \"prepend\")}}\n @isFakeAppendBlock={{not (has-block \"append\")}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"input\" this.handleChange}}\n ...attributes\n >\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiFieldText>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9iZXRvY2FudHU5My9wcnlzbWV4L2VtYmVyLWV1aS9wYWNrYWdlcy92YWxpZGF0ZWQtZm9ybS9zcmMvY29tcG9uZW50cy92YWxpZGF0ZWQtZm9ybS9maWVsZC10ZXh0Lmd0cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBmbiB9IGZyb20gJ0BlbWJlci9oZWxwZXInO1xuaW1wb3J0IHsgb24gfSBmcm9tICdAZW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c0IsVUFBVTs7O0FBSWhELGVBQWUsTUFBTSwrQkFBK0IsdUJBQXVCO0lBQ3pFLE1BQUE7UUFBQSxTQUFVLENBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0VBMkRWLENBQUEsRUFBQTtZQUFBLFdBQUEsSUFBVztZQUFYO2dCQUFBLE9BQUEsS0FBQSxTQUFBLENBQUEsRUFBVztZQUFEO1FBQUE7SUFBQSxDQTNEQTtBQTREWiJ9"],"names":["ValidatedFormFieldText","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","strictMode","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiFieldText","on","fn"],"mappings":";;;;;;;;;;;;;AAmCe,MAAMA,sBAAA,SAA+BC,sBAAA,CAAuB;AACzE,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CA2DA,upDAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,YAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;AAAU,KAAA,CAAA,EAAV,IAAW,CAAA,CAAA;AAAD,GAAA;AACZ;;;;"}
1
+ {"version":3,"file":"field-text.js","sources":["../../../src/components/validated-form/field-text.gts"],"sourcesContent":["import { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport EuiFieldText from '@ember-eui/core/components/eui-field-text';\nimport EuiFormRow from '@ember-eui/core/components/eui-form-row';\nimport { argOrDefault } from '@ember-eui/core/helpers';\n\nimport { not } from 'ember-truth-helpers';\n\nimport randomId from '../../-private/random-id.ts';\nimport ValidatedFormFieldBase from './field-base.gts';\n\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFieldTextSignature } from '@ember-eui/core/components/eui-field-text';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\n\nexport interface FieldTextSignature {\n Element: EuiFieldTextSignature['Element'];\n Args: FieldBaseSignature['Args'] &\n EuiFormRowSignature['Args'] &\n EuiFieldTextSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n };\n Blocks: {\n label: [];\n prepend: [...EuiFieldTextSignature['Blocks']['prepend']];\n append: [...EuiFieldTextSignature['Blocks']['append']];\n };\n}\n\nexport default class ValidatedFormFieldText extends ValidatedFormFieldBase<FieldTextSignature> {\n <template>\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiFieldText\n class={{@fieldClasses}}\n aria-label={{@ariaLabel}}\n form={{@formId}}\n @value={{@value}}\n @icon={{@icon}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @disabled={{@disabled}}\n @readOnly={{@readOnly}}\n @inputRef={{@inputRef}}\n @controlOnly={{@controlOnly}}\n @compressed={{@compressed}}\n @clear={{@clear}}\n @id={{theId}}\n @isFakePrependBlock={{not (has-block \"prepend\")}}\n @isFakeAppendBlock={{not (has-block \"append\")}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"input\" this.handleChange}}\n ...attributes\n >\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiFieldText>\n </:field>\n </EuiFormRow>\n {{/let}}\n </template>\n}\n"],"names":["ValidatedFormFieldText","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","strictMode","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiFieldText","on","fn"],"mappings":";;;;;;;;;;;;;AAmCe,MAAMA,+BAA+BC,sBAAuB,CAAA;AACzE,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CA2DA,upDAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,YAAA;QAAAC,EAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -20,7 +20,7 @@ class ValidatedFormComponent extends Component {
20
20
  return A([]);
21
21
  });
22
22
  }
23
- #childComponents = (i(this, "childComponents"), void 0);
23
+ #childComponents = (i(this, "childComponents"), undefined);
24
24
  //cache to only notify if changed
25
25
  lastIsValid;
26
26
  lastIsTouched;
@@ -29,15 +29,15 @@ class ValidatedFormComponent extends Component {
29
29
  return false;
30
30
  });
31
31
  }
32
- #isInvalid = (i(this, "isInvalid"), void 0);
32
+ #isInvalid = (i(this, "isInvalid"), undefined);
33
33
  static {
34
34
  g(this.prototype, "isTouched", [tracked], function () {
35
35
  return false;
36
36
  });
37
37
  }
38
- #isTouched = (i(this, "isTouched"), void 0);
39
- constructor(owner1, args1) {
40
- super(owner1, args1);
38
+ #isTouched = (i(this, "isTouched"), undefined);
39
+ constructor(owner, args) {
40
+ super(owner, args);
41
41
  this.args.register?.(this);
42
42
  }
43
43
  willDestroy() {
@@ -50,14 +50,14 @@ class ValidatedFormComponent extends Component {
50
50
  get isInvalidAndTouched() {
51
51
  return this.isInvalid && this.isTouched;
52
52
  }
53
- addChild(child1) {
54
- this.childComponents.pushObject(child1);
53
+ addChild(child) {
54
+ this.childComponents.pushObject(child);
55
55
  }
56
- removeChild(child1) {
57
- this.childComponents.removeObject(child1);
56
+ removeChild(child) {
57
+ this.childComponents.removeObject(child);
58
58
  }
59
- async handleSubmit(e1) {
60
- e1.preventDefault();
59
+ async handleSubmit(e) {
60
+ e.preventDefault();
61
61
  if (this.isInvalid) {
62
62
  this.childComponents.setEach('isTouched', true);
63
63
  this.args.onInvalid?.();
@@ -65,7 +65,7 @@ class ValidatedFormComponent extends Component {
65
65
  this.childComponents.setEach('isTouched', false);
66
66
  try {
67
67
  await this.args.onSubmit?.();
68
- } catch (e1) {
68
+ } catch (e) {
69
69
  this.childComponents.setEach('isTouched', true);
70
70
  }
71
71
  }
@@ -73,24 +73,24 @@ class ValidatedFormComponent extends Component {
73
73
  static {
74
74
  n(this.prototype, "handleSubmit", [action]);
75
75
  }
76
- handleReset(e1) {
77
- e1.preventDefault();
78
- this.args.onReset?.(e1);
76
+ handleReset(e) {
77
+ e.preventDefault();
78
+ this.args.onReset?.(e);
79
79
  }
80
80
  static {
81
81
  n(this.prototype, "handleReset", [action]);
82
82
  }
83
- register(child1) {
83
+ register(child) {
84
84
  if (!this.isDestroyed) {
85
- schedule('afterRender', this, this.addChild, child1);
85
+ schedule('afterRender', this, this.addChild, child);
86
86
  }
87
87
  }
88
88
  static {
89
89
  n(this.prototype, "register", [action]);
90
90
  }
91
- unregister(child1) {
91
+ unregister(child) {
92
92
  if (!this.isDestroyed) {
93
- schedule('afterRender', this, this.removeChild, child1);
93
+ schedule('afterRender', this, this.removeChild, child);
94
94
  // When adding a child the validation gets calculated on a `did-insert` modifier
95
95
  // for removal there's no modifier so it gets called here
96
96
  schedule('afterRender', this, this.triggerValidityChange);
@@ -112,9 +112,9 @@ class ValidatedFormComponent extends Component {
112
112
  return this.childComponents.isAny('isTouched');
113
113
  }
114
114
  triggerValidityChange() {
115
- const lastIsValid1 = this.isValid;
116
- const lastIsTouched1 = this.isTouched;
117
- if (lastIsValid1 !== this.getIsValid() || lastIsTouched1 !== this.getIsTouched()) {
115
+ const lastIsValid = this.isValid;
116
+ const lastIsTouched = this.isTouched;
117
+ if (lastIsValid !== this.getIsValid() || lastIsTouched !== this.getIsTouched()) {
118
118
  this.setNewValidity();
119
119
  }
120
120
  }
@@ -139,10 +139,10 @@ class ValidatedFormComponent extends Component {
139
139
  n(this.prototype, "onChildValidityChange", [action]);
140
140
  }
141
141
  get theme() {
142
- const theme1 = this.args.theme || {};
142
+ const theme = this.args.theme || {};
143
143
  return {
144
144
  ...ValidatedFormDefaultTheme,
145
- ...theme1
145
+ ...theme
146
146
  };
147
147
  }
148
148
  static {
@@ -1 +1 @@
1
- {"version":3,"file":"validated-form.js","sources":["../../src/components/validated-form.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { A } from '@ember/array';\nimport { hash } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport { next, schedule } from '@ember/runloop';\nimport EuiForm from '@ember-eui/core/components/eui-form';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport randomId from '../-private/random-id.ts';\nimport { ValidatedFormDefaultTheme } from './default-theme.ts';\nimport type { IValidatedFormTheme } from './default-theme';\nimport type FieldBase from './validated-form/field-base.gts';\nimport type { EuiFormSignature } from '@ember-eui/core/components/eui-form';\nexport interface ValidatedFormSignature {\n Element: EuiFormSignature['Element'];\n Args: {\n id?: string;\n register?: (child: ValidatedFormComponent) => void;\n unregister?: (child: ValidatedFormComponent) => void;\n addChild?: (child: FieldBase) => void;\n removeChild?: (child: FieldBase) => void;\n onInvalid?: () => void;\n onSubmit?: () => void;\n onReset?: (e: Event) => void;\n onValidityChange?: (isValid: boolean, isTouched: boolean, isInvalidAndTouched: boolean) => void;\n theme?: Partial<IValidatedFormTheme>;\n isDisabled?: boolean;\n fullWidth?: boolean;\n compressed?: boolean;\n tagName?: EuiFormSignature['Args']['tagName'];\n isInvalid?: EuiFormSignature['Args']['isInvalid'];\n invalidCallout?: EuiFormSignature['Args']['invalidCallout'];\n error?: EuiFormSignature['Args']['error'];\n errorTitle?: EuiFormSignature['Args']['errorTitle'];\n };\n Blocks: {\n default: [{\n onValidityChange: (isValid: boolean, isTouched: boolean, isInvalidAndTouched: boolean) => void;\n register: (child: FieldBase) => void;\n unregister: (child: FieldBase) => void;\n isValid: boolean;\n isInvalid: boolean;\n isTouched: boolean;\n isInvalidAndTouched: boolean;\n formId: string;\n FieldBase: IValidatedFormTheme['FieldBase'];\n FieldNumber: IValidatedFormTheme['FieldNumber'];\n FieldText: IValidatedFormTheme['FieldText'];\n FieldPassword: IValidatedFormTheme['FieldPassword'];\n FieldTextArea: IValidatedFormTheme['FieldTextArea'];\n FieldSelect: IValidatedFormTheme['FieldSelect'];\n FieldComboBox: IValidatedFormTheme['FieldComboBox'];\n FieldCheckboxGroup: IValidatedFormTheme['FieldCheckboxGroup'];\n FieldRadioGroup: IValidatedFormTheme['FieldRadioGroup'];\n FieldRangeSlider: IValidatedFormTheme['FieldRangeSlider'];\n FieldDualRangeSlider: IValidatedFormTheme['FieldDualRangeSlider'];\n FieldSwitch: IValidatedFormTheme['FieldSwitch'];\n FieldMarkdownEditor: IValidatedFormTheme['FieldMarkdownEditor'];\n }];\n };\n}\nexport default class ValidatedFormComponent extends Component<ValidatedFormSignature> {\n @tracked\n childComponents = A<FieldBase>([]);\n //cache to only notify if changed\n lastIsValid?: boolean;\n lastIsTouched?: boolean;\n @tracked\n isInvalid = false;\n @tracked\n isTouched = false;\n constructor(owner1: unknown, args1: ValidatedFormSignature['Args']){\n super(owner1, args1);\n this.args.register?.(this);\n }\n willDestroy() {\n super.willDestroy();\n this.args.unregister?.(this);\n }\n get isValid() {\n return !this.isInvalid;\n }\n get isInvalidAndTouched() {\n return this.isInvalid && this.isTouched;\n }\n addChild(child1: FieldBase) {\n this.childComponents.pushObject(child1);\n }\n removeChild(child1: FieldBase) {\n this.childComponents.removeObject(child1);\n }\n @action\n async handleSubmit(e1: Event) {\n e1.preventDefault();\n if (this.isInvalid) {\n this.childComponents.setEach('isTouched', true);\n this.args.onInvalid?.();\n } else {\n this.childComponents.setEach('isTouched', false);\n try {\n await this.args.onSubmit?.();\n } catch (e1) {\n this.childComponents.setEach('isTouched', true);\n }\n }\n }\n @action\n handleReset(e1: Event) {\n e1.preventDefault();\n this.args.onReset?.(e1);\n }\n @action\n register(child1: FieldBase) {\n if (!this.isDestroyed) {\n schedule('afterRender', this, this.addChild, child1);\n }\n }\n @action\n unregister(child1: FieldBase) {\n if (!this.isDestroyed) {\n schedule('afterRender', this, this.removeChild, child1);\n // When adding a child the validation gets calculated on a `did-insert` modifier\n // for removal there's no modifier so it gets called here\n schedule('afterRender', this, this.triggerValidityChange);\n }\n }\n @action\n updateValidity() {\n this.triggerValidityChange();\n }\n getIsValid() {\n return this.childComponents.isEvery('isValid');\n }\n getIsTouched() {\n return this.childComponents.isAny('isTouched');\n }\n triggerValidityChange() {\n const lastIsValid1 = this.isValid;\n const lastIsTouched1 = this.isTouched;\n if (lastIsValid1 !== this.getIsValid() || lastIsTouched1 !== this.getIsTouched()) {\n this.setNewValidity();\n }\n }\n @action\n setNewValidity() {\n next(()=>{\n this.isInvalid = !this.getIsValid();\n this.isTouched = this.getIsTouched();\n if (!this.isDestroying) {\n this.args.onValidityChange?.(this.isValid, this.isTouched, this.isInvalidAndTouched);\n }\n });\n }\n @action\n onChildValidityChange() {\n if (!this.isDestroying) {\n this.updateValidity();\n }\n }\n get theme() {\n const theme1: Partial<IValidatedFormTheme> = this.args.theme || {};\n return {\n ...ValidatedFormDefaultTheme,\n ...theme1\n };\n }\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |formId|}}\n <EuiForm\n @tagName={{argOrDefault @tagName \"form\"}}\n id={{formId}}\n @isInvalid={{@isInvalid}}\n @invalidCallout={{@invalidCallout}}\n @error={{@error}}\n @errorTitle={{@errorTitle}}\n {{on \"submit\" this.handleSubmit}}\n {{on \"reset\" this.handleReset}}\n {{didInsert this.setNewValidity}}\n ...attributes\n >\n {{yield\n (hash\n onValidityChange=this.onChildValidityChange\n register=this.register\n unregister=this.unregister\n isValid=this.isValid\n isInvalid=this.isInvalid\n isTouched=this.isTouched\n isInvalidAndTouched=this.isInvalidAndTouched\n formId=formId\n FieldBase=(component\n this.theme.FieldBase\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n formId=formId\n disabled=@isDisabled\n )\n FieldNumber=(component\n this.theme.FieldNumber\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldText=(component\n this.theme.FieldText\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldPassword=(component\n this.theme.FieldPassword\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldTextArea=(component\n this.theme.FieldTextArea\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldSelect=(component\n this.theme.FieldSelect\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldComboBox=(component\n this.theme.FieldComboBox\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n isDisabled=@isDisabled\n )\n FieldCheckboxGroup=(component\n this.theme.FieldCheckboxGroup\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldRadioGroup=(component\n this.theme.FieldRadioGroup\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldRangeSlider=(component\n this.theme.FieldRangeSlider\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldDualRangeSlider=(component\n this.theme.FieldDualRangeSlider\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldSwitch=(component\n this.theme.FieldSwitch\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldMarkdownEditor=(component\n this.theme.FieldMarkdownEditor\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n )\n }}\n </EuiForm>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9iZXRvY2FudHU5My9wcnlzbWV4L2VtYmVyLWV1aS9wYWNrYWdlcy92YWxpZGF0ZWQtZm9ybS9zcm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yPXRoaXMudW5yZWdpc3RlclxuICAgICAgICAgICAgICBvblZhbGlkaXR5Q2hhbmdlPXRoaXMub25DaGlsZFZhbGlkaXR5Q2hhbmdlXG4gICAgICAgICAgICAgIGZ1bGxXaWR0aD1AZnVsbFdpZHRoXG4gICAgICAgICAgICAgIGNvbXByZXNzZWQ9QGNvbXByZXNzZWRcbiAgICAgICAgICAgICAgZm9ybUlkPWZvcm1JZFxuICAgICAgICAgICAgICBkaXNhYmxlZD1AaXNEaXNhYmxlZFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgRmllbGRUZXh0PShjb21wb25lbnRcbiAgICAgICAgICAgICAgdGhpcy50aGVtZS5GaWVsZFRleHRcbiAgICAgICAgICAgICAgcmVnaXN0ZXI9dGhpcy5yZWdpc3RlclxuICAgICAgICAgICAgICB1bnJlZ2lzdGVyPXRoaXMudW5yZWdpc3RlclxuICAgICAgICAgICAgICBvblZhbGlkaXR5Q2hhbmdlPXRoaXMub25DaGlsZFZhbGlkaXR5Q2hhbmdlXG4gICAgICAgICAgICAgIGZ1bGxXaWR0aD1AZnVsbFdpZHRoXG4gICAgICAgICAgICAgIGNvbXByZXNzZWQ9QGNvbXByZXNzZWRcbiAgICAgICAgICAgICAgZm9ybUlkPWZvcm1JZFxuICAgICAgICAgICAgICBkaXNhYmxlZD1AaXNEaXNhYmxlZFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgRmllbGRQYXNzd29yZD0oY29tcG9uZW50XG4gICAgICAgICAgICAgIHRoaXMudGhlbWUuRmllbGRQYXNzd29yZFxuICAgICAgICAgICAgICByZWdpc3Rlcj10aGlzLnJlZ2lzdGVyXG4gICAgICAgICAgICAgIHVucmVnaXN0ZXI9dGhpcy51bnJlZ2lzdGVyXG4gICAgICAgICAgICAgIG9uVmFsaWRpdHlDaGFuZ2U9dGhpcy5vbkNoaWxkVmFsaWRpdHlDaGFuZ2VcbiAgICAgICAgICAgICAgZnVsbFdpZHRoPUBmdWxsV2lkdGhcbiAgICAgICAgICAgICAgY29tcHJlc3NlZD1AY29tcHJlc3NlZFxuICAgICAgICAgICAgICBmb3JtSWQ9Zm9ybUlkXG4gICAgICAgICAgICAgIGRpc2FibGVkPUBpc0Rpc2FibGVkXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBGaWVsZFRleHRBcmVhPShjb21wb25lbnRcbiAgICAgICAgICAgICAgdGhpcy50aGVtZS5GaWVsZFRleHRBcmVhXG4gICAgICAgICAgICAgIHJlZ2lzdGVyPXRoaXMucmVnaXN0ZXJcbiAgICAgICAgICAgICAgdW5yZWdpc3Rlcj10aGlzLnVucmVnaXN0ZXJcbiAgICAgICAgICAgICAgb25WYWxpZGl0eUNoYW5nZT10aGlzLm9uQ2hpbGRWYWxpZGl0eUNoYW5nZVxuICAgICAgICAgICAgICBmdWxsV2lkdGg9QGZ1bGxXaWR0aFxuICAgICAgICAgICAgICBjb21wcmVzc2VkPUBjb21wcmVzc2VkXG4gICAgICAgICAgICAgIGZvcm1JZD1mb3JtSWRcbiAgICAgICAgICAgICAgZGlzYWJsZWQ9QGlzRGlzYWJsZWRcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIEZpZWxkU2VsZWN0PShjb21wb25lbnRcbiAgICAgICAgICAgICAgdGhpcy50aGVtZS5GaWVsZFNlbGVjdFxuICAgICAgICAgICAgICByZWdpc3Rlcj10aGlzLnJlZ2lzdGVyXG4gICAgICAgICAgICAgIHVucmVnaXN0ZXI9dGhpcy51bnJlZ2lzdGVyXG4gICAgICAgICAgICAgIG9uVmFsaWRpdHlDaGFuZ2U9dGhpcy5vbkNoaWxkVmFsaWRpdHlDaGFuZ2VcbiAgICAgICAgICAgICAgZnVsbFdpZHRoPUBmdWxsV2lkdGhcbiAgICAgICAgICAgICAgY29tcHJlc3NlZD1AY29tcHJlc3NlZFxuICAgICAgICAgICAgICBmb3JtSWQ9Zm9ybUlkXG4gICAgICAgICAgICAgIGRpc2FibGVkPUBpc0Rpc2FibGVkXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBGaWVsZENvbWJvQm94PShjb21wb25lbnRcbiAgICAgICAgICAgICAgdGhpcy50aGVtZS5GaWVsZENvbWJvQm94XG4gICAgICAgICAgICAgIHJlZ2lzdGVyPXRoaXMucmVnaXN0ZXJcbiAgICAgICAgICAgICAgdW5yZWdpc3Rlcj10aGlzLnVucmVnaXN0ZXJcbiAgICAgICAgICAgICAgb25WYWxpZGl0eUNoYW5nZT10aGlzLm9uQ2hpbGRWYWxpZGl0eUNoYW5nZVxuICAgICAgICAgICAgICBmdWxsV2lkdGg9QGZ1bGxXaWR0aFxuICAgICAgICAgICAgICBjb21wcmVzc2VkPUBjb21wcmVzc2VkXG4gICAgICAgICAgICAgIGZvcm1JZD1mb3JtSWRcbiAgICAgICAgICAgICAgaXNEaXNhYmxlZD1AaXNEaXNhYmxlZFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgRmllbGRDaGVja2JveEdyb3VwPShjb21wb25lbnRcbiAgICAgICAgICAgICAgdGhpcy50aGVtZS5GaWVsZENoZWNrYm94R3JvdXBcbiAgICAgICAgICAgICAgcmVnaXN0ZXI9dGhpcy5yZWdpc3RlclxuICAgICAgICAgICAgICB1bnJlZ2lzdGVyPXRoaXMudW5yZWdpc3RlclxuICAgICAgICAgICAgICBvblZhbGlkaXR5Q2hhbmdlPXRoaXMub25DaGlsZFZhbGlkaXR5Q2hhbmdlXG4gICAgICAgICAgICAgIGZ1bGxXaWR0aD1AZnVsbFdpZHRoXG4gICAgICAgICAgICAgIGNvbXByZXNzZWQ9QGNvbXByZXNzZWRcbiAgICAgICAgICAgICAgZm9ybUlkPWZvcm1JZFxuICAgICAgICAgICAgICBkaXNhYmxlZD1AaXNEaXNhYmxlZFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgRmllbGRSYWRpb0dyb3VwPShjb21wb25lbnRcbiAgICAgICAgICAgICAgdGhpcy50aGVtZS5GaWVsZFJhZGlvR3JvdXBcbiAgICAgICAgICAgICAgcmVnaXN0ZXI9dGhpcy5yZWdpc3RlclxuICAgICAgICAgICAgICB1bnJlZ2lzdGVyPXRoaXMudW5yZWdpc3RlclxuICAgICAgICAgICAgICBvblZhbGlkaXR5Q2hhbmdlPXRoaXMub25DaGlsZFZhbGlkaXR5Q2hhbmdlXG4gICAgICAgICAgICAgIGZ1bGxXaWR0aD1AZnVsbFdpZHRoXG4gICAgICAgICAgICAgIGNvbXByZXNzZWQ9QGNvbXByZXNzZWRcbiAgICAgICAgICAgICAgZm9ybUlkPWZvcm1JZFxuICAgICAgICAgICAgICBkaXNhYmxlZD1AaXNEaXNhYmxlZFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgRmllbGRSYW5nZVNsaWRlcj0oY29tcG9uZW50XG4gICAgICAgICAgICAgIHRoaXMudGhlbWUuRmllbGRSYW5nZVNsaWRlclxuICAgICAgICAgICAgICByZWdpc3Rlcj10aGlzLnJlZ2lzdGVyXG4gICAgICAgICAgICAgIHVucmVnaXN0ZXI9dGhpcy51bnJlZ2lzdGVyXG4gICAgICAgICAgICAgIG9uVmFsaWRpdHlDaGFuZ2U9dGhpcy5vbkNoaWxkVmFsaWRpdHlDaGFuZ2VcbiAgICAgICAgICAgICAgZnVsbFdpZHRoPUBmdWxsV2lkdGhcbiAgICAgICAgICAgICAgY29tcHJlc3NlZD1AY29tcHJlc3NlZFxuICAgICAgICAgICAgICBmb3JtSWQ9Zm9ybUlkXG4gICAgICAgICAgICAgIGRpc2FibGVkPUBpc0Rpc2FibGVkXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBGaWVsZER1YWxSYW5nZVNsaWRlcj0oY29tcG9uZW50XG4gICAgICAgICAgICAgIHRoaXMudGhlbWUuRmllbGREdWFsUmFuZ2VTbGlkZXJcbiAgICAgICAgICAgICAgcmVnaXN0ZXI9dGhpcy5yZWdpc3RlclxuICAgICAgICAgICAgICB1bnJlZ2lzdGVyPXRoaXMudW5yZWdpc3RlclxuICAgICAgICAgICAgICBvblZhbGlkaXR5Q2hhbmdl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s7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0VBNEpWLENBQUEsRUFBQTtZQUFBLFdBQUEsSUFBVztZQUFYO2dCQUFBLE9BQUEsS0FBQSxTQUFBLENBQUEsRUFBVztZQUFEO1FBQUE7SUFBQSxDQTVKQTtBQTZKWiJ9"],"names":["ValidatedFormComponent","Component","g","this","prototype","tracked","A","i","void 0","lastIsValid","lastIsTouched","constructor","owner1","args1","args","register","willDestroy","unregister","isValid","isInvalid","isInvalidAndTouched","isTouched","addChild","child1","childComponents","pushObject","removeChild","removeObject","handleSubmit","e1","preventDefault","setEach","onInvalid","onSubmit","n","action","handleReset","onReset","isDestroyed","schedule","triggerValidityChange","updateValidity","getIsValid","isEvery","getIsTouched","isAny","lastIsValid1","lastIsTouched1","setNewValidity","next","isDestroying","onValidityChange","onChildValidityChange","theme","theme1","ValidatedFormDefaultTheme","setComponentTemplate","precompileTemplate","strictMode","scope","argOrDefault","randomId","EuiForm","on","didInsert","hash"],"mappings":";;;;;;;;;;;;;;;;AA6Ee,MAAMA,sBAAA,SAA+BC,SAAA,CAAU;AAAA,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,sBAC3DC,OAAA,CAAA,EAAA,YAAA;MAAA,OAA0BC,CAAA,CAAa,EAAE,CAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,gBAAA,IAAAC,CAAA,CAAAJ,IAAA,sBAAAK,KAAA,CAAA,EAAA;AAC1C;EACAC,WAAA,CAAA;EACAC,aAAA,CAAA;AAAwB,EAAA;AAAAR,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,gBAEvBC,OAAA,CAAA,EAAA,YAAA;MAAA,OAAoB,KAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,UAAA,IAAAE,CAAA,CAAAJ,IAAA,gBAAAK,KAAA,CAAA,EAAA;AAAA,EAAA;A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AI,CAACD,mBAAmB,CAAA,CAAA;AAE5B,OAAA;AACF,KAAA,CAAA,CAAA;AACF,GAAA;AAAA,EAAA;AAAAc,IAAAA,CAAA,CAAA/B,IAAA,CAAAC,SAAA,qBAdC+B,MAAA,CAAA,CAAA,CAAA;AAAA,GAAA;AAiBDiB,EAAAA,qBAAAA,GAAwB;AACtB,IAAA,IAAI,CAAC,IAAI,CAACF,YAAY,EAAE;AACtB,MAAA,IAAI,CAACT,cAAc,EAAA,CAAA;AACrB,KAAA;AACF,GAAA;AAAA,EAAA;AAAAP,IAAAA,CAAA,CAAA/B,IAAA,CAAAC,SAAA,4BALC+B,MAAA,CAAA,CAAA,CAAA;AAAA,GAAA;AAOD,EAAA,IAAIkB,QAAQ;IACV,MAAMC,MAAe,GAAuB,IAAI,CAACxC,IAAI,CAACuC,KAAK,IAAI,EAAC,CAAA;IAEhE,OAAO;AAAE,MAAA,GAAGE,yBAAyB;MAAE,GAAGD,MAAAA;AAAM,KAAA,CAAA;AAClD,GAAA;AAEA,EAAA;IAAAE,oBAAA,CAAAC,kBAAA,CA4JA,68GAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,OAAA;QAAAC,EAAA;QAAAC,SAAA;AAAAC,QAAAA,IAAAA;AAAA,OAAA,CAAA;AAAU,KAAA,CAAA,EAAV,IAAW,CAAA,CAAA;AAAD,GAAA;AACZ;;;;"}
1
+ {"version":3,"file":"validated-form.js","sources":["../../src/components/validated-form.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { A } from '@ember/array';\nimport { hash } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport { next, schedule } from '@ember/runloop';\nimport EuiForm from '@ember-eui/core/components/eui-form';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport type Owner from '@ember/owner';\n\nimport randomId from '../-private/random-id.ts';\nimport { ValidatedFormDefaultTheme } from './default-theme.ts';\n\nimport type { IValidatedFormTheme } from './default-theme';\nimport type FieldBase from './validated-form/field-base.gts';\nimport type { EuiFormSignature } from '@ember-eui/core/components/eui-form';\n\nexport interface ValidatedFormSignature {\n Element: EuiFormSignature['Element'];\n Args: {\n id?: string;\n register?: (child: ValidatedFormComponent) => void;\n unregister?: (child: ValidatedFormComponent) => void;\n addChild?: (child: FieldBase) => void;\n removeChild?: (child: FieldBase) => void;\n onInvalid?: () => void;\n onSubmit?: () => void;\n onReset?: (e: Event) => void;\n onValidityChange?: (\n isValid: boolean,\n isTouched: boolean,\n isInvalidAndTouched: boolean\n ) => void;\n theme?: Partial<IValidatedFormTheme>;\n isDisabled?: boolean;\n fullWidth?: boolean;\n compressed?: boolean;\n tagName?: EuiFormSignature['Args']['tagName'];\n isInvalid?: EuiFormSignature['Args']['isInvalid'];\n invalidCallout?: EuiFormSignature['Args']['invalidCallout'];\n error?: EuiFormSignature['Args']['error'];\n errorTitle?: EuiFormSignature['Args']['errorTitle'];\n };\n Blocks: {\n default: [\n {\n onValidityChange: (\n isValid: boolean,\n isTouched: boolean,\n isInvalidAndTouched: boolean\n ) => void;\n register: (child: FieldBase) => void;\n unregister: (child: FieldBase) => void;\n isValid: boolean;\n isInvalid: boolean;\n isTouched: boolean;\n isInvalidAndTouched: boolean;\n formId: string;\n FieldBase: IValidatedFormTheme['FieldBase'];\n FieldNumber: IValidatedFormTheme['FieldNumber'];\n FieldText: IValidatedFormTheme['FieldText'];\n FieldPassword: IValidatedFormTheme['FieldPassword'];\n FieldTextArea: IValidatedFormTheme['FieldTextArea'];\n FieldSelect: IValidatedFormTheme['FieldSelect'];\n FieldComboBox: IValidatedFormTheme['FieldComboBox'];\n FieldCheckboxGroup: IValidatedFormTheme['FieldCheckboxGroup'];\n FieldRadioGroup: IValidatedFormTheme['FieldRadioGroup'];\n FieldRangeSlider: IValidatedFormTheme['FieldRangeSlider'];\n FieldDualRangeSlider: IValidatedFormTheme['FieldDualRangeSlider'];\n FieldSwitch: IValidatedFormTheme['FieldSwitch'];\n FieldMarkdownEditor: IValidatedFormTheme['FieldMarkdownEditor'];\n }\n ];\n };\n}\n\nexport default class ValidatedFormComponent extends Component<ValidatedFormSignature> {\n @tracked childComponents: ReturnType<typeof A<FieldBase>> = A<FieldBase>([]);\n //cache to only notify if changed\n lastIsValid?: boolean;\n lastIsTouched?: boolean;\n\n @tracked isInvalid = false;\n @tracked isTouched = false;\n\n constructor(owner: Owner, args: ValidatedFormSignature['Args']) {\n super(owner, args);\n this.args.register?.(this);\n }\n\n willDestroy() {\n super.willDestroy();\n this.args.unregister?.(this);\n }\n\n get isValid() {\n return !this.isInvalid;\n }\n\n get isInvalidAndTouched() {\n return this.isInvalid && this.isTouched;\n }\n\n addChild(child: FieldBase) {\n this.childComponents.pushObject(child);\n }\n\n removeChild(child: FieldBase) {\n this.childComponents.removeObject(child);\n }\n\n @action\n async handleSubmit(e: Event) {\n e.preventDefault();\n\n if (this.isInvalid) {\n this.childComponents.setEach('isTouched', true);\n this.args.onInvalid?.();\n } else {\n this.childComponents.setEach('isTouched', false);\n\n try {\n await this.args.onSubmit?.();\n } catch (e) {\n this.childComponents.setEach('isTouched', true);\n }\n }\n }\n\n @action\n handleReset(e: Event) {\n e.preventDefault();\n this.args.onReset?.(e);\n }\n\n @action\n register(child: FieldBase) {\n if (!this.isDestroyed) {\n schedule('afterRender', this, this.addChild, child);\n }\n }\n\n @action\n unregister(child: FieldBase) {\n if (!this.isDestroyed) {\n schedule('afterRender', this, this.removeChild, child);\n // When adding a child the validation gets calculated on a `did-insert` modifier\n // for removal there's no modifier so it gets called here\n schedule('afterRender', this, this.triggerValidityChange);\n }\n }\n\n @action\n updateValidity() {\n this.triggerValidityChange();\n }\n\n getIsValid() {\n return this.childComponents.isEvery('isValid');\n }\n\n getIsTouched() {\n return this.childComponents.isAny('isTouched');\n }\n\n triggerValidityChange() {\n const lastIsValid = this.isValid;\n const lastIsTouched = this.isTouched;\n\n if (\n lastIsValid !== this.getIsValid() ||\n lastIsTouched !== this.getIsTouched()\n ) {\n this.setNewValidity();\n }\n }\n\n @action\n setNewValidity() {\n next(() => {\n this.isInvalid = !this.getIsValid();\n this.isTouched = this.getIsTouched();\n\n if (!this.isDestroying) {\n this.args.onValidityChange?.(\n this.isValid,\n this.isTouched,\n this.isInvalidAndTouched\n );\n }\n });\n }\n\n @action\n onChildValidityChange() {\n if (!this.isDestroying) {\n this.updateValidity();\n }\n }\n\n get theme() {\n const theme: Partial<IValidatedFormTheme> = this.args.theme || {};\n\n return { ...ValidatedFormDefaultTheme, ...theme };\n }\n\n <template>\n {{#let (argOrDefault @id (randomId)) as |formId|}}\n <EuiForm\n @tagName={{argOrDefault @tagName \"form\"}}\n id={{formId}}\n @isInvalid={{@isInvalid}}\n @invalidCallout={{@invalidCallout}}\n @error={{@error}}\n @errorTitle={{@errorTitle}}\n {{on \"submit\" this.handleSubmit}}\n {{on \"reset\" this.handleReset}}\n {{didInsert this.setNewValidity}}\n ...attributes\n >\n {{yield\n (hash\n onValidityChange=this.onChildValidityChange\n register=this.register\n unregister=this.unregister\n isValid=this.isValid\n isInvalid=this.isInvalid\n isTouched=this.isTouched\n isInvalidAndTouched=this.isInvalidAndTouched\n formId=formId\n FieldBase=(component\n this.theme.FieldBase\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n formId=formId\n disabled=@isDisabled\n )\n FieldNumber=(component\n this.theme.FieldNumber\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldText=(component\n this.theme.FieldText\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldPassword=(component\n this.theme.FieldPassword\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldTextArea=(component\n this.theme.FieldTextArea\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldSelect=(component\n this.theme.FieldSelect\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldComboBox=(component\n this.theme.FieldComboBox\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n isDisabled=@isDisabled\n )\n FieldCheckboxGroup=(component\n this.theme.FieldCheckboxGroup\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldRadioGroup=(component\n this.theme.FieldRadioGroup\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldRangeSlider=(component\n this.theme.FieldRangeSlider\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldDualRangeSlider=(component\n this.theme.FieldDualRangeSlider\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldSwitch=(component\n this.theme.FieldSwitch\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n FieldMarkdownEditor=(component\n this.theme.FieldMarkdownEditor\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n compressed=@compressed\n formId=formId\n disabled=@isDisabled\n )\n )\n }}\n </EuiForm>\n {{/let}}\n </template>\n}\n"],"names":["ValidatedFormComponent","Component","g","prototype","tracked","A","i","void 0","lastIsValid","lastIsTouched","constructor","owner","args","register","willDestroy","unregister","isValid","isInvalid","isInvalidAndTouched","isTouched","addChild","child","childComponents","pushObject","removeChild","removeObject","handleSubmit","e","preventDefault","setEach","onInvalid","onSubmit","n","action","handleReset","onReset","isDestroyed","schedule","triggerValidityChange","updateValidity","getIsValid","isEvery","getIsTouched","isAny","setNewValidity","next","isDestroying","onValidityChange","onChildValidityChange","theme","ValidatedFormDefaultTheme","setComponentTemplate","precompileTemplate","strictMode","scope","argOrDefault","randomId","EuiForm","on","didInsert","hash"],"mappings":";;;;;;;;;;;;;;;;AA8Ee,MAAMA,+BAA+BC,SAAU,CAAA;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,iBAAA,EAAA,CAC3DC,OAAA,CAAA,EAAA,YAAA;MAAA,OAA2DC,CAAE,CAAW,EAAE,CAAE;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,gBAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,iBAAA,CAAA,EAAAC,SAAA;AAC7E;EACAC,WAAA;EACAC,aAAA;AAAwB,EAAA;IAAAP,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,WAAA,EAAA,CAEvBC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAAoB,KAAM;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,UAAA,IAAAE,CAAA,CAAA,IAAA,EAAA,WAAA,CAAA,EAAAC,SAAA;AAAA,EAAA;IAAAL,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,WAAA,EAAA,CAC1BC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAAoB,KAAM;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,UAAA,IAAAE,CAAA,CA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AM;AAClD;AAEA,EAAA;IAAAE,oBAAA,CAAAC,kBAAA,CA4JA,68GAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,OAAA;QAAAC,EAAA;QAAAC,SAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -0,0 +1,207 @@
1
+ import Component from '@glimmer/component';
2
+ import { tracked } from '@glimmer/tracking';
3
+ import { action } from '@ember/object';
4
+ import { later } from '@ember/runloop';
5
+ import { buildValidationMessages, notifyValidityChange } from './utils/build-validation-messages.js';
6
+ import { precompileTemplate } from '@ember/template-compilation';
7
+ import { setComponentTemplate } from '@ember/component';
8
+
9
+ const deferred = /* @__PURE__ */new WeakMap();
10
+ function deferDecorator(proto, prop, desc) {
11
+ let map = deferred.get(proto);
12
+ if (!map) {
13
+ map = /* @__PURE__ */new Map();
14
+ deferred.set(proto, map);
15
+ }
16
+ map.set(prop, desc);
17
+ }
18
+ function findDeferredDecorator(target, prop) {
19
+ var _a;
20
+ let cursor = target.prototype;
21
+ while (cursor) {
22
+ let desc = (_a = deferred.get(cursor)) == null ? undefined : _a.get(prop);
23
+ if (desc) {
24
+ return desc;
25
+ }
26
+ cursor = cursor.prototype;
27
+ }
28
+ }
29
+ function decorateFieldV2(prototype, prop, decorators, initializer) {
30
+ let desc = {
31
+ configurable: true,
32
+ enumerable: true,
33
+ writable: true,
34
+ initializer: null
35
+ };
36
+ if (initializer) {
37
+ desc.initializer = initializer;
38
+ }
39
+ for (let decorator of decorators) {
40
+ desc = decorator(prototype, prop, desc) || desc;
41
+ }
42
+ if (desc.initializer === undefined) {
43
+ Object.defineProperty(prototype, prop, desc);
44
+ } else {
45
+ deferDecorator(prototype, prop, desc);
46
+ }
47
+ }
48
+ function decorateMethodV2(prototype, prop, decorators) {
49
+ const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);
50
+ let desc = {
51
+ ...origDesc
52
+ };
53
+ for (let decorator of decorators) {
54
+ desc = decorator(prototype, prop, desc) || desc;
55
+ }
56
+ if (desc.initializer !== undefined) {
57
+ desc.value = desc.initializer ? desc.initializer.call(prototype) : undefined;
58
+ desc.initializer = undefined;
59
+ }
60
+ Object.defineProperty(prototype, prop, desc);
61
+ }
62
+ function initializeDeferredDecorator(target, prop) {
63
+ let desc = findDeferredDecorator(target.constructor, prop);
64
+ if (desc) {
65
+ Object.defineProperty(target, prop, {
66
+ enumerable: desc.enumerable,
67
+ configurable: desc.configurable,
68
+ writable: desc.writable,
69
+ value: desc.initializer ? desc.initializer.call(target) : undefined
70
+ });
71
+ }
72
+ }
73
+
74
+ class ValidatedFormFieldBase extends Component {
75
+ validationProperty = 'args.value';
76
+ //cache for comparing
77
+ lastIsValid;
78
+ lastIsTouched;
79
+ static {
80
+ decorateFieldV2(this.prototype, "_validationErrorMessages", [tracked], function () {
81
+ return null;
82
+ });
83
+ }
84
+ #_validationErrorMessages = (initializeDeferredDecorator(this, "_validationErrorMessages"), undefined);
85
+ static {
86
+ decorateFieldV2(this.prototype, "isTouched", [tracked], function () {
87
+ return false;
88
+ });
89
+ }
90
+ #isTouched = (initializeDeferredDecorator(this, "isTouched"), undefined);
91
+ get validations() {
92
+ return this.args.validations || {};
93
+ }
94
+ get hasErrorMessages() {
95
+ return this._validationErrorMessages?.length || this.error?.length > 0;
96
+ }
97
+ get isValid() {
98
+ return !this.isInvalid;
99
+ }
100
+ get isInvalid() {
101
+ return this.hasErrorMessages;
102
+ }
103
+ get isInvalidAndTouched() {
104
+ return !!(this.isInvalid && this.isTouched);
105
+ }
106
+ get formHasBeenValidated() {
107
+ return this.isTouched;
108
+ }
109
+ set formHasBeenValidated(value) {
110
+ this.isTouched = value;
111
+ }
112
+ get customValidations() {
113
+ return this.args.customValidations || [];
114
+ }
115
+ get rowClasses() {
116
+ return this.args.rowClasses || '';
117
+ }
118
+ get rowExtra() {
119
+ return this.args.rowExtra || {};
120
+ }
121
+ get label() {
122
+ return this.args.label || '';
123
+ }
124
+ get error() {
125
+ return this.args.error || [];
126
+ }
127
+ get options() {
128
+ return this.args.options || [];
129
+ }
130
+ get validationErrorMessages() {
131
+ let error = [];
132
+ if (this.error.length > 0) {
133
+ error.push(...this.error);
134
+ }
135
+ if (this._validationErrorMessages && this._validationErrorMessages.length > 0) {
136
+ error.push(...this._validationErrorMessages);
137
+ }
138
+ if (error.length === 0) {
139
+ return null;
140
+ }
141
+ return error;
142
+ }
143
+ constructor(owner, args) {
144
+ super(owner, args);
145
+ this.args.register?.(this);
146
+ }
147
+ //Should be executed by the child on start
148
+ setValidationMessages() {
149
+ this._validationErrorMessages = buildValidationMessages.call(this, this.validationProperty);
150
+ }
151
+ //Should be executed by the child on value update
152
+ static {
153
+ decorateMethodV2(this.prototype, "setValidationMessages", [action]);
154
+ }
155
+ didUpdateValue() {
156
+ later(() => {
157
+ if (!this.isDestroyed && !this.isDestroying) {
158
+ this.setValidationMessages();
159
+ this.notifyValidityChange();
160
+ }
161
+ }, 1);
162
+ }
163
+ static {
164
+ decorateMethodV2(this.prototype, "didUpdateValue", [action]);
165
+ }
166
+ notifyValidityChange() {
167
+ notifyValidityChange(this, this.args.onValidityChange);
168
+ }
169
+ static {
170
+ decorateMethodV2(this.prototype, "notifyValidityChange", [action]);
171
+ }
172
+ setIsTouched(val) {
173
+ this.isTouched = val;
174
+ this.notifyValidityChange();
175
+ }
176
+ /**
177
+ * This is just a default handleChange, you should override this method
178
+ * if you need to or use whatever mechanism to bubble the changed
179
+ * value outside and then notifyValidityChanges
180
+ *
181
+ * @override
182
+ * @param {*} e
183
+ */
184
+ static {
185
+ decorateMethodV2(this.prototype, "setIsTouched", [action]);
186
+ }
187
+ handleChange(e) {
188
+ const value = e.target.value;
189
+ this.args.onChange(value);
190
+ this.notifyValidityChange();
191
+ }
192
+ static {
193
+ decorateMethodV2(this.prototype, "handleChange", [action]);
194
+ }
195
+ willDestroy() {
196
+ super.willDestroy();
197
+ this.args.unregister?.(this);
198
+ }
199
+ static {
200
+ setComponentTemplate(precompileTemplate("\n {{!--@glint-expect-error--}}\n {{yield this}}\n ", {
201
+ strictMode: true
202
+ }), this);
203
+ }
204
+ }
205
+
206
+ export { ValidatedFormFieldBase as V, decorateMethodV2 as a, decorateFieldV2 as d, initializeDeferredDecorator as i };
207
+ //# sourceMappingURL=field-base-CPyNVTul.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-base-CPyNVTul.js","sources":["../../../node_modules/.pnpm/decorator-transforms@2.3.0_@babel+core@7.26.7/node_modules/decorator-transforms/dist/runtime-BPCpkOf1.js","../src/components/validated-form/field-base.gts"],"sourcesContent":["const deferred = /* @__PURE__ */ new WeakMap();\nfunction deferDecorator(proto, prop, desc) {\n let map = deferred.get(proto);\n if (!map) {\n map = /* @__PURE__ */ new Map();\n deferred.set(proto, map);\n }\n map.set(prop, desc);\n}\nfunction findDeferredDecorator(target, prop) {\n var _a;\n let cursor = target.prototype;\n while (cursor) {\n let desc = (_a = deferred.get(cursor)) == null ? void 0 : _a.get(prop);\n if (desc) {\n return desc;\n }\n cursor = cursor.prototype;\n }\n}\nfunction decorateFieldV1(target, prop, decorators, initializer) {\n return decorateFieldV2(target.prototype, prop, decorators, initializer);\n}\nfunction decorateFieldV2(prototype, prop, decorators, initializer) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n };\n if (initializer) {\n desc.initializer = initializer;\n }\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer === void 0) {\n Object.defineProperty(prototype, prop, desc);\n } else {\n deferDecorator(prototype, prop, desc);\n }\n}\nfunction decorateMethodV1({ prototype }, prop, decorators) {\n return decorateMethodV2(prototype, prop, decorators);\n}\nfunction decorateMethodV2(prototype, prop, decorators) {\n const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);\n let desc = { ...origDesc };\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;\n desc.initializer = void 0;\n }\n Object.defineProperty(prototype, prop, desc);\n}\nfunction initializeDeferredDecorator(target, prop) {\n let desc = findDeferredDecorator(target.constructor, prop);\n if (desc) {\n Object.defineProperty(target, prop, {\n enumerable: desc.enumerable,\n configurable: desc.configurable,\n writable: desc.writable,\n value: desc.initializer ? desc.initializer.call(target) : void 0\n });\n }\n}\nfunction decorateClass(target, decorators) {\n return decorators.reduce(\n (accum, decorator) => decorator(accum) || accum,\n target\n );\n}\nfunction decoratePOJO(pojo, decorated) {\n for (let [type, prop, decorators] of decorated) {\n if (type === \"field\") {\n decoratePojoField(pojo, prop, decorators);\n } else {\n decorateMethodV2(pojo, prop, decorators);\n }\n }\n return pojo;\n}\nfunction decoratePojoField(pojo, prop, decorators) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: () => {\n var _a;\n return (_a = Object.getOwnPropertyDescriptor(pojo, prop)) == null ? void 0 : _a.value;\n }\n };\n for (let decorator of decorators) {\n desc = decorator(pojo, prop, desc) || desc;\n }\n if (desc.initializer) {\n desc.value = desc.initializer.call(pojo);\n delete desc.initializer;\n }\n Object.defineProperty(pojo, prop, desc);\n}\nconst runtime = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n c: decorateClass,\n f: decorateFieldV1,\n g: decorateFieldV2,\n i: initializeDeferredDecorator,\n m: decorateMethodV1,\n n: decorateMethodV2,\n p: decoratePOJO\n}, Symbol.toStringTag, { value: \"Module\" }));\nexport {\n decorateFieldV2 as a,\n decorateMethodV1 as b,\n decorateMethodV2 as c,\n decorateFieldV1 as d,\n decorateClass as e,\n decoratePOJO as f,\n initializeDeferredDecorator as i,\n runtime as r\n};\n//# sourceMappingURL=runtime-BPCpkOf1.js.map\n","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { later } from '@ember/runloop';\n\nimport {\n buildValidationMessages,\n notifyValidityChange\n} from '../../utils/build-validation-messages.js';\n\nimport type { ComponentLike } from '@glint/template';\n\nexport interface FieldBaseSignature<T = ComponentLike> {\n Args: {\n id?: string;\n value: any;\n label?: string;\n error?: string[];\n options?: any[];\n validations?: any;\n customValidations?: {\n validation(value: any, options?: Record<string, unknown>): boolean;\n }[];\n rowClasses?: string;\n rowExtra?: Record<string, unknown>;\n onChange: (value: any) => void;\n onValidityChange: (isValid: boolean) => void;\n register: (field: T) => void;\n unregister: (field: T) => void;\n };\n}\n\nexport default class ValidatedFormFieldBase<\n T extends FieldBaseSignature = FieldBaseSignature\n> extends Component<T> {\n validationProperty = 'args.value';\n\n //cache for comparing\n lastIsValid?: boolean;\n lastIsTouched?: boolean;\n\n @tracked _validationErrorMessages: null | string[] = null;\n\n @tracked isTouched = false;\n\n get validations() {\n return this.args.validations || {};\n }\n\n get hasErrorMessages() {\n return this._validationErrorMessages?.length || this.error?.length > 0;\n }\n\n get isValid() {\n return !this.isInvalid;\n }\n\n get isInvalid() {\n return this.hasErrorMessages;\n }\n\n get isInvalidAndTouched() {\n return !!(this.isInvalid && this.isTouched);\n }\n\n get formHasBeenValidated() {\n return this.isTouched;\n }\n\n set formHasBeenValidated(value) {\n this.isTouched = value;\n }\n\n get customValidations() {\n return this.args.customValidations || [];\n }\n\n get rowClasses() {\n return this.args.rowClasses || '';\n }\n\n get rowExtra() {\n return this.args.rowExtra || {};\n }\n\n get label() {\n return this.args.label || '';\n }\n\n get error() {\n return this.args.error || [];\n }\n\n get options() {\n return this.args.options || [];\n }\n\n get validationErrorMessages() {\n let error = [];\n\n if (this.error.length > 0) {\n error.push(...this.error);\n }\n\n if (\n this._validationErrorMessages &&\n this._validationErrorMessages.length > 0\n ) {\n error.push(...this._validationErrorMessages);\n }\n\n if (error.length === 0) {\n return null;\n }\n\n return error;\n }\n\n constructor(owner: unknown, args: T['Args']) {\n super(owner, args);\n this.args.register?.(this as unknown as ComponentLike);\n }\n\n //Should be executed by the child on start\n @action\n setValidationMessages() {\n this._validationErrorMessages = buildValidationMessages.call(\n this,\n this.validationProperty\n );\n }\n\n //Should be executed by the child on value update\n @action\n didUpdateValue() {\n later(() => {\n if (!this.isDestroyed && !this.isDestroying) {\n this.setValidationMessages();\n this.notifyValidityChange();\n }\n }, 1);\n }\n\n @action\n notifyValidityChange() {\n notifyValidityChange(this, this.args.onValidityChange);\n }\n\n @action\n setIsTouched(val: boolean) {\n this.isTouched = val;\n this.notifyValidityChange();\n }\n\n /**\n * This is just a default handleChange, you should override this method\n * if you need to or use whatever mechanism to bubble the changed\n * value outside and then notifyValidityChanges\n *\n * @override\n * @param {*} e\n */\n @action\n handleChange(e: Event) {\n const value = (e.target as HTMLInputElement).value;\n\n this.args.onChange(value);\n this.notifyValidityChange();\n }\n\n willDestroy() {\n super.willDestroy();\n this.args.unregister?.(this as unknown as ComponentLike);\n }\n\n <template>\n {{!@glint-expect-error}}\n {{yield this}}\n </template>\n}\n"],"names":["deferred","WeakMap","deferDecorator","proto","prop","desc","map","get","Map","set","findDeferredDecorator","target","_a","cursor","prototype","decorateFieldV2","decorators","initializer","configurable","enumerable","writable","decorator","Object","defineProperty","decorateMethodV2","origDesc","getOwnPropertyDescriptor","value","call","initializeDeferredDecorator","constructor","ValidatedFormFieldBase","Component","validationProperty","lastIsValid","lastIsTouched","g","tracked","i","void 0","validations","args","hasErrorMessages","_validationErrorMessages","length","error","isValid","isInvalid","isInvalidAndTouched","isTouched","formHasBeenValidated","customValidations","rowClasses","rowExtra","label","options","validationErrorMessages","push","owner","register","setValidationMessages","buildValidationMessages","n","action","didUpdateValue","later","isDestroyed","isDestroying","notifyValidityChange","onValidityChange","setIsTouched","val","handleChange","e","onChange","willDestroy","unregister","setComponentTemplate","precompileTemplate","strictMode"],"mappings":";;;;;;;;AAuBA,MAAMA,QAAA,sBAGEC,OAAA,EAAA;AAER,SAASC,eACPC,KAAA,EACAC,IAAA,EACAC,IA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,QAAQ,CAAC/C,KAAA,CAAA;IACnB,IAAI,CAACyC,oBAAoB,EAAA;AAC3B;AAAA,EAAA;IAAAN,gBAAA,CAAA,IAAA,CAAAhD,SAAA,EAAA,cAAA,EAAA,CANCiD,MAAA,CAAA,CAAA;AAAA;AAQDY,EAAAA,WAAcA,GAAA;IACZ,KAAK,CAACA,WAAA,EAAA;AACN,IAAA,IAAI,CAAClC,IAAI,CAACmC,UAAU,GAAG,IAAmB,CAAA;AAC5C;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAGA,4DAAA,EAAA;MAAAC,UAAA,EAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"build-validation-messages.js","sources":["../../src/utils/build-validation-messages.js"],"sourcesContent":["import { getOwner } from '@ember/application';\nimport { isArray } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { get, set } from '@ember/object';\nimport { typeOf } from '@ember/utils';\n\nimport { validate } from 'ember-validators';\n\nimport getMessages from './get-messages';\nimport buildMessage from './validation-errors';\n\n/**\n * Based on ember-paper validation-mixin\n * @param {string} property - property to grab the currentValue from\n * @returns\n */\nexport function buildValidationMessages(property) {\n const messages = [];\n\n let messageBuilder = getMessages(getOwner(this));\n let emberValidatorConfig = this.validations || {};\n let emberValidatorsConfigKeys = Object.keys(emberValidatorConfig);\n\n // execute ember-validators validations\n let currentValue = get(this, property);\n\n emberValidatorsConfigKeys.forEach((configKey) => {\n const config = emberValidatorConfig[configKey];\n\n try {\n let isError = validate(\n configKey,\n currentValue,\n config,\n config.model,\n config.attribute\n );\n\n if (isError !== true) {\n messages.push(\n buildMessage(\n messageBuilder,\n config.attribute ? config.attribute : null,\n isError\n )\n );\n }\n } catch (error) {\n console.log(error);\n }\n });\n\n // custom validations\n let customValidators = this.customValidations;\n\n assert('`customValidations` must be an array', isArray(customValidators));\n\n customValidators.forEach((validator) => {\n assert(\n 'validation.validate must be a function',\n typeOf(validator?.validate === 'function')\n );\n\n let isError = validator.validation(currentValue, validator.params);\n\n if (isError !== true) {\n messages.push(buildMessage(messageBuilder, null, isError));\n }\n });\n\n // error messages array\n let errors = this.errors || [];\n\n assert('`errors` must be an array', isArray(errors));\n\n messages.push(...errors);\n\n return messages;\n}\n\nexport function notifyValidityChange(ctx, onValidityChange) {\n const isValid = ctx.isValid;\n const lastIsValid = ctx.lastIsValid;\n const isTouched = ctx.isTouched;\n const lastIsTouched = ctx.lastIsTouched;\n const isInvalidAndTouched = ctx.isInvalidAndTouched;\n\n if (lastIsValid !== isValid || lastIsTouched !== isTouched) {\n onValidityChange?.({\n child: ctx,\n isValid,\n isTouched,\n isInvalidAndTouched\n });\n\n set(ctx, 'lastIsValid', isValid);\n set(ctx, 'lastIsTouched', isTouched);\n }\n}\n\nexport default {\n buildValidationMessages,\n notifyValidityChange\n};\n"],"names":["buildValidationMessages","property","messages","messageBuilder","getMessages","getOwner","emberValidatorConfig","validations","emberValidatorsConfigKeys","Object","keys","currentValue","get","forEach","configKey","config","isError","validate","model","attribute","push","buildMessage","error","console","log","customValidators","customValidations","assert","isArray","validator","typeOf","validation","params","errors","notifyValidityChange","ctx","onValidityChange","isValid","lastIsValid","isTouched","lastIsTouched","isInvalidAndTouched","child","set"],"mappings":";;;;;;;;;AAWA;AACA;AACA;AACA;AACA;AACO,SAASA,uBAAuBA,CAACC,QAAQ,EAAE;EAChD,MAAMC,QAAQ,GAAG,EAAE,CAAA;EAEnB,IAAIC,cAAc,GAAGC,WAAW,CAACC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAA;AAChD,EAAA,IAAIC,oBAAoB,GAAG,IAAI,CAACC,WAAW,IAAI,EAAE,CAAA;AACjD,EAAA,IAAIC,yBAAyB,GAAGC,MAAM,CAACC,IAAI,CAACJ,oBAAoB,CAAC,CAAA;;AAEjE;AACA,EAAA,IAAIK,YAAY,GAAGC,GAAG,CAAC,IAAI,EAAEX,QAAQ,CAAC,CAA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CAAA;AAE9BN,EAAAA,MAAM,CAAC,2BAA2B,EAAEC,OAAO,CAACK,MAAM,CAAC,CAAC,CAAA;AAEpD/B,EAAAA,QAAQ,CAACkB,IAAI,CAAC,GAAGa,MAAM,CAAC,CAAA;AAExB,EAAA,OAAO/B,QAAQ,CAAA;AACjB,CAAA;AAEO,SAASgC,oBAAoBA,CAACC,GAAG,EAAEC,gBAAgB,EAAE;AAC1D,EAAA,MAAMC,OAAO,GAAGF,GAAG,CAACE,OAAO,CAAA;AAC3B,EAAA,MAAMC,WAAW,GAAGH,GAAG,CAACG,WAAW,CAAA;AACnC,EAAA,MAAMC,SAAS,GAAGJ,GAAG,CAACI,SAAS,CAAA;AAC/B,EAAA,MAAMC,aAAa,GAAGL,GAAG,CAACK,aAAa,CAAA;AACvC,EAAA,MAAMC,mBAAmB,GAAGN,GAAG,CAACM,mBAAmB,CAAA;AAEnD,EAAA,IAAIH,WAAW,KAAKD,OAAO,IAAIG,aAAa,KAAKD,SAAS,EAAE;AAC1DH,IAAAA,gBAAgB,GAAG;AACjBM,MAAAA,KAAK,EAAEP,GAAG;MACVE,OAAO;MACPE,SAAS;AACTE,MAAAA,mBAAAA;AACF,KAAC,CAAC,CAAA;AAEFE,IAAAA,GAAG,CAACR,GAAG,EAAE,aAAa,EAAEE,OAAO,CAAC,CAAA;AAChCM,IAAAA,GAAG,CAACR,GAAG,EAAE,eAAe,EAAEI,SAAS,CAAC,CAAA;AACtC,GAAA;AACF,CAAA;AAEA,gCAAe;EACbvC,uBAAuB;AACvBkC,EAAAA,oBAAAA;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"build-validation-messages.js","sources":["../../src/utils/build-validation-messages.js"],"sourcesContent":["import { getOwner } from '@ember/application';\nimport { isArray } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { get, set } from '@ember/object';\nimport { typeOf } from '@ember/utils';\n\nimport { validate } from 'ember-validators';\n\nimport getMessages from './get-messages';\nimport buildMessage from './validation-errors';\n\n/**\n * Based on ember-paper validation-mixin\n * @param {string} property - property to grab the currentValue from\n * @returns\n */\nexport function buildValidationMessages(property) {\n const messages = [];\n\n let messageBuilder = getMessages(getOwner(this));\n let emberValidatorConfig = this.validations || {};\n let emberValidatorsConfigKeys = Object.keys(emberValidatorConfig);\n\n // execute ember-validators validations\n let currentValue = get(this, property);\n\n emberValidatorsConfigKeys.forEach((configKey) => {\n const config = emberValidatorConfig[configKey];\n\n try {\n let isError = validate(\n configKey,\n currentValue,\n config,\n config.model,\n config.attribute\n );\n\n if (isError !== true) {\n messages.push(\n buildMessage(\n messageBuilder,\n config.attribute ? config.attribute : null,\n isError\n )\n );\n }\n } catch (error) {\n console.log(error);\n }\n });\n\n // custom validations\n let customValidators = this.customValidations;\n\n assert('`customValidations` must be an array', isArray(customValidators));\n\n customValidators.forEach((validator) => {\n assert(\n 'validation.validate must be a function',\n typeOf(validator?.validate === 'function')\n );\n\n let isError = validator.validation(currentValue, validator.params);\n\n if (isError !== true) {\n messages.push(buildMessage(messageBuilder, null, isError));\n }\n });\n\n // error messages array\n let errors = this.errors || [];\n\n assert('`errors` must be an array', isArray(errors));\n\n messages.push(...errors);\n\n return messages;\n}\n\nexport function notifyValidityChange(ctx, onValidityChange) {\n const isValid = ctx.isValid;\n const lastIsValid = ctx.lastIsValid;\n const isTouched = ctx.isTouched;\n const lastIsTouched = ctx.lastIsTouched;\n const isInvalidAndTouched = ctx.isInvalidAndTouched;\n\n if (lastIsValid !== isValid || lastIsTouched !== isTouched) {\n onValidityChange?.({\n child: ctx,\n isValid,\n isTouched,\n isInvalidAndTouched\n });\n\n set(ctx, 'lastIsValid', isValid);\n set(ctx, 'lastIsTouched', isTouched);\n }\n}\n\nexport default {\n buildValidationMessages,\n notifyValidityChange\n};\n"],"names":["buildValidationMessages","property","messages","messageBuilder","getMessages","getOwner","emberValidatorConfig","validations","emberValidatorsConfigKeys","Object","keys","currentValue","get","forEach","configKey","config","isError","validate","model","attribute","push","buildMessage","error","console","log","customValidators","customValidations","assert","isArray","validator","typeOf","validation","params","errors","notifyValidityChange","ctx","onValidityChange","isValid","lastIsValid","isTouched","lastIsTouched","isInvalidAndTouched","child","set"],"mappings":";;;;;;;;;AAWA;AACA;AACA;AACA;AACA;AACO,SAASA,uBAAuBA,CAACC,QAAQ,EAAE;EAChD,MAAMC,QAAQ,GAAG,EAAE;EAEnB,IAAIC,cAAc,GAAGC,WAAW,CAACC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAChD,EAAA,IAAIC,oBAAoB,GAAG,IAAI,CAACC,WAAW,IAAI,EAAE;AACjD,EAAA,IAAIC,yBAAyB,GAAGC,MAAM,CAACC,IAAI,CAACJ,oBAAoB,CAAC;;AAEjE;AACA,EAAA,IAAIK,YAAY,GAAGC,GAAG,CAAC,IAAI,EAAEX,QAAQ,CAAC;AAEtCO,EAAAA,yBAAyB,CAACK,OAAO,CAAEC,SAAS,IAAK;AAC/C,IAAA,MAAMC,MAAM,GAAGT,oBAAoB,CAACQ,SAAS,CAAC;IAE9C,IAAI;AACF,MAAA,IAAIE,OAAO,GAAGC,QAAQ,CACpBH,SAAS,EACTH,YAAY,EACZI,MAAM,EACNA,MAAM,CAACG,KAAK,EACZH,MAAM,CAACI,SACT,CAAC;MAED,IAAIH,OAAO,KAAK,IAAI,EAAE;AACpBd,QAAAA,QAAQ,CAACkB,IAAI,CACXC,YAAY,CACVlB,cAAc,EACdY,MAAM,CAACI,SAAS,GAAGJ,MAAM,CAACI,SAAS,GAAG,IAAI,EAC1CH,OACF,CACF,CAAC;AACH;KACD,CAAC,OAAOM,KAAK,EAAE;AACdC,MAAAA,OAAO,CAACC,GAAG,CAACF,KAAK,CAAC;AACpB;AACF,GAAC,CAAC;;AAEF;AACA,EAAA,IAAIG,gBAAgB,GAAG,IAAI,CAACC,iBAAiB;AAE7CC,EAAAA,MAAM,CAAC,sCAAsC,EAAEC,OAAO,CAACH,gBAAgB,CAAC,CAAC;AAEzEA,EAAAA,gBAAgB,CAACZ,OAAO,CAAEgB,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AAEA,gCAAe;EACbvC,uBAAuB;AACvBkC,EAAAA;AACF,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-messages.js","sources":["../../src/utils/get-messages.js"],"sourcesContent":["import { isPresent } from '@ember/utils';\nimport { isNone } from '@ember/utils';\n\nimport Messages from 'ember-validators/messages';\n\nlet cachedRef = null;\n\n/**\n * Find and load messages module on consuming app. Defaults to addon messages.\n * To define a custom message map, create `my-app/app/validators/messages.js`\n * that extends from ember-validators/messages\n *\n * @param {Object} owner\n * @param {Boolean} useCache Pass `false` to ignore cached key\n * @return {Object}\n */\nexport default function getMessages(owner, useCache = true) {\n let messagesModule = Messages;\n\n if (useCache && isPresent(cachedRef)) {\n return cachedRef;\n }\n\n if (!isNone(owner)) {\n messagesModule = owner.factoryFor('validator:messages').create()\n }\n\n cachedRef = messagesModule;\n\n return messagesModule;\n}\n"],"names":["cachedRef","getMessages","owner","useCache","messagesModule","Messages","isPresent","isNone","factoryFor","create"],"mappings":";;;AAKA,IAAIA,SAAS,GAAG,IAAI,CAAA;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,WAAWA,CAACC,KAAK,EAAEC,QAAQ,GAAG,IAAI,EAAE;EAC1D,IAAIC,cAAc,GAAGC,QAAQ,CAAA;AAE7B,EAAA,IAAIF,QAAQ,IAAIG,SAAS,CAACN,SAAS,CAAC,EAAE;AACpC,IAAA,OAAOA,SAAS,CAAA;AAClB,GAAA;AAEA,EAAA,IAAI,CAACO,MAAM,CAACL,KAAK,CAAC,EAAE;IAClBE,cAAc,GAAGF,KAAK,CAACM,UAAU,CAAC,oBAAoB,CAAC,CAACC,MAAM,EAAE,CAAA;AAClE,GAAA;AAEAT,EAAAA,SAAS,GAAGI,cAAc,CAAA;AAE1B,EAAA,OAAOA,cAAc,CAAA;AACvB;;;;"}
1
+ {"version":3,"file":"get-messages.js","sources":["../../src/utils/get-messages.js"],"sourcesContent":["import { isPresent } from '@ember/utils';\nimport { isNone } from '@ember/utils';\n\nimport Messages from 'ember-validators/messages';\n\nlet cachedRef = null;\n\n/**\n * Find and load messages module on consuming app. Defaults to addon messages.\n * To define a custom message map, create `my-app/app/validators/messages.js`\n * that extends from ember-validators/messages\n *\n * @param {Object} owner\n * @param {Boolean} useCache Pass `false` to ignore cached key\n * @return {Object}\n */\nexport default function getMessages(owner, useCache = true) {\n let messagesModule = Messages;\n\n if (useCache && isPresent(cachedRef)) {\n return cachedRef;\n }\n\n if (!isNone(owner)) {\n messagesModule = owner.factoryFor('validator:messages').create()\n }\n\n cachedRef = messagesModule;\n\n return messagesModule;\n}\n"],"names":["cachedRef","getMessages","owner","useCache","messagesModule","Messages","isPresent","isNone","factoryFor","create"],"mappings":";;;AAKA,IAAIA,SAAS,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,WAAWA,CAACC,KAAK,EAAEC,QAAQ,GAAG,IAAI,EAAE;EAC1D,IAAIC,cAAc,GAAGC,QAAQ;AAE7B,EAAA,IAAIF,QAAQ,IAAIG,SAAS,CAACN,SAAS,CAAC,EAAE;AACpC,IAAA,OAAOA,SAAS;AAClB;AAEA,EAAA,IAAI,CAACO,MAAM,CAACL,KAAK,CAAC,EAAE;IAClBE,cAAc,GAAGF,KAAK,CAACM,UAAU,CAAC,oBAAoB,CAAC,CAACC,MAAM,EAAE;AAClE;AAEAT,EAAAA,SAAS,GAAGI,cAAc;AAE1B,EAAA,OAAOA,cAAc;AACvB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"validation-errors.js","sources":["../../src/utils/validation-errors.js"],"sourcesContent":["export default function buildMessage(messages, key, result = {}) {\n let description = messages.getDescriptionFor(key);\n\n if (result?.context?.message) {\n return result.context.message;\n }\n\n let { type, context = {} } = result;\n\n return messages.getMessageFor(type, Object.assign({ description }, context));\n}\n"],"names":["buildMessage","messages","key","result","description","getDescriptionFor","context","message","type","getMessageFor","Object","assign"],"mappings":"AAAe,SAASA,YAAYA,CAACC,QAAQ,EAAEC,GAAG,EAAEC,MAAM,GAAG,EAAE,EAAE;AAC/D,EAAA,IAAIC,WAAW,GAAGH,QAAQ,CAACI,iBAAiB,CAACH,GAAG,CAAC,CAAA;AAEjD,EAAA,IAAIC,MAAM,EAAEG,OAAO,EAAEC,OAAO,EAAE;AAC5B,IAAA,OAAOJ,MAAM,CAACG,OAAO,CAACC,OAAO,CAAA;AAC/B,GAAA;EAEA,IAAI;IAAEC,IAAI;AAAEF,IAAAA,OAAO,GAAG,EAAC;AAAE,GAAC,GAAGH,MAAM,CAAA;EAEnC,OAAOF,QAAQ,CAACQ,aAAa,CAACD,IAAI,EAAEE,MAAM,CAACC,MAAM,CAAC;AAAEP,IAAAA,WAAAA;GAAa,EAAEE,OAAO,CAAC,CAAC,CAAA;AAC9E;;;;"}
1
+ {"version":3,"file":"validation-errors.js","sources":["../../src/utils/validation-errors.js"],"sourcesContent":["export default function buildMessage(messages, key, result = {}) {\n let description = messages.getDescriptionFor(key);\n\n if (result?.context?.message) {\n return result.context.message;\n }\n\n let { type, context = {} } = result;\n\n return messages.getMessageFor(type, Object.assign({ description }, context));\n}\n"],"names":["buildMessage","messages","key","result","description","getDescriptionFor","context","message","type","getMessageFor","Object","assign"],"mappings":"AAAe,SAASA,YAAYA,CAACC,QAAQ,EAAEC,GAAG,EAAEC,MAAM,GAAG,EAAE,EAAE;AAC/D,EAAA,IAAIC,WAAW,GAAGH,QAAQ,CAACI,iBAAiB,CAACH,GAAG,CAAC;AAEjD,EAAA,IAAIC,MAAM,EAAEG,OAAO,EAAEC,OAAO,EAAE;AAC5B,IAAA,OAAOJ,MAAM,CAACG,OAAO,CAACC,OAAO;AAC/B;EAEA,IAAI;IAAEC,IAAI;AAAEF,IAAAA,OAAO,GAAG;AAAG,GAAC,GAAGH,MAAM;EAEnC,OAAOF,QAAQ,CAACQ,aAAa,CAACD,IAAI,EAAEE,MAAM,CAACC,MAAM,CAAC;AAAEP,IAAAA;GAAa,EAAEE,OAAO,CAAC,CAAC;AAC9E;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"with-defaults.js","sources":["../../src/utils/with-defaults.js"],"sourcesContent":["/**\n * Create a new object with defaults\n *\n * @public\n * @param {Object} obj\n * @param {Object} defaults\n * @return {Object}\n */\nexport default function withDefaults(obj = {}, defaults = {}) {\n return Object.assign(Object.assign({}, defaults), obj);\n}\n"],"names":["withDefaults","obj","defaults","Object","assign"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,YAAYA,CAACC,GAAG,GAAG,EAAE,EAAEC,QAAQ,GAAG,EAAE,EAAE;AAC5D,EAAA,OAAOC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,EAAE,EAAEF,QAAQ,CAAC,EAAED,GAAG,CAAC,CAAA;AACxD;;;;"}
1
+ {"version":3,"file":"with-defaults.js","sources":["../../src/utils/with-defaults.js"],"sourcesContent":["/**\n * Create a new object with defaults\n *\n * @public\n * @param {Object} obj\n * @param {Object} defaults\n * @return {Object}\n */\nexport default function withDefaults(obj = {}, defaults = {}) {\n return Object.assign(Object.assign({}, defaults), obj);\n}\n"],"names":["withDefaults","obj","defaults","Object","assign"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,YAAYA,CAACC,GAAG,GAAG,EAAE,EAAEC,QAAQ,GAAG,EAAE,EAAE;AAC5D,EAAA,OAAOC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,EAAE,EAAEF,QAAQ,CAAC,EAAED,GAAG,CAAC;AACxD;;;;"}