@globalpayments/vega 2.26.0 → 2.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (685) hide show
  1. package/dist/cjs/{app-globals-2bae50fb.js → app-globals-190595cc.js} +61 -9
  2. package/dist/cjs/{breakpoints-cb3291ba.js → breakpoints-7e2dff90.js} +1 -1
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-cc557cb3.js → child-nodes-event-prevent-slimmer-e383a914.js} +1 -1
  4. package/dist/cjs/{child-nodes-notify-observer-slimmer-c144a963.js → child-nodes-notify-observer-slimmer-79f2f5a7.js} +2 -2
  5. package/dist/cjs/{create-public-api-runtime-metrics-slimmer-d2d49ff5.js → create-public-api-runtime-metrics-slimmer-7510221b.js} +39 -2
  6. package/dist/cjs/{design-token-2c2cdd7d.js → design-token-17b8e4d8.js} +5 -5
  7. package/dist/cjs/{dom-node-subject-observer-factory-d2698876.js → dom-node-subject-observer-factory-2e41340d.js} +2 -31
  8. package/dist/cjs/{element-appender-slimmer-5fa9ff52.js → element-appender-slimmer-bf5ecbd8.js} +4 -4
  9. package/dist/cjs/{event-emit-slimmer-54616105.js → event-emit-slimmer-8f51adaa.js} +1 -1
  10. package/dist/cjs/{feature-flag-controller-e031c341.js → feature-flag-controller-078da332.js} +3 -0
  11. package/dist/cjs/{form-field-controller-slimmer-8b314ba2.js → form-field-controller-slimmer-ee984eb2.js} +54 -12
  12. package/dist/cjs/{icon-manager-2c3cf5ba.js → icon-manager-5a2b67cf.js} +4 -1
  13. package/dist/cjs/index.cjs.js +18 -14
  14. package/dist/cjs/{internal-icon-manager-3dd4faeb.js → internal-icon-manager-858baff1.js} +1 -1
  15. package/dist/cjs/loader.cjs.js +15 -12
  16. package/dist/cjs/{min-number-rule-0ce5347c.js → min-number-rule-84f21ad9.js} +8 -4
  17. package/dist/cjs/{min-string-length-rule-d1a1ea94.js → min-string-length-rule-75f24a48.js} +11 -4
  18. package/dist/cjs/observer-f49483e8.js +32 -0
  19. package/dist/cjs/{page-resize-observer-slimmer-1e404fc7.js → page-resize-observer-slimmer-a8cf1874.js} +1 -1
  20. package/dist/cjs/{remote-invocation-registry-162044d5.js → remote-invocation-registry-32aaf6c2.js} +3 -3
  21. package/dist/cjs/{required-field-rule-8655758f.js → required-field-rule-9a57b1a0.js} +1 -1
  22. package/dist/cjs/{responsive-format-facade-aa849dc7.js → responsive-format-facade-7bc51a43.js} +3 -3
  23. package/dist/cjs/{state-background-color-formatter-33ae4282.js → state-background-color-formatter-418b84e6.js} +1 -1
  24. package/dist/cjs/{static-subject-title-35e2a92c.js → static-subject-title-3599787e.js} +2 -0
  25. package/dist/cjs/{string-input-formatter-slimmer-0ac6e18a.js → string-input-formatter-slimmer-fcfa5bb7.js} +1 -1
  26. package/dist/cjs/{style-formatter-dc0682a4.js → style-formatter-a0829641.js} +2 -2
  27. package/dist/cjs/{sub-state-observer-slimmer-58217668.js → sub-state-observer-slimmer-832a4215.js} +4 -3
  28. package/dist/cjs/translation-77e9ccce.js +276 -0
  29. package/dist/cjs/translation-slimmer-8ebf126d.js +42 -0
  30. package/dist/cjs/{type-guard-4d05d4b2.js → type-guard-a07b353b.js} +2 -2
  31. package/dist/cjs/{ui-077fc009.js → ui-32e69595.js} +1 -1
  32. package/dist/cjs/vega-accordion.cjs.entry.js +20 -20
  33. package/dist/cjs/vega-app-footer.cjs.entry.js +11 -11
  34. package/dist/cjs/vega-app-header-button.cjs.entry.js +24 -24
  35. package/dist/cjs/vega-backdrop.cjs.entry.js +2 -2
  36. package/dist/cjs/vega-banner.cjs.entry.js +14 -14
  37. package/dist/cjs/vega-bar-chart.cjs.entry.js +1 -1
  38. package/dist/cjs/vega-box.cjs.entry.js +9 -9
  39. package/dist/cjs/vega-breadcrumb.cjs.entry.js +7 -6
  40. package/dist/cjs/vega-button-circle.cjs.entry.js +19 -18
  41. package/dist/cjs/vega-button-group_2.cjs.entry.js +10 -9
  42. package/dist/cjs/vega-button-link.cjs.entry.js +13 -12
  43. package/dist/cjs/vega-button.cjs.entry.js +20 -19
  44. package/dist/cjs/vega-calendar_3.cjs.entry.js +73 -35
  45. package/dist/cjs/vega-card.cjs.entry.js +7 -7
  46. package/dist/cjs/vega-carousel.cjs.entry.js +16 -15
  47. package/dist/cjs/vega-checkbox_2.cjs.entry.js +34 -32
  48. package/dist/cjs/vega-chip.cjs.entry.js +22 -21
  49. package/dist/cjs/vega-color-picker.cjs.entry.js +20 -18
  50. package/dist/cjs/vega-combo-box.cjs.entry.js +29 -27
  51. package/dist/cjs/vega-counter-badge.cjs.entry.js +4 -4
  52. package/dist/cjs/vega-date-picker_2.cjs.entry.js +86 -48
  53. package/dist/cjs/{vega-dialog-controller-cb07e697.js → vega-dialog-controller-6a8525b3.js} +3 -3
  54. package/dist/cjs/vega-dialog_2.cjs.entry.js +26 -25
  55. package/dist/cjs/vega-divider.cjs.entry.js +10 -10
  56. package/dist/cjs/vega-dropdown_5.cjs.entry.js +63 -50
  57. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  58. package/dist/cjs/vega-field-error.cjs.entry.js +2 -2
  59. package/dist/cjs/vega-field-label.cjs.entry.js +7 -6
  60. package/dist/cjs/vega-file-uploader.cjs.entry.js +33 -24
  61. package/dist/cjs/vega-flex.cjs.entry.js +12 -12
  62. package/dist/cjs/vega-font.cjs.entry.js +11 -11
  63. package/dist/cjs/vega-form.cjs.entry.js +23 -21
  64. package/dist/cjs/vega-grid.cjs.entry.js +8 -8
  65. package/dist/cjs/vega-icon.cjs.entry.js +9 -10
  66. package/dist/cjs/vega-image-uploader.cjs.entry.js +40 -31
  67. package/dist/cjs/vega-input-credit-card.cjs.entry.js +26 -25
  68. package/dist/cjs/vega-input-phone-number.cjs.entry.js +35 -31
  69. package/dist/cjs/vega-input-range.cjs.entry.js +41 -31
  70. package/dist/cjs/vega-input-select.cjs.entry.js +43 -34
  71. package/dist/cjs/vega-input.cjs.entry.js +39 -37
  72. package/dist/cjs/vega-item-toggle.cjs.entry.js +7 -6
  73. package/dist/cjs/vega-left-nav_5.cjs.entry.js +24 -24
  74. package/dist/cjs/vega-line-chart.cjs.entry.js +1 -1
  75. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +12 -12
  76. package/dist/cjs/vega-page-notification_2.cjs.entry.js +9 -8
  77. package/dist/cjs/vega-pagination.cjs.entry.js +27 -18
  78. package/dist/cjs/vega-pie-chart.cjs.entry.js +1 -1
  79. package/dist/cjs/vega-popover_2.cjs.entry.js +16 -15
  80. package/dist/cjs/vega-progress-tracker.cjs.entry.js +13 -12
  81. package/dist/cjs/vega-radio_2.cjs.entry.js +29 -27
  82. package/dist/cjs/vega-section-title.cjs.entry.js +2 -2
  83. package/dist/cjs/vega-segment-control.cjs.entry.js +10 -9
  84. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +28 -26
  85. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +25 -23
  86. package/dist/cjs/vega-signature-capture.cjs.entry.js +40 -31
  87. package/dist/cjs/{vega-skeleton-loader-controller-cb631f0e.js → vega-skeleton-loader-controller-e886dc58.js} +28 -6
  88. package/dist/cjs/vega-skeleton.cjs.entry.js +2 -2
  89. package/dist/cjs/vega-stepper.cjs.entry.js +22 -20
  90. package/dist/cjs/vega-tab-group_2.cjs.entry.js +43 -17
  91. package/dist/cjs/vega-table_8.cjs.entry.js +389 -333
  92. package/dist/cjs/vega-text.cjs.entry.js +4 -4
  93. package/dist/cjs/vega-textarea.cjs.entry.js +27 -25
  94. package/dist/cjs/vega-time-picker_2.cjs.entry.js +46 -29
  95. package/dist/cjs/vega-toggle-switch.cjs.entry.js +18 -16
  96. package/dist/cjs/vega-tooltip_2.cjs.entry.js +10 -10
  97. package/dist/cjs/vega.cjs.js +15 -12
  98. package/dist/collection/components/vega-accordion/vega-accordion.css +21 -0
  99. package/dist/collection/components/vega-accordion/vega-accordion.js +16 -16
  100. package/dist/collection/components/vega-app-footer/vega-app-footer.js +23 -23
  101. package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +23 -23
  102. package/dist/collection/components/vega-backdrop/vega-backdrop.js +7 -7
  103. package/dist/collection/components/vega-banner/vega-banner.js +19 -19
  104. package/dist/collection/components/vega-box/vega-box.css +21 -0
  105. package/dist/collection/components/vega-box/vega-box.js +27 -27
  106. package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.js +7 -7
  107. package/dist/collection/components/vega-button/vega-button.js +22 -22
  108. package/dist/collection/components/vega-button-circle/vega-button-circle.js +20 -20
  109. package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.js +8 -8
  110. package/dist/collection/components/vega-button-group/vega-button-group.js +9 -9
  111. package/dist/collection/components/vega-button-link/vega-button-link.js +20 -20
  112. package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.js +15 -7
  113. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-time-line-renderer.js +11 -1
  114. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +10 -6
  115. package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +12 -3
  116. package/dist/collection/components/vega-calendar/vega-calendar-event/vega-calendar-event.js +2 -2
  117. package/dist/collection/components/vega-calendar/vega-calendar-event-slot/vega-calendar-event-slot.js +2 -2
  118. package/dist/collection/components/vega-calendar/vega-calendar.js +24 -19
  119. package/dist/collection/components/vega-card/vega-card.js +6 -6
  120. package/dist/collection/components/vega-carousel/vega-carousel.js +19 -19
  121. package/dist/collection/components/vega-chart/vega-bar-chart/vega-bar-chart.js +3 -3
  122. package/dist/collection/components/vega-chart/vega-line-chart/vega-line-chart.js +4 -4
  123. package/dist/collection/components/vega-chart/vega-pie-chart/vega-pie-chart.js +4 -4
  124. package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +21 -21
  125. package/dist/collection/components/vega-checkbox/vega-checkbox.js +19 -19
  126. package/dist/collection/components/vega-chip/vega-chip.js +26 -26
  127. package/dist/collection/components/vega-color-picker/vega-color-picker.js +21 -21
  128. package/dist/collection/components/vega-combo-box/vega-combo-box.js +37 -37
  129. package/dist/collection/components/vega-counter-badge/vega-counter-badge.js +9 -9
  130. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +16 -2
  131. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-range-input-renderer.js +5 -2
  132. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +1 -1
  133. package/dist/collection/components/vega-date-picker/vega-date-picker.js +42 -37
  134. package/dist/collection/components/vega-dialog/vega-dialog.js +13 -13
  135. package/dist/collection/components/vega-divider/vega-divider.js +7 -7
  136. package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.js +6 -1
  137. package/dist/collection/components/vega-dropdown/vega-dropdown-content-box/vega-dropdown-content-box.js +1 -1
  138. package/dist/collection/components/vega-dropdown/vega-dropdown-group/vega-dropdown-group.js +4 -4
  139. package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.js +12 -12
  140. package/dist/collection/components/vega-dropdown/vega-dropdown.js +70 -65
  141. package/dist/collection/components/vega-field-error/vega-field-error.js +3 -3
  142. package/dist/collection/components/vega-field-label/vega-field-label.js +12 -12
  143. package/dist/collection/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-container-renderer.js +4 -1
  144. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +35 -30
  145. package/dist/collection/components/vega-flex/vega-flex.js +16 -16
  146. package/dist/collection/components/vega-font/vega-font.js +10 -10
  147. package/dist/collection/components/vega-form/vega-form.js +19 -19
  148. package/dist/collection/components/vega-grid/vega-grid.js +8 -8
  149. package/dist/collection/components/vega-hint/vega-hint.js +1 -1
  150. package/dist/collection/components/vega-icon/vega-icon.js +5 -5
  151. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-default-content-renderer.js +4 -1
  152. package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +45 -40
  153. package/dist/collection/components/vega-input/vega-input.js +58 -58
  154. package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +29 -29
  155. package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +28 -28
  156. package/dist/collection/components/vega-input-range/slimmers/renderers/vega-input-range-input-renderer.js +4 -1
  157. package/dist/collection/components/vega-input-range/vega-input-range.js +37 -32
  158. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +5 -2
  159. package/dist/collection/components/vega-input-select/vega-input-select.js +45 -40
  160. package/dist/collection/components/vega-item-toggle/vega-item-toggle.js +9 -9
  161. package/dist/collection/components/vega-loader-wrapper/vega-loader-wrapper.js +1 -1
  162. package/dist/collection/components/vega-loading-indicator/vega-loading-indicator.js +15 -15
  163. package/dist/collection/components/vega-modal/vega-modal.js +29 -29
  164. package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.js +16 -16
  165. package/dist/collection/components/vega-nav/vega-left-nav-group/vega-left-nav-group.js +6 -6
  166. package/dist/collection/components/vega-nav/vega-left-nav-link/vega-left-nav-link.js +8 -8
  167. package/dist/collection/components/vega-nav/vega-left-nav-section/vega-left-nav-section.js +4 -4
  168. package/dist/collection/components/vega-nav/vega-nav-card/vega-nav-card.js +3 -3
  169. package/dist/collection/components/vega-page-notification/vega-page-notification-list/vega-page-notification-list.js +1 -1
  170. package/dist/collection/components/vega-page-notification/vega-page-notification.js +15 -15
  171. package/dist/collection/components/vega-pagination/internal/vega-pagination-current-page-label.js +2 -2
  172. package/dist/collection/components/vega-pagination/internal/vega-pagination-go-to.js +2 -2
  173. package/dist/collection/components/vega-pagination/internal/vega-pagination-page-size-selector.js +2 -2
  174. package/dist/collection/components/vega-pagination/vega-pagination.js +23 -18
  175. package/dist/collection/components/vega-popover/vega-popover-content-box/vega-popover-content-box.js +3 -3
  176. package/dist/collection/components/vega-popover/vega-popover.js +19 -19
  177. package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +23 -23
  178. package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.js +22 -22
  179. package/dist/collection/components/vega-radio/vega-radio.js +16 -16
  180. package/dist/collection/components/vega-section-title/vega-section-title.js +7 -7
  181. package/dist/collection/components/vega-segment-control/vega-segment-control.js +12 -12
  182. package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.js +16 -16
  183. package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +18 -18
  184. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.js +18 -18
  185. package/dist/collection/components/vega-selection-tile/vega-selection-tile.js +13 -13
  186. package/dist/collection/components/vega-signature-capture/slimmers/written-mode/renderers/written-mode-renderer.js +5 -2
  187. package/dist/collection/components/vega-signature-capture/vega-signature-capture.js +34 -29
  188. package/dist/collection/components/vega-skeleton/vega-skeleton.js +7 -7
  189. package/dist/collection/components/vega-slot-container/vega-slot-container.js +1 -1
  190. package/dist/collection/components/vega-stepper/vega-stepper.js +22 -22
  191. package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-tab-list-renderer.js +26 -1
  192. package/dist/collection/components/vega-tab-group/vega-tab-group-panel/vega-tab-group-panel.js +3 -3
  193. package/dist/collection/components/vega-tab-group/vega-tab-group.css +29 -0
  194. package/dist/collection/components/vega-tab-group/vega-tab-group.js +14 -14
  195. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-renderer.js +4 -1
  196. package/dist/collection/components/vega-table/vega-table-body/vega-table-body.js +1 -1
  197. package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +5 -5
  198. package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.js +2 -2
  199. package/dist/collection/components/vega-table/vega-table-head/vega-table-head.js +1 -1
  200. package/dist/collection/components/vega-table/vega-table-head-cell/slimmers/renderers/sort-icon-renderer.js +38 -0
  201. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.css +27 -31
  202. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +25 -26
  203. package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.js +3 -3
  204. package/dist/collection/components/vega-table/vega-table-row/vega-table-row.js +6 -6
  205. package/dist/collection/components/vega-table/vega-table.js +87 -82
  206. package/dist/collection/components/vega-text/vega-text.js +4 -4
  207. package/dist/collection/components/vega-textarea/vega-textarea.js +31 -31
  208. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-input-renderer.js +7 -2
  209. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-input-renderer.js +6 -1
  210. package/dist/collection/components/vega-time-picker/vega-time-picker-dropdown/vega-time-picker-dropdown.js +1 -1
  211. package/dist/collection/components/vega-time-picker/vega-time-picker.js +31 -26
  212. package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.js +20 -20
  213. package/dist/collection/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.js +2 -2
  214. package/dist/collection/components/vega-tooltip/vega-tooltip.js +15 -15
  215. package/dist/collection/components/vega-virtual-scroll/vega-virtual-scroll.js +16 -16
  216. package/dist/collection/constants/runtime-metrics-payload-definition/public-api/VegaTranslation/runtime-metrics-payload-definition.js +42 -0
  217. package/dist/collection/constants/ui.js +1 -1
  218. package/dist/collection/global/icons/arrow-up-arrow-down.js +3 -0
  219. package/dist/collection/global/icons/circle-arrow-down.js +3 -0
  220. package/dist/collection/global/icons/circle-arrow-up.js +3 -0
  221. package/dist/collection/global/scripts/before-vega-load.js +12 -2
  222. package/dist/collection/helpers/change-manager/subject/static-subject/static-subject-title.js +1 -0
  223. package/dist/collection/helpers/common/wait-for-vega-handler.js +2 -0
  224. package/dist/collection/helpers/dialog/vega-dialog-controller.js +1 -0
  225. package/dist/collection/helpers/event-manager/vega-event-manager.js +3 -0
  226. package/dist/collection/helpers/feature-control/feature-flag-controller.js +3 -0
  227. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-box-display-formatter.test.js +15 -3
  228. package/dist/collection/helpers/icon/icon-manager.js +3 -0
  229. package/dist/collection/helpers/loading-indicator/vega-loader-controller.js +2 -0
  230. package/dist/collection/helpers/notify/vega-notify-controller.js +6 -0
  231. package/dist/collection/helpers/public-api.js +1 -0
  232. package/dist/collection/helpers/skeleton-loader/vega-skeleton-loader-controller.js +4 -0
  233. package/dist/collection/helpers/slimmers/field-error-ui-controller-slimmer.js +46 -3
  234. package/dist/collection/helpers/slimmers/global/vega-translate-observer-slimmer.js +44 -0
  235. package/dist/collection/helpers/slimmers/test/translation-slimmer.test.js +89 -0
  236. package/dist/collection/helpers/slimmers/translation/index.js +1 -0
  237. package/dist/collection/helpers/slimmers/translation/translation-slimmer.js +37 -0
  238. package/dist/collection/helpers/theme/theme-manager.js +5 -0
  239. package/dist/collection/helpers/translation/index.js +4 -0
  240. package/dist/collection/helpers/translation/internal-translation-controller.js +104 -0
  241. package/dist/collection/helpers/translation/locales/en.js +74 -0
  242. package/dist/collection/helpers/translation/tests/internal-translation-controller.test.js +182 -0
  243. package/dist/collection/helpers/translation/tests/translation.test.js +32 -0
  244. package/dist/collection/helpers/translation/translation.js +51 -0
  245. package/dist/collection/helpers/validator/rules/check-box-required-rule.js +1 -1
  246. package/dist/collection/helpers/validator/rules/date-range-rule.js +1 -1
  247. package/dist/collection/helpers/validator/rules/date-required-rule.js +1 -1
  248. package/dist/collection/helpers/validator/rules/email-field-rule.js +1 -1
  249. package/dist/collection/helpers/validator/rules/input-phone-number-required-rule.js +1 -1
  250. package/dist/collection/helpers/validator/rules/input-range-min-and-max-rule.js +5 -5
  251. package/dist/collection/helpers/validator/rules/input-range-required-rule.js +1 -1
  252. package/dist/collection/helpers/validator/rules/max-number-rule.js +4 -2
  253. package/dist/collection/helpers/validator/rules/max-string-length-rule.js +4 -2
  254. package/dist/collection/helpers/validator/rules/min-and-max-date-rule.js +25 -10
  255. package/dist/collection/helpers/validator/rules/min-number-rule.js +4 -2
  256. package/dist/collection/helpers/validator/rules/min-string-length-rule.js +7 -2
  257. package/dist/collection/helpers/validator/rules/required-field-rule.js +1 -1
  258. package/dist/collection/helpers/validator/rules/time-range-required-rule.js +1 -1
  259. package/dist/collection/helpers/validator/rules/time-range-rule.js +1 -1
  260. package/dist/collection/helpers/validator/rules/time-required-rule.js +1 -1
  261. package/dist/collection/helpers/validator/rules/valid-phone-number-rule.js +8 -5
  262. package/dist/collection/helpers/validator/test/rules/custom-validation-rule.test.js +56 -0
  263. package/dist/collection/helpers/validator/test/rules/input-range-min-and-max-rule.test.js +4 -4
  264. package/dist/collection/helpers/validator/test/rules/max-number-rule.test.js +3 -3
  265. package/dist/collection/helpers/validator/test/rules/max-string-length-rule.test.js +1 -1
  266. package/dist/collection/helpers/validator/test/rules/min-and-max-date-rule.test.js +10 -10
  267. package/dist/collection/helpers/validator/test/rules/min-number-rule.test.js +2 -2
  268. package/dist/collection/helpers/validator/test/rules/min-string-length-rule.test.js +1 -1
  269. package/dist/collection/helpers/validator/test/rules/valid-phone-number-rule.test.js +4 -1
  270. package/dist/collection/helpers/zindex/vega-z-index-manager.js +1 -0
  271. package/dist/esm/{app-globals-b5bc861f.js → app-globals-d0b86358.js} +61 -9
  272. package/dist/esm/{breakpoints-e59edf8d.js → breakpoints-36a3ed69.js} +1 -1
  273. package/dist/esm/{child-nodes-event-prevent-slimmer-d3883004.js → child-nodes-event-prevent-slimmer-345c46c5.js} +1 -1
  274. package/dist/esm/{child-nodes-notify-observer-slimmer-50cd94b9.js → child-nodes-notify-observer-slimmer-3d52b843.js} +1 -1
  275. package/dist/esm/{create-public-api-runtime-metrics-slimmer-dc9af92b.js → create-public-api-runtime-metrics-slimmer-928ad7f0.js} +37 -2
  276. package/dist/esm/{design-token-44525832.js → design-token-3671ce60.js} +5 -5
  277. package/dist/esm/{dom-node-subject-observer-factory-0d4b85b8.js → dom-node-subject-observer-factory-9461cd67.js} +2 -30
  278. package/dist/esm/{element-appender-slimmer-1aa00c06.js → element-appender-slimmer-1172e2ea.js} +4 -4
  279. package/dist/esm/{event-emit-slimmer-0315fa00.js → event-emit-slimmer-eee9fd41.js} +1 -1
  280. package/dist/esm/{feature-flag-controller-a5fe5022.js → feature-flag-controller-10780eeb.js} +3 -0
  281. package/dist/esm/{form-field-controller-slimmer-bf7441bd.js → form-field-controller-slimmer-2f9c871b.js} +49 -7
  282. package/dist/esm/{icon-manager-754cda3f.js → icon-manager-0f030f8a.js} +4 -1
  283. package/dist/esm/index.js +16 -14
  284. package/dist/esm/{internal-icon-manager-ebe6ecf4.js → internal-icon-manager-9671142a.js} +1 -1
  285. package/dist/esm/loader.js +15 -12
  286. package/dist/esm/{min-number-rule-88e546e5.js → min-number-rule-8f643dbd.js} +8 -4
  287. package/dist/esm/{min-string-length-rule-27a8ba07.js → min-string-length-rule-c6a69eeb.js} +11 -4
  288. package/dist/esm/observer-3959f9dd.js +30 -0
  289. package/dist/esm/{page-resize-observer-slimmer-8caeb03b.js → page-resize-observer-slimmer-994c1e1b.js} +1 -1
  290. package/dist/esm/{remote-invocation-registry-cf9c81bb.js → remote-invocation-registry-1682b34e.js} +1 -1
  291. package/dist/esm/{required-field-rule-f438a73f.js → required-field-rule-5da360cc.js} +1 -1
  292. package/dist/esm/{responsive-format-facade-4488d609.js → responsive-format-facade-5a1329a7.js} +3 -3
  293. package/dist/esm/{state-background-color-formatter-de7e6522.js → state-background-color-formatter-0540d006.js} +1 -1
  294. package/dist/esm/{static-subject-title-2a4d6602.js → static-subject-title-6987a80b.js} +2 -1
  295. package/dist/esm/{string-input-formatter-slimmer-633271ed.js → string-input-formatter-slimmer-bfe3f5e5.js} +1 -1
  296. package/dist/esm/{style-formatter-391b4f97.js → style-formatter-2fa5ce09.js} +2 -2
  297. package/dist/esm/{sub-state-observer-slimmer-46abe492.js → sub-state-observer-slimmer-af28076b.js} +2 -1
  298. package/dist/esm/translation-3b437b6d.js +272 -0
  299. package/dist/esm/translation-slimmer-c740a5f3.js +40 -0
  300. package/dist/esm/{type-guard-467c9e3e.js → type-guard-63caf78b.js} +2 -2
  301. package/dist/esm/{ui-df46cc20.js → ui-8424715a.js} +1 -1
  302. package/dist/esm/vega-accordion.entry.js +19 -19
  303. package/dist/esm/vega-app-footer.entry.js +11 -11
  304. package/dist/esm/vega-app-header-button.entry.js +24 -24
  305. package/dist/esm/vega-backdrop.entry.js +2 -2
  306. package/dist/esm/vega-banner.entry.js +14 -14
  307. package/dist/esm/vega-bar-chart.entry.js +1 -1
  308. package/dist/esm/vega-box.entry.js +9 -9
  309. package/dist/esm/vega-breadcrumb.entry.js +7 -6
  310. package/dist/esm/vega-button-circle.entry.js +19 -18
  311. package/dist/esm/vega-button-group_2.entry.js +10 -9
  312. package/dist/esm/vega-button-link.entry.js +13 -12
  313. package/dist/esm/vega-button.entry.js +20 -19
  314. package/dist/esm/vega-calendar_3.entry.js +72 -34
  315. package/dist/esm/vega-card.entry.js +7 -7
  316. package/dist/esm/vega-carousel.entry.js +16 -15
  317. package/dist/esm/vega-checkbox_2.entry.js +32 -30
  318. package/dist/esm/vega-chip.entry.js +22 -21
  319. package/dist/esm/vega-color-picker.entry.js +20 -18
  320. package/dist/esm/vega-combo-box.entry.js +29 -27
  321. package/dist/esm/vega-counter-badge.entry.js +4 -4
  322. package/dist/esm/vega-date-picker_2.entry.js +86 -48
  323. package/dist/esm/{vega-dialog-controller-fb1a8e21.js → vega-dialog-controller-3b905672.js} +2 -2
  324. package/dist/esm/vega-dialog_2.entry.js +26 -25
  325. package/dist/esm/vega-divider.entry.js +10 -10
  326. package/dist/esm/vega-dropdown_5.entry.js +63 -50
  327. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  328. package/dist/esm/vega-field-error.entry.js +2 -2
  329. package/dist/esm/vega-field-label.entry.js +7 -6
  330. package/dist/esm/vega-file-uploader.entry.js +32 -23
  331. package/dist/esm/vega-flex.entry.js +12 -12
  332. package/dist/esm/vega-font.entry.js +11 -11
  333. package/dist/esm/vega-form.entry.js +19 -17
  334. package/dist/esm/vega-grid.entry.js +8 -8
  335. package/dist/esm/vega-icon.entry.js +9 -10
  336. package/dist/esm/vega-image-uploader.entry.js +40 -31
  337. package/dist/esm/vega-input-credit-card.entry.js +26 -25
  338. package/dist/esm/vega-input-phone-number.entry.js +35 -31
  339. package/dist/esm/vega-input-range.entry.js +41 -31
  340. package/dist/esm/vega-input-select.entry.js +43 -34
  341. package/dist/esm/vega-input.entry.js +39 -37
  342. package/dist/esm/vega-item-toggle.entry.js +7 -6
  343. package/dist/esm/vega-left-nav_5.entry.js +23 -23
  344. package/dist/esm/vega-line-chart.entry.js +1 -1
  345. package/dist/esm/vega-loader-wrapper_2.entry.js +12 -12
  346. package/dist/esm/vega-page-notification_2.entry.js +9 -8
  347. package/dist/esm/vega-pagination.entry.js +27 -18
  348. package/dist/esm/vega-pie-chart.entry.js +1 -1
  349. package/dist/esm/vega-popover_2.entry.js +16 -15
  350. package/dist/esm/vega-progress-tracker.entry.js +13 -12
  351. package/dist/esm/vega-radio_2.entry.js +27 -25
  352. package/dist/esm/vega-section-title.entry.js +2 -2
  353. package/dist/esm/vega-segment-control.entry.js +10 -9
  354. package/dist/esm/vega-selection-chip_2.entry.js +27 -25
  355. package/dist/esm/vega-selection-tile_2.entry.js +24 -22
  356. package/dist/esm/vega-signature-capture.entry.js +40 -31
  357. package/dist/esm/{vega-skeleton-loader-controller-74e3d189.js → vega-skeleton-loader-controller-6fb25f3b.js} +25 -3
  358. package/dist/esm/vega-skeleton.entry.js +2 -2
  359. package/dist/esm/vega-stepper.entry.js +22 -20
  360. package/dist/esm/vega-tab-group_2.entry.js +42 -16
  361. package/dist/esm/vega-table_8.entry.js +377 -321
  362. package/dist/esm/vega-text.entry.js +4 -4
  363. package/dist/esm/vega-textarea.entry.js +27 -25
  364. package/dist/esm/vega-time-picker_2.entry.js +46 -29
  365. package/dist/esm/vega-toggle-switch.entry.js +18 -16
  366. package/dist/esm/vega-tooltip_2.entry.js +10 -10
  367. package/dist/esm/vega.js +15 -12
  368. package/dist/types/components/vega-accordion/vega-accordion.d.ts +11 -11
  369. package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +12 -12
  370. package/dist/types/components/vega-app-header-button/vega-app-header-button.d.ts +14 -14
  371. package/dist/types/components/vega-backdrop/vega-backdrop.d.ts +5 -5
  372. package/dist/types/components/vega-banner/vega-banner.d.ts +12 -12
  373. package/dist/types/components/vega-box/vega-box.d.ts +26 -26
  374. package/dist/types/components/vega-breadcrumb/vega-breadcrumb.d.ts +5 -5
  375. package/dist/types/components/vega-button/vega-button.d.ts +13 -13
  376. package/dist/types/components/vega-button-circle/vega-button-circle.d.ts +13 -13
  377. package/dist/types/components/vega-button-group/vega-button-group-item/vega-button-group-item.d.ts +7 -7
  378. package/dist/types/components/vega-button-group/vega-button-group.d.ts +6 -6
  379. package/dist/types/components/vega-button-link/vega-button-link.d.ts +12 -12
  380. package/dist/types/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.d.ts +1 -0
  381. package/dist/types/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-time-line-renderer.d.ts +4 -0
  382. package/dist/types/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.d.ts +1 -0
  383. package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +1 -0
  384. package/dist/types/components/vega-calendar/types.d.ts +9 -1
  385. package/dist/types/components/vega-calendar/vega-calendar-event/vega-calendar-event.d.ts +2 -2
  386. package/dist/types/components/vega-calendar/vega-calendar-event-slot/vega-calendar-event-slot.d.ts +2 -2
  387. package/dist/types/components/vega-calendar/vega-calendar.d.ts +16 -14
  388. package/dist/types/components/vega-card/vega-card.d.ts +5 -5
  389. package/dist/types/components/vega-carousel/vega-carousel.d.ts +11 -11
  390. package/dist/types/components/vega-chart/vega-bar-chart/vega-bar-chart.d.ts +2 -2
  391. package/dist/types/components/vega-chart/vega-line-chart/vega-line-chart.d.ts +3 -3
  392. package/dist/types/components/vega-chart/vega-pie-chart/vega-pie-chart.d.ts +3 -3
  393. package/dist/types/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.d.ts +12 -12
  394. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +11 -11
  395. package/dist/types/components/vega-chip/vega-chip.d.ts +16 -16
  396. package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +12 -12
  397. package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +22 -22
  398. package/dist/types/components/vega-counter-badge/vega-counter-badge.d.ts +5 -5
  399. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +7 -0
  400. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-range-input-renderer.d.ts +1 -0
  401. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +1 -1
  402. package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +24 -22
  403. package/dist/types/components/vega-dialog/vega-dialog.d.ts +10 -10
  404. package/dist/types/components/vega-divider/vega-divider.d.ts +4 -4
  405. package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.d.ts +1 -0
  406. package/dist/types/components/vega-dropdown/vega-dropdown-content-box/vega-dropdown-content-box.d.ts +1 -1
  407. package/dist/types/components/vega-dropdown/vega-dropdown-group/vega-dropdown-group.d.ts +3 -3
  408. package/dist/types/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.d.ts +10 -10
  409. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +42 -40
  410. package/dist/types/components/vega-field-error/vega-field-error.d.ts +2 -2
  411. package/dist/types/components/vega-field-label/vega-field-label.d.ts +8 -8
  412. package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-container-renderer.d.ts +1 -0
  413. package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +23 -21
  414. package/dist/types/components/vega-flex/vega-flex.d.ts +13 -13
  415. package/dist/types/components/vega-font/vega-font.d.ts +6 -6
  416. package/dist/types/components/vega-form/vega-form.d.ts +13 -13
  417. package/dist/types/components/vega-grid/vega-grid.d.ts +4 -4
  418. package/dist/types/components/vega-hint/vega-hint.d.ts +1 -1
  419. package/dist/types/components/vega-icon/vega-icon.d.ts +4 -4
  420. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-default-content-renderer.d.ts +1 -0
  421. package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +27 -25
  422. package/dist/types/components/vega-input/vega-input.d.ts +35 -35
  423. package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +18 -18
  424. package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +17 -17
  425. package/dist/types/components/vega-input-range/slimmers/renderers/vega-input-range-input-renderer.d.ts +1 -0
  426. package/dist/types/components/vega-input-range/vega-input-range.d.ts +20 -18
  427. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +1 -0
  428. package/dist/types/components/vega-input-select/vega-input-select.d.ts +26 -24
  429. package/dist/types/components/vega-item-toggle/vega-item-toggle.d.ts +6 -6
  430. package/dist/types/components/vega-loader-wrapper/vega-loader-wrapper.d.ts +1 -1
  431. package/dist/types/components/vega-loading-indicator/vega-loading-indicator.d.ts +8 -8
  432. package/dist/types/components/vega-modal/vega-modal.d.ts +18 -18
  433. package/dist/types/components/vega-nav/vega-left-nav/vega-left-nav.d.ts +10 -10
  434. package/dist/types/components/vega-nav/vega-left-nav-group/vega-left-nav-group.d.ts +5 -5
  435. package/dist/types/components/vega-nav/vega-left-nav-link/vega-left-nav-link.d.ts +7 -7
  436. package/dist/types/components/vega-nav/vega-left-nav-section/vega-left-nav-section.d.ts +4 -4
  437. package/dist/types/components/vega-nav/vega-nav-card/vega-nav-card.d.ts +3 -3
  438. package/dist/types/components/vega-page-notification/vega-page-notification-list/vega-page-notification-list.d.ts +1 -1
  439. package/dist/types/components/vega-page-notification/vega-page-notification.d.ts +8 -8
  440. package/dist/types/components/vega-pagination/internal/vega-pagination-current-page-label.d.ts +2 -0
  441. package/dist/types/components/vega-pagination/internal/vega-pagination-go-to.d.ts +2 -0
  442. package/dist/types/components/vega-pagination/internal/vega-pagination-page-size-selector.d.ts +2 -0
  443. package/dist/types/components/vega-pagination/vega-pagination.d.ts +12 -10
  444. package/dist/types/components/vega-popover/vega-popover-content-box/vega-popover-content-box.d.ts +2 -2
  445. package/dist/types/components/vega-popover/vega-popover.d.ts +13 -13
  446. package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +13 -13
  447. package/dist/types/components/vega-radio/vega-radio-group/vega-radio-group.d.ts +13 -13
  448. package/dist/types/components/vega-radio/vega-radio.d.ts +12 -12
  449. package/dist/types/components/vega-section-title/vega-section-title.d.ts +5 -5
  450. package/dist/types/components/vega-segment-control/vega-segment-control.d.ts +8 -8
  451. package/dist/types/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.d.ts +11 -11
  452. package/dist/types/components/vega-selection-chip/vega-selection-chip.d.ts +12 -12
  453. package/dist/types/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.d.ts +12 -12
  454. package/dist/types/components/vega-selection-tile/vega-selection-tile.d.ts +10 -10
  455. package/dist/types/components/vega-signature-capture/slimmers/written-mode/renderers/written-mode-renderer.d.ts +1 -0
  456. package/dist/types/components/vega-signature-capture/vega-signature-capture.d.ts +18 -16
  457. package/dist/types/components/vega-skeleton/vega-skeleton.d.ts +5 -5
  458. package/dist/types/components/vega-slot-container/vega-slot-container.d.ts +1 -1
  459. package/dist/types/components/vega-stepper/vega-stepper.d.ts +13 -13
  460. package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-tab-list-renderer.d.ts +2 -0
  461. package/dist/types/components/vega-tab-group/types.d.ts +7 -0
  462. package/dist/types/components/vega-tab-group/vega-tab-group-panel/vega-tab-group-panel.d.ts +2 -2
  463. package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +9 -9
  464. package/dist/types/components/vega-table/slimmers/renderers/vega-table-renderer.d.ts +1 -0
  465. package/dist/types/components/vega-table/vega-table-body/vega-table-body.d.ts +1 -1
  466. package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +5 -5
  467. package/dist/types/components/vega-table/vega-table-expand-row/vega-table-expand-row.d.ts +2 -2
  468. package/dist/types/components/vega-table/vega-table-head/vega-table-head.d.ts +1 -1
  469. package/dist/types/components/vega-table/vega-table-head-cell/slimmers/renderers/sort-icon-renderer.d.ts +8 -0
  470. package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +10 -10
  471. package/dist/types/components/vega-table/vega-table-head-row/vega-table-head-row.d.ts +3 -3
  472. package/dist/types/components/vega-table/vega-table-row/vega-table-row.d.ts +6 -6
  473. package/dist/types/components/vega-table/vega-table.d.ts +51 -49
  474. package/dist/types/components/vega-text/vega-text.d.ts +3 -3
  475. package/dist/types/components/vega-textarea/vega-textarea.d.ts +18 -18
  476. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-input-renderer.d.ts +1 -0
  477. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-input-renderer.d.ts +1 -0
  478. package/dist/types/components/vega-time-picker/vega-time-picker-dropdown/vega-time-picker-dropdown.d.ts +1 -1
  479. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +18 -16
  480. package/dist/types/components/vega-toggle-switch/vega-toggle-switch.d.ts +12 -12
  481. package/dist/types/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.d.ts +2 -2
  482. package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +11 -11
  483. package/dist/types/components/vega-virtual-scroll/vega-virtual-scroll.d.ts +9 -9
  484. package/dist/types/components.d.ts +1452 -1452
  485. package/dist/types/constants/runtime-metrics-payload-definition/public-api/VegaTranslation/runtime-metrics-payload-definition.d.ts +2 -0
  486. package/dist/types/constants/ui.d.ts +1 -1
  487. package/dist/types/global/icons/arrow-up-arrow-down.d.ts +3 -0
  488. package/dist/types/global/icons/circle-arrow-down.d.ts +3 -0
  489. package/dist/types/global/icons/circle-arrow-up.d.ts +3 -0
  490. package/dist/types/helpers/change-manager/subject/static-subject/static-subject-title.d.ts +2 -1
  491. package/dist/types/helpers/common/wait-for-vega-handler.d.ts +2 -0
  492. package/dist/types/helpers/dialog/vega-dialog-controller.d.ts +1 -0
  493. package/dist/types/helpers/event-manager/vega-event-manager.d.ts +3 -0
  494. package/dist/types/helpers/feature-control/feature-flag-controller.d.ts +3 -0
  495. package/dist/types/helpers/icon/icon-manager.d.ts +3 -0
  496. package/dist/types/helpers/loading-indicator/vega-loader-controller.d.ts +2 -0
  497. package/dist/types/helpers/notify/vega-notify-controller.d.ts +6 -0
  498. package/dist/types/helpers/public-api.d.ts +1 -0
  499. package/dist/types/helpers/skeleton-loader/vega-skeleton-loader-controller.d.ts +4 -0
  500. package/dist/types/helpers/slimmers/field-error-ui-controller-slimmer.d.ts +22 -2
  501. package/dist/types/helpers/slimmers/global/vega-translate-observer-slimmer.d.ts +19 -0
  502. package/dist/types/helpers/slimmers/test/translation-slimmer.test.d.ts +1 -0
  503. package/dist/types/helpers/slimmers/translation/index.d.ts +1 -0
  504. package/dist/types/helpers/slimmers/translation/translation-slimmer.d.ts +22 -0
  505. package/dist/types/helpers/theme/theme-manager.d.ts +5 -0
  506. package/dist/types/helpers/translation/index.d.ts +4 -0
  507. package/dist/types/helpers/translation/interface.d.ts +90 -0
  508. package/dist/types/helpers/translation/internal-translation-controller.d.ts +58 -0
  509. package/dist/types/helpers/translation/locales/en.d.ts +5 -0
  510. package/dist/types/helpers/translation/tests/internal-translation-controller.test.d.ts +1 -0
  511. package/dist/types/helpers/translation/tests/translation.test.d.ts +1 -0
  512. package/dist/types/helpers/translation/translation.d.ts +33 -0
  513. package/dist/types/helpers/validator/rules/check-box-required-rule.d.ts +4 -3
  514. package/dist/types/helpers/validator/rules/date-range-rule.d.ts +4 -3
  515. package/dist/types/helpers/validator/rules/date-required-rule.d.ts +4 -3
  516. package/dist/types/helpers/validator/rules/email-field-rule.d.ts +4 -3
  517. package/dist/types/helpers/validator/rules/form-field-validation-rule.d.ts +2 -5
  518. package/dist/types/helpers/validator/rules/input-phone-number-required-rule.d.ts +4 -3
  519. package/dist/types/helpers/validator/rules/input-range-min-and-max-rule.d.ts +6 -5
  520. package/dist/types/helpers/validator/rules/input-range-required-rule.d.ts +4 -3
  521. package/dist/types/helpers/validator/rules/max-number-rule.d.ts +4 -3
  522. package/dist/types/helpers/validator/rules/max-string-length-rule.d.ts +4 -3
  523. package/dist/types/helpers/validator/rules/min-and-max-date-rule.d.ts +8 -7
  524. package/dist/types/helpers/validator/rules/min-number-rule.d.ts +4 -3
  525. package/dist/types/helpers/validator/rules/min-string-length-rule.d.ts +4 -3
  526. package/dist/types/helpers/validator/rules/required-field-rule.d.ts +4 -3
  527. package/dist/types/helpers/validator/rules/time-range-required-rule.d.ts +4 -3
  528. package/dist/types/helpers/validator/rules/time-range-rule.d.ts +4 -3
  529. package/dist/types/helpers/validator/rules/time-required-rule.d.ts +4 -3
  530. package/dist/types/helpers/validator/rules/valid-credit-card-number-rule.d.ts +2 -1
  531. package/dist/types/helpers/validator/rules/valid-phone-number-rule.d.ts +7 -6
  532. package/dist/types/helpers/validator/rules/validation-rule.d.ts +15 -2
  533. package/dist/types/helpers/validator/test/rules/custom-validation-rule.test.d.ts +1 -0
  534. package/dist/types/helpers/zindex/vega-z-index-manager.d.ts +1 -0
  535. package/dist/types/types/public-api.d.ts +1 -0
  536. package/dist/types/types/type-guard.d.ts +1 -1
  537. package/dist/vega/index.esm.js +1 -1
  538. package/dist/vega/p-056f448c.entry.js +1 -0
  539. package/dist/vega/p-05ebf5a3.js +1 -0
  540. package/dist/vega/{p-1cb8f21a.entry.js → p-063c3ba6.entry.js} +1 -1
  541. package/dist/vega/p-09352107.entry.js +1 -0
  542. package/dist/vega/p-0afaa0f3.entry.js +1 -0
  543. package/dist/vega/p-115e5967.js +1 -0
  544. package/dist/vega/p-14c0b4ea.js +1 -0
  545. package/dist/vega/p-15452727.js +1 -0
  546. package/dist/vega/p-1bbc62ef.entry.js +1 -0
  547. package/dist/vega/p-1dc80394.entry.js +1 -0
  548. package/dist/vega/{p-66098cf8.js → p-1ea57951.js} +1 -1
  549. package/dist/vega/p-26d0d411.entry.js +1 -0
  550. package/dist/vega/p-27b73500.entry.js +1 -0
  551. package/dist/vega/p-288b47f0.entry.js +1 -0
  552. package/dist/vega/p-28f6ead3.entry.js +1 -0
  553. package/dist/vega/p-331a62d5.js +1 -0
  554. package/dist/vega/p-33366630.entry.js +1 -0
  555. package/dist/vega/p-351a0ea1.entry.js +1 -0
  556. package/dist/vega/p-365c340d.entry.js +1 -0
  557. package/dist/vega/p-38e3d50e.entry.js +1 -0
  558. package/dist/vega/{p-f71aa49e.entry.js → p-3fc59fd3.entry.js} +1 -1
  559. package/dist/vega/p-456416ea.js +1 -0
  560. package/dist/vega/{p-883a939b.js → p-47c87634.js} +1 -1
  561. package/dist/vega/p-51622ace.entry.js +1 -0
  562. package/dist/vega/p-51cd2a39.entry.js +1 -0
  563. package/dist/vega/p-54f5c773.entry.js +1 -0
  564. package/dist/vega/{p-1c1805aa.js → p-573948c2.js} +1 -1
  565. package/dist/vega/{p-191c5c26.js → p-5dc98104.js} +1 -1
  566. package/dist/vega/p-5f377954.js +1 -1
  567. package/dist/vega/p-64e8bb64.js +1 -0
  568. package/dist/vega/p-68055c2d.entry.js +1 -0
  569. package/dist/vega/p-6874d6a1.entry.js +1 -0
  570. package/dist/vega/p-6c6d86da.js +1 -0
  571. package/dist/vega/p-74168615.js +1 -0
  572. package/dist/vega/{p-4b29a9c2.entry.js → p-7a1df282.entry.js} +1 -1
  573. package/dist/vega/p-7f8db003.entry.js +1 -0
  574. package/dist/vega/p-80c0f98c.entry.js +1 -0
  575. package/dist/vega/{p-016045b0.js → p-83af8ed7.js} +1 -1
  576. package/dist/vega/{p-462a6417.entry.js → p-84118b6d.entry.js} +1 -1
  577. package/dist/vega/p-880f91fb.js +1 -0
  578. package/dist/vega/p-8912d5c9.entry.js +1 -0
  579. package/dist/vega/p-8a1d8b99.entry.js +1 -0
  580. package/dist/vega/p-8a646846.entry.js +1 -0
  581. package/dist/vega/p-8aaa9233.entry.js +1 -0
  582. package/dist/vega/p-8b0533c4.entry.js +1 -0
  583. package/dist/vega/p-8c2852c4.entry.js +1 -0
  584. package/dist/vega/p-8eadc60b.entry.js +1 -0
  585. package/dist/vega/p-8fd6775a.entry.js +1 -0
  586. package/dist/vega/p-963e8c45.entry.js +1 -0
  587. package/dist/vega/{p-2df25c7f.js → p-9fbdeada.js} +1 -1
  588. package/dist/vega/p-a190c86a.js +1 -0
  589. package/dist/vega/{p-f1a59ae3.entry.js → p-a57eed48.entry.js} +1 -1
  590. package/dist/vega/p-a59c221b.entry.js +1 -0
  591. package/dist/vega/{p-a73c06f0.js → p-a5f80d35.js} +1 -1
  592. package/dist/vega/p-a7666db3.entry.js +1 -0
  593. package/dist/vega/{p-764be3f6.entry.js → p-a901494d.entry.js} +1 -1
  594. package/dist/vega/{p-af26780d.js → p-ac0ab38b.js} +1 -1
  595. package/dist/vega/p-acc14aa2.js +1 -0
  596. package/dist/vega/{p-9909e768.js → p-acf8b473.js} +1 -1
  597. package/dist/vega/p-af71fe84.entry.js +1 -0
  598. package/dist/vega/{p-2675fb06.entry.js → p-b2053fa8.entry.js} +1 -1
  599. package/dist/vega/p-ba3db23b.entry.js +1 -0
  600. package/dist/vega/p-be26b334.entry.js +1 -0
  601. package/dist/vega/p-bf557666.entry.js +1 -0
  602. package/dist/vega/p-bffaa859.entry.js +1 -0
  603. package/dist/vega/p-c31002d0.entry.js +13 -0
  604. package/dist/vega/{p-5f456ea0.entry.js → p-c9e3413b.entry.js} +1 -1
  605. package/dist/vega/{p-f6fa60f9.entry.js → p-cbeda6ca.entry.js} +1 -1
  606. package/dist/vega/{p-3e1b21ec.entry.js → p-d4c85e4e.entry.js} +1 -1
  607. package/dist/vega/p-d7bd2be5.entry.js +1 -0
  608. package/dist/vega/{p-bb491bed.js → p-da86ba01.js} +1 -1
  609. package/dist/vega/{p-59a75a4e.js → p-db120a1e.js} +1 -1
  610. package/dist/vega/p-ded47af0.entry.js +1 -0
  611. package/dist/vega/p-dee487f9.js +1 -0
  612. package/dist/vega/p-e7e19350.entry.js +1 -0
  613. package/dist/vega/p-ec157238.js +1 -0
  614. package/dist/vega/p-f37e6adf.entry.js +1 -0
  615. package/dist/vega/p-f41102cd.js +1 -0
  616. package/dist/vega/{p-3542f8fe.js → p-f46c930f.js} +1 -1
  617. package/dist/vega/p-f57454a6.js +1 -0
  618. package/dist/vega/p-f948debe.entry.js +1 -0
  619. package/dist/vega/p-fa78f87f.entry.js +1 -0
  620. package/dist/vega/p-fb6c90d6.js +1 -0
  621. package/dist/vega/{p-b6ef48be.entry.js → p-fd929ab5.entry.js} +1 -1
  622. package/dist/vega/vega.esm.js +1 -1
  623. package/package.json +2 -2
  624. package/dist/cjs/misc-3d30df91.js +0 -41
  625. package/dist/esm/misc-9fdbcfbb.js +0 -37
  626. package/dist/vega/p-0134e8c5.js +0 -1
  627. package/dist/vega/p-020baf8d.entry.js +0 -1
  628. package/dist/vega/p-0702921a.entry.js +0 -1
  629. package/dist/vega/p-0f71ffab.entry.js +0 -1
  630. package/dist/vega/p-13f2c41c.entry.js +0 -1
  631. package/dist/vega/p-16c85ca9.entry.js +0 -1
  632. package/dist/vega/p-1878a270.entry.js +0 -1
  633. package/dist/vega/p-1f712313.js +0 -1
  634. package/dist/vega/p-23ec14fe.js +0 -1
  635. package/dist/vega/p-241bd30d.entry.js +0 -1
  636. package/dist/vega/p-25310239.entry.js +0 -1
  637. package/dist/vega/p-28b1a294.entry.js +0 -1
  638. package/dist/vega/p-29ac203a.js +0 -1
  639. package/dist/vega/p-396c3e32.entry.js +0 -1
  640. package/dist/vega/p-3c8b2105.js +0 -1
  641. package/dist/vega/p-3e6e7fe0.entry.js +0 -1
  642. package/dist/vega/p-41f61205.entry.js +0 -1
  643. package/dist/vega/p-4302b57d.entry.js +0 -1
  644. package/dist/vega/p-47d106e7.js +0 -1
  645. package/dist/vega/p-47ee3c26.entry.js +0 -1
  646. package/dist/vega/p-4925ec08.entry.js +0 -1
  647. package/dist/vega/p-4f8ce53e.entry.js +0 -1
  648. package/dist/vega/p-5041624e.entry.js +0 -1
  649. package/dist/vega/p-527fec9b.entry.js +0 -1
  650. package/dist/vega/p-530f2b72.entry.js +0 -1
  651. package/dist/vega/p-54f87b68.entry.js +0 -1
  652. package/dist/vega/p-55ccc669.entry.js +0 -1
  653. package/dist/vega/p-68e87fb4.entry.js +0 -13
  654. package/dist/vega/p-75c401fe.entry.js +0 -1
  655. package/dist/vega/p-770c736e.js +0 -1
  656. package/dist/vega/p-7cbd8367.entry.js +0 -1
  657. package/dist/vega/p-7ff750c0.entry.js +0 -1
  658. package/dist/vega/p-8172bde8.entry.js +0 -1
  659. package/dist/vega/p-8b5d3a52.js +0 -1
  660. package/dist/vega/p-8ca2b2a6.js +0 -1
  661. package/dist/vega/p-9f9535d4.js +0 -1
  662. package/dist/vega/p-a1f7484f.js +0 -1
  663. package/dist/vega/p-a537eaa9.entry.js +0 -1
  664. package/dist/vega/p-b34a7f6c.entry.js +0 -1
  665. package/dist/vega/p-b441fd2d.entry.js +0 -1
  666. package/dist/vega/p-b9cb9098.entry.js +0 -1
  667. package/dist/vega/p-bb953c8e.js +0 -1
  668. package/dist/vega/p-bc5ce560.entry.js +0 -1
  669. package/dist/vega/p-be893ca7.entry.js +0 -1
  670. package/dist/vega/p-c093f5d2.js +0 -1
  671. package/dist/vega/p-c4ebfb95.entry.js +0 -1
  672. package/dist/vega/p-c6e0ca01.entry.js +0 -1
  673. package/dist/vega/p-c946ff64.entry.js +0 -1
  674. package/dist/vega/p-ca656348.entry.js +0 -1
  675. package/dist/vega/p-d26f7423.entry.js +0 -1
  676. package/dist/vega/p-d6893dba.entry.js +0 -1
  677. package/dist/vega/p-d9cd543f.entry.js +0 -1
  678. package/dist/vega/p-d9fc1fff.entry.js +0 -1
  679. package/dist/vega/p-e011e457.entry.js +0 -1
  680. package/dist/vega/p-e4085f89.entry.js +0 -1
  681. package/dist/vega/p-ea1f50c9.entry.js +0 -1
  682. package/dist/vega/p-eae4a1c1.js +0 -1
  683. package/dist/vega/p-f9e456a6.js +0 -1
  684. /package/dist/vega/{p-7c316199.js → p-319efe6c.js} +0 -0
  685. /package/dist/vega/{p-961e1ecd.js → p-e2acbc60.js} +0 -0
