@heartlandone/vega 2.79.0 → 2.80.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 (1025) hide show
  1. package/dist/cjs/{app-globals-e9fdfbf9.js → app-globals-7a48292d.js} +6 -6
  2. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-6faafc3e.js → aria-dialog-focusable-trap-slimmer-5a0a78fe.js} +60 -6
  3. package/dist/cjs/{child-nodes-notify-observer-slimmer-06c78f97.js → child-nodes-notify-observer-slimmer-a8d13f4c.js} +1 -1
  4. package/dist/cjs/{code-block-847534e3.js → code-block-71a330a1.js} +124 -56
  5. package/dist/cjs/{component-value-history-controller-slimmer.abstract-d7f9812a.js → component-value-history-controller-slimmer.abstract-fd077a6c.js} +6 -6
  6. package/dist/cjs/{content-state-99be18a3.js → content-state-afa26456.js} +401 -18
  7. package/dist/cjs/{date-required-rule-3823d506.js → date-required-rule-9f0e3e99.js} +1 -1
  8. package/dist/cjs/{design-token-b497bb6e.js → design-token-3f9589eb.js} +2 -2
  9. package/dist/cjs/{dom-node-subject-observer-factory-f7ed3bdc.js → dom-node-subject-observer-factory-a3a60da4.js} +1 -1
  10. package/dist/cjs/{element-appender-slimmer-eba4f3a2.js → element-appender-slimmer-7a66229b.js} +5 -5
  11. package/dist/cjs/{event-emit-slimmer-83f8e2bd.js → event-emit-slimmer-024e26bb.js} +1 -1
  12. package/dist/cjs/{form-field-controller-slimmer-93ca7239.js → form-field-controller-slimmer-c487cf2b.js} +4 -4
  13. package/dist/cjs/{image-annotation-action-9d6af380.js → image-annotation-action-4e72af4b.js} +3 -3
  14. package/dist/cjs/index.cjs.js +15 -15
  15. package/dist/cjs/{inject-keyboard-manager-23d07d87.js → inject-keyboard-manager-d1a82089.js} +1 -1
  16. package/dist/cjs/{keyboard-manager-3923e29b.js → keyboard-manager-9dbbb0d4.js} +13 -5
  17. package/dist/cjs/{keyboard-manager-slimmer-f602725d.js → keyboard-manager-slimmer-68cff676.js} +1 -1
  18. package/dist/cjs/loader.cjs.js +10 -10
  19. package/dist/cjs/{month-view-generator-aa8e8e74.js → month-view-generator-65a2f883.js} +2 -3
  20. package/dist/cjs/{public-rules-1dbda124.js → public-rules-36f202b3.js} +9 -9
  21. package/dist/cjs/{range-60fb9dd2.js → range-fa15d524.js} +2 -2
  22. package/dist/cjs/{responsive-format-facade-a32cdb67.js → responsive-format-facade-4419b4ae.js} +1 -1
  23. package/dist/cjs/{rich-text-editor-required-rule-b4aab68d.js → rich-text-editor-required-rule-7d4c2973.js} +1 -1
  24. package/dist/cjs/{split-cell-operation-190d4a87.js → split-cell-operation-19f98afb.js} +4 -4
  25. package/dist/cjs/{string-format-strategy.abstract-730088ee.js → string-format-strategy.abstract-c65d9861.js} +5 -2
  26. package/dist/cjs/{string-input-formatter-slimmer-9d6df58b.js → string-input-formatter-slimmer-c2e04acc.js} +4 -4
  27. package/dist/cjs/{string-mask-strategy-b69e3b9e.js → string-mask-strategy-418fc0b8.js} +40 -9
  28. package/dist/cjs/{style-formatter-9d8a4ad2.js → style-formatter-3c9ce0e5.js} +2 -2
  29. package/dist/cjs/{sub-state-notify-slimmer-c80b9d21.js → sub-state-notify-slimmer-7a4c6061.js} +2 -2
  30. package/dist/cjs/{sub-state-observer-slimmer-15740c97.js → sub-state-observer-slimmer-f728e068.js} +3 -3
  31. package/dist/cjs/{time-required-rule-6524b650.js → time-required-rule-ad091302.js} +1 -1
  32. package/dist/cjs/{token-extension-b7c4ea17.js → token-extension-90396de7.js} +7 -7
  33. package/dist/cjs/{type-guard-2a46bca5.js → type-guard-d760850a.js} +11 -0
  34. package/dist/cjs/{ui-b3db0122.js → ui-9e8c9732.js} +8 -2
  35. package/dist/cjs/{valid-credit-card-number-rule-8eb02ea7.js → valid-credit-card-number-rule-5ce8e973.js} +1 -1
  36. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  37. package/dist/cjs/vega-app-header-button.cjs.entry.js +6 -6
  38. package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
  39. package/dist/cjs/vega-banner.cjs.entry.js +3 -3
  40. package/dist/cjs/vega-box.cjs.entry.js +5 -5
  41. package/dist/cjs/vega-breadcrumb.cjs.entry.js +3 -3
  42. package/dist/cjs/vega-button-circle.cjs.entry.js +7 -7
  43. package/dist/cjs/vega-button-group_2.cjs.entry.js +6 -6
  44. package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
  45. package/dist/cjs/vega-button.cjs.entry.js +6 -6
  46. package/dist/cjs/vega-calendar_4.cjs.entry.js +30 -17
  47. package/dist/cjs/vega-card.cjs.entry.js +4 -4
  48. package/dist/cjs/vega-carousel.cjs.entry.js +5 -5
  49. package/dist/cjs/vega-checkbox_2.cjs.entry.js +7 -7
  50. package/dist/cjs/vega-chip.cjs.entry.js +6 -6
  51. package/dist/cjs/vega-code-block.cjs.entry.js +10 -10
  52. package/dist/cjs/vega-color-picker.cjs.entry.js +6 -6
  53. package/dist/cjs/vega-combo-box.cjs.entry.js +9 -9
  54. package/dist/cjs/vega-date-picker_2.cjs.entry.js +23 -23
  55. package/dist/cjs/vega-dialog_2.cjs.entry.js +8 -7
  56. package/dist/cjs/vega-divider.cjs.entry.js +3 -3
  57. package/dist/cjs/vega-dropdown_5.cjs.entry.js +12 -12
  58. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  59. package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
  60. package/dist/cjs/vega-file-uploader.cjs.entry.js +6 -6
  61. package/dist/cjs/vega-flag-icon.cjs.entry.js +3 -3
  62. package/dist/cjs/vega-flex.cjs.entry.js +5 -5
  63. package/dist/cjs/vega-font.cjs.entry.js +4 -4
  64. package/dist/cjs/vega-form.cjs.entry.js +9 -9
  65. package/dist/cjs/vega-grid.cjs.entry.js +4 -4
  66. package/dist/cjs/vega-icon.cjs.entry.js +4 -4
  67. package/dist/cjs/vega-image-uploader.cjs.entry.js +8 -8
  68. package/dist/cjs/vega-input-credit-card.cjs.entry.js +10 -10
  69. package/dist/cjs/vega-input-numeric.cjs.entry.js +10 -10
  70. package/dist/cjs/vega-input-passcode.cjs.entry.js +9 -9
  71. package/dist/cjs/vega-input-phone-number.cjs.entry.js +8 -8
  72. package/dist/cjs/vega-input-range.cjs.entry.js +6 -6
  73. package/dist/cjs/vega-input-select.cjs.entry.js +8 -8
  74. package/dist/cjs/vega-input.cjs.entry.js +37 -27
  75. package/dist/cjs/{vega-internal-event-id-67bb91c1.js → vega-internal-event-id-a1837fa2.js} +2 -0
  76. package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
  77. package/dist/cjs/vega-left-nav_5.cjs.entry.js +9 -9
  78. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  79. package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -2
  80. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
  81. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
  82. package/dist/cjs/vega-pagination.cjs.entry.js +6 -6
  83. package/dist/cjs/vega-popover_2.cjs.entry.js +48 -12
  84. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +8 -8
  85. package/dist/cjs/vega-radio_2.cjs.entry.js +10 -10
  86. package/dist/cjs/vega-rich-text-content.cjs.entry.js +9 -9
  87. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +17 -17
  88. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +9 -9
  89. package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
  90. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +9 -9
  91. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +8 -8
  92. package/dist/cjs/vega-sidenav_3.cjs.entry.js +8 -8
  93. package/dist/cjs/vega-signature-capture.cjs.entry.js +9 -9
  94. package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
  95. package/dist/cjs/vega-tab-group_2.cjs.entry.js +3 -3
  96. package/dist/cjs/vega-table_11.cjs.entry.js +8 -8
  97. package/dist/cjs/vega-text.cjs.entry.js +1 -1
  98. package/dist/cjs/vega-textarea.cjs.entry.js +6 -6
  99. package/dist/cjs/vega-time-picker_2.cjs.entry.js +12 -12
  100. package/dist/cjs/vega-toggle-switch.cjs.entry.js +6 -6
  101. package/dist/cjs/vega-tooltip_2.cjs.entry.js +8 -8
  102. package/dist/cjs/vega.cjs.js +10 -10
  103. package/dist/cjs/{wait-for-component-did-render-9e41b39e.js → wait-for-component-did-render-b6aba2de.js} +2 -2
  104. package/dist/collection/components/vega-calendar/vega-calendar-event/slimmers/renderers/vega-calendar-event-renderer.js +4 -4
  105. package/dist/collection/components/vega-calendar/vega-calendar-event/vega-calendar-event.css +15 -12
  106. package/dist/collection/components/vega-calendar/vega-calendar-event/vega-calendar-event.js +1 -1
  107. package/dist/collection/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.js +17 -3
  108. package/dist/collection/components/vega-calendar/vega-calendar.css +1 -1
  109. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +5 -5
  110. package/dist/collection/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.js +13 -12
  111. package/dist/collection/components/vega-input/vega-input.js +1 -1
  112. package/dist/collection/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.js +25 -1
  113. package/dist/collection/components/vega-popover/vega-popover-content-box/vega-popover-content-box.js +6 -1
  114. package/dist/collection/components/vega-popover/vega-popover.js +7 -0
  115. package/dist/collection/components/vega-rich-text-editor/dto/annotations/bold-annotation.js +2 -1
  116. package/dist/collection/components/vega-rich-text-editor/dto/annotations/code-annotation.js +13 -6
  117. package/dist/collection/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.js +18 -9
  118. package/dist/collection/components/vega-rich-text-editor/dto/annotations/image-annotation.js +11 -1
  119. package/dist/collection/components/vega-rich-text-editor/dto/annotations/italic-annotation.js +2 -1
  120. package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +12 -1
  121. package/dist/collection/components/vega-rich-text-editor/dto/annotations/list-annotation.js +12 -4
  122. package/dist/collection/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.js +2 -1
  123. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-format-default-styles.js +22 -0
  124. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-annotation.js +43 -32
  125. package/dist/collection/components/vega-rich-text-editor/dto/annotations/underline-annotation.js +2 -1
  126. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.js +31 -0
  127. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/image-node/image-filter-styles-strategy.js +16 -0
  128. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +12 -0
  129. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.js +13 -0
  130. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/alignment-filter-styles-strategy.js +39 -0
  131. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/code-filter-styles-strategy.js +26 -0
  132. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/link-filter-styles-strategy.js +30 -0
  133. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/text-format-filter-styles-strategy.js +89 -0
  134. package/dist/collection/components/vega-rich-text-editor/dto/setup.js +18 -0
  135. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/bold-annotaion-handler.js +3 -2
  136. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +40 -2
  137. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/italic-annotation-handler.js +2 -1
  138. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/strike-through-annotation-handler.js +2 -1
  139. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.js +3 -1
  140. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/underline-annotation-handler.js +2 -1
  141. package/dist/collection/helpers/calendar/calendar-date.js +10 -0
  142. package/dist/collection/helpers/calendar/calendar-view-generator/calendar-view-generator.abstract.js +2 -2
  143. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
  144. package/dist/collection/helpers/formatter/string-formatter/custom-formatter-strategy.js +3 -1
  145. package/dist/collection/helpers/formatter/string-formatter/number-mask-strategy.js +3 -1
  146. package/dist/collection/helpers/formatter/string-formatter/number-thousand-comma-strategy.js +3 -2
  147. package/dist/collection/helpers/formatter/string-formatter/string-format-strategy.abstract.js +4 -1
  148. package/dist/collection/helpers/formatter/string-formatter/string-mask-strategy.js +38 -7
  149. package/dist/collection/helpers/formatter/string-formatter/thousand-comma-strategy.js +4 -0
  150. package/dist/collection/helpers/keyboard/keyboard-manager.js +11 -3
  151. package/dist/collection/helpers/slimmers/aria-dialog-focusable-trap-slimmer.js +59 -5
  152. package/dist/collection/utils/ui.js +8 -2
  153. package/dist/esm/{app-globals-776ccaa3.js → app-globals-e77015e3.js} +6 -6
  154. package/dist/esm/{aria-dialog-focusable-trap-slimmer-cc98a7a4.js → aria-dialog-focusable-trap-slimmer-5a2f92be.js} +60 -6
  155. package/dist/esm/{child-nodes-notify-observer-slimmer-c7297b9f.js → child-nodes-notify-observer-slimmer-b7f0e419.js} +1 -1
  156. package/dist/esm/{code-block-58d1dbe5.js → code-block-7d6f231b.js} +117 -57
  157. package/dist/esm/{component-value-history-controller-slimmer.abstract-5beb8acb.js → component-value-history-controller-slimmer.abstract-acf65b17.js} +6 -6
  158. package/dist/esm/{content-state-dad1fd71.js → content-state-084cd705.js} +401 -18
  159. package/dist/esm/{date-required-rule-4c40a4eb.js → date-required-rule-29608215.js} +1 -1
  160. package/dist/esm/{design-token-9c4eb6b1.js → design-token-edcd787b.js} +2 -2
  161. package/dist/esm/{dom-node-subject-observer-factory-94b2e2c3.js → dom-node-subject-observer-factory-cea9248d.js} +1 -1
  162. package/dist/esm/{element-appender-slimmer-fde815dc.js → element-appender-slimmer-08ec429b.js} +5 -5
  163. package/dist/esm/{event-emit-slimmer-b236945b.js → event-emit-slimmer-4fba1b35.js} +1 -1
  164. package/dist/esm/{form-field-controller-slimmer-00fa3678.js → form-field-controller-slimmer-8dd39707.js} +4 -4
  165. package/dist/esm/{image-annotation-action-1ec7b461.js → image-annotation-action-a6b33a81.js} +3 -3
  166. package/dist/esm/index.js +15 -15
  167. package/dist/esm/{inject-keyboard-manager-784b1364.js → inject-keyboard-manager-7557816f.js} +1 -1
  168. package/dist/esm/{keyboard-manager-e020039f.js → keyboard-manager-1846c6a5.js} +13 -5
  169. package/dist/esm/{keyboard-manager-slimmer-4722d20c.js → keyboard-manager-slimmer-1ae0aa4d.js} +1 -1
  170. package/dist/esm/loader.js +10 -10
  171. package/dist/esm/{month-view-generator-6fe1f491.js → month-view-generator-b700ed08.js} +2 -3
  172. package/dist/esm/{public-rules-1626fb0d.js → public-rules-fe2c7934.js} +9 -9
  173. package/dist/esm/{range-4f9bf69d.js → range-00afe462.js} +2 -2
  174. package/dist/esm/{responsive-format-facade-e8534e59.js → responsive-format-facade-37d4d850.js} +1 -1
  175. package/dist/esm/{rich-text-editor-required-rule-c391aeb6.js → rich-text-editor-required-rule-6487ec94.js} +1 -1
  176. package/dist/esm/{split-cell-operation-55cd9fae.js → split-cell-operation-9445e642.js} +4 -4
  177. package/dist/esm/{string-format-strategy.abstract-8c48e515.js → string-format-strategy.abstract-ec6d627b.js} +5 -2
  178. package/dist/esm/{string-input-formatter-slimmer-519480ce.js → string-input-formatter-slimmer-959dff7a.js} +4 -4
  179. package/dist/esm/{string-mask-strategy-8070817e.js → string-mask-strategy-49be41f0.js} +40 -9
  180. package/dist/esm/{style-formatter-7afd0680.js → style-formatter-ad0b2bac.js} +2 -2
  181. package/dist/esm/{sub-state-notify-slimmer-54531808.js → sub-state-notify-slimmer-ee8c417b.js} +2 -2
  182. package/dist/esm/{sub-state-observer-slimmer-b3a773c5.js → sub-state-observer-slimmer-4d30fa5c.js} +3 -3
  183. package/dist/esm/{time-required-rule-2569e5ad.js → time-required-rule-414b1590.js} +1 -1
  184. package/dist/esm/{token-extension-612575cb.js → token-extension-600b1c88.js} +7 -7
  185. package/dist/esm/{type-guard-c20cbbff.js → type-guard-23a08026.js} +11 -1
  186. package/dist/esm/{ui-ac244bf0.js → ui-ba5a4758.js} +8 -2
  187. package/dist/esm/{valid-credit-card-number-rule-b9c3c2f8.js → valid-credit-card-number-rule-60abddac.js} +1 -1
  188. package/dist/esm/vega-accordion.entry.js +6 -6
  189. package/dist/esm/vega-app-header-button.entry.js +6 -6
  190. package/dist/esm/vega-backdrop.entry.js +1 -1
  191. package/dist/esm/vega-banner.entry.js +3 -3
  192. package/dist/esm/vega-box.entry.js +5 -5
  193. package/dist/esm/vega-breadcrumb.entry.js +3 -3
  194. package/dist/esm/vega-button-circle.entry.js +7 -7
  195. package/dist/esm/vega-button-group_2.entry.js +6 -6
  196. package/dist/esm/vega-button-link.entry.js +3 -3
  197. package/dist/esm/vega-button.entry.js +6 -6
  198. package/dist/esm/vega-calendar_4.entry.js +30 -17
  199. package/dist/esm/vega-card.entry.js +4 -4
  200. package/dist/esm/vega-carousel.entry.js +5 -5
  201. package/dist/esm/vega-checkbox_2.entry.js +7 -7
  202. package/dist/esm/vega-chip.entry.js +6 -6
  203. package/dist/esm/vega-code-block.entry.js +10 -10
  204. package/dist/esm/vega-color-picker.entry.js +6 -6
  205. package/dist/esm/vega-combo-box.entry.js +9 -9
  206. package/dist/esm/vega-date-picker_2.entry.js +23 -23
  207. package/dist/esm/vega-dialog_2.entry.js +8 -7
  208. package/dist/esm/vega-divider.entry.js +3 -3
  209. package/dist/esm/vega-dropdown_5.entry.js +12 -12
  210. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  211. package/dist/esm/vega-field-label.entry.js +3 -3
  212. package/dist/esm/vega-file-uploader.entry.js +6 -6
  213. package/dist/esm/vega-flag-icon.entry.js +3 -3
  214. package/dist/esm/vega-flex.entry.js +5 -5
  215. package/dist/esm/vega-font.entry.js +4 -4
  216. package/dist/esm/vega-form.entry.js +9 -9
  217. package/dist/esm/vega-grid.entry.js +4 -4
  218. package/dist/esm/vega-icon.entry.js +4 -4
  219. package/dist/esm/vega-image-uploader.entry.js +8 -8
  220. package/dist/esm/vega-input-credit-card.entry.js +10 -10
  221. package/dist/esm/vega-input-numeric.entry.js +10 -10
  222. package/dist/esm/vega-input-passcode.entry.js +9 -9
  223. package/dist/esm/vega-input-phone-number.entry.js +8 -8
  224. package/dist/esm/vega-input-range.entry.js +6 -6
  225. package/dist/esm/vega-input-select.entry.js +8 -8
  226. package/dist/esm/vega-input.entry.js +37 -27
  227. package/dist/esm/{vega-internal-event-id-8002b179.js → vega-internal-event-id-70bd893d.js} +2 -1
  228. package/dist/esm/vega-item-toggle.entry.js +3 -3
  229. package/dist/esm/vega-left-nav_5.entry.js +9 -9
  230. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  231. package/dist/esm/vega-page-notification_2.entry.js +2 -2
  232. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
  233. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
  234. package/dist/esm/vega-pagination.entry.js +6 -6
  235. package/dist/esm/vega-popover_2.entry.js +48 -12
  236. package/dist/esm/vega-progress-tracker_2.entry.js +8 -8
  237. package/dist/esm/vega-radio_2.entry.js +10 -10
  238. package/dist/esm/vega-rich-text-content.entry.js +9 -9
  239. package/dist/esm/vega-rich-text-editor_4.entry.js +17 -17
  240. package/dist/esm/vega-rich-text-table-properties_3.entry.js +9 -9
  241. package/dist/esm/vega-segment-control.entry.js +3 -3
  242. package/dist/esm/vega-selection-chip_2.entry.js +9 -9
  243. package/dist/esm/vega-selection-tile_2.entry.js +8 -8
  244. package/dist/esm/vega-sidenav_3.entry.js +8 -8
  245. package/dist/esm/vega-signature-capture.entry.js +9 -9
  246. package/dist/esm/vega-stepper.entry.js +6 -6
  247. package/dist/esm/vega-tab-group_2.entry.js +3 -3
  248. package/dist/esm/vega-table_11.entry.js +8 -8
  249. package/dist/esm/vega-text.entry.js +1 -1
  250. package/dist/esm/vega-textarea.entry.js +6 -6
  251. package/dist/esm/vega-time-picker_2.entry.js +12 -12
  252. package/dist/esm/vega-toggle-switch.entry.js +6 -6
  253. package/dist/esm/vega-tooltip_2.entry.js +8 -8
  254. package/dist/esm/vega.js +10 -10
  255. package/dist/esm/{wait-for-component-did-render-1e62d6f7.js → wait-for-component-did-render-03e7ccb2.js} +2 -2
  256. package/dist/sri/vega-sri-manifest.json +346 -346
  257. package/dist/types/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.d.ts +5 -0
  258. package/dist/types/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.d.ts +1 -0
  259. package/dist/types/components/vega-input/types.d.ts +30 -1
  260. package/dist/types/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +6 -0
  261. package/dist/types/components/vega-rich-text-editor/dto/annotations/code-annotation.d.ts +6 -0
  262. package/dist/types/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.d.ts +7 -0
  263. package/dist/types/components/vega-rich-text-editor/dto/annotations/image-annotation.d.ts +6 -0
  264. package/dist/types/components/vega-rich-text-editor/dto/annotations/link-group-annotation.d.ts +7 -0
  265. package/dist/types/components/vega-rich-text-editor/dto/annotations/list-annotation.d.ts +6 -0
  266. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-format-default-styles.d.ts +22 -0
  267. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-annotation.d.ts +7 -0
  268. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.d.ts +20 -0
  269. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/image-node/image-filter-styles-strategy.d.ts +10 -0
  270. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.d.ts +8 -0
  271. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.d.ts +9 -0
  272. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/alignment-filter-styles-strategy.d.ts +27 -0
  273. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/code-filter-styles-strategy.d.ts +17 -0
  274. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/link-filter-styles-strategy.d.ts +17 -0
  275. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/text-format-filter-styles-strategy.d.ts +41 -0
  276. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +10 -0
  277. package/dist/types/helpers/calendar/calendar-date.d.ts +7 -0
  278. package/dist/types/helpers/calendar/calendar-view-generator/calendar-view-generator.abstract.d.ts +0 -1
  279. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
  280. package/dist/types/helpers/formatter/string-formatter/custom-formatter-strategy.d.ts +2 -1
  281. package/dist/types/helpers/formatter/string-formatter/number-mask-strategy.d.ts +2 -1
  282. package/dist/types/helpers/formatter/string-formatter/number-thousand-comma-strategy.d.ts +2 -1
  283. package/dist/types/helpers/formatter/string-formatter/string-format-strategy.abstract.d.ts +1 -0
  284. package/dist/types/helpers/formatter/string-formatter/string-mask-strategy.d.ts +32 -4
  285. package/dist/types/helpers/formatter/string-formatter/thousand-comma-strategy.d.ts +1 -0
  286. package/dist/types/helpers/keyboard/keyboard-manager.d.ts +1 -0
  287. package/dist/types/helpers/slimmers/aria-dialog-focusable-trap-slimmer.d.ts +19 -0
  288. package/dist/types/utils/ui.d.ts +3 -1
  289. package/dist/vega/index.esm.js +1 -1
  290. package/dist/vega/{p-8cd70b3b.js → p-010b5e74.js} +1 -1
  291. package/dist/vega/{p-33cacbd6.entry.js → p-01883ffc.entry.js} +1 -1
  292. package/dist/vega/{p-7f68abf7.js → p-02578a59.js} +1 -1
  293. package/dist/vega/{p-916ef5dd.entry.js → p-0313393d.entry.js} +1 -1
  294. package/dist/vega/p-043e685a.entry.js +1 -0
  295. package/dist/vega/{p-972c594b.entry.js → p-04e56b0c.entry.js} +1 -1
  296. package/dist/vega/p-07a2b42a.js +1 -0
  297. package/dist/vega/{p-fb92092b.entry.js → p-08780df0.entry.js} +1 -1
  298. package/dist/vega/p-10fa4eac.js +1 -0
  299. package/dist/vega/{p-19adff1f.entry.js → p-1557ed92.entry.js} +1 -1
  300. package/dist/vega/{p-405ab757.js → p-18619467.js} +1 -1
  301. package/dist/vega/{p-a5543b6a.entry.js → p-19ad4f15.entry.js} +1 -1
  302. package/dist/vega/{p-46c7763f.entry.js → p-1a2f92a3.entry.js} +1 -1
  303. package/dist/vega/{p-085d45c9.js → p-1c45565d.js} +1 -1
  304. package/dist/vega/{p-b91aff06.entry.js → p-1feb4f2a.entry.js} +1 -1
  305. package/dist/vega/{p-14dfdba3.entry.js → p-203bc4db.entry.js} +1 -1
  306. package/dist/vega/{p-6e13e2fc.js → p-204c7d41.js} +1 -1
  307. package/dist/vega/{p-833b79ad.entry.js → p-21c9e1ca.entry.js} +1 -1
  308. package/dist/vega/p-22336063.js +1 -0
  309. package/dist/vega/{p-1784724a.entry.js → p-224b67ff.entry.js} +1 -1
  310. package/dist/vega/{p-dccda3d1.js → p-2c2df248.js} +1 -1
  311. package/dist/vega/{p-667d5b80.entry.js → p-2d917e2d.entry.js} +1 -1
  312. package/dist/vega/{p-02bab5ea.entry.js → p-2e73582d.entry.js} +1 -1
  313. package/dist/vega/{p-b7dd3ef2.entry.js → p-334e3b02.entry.js} +1 -1
  314. package/dist/vega/{p-6554a801.js → p-33860e54.js} +1 -1
  315. package/dist/vega/{p-dba91c23.entry.js → p-35386999.entry.js} +1 -1
  316. package/dist/vega/{p-bc142c5c.entry.js → p-365d21ac.entry.js} +1 -1
  317. package/dist/vega/{p-fadeb5a2.entry.js → p-367d44d9.entry.js} +1 -1
  318. package/dist/vega/{p-a6ad6515.entry.js → p-382b71a3.entry.js} +1 -1
  319. package/dist/vega/{p-b67672ae.entry.js → p-434fc427.entry.js} +1 -1
  320. package/dist/vega/p-44c5cbb7.js +1 -0
  321. package/dist/vega/{p-408a1baa.entry.js → p-47ca1f69.entry.js} +1 -1
  322. package/dist/vega/{p-5d397ee0.entry.js → p-4eb282ef.entry.js} +1 -1
  323. package/dist/vega/{p-b589cafd.entry.js → p-517434d4.entry.js} +1 -1
  324. package/dist/vega/p-559197f8.js +1 -0
  325. package/dist/vega/{p-6e05fc55.js → p-576fe408.js} +1 -1
  326. package/dist/vega/p-5ae4ea20.entry.js +1 -0
  327. package/dist/vega/p-5f377954.js +1 -1
  328. package/dist/vega/{p-b15a2d4b.js → p-60cf2a68.js} +1 -1
  329. package/dist/vega/p-612e3ded.js +1 -0
  330. package/dist/vega/{p-679a4046.entry.js → p-65900dbf.entry.js} +1 -1
  331. package/dist/vega/p-68124bc5.js +1 -0
  332. package/dist/vega/{p-28ed34b3.entry.js → p-6af55f1c.entry.js} +1 -1
  333. package/dist/vega/{p-5b90bbfe.js → p-6c5250b3.js} +1 -1
  334. package/dist/vega/p-6f2e5bc6.js +1 -0
  335. package/dist/vega/{p-439c7c13.entry.js → p-70f1cf4e.entry.js} +1 -1
  336. package/dist/vega/{p-a02f77c7.js → p-716c71e6.js} +1 -1
  337. package/dist/vega/{p-d862195c.entry.js → p-7362723e.entry.js} +1 -1
  338. package/dist/vega/{p-28c8ffb4.js → p-7618dde4.js} +1 -1
  339. package/dist/vega/p-76b80a0c.js +1 -0
  340. package/dist/vega/{p-937d5317.entry.js → p-7912741f.entry.js} +1 -1
  341. package/dist/vega/{p-6b19d33a.entry.js → p-7942c042.entry.js} +1 -1
  342. package/dist/vega/{p-820906b8.entry.js → p-7c2fecfd.entry.js} +1 -1
  343. package/dist/vega/{p-02fec68b.entry.js → p-7ceab8c7.entry.js} +1 -1
  344. package/dist/vega/p-8327635d.js +1 -0
  345. package/dist/vega/{p-db29681a.entry.js → p-840ad046.entry.js} +1 -1
  346. package/dist/vega/{p-4068e7de.js → p-878851f6.js} +1 -1
  347. package/dist/vega/{p-a2161e9d.js → p-89e56502.js} +1 -1
  348. package/dist/vega/{p-9e6e76b2.entry.js → p-8adf9732.entry.js} +1 -1
  349. package/dist/vega/{p-18378017.entry.js → p-90137c68.entry.js} +1 -1
  350. package/dist/vega/p-9341c1a9.js +1 -0
  351. package/dist/vega/{p-cb0324e7.entry.js → p-9390a94b.entry.js} +1 -1
  352. package/dist/vega/p-9551da9c.entry.js +1 -0
  353. package/dist/vega/p-9862d1a8.entry.js +1 -0
  354. package/dist/vega/{p-2bbbdf87.entry.js → p-9dc23325.entry.js} +1 -1
  355. package/dist/vega/p-a4dbf2cc.js +1 -0
  356. package/dist/vega/{p-561e9097.entry.js → p-a99e75a1.entry.js} +1 -1
  357. package/dist/vega/{p-b4d72eff.entry.js → p-ab21fdf6.entry.js} +1 -1
  358. package/dist/vega/{p-fc3d6d9d.js → p-b3e40faf.js} +1 -1
  359. package/dist/vega/{p-4ea3cf5f.entry.js → p-b5a6bd0f.entry.js} +1 -1
  360. package/dist/vega/{p-5dfd36d3.entry.js → p-b5c2fff3.entry.js} +1 -1
  361. package/dist/vega/{p-a0a39ec3.js → p-b696a861.js} +1 -1
  362. package/dist/vega/{p-076c6445.entry.js → p-ba415db6.entry.js} +1 -1
  363. package/dist/vega/{p-814c37be.entry.js → p-be3517be.entry.js} +1 -1
  364. package/dist/vega/{p-615bc3de.entry.js → p-c045e4c1.entry.js} +1 -1
  365. package/dist/vega/{p-4e76a84d.entry.js → p-c4e32125.entry.js} +1 -1
  366. package/dist/vega/{p-20981b17.entry.js → p-c5b698f6.entry.js} +1 -1
  367. package/dist/vega/{p-71720290.entry.js → p-c61279a7.entry.js} +1 -1
  368. package/dist/vega/p-c6d62f0d.js +1 -0
  369. package/dist/vega/{p-4e15958f.js → p-c9201bf4.js} +1 -1
  370. package/dist/vega/{p-ace7aa6c.entry.js → p-cc055723.entry.js} +1 -1
  371. package/dist/vega/{p-fc93b467.entry.js → p-cca5042b.entry.js} +1 -1
  372. package/dist/vega/{p-c58c3e7e.entry.js → p-cda45d2a.entry.js} +1 -1
  373. package/dist/vega/p-cdf5b2f0.entry.js +1 -0
  374. package/dist/vega/p-cf70c57d.js +1 -0
  375. package/dist/vega/{p-441fd2b3.entry.js → p-d1494c7c.entry.js} +1 -1
  376. package/dist/vega/{p-a6fb81c5.js → p-d1ca70a1.js} +1 -1
  377. package/dist/vega/p-d202e69d.entry.js +1 -0
  378. package/dist/vega/{p-dd4c3d9b.entry.js → p-dc9b5063.entry.js} +1 -1
  379. package/dist/vega/{p-d6875e49.js → p-dcd18ab1.js} +1 -1
  380. package/dist/vega/p-df5bfbc4.entry.js +1 -0
  381. package/dist/vega/{p-d5a8bb62.entry.js → p-e4726dcd.entry.js} +1 -1
  382. package/dist/vega/{p-76f2e0f5.js → p-e84b95d4.js} +1 -1
  383. package/dist/vega/p-ea21462f.js +1 -0
  384. package/dist/vega/{p-905cf163.entry.js → p-ec1d76c6.entry.js} +1 -1
  385. package/dist/vega/{p-04f9b0d4.entry.js → p-f3456993.entry.js} +1 -1
  386. package/dist/vega/{p-32a0eed4.entry.js → p-f4190826.entry.js} +1 -1
  387. package/dist/vega/{p-558a707e.entry.js → p-f48c43f4.entry.js} +1 -1
  388. package/dist/vega/{p-1665d4b8.entry.js → p-fdac91c4.entry.js} +1 -1
  389. package/dist/vega/{p-5395faac.entry.js → p-ffa2e3a6.entry.js} +1 -1
  390. package/dist/vega/vega.esm.js +1 -1
  391. package/package.json +3 -2
  392. package/dist/collection/components/vega-calendar/slimmers/common/helpers/test/calendar-event-repeat-pattern-factory.test.js +0 -195
  393. package/dist/collection/components/vega-calendar/slimmers/common/layout/test/long-event-layout-generator.test.js +0 -94
  394. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/timed-event/layout/test/day-view-event-layout-generator.test.js +0 -72
  395. package/dist/collection/components/vega-code-block/test/code-block-range.test.js +0 -81
  396. package/dist/collection/components/vega-dropdown/test/share.js +0 -13
  397. package/dist/collection/components/vega-input-credit-card/test/share.js +0 -21
  398. package/dist/collection/components/vega-nav/vega-left-nav/test/vega-left-nav-mock-data.js +0 -147
  399. package/dist/collection/components/vega-rich-text-editor/helpers/extension-context-manager.test.js +0 -21
  400. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.js +0 -71
  401. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-delete-node-content-strategy.test.js +0 -69
  402. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.js +0 -24
  403. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/code-block-strategy-registry.test.js +0 -20
  404. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.js +0 -15
  405. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.js +0 -32
  406. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.js +0 -11
  407. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.js +0 -16
  408. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.js +0 -20
  409. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.js +0 -87
  410. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.js +0 -32
  411. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.js +0 -17
  412. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.js +0 -77
  413. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.js +0 -23
  414. package/dist/collection/components/vega-rich-text-editor/test/dto/annotation-actions.test.js +0 -39
  415. package/dist/collection/components/vega-rich-text-editor/test/dto/annotation-style.test.js +0 -71
  416. package/dist/collection/components/vega-rich-text-editor/test/dto/annotations.test.js +0 -381
  417. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/code-block.test.js +0 -54
  418. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/html-block.test.js +0 -167
  419. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/image-block.test.js +0 -90
  420. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-block.test.js +0 -176
  421. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-item.test.js +0 -188
  422. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/text-block.test.js +0 -193
  423. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +0 -3375
  424. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/image-node.test.js +0 -108
  425. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/text-node.test.js +0 -510
  426. package/dist/collection/components/vega-rich-text-editor/test/dto/range.test.js +0 -53
  427. package/dist/collection/components/vega-rich-text-editor/test/e2e-utils.js +0 -182
  428. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/custom-attribute-annotation-handler.test.js +0 -49
  429. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/element-to-text-node-strategy.test.js +0 -38
  430. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/html-element-to-annotation-generator.test.js +0 -26
  431. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/jira-code-to-rte-code-block-strategy.test.js +0 -32
  432. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/vega-code-block-to-rte-code-block-strategy.test.js +0 -61
  433. package/dist/collection/components/vega-rich-text-editor/test/extensions/extension-test-utils.js +0 -43
  434. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.js +0 -164
  435. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.js +0 -298
  436. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.js +0 -316
  437. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.js +0 -411
  438. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.js +0 -99
  439. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.js +0 -181
  440. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.js +0 -84
  441. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.js +0 -331
  442. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.js +0 -32
  443. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-dto.test.js +0 -1094
  444. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.js +0 -1590
  445. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-test-utils.js +0 -172
  446. package/dist/collection/components/vega-rich-text-editor/test/filter-styles-strategies/filter-styles-strategy.test.js +0 -129
  447. package/dist/collection/components/vega-rich-text-editor/test/fixture.js +0 -257
  448. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/html-content-cleaner.test.js +0 -186
  449. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-after-opening-tag-processor.test.js +0 -22
  450. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-before-closing-tag-processor.test.js +0 -22
  451. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-between-tags-processor.test.js +0 -26
  452. package/dist/collection/components/vega-rich-text-editor/test/spec-utils.js +0 -35
  453. package/dist/collection/components/vega-sidenav/test/test.helper.js +0 -68
  454. package/dist/collection/components/vega-table/slimmers/controllers/dto/test/column-render-input-model.test.js +0 -83
  455. package/dist/collection/components/vega-table/slimmers/controllers/dto/test/column-structure-model.test.js +0 -147
  456. package/dist/collection/components/vega-table/test/utils.js +0 -22
  457. package/dist/collection/components/vega-table/test/vega-table-sorter.test.js +0 -508
  458. package/dist/collection/constants/tests/validator.test.js +0 -24
  459. package/dist/collection/decorators/method-decorators/tests/component-load-required.test.js +0 -114
  460. package/dist/collection/decorators/property-decorators/tests/inject-element-appender-proxy.test.js +0 -237
  461. package/dist/collection/decorators/property-decorators/tests/inject-keyboard-manager.test.js +0 -91
  462. package/dist/collection/global/tests/before-vega-load.test.js +0 -62
  463. package/dist/collection/helpers/calendar/test/calendar-date-time.test.js +0 -27
  464. package/dist/collection/helpers/calendar/test/calendar-date.test.js +0 -172
  465. package/dist/collection/helpers/calendar/test/calendar-event.test.js +0 -263
  466. package/dist/collection/helpers/calendar/test/calendar-period/day-period.test.js +0 -118
  467. package/dist/collection/helpers/calendar/test/calendar-period/month-period.test.js +0 -144
  468. package/dist/collection/helpers/calendar/test/calendar-period/week-period.test.js +0 -114
  469. package/dist/collection/helpers/calendar/test/calendar-time.test.js +0 -45
  470. package/dist/collection/helpers/calendar/test/calendar-view-generator/day-view-generator.test.js +0 -19
  471. package/dist/collection/helpers/calendar/test/calendar-view-generator/month-view-generator.test.js +0 -123
  472. package/dist/collection/helpers/calendar/test/calendar-view-generator/week-view-generator.test.js +0 -43
  473. package/dist/collection/helpers/calendar/test/calendar-view.test.js +0 -9
  474. package/dist/collection/helpers/calendar/test/index.test.js +0 -13
  475. package/dist/collection/helpers/calendar/test/utils.test.js +0 -62
  476. package/dist/collection/helpers/change-manager/test/change-manager.test.js +0 -30
  477. package/dist/collection/helpers/change-manager/test/dom-node-subject-factory.test.js +0 -38
  478. package/dist/collection/helpers/chart/test/controllers/chart-dimension-controller.test.js +0 -63
  479. package/dist/collection/helpers/chart/test/drawers/arc-path-drawer.test.js +0 -55
  480. package/dist/collection/helpers/chart/test/drawers/legend-drawer.test.js +0 -94
  481. package/dist/collection/helpers/chart/test/drawers/line-drawer.test.js +0 -25
  482. package/dist/collection/helpers/chart/test/drawers/path-drawer.test.js +0 -21
  483. package/dist/collection/helpers/chart/test/drawers/rect-drawer.test.js +0 -78
  484. package/dist/collection/helpers/chart/test/drawers/text-drawer.test.js +0 -25
  485. package/dist/collection/helpers/chart/test/drawers/x-axis-drawer.test.js +0 -38
  486. package/dist/collection/helpers/chart/test/drawers/y-axis-drawer.test.js +0 -44
  487. package/dist/collection/helpers/chart/test/graph-context-factory.test.js +0 -17
  488. package/dist/collection/helpers/chart/test/input-processors/format-time-positions-input-processor.test.js +0 -62
  489. package/dist/collection/helpers/chart/test/input-processors/horizontal-x-axis-input-processor.test.js +0 -45
  490. package/dist/collection/helpers/chart/test/input-processors/horizontal-y-axis-input-processor.test.js +0 -80
  491. package/dist/collection/helpers/chart/test/input-processors/layout-input-processor.test.js +0 -40
  492. package/dist/collection/helpers/chart/test/input-processors/line-path-input-processor.test.js +0 -16
  493. package/dist/collection/helpers/chart/test/input-processors/pie-chart-filter-input-processor.test.js +0 -20
  494. package/dist/collection/helpers/chart/test/input-processors/pie-chart-radius-input-processor.test.js +0 -48
  495. package/dist/collection/helpers/chart/test/input-processors/sort-positions-input-processor.test.js +0 -53
  496. package/dist/collection/helpers/chart/test/input-processors/x-axis-input-processor.test.js +0 -78
  497. package/dist/collection/helpers/chart/test/input-processors/x-axis-label-formatter-input-processor.test.js +0 -109
  498. package/dist/collection/helpers/chart/test/input-processors/y-axis-input-processor.coverage.test.js +0 -39
  499. package/dist/collection/helpers/chart/test/input-processors/y-axis-input-processor.test.js +0 -55
  500. package/dist/collection/helpers/chart/test/interacting-entry-generator/arc-path-hover-generator.test.js +0 -11
  501. package/dist/collection/helpers/chart/test/interacting-entry-generator/pie-legend-hover-generator.test.js +0 -25
  502. package/dist/collection/helpers/chart/test/interactors/interactor-factory.test.js +0 -19
  503. package/dist/collection/helpers/chart/test/interactors/svg-interactor.test.js +0 -48
  504. package/dist/collection/helpers/chart/test/line-chart.test.js +0 -96
  505. package/dist/collection/helpers/chart/test/pie-chart.test.js +0 -38
  506. package/dist/collection/helpers/chart/test/renderers/canvas-renderer.test.js +0 -31
  507. package/dist/collection/helpers/chart/test/renderers/renderer-factory.test.js +0 -19
  508. package/dist/collection/helpers/chart/test/renderers/svg-renderer.test.js +0 -99
  509. package/dist/collection/helpers/code-format/test/code-formatter.test.js +0 -410
  510. package/dist/collection/helpers/common/test/common.test.js +0 -7
  511. package/dist/collection/helpers/common/test/wait-for-component-did-render.test.js +0 -67
  512. package/dist/collection/helpers/common/test/wait-for-vega-handler.test.js +0 -17
  513. package/dist/collection/helpers/csp/test/styles-preservator.test.js +0 -207
  514. package/dist/collection/helpers/csp/test/vega-nonce-manager.test.js +0 -177
  515. package/dist/collection/helpers/dialog/test/vega-dialog-controller.test.js +0 -114
  516. package/dist/collection/helpers/event-manager/test/child-nodes-event-prevent-slimmer.test.js +0 -209
  517. package/dist/collection/helpers/event-manager/test/child-nodes-notify-observer-slimmer.test.js +0 -81
  518. package/dist/collection/helpers/event-manager/test/component-event-id-map.test.js +0 -16
  519. package/dist/collection/helpers/event-manager/test/event-emit-slimmer.test.js +0 -144
  520. package/dist/collection/helpers/event-manager/test/internal-vega-event-manager.test.js +0 -70
  521. package/dist/collection/helpers/event-manager/test/jquery-delegated-strategy-controller.test.js +0 -131
  522. package/dist/collection/helpers/event-manager/test/vega-event-id.test.js +0 -16
  523. package/dist/collection/helpers/event-manager/test/vega-event-manager.test.js +0 -97
  524. package/dist/collection/helpers/feature-control/tests/feature-flag-controller.test.js +0 -69
  525. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-formatter.test.js +0 -64
  526. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-style-formatter.test.js +0 -32
  527. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-box-display-formatter.test.js +0 -31
  528. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-custom-formatter.test.js +0 -17
  529. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-display-formatter.test.js +0 -23
  530. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-flex-direction-formatter.test.js +0 -19
  531. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-flex-wrap-formatter.test.js +0 -19
  532. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-format-mediator.test.js +0 -43
  533. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-gap-formatter.ts.test.js +0 -29
  534. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-grid-column-formatter.test.js +0 -23
  535. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-grid-justify-items-formatter.test.js +0 -19
  536. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-grid-row-formatter.test.js +0 -27
  537. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-margin-formatter.test.js +0 -43
  538. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-margin-style-formatter.test.js +0 -28
  539. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-padding-formatter.test.js +0 -43
  540. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-padding-style-formatter.test.js +0 -28
  541. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-size-formatter.test.js +0 -27
  542. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-text-align-formatter.test.js +0 -19
  543. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-translocation-formatter.test.js +0 -51
  544. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-width-and-height-formatter.test.js +0 -20
  545. package/dist/collection/helpers/formatter/test/state-formatter/state-background-color-formatter.test.js +0 -18
  546. package/dist/collection/helpers/formatter/test/state-formatter/state-border-color-formatter.test.js +0 -13
  547. package/dist/collection/helpers/formatter/test/state-formatter/state-border-formatter.test.js +0 -13
  548. package/dist/collection/helpers/formatter/test/state-formatter/state-format-facade.test.js +0 -27
  549. package/dist/collection/helpers/formatter/test/state-formatter/state-shadow-formatter.test.js +0 -13
  550. package/dist/collection/helpers/formatter/test/string-formatter/custom-formatter-strategy.test.js +0 -13
  551. package/dist/collection/helpers/formatter/test/string-formatter/number-mask-strategy.test.js +0 -101
  552. package/dist/collection/helpers/formatter/test/string-formatter/number-thousand-comma-mask-strategy.test.js +0 -40
  553. package/dist/collection/helpers/formatter/test/string-formatter/string-mask-strategy.test.js +0 -147
  554. package/dist/collection/helpers/formatter/test/string-formatter/thousand-comma-strategy.test.js +0 -21
  555. package/dist/collection/helpers/formatter/test/string-formatter/vega-phone-number-input-strategy.test.js +0 -43
  556. package/dist/collection/helpers/formatter/test/style-formatter.test.js +0 -16
  557. package/dist/collection/helpers/icon/test/icon-manager-controller.test.js +0 -101
  558. package/dist/collection/helpers/icon/test/internal-icon-manager.test.js +0 -18
  559. package/dist/collection/helpers/immutable/test/immutable-array.test.js +0 -78
  560. package/dist/collection/helpers/immutable/test/immutable-map.test.js +0 -83
  561. package/dist/collection/helpers/immutable/test/immutable-set.test.js +0 -87
  562. package/dist/collection/helpers/keyboard/test/keyboard-manager.test.js +0 -241
  563. package/dist/collection/helpers/level-tracker/test/nested-level-tracker.test.js +0 -33
  564. package/dist/collection/helpers/loading-indicator/tests/vega-loader-controller.test.js +0 -192
  565. package/dist/collection/helpers/notify/tests/vega-notify-controller.test.js +0 -165
  566. package/dist/collection/helpers/paginator/test/value-paginator.test.js +0 -15
  567. package/dist/collection/helpers/queue/test/synchronize-task-queue.test.js +0 -76
  568. package/dist/collection/helpers/remote-invocation/remote-invocation-registry.test.js +0 -17
  569. package/dist/collection/helpers/rte-manager/rte.manager.test.js +0 -94
  570. package/dist/collection/helpers/skeleton-loader/tests/vega-skeleton-loader-controller.test.js +0 -194
  571. package/dist/collection/helpers/slimmers/element-appender/body-positioned-wrapper/test/vega-popover-wrapper.test.js +0 -66
  572. package/dist/collection/helpers/slimmers/element-appender/test/element-appender-slimmer.test.js +0 -621
  573. package/dist/collection/helpers/slimmers/mutation-observer/test/aria-attributes-value-mapper.test.js +0 -248
  574. package/dist/collection/helpers/slimmers/mutation-observer/test/data-tab-index-value-mapper.test.js +0 -120
  575. package/dist/collection/helpers/slimmers/mutation-observer/test/mutation-observer-slimmer.test.js +0 -182
  576. package/dist/collection/helpers/slimmers/position-calculation/test/body-position-calculation-strategy.test.js +0 -399
  577. package/dist/collection/helpers/slimmers/position-calculation/test/screen-position-calculation-strategy.test.js +0 -383
  578. package/dist/collection/helpers/slimmers/runtime-metrics/test/public-api-runtime-metrics-slimmer-base.test.js +0 -96
  579. package/dist/collection/helpers/slimmers/sub-state/test/sub-state-observer-slimmer.test.js +0 -228
  580. package/dist/collection/helpers/slimmers/test/aria-dialog-focusable-trap-slimmer.test.js +0 -375
  581. package/dist/collection/helpers/slimmers/test/auto-run-when-re-render-task-queue-slimmer.test.js +0 -46
  582. package/dist/collection/helpers/slimmers/test/brand-switch-state-controller-slimmer.test.js +0 -75
  583. package/dist/collection/helpers/slimmers/test/component-global-style-slimmer.test.js +0 -104
  584. package/dist/collection/helpers/slimmers/test/component-usage-runtime-metrics.test.js +0 -72
  585. package/dist/collection/helpers/slimmers/test/dark-mode-state-controller.test.js +0 -65
  586. package/dist/collection/helpers/slimmers/test/deprecated-property-slimmer.test.js +0 -36
  587. package/dist/collection/helpers/slimmers/test/field-error-controller-slimmer.test.js +0 -55
  588. package/dist/collection/helpers/slimmers/test/form-field-controller-slimmer.test.js +0 -278
  589. package/dist/collection/helpers/slimmers/test/form-field-valid-invoke-slimmer.test.js +0 -106
  590. package/dist/collection/helpers/slimmers/test/global/vega-nonce-injector-slimmer.test.js +0 -64
  591. package/dist/collection/helpers/slimmers/test/global/vega-translate-observer-slimmer.test.js +0 -89
  592. package/dist/collection/helpers/slimmers/test/global/vega-watch-method-cancel-slimmer.test.js +0 -101
  593. package/dist/collection/helpers/slimmers/test/keyboard-manager-slimmer.test.js +0 -90
  594. package/dist/collection/helpers/slimmers/test/page-resize-observer-slimmer.test.js +0 -278
  595. package/dist/collection/helpers/slimmers/test/string-input-formatter-slimmer.test.js +0 -220
  596. package/dist/collection/helpers/slimmers/test/translation-slimmer.test.js +0 -89
  597. package/dist/collection/helpers/theme/tests/theme-manager-controller.test.js +0 -614
  598. package/dist/collection/helpers/touch-helper/test/touch-listener.test.js +0 -122
  599. package/dist/collection/helpers/translation/tests/internal-translation-controller.test.js +0 -288
  600. package/dist/collection/helpers/translation/tests/translation.test.js +0 -46
  601. package/dist/collection/helpers/ui/test/element-appender.test.js +0 -530
  602. package/dist/collection/helpers/validator/test/rules/check-box-required-rule.test.js +0 -88
  603. package/dist/collection/helpers/validator/test/rules/custom-validation-rule.test.js +0 -56
  604. package/dist/collection/helpers/validator/test/rules/date-range-rule.test.js +0 -67
  605. package/dist/collection/helpers/validator/test/rules/date-required-rule.test.js +0 -120
  606. package/dist/collection/helpers/validator/test/rules/email-field-rule.test.js +0 -69
  607. package/dist/collection/helpers/validator/test/rules/file-uploader-required-rule.test.js +0 -7
  608. package/dist/collection/helpers/validator/test/rules/input-phone-number-required-rule.test.js +0 -105
  609. package/dist/collection/helpers/validator/test/rules/input-range-min-and-max-rule.test.js +0 -146
  610. package/dist/collection/helpers/validator/test/rules/input-range-required-rule.test.js +0 -82
  611. package/dist/collection/helpers/validator/test/rules/input-select-value-in-source-rule.test.js +0 -99
  612. package/dist/collection/helpers/validator/test/rules/max-number-rule.test.js +0 -97
  613. package/dist/collection/helpers/validator/test/rules/max-string-length-rule.test.js +0 -85
  614. package/dist/collection/helpers/validator/test/rules/min-and-max-date-rule.test.js +0 -174
  615. package/dist/collection/helpers/validator/test/rules/min-number-rule.test.js +0 -97
  616. package/dist/collection/helpers/validator/test/rules/min-string-length-rule.test.js +0 -85
  617. package/dist/collection/helpers/validator/test/rules/public-rules.test.js +0 -80
  618. package/dist/collection/helpers/validator/test/rules/required-field-rule.test.js +0 -126
  619. package/dist/collection/helpers/validator/test/rules/rich-text-editor-required-rule.test.js +0 -360
  620. package/dist/collection/helpers/validator/test/rules/time-range-required-rule.test.js +0 -82
  621. package/dist/collection/helpers/validator/test/rules/time-range-rule.test.js +0 -67
  622. package/dist/collection/helpers/validator/test/rules/time-required-rule.test.js +0 -116
  623. package/dist/collection/helpers/validator/test/rules/toggle-switch-required-rule.test.js +0 -72
  624. package/dist/collection/helpers/validator/test/rules/valid-credit-card-number-rule.test.js +0 -135
  625. package/dist/collection/helpers/validator/test/rules/valid-phone-number-rule.test.js +0 -95
  626. package/dist/collection/helpers/validator/test/validation-rule-handler/form-field-validation-rule-handler-chain.test.js +0 -65
  627. package/dist/collection/helpers/validator/test/validation-rule-handler/form-field-validation-rule-handler.test.js +0 -82
  628. package/dist/collection/helpers/validator/test/validator/form-field-controller.test.js +0 -205
  629. package/dist/collection/helpers/vega-telemetry-helper/test/vega-env-manager.test.js +0 -14
  630. package/dist/collection/helpers/zindex/test/internal-vega-z-index-manager.test.js +0 -176
  631. package/dist/collection/helpers/zindex/test/vega-z-index-manager.test.js +0 -46
  632. package/dist/collection/polyfill/d3/test/d3-array-polyfill.test.js +0 -72
  633. package/dist/collection/polyfill/d3/test/d3-axis-polyfill.test.js +0 -171
  634. package/dist/collection/polyfill/d3/test/d3-integration.test.js +0 -137
  635. package/dist/collection/polyfill/d3/test/d3-scale-polyfill.test.js +0 -382
  636. package/dist/collection/polyfill/d3/test/d3-selection-polyfill.test.js +0 -239
  637. package/dist/collection/polyfill/d3/test/d3-shape-polyfill.test.js +0 -225
  638. package/dist/collection/polyfill/d3/test/d3-time-format-polyfill.test.js +0 -162
  639. package/dist/collection/polyfill/d3/test/d3-time-polyfill.test.js +0 -76
  640. package/dist/collection/polyfill/d3/test/index.test.js +0 -78
  641. package/dist/collection/polyfill/libphonenumber/test/as-you-type.test.js +0 -309
  642. package/dist/collection/polyfill/libphonenumber/test/format-helpers.test.js +0 -192
  643. package/dist/collection/polyfill/libphonenumber/test/index.test.js +0 -16
  644. package/dist/collection/polyfill/libphonenumber/test/metadata.test.js +0 -196
  645. package/dist/collection/polyfill/libphonenumber/test/parse-phone-number.test.js +0 -218
  646. package/dist/collection/polyfill/libphonenumber/test/phone-number.test.js +0 -56
  647. package/dist/collection/polyfill/prism/test/css.test.js +0 -61
  648. package/dist/collection/polyfill/prism/test/javascript.test.js +0 -113
  649. package/dist/collection/polyfill/prism/test/jsx.test.js +0 -48
  650. package/dist/collection/polyfill/prism/test/language-registry.test.js +0 -77
  651. package/dist/collection/polyfill/prism/test/markup.test.js +0 -57
  652. package/dist/collection/polyfill/prism/test/test-utils.js +0 -22
  653. package/dist/collection/polyfill/prism/test/tokenizer.test.js +0 -180
  654. package/dist/collection/polyfill/prism/test/tsx.test.js +0 -87
  655. package/dist/collection/polyfill/prism/test/typescript.test.js +0 -86
  656. package/dist/collection/polyfill/shadow-selection/test/shadow-selection-polyfill.test.js +0 -234
  657. package/dist/collection/polyfill/test-polyfill/e2e/retry.js +0 -42
  658. package/dist/collection/polyfill/test-polyfill/unit/create-touch-event.js +0 -31
  659. package/dist/collection/polyfill/test-polyfill/unit/events.js +0 -100
  660. package/dist/collection/polyfill/test-polyfill/unit/index.js +0 -3
  661. package/dist/collection/polyfill/test-polyfill/unit/methods.js +0 -47
  662. package/dist/collection/polyfill/test-polyfill/unit/range.js +0 -15
  663. package/dist/collection/polyfill/test-polyfill/unit/shadow-selection.js +0 -17
  664. package/dist/collection/polyfill/tinycolor/tinycolor-polyfill.test.js +0 -361
  665. package/dist/collection/test-assets/test-icons.js +0 -5
  666. package/dist/collection/types/test/type-guard.test.js +0 -46
  667. package/dist/collection/utils/e2e-utils.js +0 -389
  668. package/dist/collection/utils/sanitize/test/empty-strategy.test.js +0 -12
  669. package/dist/collection/utils/sanitize/test/html-sanitizer.test.js +0 -57
  670. package/dist/collection/utils/sanitize/test/label-strategy.test.js +0 -56
  671. package/dist/collection/utils/sanitize/test/sanitize-strategy.test.js +0 -85
  672. package/dist/collection/utils/sanitize/test/sanitize.test.js +0 -22
  673. package/dist/collection/utils/sanitize/test/serialize-fragment.test.js +0 -25
  674. package/dist/collection/utils/sanitize/test/style-strategy.test.js +0 -45
  675. package/dist/collection/utils/spec-utils.js +0 -226
  676. package/dist/collection/utils/test/accessibility.test.js +0 -40
  677. package/dist/collection/utils/test/api.test.js +0 -34
  678. package/dist/collection/utils/test/array.test.js +0 -260
  679. package/dist/collection/utils/test/breakpoint.test.js +0 -37
  680. package/dist/collection/utils/test/component.test.js +0 -59
  681. package/dist/collection/utils/test/date.test.js +0 -104
  682. package/dist/collection/utils/test/design-token.test.js +0 -91
  683. package/dist/collection/utils/test/effect.test.js +0 -64
  684. package/dist/collection/utils/test/local-storage.test.js +0 -38
  685. package/dist/collection/utils/test/log.test.js +0 -49
  686. package/dist/collection/utils/test/misc.test.js +0 -40
  687. package/dist/collection/utils/test/number.test.js +0 -18
  688. package/dist/collection/utils/test/object.test.js +0 -77
  689. package/dist/collection/utils/test/pagination.test.js +0 -40
  690. package/dist/collection/utils/test/pixel.test.js +0 -29
  691. package/dist/collection/utils/test/safe-document.test.js +0 -13
  692. package/dist/collection/utils/test/spec-utils.test.js +0 -73
  693. package/dist/collection/utils/test/string.test.js +0 -8
  694. package/dist/collection/utils/test/test-utils.test.js +0 -70
  695. package/dist/collection/utils/test/timer.test.js +0 -16
  696. package/dist/collection/utils/test/ui.test.js +0 -301
  697. package/dist/collection/utils/test-utils.js +0 -156
  698. package/dist/types/components/vega-calendar/slimmers/common/helpers/test/calendar-event-repeat-pattern-factory.test.d.ts +0 -1
  699. package/dist/types/components/vega-calendar/slimmers/common/layout/test/long-event-layout-generator.test.d.ts +0 -1
  700. package/dist/types/components/vega-calendar/slimmers/day-view/renderers/timed-event/layout/test/day-view-event-layout-generator.test.d.ts +0 -1
  701. package/dist/types/components/vega-code-block/test/code-block-range.test.d.ts +0 -1
  702. package/dist/types/components/vega-dropdown/test/share.d.ts +0 -12
  703. package/dist/types/components/vega-input-credit-card/test/share.d.ts +0 -18
  704. package/dist/types/components/vega-nav/vega-left-nav/test/vega-left-nav-mock-data.d.ts +0 -4
  705. package/dist/types/components/vega-rich-text-editor/helpers/extension-context-manager.test.d.ts +0 -1
  706. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.d.ts +0 -1
  707. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-delete-node-content-strategy.test.d.ts +0 -1
  708. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.d.ts +0 -1
  709. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/code-block-strategy-registry.test.d.ts +0 -1
  710. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.d.ts +0 -1
  711. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.d.ts +0 -1
  712. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.d.ts +0 -1
  713. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.d.ts +0 -1
  714. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.d.ts +0 -1
  715. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.d.ts +0 -1
  716. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.d.ts +0 -1
  717. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.d.ts +0 -1
  718. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.d.ts +0 -1
  719. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.d.ts +0 -1
  720. package/dist/types/components/vega-rich-text-editor/test/dto/annotation-actions.test.d.ts +0 -1
  721. package/dist/types/components/vega-rich-text-editor/test/dto/annotation-style.test.d.ts +0 -1
  722. package/dist/types/components/vega-rich-text-editor/test/dto/annotations.test.d.ts +0 -1
  723. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/code-block.test.d.ts +0 -1
  724. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/html-block.test.d.ts +0 -1
  725. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/image-block.test.d.ts +0 -1
  726. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/list-block.test.d.ts +0 -1
  727. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/list-item.test.d.ts +0 -1
  728. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/text-block.test.d.ts +0 -1
  729. package/dist/types/components/vega-rich-text-editor/test/dto/content-state.test.d.ts +0 -1
  730. package/dist/types/components/vega-rich-text-editor/test/dto/nodes/image-node.test.d.ts +0 -1
  731. package/dist/types/components/vega-rich-text-editor/test/dto/nodes/text-node.test.d.ts +0 -1
  732. package/dist/types/components/vega-rich-text-editor/test/dto/range.test.d.ts +0 -1
  733. package/dist/types/components/vega-rich-text-editor/test/e2e-utils.d.ts +0 -67
  734. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/custom-attribute-annotation-handler.test.d.ts +0 -1
  735. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/element-to-text-node-strategy.test.d.ts +0 -1
  736. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/html-element-to-annotation-generator.test.d.ts +0 -1
  737. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/jira-code-to-rte-code-block-strategy.test.d.ts +0 -1
  738. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/vega-code-block-to-rte-code-block-strategy.test.d.ts +0 -1
  739. package/dist/types/components/vega-rich-text-editor/test/extensions/extension-test-utils.d.ts +0 -21
  740. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.d.ts +0 -1
  741. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.d.ts +0 -1
  742. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.d.ts +0 -8
  743. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.d.ts +0 -1
  744. package/dist/types/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.d.ts +0 -1
  745. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.d.ts +0 -1
  746. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.d.ts +0 -1
  747. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.d.ts +0 -1
  748. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.d.ts +0 -1
  749. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-dto.test.d.ts +0 -1
  750. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.d.ts +0 -1
  751. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-test-utils.d.ts +0 -11
  752. package/dist/types/components/vega-rich-text-editor/test/filter-styles-strategies/filter-styles-strategy.test.d.ts +0 -1
  753. package/dist/types/components/vega-rich-text-editor/test/fixture.d.ts +0 -19
  754. package/dist/types/components/vega-rich-text-editor/test/html-cleaner/html-content-cleaner.test.d.ts +0 -1
  755. package/dist/types/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-after-opening-tag-processor.test.d.ts +0 -1
  756. package/dist/types/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-before-closing-tag-processor.test.d.ts +0 -1
  757. package/dist/types/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-between-tags-processor.test.d.ts +0 -1
  758. package/dist/types/components/vega-rich-text-editor/test/spec-utils.d.ts +0 -19
  759. package/dist/types/components/vega-sidenav/test/test.helper.d.ts +0 -6
  760. package/dist/types/components/vega-table/slimmers/controllers/dto/test/column-render-input-model.test.d.ts +0 -1
  761. package/dist/types/components/vega-table/slimmers/controllers/dto/test/column-structure-model.test.d.ts +0 -1
  762. package/dist/types/components/vega-table/test/utils.d.ts +0 -9
  763. package/dist/types/components/vega-table/test/vega-table-sorter.test.d.ts +0 -1
  764. package/dist/types/constants/tests/validator.test.d.ts +0 -1
  765. package/dist/types/decorators/method-decorators/tests/component-load-required.test.d.ts +0 -1
  766. package/dist/types/decorators/property-decorators/tests/inject-element-appender-proxy.test.d.ts +0 -1
  767. package/dist/types/decorators/property-decorators/tests/inject-keyboard-manager.test.d.ts +0 -1
  768. package/dist/types/global/tests/before-vega-load.test.d.ts +0 -1
  769. package/dist/types/helpers/calendar/test/calendar-date-time.test.d.ts +0 -1
  770. package/dist/types/helpers/calendar/test/calendar-date.test.d.ts +0 -1
  771. package/dist/types/helpers/calendar/test/calendar-event.test.d.ts +0 -1
  772. package/dist/types/helpers/calendar/test/calendar-period/day-period.test.d.ts +0 -1
  773. package/dist/types/helpers/calendar/test/calendar-period/month-period.test.d.ts +0 -1
  774. package/dist/types/helpers/calendar/test/calendar-period/week-period.test.d.ts +0 -1
  775. package/dist/types/helpers/calendar/test/calendar-time.test.d.ts +0 -1
  776. package/dist/types/helpers/calendar/test/calendar-view-generator/day-view-generator.test.d.ts +0 -1
  777. package/dist/types/helpers/calendar/test/calendar-view-generator/month-view-generator.test.d.ts +0 -1
  778. package/dist/types/helpers/calendar/test/calendar-view-generator/week-view-generator.test.d.ts +0 -1
  779. package/dist/types/helpers/calendar/test/calendar-view.test.d.ts +0 -1
  780. package/dist/types/helpers/calendar/test/index.test.d.ts +0 -1
  781. package/dist/types/helpers/calendar/test/utils.test.d.ts +0 -1
  782. package/dist/types/helpers/change-manager/test/change-manager.test.d.ts +0 -1
  783. package/dist/types/helpers/change-manager/test/dom-node-subject-factory.test.d.ts +0 -1
  784. package/dist/types/helpers/chart/test/controllers/chart-dimension-controller.test.d.ts +0 -1
  785. package/dist/types/helpers/chart/test/drawers/arc-path-drawer.test.d.ts +0 -1
  786. package/dist/types/helpers/chart/test/drawers/legend-drawer.test.d.ts +0 -1
  787. package/dist/types/helpers/chart/test/drawers/line-drawer.test.d.ts +0 -1
  788. package/dist/types/helpers/chart/test/drawers/path-drawer.test.d.ts +0 -1
  789. package/dist/types/helpers/chart/test/drawers/rect-drawer.test.d.ts +0 -1
  790. package/dist/types/helpers/chart/test/drawers/text-drawer.test.d.ts +0 -1
  791. package/dist/types/helpers/chart/test/drawers/x-axis-drawer.test.d.ts +0 -1
  792. package/dist/types/helpers/chart/test/drawers/y-axis-drawer.test.d.ts +0 -1
  793. package/dist/types/helpers/chart/test/graph-context-factory.test.d.ts +0 -1
  794. package/dist/types/helpers/chart/test/input-processors/format-time-positions-input-processor.test.d.ts +0 -1
  795. package/dist/types/helpers/chart/test/input-processors/horizontal-x-axis-input-processor.test.d.ts +0 -1
  796. package/dist/types/helpers/chart/test/input-processors/horizontal-y-axis-input-processor.test.d.ts +0 -1
  797. package/dist/types/helpers/chart/test/input-processors/layout-input-processor.test.d.ts +0 -1
  798. package/dist/types/helpers/chart/test/input-processors/line-path-input-processor.test.d.ts +0 -1
  799. package/dist/types/helpers/chart/test/input-processors/pie-chart-filter-input-processor.test.d.ts +0 -1
  800. package/dist/types/helpers/chart/test/input-processors/pie-chart-radius-input-processor.test.d.ts +0 -1
  801. package/dist/types/helpers/chart/test/input-processors/sort-positions-input-processor.test.d.ts +0 -1
  802. package/dist/types/helpers/chart/test/input-processors/x-axis-input-processor.test.d.ts +0 -1
  803. package/dist/types/helpers/chart/test/input-processors/x-axis-label-formatter-input-processor.test.d.ts +0 -1
  804. package/dist/types/helpers/chart/test/input-processors/y-axis-input-processor.coverage.test.d.ts +0 -1
  805. package/dist/types/helpers/chart/test/input-processors/y-axis-input-processor.test.d.ts +0 -1
  806. package/dist/types/helpers/chart/test/interacting-entry-generator/arc-path-hover-generator.test.d.ts +0 -1
  807. package/dist/types/helpers/chart/test/interacting-entry-generator/pie-legend-hover-generator.test.d.ts +0 -1
  808. package/dist/types/helpers/chart/test/interactors/interactor-factory.test.d.ts +0 -1
  809. package/dist/types/helpers/chart/test/interactors/svg-interactor.test.d.ts +0 -1
  810. package/dist/types/helpers/chart/test/line-chart.test.d.ts +0 -1
  811. package/dist/types/helpers/chart/test/pie-chart.test.d.ts +0 -1
  812. package/dist/types/helpers/chart/test/renderers/canvas-renderer.test.d.ts +0 -1
  813. package/dist/types/helpers/chart/test/renderers/renderer-factory.test.d.ts +0 -1
  814. package/dist/types/helpers/chart/test/renderers/svg-renderer.test.d.ts +0 -1
  815. package/dist/types/helpers/code-format/test/code-formatter.test.d.ts +0 -1
  816. package/dist/types/helpers/common/test/common.test.d.ts +0 -1
  817. package/dist/types/helpers/common/test/wait-for-component-did-render.test.d.ts +0 -1
  818. package/dist/types/helpers/common/test/wait-for-vega-handler.test.d.ts +0 -1
  819. package/dist/types/helpers/csp/test/styles-preservator.test.d.ts +0 -1
  820. package/dist/types/helpers/csp/test/vega-nonce-manager.test.d.ts +0 -1
  821. package/dist/types/helpers/dialog/test/vega-dialog-controller.test.d.ts +0 -1
  822. package/dist/types/helpers/event-manager/test/child-nodes-event-prevent-slimmer.test.d.ts +0 -1
  823. package/dist/types/helpers/event-manager/test/child-nodes-notify-observer-slimmer.test.d.ts +0 -1
  824. package/dist/types/helpers/event-manager/test/component-event-id-map.test.d.ts +0 -1
  825. package/dist/types/helpers/event-manager/test/event-emit-slimmer.test.d.ts +0 -1
  826. package/dist/types/helpers/event-manager/test/internal-vega-event-manager.test.d.ts +0 -1
  827. package/dist/types/helpers/event-manager/test/jquery-delegated-strategy-controller.test.d.ts +0 -1
  828. package/dist/types/helpers/event-manager/test/vega-event-id.test.d.ts +0 -1
  829. package/dist/types/helpers/event-manager/test/vega-event-manager.test.d.ts +0 -1
  830. package/dist/types/helpers/feature-control/tests/feature-flag-controller.test.d.ts +0 -1
  831. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-formatter.test.d.ts +0 -1
  832. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-style-formatter.test.d.ts +0 -1
  833. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-box-display-formatter.test.d.ts +0 -1
  834. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-custom-formatter.test.d.ts +0 -1
  835. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-display-formatter.test.d.ts +0 -1
  836. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-flex-direction-formatter.test.d.ts +0 -1
  837. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-flex-wrap-formatter.test.d.ts +0 -1
  838. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-format-mediator.test.d.ts +0 -1
  839. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-gap-formatter.ts.test.d.ts +0 -1
  840. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-grid-column-formatter.test.d.ts +0 -1
  841. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-grid-justify-items-formatter.test.d.ts +0 -1
  842. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-grid-row-formatter.test.d.ts +0 -1
  843. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-margin-formatter.test.d.ts +0 -1
  844. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-margin-style-formatter.test.d.ts +0 -1
  845. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-padding-formatter.test.d.ts +0 -1
  846. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-padding-style-formatter.test.d.ts +0 -1
  847. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-size-formatter.test.d.ts +0 -1
  848. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-text-align-formatter.test.d.ts +0 -1
  849. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-translocation-formatter.test.d.ts +0 -1
  850. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-width-and-height-formatter.test.d.ts +0 -1
  851. package/dist/types/helpers/formatter/test/state-formatter/state-background-color-formatter.test.d.ts +0 -1
  852. package/dist/types/helpers/formatter/test/state-formatter/state-border-color-formatter.test.d.ts +0 -1
  853. package/dist/types/helpers/formatter/test/state-formatter/state-border-formatter.test.d.ts +0 -1
  854. package/dist/types/helpers/formatter/test/state-formatter/state-format-facade.test.d.ts +0 -1
  855. package/dist/types/helpers/formatter/test/state-formatter/state-shadow-formatter.test.d.ts +0 -1
  856. package/dist/types/helpers/formatter/test/string-formatter/custom-formatter-strategy.test.d.ts +0 -1
  857. package/dist/types/helpers/formatter/test/string-formatter/number-mask-strategy.test.d.ts +0 -1
  858. package/dist/types/helpers/formatter/test/string-formatter/number-thousand-comma-mask-strategy.test.d.ts +0 -1
  859. package/dist/types/helpers/formatter/test/string-formatter/string-mask-strategy.test.d.ts +0 -1
  860. package/dist/types/helpers/formatter/test/string-formatter/thousand-comma-strategy.test.d.ts +0 -1
  861. package/dist/types/helpers/formatter/test/string-formatter/vega-phone-number-input-strategy.test.d.ts +0 -1
  862. package/dist/types/helpers/formatter/test/style-formatter.test.d.ts +0 -1
  863. package/dist/types/helpers/icon/test/icon-manager-controller.test.d.ts +0 -1
  864. package/dist/types/helpers/icon/test/internal-icon-manager.test.d.ts +0 -1
  865. package/dist/types/helpers/immutable/test/immutable-array.test.d.ts +0 -1
  866. package/dist/types/helpers/immutable/test/immutable-map.test.d.ts +0 -1
  867. package/dist/types/helpers/immutable/test/immutable-set.test.d.ts +0 -1
  868. package/dist/types/helpers/keyboard/test/keyboard-manager.test.d.ts +0 -1
  869. package/dist/types/helpers/level-tracker/test/nested-level-tracker.test.d.ts +0 -1
  870. package/dist/types/helpers/loading-indicator/tests/vega-loader-controller.test.d.ts +0 -1
  871. package/dist/types/helpers/notify/tests/vega-notify-controller.test.d.ts +0 -1
  872. package/dist/types/helpers/paginator/test/value-paginator.test.d.ts +0 -1
  873. package/dist/types/helpers/queue/test/synchronize-task-queue.test.d.ts +0 -1
  874. package/dist/types/helpers/remote-invocation/remote-invocation-registry.test.d.ts +0 -1
  875. package/dist/types/helpers/rte-manager/rte.manager.test.d.ts +0 -1
  876. package/dist/types/helpers/skeleton-loader/tests/vega-skeleton-loader-controller.test.d.ts +0 -1
  877. package/dist/types/helpers/slimmers/element-appender/body-positioned-wrapper/test/vega-popover-wrapper.test.d.ts +0 -1
  878. package/dist/types/helpers/slimmers/element-appender/test/element-appender-slimmer.test.d.ts +0 -1
  879. package/dist/types/helpers/slimmers/mutation-observer/test/aria-attributes-value-mapper.test.d.ts +0 -1
  880. package/dist/types/helpers/slimmers/mutation-observer/test/data-tab-index-value-mapper.test.d.ts +0 -1
  881. package/dist/types/helpers/slimmers/mutation-observer/test/mutation-observer-slimmer.test.d.ts +0 -1
  882. package/dist/types/helpers/slimmers/position-calculation/test/body-position-calculation-strategy.test.d.ts +0 -15
  883. package/dist/types/helpers/slimmers/position-calculation/test/screen-position-calculation-strategy.test.d.ts +0 -1
  884. package/dist/types/helpers/slimmers/runtime-metrics/test/public-api-runtime-metrics-slimmer-base.test.d.ts +0 -1
  885. package/dist/types/helpers/slimmers/sub-state/test/sub-state-observer-slimmer.test.d.ts +0 -1
  886. package/dist/types/helpers/slimmers/test/aria-dialog-focusable-trap-slimmer.test.d.ts +0 -1
  887. package/dist/types/helpers/slimmers/test/auto-run-when-re-render-task-queue-slimmer.test.d.ts +0 -1
  888. package/dist/types/helpers/slimmers/test/brand-switch-state-controller-slimmer.test.d.ts +0 -1
  889. package/dist/types/helpers/slimmers/test/component-global-style-slimmer.test.d.ts +0 -1
  890. package/dist/types/helpers/slimmers/test/component-usage-runtime-metrics.test.d.ts +0 -1
  891. package/dist/types/helpers/slimmers/test/dark-mode-state-controller.test.d.ts +0 -1
  892. package/dist/types/helpers/slimmers/test/deprecated-property-slimmer.test.d.ts +0 -1
  893. package/dist/types/helpers/slimmers/test/field-error-controller-slimmer.test.d.ts +0 -1
  894. package/dist/types/helpers/slimmers/test/form-field-controller-slimmer.test.d.ts +0 -1
  895. package/dist/types/helpers/slimmers/test/form-field-valid-invoke-slimmer.test.d.ts +0 -1
  896. package/dist/types/helpers/slimmers/test/global/vega-nonce-injector-slimmer.test.d.ts +0 -1
  897. package/dist/types/helpers/slimmers/test/global/vega-translate-observer-slimmer.test.d.ts +0 -1
  898. package/dist/types/helpers/slimmers/test/global/vega-watch-method-cancel-slimmer.test.d.ts +0 -1
  899. package/dist/types/helpers/slimmers/test/keyboard-manager-slimmer.test.d.ts +0 -1
  900. package/dist/types/helpers/slimmers/test/page-resize-observer-slimmer.test.d.ts +0 -1
  901. package/dist/types/helpers/slimmers/test/string-input-formatter-slimmer.test.d.ts +0 -1
  902. package/dist/types/helpers/slimmers/test/translation-slimmer.test.d.ts +0 -1
  903. package/dist/types/helpers/theme/tests/theme-manager-controller.test.d.ts +0 -1
  904. package/dist/types/helpers/touch-helper/test/touch-listener.test.d.ts +0 -1
  905. package/dist/types/helpers/translation/tests/internal-translation-controller.test.d.ts +0 -1
  906. package/dist/types/helpers/translation/tests/translation.test.d.ts +0 -1
  907. package/dist/types/helpers/ui/test/element-appender.test.d.ts +0 -1
  908. package/dist/types/helpers/validator/test/rules/check-box-required-rule.test.d.ts +0 -1
  909. package/dist/types/helpers/validator/test/rules/custom-validation-rule.test.d.ts +0 -1
  910. package/dist/types/helpers/validator/test/rules/date-range-rule.test.d.ts +0 -1
  911. package/dist/types/helpers/validator/test/rules/date-required-rule.test.d.ts +0 -1
  912. package/dist/types/helpers/validator/test/rules/email-field-rule.test.d.ts +0 -1
  913. package/dist/types/helpers/validator/test/rules/file-uploader-required-rule.test.d.ts +0 -1
  914. package/dist/types/helpers/validator/test/rules/input-phone-number-required-rule.test.d.ts +0 -1
  915. package/dist/types/helpers/validator/test/rules/input-range-min-and-max-rule.test.d.ts +0 -1
  916. package/dist/types/helpers/validator/test/rules/input-range-required-rule.test.d.ts +0 -1
  917. package/dist/types/helpers/validator/test/rules/input-select-value-in-source-rule.test.d.ts +0 -1
  918. package/dist/types/helpers/validator/test/rules/max-number-rule.test.d.ts +0 -1
  919. package/dist/types/helpers/validator/test/rules/max-string-length-rule.test.d.ts +0 -1
  920. package/dist/types/helpers/validator/test/rules/min-and-max-date-rule.test.d.ts +0 -1
  921. package/dist/types/helpers/validator/test/rules/min-number-rule.test.d.ts +0 -1
  922. package/dist/types/helpers/validator/test/rules/min-string-length-rule.test.d.ts +0 -1
  923. package/dist/types/helpers/validator/test/rules/public-rules.test.d.ts +0 -1
  924. package/dist/types/helpers/validator/test/rules/required-field-rule.test.d.ts +0 -1
  925. package/dist/types/helpers/validator/test/rules/rich-text-editor-required-rule.test.d.ts +0 -1
  926. package/dist/types/helpers/validator/test/rules/time-range-required-rule.test.d.ts +0 -1
  927. package/dist/types/helpers/validator/test/rules/time-range-rule.test.d.ts +0 -1
  928. package/dist/types/helpers/validator/test/rules/time-required-rule.test.d.ts +0 -1
  929. package/dist/types/helpers/validator/test/rules/toggle-switch-required-rule.test.d.ts +0 -1
  930. package/dist/types/helpers/validator/test/rules/valid-credit-card-number-rule.test.d.ts +0 -1
  931. package/dist/types/helpers/validator/test/rules/valid-phone-number-rule.test.d.ts +0 -1
  932. package/dist/types/helpers/validator/test/validation-rule-handler/form-field-validation-rule-handler-chain.test.d.ts +0 -1
  933. package/dist/types/helpers/validator/test/validation-rule-handler/form-field-validation-rule-handler.test.d.ts +0 -1
  934. package/dist/types/helpers/validator/test/validator/form-field-controller.test.d.ts +0 -1
  935. package/dist/types/helpers/vega-telemetry-helper/test/vega-env-manager.test.d.ts +0 -1
  936. package/dist/types/helpers/zindex/test/internal-vega-z-index-manager.test.d.ts +0 -1
  937. package/dist/types/helpers/zindex/test/vega-z-index-manager.test.d.ts +0 -1
  938. package/dist/types/polyfill/d3/test/d3-array-polyfill.test.d.ts +0 -1
  939. package/dist/types/polyfill/d3/test/d3-axis-polyfill.test.d.ts +0 -1
  940. package/dist/types/polyfill/d3/test/d3-integration.test.d.ts +0 -1
  941. package/dist/types/polyfill/d3/test/d3-scale-polyfill.test.d.ts +0 -1
  942. package/dist/types/polyfill/d3/test/d3-selection-polyfill.test.d.ts +0 -1
  943. package/dist/types/polyfill/d3/test/d3-shape-polyfill.test.d.ts +0 -1
  944. package/dist/types/polyfill/d3/test/d3-time-format-polyfill.test.d.ts +0 -1
  945. package/dist/types/polyfill/d3/test/d3-time-polyfill.test.d.ts +0 -1
  946. package/dist/types/polyfill/d3/test/index.test.d.ts +0 -1
  947. package/dist/types/polyfill/libphonenumber/test/as-you-type.test.d.ts +0 -1
  948. package/dist/types/polyfill/libphonenumber/test/format-helpers.test.d.ts +0 -1
  949. package/dist/types/polyfill/libphonenumber/test/index.test.d.ts +0 -1
  950. package/dist/types/polyfill/libphonenumber/test/metadata.test.d.ts +0 -1
  951. package/dist/types/polyfill/libphonenumber/test/parse-phone-number.test.d.ts +0 -1
  952. package/dist/types/polyfill/libphonenumber/test/phone-number.test.d.ts +0 -1
  953. package/dist/types/polyfill/prism/test/css.test.d.ts +0 -1
  954. package/dist/types/polyfill/prism/test/javascript.test.d.ts +0 -1
  955. package/dist/types/polyfill/prism/test/jsx.test.d.ts +0 -1
  956. package/dist/types/polyfill/prism/test/language-registry.test.d.ts +0 -1
  957. package/dist/types/polyfill/prism/test/markup.test.d.ts +0 -1
  958. package/dist/types/polyfill/prism/test/test-utils.d.ts +0 -10
  959. package/dist/types/polyfill/prism/test/tokenizer.test.d.ts +0 -1
  960. package/dist/types/polyfill/prism/test/tsx.test.d.ts +0 -1
  961. package/dist/types/polyfill/prism/test/typescript.test.d.ts +0 -1
  962. package/dist/types/polyfill/shadow-selection/test/shadow-selection-polyfill.test.d.ts +0 -0
  963. package/dist/types/polyfill/test-polyfill/e2e/retry.d.ts +0 -8
  964. package/dist/types/polyfill/test-polyfill/unit/create-touch-event.d.ts +0 -11
  965. package/dist/types/polyfill/test-polyfill/unit/events.d.ts +0 -1
  966. package/dist/types/polyfill/test-polyfill/unit/index.d.ts +0 -3
  967. package/dist/types/polyfill/test-polyfill/unit/methods.d.ts +0 -1
  968. package/dist/types/polyfill/test-polyfill/unit/range.d.ts +0 -7
  969. package/dist/types/polyfill/test-polyfill/unit/shadow-selection.d.ts +0 -0
  970. package/dist/types/polyfill/tinycolor/tinycolor-polyfill.test.d.ts +0 -1
  971. package/dist/types/test-assets/test-icons.d.ts +0 -4
  972. package/dist/types/types/test/type-guard.test.d.ts +0 -1
  973. package/dist/types/utils/e2e-utils.d.ts +0 -160
  974. package/dist/types/utils/sanitize/test/empty-strategy.test.d.ts +0 -1
  975. package/dist/types/utils/sanitize/test/html-sanitizer.test.d.ts +0 -1
  976. package/dist/types/utils/sanitize/test/label-strategy.test.d.ts +0 -1
  977. package/dist/types/utils/sanitize/test/sanitize-strategy.test.d.ts +0 -1
  978. package/dist/types/utils/sanitize/test/sanitize.test.d.ts +0 -1
  979. package/dist/types/utils/sanitize/test/serialize-fragment.test.d.ts +0 -1
  980. package/dist/types/utils/sanitize/test/style-strategy.test.d.ts +0 -1
  981. package/dist/types/utils/spec-utils.d.ts +0 -109
  982. package/dist/types/utils/test/accessibility.test.d.ts +0 -1
  983. package/dist/types/utils/test/api.test.d.ts +0 -1
  984. package/dist/types/utils/test/array.test.d.ts +0 -1
  985. package/dist/types/utils/test/breakpoint.test.d.ts +0 -1
  986. package/dist/types/utils/test/component.test.d.ts +0 -1
  987. package/dist/types/utils/test/date.test.d.ts +0 -1
  988. package/dist/types/utils/test/design-token.test.d.ts +0 -1
  989. package/dist/types/utils/test/effect.test.d.ts +0 -1
  990. package/dist/types/utils/test/local-storage.test.d.ts +0 -1
  991. package/dist/types/utils/test/log.test.d.ts +0 -1
  992. package/dist/types/utils/test/misc.test.d.ts +0 -1
  993. package/dist/types/utils/test/number.test.d.ts +0 -1
  994. package/dist/types/utils/test/object.test.d.ts +0 -1
  995. package/dist/types/utils/test/pagination.test.d.ts +0 -1
  996. package/dist/types/utils/test/pixel.test.d.ts +0 -1
  997. package/dist/types/utils/test/safe-document.test.d.ts +0 -1
  998. package/dist/types/utils/test/spec-utils.test.d.ts +0 -1
  999. package/dist/types/utils/test/string.test.d.ts +0 -1
  1000. package/dist/types/utils/test/test-utils.test.d.ts +0 -1
  1001. package/dist/types/utils/test/timer.test.d.ts +0 -1
  1002. package/dist/types/utils/test/ui.test.d.ts +0 -1
  1003. package/dist/types/utils/test-utils.d.ts +0 -61
  1004. package/dist/vega/p-0ac91609.entry.js +0 -1
  1005. package/dist/vega/p-10e9438e.js +0 -1
  1006. package/dist/vega/p-2697b52b.js +0 -1
  1007. package/dist/vega/p-2fd266fa.js +0 -1
  1008. package/dist/vega/p-31945d6c.js +0 -1
  1009. package/dist/vega/p-33475bcf.entry.js +0 -1
  1010. package/dist/vega/p-3a0b3fed.entry.js +0 -1
  1011. package/dist/vega/p-4a9be903.js +0 -1
  1012. package/dist/vega/p-541ae774.entry.js +0 -1
  1013. package/dist/vega/p-603b851c.js +0 -1
  1014. package/dist/vega/p-6d6ea8b4.js +0 -1
  1015. package/dist/vega/p-6db0556d.js +0 -1
  1016. package/dist/vega/p-79df30e3.entry.js +0 -1
  1017. package/dist/vega/p-8f88fb57.js +0 -1
  1018. package/dist/vega/p-a01ef160.entry.js +0 -1
  1019. package/dist/vega/p-c962cf5b.js +0 -1
  1020. package/dist/vega/p-d94d785a.entry.js +0 -1
  1021. package/dist/vega/p-dce9349e.js +0 -1
  1022. package/dist/vega/p-e2268eef.js +0 -1
  1023. package/dist/vega/p-e5da9f66.js +0 -1
  1024. package/dist/vega/p-f7505267.js +0 -1
  1025. package/dist/vega/p-fef22245.js +0 -1
