@globalpayments/vega 2.70.0 → 2.72.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 (488) hide show
  1. package/dist/cjs/{app-globals-837be7a6.js → app-globals-c6be6013.js} +8 -7
  2. package/dist/cjs/{child-nodes-event-prevent-slimmer-f8840f1b.js → child-nodes-event-prevent-slimmer-871855df.js} +1 -1
  3. package/dist/cjs/{code-block-bb4cbafa.js → code-block-a7c8825f.js} +14 -66
  4. package/dist/cjs/{component-value-history-controller-slimmer.abstract-cf7b4bda.js → component-value-history-controller-slimmer.abstract-868de3c4.js} +5 -5
  5. package/dist/cjs/{date-required-rule-4e1f84fd.js → date-required-rule-99cca681.js} +3 -3
  6. package/dist/cjs/{design-token-00fe8d2f.js → design-token-d9c4dff6.js} +6 -7
  7. package/dist/cjs/{dom-node-subject-observer-factory-f040608b.js → dom-node-subject-observer-factory-1c8f7880.js} +5 -1
  8. package/dist/cjs/{dto-renderer-manager-c917dade.js → dto-renderer-manager-f3820a6b.js} +4 -4
  9. package/dist/cjs/{element-appender-slimmer-f8e89f37.js → element-appender-slimmer-3dc36dfa.js} +49 -11
  10. package/dist/cjs/{event-emit-slimmer-7afe8d78.js → event-emit-slimmer-f7255138.js} +2 -2
  11. package/dist/cjs/{form-field-controller-slimmer-f865d397.js → form-field-controller-slimmer-57525f26.js} +3 -3
  12. package/dist/cjs/{function-extension-28a4d781.js → function-extension-d4fc3b7a.js} +40 -19
  13. package/dist/cjs/{image-annotation-action-8843adbf.js → image-annotation-action-64414e40.js} +3 -3
  14. package/dist/cjs/{index-4b896e76.js → index-c7fbf32b.js} +2 -2
  15. package/dist/cjs/index.cjs.js +17 -19
  16. package/dist/cjs/{inject-keyboard-manager-13c66257.js → inject-keyboard-manager-a6101379.js} +1 -1
  17. package/dist/cjs/{internal-vega-event-manager-45d451de.js → internal-vega-event-manager-0e1ba774.js} +3 -2
  18. package/dist/cjs/{keyboard-manager-af0d08a6.js → keyboard-manager-d8adb0ed.js} +1 -1
  19. package/dist/cjs/{keyboard-manager-slimmer-62f072cd.js → keyboard-manager-slimmer-15e65357.js} +1 -1
  20. package/dist/cjs/{language-extension-99c6fb40.js → language-extension-d23e5369.js} +2 -2
  21. package/dist/cjs/loader.cjs.js +13 -13
  22. package/dist/cjs/month-view-generator-706c5477.js +102 -0
  23. package/dist/cjs/{public-rules-759c745b.js → public-rules-0847e6fa.js} +15 -15
  24. package/dist/cjs/{range-0b597850.js → range-14190f6b.js} +1 -1
  25. package/dist/cjs/{responsive-format-facade-1d9c13a9.js → responsive-format-facade-77d357fb.js} +4 -4
  26. package/dist/cjs/{rich-text-editor-required-rule-92d0640e.js → rich-text-editor-required-rule-65d85060.js} +1 -1
  27. package/dist/cjs/{string-format-strategy.abstract-07a95352.js → string-format-strategy.abstract-a8264fca.js} +1 -1
  28. package/dist/cjs/{string-input-formatter-slimmer-8236b5e1.js → string-input-formatter-slimmer-4332d1c7.js} +4 -4
  29. package/dist/cjs/{string-mask-strategy-6bdad95e.js → string-mask-strategy-4e7d3780.js} +2 -2
  30. package/dist/cjs/{style-formatter-1daa8371.js → style-formatter-4fd65f6f.js} +2 -2
  31. package/dist/cjs/{sub-state-notify-slimmer-78682046.js → sub-state-notify-slimmer-9fe1ab65.js} +2 -2
  32. package/dist/cjs/{sub-state-observer-slimmer-73aecfff.js → sub-state-observer-slimmer-2f6f4d28.js} +2 -2
  33. package/dist/cjs/{time-required-rule-ccf178e7.js → time-required-rule-9d39a620.js} +3 -3
  34. package/dist/cjs/{type-guard-f12b5bae.js → type-guard-69d2cf01.js} +1224 -1
  35. package/dist/cjs/{valid-credit-card-number-rule-ce5c9147.js → valid-credit-card-number-rule-9f40d1d9.js} +1 -1
  36. package/dist/cjs/vega-accordion.cjs.entry.js +11 -12
  37. package/dist/cjs/vega-app-header-button.cjs.entry.js +16 -17
  38. package/dist/cjs/vega-banner.cjs.entry.js +3 -3
  39. package/dist/cjs/vega-box.cjs.entry.js +15 -16
  40. package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
  41. package/dist/cjs/vega-button-circle.cjs.entry.js +15 -16
  42. package/dist/cjs/vega-button-group_2.cjs.entry.js +60 -10
  43. package/dist/cjs/vega-button-link.cjs.entry.js +5 -5
  44. package/dist/cjs/vega-button.cjs.entry.js +15 -15
  45. package/dist/cjs/vega-calendar_4.cjs.entry.js +87 -909
  46. package/dist/cjs/vega-card.cjs.entry.js +14 -15
  47. package/dist/cjs/vega-carousel.cjs.entry.js +14 -14
  48. package/dist/cjs/vega-checkbox_2.cjs.entry.js +7 -7
  49. package/dist/cjs/vega-chip.cjs.entry.js +16 -17
  50. package/dist/cjs/vega-code-block.cjs.entry.js +13 -13
  51. package/dist/cjs/vega-color-picker.cjs.entry.js +6 -6
  52. package/dist/cjs/vega-combo-box.cjs.entry.js +13 -13
  53. package/dist/cjs/vega-date-picker_2.cjs.entry.js +1757 -1568
  54. package/dist/cjs/vega-dialog_2.cjs.entry.js +17 -18
  55. package/dist/cjs/vega-divider.cjs.entry.js +10 -11
  56. package/dist/cjs/vega-dropdown_5.cjs.entry.js +18 -29
  57. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  58. package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
  59. package/dist/cjs/vega-file-uploader.cjs.entry.js +6 -6
  60. package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -11
  61. package/dist/cjs/vega-flex.cjs.entry.js +15 -16
  62. package/dist/cjs/vega-font.cjs.entry.js +14 -15
  63. package/dist/cjs/vega-form.cjs.entry.js +9 -9
  64. package/dist/cjs/vega-grid.cjs.entry.js +14 -15
  65. package/dist/cjs/vega-icon.cjs.entry.js +14 -15
  66. package/dist/cjs/vega-image-uploader.cjs.entry.js +15 -15
  67. package/dist/cjs/vega-input-credit-card.cjs.entry.js +14 -14
  68. package/dist/cjs/vega-input-numeric.cjs.entry.js +13 -13
  69. package/dist/cjs/vega-input-passcode.cjs.entry.js +16 -13
  70. package/dist/cjs/vega-input-phone-number.cjs.entry.js +13 -13
  71. package/dist/cjs/vega-input-range.cjs.entry.js +7 -7
  72. package/dist/cjs/vega-input-select.cjs.entry.js +13 -13
  73. package/dist/cjs/vega-input.cjs.entry.js +12 -12
  74. package/dist/cjs/{vega-internal-event-id-6d4a2c53.js → vega-internal-event-id-a5ef414b.js} +6 -4
  75. package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
  76. package/dist/cjs/vega-left-nav_5.cjs.entry.js +14 -15
  77. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +9 -9
  78. package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
  79. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +4 -4
  80. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
  81. package/dist/cjs/vega-pagination.cjs.entry.js +13 -13
  82. package/dist/cjs/vega-popover_2.cjs.entry.js +17 -18
  83. package/dist/cjs/vega-progress-tracker.cjs.entry.js +313 -73
  84. package/dist/cjs/vega-radio_2.cjs.entry.js +10 -10
  85. package/dist/cjs/vega-rich-text-content.cjs.entry.js +9 -8
  86. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +19 -19
  87. package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
  88. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +16 -16
  89. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +8 -8
  90. package/dist/cjs/vega-sidenav_3.cjs.entry.js +12 -12
  91. package/dist/cjs/vega-signature-capture.cjs.entry.js +13 -14
  92. package/dist/cjs/vega-stepper.cjs.entry.js +7 -7
  93. package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
  94. package/dist/cjs/vega-table_11.cjs.entry.js +12 -12
  95. package/dist/cjs/vega-textarea.cjs.entry.js +7 -7
  96. package/dist/cjs/vega-time-picker_2.cjs.entry.js +38 -39
  97. package/dist/cjs/vega-toggle-switch.cjs.entry.js +6 -6
  98. package/dist/cjs/vega-tooltip_2.cjs.entry.js +14 -14
  99. package/dist/cjs/vega.cjs.js +13 -13
  100. package/dist/collection/components/vega-button/vega-button.css +4 -0
  101. package/dist/collection/components/vega-button-group/vega-button-group-item/slimmers/controllers/vega-button-group-item-sub-state-controller.js +7 -0
  102. package/dist/collection/components/vega-button-group/vega-button-group-item/slimmers/renderers/vega-button-group-item-renderer.js +25 -2
  103. package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.js +31 -2
  104. package/dist/collection/components/vega-button-group/vega-button-group.js +37 -0
  105. package/dist/collection/components/vega-button-link/vega-button-link.css +4 -0
  106. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-open-state-controller.js +149 -0
  107. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-format-controller.js +3 -1
  108. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-keyboard-controller.js +1 -1
  109. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-value-controller.js +10 -26
  110. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +107 -445
  111. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-input-renderer-base.abstract.js +5 -1
  112. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-range-input-renderer.js +24 -17
  113. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-renderer.js +15 -20
  114. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-single-input-renderer.js +6 -17
  115. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/constants.js +14 -0
  116. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/dto/calendar-selection.js +126 -0
  117. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-allow-repick-controller.js +70 -0
  118. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-current-period-controller.js +204 -0
  119. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-min-max-date-controller.js +56 -0
  120. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-selection-controller.js +191 -0
  121. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-state-base.abstract.js +54 -0
  122. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-today-controller.js +37 -0
  123. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.js +76 -0
  124. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.js +192 -0
  125. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +168 -0
  126. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +669 -278
  127. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +667 -3
  128. package/dist/collection/components/vega-date-picker/vega-date-picker.css +0 -11
  129. package/dist/collection/components/vega-date-picker/vega-date-picker.js +23 -40
  130. package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
  131. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.js +3 -15
  132. package/dist/collection/components/vega-input/vega-input.js +21 -1
  133. package/dist/collection/components/vega-input-passcode/slimmers/renderers/vega-input-passcode-renderer.js +4 -1
  134. package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
  135. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.js +3 -2
  136. package/dist/collection/components/vega-modal/vega-modal.js +4 -4
  137. package/dist/collection/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-step-controller.js +154 -0
  138. package/dist/collection/components/vega-progress-tracker/slimmers/renderers/vega-progress-tracker-renderer.js +101 -0
  139. package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.css +68 -77
  140. package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +71 -86
  141. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-annotation.js +11 -63
  142. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/insert-token-node-strategy.js +5 -1
  143. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/span-to-token-node-strategy.js +12 -1
  144. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-node-renderer.js +16 -10
  145. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-node.js +1 -1
  146. package/dist/collection/components/vega-rich-text-editor/test/dto/annotation-style.test.js +2 -1
  147. package/dist/collection/components/vega-rich-text-editor/test/dto/annotations.test.js +9 -0
  148. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/text-block.test.js +1 -1
  149. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +15 -15
  150. package/dist/collection/constants/regex.js +1 -0
  151. package/dist/collection/constants/ui.js +3 -0
  152. package/dist/collection/helpers/calendar/calendar-date.js +273 -1
  153. package/dist/collection/helpers/calendar/calendar-period/calendar-period.abstract.js +9 -0
  154. package/dist/collection/helpers/calendar/calendar-period/month-period.js +16 -4
  155. package/dist/collection/helpers/calendar/test/calendar-date.test.js +73 -0
  156. package/dist/collection/helpers/calendar/test/calendar-period/day-period.test.js +9 -0
  157. package/dist/collection/helpers/calendar/test/calendar-period/month-period.test.js +41 -0
  158. package/dist/collection/helpers/calendar/test/calendar-period/week-period.test.js +11 -0
  159. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +3 -2
  160. package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +3 -1
  161. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +5 -2
  162. package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +2 -1
  163. package/dist/collection/helpers/slimmers/position-calculation/position-calculation-controller.js +7 -0
  164. package/dist/collection/helpers/ui/element-appender.js +35 -5
  165. package/dist/collection/types/type-guard.js +10 -0
  166. package/dist/collection/utils/date.js +14 -3
  167. package/dist/collection/utils/e2e-utils.js +8 -2
  168. package/dist/collection/utils/test/date.test.js +2 -0
  169. package/dist/esm/{app-globals-fd4b7d97.js → app-globals-3d7e8bad.js} +8 -7
  170. package/dist/esm/{child-nodes-event-prevent-slimmer-76331524.js → child-nodes-event-prevent-slimmer-6f7ae2c7.js} +1 -1
  171. package/dist/esm/{code-block-ecb4491b.js → code-block-8fb548ff.js} +15 -67
  172. package/dist/esm/{component-value-history-controller-slimmer.abstract-5d618b88.js → component-value-history-controller-slimmer.abstract-05f3ff05.js} +5 -5
  173. package/dist/esm/{date-required-rule-8944f3bf.js → date-required-rule-a9980386.js} +1 -1
  174. package/dist/esm/{design-token-2d77e8f5.js → design-token-ee017ea0.js} +4 -5
  175. package/dist/esm/{dom-node-subject-observer-factory-dca87b70.js → dom-node-subject-observer-factory-479cc5ef.js} +4 -2
  176. package/dist/esm/{dto-renderer-manager-d862ae78.js → dto-renderer-manager-d185c7ba.js} +4 -4
  177. package/dist/esm/{element-appender-slimmer-6791c332.js → element-appender-slimmer-00bc1a3c.js} +51 -13
  178. package/dist/esm/{event-emit-slimmer-4e28e9f8.js → event-emit-slimmer-76fbfe1f.js} +2 -2
  179. package/dist/esm/{form-field-controller-slimmer-bf071b75.js → form-field-controller-slimmer-14379261.js} +4 -4
  180. package/dist/esm/{function-extension-8d39db56.js → function-extension-3f886d01.js} +41 -20
  181. package/dist/esm/{image-annotation-action-d0af138c.js → image-annotation-action-3ce95526.js} +3 -3
  182. package/dist/esm/{index-c943d263.js → index-03a016ed.js} +2 -2
  183. package/dist/esm/index.js +19 -21
  184. package/dist/esm/{inject-keyboard-manager-ffd351b9.js → inject-keyboard-manager-9241968c.js} +1 -1
  185. package/dist/esm/{internal-vega-event-manager-516aa721.js → internal-vega-event-manager-e44672ed.js} +3 -2
  186. package/dist/esm/{keyboard-manager-5d8f3582.js → keyboard-manager-89acac79.js} +1 -1
  187. package/dist/esm/{keyboard-manager-slimmer-f39214e4.js → keyboard-manager-slimmer-e303cb7d.js} +1 -1
  188. package/dist/esm/{language-extension-8f51f5ff.js → language-extension-36c79ea1.js} +2 -2
  189. package/dist/esm/loader.js +15 -15
  190. package/dist/esm/month-view-generator-4bec99fd.js +98 -0
  191. package/dist/esm/{page-resize-observer-slimmer-0bf7fbf3.js → page-resize-observer-slimmer-8744cb44.js} +1 -1
  192. package/dist/esm/{public-rules-d10e76f4.js → public-rules-0f5a36c2.js} +15 -15
  193. package/dist/esm/{range-f7b9e2fb.js → range-f10f4c85.js} +1 -1
  194. package/dist/esm/{responsive-format-facade-267935ae.js → responsive-format-facade-6df7d17a.js} +6 -6
  195. package/dist/esm/{rich-text-editor-required-rule-774b822b.js → rich-text-editor-required-rule-d0cde24f.js} +1 -1
  196. package/dist/esm/{string-format-strategy.abstract-452f4398.js → string-format-strategy.abstract-75540c16.js} +1 -1
  197. package/dist/esm/{string-input-formatter-slimmer-3acd240c.js → string-input-formatter-slimmer-af085f0a.js} +4 -4
  198. package/dist/esm/{string-mask-strategy-6232a1c1.js → string-mask-strategy-4a18ed1a.js} +2 -2
  199. package/dist/esm/{style-formatter-3f88c491.js → style-formatter-e6879600.js} +2 -2
  200. package/dist/esm/{sub-state-notify-slimmer-56380f02.js → sub-state-notify-slimmer-430e150c.js} +2 -2
  201. package/dist/esm/{sub-state-observer-slimmer-3504e2f2.js → sub-state-observer-slimmer-17bb0328.js} +2 -2
  202. package/dist/esm/{time-required-rule-a01163b5.js → time-required-rule-8ec1faf5.js} +1 -1
  203. package/dist/esm/{type-guard-12f7654b.js → type-guard-b48aec98.js} +1204 -2
  204. package/dist/esm/{ui-8424715a.js → ui-28fd4193.js} +1 -1
  205. package/dist/esm/{valid-credit-card-number-rule-81443274.js → valid-credit-card-number-rule-96eaf9b1.js} +1 -1
  206. package/dist/esm/vega-accordion.entry.js +13 -14
  207. package/dist/esm/vega-app-header-button.entry.js +18 -19
  208. package/dist/esm/vega-banner.entry.js +3 -3
  209. package/dist/esm/vega-box.entry.js +17 -18
  210. package/dist/esm/vega-breadcrumb.entry.js +4 -4
  211. package/dist/esm/vega-button-circle.entry.js +17 -18
  212. package/dist/esm/vega-button-group_2.entry.js +60 -10
  213. package/dist/esm/vega-button-link.entry.js +5 -5
  214. package/dist/esm/vega-button.entry.js +17 -17
  215. package/dist/esm/vega-calendar_4.entry.js +46 -868
  216. package/dist/esm/vega-card.entry.js +16 -17
  217. package/dist/esm/vega-carousel.entry.js +16 -16
  218. package/dist/esm/vega-checkbox_2.entry.js +9 -9
  219. package/dist/esm/vega-chip.entry.js +18 -19
  220. package/dist/esm/vega-code-block.entry.js +14 -14
  221. package/dist/esm/vega-color-picker.entry.js +8 -8
  222. package/dist/esm/vega-combo-box.entry.js +15 -15
  223. package/dist/esm/vega-date-picker_2.entry.js +1744 -1555
  224. package/dist/esm/vega-dialog_2.entry.js +19 -20
  225. package/dist/esm/vega-divider.entry.js +12 -13
  226. package/dist/esm/vega-dropdown_5.entry.js +20 -31
  227. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  228. package/dist/esm/vega-field-label.entry.js +3 -3
  229. package/dist/esm/vega-file-uploader.entry.js +8 -8
  230. package/dist/esm/vega-flag-icon.entry.js +12 -13
  231. package/dist/esm/vega-flex.entry.js +17 -18
  232. package/dist/esm/vega-font.entry.js +16 -17
  233. package/dist/esm/vega-form.entry.js +11 -11
  234. package/dist/esm/vega-grid.entry.js +16 -17
  235. package/dist/esm/vega-icon.entry.js +16 -17
  236. package/dist/esm/vega-image-uploader.entry.js +17 -17
  237. package/dist/esm/vega-input-credit-card.entry.js +16 -16
  238. package/dist/esm/vega-input-numeric.entry.js +15 -15
  239. package/dist/esm/vega-input-passcode.entry.js +18 -15
  240. package/dist/esm/vega-input-phone-number.entry.js +15 -15
  241. package/dist/esm/vega-input-range.entry.js +9 -9
  242. package/dist/esm/vega-input-select.entry.js +15 -15
  243. package/dist/esm/vega-input.entry.js +14 -14
  244. package/dist/esm/{vega-internal-event-id-5c3e5f7f.js → vega-internal-event-id-71c67c39.js} +4 -3
  245. package/dist/esm/vega-item-toggle.entry.js +4 -4
  246. package/dist/esm/vega-left-nav_5.entry.js +16 -17
  247. package/dist/esm/vega-loader-wrapper_2.entry.js +11 -11
  248. package/dist/esm/vega-page-notification_2.entry.js +1 -1
  249. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +4 -4
  250. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
  251. package/dist/esm/vega-pagination.entry.js +15 -15
  252. package/dist/esm/vega-popover_2.entry.js +19 -20
  253. package/dist/esm/vega-progress-tracker.entry.js +315 -75
  254. package/dist/esm/vega-radio_2.entry.js +12 -12
  255. package/dist/esm/vega-rich-text-content.entry.js +10 -9
  256. package/dist/esm/vega-rich-text-editor_4.entry.js +21 -21
  257. package/dist/esm/vega-segment-control.entry.js +5 -5
  258. package/dist/esm/vega-selection-chip_2.entry.js +18 -18
  259. package/dist/esm/vega-selection-tile_2.entry.js +10 -10
  260. package/dist/esm/vega-sidenav_3.entry.js +14 -14
  261. package/dist/esm/vega-signature-capture.entry.js +15 -16
  262. package/dist/esm/vega-stepper.entry.js +9 -9
  263. package/dist/esm/vega-tab-group_2.entry.js +6 -6
  264. package/dist/esm/vega-table_11.entry.js +14 -14
  265. package/dist/esm/vega-text.entry.js +2 -2
  266. package/dist/esm/vega-textarea.entry.js +9 -9
  267. package/dist/esm/vega-time-picker_2.entry.js +19 -20
  268. package/dist/esm/vega-toggle-switch.entry.js +8 -8
  269. package/dist/esm/vega-tooltip_2.entry.js +16 -16
  270. package/dist/esm/vega.js +15 -15
  271. package/dist/sri/vega-sri-manifest.json +333 -341
  272. package/dist/types/components/vega-button-group/types.d.ts +2 -1
  273. package/dist/types/components/vega-button-group/vega-button-group-item/slimmers/controllers/vega-button-group-item-sub-state-controller.d.ts +1 -0
  274. package/dist/types/components/vega-button-group/vega-button-group-item/slimmers/renderers/vega-button-group-item-renderer.d.ts +11 -0
  275. package/dist/types/components/vega-button-group/vega-button-group-item/vega-button-group-item.d.ts +7 -0
  276. package/dist/types/components/vega-button-group/vega-button-group.d.ts +8 -0
  277. package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-open-state-controller.d.ts +60 -0
  278. package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-value-controller.d.ts +3 -4
  279. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +29 -124
  280. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-input-renderer-base.abstract.d.ts +1 -0
  281. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-range-input-renderer.d.ts +5 -5
  282. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-renderer.d.ts +2 -3
  283. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-single-input-renderer.d.ts +1 -4
  284. package/dist/types/components/vega-date-picker/types.d.ts +9 -0
  285. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/constants.d.ts +1 -0
  286. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/dto/calendar-selection.d.ts +62 -0
  287. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-allow-repick-controller.d.ts +31 -0
  288. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-current-period-controller.d.ts +78 -0
  289. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-min-max-date-controller.d.ts +20 -0
  290. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-selection-controller.d.ts +75 -0
  291. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-state-base.abstract.d.ts +29 -0
  292. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-today-controller.d.ts +15 -0
  293. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +18 -0
  294. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.d.ts +40 -0
  295. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +32 -0
  296. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +182 -0
  297. package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +6 -14
  298. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.d.ts +0 -4
  299. package/dist/types/components/vega-input/vega-input.d.ts +7 -0
  300. package/dist/types/components/vega-input-passcode/slimmers/renderers/vega-input-passcode-renderer.d.ts +1 -0
  301. package/dist/types/components/vega-modal/vega-modal.d.ts +7 -1
  302. package/dist/types/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-step-controller.d.ts +65 -0
  303. package/dist/types/components/vega-progress-tracker/slimmers/renderers/vega-progress-tracker-renderer.d.ts +19 -0
  304. package/dist/types/components/vega-progress-tracker/type.d.ts +1 -0
  305. package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +14 -10
  306. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-annotation.d.ts +7 -0
  307. package/dist/types/components/vega-rich-text-editor/extensions/tokens/span-to-token-node-strategy.d.ts +7 -0
  308. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-extension.d.ts +1 -1
  309. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-node-renderer.d.ts +7 -0
  310. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-toolbar-button-renderer.d.ts +2 -2
  311. package/dist/types/components/vega-rich-text-editor/interface.d.ts +6 -1
  312. package/dist/types/components.d.ts +211 -9
  313. package/dist/types/constants/regex.d.ts +1 -0
  314. package/dist/types/constants/ui.d.ts +1 -1
  315. package/dist/types/helpers/calendar/calendar-date.d.ts +86 -2
  316. package/dist/types/helpers/calendar/calendar-period/calendar-period.abstract.d.ts +7 -0
  317. package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +3 -1
  318. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +5 -2
  319. package/dist/types/helpers/ui/element-appender.d.ts +14 -0
  320. package/dist/types/types/components.type.d.ts +4 -0
  321. package/dist/types/types/type-guard.d.ts +8 -0
  322. package/dist/types/utils/date.d.ts +11 -2
  323. package/dist/types/utils/e2e-utils.d.ts +7 -0
  324. package/dist/vega/index.esm.js +1 -1
  325. package/dist/vega/{p-7c1d08db.entry.js → p-06ab90c4.entry.js} +1 -1
  326. package/dist/vega/{p-58769a72.entry.js → p-09cd025a.entry.js} +1 -1
  327. package/dist/vega/p-0b696b0e.entry.js +1 -0
  328. package/dist/vega/{p-9e59345f.entry.js → p-0f5453a7.entry.js} +1 -1
  329. package/dist/vega/{p-7d9cd9c8.js → p-10ac8b57.js} +1 -1
  330. package/dist/vega/p-154f39e4.entry.js +1 -0
  331. package/dist/vega/p-161b9c5b.js +1 -0
  332. package/dist/vega/p-169b7252.entry.js +1 -0
  333. package/dist/vega/{p-1f26de89.js → p-17f3897a.js} +1 -1
  334. package/dist/vega/p-1832e051.js +1 -0
  335. package/dist/vega/p-19728819.js +1 -0
  336. package/dist/vega/{p-a6010b93.entry.js → p-1e0d8228.entry.js} +1 -1
  337. package/dist/vega/p-207cfa6a.js +1 -0
  338. package/dist/vega/{p-61d9cdf9.entry.js → p-213310e1.entry.js} +1 -1
  339. package/dist/vega/p-27e641a0.entry.js +1 -0
  340. package/dist/vega/p-2872565e.js +1 -0
  341. package/dist/vega/{p-b5ba0c11.js → p-294b0b76.js} +1 -1
  342. package/dist/vega/p-2c744c20.js +1 -0
  343. package/dist/vega/{p-ea96635b.entry.js → p-314bf1d5.entry.js} +1 -1
  344. package/dist/vega/{p-366825fa.entry.js → p-34f624d6.entry.js} +1 -1
  345. package/dist/vega/p-39b8dda9.entry.js +1 -0
  346. package/dist/vega/p-3af9421b.entry.js +1 -0
  347. package/dist/vega/{p-1bb0c934.js → p-3d128c07.js} +1 -1
  348. package/dist/vega/{p-19522949.js → p-3d85411d.js} +1 -1
  349. package/dist/vega/{p-69aec6af.entry.js → p-3eb0d55c.entry.js} +1 -1
  350. package/dist/vega/{p-8c6b6ad7.entry.js → p-3fbfffa1.entry.js} +1 -1
  351. package/dist/vega/{p-74168615.js → p-40f39194.js} +1 -1
  352. package/dist/vega/{p-db57dddc.js → p-41026b90.js} +1 -1
  353. package/dist/vega/{p-0f7dec29.entry.js → p-4cc49d2b.entry.js} +1 -1
  354. package/dist/vega/{p-54e56f0d.entry.js → p-4ea28b2b.entry.js} +1 -1
  355. package/dist/vega/{p-c6ae78f2.entry.js → p-4f56da1d.entry.js} +1 -1
  356. package/dist/vega/{p-91d71ae9.entry.js → p-563b67a0.entry.js} +1 -1
  357. package/dist/vega/p-59e02528.js +1 -0
  358. package/dist/vega/p-5ac6bf4e.entry.js +1 -0
  359. package/dist/vega/p-5c379abd.entry.js +1 -0
  360. package/dist/vega/{p-b9798158.js → p-5c71a548.js} +1 -1
  361. package/dist/vega/p-5f377954.js +1 -1
  362. package/dist/vega/p-5fdbff48.js +1 -0
  363. package/dist/vega/{p-35cd469a.entry.js → p-62e45daf.entry.js} +1 -1
  364. package/dist/vega/{p-bfb86c3e.entry.js → p-65749591.entry.js} +1 -1
  365. package/dist/vega/{p-71f9c4d4.js → p-6c1ef2ed.js} +1 -1
  366. package/dist/vega/p-6ee95368.entry.js +1 -0
  367. package/dist/vega/{p-fde50319.js → p-707d542e.js} +1 -1
  368. package/dist/vega/{p-75b5894f.entry.js → p-7089cafe.entry.js} +1 -1
  369. package/dist/vega/{p-b27fcac4.entry.js → p-74f3516e.entry.js} +1 -1
  370. package/dist/vega/p-7a5b3ad3.entry.js +1 -0
  371. package/dist/vega/{p-652626b6.entry.js → p-7c22e766.entry.js} +1 -1
  372. package/dist/vega/{p-5e708ad5.entry.js → p-8233c5b6.entry.js} +1 -1
  373. package/dist/vega/p-82bd84f9.js +1 -0
  374. package/dist/vega/{p-235bf01b.entry.js → p-86b1e8dd.entry.js} +1 -1
  375. package/dist/vega/p-87960572.entry.js +1 -0
  376. package/dist/vega/{p-2f09c6aa.js → p-883192ed.js} +1 -1
  377. package/dist/vega/p-8c5acc0b.entry.js +1 -0
  378. package/dist/vega/{p-cbabb07a.entry.js → p-94a58223.entry.js} +1 -1
  379. package/dist/vega/p-95059e57.entry.js +1 -0
  380. package/dist/vega/p-990b11a7.entry.js +1 -0
  381. package/dist/vega/p-9a83a6b0.js +1 -0
  382. package/dist/vega/p-a23f6ed1.entry.js +1 -0
  383. package/dist/vega/{p-924b4e24.js → p-a4ec6575.js} +1 -1
  384. package/dist/vega/{p-379f1b40.entry.js → p-a7633138.entry.js} +1 -1
  385. package/dist/vega/{p-3925c16b.js → p-a8dad05d.js} +1 -1
  386. package/dist/vega/p-a9268981.entry.js +1 -0
  387. package/dist/vega/p-afb834d8.js +1 -0
  388. package/dist/vega/p-b05ec86a.entry.js +1 -0
  389. package/dist/vega/{p-98fb9eaa.entry.js → p-b1ad3107.entry.js} +1 -1
  390. package/dist/vega/{p-4a467973.js → p-b2eea369.js} +1 -1
  391. package/dist/vega/{p-796d840c.entry.js → p-b3d29c1e.entry.js} +1 -1
  392. package/dist/vega/{p-c2f21426.entry.js → p-b6c92e7a.entry.js} +1 -1
  393. package/dist/vega/{p-447c7590.js → p-b842f649.js} +1 -1
  394. package/dist/vega/{p-35252108.js → p-b8a7a54b.js} +1 -1
  395. package/dist/vega/{p-330c224f.entry.js → p-b96b7f33.entry.js} +1 -1
  396. package/dist/vega/p-bc1cbd6c.js +1 -0
  397. package/dist/vega/p-bc7df5e7.entry.js +1 -0
  398. package/dist/vega/p-bca97027.entry.js +1 -0
  399. package/dist/vega/p-beed225e.entry.js +1 -0
  400. package/dist/vega/p-c1db0a81.entry.js +1 -0
  401. package/dist/vega/{p-c0223a17.entry.js → p-c4b010be.entry.js} +1 -1
  402. package/dist/vega/{p-18e8c54a.entry.js → p-c4b30117.entry.js} +1 -1
  403. package/dist/vega/p-c5cf9a89.entry.js +1 -0
  404. package/dist/vega/{p-a0467b83.js → p-cb7211c3.js} +1 -1
  405. package/dist/vega/p-cb72ebb5.js +1 -0
  406. package/dist/vega/{p-3c865f86.entry.js → p-cbefc113.entry.js} +1 -1
  407. package/dist/vega/{p-8fae8f9e.js → p-d1d0f08a.js} +1 -1
  408. package/dist/vega/{p-52efaadb.entry.js → p-d4413277.entry.js} +1 -1
  409. package/dist/vega/p-d991fb11.js +1 -0
  410. package/dist/vega/{p-9ce249a9.js → p-de70aac1.js} +1 -1
  411. package/dist/vega/{p-e6351dab.entry.js → p-e1e306c3.entry.js} +1 -1
  412. package/dist/vega/p-e49c6368.js +1 -0
  413. package/dist/vega/{p-de97c6d9.js → p-e8d0e71c.js} +1 -1
  414. package/dist/vega/p-e9838fb4.entry.js +1 -0
  415. package/dist/vega/p-ea0b6e85.entry.js +1 -0
  416. package/dist/vega/p-ec412511.entry.js +1 -0
  417. package/dist/vega/{p-3e040167.entry.js → p-ec4c21d1.entry.js} +1 -1
  418. package/dist/vega/{p-85f9a980.js → p-eebe9176.js} +1 -1
  419. package/dist/vega/{p-7b42da4f.entry.js → p-efa4ee14.entry.js} +1 -1
  420. package/dist/vega/p-f9facf79.entry.js +1 -0
  421. package/dist/vega/{p-dde03224.entry.js → p-fa63b926.entry.js} +1 -1
  422. package/dist/vega/p-fc6fca08.entry.js +1 -0
  423. package/dist/vega/p-fcb3ff5b.entry.js +1 -0
  424. package/dist/vega/vega.esm.js +1 -1
  425. package/package.json +1 -2
  426. package/dist/cjs/date-0a6bb035.js +0 -95
  427. package/dist/cjs/mobilefriendly-aa2e50e9.js +0 -13
  428. package/dist/cjs/state-background-color-formatter-aa5570f6.js +0 -85
  429. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-controller.js +0 -282
  430. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-element-appender-controller.js +0 -35
  431. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-mobile-controller.js +0 -53
  432. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-month-year-change-event-controller.js +0 -139
  433. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-zindex-controller.js +0 -49
  434. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-month-year-dropdown-renderer.js +0 -341
  435. package/dist/esm/date-c55b97f0.js +0 -87
  436. package/dist/esm/mobilefriendly-c5d0573d.js +0 -11
  437. package/dist/esm/state-background-color-formatter-0f01d27a.js +0 -82
  438. package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-controller.d.ts +0 -96
  439. package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-element-appender-controller.d.ts +0 -12
  440. package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-mobile-controller.d.ts +0 -18
  441. package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-month-year-change-event-controller.d.ts +0 -46
  442. package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-zindex-controller.d.ts +0 -15
  443. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-month-year-dropdown-renderer.d.ts +0 -97
  444. package/dist/vega/p-08835909.js +0 -1
  445. package/dist/vega/p-0cdb38d3.js +0 -1
  446. package/dist/vega/p-0e5297b9.entry.js +0 -1
  447. package/dist/vega/p-0feceaac.entry.js +0 -1
  448. package/dist/vega/p-115b42e6.entry.js +0 -1
  449. package/dist/vega/p-1372b984.js +0 -1
  450. package/dist/vega/p-1739a877.entry.js +0 -1
  451. package/dist/vega/p-1a59703b.entry.js +0 -1
  452. package/dist/vega/p-1e92737c.entry.js +0 -1
  453. package/dist/vega/p-257ff60b.entry.js +0 -1
  454. package/dist/vega/p-25a3fad7.entry.js +0 -1
  455. package/dist/vega/p-2622f0a8.entry.js +0 -1
  456. package/dist/vega/p-26c4f07c.entry.js +0 -1
  457. package/dist/vega/p-2e6ce1e9.entry.js +0 -1
  458. package/dist/vega/p-2ec7e020.entry.js +0 -1
  459. package/dist/vega/p-308aa2e3.js +0 -1
  460. package/dist/vega/p-33f3f306.js +0 -1
  461. package/dist/vega/p-37020002.entry.js +0 -1
  462. package/dist/vega/p-38cb2b40.js +0 -1
  463. package/dist/vega/p-4e13a26f.js +0 -1
  464. package/dist/vega/p-5972c101.entry.js +0 -1
  465. package/dist/vega/p-5d827fe5.js +0 -1
  466. package/dist/vega/p-65a9af84.entry.js +0 -1
  467. package/dist/vega/p-67eb405d.entry.js +0 -1
  468. package/dist/vega/p-67f159c3.js +0 -1
  469. package/dist/vega/p-71ddccf2.entry.js +0 -1
  470. package/dist/vega/p-785d9ac3.entry.js +0 -1
  471. package/dist/vega/p-7a590741.entry.js +0 -1
  472. package/dist/vega/p-824a06ba.js +0 -1
  473. package/dist/vega/p-8350506e.js +0 -1
  474. package/dist/vega/p-867a4970.js +0 -1
  475. package/dist/vega/p-880569ec.entry.js +0 -1
  476. package/dist/vega/p-8ac2f43f.entry.js +0 -1
  477. package/dist/vega/p-8ff96b8c.entry.js +0 -13
  478. package/dist/vega/p-9794fd88.entry.js +0 -1
  479. package/dist/vega/p-a10b9f2e.js +0 -12
  480. package/dist/vega/p-a630ce73.entry.js +0 -1
  481. package/dist/vega/p-b1faebe0.js +0 -1
  482. package/dist/vega/p-b8b9ed2c.js +0 -1
  483. package/dist/vega/p-bcc396c2.entry.js +0 -1
  484. package/dist/vega/p-bccee21e.js +0 -1
  485. package/dist/vega/p-c224b44c.js +0 -1
  486. package/dist/vega/p-f21b893b.entry.js +0 -1
  487. package/dist/vega/p-fb320b50.entry.js +0 -1
  488. package/dist/vega/p-ff470366.entry.js +0 -1