@@ -0,0 +1,182 @@
1
+ import en from '../locales/en';
2
+ import ChangeManager from '../../change-manager/change-manager';
3
+ import { UPDATE_TRANSLATION } from '../../change-manager/subject/static-subject/static-subject-title';
4
+ import { LogUtility } from '../../../utils/log';
5
+ import { VegaInternalTranslation } from '../internal-translation-controller';
6
+ describe('VegaTranslationController', () => {
7
+ beforeEach(() => {
8
+ VegaInternalTranslation.init({ resources: { en }, language: 'en' });
9
+ });
10
+ it('should initialize with the default language as "en"', () => {
11
+ expect(VegaInternalTranslation.t('This field is required')).toBe('This field is required');
12
+ });
13
+ it('should initialize with default resources when no resources are provided', () => {
14
+ VegaInternalTranslation.init({ resources: undefined, language: 'en' });
15
+ expect(VegaInternalTranslation.t('This field is required')).toBe('This field is required');
16
+ });
17
+ it('should fallback to default language if resources are empty during initialization', () => {
18
+ spyOn(LogUtility, 'warn');
19
+ VegaInternalTranslation.init({ resources: {}, language: 'en' });
20
+ expect(VegaInternalTranslation.t('Viewing {0}-{1} of {2}', 1, 10, 100)).toBe('Viewing 1-10 of 100');
21
+ expect(LogUtility.warn).toHaveBeenCalledWith('Resources are empty. Falling back to default language "en".');
22
+ });
23
+ it('should set the current language correctly', () => {
24
+ const resources = {
25
+ en: en,
26
+ fr: {
27
+ // eslint-disable-next-line @typescript-eslint/naming-convention,spellcheck/spell-checker
28
+ 'This field is required': 'Ce champ est obligatoire',
29
+ },
30
+ };
31
+ VegaInternalTranslation.init({ resources, language: 'fr' });
32
+ // eslint-disable-next-line spellcheck/spell-checker
33
+ expect(VegaInternalTranslation.t('This field is required')).toBe('Ce champ est obligatoire');
34
+ });
35
+ it('should fall back to default language if invalid language is provided', () => {
36
+ const resources = {
37
+ en: en,
38
+ };
39
+ VegaInternalTranslation.init({ resources, language: 'invalid_language' });
40
+ expect(VegaInternalTranslation.t('This field is required')).toBe('This field is required');
41
+ });
42
+ it('should change the current language if valid', () => {
43
+ spyOn(ChangeManager, 'notify');
44
+ const fr = {
45
+ // eslint-disable-next-line spellcheck/spell-checker,@typescript-eslint/naming-convention
46
+ 'This field is required': 'Ce champ est obligatoire',
47
+ // eslint-disable-next-line spellcheck/spell-checker,@typescript-eslint/naming-convention
48
+ 'The minimum input value is {0}': "La valeur d'entrée minimale est {0}",
49
+ };
50
+ VegaInternalTranslation.init({ resources: { en, fr }, language: 'en' });
51
+ VegaInternalTranslation.changeLanguage('fr');
52
+ // eslint-disable-next-line spellcheck/spell-checker
53
+ expect(VegaInternalTranslation.t('This field is required')).toBe('Ce champ est obligatoire');
54
+ expect(ChangeManager.notify).toHaveBeenCalledWith(UPDATE_TRANSLATION, {});
55
+ });
56
+ it('should log a warning if the language does not exist', () => {
57
+ spyOn(LogUtility, 'warn');
58
+ VegaInternalTranslation.changeLanguage('es');
59
+ expect(LogUtility.warn).toHaveBeenCalledWith('Language "es" not found in resources.');
60
+ });
61
+ it('should return the key if the translation is not found', () => {
62
+ expect(VegaInternalTranslation.t('Non existent key')).toBe('Non existent key');
63
+ });
64
+ it('should interpolate arguments into the translation string', () => {
65
+ expect(VegaInternalTranslation.t('The minimum input value is {0}', 5)).toBe('The minimum input value is 5');
66
+ });
67
+ it('should handle multiple arguments in the translation string', () => {
68
+ const enWithMultipleArgs = {
69
+ // eslint-disable-next-line @typescript-eslint/naming-convention
70
+ 'Viewing {0}-{1} of {2}': 'Viewing {0}-{1} of {2}',
71
+ };
72
+ VegaInternalTranslation.init({ resources: { en: enWithMultipleArgs }, language: 'en' });
73
+ expect(VegaInternalTranslation.t('Viewing {0}-{1} of {2}', 1, 10, 100)).toBe('Viewing 1-10 of 100');
74
+ });
75
+ it('should return translated text as expect', () => {
76
+ const resources = {
77
+ /* eslint-disable @typescript-eslint/naming-convention,spellcheck/spell-checker */
78
+ en: Object.assign(Object.assign({}, en), { 'Custom text': 'Custom text' }),
79
+ fr: {
80
+ // eslint-disable-next-line @typescript-eslint/naming-convention,spellcheck/spell-checker
81
+ 'This field is required': 'Ce champ est obligatoire',
82
+ 'Custom text': 'Texte personnalisé',
83
+ },
84
+ /* eslint-enable @typescript-eslint/naming-convention,spellcheck/spell-checker */
85
+ };
86
+ VegaInternalTranslation.init({ resources, language: 'fr' });
87
+ /* eslint-disable @typescript-eslint/naming-convention,spellcheck/spell-checker */
88
+ expect(VegaInternalTranslation.t('This field is required')).toBe('Ce champ est obligatoire');
89
+ expect(VegaInternalTranslation.t('Custom text')).toBe('Texte personnalisé');
90
+ /* eslint-enable @typescript-eslint/naming-convention,spellcheck/spell-checker */
91
+ });
92
+ it('should return en resource as expected', () => {
93
+ /* eslint-disable @typescript-eslint/naming-convention,spellcheck/spell-checker */
94
+ expect(en).toEqual({
95
+ 'This field is required': 'This field is required',
96
+ 'The minimum input value is {0}': 'The minimum input value is {0}',
97
+ 'The maximum input value is {0}': 'The maximum input value is {0}',
98
+ 'The end value should be greater than the start value': 'The end value should be greater than the start value',
99
+ 'The end date should be later than start date': 'The end date should be later than start date',
100
+ 'Credit card number is invalid': 'Credit card number is invalid',
101
+ 'Please enter the correct email format.': 'Please enter the correct email format.',
102
+ 'The maximum input length is {0}': 'The maximum input length is {0}',
103
+ 'The start date should be later than {0}': 'The start date should be later than {0}',
104
+ 'The start date should be earlier than {0}': 'The start date should be earlier than {0}',
105
+ 'The end date should be earlier than {0}': 'The end date should be earlier than {0}',
106
+ 'The date should be later than {0}': 'The date should be later than {0}',
107
+ 'The date should be earlier than {0}': 'The date should be earlier than {0}',
108
+ 'The minimum input length is {0}': 'The minimum input length is {0}',
109
+ 'The end time should be later than start time': 'The end time should be later than start time',
110
+ 'Phone number is not valid': 'Phone number is not valid',
111
+ 'Phone number is valid but it belongs to country {0}, not country {1}': 'Phone number is valid but it belongs to country {0}, not country {1}',
112
+ 'Viewing': 'Viewing',
113
+ 'Show': 'Show',
114
+ 'Go To': 'Go To',
115
+ 'Viewing {0}-{1} of {2}': 'Viewing {0}-{1} of {2}',
116
+ 'Upload': 'Upload',
117
+ 'Clear': 'Clear',
118
+ 'Today': 'Today',
119
+ 'Day': 'Day',
120
+ 'Week': 'Week',
121
+ 'Month': 'Month',
122
+ 'Sun': 'Sun',
123
+ 'Mon': 'Mon',
124
+ 'Tue': 'Tue',
125
+ 'Wed': 'Wed',
126
+ 'Thu': 'Thu',
127
+ 'Fri': 'Fri',
128
+ 'Sat': 'Sat',
129
+ 'Sun-short': 'S',
130
+ 'Mon-short': 'M',
131
+ 'Tue-short': 'T',
132
+ 'Wed-short': 'W',
133
+ 'Thu-short': 'T',
134
+ 'Fri-short': 'F',
135
+ 'Sat-short': 'S',
136
+ 'January': 'January',
137
+ 'February': 'February',
138
+ 'March': 'March',
139
+ 'April': 'April',
140
+ 'May': 'May',
141
+ 'June': 'June',
142
+ 'July': 'July',
143
+ 'August': 'August',
144
+ 'September': 'September',
145
+ 'October': 'October',
146
+ 'November': 'November',
147
+ 'December': 'December',
148
+ 'All Day': 'All Day',
149
+ 'Select or drop your file here': 'Select or drop your file here',
150
+ 'Please sign here': 'Please sign here',
151
+ 'Clear Signature': 'Clear Signature',
152
+ 'Start Date': 'Start Date',
153
+ 'End Date': 'End Date',
154
+ 'Please select': 'Please select',
155
+ 'No options': 'No options',
156
+ 'No results found': 'No results found',
157
+ 'Minimum': 'Minimum',
158
+ 'Maximum': 'Maximum',
159
+ 'Select Time': 'Select Time',
160
+ 'Start Time': 'Start Time',
161
+ 'End Time': 'End Time',
162
+ 'There is no data to display': 'There is no data to display',
163
+ });
164
+ /* eslint-enable @typescript-eslint/naming-convention,spellcheck/spell-checker */
165
+ });
166
+ it('should return default resource(en) translated text if the key not exist in custom resource', () => {
167
+ const resources = {
168
+ /* eslint-disable @typescript-eslint/naming-convention,spellcheck/spell-checker */
169
+ en: en,
170
+ fr: {
171
+ // eslint-disable-next-line @typescript-eslint/naming-convention,spellcheck/spell-checker
172
+ 'This field is required': 'Ce champ est obligatoire',
173
+ 'Custom text': 'Texte personnalisé',
174
+ },
175
+ /* eslint-enable @typescript-eslint/naming-convention,spellcheck/spell-checker */
176
+ };
177
+ VegaInternalTranslation.init({ resources, language: 'fr' });
178
+ // eslint-disable-next-line spellcheck/spell-checker
179
+ expect(VegaInternalTranslation.t('Custom text')).toBe('Texte personnalisé');
180
+ expect(VegaInternalTranslation.t('Sun-short')).toBe('S');
181
+ });
182
+ });
@@ -0,0 +1,32 @@
1
+ import { VegaTranslation } from '../translation';
2
+ import { VegaInternalTranslation } from '../internal-translation-controller';
3
+ import { VegaTranslationResourceEN } from '../../public-api';
4
+ describe('VegaTranslation', () => {
5
+ it('should translate to expected message', () => {
6
+ const resources = {
7
+ en: VegaTranslationResourceEN,
8
+ fr: {
9
+ // eslint-disable-next-line @typescript-eslint/naming-convention,spellcheck/spell-checker
10
+ 'This field is required': 'Ce champ est obligatoire',
11
+ },
12
+ };
13
+ VegaTranslation.init({ resources, language: 'fr' });
14
+ // eslint-disable-next-line spellcheck/spell-checker
15
+ expect(VegaInternalTranslation.t('This field is required')).toBe('Ce champ est obligatoire');
16
+ VegaTranslation.changeLanguage('en');
17
+ expect(VegaInternalTranslation.t('This field is required')).toBe('This field is required');
18
+ });
19
+ it('should return current language when get currentLanguage', () => {
20
+ const resources = {
21
+ en: VegaTranslationResourceEN,
22
+ fr: {
23
+ // eslint-disable-next-line @typescript-eslint/naming-convention,spellcheck/spell-checker
24
+ 'This field is required': 'Ce champ est obligatoire',
25
+ },
26
+ };
27
+ VegaTranslation.init({ resources, language: 'fr' });
28
+ expect(VegaTranslation.currentLanguage).toBe('fr');
29
+ VegaTranslation.changeLanguage('en');
30
+ expect(VegaTranslation.currentLanguage).toBe('en');
31
+ });
32
+ });
@@ -0,0 +1,51 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { VegaInternalTranslation } from './internal-translation-controller';
8
+ import { InjectVegaTelemetrySlimmer } from 'vega-slimmer/core';
9
+ import { createPublicAPIRuntimeMetricsSlimmer } from '../slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer';
10
+ import { VegaTranslationRuntimeMetricsPayloadDefinition } from '../../constants/runtime-metrics-payload-definition/public-api/VegaTranslation/runtime-metrics-payload-definition';
11
+ /**
12
+ * Vega Translation Public API
13
+ *
14
+ * @vegaVersion 2.27.0
15
+ */
16
+ class TranslationController {
17
+ constructor() {
18
+ this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(TranslationController, ['init', 'changeLanguage'], VegaTranslationRuntimeMetricsPayloadDefinition);
19
+ }
20
+ /**
21
+ * Get current language
22
+ *
23
+ * @returns {string} current language
24
+ * @vegaVersion 2.27.0
25
+ */
26
+ get currentLanguage() {
27
+ return VegaInternalTranslation.currentLanguage;
28
+ }
29
+ /**
30
+ * Initializes the translation controller with provided resources and language.
31
+ *
32
+ * @param {VegaTranslationConfig} config - Configuration object containing resources and initial language.
33
+ * @vegaVersion 2.27.0
34
+ */
35
+ init(config) {
36
+ VegaInternalTranslation.init(config);
37
+ }
38
+ /**
39
+ * Changes the current language if it exists in the resources.
40
+ *
41
+ * @param {string} language - The language code to change to.
42
+ * @vegaVersion 2.27.0
43
+ */
44
+ changeLanguage(language) {
45
+ VegaInternalTranslation.changeLanguage(language);
46
+ }
47
+ }
48
+ __decorate([
49
+ InjectVegaTelemetrySlimmer()
50
+ ], TranslationController.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
51
+ export const VegaTranslation = new TranslationController();
@@ -9,7 +9,7 @@ export class CheckBoxRequiredRule {
9
9
  * input is anything else, return false
10
10
  *
11
11
  * @param {string | boolean} input - The input to be evaluated.
12
- * @returns {EvaluateResult} - An object with two properties: isValid and message.
12
+ * @returns {EvaluateResultTranslation} - An object with two properties: isValid and message.
13
13
  */
14
14
  evaluate(input) {
15
15
  if (typeof input === 'boolean') {
@@ -28,7 +28,7 @@ export class DateRangeRule {
28
28
  * Check if the start date is before than end date
29
29
  *
30
30
  * @param {string | string[]} input - The value of the date picker.
31
- * @returns {EvaluateResult} - The result of the evaluation.
31
+ * @returns {EvaluateResultTranslation} - The result of the evaluation.
32
32
  */
33
33
  evaluate(input) {
34
34
  if (!this.isAcceptedInputType(input)) {
@@ -19,7 +19,7 @@ export class DateRequiredRule {
19
19
  * Otherwise, return an object with a boolean indicating whether the input is valid and a message to display to the user
20
20
  *
21
21
  * @param {string | string[]} input - The value of the input field.
22
- * @returns {EvaluateResult} An object with two properties: isValid and message.
22
+ * @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
23
23
  */
24
24
  evaluate(input) {
25
25
  if (!this.isAcceptedInputType(input)) {
@@ -9,7 +9,7 @@ export class EmailFieldRule {
9
9
  * It checks if the input is a valid email address.
10
10
  *
11
11
  * @param {string} input - string
12
- * @returns {EvaluateResult} An object with two properties: isValid and message.
12
+ * @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
13
13
  * @throws {Error} if input is unable to evaluate
14
14
  */
15
15
  evaluate(input) {
@@ -11,7 +11,7 @@ export class InputPhoneNumberRequiredRule {
11
11
  * It checks if the input is a valid value.
12
12
  *
13
13
  * @param {unknown} input - The value of the input field.
14
- * @returns {EvaluateResult} An object with two properties: isValid and message.
14
+ * @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
15
15
  */
16
16
  evaluate(input) {
17
17
  if (!this.isAcceptedInputType(input)) {
@@ -14,7 +14,7 @@ export class InputRangeMinAndMaxRule {
14
14
  * Generate an invalid result
15
15
  *
16
16
  * @param {string} message Error message
17
- * @returns {EvaluateResult} invalid validation result
17
+ * @returns {EvaluateResultTranslation} invalid validation result
18
18
  */
19
19
  this.invalidResult = (message) => ({
20
20
  isValid: false,
@@ -23,7 +23,7 @@ export class InputRangeMinAndMaxRule {
23
23
  /**
24
24
  * Generate a valid result
25
25
  *
26
- * @returns {EvaluateResult} invalid validation result
26
+ * @returns {EvaluateResultTranslation} invalid validation result
27
27
  */
28
28
  this.validResult = () => ({
29
29
  isValid: true,
@@ -49,7 +49,7 @@ export class InputRangeMinAndMaxRule {
49
49
  * max range
50
50
  *
51
51
  * @param {string[]} input - The value of the input range.
52
- * @returns {EvaluateResult} - The result of the evaluation.
52
+ * @returns {EvaluateResultTranslation} - The result of the evaluation.
53
53
  */
54
54
  evaluate(input) {
55
55
  if (!this.isAcceptedInputType(input)) {
@@ -58,11 +58,11 @@ export class InputRangeMinAndMaxRule {
58
58
  const startValue = Number(input[0]), endValue = Number(input[1]);
59
59
  if (this.minValue !== null &&
60
60
  ((input[0] !== '' && startValue < this.minValue) || (input[1] !== '' && endValue < this.minValue))) {
61
- return this.invalidResult(`The minimum input value is ${this.minValue}`);
61
+ return this.invalidResult({ key: 'The minimum input value is {0}', args: [this.minValue] });
62
62
  }
63
63
  if (this.maxValue !== null &&
64
64
  ((input[0] !== '' && startValue > this.maxValue) || (input[1] !== '' && endValue > this.maxValue))) {
65
- return this.invalidResult(`The maximum input value is ${this.maxValue}`);
65
+ return this.invalidResult({ key: 'The maximum input value is {0}', args: [this.maxValue] });
66
66
  }
67
67
  if (input[0] !== '' && input[1] !== '' && startValue > endValue) {
68
68
  return this.invalidResult(`The end value should be greater than the start value`);
@@ -8,7 +8,7 @@ export class InputRangeRequiredRule {
8
8
  * It checks if the input is a valid value.
9
9
  *
10
10
  * @param {string[]} input - The value of the input field.
11
- * @returns {EvaluateResult} An object with two properties: isValid and message.
11
+ * @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
12
12
  */
13
13
  evaluate(input) {
14
14
  if (!this.isAcceptedInputType(input)) {
@@ -19,7 +19,7 @@ export class MaxNumberRule {
19
19
  * If the input is a number, return true if it's less than or equal to the maximum value, false otherwise
20
20
  *
21
21
  * @param {unknown} input - The input value to be evaluated.
22
- * @returns {EvaluateResult} The result of the evaluation.
22
+ * @returns {EvaluateResultTranslation} The result of the evaluation.
23
23
  * @throws {Error} if input is unable to evaluate
24
24
  */
25
25
  evaluate(input) {
@@ -30,7 +30,9 @@ export class MaxNumberRule {
30
30
  const maxValue = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.maxValue) || Number.MAX_VALUE;
31
31
  return {
32
32
  isValid: convertToNumber(input) <= maxValue,
33
- message: convertToNumber(input) <= maxValue ? '' : `The maximum input value is ${maxValue}`,
33
+ message: convertToNumber(input) <= maxValue
34
+ ? ''
35
+ : { key: 'The maximum input value is {0}', args: [maxValue] },
34
36
  };
35
37
  }
36
38
  /**
@@ -18,7 +18,7 @@ export class MaxStringLengthRule {
18
18
  * It checks if the input is a string and if it's shorter than the maximum string length
19
19
  *
20
20
  * @param {string} input - string
21
- * @returns {EvaluateResult} An object with two properties: isValid and message.
21
+ * @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
22
22
  * @throws {Error} if input is unable to evaluate
23
23
  */
24
24
  evaluate(input) {
@@ -29,7 +29,9 @@ export class MaxStringLengthRule {
29
29
  const maxStrLength = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.maxStrLength) || Number.MAX_VALUE;
30
30
  return {
31
31
  isValid: input.length <= maxStrLength,
32
- message: input.length <= maxStrLength ? '' : `The maximum input length is ${maxStrLength}`,
32
+ message: input.length <= maxStrLength
33
+ ? ''
34
+ : { key: 'The maximum input length is {0}', args: [maxStrLength] },
33
35
  };
34
36
  }
35
37
  /**
@@ -15,15 +15,21 @@ export class MinAndMaxDateRule {
15
15
  * Evaluate if single date is within the min and max date range
16
16
  *
17
17
  * @param {string} input A single date string
18
- * @returns {EvaluateResult}An object with two properties: isValid and message.
18
+ * @returns {EvaluateResultTranslation}An object with two properties: isValid and message.
19
19
  */
20
20
  this.evaluateSingleDate = (input) => {
21
21
  const singleDate = new Date(input);
22
22
  if (this.minDate && compareIsBefore(singleDate, this.minDate)) {
23
- return this.invalidResult(`The date should be later than ${this.config.minDate}`);
23
+ return this.invalidResult({
24
+ key: 'The date should be later than {0}',
25
+ args: [this.config.minDate],
26
+ });
24
27
  }
25
28
  if (this.maxDate && compareIsAfter(singleDate, this.maxDate)) {
26
- return this.invalidResult(`The date should be earlier than ${this.config.maxDate}`);
29
+ return this.invalidResult({
30
+ key: 'The date should be earlier than {0}',
31
+ args: [this.config.maxDate],
32
+ });
27
33
  }
28
34
  return this.validResult();
29
35
  };
@@ -31,19 +37,28 @@ export class MinAndMaxDateRule {
31
37
  * Evaluate if start date or end date are within the min and max date range
32
38
  *
33
39
  * @param {string[]} input includes start date or end date
34
- * @returns {EvaluateResult}An object with two properties: isValid and message.
40
+ * @returns {EvaluateResultTranslation}An object with two properties: isValid and message.
35
41
  */
36
42
  this.evaluateRangeDates = (input) => {
37
43
  const startDate = new Date(input[0]);
38
44
  const endDate = new Date(input[1]);
39
45
  if (this.minDate && compareIsBefore(startDate, this.minDate)) {
40
- return this.invalidResult(`The start date should be later than ${this.config.minDate}`);
46
+ return this.invalidResult({
47
+ key: 'The start date should be later than {0}',
48
+ args: [this.config.minDate],
49
+ });
41
50
  }
42
51
  if (this.maxDate && compareIsAfter(startDate, this.maxDate)) {
43
- return this.invalidResult(`The start date should be earlier than ${this.config.maxDate}`);
52
+ return this.invalidResult({
53
+ key: 'The start date should be earlier than {0}',
54
+ args: [this.config.maxDate],
55
+ });
44
56
  }
45
57
  if (endDate && this.maxDate && compareIsAfter(endDate, this.maxDate)) {
46
- return this.invalidResult(`The end date should be earlier than ${this.config.maxDate}`);
58
+ return this.invalidResult({
59
+ key: 'The end date should be earlier than {0}',
60
+ args: [this.config.maxDate],
61
+ });
47
62
  }
48
63
  return this.validResult();
49
64
  };
@@ -51,7 +66,7 @@ export class MinAndMaxDateRule {
51
66
  * Generate an invalid result
52
67
  *
53
68
  * @param {string} message Error message
54
- * @returns {EvaluateResult} invalid validation result
69
+ * @returns {EvaluateResultTranslation} invalid validation result
55
70
  */
56
71
  this.invalidResult = (message) => ({
57
72
  isValid: false,
@@ -60,7 +75,7 @@ export class MinAndMaxDateRule {
60
75
  /**
61
76
  * Generate a valid result
62
77
  *
63
- * @returns {EvaluateResult} invalid validation result
78
+ * @returns {EvaluateResultTranslation} invalid validation result
64
79
  */
65
80
  this.validResult = () => ({
66
81
  isValid: true,
@@ -88,7 +103,7 @@ export class MinAndMaxDateRule {
88
103
  * max date range
89
104
  *
90
105
  * @param {string | string[]} input - The value of the date picker.
91
- * @returns {EvaluateResult} - The result of the evaluation.
106
+ * @returns {EvaluateResultTranslation} - The result of the evaluation.
92
107
  */
93
108
  evaluate(input) {
94
109
  if (!this.isAcceptedInputType(input)) {
@@ -19,7 +19,7 @@ export class MinNumberRule {
19
19
  * If the input is a number, return true if it's more than or equal to the minimum value, false otherwise
20
20
  *
21
21
  * @param {unknown} input - The input value to be evaluated.
22
- * @returns {EvaluateResult} The result of the evaluation.
22
+ * @returns {EvaluateResultTranslation} The result of the evaluation.
23
23
  * @throws {Error} if input is unable to evaluate
24
24
  */
25
25
  evaluate(input) {
@@ -30,7 +30,9 @@ export class MinNumberRule {
30
30
  const minValue = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.minValue) || 0;
31
31
  return {
32
32
  isValid: convertToNumber(input) >= minValue,
33
- message: convertToNumber(input) >= minValue ? '' : `The minimum input value is ${minValue}`,
33
+ message: convertToNumber(input) >= minValue
34
+ ? ''
35
+ : { key: 'The minimum input value is {0}', args: [minValue] },
34
36
  };
35
37
  }
36
38
  /**
@@ -18,7 +18,7 @@ export class MinStringLengthRule {
18
18
  * It checks if the input is a string and if it's longer than the minimum string length
19
19
  *
20
20
  * @param {string} input - string
21
- * @returns {EvaluateResult} An object with two properties: isValid and message.
21
+ * @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
22
22
  * @throws {Error} if input is unable to evaluate
23
23
  */
24
24
  evaluate(input) {
@@ -29,7 +29,12 @@ export class MinStringLengthRule {
29
29
  const minStrLength = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.minStrLength) || 0;
30
30
  return {
31
31
  isValid: input.length >= minStrLength,
32
- message: input.length >= minStrLength ? '' : `The minimum input length is ${minStrLength}`,
32
+ message: input.length >= minStrLength
33
+ ? ''
34
+ : {
35
+ key: 'The minimum input length is {0}',
36
+ args: [minStrLength],
37
+ },
33
38
  };
34
39
  }
35
40
  /**
@@ -17,7 +17,7 @@ export class RequiredFieldRule {
17
17
  * If the input is a number or a boolean, return true. If the input is a string, return true if the string is not empty
18
18
  *
19
19
  * @param {FormFieldValueType | Array<FormFieldValueType>} input - The input to be evaluated.
20
- * @returns {EvaluateResult} An object with two properties: isValid and message.
20
+ * @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
21
21
  */
22
22
  evaluate(input) {
23
23
  if (!this.isAcceptedInputType(input)) {
@@ -18,7 +18,7 @@ export class TimeRangeRequiredRule {
18
18
  * It checks if the input is a valid time string.
19
19
  *
20
20
  * @param {string} input - The value of the input field.
21
- * @returns {EvaluateResult} An object with two properties: isValid and message.
21
+ * @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
22
22
  */
23
23
  evaluate(input) {
24
24
  if (!this.isAcceptedInputType(input)) {
@@ -37,7 +37,7 @@ export class TimeRangeRule {
37
37
  * Check if the start time is before than end time
38
38
  *
39
39
  * @param {string | string[]} input - The value of the time picker.
40
- * @returns {EvaluateResult} - The result of the evaluation.
40
+ * @returns {EvaluateResultTranslation} - The result of the evaluation.
41
41
  */
42
42
  evaluate(input) {
43
43
  if (!this.isAcceptedInputType(input)) {
@@ -18,7 +18,7 @@ export class TimeRequiredRule {
18
18
  * It checks if the input is a valid time string.
19
19
  *
20
20
  * @param {string} input - The value of the input field.
21
- * @returns {EvaluateResult} An object with two properties: isValid and message.
21
+ * @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
22
22
  */
23
23
  evaluate(input) {
24
24
  if (!this.isAcceptedInputType(input)) {
@@ -11,7 +11,7 @@ export class ValidPhoneNumberRule {
11
11
  * Generate an invalid result
12
12
  *
13
13
  * @param {string} message Error message
14
- * @returns {EvaluateResult} invalid validation result
14
+ * @returns {EvaluateResultTranslation['message']} invalid validation result
15
15
  */
16
16
  this.invalidResult = (message) => ({
17
17
  isValid: false,
@@ -20,7 +20,7 @@ export class ValidPhoneNumberRule {
20
20
  /**
21
21
  * Generate a valid result
22
22
  *
23
- * @returns {EvaluateResult} invalid validation result
23
+ * @returns {EvaluateResultTranslation} invalid validation result
24
24
  */
25
25
  this.validResult = () => ({
26
26
  isValid: true,
@@ -31,7 +31,7 @@ export class ValidPhoneNumberRule {
31
31
  * It checks if the phone number is valid.
32
32
  *
33
33
  * @param {string} input - The input value to be evaluated.
34
- * @returns {EvaluateResult} an object with two properties: isValid and message.
34
+ * @returns {EvaluateResultTranslation} an object with two properties: isValid and message.
35
35
  */
36
36
  evaluate(input) {
37
37
  return this.isValidPhoneNumberForCountry(input, this.countryCodeGetter());
@@ -79,7 +79,7 @@ export class ValidPhoneNumberRule {
79
79
  * function is of type `VegaCountryCode`. It is used to specify the country for which the phone number
80
80
  * should be validated. The function attempts to parse the input phone number with the specified
81
81
  * country code and performs validation checks to determine if the
82
- * @returns {EvaluateResult} The `isValidPhoneNumberForCountry` function returns an `EvaluateResult` object. This object
82
+ * @returns {EvaluateResultTranslation} The `isValidPhoneNumberForCountry` function returns an `EvaluateResult` object. This object
83
83
  * contains information about whether the phone number provided is valid for the specified country
84
84
  * code. The function may return a valid result if the phone number is valid for the country code, an
85
85
  * invalid result if the phone number is not valid or does not belong to the specified country, or an
@@ -94,7 +94,10 @@ export class ValidPhoneNumberRule {
94
94
  extract: false,
95
95
  });
96
96
  if (phoneNumber.country && phoneNumber.country !== countryCode) {
97
- return this.invalidResult(`Phone number is valid but it belongs to country ${phoneNumber.country}, not country ${countryCode}`);
97
+ return this.invalidResult({
98
+ key: 'Phone number is valid but it belongs to country {0}, not country {1}',
99
+ args: [phoneNumber.country, countryCode],
100
+ });
98
101
  }
99
102
  if (!phoneNumber.isValid()) {
100
103
  return this.invalidResult(`Phone number is not valid`);