@@ -1,3375 +0,0 @@
1
- import { VegaRTEContent } from '../../dto/content-state';
2
- import { HTMLContentCleaner } from '../../slimmers/controllers/html-cleaner';
3
- import { RTETextBlock } from '../../dto/blocks/text-block';
4
- import { RTEImageBlock } from '../../dto/blocks/image-block';
5
- import { RTEListBlock } from '../../dto/blocks/list-block';
6
- import { BlockAnnotationTypeEnum } from '../../dto/annotations/block-annotation.abstract';
7
- import { NodeAnnotationTypeEnum } from '../../dto/annotations/node-annotation.abstract';
8
- import '../../../../polyfill/test-polyfill/unit/index';
9
- import CodeFormatter from '../../../../helpers/code-format/code-formatter';
10
- import { setVegaLogLevel } from '../../../../utils/log';
11
- import { RTEHtmlBlock } from '../../dto/blocks/html-block';
12
- describe('content state', () => {
13
- it('fromJSON should work as expect', () => {
14
- expect(() => VegaRTEContent.fromJSON([
15
- {
16
- id: '1',
17
- type: 'error-type',
18
- nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
19
- },
20
- ])).toThrowError('[Vega] Unknown block type: error-type');
21
- expect(VegaRTEContent.fromJSON([
22
- {
23
- id: '1',
24
- type: 'paragraph',
25
- nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
26
- },
27
- ]).children[0] instanceof RTETextBlock).toBeTruthy();
28
- expect(VegaRTEContent.fromJSON([
29
- { id: '2', type: 'title', nodes: [{ id: '2-1', type: 'text', text: 'This is a title' }] },
30
- ]).children[0] instanceof RTETextBlock).toBeTruthy();
31
- expect(VegaRTEContent.fromJSON([
32
- {
33
- id: '3',
34
- type: 'subtitle',
35
- nodes: [{ id: '3-1', type: 'text', text: 'This is a subtitle' }],
36
- },
37
- ]).children[0] instanceof RTETextBlock).toBeTruthy();
38
- expect(VegaRTEContent.fromJSON([
39
- {
40
- id: '4',
41
- type: 'heading-1',
42
- nodes: [{ id: '4-1', type: 'text', text: 'This is a heading-1' }],
43
- },
44
- ]).children[0] instanceof RTETextBlock).toBeTruthy();
45
- expect(VegaRTEContent.fromJSON([
46
- {
47
- id: '5',
48
- type: 'heading-2',
49
- nodes: [{ id: '5-1', type: 'text', text: 'This is a heading-2' }],
50
- },
51
- ]).children[0] instanceof RTETextBlock).toBeTruthy();
52
- expect(VegaRTEContent.fromJSON([
53
- {
54
- id: '6',
55
- type: 'heading-3',
56
- nodes: [{ id: '6-1', type: 'text', text: 'This is a heading-3' }],
57
- },
58
- ]).children[0] instanceof RTETextBlock).toBeTruthy();
59
- expect(VegaRTEContent.fromJSON([
60
- {
61
- id: '7',
62
- type: 'image',
63
- nodes: [{ id: '7-1', type: 'image', url: 'mock-url' }],
64
- },
65
- ]).children[0] instanceof RTEImageBlock).toBeTruthy();
66
- expect(VegaRTEContent.fromJSON([
67
- {
68
- id: '8',
69
- type: 'bullet-list',
70
- blocks: [
71
- {
72
- id: '8-1',
73
- type: 'list-item',
74
- nodes: [
75
- {
76
- id: '1-1-1-1-1',
77
- type: 'text',
78
- text: 'This is a bullet-list 3-1.',
79
- },
80
- ],
81
- },
82
- ],
83
- },
84
- ]).children[0] instanceof RTEListBlock).toBeTruthy();
85
- });
86
- it('toJSON method should work as expect', () => {
87
- expect(VegaRTEContent.fromJSON([
88
- {
89
- id: '1',
90
- type: 'paragraph',
91
- nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
92
- },
93
- ]).toJSON()).toEqual([
94
- {
95
- id: '1',
96
- type: 'paragraph',
97
- nodes: [{ id: '1-1', text: 'This is a paragraph', type: 'text' }],
98
- annotations: {
99
- textStyle: 'paragraph',
100
- },
101
- },
102
- ]);
103
- expect(VegaRTEContent.fromJSON([
104
- {
105
- id: '1',
106
- type: 'paragraph',
107
- nodes: [
108
- { id: '1-1', type: 'text', text: 'This is a paragraph', annotations: { bold: true } },
109
- ],
110
- annotations: { textAlign: 'right', indent: 2 },
111
- },
112
- ]).toJSON()).toEqual([
113
- {
114
- id: '1',
115
- type: 'paragraph',
116
- nodes: [
117
- { id: '1-1', text: 'This is a paragraph', type: 'text', annotations: { bold: true } },
118
- ],
119
- annotations: { textAlign: 'right', indent: 2, textStyle: 'paragraph' },
120
- },
121
- ]);
122
- });
123
- it('clone method should work as expect', () => {
124
- const contentState = VegaRTEContent.fromJSON([
125
- {
126
- id: '1',
127
- type: 'paragraph',
128
- nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
129
- },
130
- ]);
131
- const clonedContentState = contentState.clone();
132
- expect(clonedContentState).not.toBe(contentState);
133
- expect(clonedContentState).toEqual(contentState);
134
- });
135
- it('should deep clone content state', () => {
136
- const contentState = VegaRTEContent.fromJSON([
137
- {
138
- id: '1',
139
- type: 'paragraph',
140
- annotations: {
141
- textStyle: 'paragraph',
142
- },
143
- nodes: [
144
- { id: '1-1', type: 'text', text: 'This is a paragraph', annotations: { bold: true } },
145
- {
146
- id: '1-2',
147
- type: 'text',
148
- text: ', and inline HTML',
149
- annotations: {
150
- plainText: true,
151
- inlineHtml: {
152
- htmlTag: 'b',
153
- customAttribute: { id: 'b-element' },
154
- customClass: ['my-class-1', 'my-class-2'],
155
- customStyle: { background: 'yellow', color: 'red' },
156
- child: {
157
- htmlTag: 's',
158
- customAttribute: { id: 's-element' },
159
- },
160
- },
161
- },
162
- },
163
- ],
164
- },
165
- ]);
166
- const clonedContentState = contentState.clone(true);
167
- expect(clonedContentState).not.toBe(contentState);
168
- expect(clonedContentState).toEqual(contentState);
169
- const block = contentState.children[0];
170
- const clonedBlock = clonedContentState.children[0];
171
- expect(clonedBlock).toEqual(block);
172
- expect(clonedBlock).not.toBe(block);
173
- const node = block.children[0];
174
- const clonedNode = clonedBlock.children[0];
175
- expect(clonedNode).toEqual(node);
176
- expect(clonedNode).not.toBe(node);
177
- const blockAnnotations = block.annotationMap;
178
- const clonedBlockAnnotations = clonedBlock.annotationMap;
179
- expect(clonedBlockAnnotations).toEqual(blockAnnotations);
180
- expect(clonedBlockAnnotations).not.toBe(blockAnnotations);
181
- expect(clonedBlock.getAnnotationByType(BlockAnnotationTypeEnum.TEXT_STYLE)).toEqual(block.getAnnotationByType(BlockAnnotationTypeEnum.TEXT_STYLE));
182
- expect(clonedBlock.getAnnotationByType(BlockAnnotationTypeEnum.TEXT_STYLE)).not.toBe(block.getAnnotationByType(BlockAnnotationTypeEnum.TEXT_STYLE));
183
- const nodeAnnotations = node.annotationMap;
184
- const clonedNodeAnnotations = clonedNode.annotationMap;
185
- expect(clonedNodeAnnotations).toEqual(nodeAnnotations);
186
- expect(clonedNodeAnnotations).not.toBe(nodeAnnotations);
187
- expect(clonedNode.getAnnotationByType(NodeAnnotationTypeEnum.BOLD)).toEqual(node.getAnnotationByType(NodeAnnotationTypeEnum.BOLD));
188
- expect(clonedNode.getAnnotationByType(NodeAnnotationTypeEnum.BOLD)).not.toBe(node.getAnnotationByType(NodeAnnotationTypeEnum.BOLD));
189
- });
190
- it('the parent property should set as properly when create VegaRTEContent', () => {
191
- const contentState = VegaRTEContent.fromJSON([
192
- {
193
- id: '1',
194
- type: 'paragraph',
195
- nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
196
- },
197
- {
198
- id: '2',
199
- type: 'image',
200
- nodes: [{ id: '2-1', type: 'image', url: 'image url' }],
201
- },
202
- {
203
- id: '3',
204
- type: 'bullet-list',
205
- blocks: [
206
- {
207
- id: '3-1',
208
- type: 'list-item',
209
- nodes: [],
210
- children: [
211
- {
212
- id: '4-1',
213
- type: 'bullet-list',
214
- blocks: [{ id: '4-1', type: 'list-item', nodes: [] }],
215
- },
216
- ],
217
- },
218
- ],
219
- },
220
- ]);
221
- const paragraphBlock = contentState.children[0];
222
- const imageBlock = contentState.children[1];
223
- const listBlock = contentState.children[2];
224
- const listItemBlock = listBlock.children[0];
225
- const nestedListBlock = listItemBlock.nestList[0];
226
- const nestedListItemBlock = nestedListBlock.children[0];
227
- expect(paragraphBlock.parent).toEqual(contentState);
228
- expect(imageBlock.parent).toEqual(contentState);
229
- expect(listBlock.parent).toEqual(contentState);
230
- expect(listItemBlock.parent).toEqual(listBlock);
231
- expect(nestedListBlock.parent).toEqual(listItemBlock);
232
- expect(nestedListItemBlock.parent).toEqual(nestedListBlock);
233
- });
234
- describe('findNodeById', () => {
235
- let content;
236
- beforeAll(() => {
237
- content = VegaRTEContent.fromJSON([
238
- {
239
- id: '1',
240
- type: 'paragraph',
241
- nodes: [
242
- { id: '1-1', type: 'text', text: 'This ' },
243
- { id: '1-2', type: 'text', text: 'is a ' },
244
- { id: '1-3', type: 'text', text: 'paragraph.' },
245
- ],
246
- },
247
- {
248
- id: '2',
249
- type: 'image',
250
- nodes: [{ id: '2-1', type: 'image', url: 'img.png' }],
251
- },
252
- {
253
- id: '3',
254
- type: 'bullet-list',
255
- blocks: [
256
- {
257
- id: '3-1',
258
- type: 'list-item',
259
- nodes: [{ id: '3-1-1', type: 'text', text: 'List item 1' }],
260
- children: [
261
- {
262
- id: '3-2',
263
- type: 'number-list',
264
- blocks: [
265
- {
266
- id: '3-2-1',
267
- type: 'list-item',
268
- nodes: [
269
- { id: '3-2-1-1', type: 'text', text: 'Nested list item' },
270
- ],
271
- },
272
- ],
273
- },
274
- ],
275
- },
276
- ],
277
- },
278
- ]);
279
- });
280
- it('should find the node in text block', () => {
281
- expect(content.findNodeById('1-2').toJSON()).toEqual({ id: '1-2', type: 'text', text: 'is a ' });
282
- });
283
- it('should find the node in image block', () => {
284
- expect(content.findNodeById('2-1').toJSON()).toEqual({
285
- id: '2-1',
286
- type: 'image',
287
- url: 'img.png',
288
- annotations: {
289
- size: 'md',
290
- },
291
- });
292
- });
293
- it('should find the node in list item', () => {
294
- expect(content.findNodeById('3-1-1').toJSON()).toEqual({
295
- id: '3-1-1',
296
- type: 'text',
297
- text: 'List item 1',
298
- });
299
- });
300
- it('should find the node in nested list item', () => {
301
- expect(content.findNodeById('3-2-1-1').toJSON()).toEqual({
302
- id: '3-2-1-1',
303
- type: 'text',
304
- text: 'Nested list item',
305
- });
306
- });
307
- it('should return null for non-existent node', () => {
308
- expect(content.findNodeById('not-exist')).toBeNull();
309
- });
310
- });
311
- describe('toHtml', () => {
312
- it('should convert paragraph to HTML correctly', () => {
313
- const contentState = VegaRTEContent.fromJSON([
314
- {
315
- id: '1',
316
- type: 'paragraph',
317
- annotations: { textStyle: 'paragraph' },
318
- nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
319
- },
320
- ]);
321
- 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>`);
322
- });
323
- it('should convert text node with annotations to HTML correctly', () => {
324
- const contentState = VegaRTEContent.fromJSON([
325
- {
326
- id: '1',
327
- type: 'paragraph',
328
- annotations: { textStyle: 'paragraph' },
329
- nodes: [
330
- {
331
- id: '1-1',
332
- type: 'text',
333
- text: 'This is a paragraph.',
334
- annotations: { bold: true },
335
- },
336
- { id: '1-2', type: 'text', text: ' code', annotations: { code: true } },
337
- { id: '1-3', type: 'text', text: ' text', annotations: { code: false } },
338
- ],
339
- },
340
- ]);
341
- 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>`);
342
- });
343
- it('should convert text block with annotations to HTML with inline styles correctly', () => {
344
- const contentState = VegaRTEContent.fromJSON([
345
- {
346
- id: '1',
347
- type: 'paragraph',
348
- annotations: { textStyle: 'paragraph', textAlign: 'right' },
349
- nodes: [
350
- {
351
- id: '1-1',
352
- type: 'text',
353
- text: 'This is a paragraph',
354
- annotations: { bold: true, underline: true },
355
- },
356
- ],
357
- },
358
- ]);
359
- 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>`);
360
- });
361
- it('should convert image block to HTML correctly', () => {
362
- const contentState = VegaRTEContent.fromJSON([
363
- {
364
- id: '1',
365
- type: 'image',
366
- nodes: [{ id: '1-1', type: 'image', url: 'https://example.com/image.jpg' }],
367
- },
368
- {
369
- id: '2',
370
- type: 'image',
371
- nodes: [
372
- {
373
- id: '2-1',
374
- type: 'image',
375
- url: 'https://example.com/image.jpg',
376
- annotations: {
377
- alt: 'example',
378
- },
379
- },
380
- ],
381
- },
382
- ]);
383
- expect(contentState.toHtml()).toEqual(`<div><img style="vertical-align: bottom;width: 50%;" src="https://example.com/image.jpg" data-size="md"></div><div><img style="vertical-align: bottom;width: 50%;" alt="example" src="https://example.com/image.jpg" data-size="md"></div>`);
384
- });
385
- it('should convert bullet list block to HTML correctly', () => {
386
- const contentState = VegaRTEContent.fromJSON([
387
- {
388
- id: '1',
389
- type: 'bullet-list',
390
- blocks: [
391
- {
392
- id: '1-1',
393
- type: 'list-item',
394
- nodes: [{ id: '1-1-1', type: 'text', text: 'Item 1' }],
395
- },
396
- {
397
- id: '1-2',
398
- type: 'list-item',
399
- nodes: [{ id: '1-2-1', type: 'text', text: 'Item 2' }],
400
- },
401
- ],
402
- },
403
- ]);
404
- 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>`);
405
- });
406
- it('should convert number list block to HTML correctly', () => {
407
- const contentState = VegaRTEContent.fromJSON([
408
- {
409
- id: '1',
410
- type: 'number-list',
411
- blocks: [
412
- {
413
- id: '1-1',
414
- type: 'list-item',
415
- nodes: [{ id: '1-1-1', type: 'text', text: 'Item 1' }],
416
- },
417
- {
418
- id: '1-2',
419
- type: 'list-item',
420
- nodes: [{ id: '1-2-1', type: 'text', text: 'Item 2' }],
421
- },
422
- ],
423
- },
424
- ]);
425
- 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>`);
426
- });
427
- it('should convert code block to HTML correctly', () => {
428
- const contentState = VegaRTEContent.fromJSON([
429
- {
430
- id: '1750424321364',
431
- type: 'code-block',
432
- content: '<div>This is a Plain Text.</div>',
433
- },
434
- {
435
- id: '1750424321364',
436
- type: 'code-block',
437
- content: '<div>This is an HTML.</div>',
438
- language: 'html',
439
- },
440
- ]);
441
- expect(contentState.toHtml()).toEqual(`<pre data-language="plainText" style="background-color: rgba(var(--v-bg-secondary, 245, 247, 247, 1)); padding: 12px"><code style='box-sizing: border-box;color: rgba(var(--v-text-primary, 32, 54, 69, 1));text-align: left;font-family: "Roboto Mono";font-weight: 400;line-height: 22px;font-size: 16px;white-space: pre-wrap;min-height: 22px;tab-size: 2px;'><div>This is a Plain Text.</div></code></pre><pre data-language="html" style="background-color: rgba(var(--v-bg-secondary, 245, 247, 247, 1)); padding: 12px"><code style='box-sizing: border-box;color: rgba(var(--v-text-primary, 32, 54, 69, 1));text-align: left;font-family: "Roboto Mono";font-weight: 400;line-height: 22px;font-size: 16px;white-space: pre-wrap;min-height: 22px;tab-size: 2px;'><div>This is an HTML.</div></code></pre>`);
442
- });
443
- it('should convert text with the link annotations to HTML correctly', () => {
444
- const contentState = VegaRTEContent.fromJSON([
445
- {
446
- id: '1',
447
- type: 'paragraph',
448
- annotations: { textStyle: 'paragraph' },
449
- nodes: [
450
- {
451
- id: '1-1',
452
- type: 'text',
453
- text: 'This is a link',
454
- annotations: {
455
- link: { href: 'https://example.com', groupKey: 'link-group-1' },
456
- },
457
- },
458
- ],
459
- },
460
- ]);
461
- 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>`);
462
- });
463
- it('should convert a complex value to HTML correctly', () => {
464
- const contentState = VegaRTEContent.fromJSON([
465
- {
466
- id: '1750041983988',
467
- annotations: {
468
- textStyle: 'title',
469
- },
470
- type: 'title',
471
- nodes: [
472
- {
473
- id: '1750041978250',
474
- annotations: {
475
- bold: true,
476
- },
477
- type: 'text',
478
- text: 'Title',
479
- },
480
- ],
481
- },
482
- {
483
- id: '1750041984711',
484
- annotations: {
485
- textStyle: 'subtitle',
486
- },
487
- type: 'subtitle',
488
- nodes: [
489
- {
490
- id: '1750041980352',
491
- type: 'text',
492
- text: 'Subtitle',
493
- },
494
- ],
495
- },
496
- {
497
- id: '1750041981840',
498
- annotations: {
499
- textStyle: 'heading-1',
500
- },
501
- type: 'heading-1',
502
- nodes: [
503
- {
504
- id: '1750041978195',
505
- annotations: {
506
- bold: true,
507
- },
508
- type: 'text',
509
- text: 'Heading 1',
510
- },
511
- ],
512
- },
513
- {
514
- id: '1750041975899',
515
- annotations: {
516
- textStyle: 'heading-2',
517
- },
518
- type: 'heading-2',
519
- nodes: [
520
- {
521
- id: '1750041981732',
522
- annotations: {
523
- bold: true,
524
- },
525
- type: 'text',
526
- text: 'Heading 2',
527
- },
528
- ],
529
- },
530
- {
531
- id: '1750041983133',
532
- annotations: {
533
- textStyle: 'heading-3',
534
- },
535
- type: 'heading-3',
536
- nodes: [
537
- {
538
- id: '1750041980106',
539
- annotations: {
540
- bold: true,
541
- },
542
- type: 'text',
543
- text: 'Heading 3',
544
- },
545
- ],
546
- },
547
- {
548
- id: '1750041984506',
549
- annotations: {
550
- textStyle: 'paragraph',
551
- },
552
- type: 'paragraph',
553
- nodes: [
554
- {
555
- id: '1750041974956',
556
- annotations: {},
557
- type: 'text',
558
- text: 'Paragraph',
559
- },
560
- ],
561
- },
562
- {
563
- id: '1750041983082',
564
- annotations: {
565
- textStyle: 'paragraph',
566
- },
567
- type: 'paragraph',
568
- nodes: [
569
- {
570
- id: '1750041983587',
571
- annotations: {
572
- bold: true,
573
- },
574
- type: 'text',
575
- text: 'Bold text',
576
- },
577
- ],
578
- },
579
- {
580
- id: '1750041980108',
581
- annotations: {
582
- textStyle: 'paragraph',
583
- },
584
- type: 'paragraph',
585
- nodes: [
586
- {
587
- id: '1750041983935',
588
- annotations: {
589
- italic: true,
590
- },
591
- type: 'text',
592
- text: 'Italic text',
593
- },
594
- ],
595
- },
596
- {
597
- id: '1750041978100',
598
- annotations: {
599
- textStyle: 'paragraph',
600
- },
601
- type: 'paragraph',
602
- nodes: [
603
- {
604
- id: '1750041978568',
605
- annotations: {
606
- underline: true,
607
- },
608
- type: 'text',
609
- text: 'Underline text',
610
- },
611
- ],
612
- },
613
- {
614
- id: '1750041984220',
615
- annotations: {
616
- textStyle: 'paragraph',
617
- },
618
- type: 'paragraph',
619
- nodes: [
620
- {
621
- id: '1750041982817',
622
- annotations: {
623
- underline: true,
624
- },
625
- type: 'text',
626
- text: 'Strikethrough text',
627
- },
628
- ],
629
- },
630
- {
631
- id: '1750041979619',
632
- annotations: {
633
- textStyle: 'paragraph',
634
- },
635
- type: 'paragraph',
636
- nodes: [
637
- {
638
- id: '1750041982051',
639
- annotations: {
640
- code: true,
641
- },
642
- type: 'text',
643
- text: 'Code text',
644
- },
645
- ],
646
- },
647
- {
648
- id: '1750041977487',
649
- annotations: {
650
- textStyle: 'paragraph',
651
- },
652
- type: 'paragraph',
653
- nodes: [
654
- {
655
- id: '1750041983700',
656
- annotations: {
657
- textColor: 'red',
658
- },
659
- type: 'text',
660
- text: 'Color text',
661
- },
662
- ],
663
- },
664
- {
665
- id: '1750041981507',
666
- annotations: {
667
- textStyle: 'paragraph',
668
- textAlign: 'left',
669
- },
670
- type: 'paragraph',
671
- nodes: [
672
- {
673
- id: '1750041979308',
674
- type: 'text',
675
- text: 'Left align',
676
- },
677
- ],
678
- },
679
- {
680
- id: '1750041977501',
681
- annotations: {
682
- textStyle: 'paragraph',
683
- textAlign: 'right',
684
- },
685
- type: 'paragraph',
686
- nodes: [
687
- {
688
- id: '1750041976836',
689
- type: 'text',
690
- text: 'Right align',
691
- },
692
- ],
693
- },
694
- {
695
- id: '1750041983771',
696
- type: 'bullet-list',
697
- blocks: [
698
- {
699
- id: '1750041977027',
700
- annotations: {
701
- textStyle: 'paragraph',
702
- },
703
- type: 'list-item',
704
- nodes: [
705
- {
706
- id: '1750041982061',
707
- type: 'text',
708
- text: 'list item 1',
709
- },
710
- ],
711
- children: [],
712
- },
713
- {
714
- id: '1750041975174',
715
- annotations: {
716
- textStyle: 'paragraph',
717
- },
718
- type: 'list-item',
719
- nodes: [
720
- {
721
- id: '1750041978832',
722
- type: 'text',
723
- text: 'list item 2',
724
- },
725
- ],
726
- children: [],
727
- },
728
- ],
729
- },
730
- {
731
- id: '1750041992884',
732
- annotations: {
733
- textStyle: 'paragraph',
734
- indent: 2,
735
- },
736
- type: 'paragraph',
737
- nodes: [
738
- {
739
- id: '1750041987297',
740
- type: 'text',
741
- text: 'More indent',
742
- },
743
- ],
744
- },
745
- {
746
- id: '1750042019645',
747
- annotations: {
748
- textStyle: 'paragraph',
749
- },
750
- type: 'paragraph',
751
- nodes: [
752
- {
753
- id: '1750042020364',
754
- annotations: {
755
- link: {
756
- href: 'https://www.google.com',
757
- groupKey: '1750042026536',
758
- },
759
- },
760
- type: 'text',
761
- text: 'Link text',
762
- },
763
- ],
764
- },
765
- {
766
- id: '1750042030016',
767
- annotations: {
768
- textStyle: 'paragraph',
769
- },
770
- type: 'paragraph',
771
- nodes: [
772
- {
773
- id: '1750042032454',
774
- type: 'text',
775
- text: '',
776
- },
777
- ],
778
- },
779
- {
780
- id: '1750041979184',
781
- annotations: {
782
- textStyle: 'paragraph',
783
- },
784
- type: 'paragraph',
785
- nodes: [
786
- {
787
- id: '1750041981796',
788
- type: 'text',
789
- text: '',
790
- },
791
- ],
792
- },
793
- ]);
794
- 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>`);
795
- });
796
- it('should convert paragraph with custom attributes to HTML correctly', () => {
797
- const contentState = VegaRTEContent.fromJSON([
798
- {
799
- id: '1',
800
- type: 'paragraph',
801
- annotations: {
802
- textStyle: 'paragraph',
803
- customAttribute: {
804
- id: 'p-element',
805
- dir: 'dir-p',
806
- },
807
- },
808
- nodes: [
809
- {
810
- id: '1-1',
811
- type: 'text',
812
- text: 'This is a paragraph',
813
- annotations: {
814
- customAttribute: {
815
- id: 'span-element',
816
- dir: 'dir-span',
817
- },
818
- },
819
- },
820
- ],
821
- },
822
- ]);
823
- 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>`);
824
- });
825
- it('should convert text node with custom attributes to HTML correctly', () => {
826
- const contentState = VegaRTEContent.fromJSON([
827
- {
828
- id: '1',
829
- type: 'paragraph',
830
- annotations: {
831
- textStyle: 'paragraph',
832
- customAttribute: {
833
- id: 'p-element',
834
- dir: 'dir-p',
835
- },
836
- },
837
- nodes: [
838
- {
839
- id: '1-1',
840
- type: 'text',
841
- text: 'This is a paragraph.',
842
- annotations: {
843
- bold: true,
844
- customAttribute: {
845
- id: 'text1',
846
- },
847
- },
848
- },
849
- {
850
- id: '1-2',
851
- type: 'text',
852
- text: ' code',
853
- annotations: {
854
- code: true,
855
- customAttribute: {
856
- id: 'text2',
857
- },
858
- },
859
- },
860
- {
861
- id: '1-3',
862
- type: 'text',
863
- text: ' text',
864
- annotations: {
865
- customAttribute: {
866
- id: 'text3',
867
- },
868
- },
869
- },
870
- ],
871
- },
872
- ]);
873
- 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>`);
874
- });
875
- it('should convert bullet list block with custom attributes to HTML correctly', () => {
876
- const contentState = VegaRTEContent.fromJSON([
877
- {
878
- id: '1',
879
- type: 'bullet-list',
880
- blocks: [
881
- {
882
- id: '1-1',
883
- type: 'list-item',
884
- nodes: [{ id: '1-1-1', type: 'text', text: 'Item 1' }],
885
- annotations: {
886
- customAttribute: {
887
- id: 'list1',
888
- },
889
- },
890
- },
891
- {
892
- id: '1-2',
893
- type: 'list-item',
894
- nodes: [{ id: '1-2-1', type: 'text', text: 'Item 2' }],
895
- annotations: {
896
- customAttribute: {
897
- id: 'list2',
898
- },
899
- },
900
- },
901
- ],
902
- annotations: {
903
- customAttribute: {
904
- id: 'ul',
905
- },
906
- },
907
- },
908
- ]);
909
- 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>`);
910
- });
911
- it('should convert paragraph with custom class to HTML correctly', () => {
912
- const contentState = VegaRTEContent.fromJSON([
913
- {
914
- id: '1',
915
- type: 'paragraph',
916
- annotations: {
917
- textStyle: 'paragraph',
918
- customClass: ['p-class'],
919
- },
920
- nodes: [
921
- {
922
- id: '1-1',
923
- type: 'text',
924
- text: 'This is a paragraph',
925
- annotations: {
926
- customClass: ['span-class'],
927
- },
928
- },
929
- ],
930
- },
931
- ]);
932
- expect(contentState.toHtml()).toMatchSnapshot();
933
- });
934
- it('should convert text node with custom class to HTML correctly', () => {
935
- const contentState = VegaRTEContent.fromJSON([
936
- {
937
- id: '1',
938
- type: 'paragraph',
939
- annotations: {
940
- textStyle: 'paragraph',
941
- customClass: ['p-class'],
942
- },
943
- nodes: [
944
- {
945
- id: '1-1',
946
- type: 'text',
947
- text: 'This is a paragraph.',
948
- annotations: {
949
- bold: true,
950
- customClass: ['span1-class'],
951
- },
952
- },
953
- {
954
- id: '1-2',
955
- type: 'text',
956
- text: ' code',
957
- annotations: {
958
- code: true,
959
- customClass: ['span2-class'],
960
- },
961
- },
962
- {
963
- id: '1-3',
964
- type: 'text',
965
- text: ' text',
966
- annotations: {
967
- customClass: ['span3-class'],
968
- },
969
- },
970
- ],
971
- },
972
- ]);
973
- expect(contentState.toHtml()).toMatchSnapshot();
974
- });
975
- it('should convert bullet list block with custom class to HTML correctly', () => {
976
- const contentState = VegaRTEContent.fromJSON([
977
- {
978
- id: '1',
979
- type: 'bullet-list',
980
- blocks: [
981
- {
982
- id: '1-1',
983
- type: 'list-item',
984
- nodes: [{ id: '1-1-1', type: 'text', text: 'Item 1' }],
985
- annotations: {
986
- customClass: ['li1-class'],
987
- },
988
- },
989
- {
990
- id: '1-2',
991
- type: 'list-item',
992
- nodes: [{ id: '1-2-1', type: 'text', text: 'Item 2' }],
993
- annotations: {
994
- customClass: ['li2-class'],
995
- },
996
- },
997
- ],
998
- annotations: {
999
- customClass: ['ul-class'],
1000
- },
1001
- },
1002
- ]);
1003
- expect(contentState.toHtml()).toMatchSnapshot();
1004
- });
1005
- it('should convert paragraph with custom style to HTML correctly', () => {
1006
- const contentState = VegaRTEContent.fromJSON([
1007
- {
1008
- id: '1',
1009
- type: 'paragraph',
1010
- annotations: {
1011
- textStyle: 'paragraph',
1012
- customStyle: {
1013
- fontWeight: '700',
1014
- },
1015
- },
1016
- nodes: [
1017
- {
1018
- id: '1-1',
1019
- type: 'text',
1020
- text: 'This is a paragraph',
1021
- annotations: {
1022
- customStyle: {
1023
- fontWeight: '700',
1024
- },
1025
- },
1026
- },
1027
- ],
1028
- },
1029
- ]);
1030
- 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>`);
1031
- });
1032
- it('should convert text node with custom style to HTML correctly', () => {
1033
- const contentState = VegaRTEContent.fromJSON([
1034
- {
1035
- id: '1',
1036
- type: 'paragraph',
1037
- annotations: {
1038
- textStyle: 'paragraph',
1039
- customStyle: {
1040
- textAlign: 'right',
1041
- },
1042
- },
1043
- nodes: [
1044
- {
1045
- id: '1-1',
1046
- type: 'text',
1047
- text: 'This is a paragraph.',
1048
- annotations: {
1049
- bold: true,
1050
- customStyle: {
1051
- padding: '20px',
1052
- },
1053
- },
1054
- },
1055
- {
1056
- id: '1-2',
1057
- type: 'text',
1058
- text: ' code',
1059
- annotations: {
1060
- code: true,
1061
- customStyle: {
1062
- padding: '30px',
1063
- },
1064
- },
1065
- },
1066
- {
1067
- id: '1-3',
1068
- type: 'text',
1069
- text: ' text',
1070
- annotations: {
1071
- customStyle: {
1072
- padding: '40px',
1073
- },
1074
- },
1075
- },
1076
- ],
1077
- },
1078
- ]);
1079
- 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>`);
1080
- });
1081
- it('should convert bullet list block with custom style to HTML correctly', () => {
1082
- const contentState = VegaRTEContent.fromJSON([
1083
- {
1084
- id: '1',
1085
- type: 'bullet-list',
1086
- blocks: [
1087
- {
1088
- id: '1-1',
1089
- type: 'list-item',
1090
- nodes: [{ id: '1-1-1', type: 'text', text: 'Item 1' }],
1091
- annotations: {
1092
- customStyle: {
1093
- padding: '40px',
1094
- },
1095
- },
1096
- },
1097
- {
1098
- id: '1-2',
1099
- type: 'list-item',
1100
- nodes: [{ id: '1-2-1', type: 'text', text: 'Item 2' }],
1101
- annotations: {
1102
- customStyle: {
1103
- padding: '50px',
1104
- },
1105
- },
1106
- },
1107
- ],
1108
- annotations: {
1109
- customStyle: {
1110
- padding: '60px',
1111
- },
1112
- },
1113
- },
1114
- ]);
1115
- 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>`);
1116
- });
1117
- it('should log warning when call toHtml with deprecated parameter', () => {
1118
- setVegaLogLevel('warn');
1119
- console.warn = jest.fn();
1120
- const content = VegaRTEContent.fromJSON([
1121
- {
1122
- id: '1',
1123
- type: 'paragraph',
1124
- nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
1125
- },
1126
- ]);
1127
- content.toHtml({ autoMatchFormat: false });
1128
- expect(console.warn).toBeCalledTimes(1);
1129
- expect(console.warn).toHaveBeenCalledWith('%c[Vega]', 'font-weight: bold', "The 'options' parameter in toHtml method is deprecated and will be removed in the future.");
1130
- });
1131
- });
1132
- describe('fromHtml', () => {
1133
- it('should convert a simple paragraph element to the expected RTEContentBlock', () => {
1134
- const sourceCode = '<p>Hello</p>';
1135
- const content = VegaRTEContent.fromHtml(sourceCode);
1136
- expect(content.toJSON()).toEqual([
1137
- {
1138
- id: expect.anything(),
1139
- type: 'paragraph',
1140
- annotations: { textStyle: 'paragraph' },
1141
- nodes: [
1142
- {
1143
- id: expect.anything(),
1144
- text: 'Hello',
1145
- type: 'text',
1146
- },
1147
- ],
1148
- },
1149
- ]);
1150
- });
1151
- it('should convert a bold text element to the expected RTEContentBlock', () => {
1152
- const sourceCode = '<span style="font-weight: 700;">Bold</span>';
1153
- const content = VegaRTEContent.fromHtml(sourceCode);
1154
- expect(content.toJSON()).toEqual([
1155
- {
1156
- id: expect.anything(),
1157
- type: 'paragraph',
1158
- annotations: { textStyle: 'paragraph' },
1159
- nodes: [
1160
- {
1161
- id: expect.anything(),
1162
- type: 'text',
1163
- text: 'Bold',
1164
- annotations: {
1165
- bold: true,
1166
- customStyle: {
1167
- fontWeight: '700',
1168
- },
1169
- },
1170
- },
1171
- ],
1172
- },
1173
- ]);
1174
- });
1175
- it('should convert a list element to the expected RTEContentBlock', () => {
1176
- const sourceCode = '<ul><li>Item 1</li><li>Item 2</li></ul>';
1177
- const content = VegaRTEContent.fromHtml(sourceCode);
1178
- expect(content.toJSON()).toEqual([
1179
- {
1180
- blocks: [
1181
- {
1182
- id: expect.anything(),
1183
- type: 'list-item',
1184
- annotations: { textStyle: 'paragraph' },
1185
- nodes: [
1186
- {
1187
- id: expect.anything(),
1188
- text: 'Item 1',
1189
- type: 'text',
1190
- },
1191
- ],
1192
- children: [],
1193
- },
1194
- {
1195
- id: expect.anything(),
1196
- type: 'list-item',
1197
- annotations: { textStyle: 'paragraph' },
1198
- nodes: [
1199
- {
1200
- id: expect.anything(),
1201
- text: 'Item 2',
1202
- type: 'text',
1203
- },
1204
- ],
1205
- children: [],
1206
- },
1207
- ],
1208
- id: expect.anything(),
1209
- type: 'bullet-list',
1210
- },
1211
- ]);
1212
- });
1213
- it('should convert a heading element to the expected RTEContentBlock', () => {
1214
- const sourceCode = '<h1>Heading</h1>';
1215
- const content = VegaRTEContent.fromHtml(sourceCode);
1216
- expect(content.toJSON()).toEqual([
1217
- {
1218
- id: expect.anything(),
1219
- type: 'heading-1',
1220
- annotations: { textStyle: 'heading-1' },
1221
- nodes: [
1222
- {
1223
- id: expect.anything(),
1224
- text: 'Heading',
1225
- type: 'text',
1226
- },
1227
- ],
1228
- },
1229
- ]);
1230
- });
1231
- it('should convert a complex html with RTE classes to DTO correctly', () => {
1232
- const sourceCode = `<div class='v-rte--text-style-title'>Title</div>
1233
- <div class='v-rte--text-style-subtitle'>Subtitle</div>
1234
- <h1 class='v-rte--text-style-heading-1'>Heading 1</h1>
1235
- <h2 class='v-rte--text-style-heading-2'>Heading 2</h2>
1236
- <h3 class='v-rte--text-style-heading-3'>Heading 3</h3>
1237
- <p class='v-rte--text-style-paragraph'>Paragraph</p>
1238
- <p class='v-rte--text-style-paragraph'>
1239
- <span class='v-rte--bold'>Bold text</span>
1240
- <span class='v-rte--italic'>Italic text</span>
1241
- <span class='v-rte--underline'>Underline text</span>
1242
- <span class='v-rte--strikethrough'>Strikethrough text</span>
1243
- <code class='v-rte--code'>Code text</code>
1244
- <span style="color: rgb(1, 128, 31);">Color text</span>
1245
- </p>
1246
- <ul>
1247
- <li class='v-rte--text-style-paragraph'>List item 1</li>
1248
- <li class='v-rte--text-style-paragraph'>List item 2</li>
1249
- </ul>
1250
- <ol>
1251
- <li class='v-rte--text-style-paragraph'>List item 1</li>
1252
- <li class='v-rte--text-style-paragraph'>List item 2</li>
1253
- </ol>
1254
- <p class="v-rte--text-style-paragraph v-rte--horizontal-alignment-left"><span class="">Left align</span></p>
1255
- <p class="v-rte--text-style-paragraph v-rte--horizontal-alignment-right"><span class="">Right align</span></p>
1256
- <p class="v-rte--text-style-paragraph v-rte--horizontal-alignment-left" style="margin-left: 16px;"><span class="">More indent 1</span></p>
1257
- <p class="v-rte--text-style-paragraph v-rte--horizontal-alignment-left" style="margin-left: 32px;"><span class="">More indent 2</span></p>
1258
- <p class="v-rte--text-style-paragraph"><a href="https://www.google.com" target="_blank" class="v-rte--link classA classB" id="a" data-link="link" style="fontSize: 8px; display: block;"><span class="">Link text</span></a></p>
1259
- <div><img src="mock-img-url" style="width: 100%;"></div>`;
1260
- const content = VegaRTEContent.fromHtml(sourceCode.replace(/[\t\n]/g, ''));
1261
- expect(content.toJSON()).toEqual([
1262
- {
1263
- id: expect.anything(),
1264
- type: 'title',
1265
- annotations: { textStyle: 'title' },
1266
- nodes: [
1267
- {
1268
- id: expect.anything(),
1269
- text: 'Title',
1270
- type: 'text',
1271
- },
1272
- ],
1273
- },
1274
- {
1275
- id: expect.anything(),
1276
- type: 'subtitle',
1277
- annotations: { textStyle: 'subtitle' },
1278
- nodes: [
1279
- {
1280
- id: expect.anything(),
1281
- text: 'Subtitle',
1282
- type: 'text',
1283
- },
1284
- ],
1285
- },
1286
- {
1287
- id: expect.anything(),
1288
- type: 'heading-1',
1289
- annotations: { textStyle: 'heading-1' },
1290
- nodes: [
1291
- {
1292
- id: expect.anything(),
1293
- type: 'text',
1294
- text: 'Heading 1',
1295
- },
1296
- ],
1297
- },
1298
- {
1299
- id: expect.anything(),
1300
- type: 'heading-2',
1301
- annotations: { textStyle: 'heading-2' },
1302
- nodes: [
1303
- {
1304
- id: expect.anything(),
1305
- type: 'text',
1306
- text: 'Heading 2',
1307
- },
1308
- ],
1309
- },
1310
- {
1311
- id: expect.anything(),
1312
- type: 'heading-3',
1313
- annotations: { textStyle: 'heading-3' },
1314
- nodes: [
1315
- {
1316
- id: expect.anything(),
1317
- text: 'Heading 3',
1318
- type: 'text',
1319
- },
1320
- ],
1321
- },
1322
- {
1323
- id: expect.anything(),
1324
- type: 'paragraph',
1325
- annotations: { textStyle: 'paragraph' },
1326
- nodes: [
1327
- {
1328
- id: expect.anything(),
1329
- text: 'Paragraph',
1330
- type: 'text',
1331
- },
1332
- ],
1333
- },
1334
- {
1335
- id: expect.anything(),
1336
- type: 'paragraph',
1337
- annotations: { textStyle: 'paragraph' },
1338
- nodes: [
1339
- {
1340
- annotations: {
1341
- bold: true,
1342
- },
1343
- id: expect.anything(),
1344
- text: 'Bold text',
1345
- type: 'text',
1346
- },
1347
- {
1348
- id: expect.anything(),
1349
- type: 'text',
1350
- annotations: {
1351
- italic: true,
1352
- },
1353
- text: 'Italic text',
1354
- },
1355
- {
1356
- id: expect.anything(),
1357
- annotations: {
1358
- underline: true,
1359
- },
1360
- text: 'Underline text',
1361
- type: 'text',
1362
- },
1363
- {
1364
- id: expect.anything(),
1365
- type: 'text',
1366
- annotations: {
1367
- strikethrough: true,
1368
- },
1369
- text: 'Strikethrough text',
1370
- },
1371
- {
1372
- id: expect.anything(),
1373
- type: 'text',
1374
- annotations: {
1375
- code: true,
1376
- },
1377
- text: 'Code text',
1378
- },
1379
- {
1380
- id: expect.anything(),
1381
- type: 'text',
1382
- annotations: {
1383
- textColor: 'green',
1384
- customStyle: {
1385
- color: 'rgb(1, 128, 31)',
1386
- },
1387
- },
1388
- text: 'Color text',
1389
- },
1390
- ],
1391
- },
1392
- {
1393
- id: expect.anything(),
1394
- type: 'bullet-list',
1395
- blocks: [
1396
- {
1397
- id: expect.anything(),
1398
- type: 'list-item',
1399
- annotations: { textStyle: 'paragraph' },
1400
- nodes: [
1401
- {
1402
- id: expect.anything(),
1403
- text: 'List item 1',
1404
- type: 'text',
1405
- },
1406
- ],
1407
- children: [],
1408
- },
1409
- {
1410
- id: expect.anything(),
1411
- type: 'list-item',
1412
- annotations: { textStyle: 'paragraph' },
1413
- nodes: [
1414
- {
1415
- id: expect.anything(),
1416
- text: 'List item 2',
1417
- type: 'text',
1418
- },
1419
- ],
1420
- children: [],
1421
- },
1422
- ],
1423
- },
1424
- {
1425
- id: expect.anything(),
1426
- type: 'number-list',
1427
- blocks: [
1428
- {
1429
- id: expect.anything(),
1430
- type: 'list-item',
1431
- annotations: { textStyle: 'paragraph' },
1432
- nodes: [
1433
- {
1434
- id: expect.anything(),
1435
- text: 'List item 1',
1436
- type: 'text',
1437
- },
1438
- ],
1439
- children: [],
1440
- },
1441
- {
1442
- id: expect.anything(),
1443
- type: 'list-item',
1444
- annotations: { textStyle: 'paragraph' },
1445
- nodes: [
1446
- {
1447
- id: expect.anything(),
1448
- text: 'List item 2',
1449
- type: 'text',
1450
- },
1451
- ],
1452
- children: [],
1453
- },
1454
- ],
1455
- },
1456
- {
1457
- id: expect.anything(),
1458
- type: 'paragraph',
1459
- annotations: { textAlign: 'left', textStyle: 'paragraph' },
1460
- nodes: [
1461
- {
1462
- id: expect.anything(),
1463
- type: 'text',
1464
- text: 'Left align',
1465
- },
1466
- ],
1467
- },
1468
- {
1469
- id: expect.anything(),
1470
- type: 'paragraph',
1471
- annotations: { textAlign: 'right', textStyle: 'paragraph' },
1472
- nodes: [
1473
- {
1474
- id: expect.anything(),
1475
- type: 'text',
1476
- text: 'Right align',
1477
- },
1478
- ],
1479
- },
1480
- {
1481
- id: expect.anything(),
1482
- type: 'paragraph',
1483
- annotations: {
1484
- indent: 1,
1485
- textAlign: 'left',
1486
- textStyle: 'paragraph',
1487
- customStyle: {
1488
- marginLeft: '16px',
1489
- },
1490
- },
1491
- nodes: [
1492
- {
1493
- id: expect.anything(),
1494
- type: 'text',
1495
- text: 'More indent 1',
1496
- },
1497
- ],
1498
- },
1499
- {
1500
- id: expect.anything(),
1501
- type: 'paragraph',
1502
- annotations: {
1503
- indent: 2,
1504
- textAlign: 'left',
1505
- textStyle: 'paragraph',
1506
- customStyle: {
1507
- marginLeft: '32px',
1508
- },
1509
- },
1510
- nodes: [
1511
- {
1512
- id: expect.anything(),
1513
- type: 'text',
1514
- text: 'More indent 2',
1515
- },
1516
- ],
1517
- },
1518
- {
1519
- id: expect.anything(),
1520
- type: 'paragraph',
1521
- annotations: { textStyle: 'paragraph' },
1522
- nodes: [
1523
- {
1524
- id: expect.anything(),
1525
- type: 'text',
1526
- annotations: {
1527
- link: {
1528
- groupKey: expect.anything(),
1529
- href: 'https://www.google.com',
1530
- customAttribute: {
1531
- 'href': 'https://www.google.com',
1532
- 'target': '_blank',
1533
- 'id': 'a',
1534
- 'data-link': 'link',
1535
- },
1536
- customStyle: { fontSize: '8px', display: 'block' },
1537
- customClass: ['classA', 'classB'],
1538
- },
1539
- },
1540
- text: 'Link text',
1541
- },
1542
- ],
1543
- },
1544
- {
1545
- id: expect.anything(),
1546
- type: 'image',
1547
- nodes: [
1548
- {
1549
- id: expect.anything(),
1550
- type: 'image',
1551
- annotations: {
1552
- size: 'md',
1553
- customAttribute: {
1554
- src: 'mock-img-url',
1555
- },
1556
- customStyle: {
1557
- width: '100%',
1558
- },
1559
- },
1560
- url: 'mock-img-url',
1561
- },
1562
- ],
1563
- },
1564
- ]);
1565
- });
1566
- it('should convert a paragraph element with custom attributes to the expected RTEContentBlock', () => {
1567
- const sourceCode = '<p id="block-element" dir="block-dir">Hello</p>';
1568
- const content = VegaRTEContent.fromHtml(sourceCode);
1569
- expect(content.toJSON()).toEqual([
1570
- {
1571
- id: expect.anything(),
1572
- type: 'paragraph',
1573
- annotations: {
1574
- textStyle: 'paragraph',
1575
- customAttribute: {
1576
- id: 'block-element',
1577
- dir: 'block-dir',
1578
- },
1579
- },
1580
- nodes: [
1581
- {
1582
- id: expect.anything(),
1583
- text: 'Hello',
1584
- type: 'text',
1585
- },
1586
- ],
1587
- },
1588
- ]);
1589
- });
1590
- it('should convert a text code element with custom attributes to the expected RTEContentBlock', () => {
1591
- const sourceCode = '<p id="p-element"><code id="code">Hello</code></p>';
1592
- const content = VegaRTEContent.fromHtml(sourceCode);
1593
- expect(content.toJSON()).toEqual([
1594
- {
1595
- id: expect.anything(),
1596
- type: 'paragraph',
1597
- annotations: {
1598
- textStyle: 'paragraph',
1599
- customAttribute: {
1600
- id: 'p-element',
1601
- },
1602
- },
1603
- nodes: [
1604
- {
1605
- id: expect.anything(),
1606
- text: 'Hello',
1607
- type: 'text',
1608
- annotations: {
1609
- code: true,
1610
- customAttribute: {
1611
- id: 'code',
1612
- },
1613
- },
1614
- },
1615
- ],
1616
- },
1617
- ]);
1618
- });
1619
- it('should convert a list element with custom attributes to the expected RTEContentBlock', () => {
1620
- const sourceCode = '<ul id="ul-element"><li id="li1-element">Item 1</li><li id="li2-element">Item 2</li></ul>';
1621
- const content = VegaRTEContent.fromHtml(sourceCode);
1622
- expect(content.toJSON()).toEqual([
1623
- {
1624
- blocks: [
1625
- {
1626
- id: expect.anything(),
1627
- type: 'list-item',
1628
- annotations: {
1629
- textStyle: 'paragraph',
1630
- customAttribute: {
1631
- id: 'li1-element',
1632
- },
1633
- },
1634
- nodes: [
1635
- {
1636
- id: expect.anything(),
1637
- text: 'Item 1',
1638
- type: 'text',
1639
- },
1640
- ],
1641
- children: [],
1642
- },
1643
- {
1644
- id: expect.anything(),
1645
- type: 'list-item',
1646
- annotations: {
1647
- textStyle: 'paragraph',
1648
- customAttribute: {
1649
- id: 'li2-element',
1650
- },
1651
- },
1652
- nodes: [
1653
- {
1654
- id: expect.anything(),
1655
- text: 'Item 2',
1656
- type: 'text',
1657
- },
1658
- ],
1659
- children: [],
1660
- },
1661
- ],
1662
- id: expect.anything(),
1663
- type: 'bullet-list',
1664
- annotations: {
1665
- customAttribute: {
1666
- id: 'ul-element',
1667
- },
1668
- },
1669
- },
1670
- ]);
1671
- });
1672
- it('should convert a heading element with custom class to the expected RTEContentBlock', () => {
1673
- const sourceCode = '<h1 class="v-rte-class h1-class">Heading</h1>';
1674
- const content = VegaRTEContent.fromHtml(sourceCode);
1675
- expect(content.toJSON()).toEqual([
1676
- {
1677
- id: expect.anything(),
1678
- type: 'heading-1',
1679
- annotations: {
1680
- textStyle: 'heading-1',
1681
- customClass: ['h1-class'],
1682
- },
1683
- nodes: [
1684
- {
1685
- id: expect.anything(),
1686
- text: 'Heading',
1687
- type: 'text',
1688
- },
1689
- ],
1690
- },
1691
- ]);
1692
- });
1693
- it('should convert a paragraph element with custom class to the expected RTEContentBlock', () => {
1694
- const sourceCode = '<p class="p-class1 p-class2">Hello</p>';
1695
- const content = VegaRTEContent.fromHtml(sourceCode);
1696
- expect(content.toJSON()).toEqual([
1697
- {
1698
- id: expect.anything(),
1699
- type: 'paragraph',
1700
- annotations: {
1701
- textStyle: 'paragraph',
1702
- customClass: ['p-class1', 'p-class2'],
1703
- },
1704
- nodes: [
1705
- {
1706
- id: expect.anything(),
1707
- text: 'Hello',
1708
- type: 'text',
1709
- },
1710
- ],
1711
- },
1712
- ]);
1713
- });
1714
- it('should convert a text code element with custom class to the expected RTEContentBlock', () => {
1715
- const sourceCode = '<p class="p-class"><code class="code-class">Hello</code></p>';
1716
- const content = VegaRTEContent.fromHtml(sourceCode);
1717
- expect(content.toJSON()).toEqual([
1718
- {
1719
- id: expect.anything(),
1720
- type: 'paragraph',
1721
- annotations: {
1722
- textStyle: 'paragraph',
1723
- customClass: ['p-class'],
1724
- },
1725
- nodes: [
1726
- {
1727
- id: expect.anything(),
1728
- text: 'Hello',
1729
- type: 'text',
1730
- annotations: {
1731
- code: true,
1732
- customClass: ['code-class'],
1733
- },
1734
- },
1735
- ],
1736
- },
1737
- ]);
1738
- });
1739
- it('should convert a list element with custom class to the expected RTEContentBlock', () => {
1740
- const sourceCode = '<ul class="ul-class"><li class="li1-class">Item 1</li><li class="li2-class">Item 2</li></ul>';
1741
- const content = VegaRTEContent.fromHtml(sourceCode);
1742
- expect(content.toJSON()).toEqual([
1743
- {
1744
- blocks: [
1745
- {
1746
- id: expect.anything(),
1747
- type: 'list-item',
1748
- annotations: {
1749
- textStyle: 'paragraph',
1750
- customClass: ['li1-class'],
1751
- },
1752
- nodes: [
1753
- {
1754
- id: expect.anything(),
1755
- text: 'Item 1',
1756
- type: 'text',
1757
- },
1758
- ],
1759
- children: [],
1760
- },
1761
- {
1762
- id: expect.anything(),
1763
- type: 'list-item',
1764
- annotations: {
1765
- textStyle: 'paragraph',
1766
- customClass: ['li2-class'],
1767
- },
1768
- nodes: [
1769
- {
1770
- id: expect.anything(),
1771
- text: 'Item 2',
1772
- type: 'text',
1773
- },
1774
- ],
1775
- children: [],
1776
- },
1777
- ],
1778
- id: expect.anything(),
1779
- type: 'bullet-list',
1780
- annotations: {
1781
- customClass: ['ul-class'],
1782
- },
1783
- },
1784
- ]);
1785
- });
1786
- it('should convert a heading element with custom attributes to the expected RTEContentBlock', () => {
1787
- const sourceCode = '<h1 id="h1-element">Heading</h1>';
1788
- const content = VegaRTEContent.fromHtml(sourceCode);
1789
- expect(content.toJSON()).toEqual([
1790
- {
1791
- id: expect.anything(),
1792
- type: 'heading-1',
1793
- annotations: {
1794
- textStyle: 'heading-1',
1795
- customAttribute: {
1796
- id: 'h1-element',
1797
- },
1798
- },
1799
- nodes: [
1800
- {
1801
- id: expect.anything(),
1802
- text: 'Heading',
1803
- type: 'text',
1804
- },
1805
- ],
1806
- },
1807
- ]);
1808
- });
1809
- it('should convert a paragraph element with custom style to the expected RTEContentBlock', () => {
1810
- const sourceCode = '<p style="text-align: center;">Hello</p>';
1811
- const content = VegaRTEContent.fromHtml(sourceCode);
1812
- expect(content.toJSON()).toEqual([
1813
- {
1814
- id: expect.anything(),
1815
- type: 'paragraph',
1816
- annotations: {
1817
- textStyle: 'paragraph',
1818
- textAlign: 'center',
1819
- customStyle: {
1820
- textAlign: 'center',
1821
- },
1822
- },
1823
- nodes: [
1824
- {
1825
- id: expect.anything(),
1826
- text: 'Hello',
1827
- type: 'text',
1828
- },
1829
- ],
1830
- },
1831
- ]);
1832
- });
1833
- it('should convert a text code element with custom style to the expected RTEContentBlock', () => {
1834
- const sourceCode = '<p style="text-align: center;"><code style="font-weight: 700;">Hello</code></p>';
1835
- const content = VegaRTEContent.fromHtml(sourceCode);
1836
- expect(content.toJSON()).toEqual([
1837
- {
1838
- id: expect.anything(),
1839
- type: 'paragraph',
1840
- annotations: {
1841
- textStyle: 'paragraph',
1842
- textAlign: 'center',
1843
- customStyle: {
1844
- textAlign: 'center',
1845
- },
1846
- },
1847
- nodes: [
1848
- {
1849
- id: expect.anything(),
1850
- text: 'Hello',
1851
- type: 'text',
1852
- annotations: {
1853
- bold: true,
1854
- code: true,
1855
- customStyle: {
1856
- fontWeight: '700',
1857
- },
1858
- },
1859
- },
1860
- ],
1861
- },
1862
- ]);
1863
- });
1864
- it('should convert a list element with custom style to the expected RTEContentBlock', () => {
1865
- const sourceCode = '<ul style="padding: 20px;"><li style="text-align: center;">Item 1</li><li style="padding: 20px;">Item 2</li></ul>';
1866
- const content = VegaRTEContent.fromHtml(sourceCode);
1867
- expect(content.toJSON()).toEqual([
1868
- {
1869
- blocks: [
1870
- {
1871
- id: expect.anything(),
1872
- type: 'list-item',
1873
- annotations: {
1874
- textStyle: 'paragraph',
1875
- textAlign: 'center',
1876
- customStyle: {
1877
- textAlign: 'center',
1878
- },
1879
- },
1880
- nodes: [
1881
- {
1882
- id: expect.anything(),
1883
- text: 'Item 1',
1884
- type: 'text',
1885
- },
1886
- ],
1887
- children: [],
1888
- },
1889
- {
1890
- id: expect.anything(),
1891
- type: 'list-item',
1892
- annotations: {
1893
- textStyle: 'paragraph',
1894
- customStyle: {
1895
- padding: '20px',
1896
- },
1897
- },
1898
- nodes: [
1899
- {
1900
- id: expect.anything(),
1901
- text: 'Item 2',
1902
- type: 'text',
1903
- },
1904
- ],
1905
- children: [],
1906
- },
1907
- ],
1908
- id: expect.anything(),
1909
- type: 'bullet-list',
1910
- annotations: {
1911
- customStyle: {
1912
- padding: '20px',
1913
- },
1914
- },
1915
- },
1916
- ]);
1917
- });
1918
- it('should convert the li elements into list block', () => {
1919
- const sourceCode = '<li>Item 1</li><li>Item 2</li><li>Item 3</li>';
1920
- const content = VegaRTEContent.fromHtml(sourceCode);
1921
- expect(content.toHtml()).toMatchSnapshot();
1922
- expect(content.toJSON()).toEqual([
1923
- {
1924
- id: expect.anything(),
1925
- type: 'bullet-list',
1926
- blocks: [
1927
- {
1928
- id: expect.anything(),
1929
- type: 'list-item',
1930
- annotations: { textStyle: 'paragraph' },
1931
- nodes: [{ id: expect.anything(), type: 'text', text: 'Item 1' }],
1932
- },
1933
- {
1934
- id: expect.anything(),
1935
- type: 'list-item',
1936
- annotations: { textStyle: 'paragraph' },
1937
- nodes: [{ id: expect.anything(), type: 'text', text: 'Item 2' }],
1938
- },
1939
- {
1940
- id: expect.anything(),
1941
- type: 'list-item',
1942
- annotations: { textStyle: 'paragraph' },
1943
- nodes: [{ id: expect.anything(), type: 'text', text: 'Item 3' }],
1944
- },
1945
- ],
1946
- },
1947
- ]);
1948
- });
1949
- });
1950
- describe('fromHtml with autoMatchFormat false', () => {
1951
- it('should not match bold style', () => {
1952
- const sourceCode = '<p style="font-weight: 700;">Hello</p>';
1953
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
1954
- expect(content.toHtml()).toEqual(`<p style="font-weight: 700;">Hello</p>`);
1955
- expect(content.toJSON()).toEqual([
1956
- {
1957
- id: expect.anything(),
1958
- type: 'paragraph',
1959
- annotations: {
1960
- customStyle: {
1961
- fontWeight: '700',
1962
- },
1963
- },
1964
- nodes: [
1965
- {
1966
- id: expect.anything(),
1967
- text: 'Hello',
1968
- type: 'text',
1969
- annotations: { plainText: true },
1970
- },
1971
- ],
1972
- },
1973
- ]);
1974
- });
1975
- it('should not match color style', () => {
1976
- const sourceCode = '<p style="color: red">Hello</p>';
1977
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
1978
- expect(content.toHtml()).toEqual(`<p style="color: red;">Hello</p>`);
1979
- expect(content.toJSON()).toEqual([
1980
- {
1981
- id: expect.anything(),
1982
- type: 'paragraph',
1983
- annotations: {
1984
- customStyle: {
1985
- color: 'red',
1986
- },
1987
- },
1988
- nodes: [
1989
- {
1990
- id: expect.anything(),
1991
- text: 'Hello',
1992
- type: 'text',
1993
- annotations: { plainText: true },
1994
- },
1995
- ],
1996
- },
1997
- ]);
1998
- });
1999
- it('should not match link style', () => {
2000
- const sourceCode = `<p><a href="https://example.com">Link</a></p>`;
2001
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2002
- expect(content.toHtml()).toEqual(`<p><a href="https://example.com">Link</a></p>`);
2003
- expect(content.toJSON()).toEqual([
2004
- {
2005
- id: expect.anything(),
2006
- type: 'paragraph',
2007
- nodes: [
2008
- {
2009
- id: expect.anything(),
2010
- type: 'text',
2011
- text: 'Link',
2012
- annotations: {
2013
- plainText: true,
2014
- link: {
2015
- customAttribute: {
2016
- href: 'https://example.com',
2017
- },
2018
- groupKey: expect.anything(),
2019
- href: 'https://example.com',
2020
- },
2021
- },
2022
- },
2023
- ],
2024
- },
2025
- ]);
2026
- });
2027
- it('should not match heading', () => {
2028
- const sourceCode = '<h1><span>Hello</span></h1>';
2029
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2030
- expect(content.toHtml()).toEqual(`<h1><span>Hello</span></h1>`);
2031
- expect(content.toJSON()).toEqual([
2032
- {
2033
- id: expect.anything(),
2034
- nodes: [{ id: expect.anything(), text: 'Hello', type: 'text' }],
2035
- type: 'heading-1',
2036
- },
2037
- ]);
2038
- });
2039
- it('should not match image style', () => {
2040
- const sourceCode = '<img src="https://example.com/image.jpg">';
2041
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2042
- expect(content.toHtml()).toEqual(`<img src="https://example.com/image.jpg">`);
2043
- expect(content.toJSON()).toEqual([
2044
- {
2045
- id: expect.anything(),
2046
- type: 'image',
2047
- annotations: { internalWrapper: true },
2048
- nodes: [
2049
- {
2050
- annotations: {
2051
- customAttribute: { src: 'https://example.com/image.jpg' },
2052
- size: undefined,
2053
- },
2054
- id: expect.anything(),
2055
- type: 'image',
2056
- url: 'https://example.com/image.jpg',
2057
- },
2058
- ],
2059
- },
2060
- ]);
2061
- });
2062
- it('should not match list style', () => {
2063
- const sourceCode = '<ul><li>Item 1</li><li>Item 2</li></ul>';
2064
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2065
- expect(content.toHtml()).toEqual(`<ul><li>Item 1</li><li>Item 2</li></ul>`);
2066
- expect(content.toJSON()).toEqual([
2067
- {
2068
- id: expect.anything(),
2069
- type: 'bullet-list',
2070
- blocks: [
2071
- {
2072
- id: expect.anything(),
2073
- type: 'list-item',
2074
- children: [],
2075
- nodes: [
2076
- {
2077
- id: expect.anything(),
2078
- text: 'Item 1',
2079
- type: 'text',
2080
- annotations: { plainText: true },
2081
- },
2082
- ],
2083
- },
2084
- {
2085
- id: expect.anything(),
2086
- type: 'list-item',
2087
- children: [],
2088
- nodes: [
2089
- {
2090
- id: expect.anything(),
2091
- text: 'Item 2',
2092
- type: 'text',
2093
- annotations: { plainText: true },
2094
- },
2095
- ],
2096
- },
2097
- ],
2098
- },
2099
- ]);
2100
- });
2101
- it('should not match div to internal style', () => {
2102
- const sourceCode = "<div class='my-class'><span> I want this be a sentence </span><span class='my-another-class'> I want this be another sentence </span></div>";
2103
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2104
- expect(content.toHtml()).toEqual(`<div class="my-class"><span> I want this be a sentence </span><span class="my-another-class"> I want this be another sentence </span></div>`);
2105
- expect(content.toJSON()).toEqual([
2106
- {
2107
- id: expect.anything(),
2108
- type: 'html-block',
2109
- htmlTag: 'div',
2110
- annotations: { customClass: ['my-class'] },
2111
- children: [
2112
- {
2113
- id: expect.anything(),
2114
- type: 'paragraph',
2115
- annotations: { internalWrapper: true },
2116
- nodes: [
2117
- { id: expect.anything(), text: ' I want this be a sentence ', type: 'text' },
2118
- {
2119
- id: expect.anything(),
2120
- type: 'text',
2121
- annotations: { customClass: ['my-another-class'] },
2122
- text: ' I want this be another sentence ',
2123
- },
2124
- ],
2125
- },
2126
- ],
2127
- },
2128
- ]);
2129
- });
2130
- it('should not match parent style', () => {
2131
- const sourceCode = `<p style="font-weight: bold;font-style: italic;text-decoration: line-through;color: pink;text-shadow: 2px 2px 5px gray;font-size: 24px;">mix</p>`;
2132
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2133
- expect(content.toHtml()).toEqual(`<p style="font-weight: bold;font-style: italic;text-decoration: line-through;color: pink;text-shadow: 2px 2px 5px gray;font-size: 24px;">mix</p>`);
2134
- });
2135
- it('should not match parent link style', () => {
2136
- const sourceCode = `<a id="readMoreLink" class="link read-more" href="https://example.com" style="color: #2980b9; text-decoration: underline;">Read more</a>`;
2137
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2138
- expect(content.toHtml()).toEqual(`<a id="readMoreLink" href="https://example.com" class="link read-more" style="color: #2980b9; text-decoration: underline;">Read more</a>`);
2139
- });
2140
- it('should not match code style', () => {
2141
- const sourceCode = `<p>This is <code>code text</code>.</p>`;
2142
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2143
- expect(content.toHtml()).toEqual(sourceCode);
2144
- expect(content.toJSON()).toEqual([
2145
- {
2146
- id: expect.anything(),
2147
- type: 'paragraph',
2148
- nodes: [
2149
- {
2150
- id: expect.anything(),
2151
- annotations: { plainText: true },
2152
- text: 'This is ',
2153
- type: 'text',
2154
- },
2155
- {
2156
- id: expect.anything(),
2157
- type: 'text',
2158
- text: 'code text',
2159
- annotations: { code: true },
2160
- },
2161
- { id: expect.anything(), type: 'text', annotations: { plainText: true }, text: '.' },
2162
- ],
2163
- },
2164
- ]);
2165
- });
2166
- it('should preserve plain text nodes correctly', () => {
2167
- const sourceCode = `<p>Plain text <span>with span</span> and <strong>bold</strong> text.</p>`;
2168
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2169
- const htmlOutput = content.toHtml();
2170
- expect(htmlOutput).toEqual(sourceCode);
2171
- const jsonData = content.toJSON();
2172
- expect(jsonData).toEqual([
2173
- {
2174
- id: expect.anything(),
2175
- type: 'paragraph',
2176
- nodes: [
2177
- {
2178
- id: expect.anything(),
2179
- text: 'Plain text ',
2180
- type: 'text',
2181
- annotations: { plainText: true },
2182
- },
2183
- { id: expect.anything(), text: 'with span', type: 'text' },
2184
- {
2185
- id: expect.anything(),
2186
- text: ' and ',
2187
- type: 'text',
2188
- annotations: { plainText: true },
2189
- },
2190
- {
2191
- id: expect.anything(),
2192
- text: 'bold',
2193
- type: 'text',
2194
- annotations: {
2195
- inlineHtml: {
2196
- htmlTag: 'strong',
2197
- },
2198
- plainText: true,
2199
- },
2200
- },
2201
- {
2202
- id: expect.anything(),
2203
- text: ' text.',
2204
- type: 'text',
2205
- annotations: { plainText: true },
2206
- },
2207
- ],
2208
- },
2209
- ]);
2210
- expect(VegaRTEContent.fromJSON(jsonData, { autoMatchFormat: false }).toHtml()).toEqual(htmlOutput);
2211
- });
2212
- it('should convert the html block to RTEContentBlock', () => {
2213
- const sourceCode = `
2214
- <div class='custom-container'>
2215
- <p class='custom-p'>
2216
- <span>Google Chrome is a free, </span><span style='font-weight: 700;'>open-source</span><span> web browser developed by Google, released in 2008.</span>
2217
- </p>
2218
- </div>`;
2219
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2220
- expect(content.toJSON()).toEqual([
2221
- {
2222
- id: expect.anything(),
2223
- type: 'html-block',
2224
- htmlTag: 'div',
2225
- annotations: { customClass: ['custom-container'] },
2226
- children: [
2227
- {
2228
- id: expect.anything(),
2229
- type: 'paragraph',
2230
- annotations: { customClass: ['custom-p'] },
2231
- nodes: [
2232
- { id: expect.anything(), type: 'text', text: 'Google Chrome is a free, ' },
2233
- {
2234
- id: expect.anything(),
2235
- type: 'text',
2236
- text: 'open-source',
2237
- annotations: { bold: true, customStyle: { fontWeight: '700' } },
2238
- },
2239
- {
2240
- id: expect.anything(),
2241
- type: 'text',
2242
- text: ' web browser developed by Google, released in 2008.',
2243
- },
2244
- ],
2245
- },
2246
- ],
2247
- },
2248
- ]);
2249
- });
2250
- it('should convert the html block with RTE node as expect', () => {
2251
- const sourceCode = `<section>111<span> 222 </span>333</section>`;
2252
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2253
- expect(content.toJSON()).toEqual([
2254
- {
2255
- id: expect.anything(),
2256
- type: 'html-block',
2257
- htmlTag: 'section',
2258
- children: [
2259
- {
2260
- id: expect.anything(),
2261
- type: 'paragraph',
2262
- annotations: { internalWrapper: true },
2263
- nodes: [
2264
- {
2265
- id: expect.anything(),
2266
- type: 'text',
2267
- annotations: { plainText: true },
2268
- text: '111',
2269
- },
2270
- { id: expect.anything(), type: 'text', text: ' 222 ' },
2271
- {
2272
- id: expect.anything(),
2273
- type: 'text',
2274
- annotations: { plainText: true },
2275
- text: '333',
2276
- },
2277
- ],
2278
- },
2279
- ],
2280
- },
2281
- ]);
2282
- expect(content.toHtml()).toEqual(sourceCode);
2283
- });
2284
- it('should convert the html block with an internal block wrapper to include the text nodes', () => {
2285
- const sourceCode = `<section>111<span> 222 </span>333</section>`;
2286
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2287
- expect(content.toJSON()).toEqual([
2288
- {
2289
- id: expect.anything(),
2290
- type: 'html-block',
2291
- htmlTag: 'section',
2292
- children: [
2293
- {
2294
- id: expect.anything(),
2295
- type: 'paragraph',
2296
- annotations: { internalWrapper: true },
2297
- nodes: [
2298
- {
2299
- id: expect.anything(),
2300
- type: 'text',
2301
- annotations: { plainText: true },
2302
- text: '111',
2303
- },
2304
- { id: expect.anything(), type: 'text', text: ' 222 ' },
2305
- {
2306
- id: expect.anything(),
2307
- type: 'text',
2308
- annotations: { plainText: true },
2309
- text: '333',
2310
- },
2311
- ],
2312
- },
2313
- ],
2314
- },
2315
- ]);
2316
- expect(content.toHtml()).toEqual(sourceCode);
2317
- });
2318
- it('should convert the img element with an internal block wrapper', () => {
2319
- const sourceCode = `<section><img src="mocked-url"></section><div><img src="mocked-url-2"></div><img src="mocked-url-3">`;
2320
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2321
- expect(content.toJSON()).toEqual([
2322
- {
2323
- id: expect.anything(),
2324
- type: 'html-block',
2325
- htmlTag: 'section',
2326
- children: [
2327
- {
2328
- id: expect.anything(),
2329
- type: 'image',
2330
- annotations: { internalWrapper: true },
2331
- nodes: [
2332
- {
2333
- id: expect.anything(),
2334
- type: 'image',
2335
- url: 'mocked-url',
2336
- annotations: { customAttribute: { src: 'mocked-url' }, size: undefined },
2337
- },
2338
- ],
2339
- },
2340
- ],
2341
- },
2342
- {
2343
- id: expect.anything(),
2344
- type: 'image',
2345
- nodes: [
2346
- {
2347
- id: expect.anything(),
2348
- type: 'image',
2349
- url: 'mocked-url-2',
2350
- annotations: { customAttribute: { src: 'mocked-url-2' }, size: undefined },
2351
- },
2352
- ],
2353
- },
2354
- {
2355
- id: expect.anything(),
2356
- type: 'image',
2357
- annotations: { internalWrapper: true },
2358
- nodes: [
2359
- {
2360
- id: expect.anything(),
2361
- type: 'image',
2362
- url: 'mocked-url-3',
2363
- annotations: { customAttribute: { src: 'mocked-url-3' }, size: undefined },
2364
- },
2365
- ],
2366
- },
2367
- ]);
2368
- expect(content.toHtml()).toEqual(sourceCode);
2369
- });
2370
- it('should show the internal block wrapper if the block has annotations', () => {
2371
- const data = [
2372
- {
2373
- id: expect.anything(),
2374
- type: 'html-block',
2375
- htmlTag: 'section',
2376
- children: [
2377
- {
2378
- id: expect.anything(),
2379
- type: 'paragraph',
2380
- annotations: { internalWrapper: true },
2381
- nodes: [
2382
- {
2383
- id: expect.anything(),
2384
- type: 'text',
2385
- annotations: {
2386
- plainText: true,
2387
- link: { href: 'https://example.com', groupKey: 'link-group-1' },
2388
- },
2389
- text: 'link',
2390
- },
2391
- ],
2392
- },
2393
- ],
2394
- },
2395
- ];
2396
- expect(VegaRTEContent.fromJSON(data, { autoMatchFormat: false }).toHtml()).toEqual(`<section><a href="https://example.com">link</a></section>`);
2397
- data[0].children[0].annotations = { textAlign: 'center' };
2398
- expect(VegaRTEContent.fromJSON(data, { autoMatchFormat: false }).toHtml()).toEqual(`<section><p style="text-align: center;"><a href="https://example.com">link</a></p></section>`);
2399
- });
2400
- it('should covert nested html block as expect', () => {
2401
- const sourceCode = `<section><nav>React<span> Vue </span>Angular</nav></section>`;
2402
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2403
- expect(content.toJSON()).toEqual([
2404
- {
2405
- id: expect.anything(),
2406
- type: 'html-block',
2407
- htmlTag: 'section',
2408
- children: [
2409
- {
2410
- id: expect.anything(),
2411
- type: 'html-block',
2412
- htmlTag: 'nav',
2413
- children: [
2414
- {
2415
- id: expect.anything(),
2416
- type: 'paragraph',
2417
- annotations: { internalWrapper: true },
2418
- nodes: [
2419
- {
2420
- id: expect.anything(),
2421
- type: 'text',
2422
- annotations: { plainText: true },
2423
- text: 'React',
2424
- },
2425
- { id: expect.anything(), type: 'text', text: ' Vue ' },
2426
- {
2427
- id: expect.anything(),
2428
- type: 'text',
2429
- annotations: { plainText: true },
2430
- text: 'Angular',
2431
- },
2432
- ],
2433
- },
2434
- ],
2435
- },
2436
- ],
2437
- },
2438
- ]);
2439
- expect(content.toHtml()).toEqual(sourceCode);
2440
- });
2441
- it('should not covert the unsupported html', () => {
2442
- const sourceCode = `<section><abc>test </abc>123</section>`;
2443
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2444
- expect(content.toHtml()).toEqual(`<section>test 123</section>`);
2445
- });
2446
- it('should convert as expect if it is internal element', () => {
2447
- const sourceCode = `<h1>123</h1>`;
2448
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2449
- expect(content.toHtml()).toEqual(`<h1>123</h1>`);
2450
- expect(content.toJSON()).toEqual([
2451
- {
2452
- id: expect.anything(),
2453
- type: 'heading-1',
2454
- nodes: [
2455
- {
2456
- id: expect.anything(),
2457
- text: '123',
2458
- type: 'text',
2459
- annotations: { plainText: true },
2460
- },
2461
- ],
2462
- },
2463
- ]);
2464
- });
2465
- it('should convert nested inline html node as expect', () => {
2466
- const sourceCode = `<p><b><u><s>111</s></u></b></p>`;
2467
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2468
- expect(content.toHtml()).toEqual(sourceCode);
2469
- expect(content.toJSON()).toEqual([
2470
- {
2471
- id: expect.anything(),
2472
- type: 'paragraph',
2473
- nodes: [
2474
- {
2475
- id: expect.anything(),
2476
- type: 'text',
2477
- text: '111',
2478
- annotations: {
2479
- plainText: true,
2480
- inlineHtml: {
2481
- htmlTag: 'b',
2482
- child: {
2483
- htmlTag: 'u',
2484
- child: {
2485
- htmlTag: 's',
2486
- },
2487
- },
2488
- },
2489
- },
2490
- },
2491
- ],
2492
- },
2493
- ]);
2494
- });
2495
- it('should convert the inline html node with custom attrs', () => {
2496
- const sourceCode = `<p><b id="b-element" class="my-class-1 my-class-2" style="color: red; background: yellow;">text</b></p>`;
2497
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2498
- expect(content.toHtml()).toEqual(sourceCode);
2499
- expect(content.toJSON()).toEqual([
2500
- {
2501
- id: expect.anything(),
2502
- type: 'paragraph',
2503
- nodes: [
2504
- {
2505
- id: expect.anything(),
2506
- type: 'text',
2507
- text: 'text',
2508
- annotations: {
2509
- plainText: true,
2510
- inlineHtml: {
2511
- htmlTag: 'b',
2512
- customAttribute: { id: 'b-element' },
2513
- customClass: ['my-class-1', 'my-class-2'],
2514
- customStyle: { background: 'yellow', color: 'red' },
2515
- },
2516
- },
2517
- },
2518
- ],
2519
- },
2520
- ]);
2521
- });
2522
- it('should convert the inline html node with text node as expect', () => {
2523
- const sourceCode = `<p>Do not forget to buy <mark>milk</mark> today.</p>`;
2524
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2525
- expect(content.toHtml()).toEqual(sourceCode);
2526
- expect(content.toJSON()).toEqual([
2527
- {
2528
- id: expect.anything(),
2529
- type: 'paragraph',
2530
- nodes: [
2531
- {
2532
- id: expect.anything(),
2533
- type: 'text',
2534
- annotations: { plainText: true },
2535
- text: 'Do not forget to buy ',
2536
- },
2537
- {
2538
- id: expect.anything(),
2539
- type: 'text',
2540
- text: 'milk',
2541
- annotations: { inlineHtml: { htmlTag: 'mark' }, plainText: true },
2542
- },
2543
- {
2544
- id: expect.anything(),
2545
- annotations: { plainText: true },
2546
- type: 'text',
2547
- text: ' today.',
2548
- },
2549
- ],
2550
- },
2551
- ]);
2552
- });
2553
- it('should convert the span as inline html when it includes not text node', () => {
2554
- const sourceCode = `<p>This is a <span style="color: red;"><b>red</b></span> word.</p>`;
2555
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2556
- expect(content.toHtml()).toEqual(sourceCode);
2557
- expect(content.toJSON()).toEqual([
2558
- {
2559
- id: expect.anything(),
2560
- type: 'paragraph',
2561
- nodes: [
2562
- {
2563
- id: expect.anything(),
2564
- type: 'text',
2565
- text: 'This is a ',
2566
- annotations: { plainText: true },
2567
- },
2568
- {
2569
- id: expect.anything(),
2570
- type: 'text',
2571
- text: 'red',
2572
- annotations: {
2573
- plainText: true,
2574
- inlineHtml: {
2575
- child: { htmlTag: 'b' },
2576
- customStyle: { color: 'red' },
2577
- htmlTag: 'span',
2578
- },
2579
- },
2580
- },
2581
- {
2582
- id: expect.anything(),
2583
- type: 'text',
2584
- annotations: { plainText: true },
2585
- text: ' word.',
2586
- },
2587
- ],
2588
- },
2589
- ]);
2590
- });
2591
- it('should convert the supported block html as expected', () => {
2592
- const sourceCode = `<header>
2593
- <h1>HEADER Example</h1>
2594
- </header>
2595
- <nav>
2596
- <ul>
2597
- <li>NAV Item 1</li>
2598
- <li>NAV Item 2</li>
2599
- </ul>
2600
- </nav>
2601
- <main>
2602
- <article>
2603
- <header>
2604
- <h2>ARTICLE Title (HX)</h2>
2605
- </header>
2606
- <section>
2607
- <h3>SECTION Heading</h3>
2608
- <p>This is inside a section.</p>
2609
- </section>
2610
- <aside>
2611
- <p>This is an ASIDE.</p>
2612
- </aside>
2613
- <footer>
2614
- <p>ARTICLE Footer</p>
2615
- </footer>
2616
- </article>
2617
- <address>ADDRESS: 123 Main St, City, Country</address>
2618
- <blockquote cite="https://example.com">BLOCKQUOTE: “This is a quoted text.”</blockquote>
2619
- <details>
2620
- <summary>DETAILS / SUMMARY Example</summary>
2621
- <p>Extra information shown when expanded.</p>
2622
- </details>
2623
- <dl>
2624
- <dt>DT: Term</dt>
2625
- <dd>DD: Description of the term.</dd>
2626
- </dl>
2627
- <form>
2628
- <fieldset>
2629
- <legend>LEGEND Example</legend>
2630
- <label>
2631
- INPUT: <input type="text" placeholder="Enter text">
2632
- </label>
2633
- <button type="submit">BUTTON Submit</button>
2634
- </fieldset>
2635
- </form>
2636
- <pre>
2637
- PRE Example:
2638
- Line 1
2639
- Line 2
2640
- Line 3
2641
- </pre>
2642
- <hr>
2643
- <figure>
2644
- <img src="https://via.placeholder.com/150" alt="Placeholder image">
2645
- <figcaption>FIGCAPTION Example</figcaption>
2646
- </figure>
2647
- <table border="1">
2648
- <caption>CAPTION Example</caption>
2649
- <colgroup>
2650
- <col span="1" style="background: #eee;">
2651
- <col span="1" style="background: #ddd;">
2652
- </colgroup>
2653
- <thead>
2654
- <tr>
2655
- <th>TH 1</th>
2656
- <th>TH 2</th>
2657
- </tr>
2658
- </thead>
2659
- <tbody>
2660
- <tr>
2661
- <td>TD A</td>
2662
- <td>TD B</td>
2663
- </tr>
2664
- </tbody>
2665
- <tfoot>
2666
- <tr>
2667
- <td colspan="2">TFOOT Example</td>
2668
- </tr>
2669
- </tfoot>
2670
- </table>
2671
- </main>
2672
- <footer>
2673
- <p>FOOTER Example</p>
2674
- </footer>
2675
- `;
2676
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2677
- expect(CodeFormatter.format(content.toHtml())).toMatchSnapshot();
2678
- });
2679
- it('should convert the supported inline html as expected', () => {
2680
- const sourceCode = `<p>
2681
- <abbr>Abbreviation</abbr>
2682
- <audio src="audio.mp3"></audio>
2683
- <b>Bold</b>
2684
- <bdi>BDI</bdi>
2685
- <bdo dir="rtl">BDO</bdo>
2686
- <cite>Citation</cite>
2687
- <del>Deleted</del>
2688
- <dfn>Definition</dfn>
2689
- <embed src="embed.mp4"></embed>
2690
- <em>Emphasis</em>
2691
- <i>Italic</i>
2692
- <ins>Inserted</ins>
2693
- <kbd>Keyboard</kbd>
2694
- <mark>Marked</mark>
2695
- <meter value="0.5">Meter</meter>
2696
- <output>Output</output>
2697
- <progress value="50" max="100">Progress</progress>
2698
- <q>Quote</q>
2699
- <s>Strikethrough</s>
2700
- <small>Small</small>
2701
- <span></span>
2702
- <span>Span</span>
2703
- <strong>Strong</strong>
2704
- <sub>Subscript</sub>
2705
- <sup>Superscript</sup>
2706
- <time>Time</time>
2707
- <u>Underline</u>
2708
- <var>Variable</var>
2709
- <video src="video.mp4"></video>
2710
- </p>`;
2711
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2712
- expect(content.toHtml()).toMatchSnapshot();
2713
- });
2714
- it('should convert the code as inline html', () => {
2715
- const sourceCode = `<code>1111</code>
2716
- <code>
2717
- <b>222</b>
2718
- </code>
2719
- <b>
2720
- <code>333</code>
2721
- </b>`;
2722
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2723
- expect(content.toHtml()).toMatchSnapshot();
2724
- });
2725
- it('should convert the link that allow plain text', () => {
2726
- const sourceCode = `<p><a href="https://example.com">Example <b>link</b></a></p>`;
2727
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2728
- expect(content.toHtml()).toEqual(sourceCode);
2729
- expect(content.toJSON()).toEqual([
2730
- {
2731
- id: expect.anything(),
2732
- nodes: [
2733
- {
2734
- annotations: {
2735
- plainText: true,
2736
- link: {
2737
- customAttribute: { href: 'https://example.com' },
2738
- groupKey: expect.anything(),
2739
- href: 'https://example.com',
2740
- },
2741
- },
2742
- id: expect.anything(),
2743
- text: 'Example ',
2744
- type: 'text',
2745
- },
2746
- {
2747
- annotations: {
2748
- plainText: true,
2749
- inlineHtml: { htmlTag: 'b' },
2750
- link: {
2751
- customAttribute: { href: 'https://example.com' },
2752
- groupKey: expect.anything(),
2753
- href: 'https://example.com',
2754
- },
2755
- },
2756
- id: expect.anything(),
2757
- text: 'link',
2758
- type: 'text',
2759
- },
2760
- ],
2761
- type: 'paragraph',
2762
- },
2763
- ]);
2764
- });
2765
- // TODO: will be tracked in https://gethired.atlassian.net/browse/VD-7062
2766
- it('should split the multiple nested inline html', () => {
2767
- const sourceCode = `<p><b><s>111</s><u>222</u></b></p>`;
2768
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2769
- expect(content.toHtml()).toEqual(`<p><b><s>111</s></b><b><u>222</u></b></p>`);
2770
- });
2771
- it('should convert li elements into a list block by default', () => {
2772
- const sourceCode = '<li>Item 1</li><li>Item 2</li><li>Item 3</li>';
2773
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2774
- expect(content.toHtml()).toEqual(`<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>`);
2775
- });
2776
- it('should convert all the ul children to list item', () => {
2777
- const sourceCode = '<ul><li>Item 1</li>Item 2<li>Item 3</li></ul>';
2778
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2779
- expect(content.toHtml()).toEqual(`<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>`);
2780
- });
2781
- it('should correctly handle both standalone li elements and li elements with ul/ol', () => {
2782
- const sourceCode = `<li>111</li><li>222</li><li>333</li><ol>444</ol><p>555</p>`;
2783
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2784
- expect(content.toHtml()).toEqual(`<ul><li>111</li><li>222</li><li>333</li></ul><ol><li>444</li></ol><p>555</p>`);
2785
- });
2786
- it('should handle non-contiguous li elements as separate lists', () => {
2787
- const sourceCode = '<li>Item 1</li><p>Middle</p>Plain text<li>Item 2</li><li>Item 3</li>';
2788
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2789
- expect(content.toHtml()).toEqual(`<ul><li>Item 1</li></ul><p>Middle</p>Plain text<ul><li>Item 2</li><li>Item 3</li></ul>`);
2790
- });
2791
- it('should not merge bold annotation with custom attr', () => {
2792
- const sourceCode = '<span style="font-weight: bold;">bold text</span>';
2793
- const content = VegaRTEContent.fromHtml(sourceCode, { autoMatchFormat: false });
2794
- expect(content.toHtml()).toEqual(sourceCode);
2795
- });
2796
- it('should not remove blank space between elements', () => {
2797
- const sourceCode = '<p><span>A</span><span> </span><span>paragraph</span></p>';
2798
- const content = VegaRTEContent.fromHtml(sourceCode);
2799
- const paragraph = content.children[0];
2800
- expect(paragraph.children[1].text).toEqual(' ');
2801
- });
2802
- it('should convert empty value as expect', async () => {
2803
- const emptyContent = VegaRTEContent.fromHtml('', { autoMatchFormat: false });
2804
- expect(emptyContent.toHtml()).toEqual('');
2805
- expect(emptyContent.toJSON()).toEqual([]);
2806
- });
2807
- it('should convert the table with children elements to html block DTOs', () => {
2808
- const html = `<table>
2809
- <caption>Table Caption</caption>
2810
- <thead>
2811
- <tr>
2812
- <th>Header 1</th>
2813
- <th>Header 2</th>
2814
- </tr>
2815
- </thead>
2816
- <tbody>
2817
- <tr>
2818
- <td>Cell 1</td>
2819
- <td>Cell 2</td>
2820
- </tr>
2821
- <tr>
2822
- <td>Cell 3</td>
2823
- <td>Cell 4</td>
2824
- </tr>
2825
- </tbody>
2826
- </table>`;
2827
- const value = VegaRTEContent.fromHtml(html, { autoMatchFormat: false });
2828
- const table = value.children[0];
2829
- const caption = table.children[0];
2830
- const thead = table.children[1];
2831
- const tbody = table.children[2];
2832
- const theadRow = thead.children[0];
2833
- const theadCell = theadRow.children[0];
2834
- const tbodyRow = tbody.children[0];
2835
- const tbodyCell = tbodyRow.children[0];
2836
- expect(table).toBeInstanceOf(RTEHtmlBlock);
2837
- expect(caption).toBeInstanceOf(RTEHtmlBlock);
2838
- expect(thead).toBeInstanceOf(RTEHtmlBlock);
2839
- expect(tbody).toBeInstanceOf(RTEHtmlBlock);
2840
- expect(theadRow).toBeInstanceOf(RTEHtmlBlock);
2841
- expect(theadCell).toBeInstanceOf(RTEHtmlBlock);
2842
- expect(tbodyRow).toBeInstanceOf(RTEHtmlBlock);
2843
- expect(tbodyCell).toBeInstanceOf(RTEHtmlBlock);
2844
- expect(value.toJSON()).toEqual([
2845
- {
2846
- id: expect.anything(),
2847
- type: 'html-block',
2848
- htmlTag: 'table',
2849
- children: [
2850
- {
2851
- id: expect.anything(),
2852
- type: 'html-block',
2853
- htmlTag: 'caption',
2854
- children: [
2855
- {
2856
- id: expect.anything(),
2857
- annotations: {
2858
- internalWrapper: true,
2859
- },
2860
- type: 'paragraph',
2861
- nodes: [
2862
- {
2863
- id: expect.anything(),
2864
- annotations: {
2865
- plainText: true,
2866
- },
2867
- type: 'text',
2868
- text: 'Table Caption',
2869
- },
2870
- ],
2871
- },
2872
- ],
2873
- },
2874
- {
2875
- id: expect.anything(),
2876
- type: 'html-block',
2877
- htmlTag: 'thead',
2878
- children: [
2879
- {
2880
- id: expect.anything(),
2881
- type: 'html-block',
2882
- htmlTag: 'tr',
2883
- children: [
2884
- {
2885
- id: expect.anything(),
2886
- type: 'html-block',
2887
- htmlTag: 'th',
2888
- children: [
2889
- {
2890
- id: expect.anything(),
2891
- annotations: {
2892
- internalWrapper: true,
2893
- },
2894
- type: 'paragraph',
2895
- nodes: [
2896
- {
2897
- id: expect.anything(),
2898
- annotations: {
2899
- plainText: true,
2900
- },
2901
- type: 'text',
2902
- text: 'Header 1',
2903
- },
2904
- ],
2905
- },
2906
- ],
2907
- },
2908
- {
2909
- id: expect.anything(),
2910
- type: 'html-block',
2911
- htmlTag: 'th',
2912
- children: [
2913
- {
2914
- id: expect.anything(),
2915
- annotations: {
2916
- internalWrapper: true,
2917
- },
2918
- type: 'paragraph',
2919
- nodes: [
2920
- {
2921
- id: expect.anything(),
2922
- annotations: {
2923
- plainText: true,
2924
- },
2925
- type: 'text',
2926
- text: 'Header 2',
2927
- },
2928
- ],
2929
- },
2930
- ],
2931
- },
2932
- ],
2933
- },
2934
- ],
2935
- },
2936
- {
2937
- id: expect.anything(),
2938
- type: 'html-block',
2939
- htmlTag: 'tbody',
2940
- children: [
2941
- {
2942
- id: expect.anything(),
2943
- type: 'html-block',
2944
- htmlTag: 'tr',
2945
- children: [
2946
- {
2947
- id: expect.anything(),
2948
- type: 'html-block',
2949
- htmlTag: 'td',
2950
- children: [
2951
- {
2952
- id: expect.anything(),
2953
- annotations: {
2954
- internalWrapper: true,
2955
- },
2956
- type: 'paragraph',
2957
- nodes: [
2958
- {
2959
- id: expect.anything(),
2960
- annotations: {
2961
- plainText: true,
2962
- },
2963
- type: 'text',
2964
- text: 'Cell 1',
2965
- },
2966
- ],
2967
- },
2968
- ],
2969
- },
2970
- {
2971
- id: expect.anything(),
2972
- type: 'html-block',
2973
- htmlTag: 'td',
2974
- children: [
2975
- {
2976
- id: expect.anything(),
2977
- annotations: {
2978
- internalWrapper: true,
2979
- },
2980
- type: 'paragraph',
2981
- nodes: [
2982
- {
2983
- id: expect.anything(),
2984
- annotations: {
2985
- plainText: true,
2986
- },
2987
- type: 'text',
2988
- text: 'Cell 2',
2989
- },
2990
- ],
2991
- },
2992
- ],
2993
- },
2994
- ],
2995
- },
2996
- {
2997
- id: expect.anything(),
2998
- type: 'html-block',
2999
- htmlTag: 'tr',
3000
- children: [
3001
- {
3002
- id: expect.anything(),
3003
- type: 'html-block',
3004
- htmlTag: 'td',
3005
- children: [
3006
- {
3007
- id: expect.anything(),
3008
- annotations: {
3009
- internalWrapper: true,
3010
- },
3011
- type: 'paragraph',
3012
- nodes: [
3013
- {
3014
- id: expect.anything(),
3015
- annotations: {
3016
- plainText: true,
3017
- },
3018
- type: 'text',
3019
- text: 'Cell 3',
3020
- },
3021
- ],
3022
- },
3023
- ],
3024
- },
3025
- {
3026
- id: expect.anything(),
3027
- type: 'html-block',
3028
- htmlTag: 'td',
3029
- children: [
3030
- {
3031
- id: expect.anything(),
3032
- annotations: {
3033
- internalWrapper: true,
3034
- },
3035
- type: 'paragraph',
3036
- nodes: [
3037
- {
3038
- id: expect.anything(),
3039
- annotations: {
3040
- plainText: true,
3041
- },
3042
- type: 'text',
3043
- text: 'Cell 4',
3044
- },
3045
- ],
3046
- },
3047
- ],
3048
- },
3049
- ],
3050
- },
3051
- ],
3052
- },
3053
- ],
3054
- },
3055
- ]);
3056
- expect(value.toHtml()).toEqualHtml(html);
3057
- });
3058
- });
3059
- describe('fromJSON', () => {
3060
- it('should translate the paragraph as expect JSON', () => {
3061
- const content = [
3062
- {
3063
- id: '1',
3064
- type: 'paragraph',
3065
- nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
3066
- },
3067
- ];
3068
- expect(VegaRTEContent.fromJSON(content).toJSON()).toEqual([
3069
- {
3070
- id: '1',
3071
- type: 'paragraph',
3072
- annotations: { textStyle: 'paragraph' },
3073
- nodes: [{ id: '1-1', text: 'This is a paragraph', type: 'text' }],
3074
- },
3075
- ]);
3076
- expect(VegaRTEContent.fromJSON(content, { autoMatchFormat: true }).toJSON()).toEqual([
3077
- {
3078
- id: '1',
3079
- type: 'paragraph',
3080
- annotations: { textStyle: 'paragraph' },
3081
- nodes: [{ id: '1-1', text: 'This is a paragraph', type: 'text' }],
3082
- },
3083
- ]);
3084
- expect(VegaRTEContent.fromJSON(content, { autoMatchFormat: false }).toJSON()).toEqual([
3085
- {
3086
- id: '1',
3087
- type: 'paragraph',
3088
- nodes: [{ id: '1-1', text: 'This is a paragraph', type: 'text' }],
3089
- },
3090
- ]);
3091
- });
3092
- it('should translate the paragraph as expect html', () => {
3093
- const content = [
3094
- {
3095
- id: '1',
3096
- type: 'paragraph',
3097
- nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
3098
- },
3099
- ];
3100
- 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>`);
3101
- 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>`);
3102
- expect(VegaRTEContent.fromJSON(content, { autoMatchFormat: false }).toHtml()).toEqual(`<p><span>This is a paragraph</span></p>`);
3103
- expect(VegaRTEContent.fromJSON(content, { autoMatchFormat: false }).toHtml()).toEqual(`<p><span>This is a paragraph</span></p>`);
3104
- });
3105
- it('should translate the html block as expect html', () => {
3106
- const content = [
3107
- {
3108
- id: '1753954267610',
3109
- type: 'html-block',
3110
- htmlTag: 'section',
3111
- children: [
3112
- {
3113
- id: '1753954266383',
3114
- type: 'heading-1',
3115
- nodes: [
3116
- {
3117
- id: '1753954273029',
3118
- type: 'text',
3119
- text: 'WWF',
3120
- },
3121
- ],
3122
- },
3123
- {
3124
- id: '1753954263572',
3125
- type: 'paragraph',
3126
- nodes: [
3127
- {
3128
- id: '1753954266500',
3129
- type: 'text',
3130
- text: 'The World Wide Fund for Nature (WWF) is....',
3131
- },
3132
- ],
3133
- },
3134
- ],
3135
- },
3136
- {
3137
- id: '1753954266216',
3138
- type: 'html-block',
3139
- htmlTag: 'article',
3140
- children: [
3141
- {
3142
- id: '1753954270592',
3143
- type: 'heading-1',
3144
- nodes: [
3145
- {
3146
- id: '1753954272730',
3147
- type: 'text',
3148
- text: 'Google Chrome',
3149
- },
3150
- ],
3151
- },
3152
- {
3153
- id: '1753954265150',
3154
- type: 'paragraph',
3155
- nodes: [
3156
- {
3157
- id: '1753954272365',
3158
- type: 'text',
3159
- text: 'Google Chrome is a free, open-source web browser developed by Google, released in 2008.',
3160
- },
3161
- ],
3162
- },
3163
- ],
3164
- },
3165
- ];
3166
- expect(VegaRTEContent.fromJSON(content, { autoMatchFormat: false }).toHtml()).toMatchSnapshot();
3167
- expect(VegaRTEContent.fromJSON(content).toHtml()).toMatchSnapshot();
3168
- });
3169
- it('should getLastNode work properly', () => {
3170
- const content = [
3171
- {
3172
- id: '1753954267610',
3173
- type: 'html-block',
3174
- htmlTag: 'section',
3175
- children: [
3176
- {
3177
- id: '1753954266383',
3178
- type: 'heading-1',
3179
- nodes: [
3180
- {
3181
- id: '1753954273029',
3182
- type: 'text',
3183
- text: 'WWF',
3184
- },
3185
- ],
3186
- },
3187
- {
3188
- id: '1753954263572',
3189
- type: 'paragraph',
3190
- nodes: [
3191
- {
3192
- id: '1753954266500',
3193
- type: 'text',
3194
- text: 'The World Wide Fund for Nature (WWF) is....',
3195
- },
3196
- ],
3197
- },
3198
- ],
3199
- },
3200
- ];
3201
- let instance = VegaRTEContent.fromJSON([]);
3202
- expect(instance.getLastNode()).toBeNull();
3203
- instance = VegaRTEContent.fromJSON(content);
3204
- expect(instance.getLastNode().toJSON()).toEqual({
3205
- id: '1753954266500',
3206
- type: 'text',
3207
- text: 'The World Wide Fund for Nature (WWF) is....',
3208
- });
3209
- });
3210
- });
3211
- describe('cleanHtmlWhitespace', () => {
3212
- const cleaner = new HTMLContentCleaner();
3213
- const cleanHtmlWhitespace = (html) => {
3214
- return cleaner.clean(html);
3215
- };
3216
- it('should inline a table by removing all whitespace between tags', () => {
3217
- const input = `<table style="width: 400px; border-collapse: collapse;"> <thead> <tr> ` +
3218
- `<th style="padding: 12px; text-align: left; font-weight: bold;">Header 1</th> ` +
3219
- `<th style="padding: 12px; text-align: left; font-weight: bold;">Header 2</th> ` +
3220
- `<th style="padding: 12px; text-align: left; font-weight: bold;">Header 3</th> ` +
3221
- `</tr> </thead> <tbody> <tr> <td style="padding: 12px;">Cell 1-1</td> ` +
3222
- `<td style="padding: 12px;">Cell 1-2</td> <td style="padding: 12px;">Cell 1-3</td> ` +
3223
- `</tr> <tr> <td style="padding: 12px;">Cell 2-1</td> <td style="padding: 12px;">Cell 2-2</td> ` +
3224
- `<td style="padding: 12px;">Cell 2-3</td> </tr> <tr> <td style="padding: 12px;">Cell 3-1</td> ` +
3225
- `<td style="padding: 12px;">Cell 3-2</td> <td style="padding: 12px;">Cell 3-3</td> ` +
3226
- `</tr> </tbody> </table>`;
3227
- const expected = `<table style="width: 400px; border-collapse: collapse;"><thead><tr>` +
3228
- `<th style="padding: 12px; text-align: left; font-weight: bold;">Header 1</th>` +
3229
- `<th style="padding: 12px; text-align: left; font-weight: bold;">Header 2</th>` +
3230
- `<th style="padding: 12px; text-align: left; font-weight: bold;">Header 3</th>` +
3231
- `</tr></thead><tbody><tr>` +
3232
- `<td style="padding: 12px;">Cell 1-1</td>` +
3233
- `<td style="padding: 12px;">Cell 1-2</td>` +
3234
- `<td style="padding: 12px;">Cell 1-3</td>` +
3235
- `</tr><tr>` +
3236
- `<td style="padding: 12px;">Cell 2-1</td>` +
3237
- `<td style="padding: 12px;">Cell 2-2</td>` +
3238
- `<td style="padding: 12px;">Cell 2-3</td>` +
3239
- `</tr><tr>` +
3240
- `<td style="padding: 12px;">Cell 3-1</td>` +
3241
- `<td style="padding: 12px;">Cell 3-2</td>` +
3242
- `<td style="padding: 12px;">Cell 3-3</td>` +
3243
- `</tr></tbody></table>`;
3244
- expect(cleanHtmlWhitespace(input)).toBe(expected);
3245
- });
3246
- it('should remove \\n\\t after opening tag and before closing tag', () => {
3247
- const input = '<p>\n\t <span>test</span>\n\t </p>';
3248
- expect(cleanHtmlWhitespace(input)).toBe('<p><span>test</span></p>');
3249
- });
3250
- it('should remove all \\n and \\t characters', () => {
3251
- const input = '<p>\n\ttest\n</p>';
3252
- expect(cleanHtmlWhitespace(input)).toBe('<p>test</p>');
3253
- });
3254
- it('should preserve space between matching tags', () => {
3255
- const input = '<span> </span>';
3256
- expect(cleanHtmlWhitespace(input)).toBe('<span> </span>');
3257
- });
3258
- it('should preserve space with text between matching tags', () => {
3259
- const input = '<span> test </span>';
3260
- expect(cleanHtmlWhitespace(input)).toBe('<span> test </span>');
3261
- });
3262
- it('should preserve multiple spaces between matching tags', () => {
3263
- const input = '<span> </span>';
3264
- expect(cleanHtmlWhitespace(input)).toBe('<span> </span>');
3265
- });
3266
- it('should remove whitespace between opening tags', () => {
3267
- const input = '<div>\n\t<p></p></div>';
3268
- expect(cleanHtmlWhitespace(input)).toBe('<div><p></p></div>');
3269
- });
3270
- it('should remove \\n\\t after opening tag but preserve regular spaces', () => {
3271
- const input = '<p>\n\t Hello</p>';
3272
- expect(cleanHtmlWhitespace(input)).toBe('<p> Hello</p>');
3273
- });
3274
- it('should remove whitespace between multiple closing tags', () => {
3275
- const input = '<table><tbody><tr></tr> </tbody> </table>';
3276
- expect(cleanHtmlWhitespace(input)).toBe('<table><tbody><tr></tr></tbody></table>');
3277
- });
3278
- it('should remove whitespace between multiple opening tags', () => {
3279
- const input = '<div> <span></span></div>';
3280
- expect(cleanHtmlWhitespace(input)).toBe('<div><span></span></div>');
3281
- });
3282
- it('should handle complex nested structure', () => {
3283
- const input = '<div>\n\t<p>\n\t\t<span>Hello</span>\n\t</p>\n</div>';
3284
- expect(cleanHtmlWhitespace(input)).toBe('<div><p><span>Hello</span></p></div>');
3285
- });
3286
- it('should preserve regular spaces within text content', () => {
3287
- const input = '<p>Hello World</p>';
3288
- expect(cleanHtmlWhitespace(input)).toBe('<p>Hello World</p>');
3289
- });
3290
- it('should preserve multiple spaces in text content', () => {
3291
- const input = '<p>Hello World</p>';
3292
- expect(cleanHtmlWhitespace(input)).toBe('<p>Hello World</p>');
3293
- });
3294
- it('should not remove \\n between words in text content', () => {
3295
- const input = '<p>Hello\nWorld</p>';
3296
- expect(cleanHtmlWhitespace(input)).toBe('<p>Hello\nWorld</p>');
3297
- });
3298
- it('should not remove \\n between words with space in text content', () => {
3299
- const input = '<p>Hello\n World</p>';
3300
- expect(cleanHtmlWhitespace(input)).toBe('<p>Hello\n World</p>');
3301
- });
3302
- it('should remove newline after img tag', () => {
3303
- const input = '<div><img id="image-id" class="img-class" style="vertical-align: bottom; width: 25%; padding: 20px" alt="test alt" src="data:image/svg+xml;base64,xxx=" data-size="sm">\n</div>';
3304
- const expected = '<div><img id="image-id" class="img-class" style="vertical-align: bottom; width: 25%; padding: 20px" alt="test alt" src="data:image/svg+xml;base64,xxx=" data-size="sm"></div>';
3305
- expect(cleanHtmlWhitespace(input)).toBe(expected);
3306
- });
3307
- it('should handle 4-level deep nesting', () => {
3308
- const input = '<div>\n\t<section>\n\t\t<article>\n\t\t\t<p>Text</p>\n\t\t</article>\n\t</section>\n</div>';
3309
- expect(cleanHtmlWhitespace(input)).toBe('<div><section><article><p>Text</p></article></section></div>');
3310
- });
3311
- it('should handle 5-level deep nesting', () => {
3312
- const input = '<div>\n\t<section>\n\t\t<article>\n\t\t\t<main>\n\t\t\t\t<p>Text</p>\n\t\t\t</main>\n\t\t</article>\n\t</section>\n</div>';
3313
- expect(cleanHtmlWhitespace(input)).toBe('<div><section><article><main><p>Text</p></main></article></section></div>');
3314
- });
3315
- it('should handle 6-level deep nesting', () => {
3316
- const input = '<div>\n\t<section>\n\t\t<article>\n\t\t\t<main>\n\t\t\t\t<aside>\n\t\t\t\t\t<p>Text</p>\n\t\t\t\t</aside>\n\t\t\t</main>\n\t\t</article>\n\t</section>\n</div>';
3317
- expect(cleanHtmlWhitespace(input)).toBe('<div><section><article><main><aside><p>Text</p></aside></main></article></section></div>');
3318
- });
3319
- it('should remove whitespace after br and hr tags', () => {
3320
- const input1 = '<div><br>\n</div>';
3321
- expect(cleanHtmlWhitespace(input1)).toBe('<div><br></div>');
3322
- const input2 = '<div><hr>\n\t</div>';
3323
- expect(cleanHtmlWhitespace(input2)).toBe('<div><hr></div>');
3324
- const input3 = '<div><input type="text">\n</div>';
3325
- expect(cleanHtmlWhitespace(input3)).toBe('<div><input type="text"></div>');
3326
- });
3327
- it('should remove multiple consecutive \\n characters', () => {
3328
- const input = '<p>\n\n\n\nHello</p>';
3329
- expect(cleanHtmlWhitespace(input)).toBe('<p>Hello</p>');
3330
- });
3331
- it('should remove multiple consecutive \\t characters', () => {
3332
- const input = '<p>\t\t\tHello</p>';
3333
- expect(cleanHtmlWhitespace(input)).toBe('<p>Hello</p>');
3334
- });
3335
- it('should preserve empty matching tags', () => {
3336
- const input = '<span></span>';
3337
- expect(cleanHtmlWhitespace(input)).toBe('<span></span>');
3338
- });
3339
- it('should handle mixed spaces, tabs, and newlines', () => {
3340
- const input = '<div> \n\t <p>Text</p> \n\t </div>';
3341
- expect(cleanHtmlWhitespace(input)).toBe('<div><p>Text</p></div>');
3342
- });
3343
- it('should preserve spaces in attribute values', () => {
3344
- const input = '<p class="my custom class">Text</p>';
3345
- expect(cleanHtmlWhitespace(input)).toBe('<p class="my custom class">Text</p>');
3346
- });
3347
- it('should remove newlines after br tags', () => {
3348
- const input = '<p>Line 1<br>\nLine 2</p>';
3349
- expect(cleanHtmlWhitespace(input)).toBe('<p>Line 1<br>Line 2</p>');
3350
- });
3351
- it('should preserve spaces in code blocks between matching tags', () => {
3352
- const input = '<code> const x = 1; </code>';
3353
- expect(cleanHtmlWhitespace(input)).toBe('<code> const x = 1; </code>');
3354
- });
3355
- it('should handle empty string', () => {
3356
- expect(cleanHtmlWhitespace('')).toBe('');
3357
- });
3358
- it('should preserve plain text without tags', () => {
3359
- const input = 'Hello World';
3360
- expect(cleanHtmlWhitespace(input)).toBe('Hello World');
3361
- });
3362
- it('should remove whitespace between different inline elements', () => {
3363
- const input = '<span>text</span>\n\t<strong>bold</strong>';
3364
- expect(cleanHtmlWhitespace(input)).toBe('<span>text</span><strong>bold</strong>');
3365
- });
3366
- it('should remove \\t\\n combination', () => {
3367
- const input = '<p>\t\nHello</p>';
3368
- expect(cleanHtmlWhitespace(input)).toBe('<p>Hello</p>');
3369
- });
3370
- it('should remove complex \\n\\t\\n patterns', () => {
3371
- const input = '<p>\n\t\n\t\nHello</p>';
3372
- expect(cleanHtmlWhitespace(input)).toBe('<p>Hello</p>');
3373
- });
3374
- });
3375
- });