@@ -17,7 +17,7 @@ describe('annotation-style', () => {
17
17
  });
18
18
  const blockAnnotationStyle = new RTEAnnotationStyle(textBlock);
19
19
  expect(blockAnnotationStyle.toCssText()).toEqual('color: red;font-size: 16px;');
20
- expect(blockAnnotationStyle.toCssText({ standalone: true })).toEqual('font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;text-align: center;color: red;');
20
+ expect(blockAnnotationStyle.toCssText({ standalone: true })).toEqual('font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;text-align: center;color: red;');
21
21
  expect(blockAnnotationStyle.toCssText(null, null, {})).toEqual('');
22
22
  expect(blockAnnotationStyle.toCssText(null, null, { color: 'red' })).toEqual('color: red;');
23
23
  expect(blockAnnotationStyle.toCssText(null, null, { backgroundColor: 'blue', fontWeight: 'bold' })).toEqual('background-color: blue;font-weight: bold;');
@@ -56,6 +56,7 @@ describe('annotation-style', () => {
56
56
  fontSize: '16px',
57
57
  fontWeight: '500',
58
58
  lineHeight: '22px',
59
+ minHeight: '22px',
59
60
  marginBottom: '0px',
60
61
  marginTop: '0px',
61
62
  textAlign: 'center',
@@ -47,6 +47,7 @@ describe('annotations', () => {
47
47
  fontSize: '16px',
48
48
  fontWeight: '500',
49
49
  lineHeight: '22px',
50
+ minHeight: '22px',
50
51
  marginBottom: '0px',
51
52
  marginTop: '0px',
52
53
  });
@@ -55,18 +56,21 @@ describe('annotations', () => {
55
56
  fontSize: '36px',
56
57
  fontWeight: '500',
57
58
  lineHeight: '40px',
59
+ minHeight: '40px',
58
60
  });
59
61
  expect(new TextStyleAnnotation('subtitle').renderStyle({ standalone: true })).toEqual({
60
62
  fontFamily: 'Inter',
61
63
  fontSize: '28px',
62
64
  fontWeight: '500',
63
65
  lineHeight: '32px',
66
+ minHeight: '32px',
64
67
  });
65
68
  expect(new TextStyleAnnotation('heading-1').renderStyle({ standalone: true })).toEqual({
66
69
  fontFamily: 'Inter',
67
70
  fontSize: '22px',
68
71
  fontWeight: '500',
69
72
  lineHeight: '24px',
73
+ minHeight: '24px',
70
74
  marginBottom: '0px',
71
75
  marginTop: '0px',
72
76
  });
@@ -75,6 +79,7 @@ describe('annotations', () => {
75
79
  fontSize: '20px',
76
80
  fontWeight: '500',
77
81
  lineHeight: '24px',
82
+ minHeight: '24px',
78
83
  marginBottom: '0px',
79
84
  marginTop: '0px',
80
85
  });
@@ -83,6 +88,7 @@ describe('annotations', () => {
83
88
  fontSize: '18px',
84
89
  fontWeight: '500',
85
90
  lineHeight: '22px',
91
+ minHeight: '22px',
86
92
  marginBottom: '0px',
87
93
  marginTop: '0px',
88
94
  });
@@ -91,6 +97,7 @@ describe('annotations', () => {
91
97
  fontSize: '16px',
92
98
  fontWeight: '500',
93
99
  lineHeight: '22px',
100
+ minHeight: '22px',
94
101
  marginBottom: '0px',
95
102
  marginTop: '0px',
96
103
  });
@@ -99,6 +106,7 @@ describe('annotations', () => {
99
106
  fontSize: '14px',
100
107
  fontWeight: '500',
101
108
  lineHeight: '22px',
109
+ minHeight: '22px',
102
110
  marginBottom: '0px',
103
111
  marginTop: '0px',
104
112
  });
@@ -107,6 +115,7 @@ describe('annotations', () => {
107
115
  fontSize: '12px',
108
116
  fontWeight: '500',
109
117
  lineHeight: '22px',
118
+ minHeight: '22px',
110
119
  marginBottom: '0px',
111
120
  marginTop: '0px',
112
121
  });
@@ -187,7 +187,7 @@ describe('text block', () => {
187
187
  },
188
188
  ],
189
189
  };
190
- expect(RTETextBlock.from(textBlock).toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><a href="www.google.com" target="_blank" style="color: rgba(var(--v-text-link, 19, 98, 226, 1));"><span>This is a text.</span></a></p>`);
190
+ expect(RTETextBlock.from(textBlock).toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><a href="www.google.com" target="_blank" style="color: rgba(var(--v-text-link, 19, 98, 226, 1));"><span>This is a text.</span></a></p>`);
191
191
  expect(RTETextBlock.from(textBlock, { autoMatchFormat: false }).toHtml()).toEqual(`<p><a href="www.google.com"><span>This is a text.</span></a></p>`);
192
192
  });
193
193
  });
@@ -316,7 +316,7 @@ describe('content state', () => {
316
316
  nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
317
317
  },
318
318
  ]);
319
- expect(contentState.toHtml()).toEqualHtml(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;margin-top: 0px; margin-bottom: 0px;"><span>This is a paragraph</span></p>`);
319
+ expect(contentState.toHtml()).toEqualHtml(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;margin-top: 0px; margin-bottom: 0px;"><span>This is a paragraph</span></p>`);
320
320
  });
321
321
  it('should convert text node with annotations to HTML correctly', () => {
322
322
  const contentState = VegaRTEContent.fromJSON([
@@ -336,7 +336,7 @@ describe('content state', () => {
336
336
  ],
337
337
  },
338
338
  ]);
339
- expect(contentState.toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-weight: 700;">This is a paragraph.</span><code style="font-family: Roboto Mono;white-space: pre-wrap;"> code</code><span> text</span></p>`);
339
+ expect(contentState.toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-weight: 700;">This is a paragraph.</span><code style="font-family: Roboto Mono;white-space: pre-wrap;"> code</code><span> text</span></p>`);
340
340
  });
341
341
  it('should convert text block with annotations to HTML with inline styles correctly', () => {
342
342
  const contentState = VegaRTEContent.fromJSON([
@@ -354,7 +354,7 @@ describe('content state', () => {
354
354
  ],
355
355
  },
356
356
  ]);
357
- expect(contentState.toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;text-align: right;"><span style="font-weight: 700;text-decoration: underline;">This is a paragraph</span></p>`);
357
+ expect(contentState.toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;text-align: right;"><span style="font-weight: 700;text-decoration: underline;">This is a paragraph</span></p>`);
358
358
  });
359
359
  it('should convert image block to HTML correctly', () => {
360
360
  const contentState = VegaRTEContent.fromJSON([
@@ -399,7 +399,7 @@ describe('content state', () => {
399
399
  ],
400
400
  },
401
401
  ]);
402
- expect(contentState.toHtml()).toEqual(`<ul style="padding-left: 8px;margin-left: 16px;"><li style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 1</span></li><li style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 2</span></li></ul>`);
402
+ expect(contentState.toHtml()).toEqual(`<ul style="padding-left: 8px;margin-left: 16px;"><li style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 1</span></li><li style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 2</span></li></ul>`);
403
403
  });
404
404
  it('should convert number list block to HTML correctly', () => {
405
405
  const contentState = VegaRTEContent.fromJSON([
@@ -420,7 +420,7 @@ describe('content state', () => {
420
420
  ],
421
421
  },
422
422
  ]);
423
- expect(contentState.toHtml()).toEqual(`<ol style="padding-left: 8px;margin-left: 16px;"><li style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 1</span></li><li style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 2</span></li></ol>`);
423
+ expect(contentState.toHtml()).toEqual(`<ol style="padding-left: 8px;margin-left: 16px;"><li style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 1</span></li><li style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 2</span></li></ol>`);
424
424
  });
425
425
  it('should convert code block to HTML correctly', () => {
426
426
  const contentState = VegaRTEContent.fromJSON([
@@ -456,7 +456,7 @@ describe('content state', () => {
456
456
  ],
457
457
  },
458
458
  ]);
459
- expect(contentState.toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><a href="https://example.com" target="_blank" style="color: rgba(var(--v-text-link, 19, 98, 226, 1));"><span>This is a link</span></a></p>`);
459
+ expect(contentState.toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><a href="https://example.com" target="_blank" style="color: rgba(var(--v-text-link, 19, 98, 226, 1));"><span>This is a link</span></a></p>`);
460
460
  });
461
461
  it('should convert a complex value to HTML correctly', () => {
462
462
  const contentState = VegaRTEContent.fromJSON([
@@ -789,7 +789,7 @@ describe('content state', () => {
789
789
  ],
790
790
  },
791
791
  ]);
792
- expect(contentState.toHtml()).toEqual(`<div style="font-family: Inter;font-size: 36px;line-height: 40px;font-weight: 500;"><span style="font-weight: 700;">Title</span></div><div style="font-family: Inter;font-size: 28px;line-height: 32px;font-weight: 500;"><span>Subtitle</span></div><h1 style="font-family: Inter;font-size: 22px;line-height: 24px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-weight: 700;">Heading 1</span></h1><h2 style="font-family: Inter;font-size: 20px;line-height: 24px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-weight: 700;">Heading 2</span></h2><h3 style="font-family: Inter;font-size: 18px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-weight: 700;">Heading 3</span></h3><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Paragraph</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-weight: 700;">Bold text</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-style: italic;">Italic text</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="text-decoration: underline;">Underline text</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="text-decoration: underline;">Strikethrough text</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><code style="font-family: Roboto Mono;white-space: pre-wrap;">Code text</code></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="color: #BD2947;">Color text</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;text-align: left;"><span>Left align</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;text-align: right;"><span>Right align</span></p><ul style="padding-left: 8px;margin-left: 16px;"><li style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>list item 1</span></li><li style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>list item 2</span></li></ul><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;margin-left: 32px;"><span>More indent</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><a href="https://www.google.com" target="_blank" style="color: rgba(var(--v-text-link, 19, 98, 226, 1));"><span>Link text</span></a></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span></span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span></span></p>`);
792
+ expect(contentState.toHtml()).toEqual(`<div style="font-family: Inter;font-size: 36px;line-height: 40px;min-height: 40px;font-weight: 500;"><span style="font-weight: 700;">Title</span></div><div style="font-family: Inter;font-size: 28px;line-height: 32px;min-height: 32px;font-weight: 500;"><span>Subtitle</span></div><h1 style="font-family: Inter;font-size: 22px;line-height: 24px;min-height: 24px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-weight: 700;">Heading 1</span></h1><h2 style="font-family: Inter;font-size: 20px;line-height: 24px;min-height: 24px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-weight: 700;">Heading 2</span></h2><h3 style="font-family: Inter;font-size: 18px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-weight: 700;">Heading 3</span></h3><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Paragraph</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-weight: 700;">Bold text</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="font-style: italic;">Italic text</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="text-decoration: underline;">Underline text</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="text-decoration: underline;">Strikethrough text</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><code style="font-family: Roboto Mono;white-space: pre-wrap;">Code text</code></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span style="color: #BD2947;">Color text</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;text-align: left;"><span>Left align</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;text-align: right;"><span>Right align</span></p><ul style="padding-left: 8px;margin-left: 16px;"><li style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>list item 1</span></li><li style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>list item 2</span></li></ul><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;margin-left: 32px;"><span>More indent</span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><a href="https://www.google.com" target="_blank" style="color: rgba(var(--v-text-link, 19, 98, 226, 1));"><span>Link text</span></a></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span></span></p><p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span></span></p>`);
793
793
  });
794
794
  it('should convert paragraph with custom attributes to HTML correctly', () => {
795
795
  const contentState = VegaRTEContent.fromJSON([
@@ -818,7 +818,7 @@ describe('content state', () => {
818
818
  ],
819
819
  },
820
820
  ]);
821
- expect(contentState.toHtml()).toEqualHtml(`<p id="p-element" dir="dir-p" style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500; margin-top: 0px; margin-bottom: 0px;"><span id="span-element" dir="dir-span">This is a paragraph</span></p>`);
821
+ expect(contentState.toHtml()).toEqualHtml(`<p id="p-element" dir="dir-p" style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500; margin-top: 0px; margin-bottom: 0px;"><span id="span-element" dir="dir-span">This is a paragraph</span></p>`);
822
822
  });
823
823
  it('should convert text node with custom attributes to HTML correctly', () => {
824
824
  const contentState = VegaRTEContent.fromJSON([
@@ -868,7 +868,7 @@ describe('content state', () => {
868
868
  ],
869
869
  },
870
870
  ]);
871
- expect(contentState.toHtml()).toEqual(`<p id="p-element" dir="dir-p" style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span id="text1" style="font-weight: 700;">This is a paragraph.</span><code id="text2" style="font-family: Roboto Mono;white-space: pre-wrap;"> code</code><span id="text3"> text</span></p>`);
871
+ expect(contentState.toHtml()).toEqual(`<p id="p-element" dir="dir-p" style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span id="text1" style="font-weight: 700;">This is a paragraph.</span><code id="text2" style="font-family: Roboto Mono;white-space: pre-wrap;"> code</code><span id="text3"> text</span></p>`);
872
872
  });
873
873
  it('should convert bullet list block with custom attributes to HTML correctly', () => {
874
874
  const contentState = VegaRTEContent.fromJSON([
@@ -904,7 +904,7 @@ describe('content state', () => {
904
904
  },
905
905
  },
906
906
  ]);
907
- expect(contentState.toHtml()).toEqual(`<ul id="ul" style="padding-left: 8px;margin-left: 16px;"><li id="list1" style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 1</span></li><li id="list2" style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 2</span></li></ul>`);
907
+ expect(contentState.toHtml()).toEqual(`<ul id="ul" style="padding-left: 8px;margin-left: 16px;"><li id="list1" style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 1</span></li><li id="list2" style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>Item 2</span></li></ul>`);
908
908
  });
909
909
  it('should convert paragraph with custom class to HTML correctly', () => {
910
910
  const contentState = VegaRTEContent.fromJSON([
@@ -1025,7 +1025,7 @@ describe('content state', () => {
1025
1025
  ],
1026
1026
  },
1027
1027
  ]);
1028
- expect(contentState.toHtml()).toEqualHtml(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 700; margin-top: 0px; margin-bottom: 0px;"><span style="font-weight: 700">This is a paragraph</span></p>`);
1028
+ expect(contentState.toHtml()).toEqualHtml(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 700; margin-top: 0px; margin-bottom: 0px;"><span style="font-weight: 700">This is a paragraph</span></p>`);
1029
1029
  });
1030
1030
  it('should convert text node with custom style to HTML correctly', () => {
1031
1031
  const contentState = VegaRTEContent.fromJSON([
@@ -1074,7 +1074,7 @@ describe('content state', () => {
1074
1074
  ],
1075
1075
  },
1076
1076
  ]);
1077
- expect(contentState.toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;text-align: right;"><span style="font-weight: 700;padding: 20px;">This is a paragraph.</span><code style="font-family: Roboto Mono;white-space: pre-wrap;padding: 30px;"> code</code><span style="padding: 40px;"> text</span></p>`);
1077
+ expect(contentState.toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;text-align: right;"><span style="font-weight: 700;padding: 20px;">This is a paragraph.</span><code style="font-family: Roboto Mono;white-space: pre-wrap;padding: 30px;"> code</code><span style="padding: 40px;"> text</span></p>`);
1078
1078
  });
1079
1079
  it('should convert bullet list block with custom style to HTML correctly', () => {
1080
1080
  const contentState = VegaRTEContent.fromJSON([
@@ -1110,7 +1110,7 @@ describe('content state', () => {
1110
1110
  },
1111
1111
  },
1112
1112
  ]);
1113
- expect(contentState.toHtml()).toEqual(`<ul style="padding-left: 8px;margin-left: 16px;padding: 60px;"><li style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;padding: 40px;"><span>Item 1</span></li><li style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;padding: 50px;"><span>Item 2</span></li></ul>`);
1113
+ expect(contentState.toHtml()).toEqual(`<ul style="padding-left: 8px;margin-left: 16px;padding: 60px;"><li style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;padding: 40px;"><span>Item 1</span></li><li style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;padding: 50px;"><span>Item 2</span></li></ul>`);
1114
1114
  });
1115
1115
  it('should log warning when call toHtml with deprecated parameter', () => {
1116
1116
  setVegaLogLevel('warn');
@@ -2839,8 +2839,8 @@ Line 1
2839
2839
  nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
2840
2840
  },
2841
2841
  ];
2842
- expect(VegaRTEContent.fromJSON(content).toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>This is a paragraph</span></p>`);
2843
- expect(VegaRTEContent.fromJSON(content).toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>This is a paragraph</span></p>`);
2842
+ expect(VegaRTEContent.fromJSON(content).toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>This is a paragraph</span></p>`);
2843
+ expect(VegaRTEContent.fromJSON(content).toHtml()).toEqual(`<p style="font-family: Inter;font-size: 16px;line-height: 22px;min-height: 22px;font-weight: 500;margin-top: 0px;margin-bottom: 0px;"><span>This is a paragraph</span></p>`);
2844
2844
  expect(VegaRTEContent.fromJSON(content, { autoMatchFormat: false }).toHtml()).toEqual(`<p><span>This is a paragraph</span></p>`);
2845
2845
  expect(VegaRTEContent.fromJSON(content, { autoMatchFormat: false }).toHtml()).toEqual(`<p><span>This is a paragraph</span></p>`);
2846
2846
  });
@@ -4,3 +4,4 @@ export const VisaRegex = /^4/;
4
4
  export const MasterCardRegex = /^(5[1-5]|677189)|^(222[1-9]|2[3-6]\d{2}|27[0-1]\d|2720)/;
5
5
  export const AmexRegex = /^3[47]/;
6
6
  export const DiscoverRegex = /^(6011|65|64[4-9]|622)/;
7
+ export const DateFormatParserRegex = /(\\)?(Y{2,4}|M{1,4}|D{1,2}|d{1,4})/g;
@@ -88,6 +88,9 @@ export const VegaNativeEventName = [
88
88
  'monthYearChange',
89
89
  'complete',
90
90
  'paste',
91
+ 'clear',
92
+ 'periodChange',
93
+ 'selectionChange',
91
94
  ];
92
95
  // eslint-disable-next-line @typescript-eslint/typedef
93
96
  export const CssStates = ['default', 'hover', 'active', 'focus-visible'];
@@ -1,6 +1,10 @@
1
1
  import { VegaInternalTranslation } from '../translation';
2
2
  import { CalendarDateTime } from './calendar-date-time';
3
3
  import { getSystemTimezone } from './utils';
4
+ import { DateFormatParserRegex } from '../../constants/regex';
5
+ import { compareIsAfter, compareIsBefore, pad } from '../../utils/date';
6
+ // TODO: Need rename calendar-date as vega-date to manage all date operation in vega project
7
+ // https://gethired.atlassian.net/browse/VD-5918
4
8
  /**
5
9
  * Calendar date class
6
10
  */
@@ -20,6 +24,153 @@ export class CalendarDate {
20
24
  static from(currentDate, timezone = getSystemTimezone()) {
21
25
  return CalendarDateTime.fromDate(currentDate, timezone).calendarDate;
22
26
  }
27
+ /**
28
+ * Converts a date string to CalendarDate with optional format and timezone parameters.
29
+ *
30
+ * @param {string} dateString - The string date.
31
+ * @param {string} [format] - The format of string date
32
+ * @param {string} [lang] - lang
33
+ * @returns {Nullable<CalendarDate>} - CalendarDate.
34
+ */
35
+ static fromString(dateString, format = 'MM/DD/YYYY', lang = 'en-us') {
36
+ if (!dateString)
37
+ return null;
38
+ const formatMatchers = [];
39
+ let formatMatcher = null;
40
+ // Analyze the format and find the corresponding positions for year, month, and day.
41
+ // Data: formatMatchers = [['DD', index: 0, ...], ['MM', index: 3, ...], ['YYYY', index: 7, ...]]
42
+ while ((formatMatcher = DateFormatParserRegex.exec(format)) != null) {
43
+ if (formatMatcher[1] === '\\')
44
+ continue;
45
+ formatMatchers.push(formatMatcher);
46
+ }
47
+ if (formatMatchers.length) {
48
+ const datePattern = {
49
+ year: undefined,
50
+ month: undefined,
51
+ shortMonth: undefined,
52
+ longMonth: undefined,
53
+ day: undefined,
54
+ value: '',
55
+ };
56
+ const firstMatcher = formatMatchers[0];
57
+ if (firstMatcher && firstMatcher.index > 0) {
58
+ datePattern.value += '.*?';
59
+ }
60
+ // According `matchers` to generate a new regex which can parse the date by corresponding year, month and day
61
+ // Data: dateRegex = "(\d{2}).*?(\d{2}).*?(\d{4}).*?"
62
+ // datePattern = {day: 1, longMonth: null, month: 2, shortMonth: null, year: 3, value: "(\d{2}).*?(\d{2}).*?(\d{4}).*?"}
63
+ for (const [k, match] of Object.entries(formatMatchers)) {
64
+ const key = Number(k);
65
+ if (match) {
66
+ const { group, pattern } = this.getPatternByFormatToken(match[0], lang);
67
+ datePattern[group] = key + 1;
68
+ datePattern.value += pattern;
69
+ datePattern.value += '.*?';
70
+ }
71
+ }
72
+ const dateRegex = new RegExp(`^${datePattern.value}$`);
73
+ if (dateRegex.test(dateString)) {
74
+ // Parse the date
75
+ // Example: parsedDate = ['08-02-2020', '08', '02', '2020']
76
+ const parsedDate = dateRegex.exec(dateString);
77
+ if (parsedDate &&
78
+ datePattern.year &&
79
+ (datePattern.month || datePattern.shortMonth || datePattern.longMonth) &&
80
+ datePattern.day) {
81
+ const year = Number(parsedDate[datePattern.year]);
82
+ let month = 1;
83
+ if (datePattern.month) {
84
+ month = Number(parsedDate[datePattern.month]) - 1;
85
+ }
86
+ else if (datePattern.shortMonth) {
87
+ month = this.shortMonths(lang).indexOf(parsedDate[datePattern.shortMonth]);
88
+ }
89
+ else if (datePattern.longMonth) {
90
+ month = this.longMonths(lang).indexOf(parsedDate[datePattern.longMonth]);
91
+ }
92
+ const day = Number(parsedDate[datePattern.day]);
93
+ const fullYear = Number(pad(year, 4, `${new Date().getFullYear()}`.slice(0, 2)));
94
+ if (isNaN(Date.parse(`${fullYear}-${pad(month + 1)}-${pad(day)}`)))
95
+ return null;
96
+ return this.from(new Date(fullYear, month, day, 0, 0, 0, 0));
97
+ }
98
+ }
99
+ }
100
+ return this.from(new Date(dateString));
101
+ }
102
+ /**
103
+ * Get regex pattern by format token.
104
+ *
105
+ * @param {string} token - The format token.
106
+ * @param {string} lang - Language.
107
+ * @returns {FormatPatternType} - regex pattern.
108
+ */
109
+ static getPatternByFormatToken(token, lang) {
110
+ switch (token) {
111
+ case 'YY':
112
+ case 'YYYY':
113
+ return {
114
+ group: 'year',
115
+ pattern: `(\\d{${token.length}})`,
116
+ };
117
+ case 'M':
118
+ return {
119
+ group: 'month',
120
+ pattern: '(\\d{1,2})',
121
+ };
122
+ case 'MM':
123
+ return {
124
+ group: 'month',
125
+ pattern: '(\\d{2})',
126
+ };
127
+ case 'MMM':
128
+ return {
129
+ group: 'shortMonth',
130
+ pattern: `(${this.shortMonths(lang).join('|')})`,
131
+ };
132
+ case 'MMMM':
133
+ return {
134
+ group: 'longMonth',
135
+ pattern: `(${this.longMonths(lang).join('|')})`,
136
+ };
137
+ case 'D':
138
+ return {
139
+ group: 'day',
140
+ pattern: '(\\d{1,2})',
141
+ };
142
+ case 'DD':
143
+ return {
144
+ group: 'day',
145
+ pattern: '(\\d{2})',
146
+ };
147
+ /* istanbul ignore next */
148
+ default: {
149
+ return {
150
+ group: 'unknown',
151
+ pattern: '(.*)',
152
+ };
153
+ }
154
+ }
155
+ }
156
+ /**
157
+ * Shorts months.
158
+ *
159
+ * @param {string} lang - Language
160
+ * @returns {string[]} - Shorts months.
161
+ */
162
+ static shortMonths(lang) {
163
+ return this.MONTHS.map((month) => new Date(2019, month).toLocaleString(lang, { month: 'short' }));
164
+ }
165
+ /**
166
+ * Long months.
167
+ *
168
+ * @param {string} lang - Language
169
+ * @returns {string[]} - Long months.
170
+ */
171
+ static longMonths(lang) {
172
+ return this.MONTHS.map((month) => new Date(2019, month).toLocaleString(lang, { month: 'long' }));
173
+ }
23
174
  /**
24
175
  * The year of the calendar date
25
176
  *
@@ -53,6 +204,44 @@ export class CalendarDate {
53
204
  set date(value) {
54
205
  this._date = value;
55
206
  }
207
+ /**
208
+ * Converts CalendarDate to a string with an optional format specifier.
209
+ *
210
+ * @param {string} [format] - The format of string date
211
+ * @param {string} [lang] - Language
212
+ * @returns {string} The string date.
213
+ */
214
+ toString(format = 'MM/DD/YYYY', lang = 'en-us') {
215
+ let result = '';
216
+ const formatMatchers = [];
217
+ let formatMatcher = null;
218
+ while ((formatMatcher = DateFormatParserRegex.exec(format)) != null) {
219
+ if (formatMatcher[1] === '\\')
220
+ continue;
221
+ formatMatchers.push(formatMatcher);
222
+ }
223
+ if (formatMatchers.length) {
224
+ // add start line of tokens are not at the beginning
225
+ const firstMatcher = formatMatchers[0];
226
+ if (firstMatcher && firstMatcher.index > 0) {
227
+ result += format.substring(0, firstMatcher.index);
228
+ }
229
+ for (const [k, match] of Object.entries(formatMatchers)) {
230
+ const key = Number(k);
231
+ if (match) {
232
+ result += this.getDateItemByFormatToken(match[0], lang);
233
+ const nextMatch = formatMatchers[key + 1];
234
+ if (nextMatch) {
235
+ result += format.substring(match.index + match[0].length, nextMatch.index);
236
+ }
237
+ if (key === formatMatchers.length - 1) {
238
+ result += format.substring(match.index + match[0].length);
239
+ }
240
+ }
241
+ }
242
+ }
243
+ return result.replace(/\\/g, '');
244
+ }
56
245
  /**
57
246
  * Verify whether the calendar date is today
58
247
  *
@@ -112,11 +301,13 @@ export class CalendarDate {
112
301
  /**
113
302
  * The function "equal" compares the year, month, and date of two CalendarDate objects and returns true if they are equal.
114
303
  *
115
- * @param {CalendarDate} calendarDate - The `equal` method in the code snippet is a function that compares the year, month, and date of the current `CalendarDate` object with another
304
+ * @param {Nullable<CalendarDate>} calendarDate - The `equal` method in the code snippet is a function that compares the year, month, and date of the current `CalendarDate` object with another
116
305
  * `CalendarDate` object passed as a parameter. The method returns `true` if all three values (year, month, date) are equal
117
306
  * @returns {boolean} The date is same day with current
118
307
  */
119
308
  equal(calendarDate) {
309
+ if (!calendarDate)
310
+ return false;
120
311
  const { year, month, date } = calendarDate;
121
312
  return this._year === year && this._month === month && this._date === date;
122
313
  }
@@ -131,4 +322,85 @@ export class CalendarDate {
131
322
  month: isShortName ? 'short' : 'long',
132
323
  }));
133
324
  }
325
+ /**
326
+ * To determine if it is larger than a given `CalendarDate`.
327
+ *
328
+ * @param {Nullable<CalendarDate>} calendarDate - A `CalendarDate`
329
+ * @returns {boolean} - Compared result
330
+ */
331
+ isAfter(calendarDate) {
332
+ if (!calendarDate)
333
+ return false;
334
+ return compareIsAfter(this.toDate(), calendarDate.toDate());
335
+ }
336
+ /**
337
+ * To determine if it is less than a given `CalendarDate`.
338
+ *
339
+ * @param {Nullable<CalendarDate>} calendarDate - A `CalendarDate`
340
+ * @returns {boolean} - Compared result
341
+ */
342
+ isBefore(calendarDate) {
343
+ if (!calendarDate)
344
+ return false;
345
+ return compareIsBefore(this.toDate(), calendarDate.toDate());
346
+ }
347
+ /**
348
+ * Get first day of month.
349
+ *
350
+ * @returns {CalendarDate} - First day of month.
351
+ */
352
+ firstDateOfMonth() {
353
+ return CalendarDate.from(new Date(this.year, this.month - 1, 1));
354
+ }
355
+ /**
356
+ * Get last day of month.
357
+ *
358
+ * @returns {CalendarDate} - Last day of month.
359
+ */
360
+ lastDateOfMonth() {
361
+ return CalendarDate.from(new Date(this.year, this.month, 0));
362
+ }
363
+ /**
364
+ * Adjusts the calendar date by adding the specified number of years, months, and days.
365
+ *
366
+ * @param {number} [years=0] - The number of years to add.
367
+ * @param {number} [months=0] - The number of months to add.
368
+ * @param {number} [days=0] - The number of days to add.
369
+ * @returns {CalendarDate} - A new CalendarDate object with the adjusted date.
370
+ */
371
+ add(years = 0, months = 0, days = 0) {
372
+ const currentDate = this.toDate();
373
+ const adjustedDate = new Date(currentDate.getFullYear() + years, currentDate.getMonth() + months, currentDate.getDate() + days);
374
+ return CalendarDate.from(adjustedDate);
375
+ }
376
+ /**
377
+ * Get year, month and day value by format token.
378
+ *
379
+ * @param {string} token - The format token.
380
+ * @param {string} lang - Language.
381
+ * @returns {string} - year, month and day value.
382
+ */
383
+ getDateItemByFormatToken(token, lang) {
384
+ switch (token) {
385
+ case 'YY':
386
+ return String(this.year).slice(-2);
387
+ case 'YYYY':
388
+ return String(this.year);
389
+ case 'M':
390
+ return String(this.month);
391
+ case 'MM':
392
+ return `0${this.month}`.slice(-2);
393
+ case 'MMM':
394
+ return CalendarDate.shortMonths(lang)[this.month - 1];
395
+ case 'MMMM':
396
+ return CalendarDate.longMonths(lang)[this.month - 1];
397
+ case 'D':
398
+ return String(this.date);
399
+ case 'DD':
400
+ return `0${this.date}`.slice(-2);
401
+ default:
402
+ return '';
403
+ }
404
+ }
134
405
  }
406
+ CalendarDate.MONTHS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
@@ -83,6 +83,15 @@ export class CalendarPeriod {
83
83
  now() {
84
84
  return this.createBy(CalendarDate.from(new Date(), this._timezone));
85
85
  }
86
+ /**
87
+ * Check the give period is equal to current period
88
+ *
89
+ * @param {CalendarPeriod} [period] - Give period to compare
90
+ * @returns {boolean} compare result
91
+ */
92
+ equal(period) {
93
+ return this.startDate.equal(period.startDate) && this.endDate.equal(period.endDate);
94
+ }
86
95
  /**
87
96
  * Calculate the period start date and end date.
88
97
  *
@@ -43,16 +43,28 @@ export class MonthPeriod extends CalendarPeriod {
43
43
  * @inheritDoc
44
44
  */
45
45
  next() {
46
- const next = this.current.toDate();
47
- next.setMonth(next.getMonth() + 1);
46
+ const current = this.current.toDate();
47
+ const year = current.getFullYear();
48
+ const month = current.getMonth() + 1;
49
+ const day = current.getDate();
50
+ // Get the last day of the next month
51
+ const lastDayOfNextMonth = new Date(year, month + 1, 0).getDate();
52
+ const nextDay = Math.min(day, lastDayOfNextMonth);
53
+ const next = new Date(year, month, nextDay);
48
54
  return this.createBy(CalendarDate.from(next));
49
55
  }
50
56
  /**
51
57
  * @inheritDoc
52
58
  */
53
59
  previous() {
54
- const previous = this.current.toDate();
55
- previous.setMonth(previous.getMonth() - 1);
60
+ const current = this.current.toDate();
61
+ const year = current.getFullYear();
62
+ const month = current.getMonth() - 1;
63
+ const day = current.getDate();
64
+ // Get the last day of the previous month
65
+ const lastDayOfPreviousMonth = new Date(year, month + 1, 0).getDate();
66
+ const previousDay = Math.min(day, lastDayOfPreviousMonth);
67
+ const previous = new Date(year, month, previousDay);
56
68
  return this.createBy(CalendarDate.from(previous));
57
69
  }
58
70
  /**