@globalpayments/vega 2.55.0 → 2.56.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 (275) hide show
  1. package/dist/cjs/{app-globals-f1ff47e3.js → app-globals-7e482341.js} +2 -2
  2. package/dist/cjs/{code-block-2d014e17.js → code-block-e56c5216.js} +99 -110
  3. package/dist/cjs/{component-value-history-controller-slimmer.abstract-6bfb9145.js → component-value-history-controller-slimmer.abstract-9a1285a1.js} +5 -5
  4. package/dist/cjs/{content-state-6a5da7ec.js → content-state-e07c843c.js} +90 -84
  5. package/dist/cjs/{design-token-d15e60fa.js → design-token-3e0bd48d.js} +1 -1
  6. package/dist/cjs/{element-appender-slimmer-2f16891f.js → element-appender-slimmer-2b9ca234.js} +1 -1
  7. package/dist/cjs/{image-annotation-action-617bbb13.js → image-annotation-action-76e3c89d.js} +1 -1
  8. package/dist/cjs/index.cjs.js +12 -5
  9. package/dist/cjs/loader.cjs.js +4 -4
  10. package/dist/cjs/{public-rules-a3b7e267.js → public-rules-1ac67099.js} +3 -3
  11. package/dist/cjs/{responsive-format-facade-4a19e115.js → responsive-format-facade-e2e11c24.js} +1 -1
  12. package/dist/cjs/{rich-text-editor-required-rule-e9c7c379.js → rich-text-editor-required-rule-63f50aa4.js} +3 -3
  13. package/dist/cjs/{style-formatter-b8cea5ee.js → style-formatter-0213d3a8.js} +1 -1
  14. package/dist/cjs/types-a4295b11.js +12 -0
  15. package/dist/cjs/vega-accordion.cjs.entry.js +4 -4
  16. package/dist/cjs/vega-app-header-button.cjs.entry.js +4 -4
  17. package/dist/cjs/vega-box.cjs.entry.js +5 -5
  18. package/dist/cjs/vega-button-circle.cjs.entry.js +4 -4
  19. package/dist/cjs/vega-button.cjs.entry.js +3 -3
  20. package/dist/cjs/vega-calendar_3.cjs.entry.js +49 -10
  21. package/dist/cjs/vega-card.cjs.entry.js +4 -4
  22. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  23. package/dist/cjs/vega-checkbox_2.cjs.entry.js +4 -1
  24. package/dist/cjs/vega-chip.cjs.entry.js +4 -4
  25. package/dist/cjs/vega-code-block.cjs.entry.js +6 -16
  26. package/dist/cjs/vega-date-picker_2.cjs.entry.js +4 -4
  27. package/dist/cjs/vega-dialog_2.cjs.entry.js +4 -4
  28. package/dist/cjs/vega-divider.cjs.entry.js +4 -4
  29. package/dist/cjs/vega-dropdown_5.cjs.entry.js +13 -10
  30. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  31. package/dist/cjs/vega-flag-icon.cjs.entry.js +4 -4
  32. package/dist/cjs/vega-flex.cjs.entry.js +5 -5
  33. package/dist/cjs/vega-font.cjs.entry.js +4 -4
  34. package/dist/cjs/vega-grid.cjs.entry.js +4 -4
  35. package/dist/cjs/vega-icon.cjs.entry.js +4 -4
  36. package/dist/cjs/vega-image-uploader.cjs.entry.js +3 -3
  37. package/dist/cjs/vega-input-phone-number.cjs.entry.js +2 -2
  38. package/dist/cjs/vega-input-select.cjs.entry.js +3 -3
  39. package/dist/cjs/vega-left-nav_5.cjs.entry.js +4 -4
  40. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  41. package/dist/cjs/vega-pagination.cjs.entry.js +3 -3
  42. package/dist/cjs/vega-popover_2.cjs.entry.js +4 -4
  43. package/dist/cjs/vega-radio_2.cjs.entry.js +4 -1
  44. package/dist/cjs/vega-rich-text-content.cjs.entry.js +13 -13
  45. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +68 -68
  46. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +3 -3
  47. package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
  48. package/dist/cjs/vega-signature-capture.cjs.entry.js +4 -4
  49. package/dist/cjs/vega-table_8.cjs.entry.js +3 -3
  50. package/dist/cjs/vega-time-picker_2.cjs.entry.js +4 -4
  51. package/dist/cjs/vega-tooltip_2.cjs.entry.js +4 -4
  52. package/dist/cjs/vega.cjs.js +4 -4
  53. package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +1 -1
  54. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +24 -7
  55. package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +11 -2
  56. package/dist/collection/components/vega-calendar/vega-calendar.css +6 -0
  57. package/dist/collection/components/vega-calendar/vega-calendar.js +43 -0
  58. package/dist/collection/components/vega-checkbox/vega-checkbox.js +4 -1
  59. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-scrollable-controller.js +6 -4
  60. package/dist/collection/components/vega-dropdown/vega-dropdown.js +1 -1
  61. package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
  62. package/dist/collection/components/vega-radio/vega-radio.js +4 -1
  63. package/dist/collection/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.js +2 -2
  64. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +4 -4
  65. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.js +2 -2
  66. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.js +1 -1
  67. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.js +1 -1
  68. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.js +3 -3
  69. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.js +3 -3
  70. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.js +2 -2
  71. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +28 -47
  72. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.js +7 -7
  73. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.js +3 -3
  74. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.js +3 -3
  75. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy.js +2 -2
  76. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.js +3 -3
  77. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.js +2 -2
  78. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.js +3 -3
  79. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.js +3 -3
  80. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.js +1 -1
  81. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.js +4 -4
  82. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.js +3 -3
  83. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-code-block-strategy.js +1 -1
  84. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/code-block-remove-self-strategy.js +3 -3
  85. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.js +2 -2
  86. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.js +1 -1
  87. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-with-blocks-strategy.js +2 -2
  88. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.js +1 -1
  89. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.js +3 -3
  90. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.js +4 -4
  91. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.js +2 -2
  92. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.js +1 -1
  93. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.js +1 -1
  94. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.js +3 -3
  95. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +9 -9
  96. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/switch-out-from-code-block-strategy.js +2 -2
  97. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +8 -0
  98. package/dist/collection/components/vega-rich-text-editor/dto/blocks/code-block.js +5 -5
  99. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +7 -7
  100. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +6 -6
  101. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +18 -12
  102. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +9 -9
  103. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +14 -14
  104. package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +2 -2
  105. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +2 -2
  106. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +4 -4
  107. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +2 -2
  108. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/code-block-renderer.js +1 -1
  109. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.js +1 -1
  110. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +1 -1
  111. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +1 -1
  112. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/code-block-node-renderer.js +2 -2
  113. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/delete-selected-nodes-controller.js +20 -20
  114. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/focus-controller.js +1 -1
  115. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.js +1 -1
  116. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ol-to-rte-list-block-strategy.js +1 -1
  117. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-to-rte-list-block-strategy.js +1 -1
  118. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/delete-content-handler.js +8 -8
  119. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +8 -8
  120. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +4 -4
  121. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +5 -5
  122. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.js +6 -6
  123. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/insert-composition-text-controller.js +4 -4
  124. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/insert-image-controller.js +1 -1
  125. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/internal-code-block-selection-controller.js +1 -1
  126. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +4 -4
  127. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +1 -1
  128. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/code-block-toolbar-button-slimmer.js +1 -1
  129. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.js +3 -3
  130. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.js +56 -0
  131. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.js +1 -1
  132. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.js +3 -3
  133. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/code-block.test.js +5 -5
  134. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/image-block.test.js +3 -3
  135. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-block.test.js +7 -7
  136. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-item.test.js +3 -3
  137. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/text-block.test.js +3 -3
  138. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +18 -18
  139. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/text-node.test.js +9 -9
  140. package/dist/collection/helpers/validator/rules/rich-text-editor-required-rule.js +2 -2
  141. package/dist/collection/types/public-api.js +1 -0
  142. package/dist/esm/{app-globals-4881974a.js → app-globals-b5881948.js} +2 -2
  143. package/dist/esm/{code-block-ef2f04ca.js → code-block-1cdb0599.js} +99 -110
  144. package/dist/esm/{component-value-history-controller-slimmer.abstract-0a0ef33f.js → component-value-history-controller-slimmer.abstract-c12b2958.js} +5 -5
  145. package/dist/esm/{content-state-69d29a07.js → content-state-cf27d19b.js} +90 -84
  146. package/dist/esm/{design-token-9bbefd23.js → design-token-96e03257.js} +1 -1
  147. package/dist/esm/{element-appender-slimmer-8652e8d7.js → element-appender-slimmer-00dcccb9.js} +1 -1
  148. package/dist/esm/{image-annotation-action-1497f70e.js → image-annotation-action-e76b3396.js} +1 -1
  149. package/dist/esm/index.js +6 -5
  150. package/dist/esm/loader.js +4 -4
  151. package/dist/esm/{public-rules-3436034b.js → public-rules-e8616346.js} +3 -3
  152. package/dist/esm/{responsive-format-facade-bcc2fd21.js → responsive-format-facade-464498b6.js} +1 -1
  153. package/dist/esm/{rich-text-editor-required-rule-cc5b6a2d.js → rich-text-editor-required-rule-69844536.js} +3 -3
  154. package/dist/esm/{style-formatter-00d6c32f.js → style-formatter-670e20f7.js} +1 -1
  155. package/dist/esm/types-0cadfd73.js +12 -0
  156. package/dist/esm/vega-accordion.entry.js +4 -4
  157. package/dist/esm/vega-app-header-button.entry.js +4 -4
  158. package/dist/esm/vega-box.entry.js +5 -5
  159. package/dist/esm/vega-button-circle.entry.js +4 -4
  160. package/dist/esm/vega-button.entry.js +3 -3
  161. package/dist/esm/vega-calendar_3.entry.js +49 -10
  162. package/dist/esm/vega-card.entry.js +4 -4
  163. package/dist/esm/vega-carousel.entry.js +3 -3
  164. package/dist/esm/vega-checkbox_2.entry.js +4 -1
  165. package/dist/esm/vega-chip.entry.js +4 -4
  166. package/dist/esm/vega-code-block.entry.js +3 -13
  167. package/dist/esm/vega-date-picker_2.entry.js +4 -4
  168. package/dist/esm/vega-dialog_2.entry.js +4 -4
  169. package/dist/esm/vega-divider.entry.js +4 -4
  170. package/dist/esm/vega-dropdown_5.entry.js +13 -10
  171. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  172. package/dist/esm/vega-flag-icon.entry.js +4 -4
  173. package/dist/esm/vega-flex.entry.js +5 -5
  174. package/dist/esm/vega-font.entry.js +4 -4
  175. package/dist/esm/vega-grid.entry.js +4 -4
  176. package/dist/esm/vega-icon.entry.js +4 -4
  177. package/dist/esm/vega-image-uploader.entry.js +3 -3
  178. package/dist/esm/vega-input-phone-number.entry.js +2 -2
  179. package/dist/esm/vega-input-select.entry.js +3 -3
  180. package/dist/esm/vega-left-nav_5.entry.js +4 -4
  181. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  182. package/dist/esm/vega-pagination.entry.js +3 -3
  183. package/dist/esm/vega-popover_2.entry.js +4 -4
  184. package/dist/esm/vega-radio_2.entry.js +4 -1
  185. package/dist/esm/vega-rich-text-content.entry.js +13 -13
  186. package/dist/esm/vega-rich-text-editor_4.entry.js +68 -68
  187. package/dist/esm/vega-selection-chip_2.entry.js +3 -3
  188. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  189. package/dist/esm/vega-signature-capture.entry.js +4 -4
  190. package/dist/esm/vega-table_8.entry.js +3 -3
  191. package/dist/esm/vega-time-picker_2.entry.js +4 -4
  192. package/dist/esm/vega-tooltip_2.entry.js +4 -4
  193. package/dist/esm/vega.js +4 -4
  194. package/dist/types/components/vega-app-header-button/types.d.ts +2 -0
  195. package/dist/types/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.d.ts +1 -0
  196. package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +1 -0
  197. package/dist/types/components/vega-calendar/types.d.ts +2 -0
  198. package/dist/types/components/vega-calendar/vega-calendar.d.ts +14 -1
  199. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +13 -2
  200. package/dist/types/components/vega-rich-text-editor/dto/blocks/code-block.d.ts +2 -2
  201. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +2 -2
  202. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +2 -2
  203. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +8 -2
  204. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +2 -2
  205. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +1 -1
  206. package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +2 -2
  207. package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +2 -2
  208. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +3 -3
  209. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +2 -2
  210. package/dist/types/components.d.ts +15 -1
  211. package/dist/types/types/components.type.d.ts +1 -0
  212. package/dist/types/types/public-api.d.ts +1 -0
  213. package/dist/vega/index.esm.js +1 -1
  214. package/dist/vega/{p-0e8324f2.entry.js → p-03c759ae.entry.js} +1 -1
  215. package/dist/vega/p-04c8b83d.entry.js +1 -0
  216. package/dist/vega/{p-c212a1e3.entry.js → p-08a0cbd0.entry.js} +1 -1
  217. package/dist/vega/{p-72e14f49.entry.js → p-0c660956.entry.js} +1 -1
  218. package/dist/vega/{p-1b165fbb.entry.js → p-144d2390.entry.js} +1 -1
  219. package/dist/vega/{p-c48a8510.entry.js → p-1737536e.entry.js} +1 -1
  220. package/dist/vega/{p-ad858290.entry.js → p-1a7d0e21.entry.js} +1 -1
  221. package/dist/vega/{p-9dc9fcf3.js → p-1c3e1134.js} +1 -1
  222. package/dist/vega/{p-ecd9a973.entry.js → p-1ebc1acf.entry.js} +1 -1
  223. package/dist/vega/{p-1d41f551.entry.js → p-2a6517f9.entry.js} +1 -1
  224. package/dist/vega/p-2f6c4f2c.entry.js +1 -0
  225. package/dist/vega/{p-f17c9093.entry.js → p-302e01e9.entry.js} +1 -1
  226. package/dist/vega/{p-f7062473.entry.js → p-3162a3f0.entry.js} +1 -1
  227. package/dist/vega/{p-6681efd5.js → p-397c7199.js} +1 -1
  228. package/dist/vega/p-46eb330f.entry.js +1 -0
  229. package/dist/vega/{p-8270bb8f.entry.js → p-487c0f17.entry.js} +1 -1
  230. package/dist/vega/{p-ca91268b.entry.js → p-4a12fb0d.entry.js} +1 -1
  231. package/dist/vega/{p-f9cf7e36.js → p-4b2a90b8.js} +1 -1
  232. package/dist/vega/{p-84a31a31.entry.js → p-4c595d8d.entry.js} +1 -1
  233. package/dist/vega/{p-43ba9a8a.entry.js → p-576b812b.entry.js} +1 -1
  234. package/dist/vega/{p-56dc1345.entry.js → p-59f1fd3e.entry.js} +1 -1
  235. package/dist/vega/{p-5a6b8846.entry.js → p-5be150cb.entry.js} +1 -1
  236. package/dist/vega/{p-a63e2fee.entry.js → p-5cb92c51.entry.js} +1 -1
  237. package/dist/vega/p-5f377954.js +1 -1
  238. package/dist/vega/p-5f86a286.entry.js +1 -0
  239. package/dist/vega/{p-4f5079bc.entry.js → p-636142ae.entry.js} +1 -1
  240. package/dist/vega/{p-327be043.js → p-66516ee9.js} +1 -1
  241. package/dist/vega/p-68864531.js +1 -0
  242. package/dist/vega/p-6a7b7214.js +1 -0
  243. package/dist/vega/p-6b8d105e.entry.js +1 -0
  244. package/dist/vega/{p-c7e2a155.entry.js → p-7728041e.entry.js} +1 -1
  245. package/dist/vega/p-778fd499.js +1 -0
  246. package/dist/vega/{p-13ca73c7.entry.js → p-7cc20ed5.entry.js} +1 -1
  247. package/dist/vega/{p-e66f6b59.entry.js → p-81e56716.entry.js} +2 -2
  248. package/dist/vega/p-962b40d1.entry.js +1 -0
  249. package/dist/vega/{p-c10b4f47.entry.js → p-9d286c08.entry.js} +1 -1
  250. package/dist/vega/{p-cae183fd.entry.js → p-a42bc438.entry.js} +1 -1
  251. package/dist/vega/{p-b89a9760.js → p-ae74d511.js} +1 -1
  252. package/dist/vega/{p-da95668c.entry.js → p-b3da0b44.entry.js} +1 -1
  253. package/dist/vega/{p-1e4b6f0a.entry.js → p-c0043eed.entry.js} +1 -1
  254. package/dist/vega/p-c685adcd.js +1 -0
  255. package/dist/vega/p-c9f544bd.entry.js +1 -0
  256. package/dist/vega/p-d1cb7f28.js +1 -0
  257. package/dist/vega/{p-9c0cda62.js → p-d8e1ed2d.js} +1 -1
  258. package/dist/vega/{p-9a0d3d2d.entry.js → p-dc383362.entry.js} +1 -1
  259. package/dist/vega/{p-822cd8e5.js → p-dc3d93d6.js} +1 -1
  260. package/dist/vega/{p-79370ad4.entry.js → p-e2282f71.entry.js} +1 -1
  261. package/dist/vega/{p-c8a87f06.entry.js → p-e5eda663.entry.js} +1 -1
  262. package/dist/vega/{p-7704a608.entry.js → p-ec7dc51f.entry.js} +1 -1
  263. package/dist/vega/vega.esm.js +1 -1
  264. package/package.json +6 -2
  265. package/dist/vega/p-29262ad6.entry.js +0 -1
  266. package/dist/vega/p-3eb2d433.js +0 -1
  267. package/dist/vega/p-3fa7d356.js +0 -1
  268. package/dist/vega/p-468bf93a.entry.js +0 -1
  269. package/dist/vega/p-547692bf.entry.js +0 -1
  270. package/dist/vega/p-57005931.entry.js +0 -1
  271. package/dist/vega/p-5e8e4aba.js +0 -1
  272. package/dist/vega/p-cb36ccf0.entry.js +0 -1
  273. package/dist/vega/p-e8b56d3f.entry.js +0 -1
  274. package/dist/vega/p-ec3495de.entry.js +0 -1
  275. package/dist/vega/p-fecb4044.js +0 -1
@@ -43,7 +43,7 @@ export class DeleteContentHandler extends BaseHandler {
43
43
  else if (deleteAction.nextNode) {
44
44
  this.selectionController.enqueueSelectionRangeFutureState(deleteAction.nextNode, 0);
45
45
  }
46
- else if (this.currentState.blocks.length === 0) {
46
+ else if (this.currentState.children.length === 0) {
47
47
  // Add a empty paragraph if delete all content to make sure the caret position
48
48
  this.insertDefaultParagraph();
49
49
  }
@@ -59,9 +59,9 @@ export class DeleteContentHandler extends BaseHandler {
59
59
  if (selectedNodes.length > 1 &&
60
60
  lastSelectedNode instanceof RTETextNode &&
61
61
  lastSelectedNode.isEmpty()) {
62
- lastSelectedNode.parentBlock.apply(new RemoveChildAction(lastSelectedNode));
62
+ lastSelectedNode.parent.apply(new RemoveChildAction(lastSelectedNode));
63
63
  }
64
- this.convertFirstBlockToParagraph(cursorNode.parentBlock);
64
+ this.convertFirstBlockToParagraph(cursorNode.parent);
65
65
  }
66
66
  /**
67
67
  * If the first block is not paragraph, convert the block to paragraph after delete all text
@@ -69,14 +69,14 @@ export class DeleteContentHandler extends BaseHandler {
69
69
  * @param {RTEBlock} block - The first block instance
70
70
  */
71
71
  convertFirstBlockToParagraph(block) {
72
- const firstBlock = this.currentState.blocks[0];
72
+ const firstBlock = this.currentState.children[0];
73
73
  if (firstBlock === block &&
74
74
  block instanceof RTETextBlock &&
75
- block.nodes.length === 1 &&
76
- block.nodes[0].isEmpty() &&
75
+ block.children.length === 1 &&
76
+ block.children[0].isEmpty() &&
77
77
  block.type !== 'paragraph') {
78
78
  const paragraph = this.createEmptyParagraph();
79
- paragraph.apply(new ReplaceChildNodesAction(block.nodes));
79
+ paragraph.apply(new ReplaceChildNodesAction(block.children));
80
80
  block.parent.apply(new InsertBlocksBeforeAction(block, paragraph));
81
81
  block.parent.apply(new RemoveChildAction(block));
82
82
  }
@@ -87,7 +87,7 @@ export class DeleteContentHandler extends BaseHandler {
87
87
  insertDefaultParagraph() {
88
88
  const paragraph = this.createEmptyParagraph();
89
89
  this.currentState.apply(new AppendChildNodesAction([paragraph]));
90
- this.selectionController.enqueueSelectionRangeFutureState(paragraph.nodes[0], 1);
90
+ this.selectionController.enqueueSelectionRangeFutureState(paragraph.children[0], 1);
91
91
  }
92
92
  /**
93
93
  * Returns the end offset of a given node in a Rich Text Editor based on its type and text content.
@@ -31,10 +31,10 @@ export class InsertLineBreakHandler extends BaseHandler {
31
31
  */
32
32
  breakNewBlock() {
33
33
  if (this.currentState &&
34
- this.currentState.blocks[0] &&
35
- this.currentState.blocks[0] instanceof RTETextBlock) {
36
- const lineBreakAction = new LineBreakSingleBlockAction(this.currentState.blocks[0].nodes[0], 0);
37
- this.currentState.blocks[0].apply(lineBreakAction);
34
+ this.currentState.children[0] &&
35
+ this.currentState.children[0] instanceof RTETextBlock) {
36
+ const lineBreakAction = new LineBreakSingleBlockAction(this.currentState.children[0].children[0], 0);
37
+ this.currentState.children[0].apply(lineBreakAction);
38
38
  this.switchCaretPositionToSpecifiedNode(lineBreakAction.lineBreakNode);
39
39
  }
40
40
  }
@@ -53,7 +53,7 @@ export class InsertLineBreakHandler extends BaseHandler {
53
53
  breakSingleBlock() {
54
54
  const range = this.selectionController.getCurrentRange();
55
55
  const cursorNode = this.removeSelectionRange();
56
- const currentBlock = cursorNode.parentBlock;
56
+ const currentBlock = cursorNode.parent;
57
57
  if (currentBlock) {
58
58
  const lineBreakAction = new LineBreakSingleBlockAction(cursorNode, range.startOffset);
59
59
  currentBlock.apply(lineBreakAction);
@@ -67,7 +67,7 @@ export class InsertLineBreakHandler extends BaseHandler {
67
67
  const selectedBlocks = this.selectionController.getSelectedBlocks();
68
68
  const cursorNode = this.removeSelectionRange();
69
69
  const lineBreakAction = new lineBreakMultipleBlocksAction(selectedBlocks);
70
- cursorNode.parentBlock.apply(lineBreakAction);
70
+ cursorNode.parent.apply(lineBreakAction);
71
71
  this.switchCaretPositionToSpecifiedNode(lineBreakAction.lineBreakNode);
72
72
  }
73
73
  /**
@@ -85,8 +85,8 @@ export class InsertLineBreakHandler extends BaseHandler {
85
85
  * @returns {RTENode} The next sibling node of the current line break element, or the current node if next node is not exists.
86
86
  */
87
87
  getNextRTENode(lineBreakNode) {
88
- const index = lineBreakNode.parentBlock['nodes'].indexOf(lineBreakNode);
89
- const nextNode = lineBreakNode.parentBlock['nodes'][index + 1];
88
+ const index = lineBreakNode.parent.children.indexOf(lineBreakNode);
89
+ const nextNode = lineBreakNode.parent.children[index + 1];
90
90
  return nextNode || lineBreakNode;
91
91
  }
92
92
  }
@@ -28,7 +28,7 @@ export class InsertParagraphHandler extends BaseHandler {
28
28
  // If the start or end block contains a list item block, it needs to be processed separately
29
29
  if ((selectedBlocks.length && selectedBlocks[0].type === 'list-item') ||
30
30
  selectedBlocks[selectedBlocks.length - 1].type === 'list-item') {
31
- const firstBlock = cursorNode.parentBlock;
31
+ const firstBlock = cursorNode.parent;
32
32
  const lastBlock = selectedBlocks[selectedBlocks.length - 1];
33
33
  /**
34
34
  * First block is list item
@@ -71,7 +71,7 @@ export class InsertParagraphHandler extends BaseHandler {
71
71
  */
72
72
  breakSingleBlock() {
73
73
  const cursorNode = this.removeSelectionRange();
74
- const currentBlock = cursorNode.parentBlock;
74
+ const currentBlock = cursorNode.parent;
75
75
  const { startOffset } = this.selectionController.getCurrentRange();
76
76
  if (currentBlock) {
77
77
  const breakAction = new BreakSingleBlockAction(cursorNode, startOffset);
@@ -85,8 +85,8 @@ export class InsertParagraphHandler extends BaseHandler {
85
85
  * @param {RTEBlock} newBlock - Represents a new create block element in a rich text editor.
86
86
  */
87
87
  switchCaretPositionToNextElement(newBlock) {
88
- if (newBlock && newBlock['nodes']) {
89
- this.selectionController.enqueueSelectionRangeFutureState(newBlock['nodes'][0], 0);
88
+ if (newBlock && newBlock.children) {
89
+ this.selectionController.enqueueSelectionRangeFutureState(newBlock.children[0], 0);
90
90
  }
91
91
  }
92
92
  }
@@ -45,8 +45,8 @@ export class InsertPasteHandler extends BaseHandler {
45
45
  */
46
46
  insertBlocksToContent(blocks) {
47
47
  const cursorNode = this.removeSelectionRange();
48
- if (cursorNode && cursorNode.parentBlock) {
49
- const currentBlock = cursorNode.parentBlock;
48
+ if (cursorNode && cursorNode.parent) {
49
+ const currentBlock = cursorNode.parent;
50
50
  const { startOffset } = this.selectionController.getCurrentRange();
51
51
  const breakAction = new SplitBlockWithNodeAction(cursorNode, startOffset);
52
52
  currentBlock.apply(breakAction);
@@ -62,7 +62,7 @@ export class InsertPasteHandler extends BaseHandler {
62
62
  insertBlocksBeforeEmptyBlock(blocks) {
63
63
  const cursorNode = this.removeSelectionRange();
64
64
  /* istanbul ignore next */
65
- const currentBlock = cursorNode === null || cursorNode === void 0 ? void 0 : cursorNode.parentBlock;
65
+ const currentBlock = cursorNode === null || cursorNode === void 0 ? void 0 : cursorNode.parent;
66
66
  if (currentBlock) {
67
67
  currentBlock.parent.apply(new InsertBlocksBeforeAction(currentBlock, ...blocks));
68
68
  this.switchCaretPositionToNextElement(currentBlock);
@@ -95,8 +95,8 @@ export class InsertPasteHandler extends BaseHandler {
95
95
  * @param {RTEBlock} newBlock - Represents a new create block element in a rich text editor.
96
96
  */
97
97
  switchCaretPositionToNextElement(newBlock) {
98
- if (newBlock && newBlock['nodes']) {
99
- this.selectionController.enqueueSelectionRangeFutureState(newBlock['nodes'][0], 0);
98
+ if (newBlock && newBlock.children) {
99
+ this.selectionController.enqueueSelectionRangeFutureState(newBlock.children[0], 0);
100
100
  }
101
101
  }
102
102
  /**
@@ -63,9 +63,9 @@ export class InsertTextHandler extends BaseHandler {
63
63
  */
64
64
  insertTextToRoot(text) {
65
65
  if (this.currentState &&
66
- this.currentState.blocks[0] &&
67
- this.currentState.blocks[0] instanceof RTETextBlock) {
68
- const firstNode = this.currentState.blocks[0].nodes[0];
66
+ this.currentState.children[0] &&
67
+ this.currentState.children[0] instanceof RTETextBlock) {
68
+ const firstNode = this.currentState.children[0].children[0];
69
69
  firstNode.apply(new UpdateTextAction(text));
70
70
  return firstNode;
71
71
  }
@@ -79,9 +79,9 @@ export class InsertTextHandler extends BaseHandler {
79
79
  */
80
80
  insertTextToLineBreakNode(lineBreakNode, text) {
81
81
  const { startOffset, endOffset } = this.selectionController.getCurrentRange();
82
- const textBlock = lineBreakNode.parentBlock;
83
- const index = textBlock.nodes.indexOf(lineBreakNode);
84
- if (startOffset === 0 && startOffset === endOffset && textBlock.nodes[index + 1]) {
82
+ const textBlock = lineBreakNode.parent;
83
+ const index = textBlock.children.indexOf(lineBreakNode);
84
+ if (startOffset === 0 && startOffset === endOffset && textBlock.children[index + 1]) {
85
85
  const newTextNode = lineBreakNode.cloneWithText(text);
86
86
  textBlock.apply(new InsertNodesBeforeAction(lineBreakNode, newTextNode));
87
87
  return newTextNode;
@@ -147,11 +147,11 @@ export class InsertCompositionTextController extends VegaSlimmer {
147
147
  * @param {RTETextNode} currentNode The current line break node, the text value is \n
148
148
  */
149
149
  appendLineBreakNode(currentNode) {
150
- const textBlock = currentNode.parentBlock;
151
- const index = textBlock.nodes.indexOf(currentNode);
152
- if (textBlock.nodes[index + 1]) {
150
+ const textBlock = currentNode.parent;
151
+ const index = textBlock.children.indexOf(currentNode);
152
+ if (textBlock.children[index + 1]) {
153
153
  const newTextNode = currentNode.cloneWithText('\n');
154
- textBlock.apply(new InsertNodesBeforeAction(textBlock.nodes[index + 1], newTextNode));
154
+ textBlock.apply(new InsertNodesBeforeAction(textBlock.children[index + 1], newTextNode));
155
155
  }
156
156
  }
157
157
  /**
@@ -28,7 +28,7 @@ export class InsertImageController extends VegaSlimmer {
28
28
  const newImageNode = new RTEImageNode(generateUUID(), imageUrl, imageBlock);
29
29
  newImageNode.apply(new ImageAnnotationAction('md', ''));
30
30
  imageBlock.apply(new AppendChildNodesAction([newImageNode]));
31
- if (selectedBlocks.length < 1 || this.value.blocks.length < 1) {
31
+ if (selectedBlocks.length < 1 || this.value.children.length < 1) {
32
32
  this.value.apply(new AppendChildNodesAction([imageBlock]));
33
33
  void this.valueController.flushChanges(this.value);
34
34
  }
@@ -42,7 +42,7 @@ export class InternalCodeBlockSelectionController extends AutoRunWhenReRenderTas
42
42
  * @returns {boolean} - The boolean result.
43
43
  */
44
44
  isCodeBlockSelected(codeBlock, range) {
45
- const codeBlockNode = codeBlock.nodes[0];
45
+ const codeBlockNode = codeBlock.children[0];
46
46
  const entityDom = stateEntityRenderingRegistry.getDOMByEntity(codeBlockNode);
47
47
  return (codeBlock.isSelected() ||
48
48
  (entityDom &&
@@ -216,7 +216,7 @@ export class SelectionController extends AutoRunWhenReRenderTaskQueueSlimmer {
216
216
  const nodeEntity = stateEntityRenderingRegistry.getEntityByDOM(entityElement);
217
217
  if (nodeEntity instanceof RTECodeBlock) {
218
218
  if (this.internalCodeBlockSelectionController.isCodeBlockSelected(nodeEntity, range)) {
219
- selectedNodes.push(nodeEntity.nodes[0]);
219
+ selectedNodes.push(nodeEntity.children[0]);
220
220
  }
221
221
  return;
222
222
  }
@@ -229,11 +229,11 @@ export class SelectionController extends AutoRunWhenReRenderTaskQueueSlimmer {
229
229
  };
230
230
  filterNode(commonAncestor);
231
231
  selectedNodes.forEach((node) => {
232
- if (this.selectionMap.has(node.parentBlock)) {
233
- this.selectionMap.get(node.parentBlock).push(node);
232
+ if (this.selectionMap.has(node.parent)) {
233
+ this.selectionMap.get(node.parent).push(node);
234
234
  }
235
235
  else {
236
- this.selectionMap.set(node.parentBlock, [node]);
236
+ this.selectionMap.set(node.parent, [node]);
237
237
  }
238
238
  });
239
239
  this.getSelectedNodes().forEach((node) => node.apply(new SelectionChangeAction(range)));
@@ -51,7 +51,7 @@ export class ValueController extends VegaSlimmer {
51
51
  if (this.value && !(this.value instanceof VegaRTEContent)) {
52
52
  this.value = VegaRTEContent.fromJSON(this.value);
53
53
  }
54
- else if (!this.value || this.value.blocks.length === 0) {
54
+ else if (!this.value || this.value.children.length === 0) {
55
55
  this.value = VegaRTEContent.createEmptyContent();
56
56
  }
57
57
  else {
@@ -30,7 +30,7 @@ export class CodeBlockToolbarButtonSlimmer extends ToolbarButtonSlimmer {
30
30
  const transformToCodeBlockAction = new TransformToCodeBlockAction(selectedBlocks);
31
31
  parentBlock.apply(transformToCodeBlockAction);
32
32
  void this.valueController.flushChanges(this.value);
33
- this.selectionController.enqueueSelectionRangeFutureState(transformToCodeBlockAction.newCodeBlock.nodes[0], 0);
33
+ this.selectionController.enqueueSelectionRangeFutureState(transformToCodeBlockAction.newCodeBlock.children[0], 0);
34
34
  }
35
35
  }
36
36
  /**
@@ -18,7 +18,7 @@ test('BlockInsertLineBreakWithBlocksStrategy should work properly', () => {
18
18
  nodes: [],
19
19
  },
20
20
  ]);
21
- const action = new lineBreakMultipleBlocksAction(contentState.blocks);
22
- strategy.execute(action, contentState.blocks[0]);
23
- expect(contentState.blocks[0]['nodes'].length).toEqual(4);
21
+ const action = new lineBreakMultipleBlocksAction(contentState.children);
22
+ strategy.execute(action, contentState.children[0]);
23
+ expect(contentState.children[0]['children'].length).toEqual(4);
24
24
  });
@@ -13,7 +13,9 @@ import { ListItemRemoveNestListStrategy } from '../../../dto/action-handle-strat
13
13
  import { ListItemRemoveNodeStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy';
14
14
  import { ListItemReplaceNestListStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy';
15
15
  import { ModifyContentActionType } from '../../../dto/actions/modify-content-action.abstract';
16
+ import { RemoveChildAction } from '../../../dto/actions/remove-child-action';
16
17
  import { RTEListItemBlock } from '../../../dto/blocks/list-item-block';
18
+ import { VegaRTEContent } from '../../../dto/content-state';
17
19
  test('RTEListItemBlock should register action handle strategy properly', () => {
18
20
  expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.DELETE_BLOCK_CONTENT, RTEListItemBlock.name) instanceof ListItemDeleteTextContentStrategy).toBeTruthy();
19
21
  expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTEListItemBlock.name) instanceof BlockInsertLineBreakStrategy).toBeTruthy();
@@ -29,3 +31,57 @@ test('RTEListItemBlock should register action handle strategy properly', () => {
29
31
  expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTEListItemBlock.name) instanceof ListItemInsertImageStrategy).toBeTruthy();
30
32
  expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.INSERT_NODES_BEFORE, RTEListItemBlock.name) instanceof BlockInsertNodesBeforeNodeStrategy).toBeTruthy();
31
33
  });
34
+ describe('ListItemRemoveNodeStrategy', () => {
35
+ it('should remove child node from the list item', () => {
36
+ const content = VegaRTEContent.fromJSON([
37
+ {
38
+ id: '1',
39
+ type: 'number-list',
40
+ blocks: [
41
+ {
42
+ id: '1-1',
43
+ type: 'list-item',
44
+ nodes: [{ id: '1-1-1', type: 'text', text: 'Item 1' }],
45
+ children: [],
46
+ },
47
+ ],
48
+ },
49
+ ]);
50
+ const li = content.children[0].children[0];
51
+ const action = new RemoveChildAction(li.children[0]);
52
+ li.apply(action);
53
+ expect(content.children).toHaveLength(0);
54
+ });
55
+ it('should not remove ul if the list item has nest list', () => {
56
+ const content = VegaRTEContent.fromJSON([
57
+ {
58
+ id: '1',
59
+ type: 'number-list',
60
+ blocks: [
61
+ {
62
+ id: '1-1',
63
+ type: 'list-item',
64
+ nodes: [{ id: '1-1-1', type: 'text', text: 'Item 1' }],
65
+ children: [
66
+ {
67
+ id: '2',
68
+ type: 'bullet-list',
69
+ blocks: [
70
+ {
71
+ id: '2-2',
72
+ type: 'list-item',
73
+ nodes: [{ id: '2-2-1', type: 'text', text: 'Item 2' }],
74
+ },
75
+ ],
76
+ },
77
+ ],
78
+ },
79
+ ],
80
+ },
81
+ ]);
82
+ const li = content.children[0].children[0];
83
+ const action = new RemoveChildAction(li.children[0]);
84
+ li.apply(action);
85
+ expect(content.children).toHaveLength(1);
86
+ });
87
+ });
@@ -26,6 +26,6 @@ test('NodeSplitTextStrategy execute method should return value properly', () =>
26
26
  textNode.annotationMap.set('SELECTION_RANGE', new SelectionRangeAnnotation(getMockSelectionRange(span.firstChild, span.firstChild, 1, 1)));
27
27
  stateEntityRenderingRegistry.register(span, textNode);
28
28
  result = splitTextStrategy.execute(new BoldAnnotationAction(true), textNode);
29
- expect(block.nodes.length).toEqual(3);
29
+ expect(block.children.length).toEqual(3);
30
30
  expect(result instanceof RTETextNode).toBeTruthy();
31
31
  });
@@ -30,12 +30,12 @@ test('RTETextBlock apply annotation action should work properly', () => {
30
30
  type: 'subtitle',
31
31
  nodes: [{ id: '1-1', type: 'text', text: 'Paragraph' }],
32
32
  });
33
- expect(textBlock.nodes[0].annotationMap.has('BOLD')).toBeFalsy();
33
+ expect(textBlock.children[0].annotationMap.has('BOLD')).toBeFalsy();
34
34
  textBlock.apply(new TextStyleAnnotationAction('paragraph', true));
35
35
  expect(textBlock.type).toEqual('paragraph');
36
- expect(textBlock.nodes[0].getAnnotationByType('BOLD')['toJSON']()['bold']).toBeTruthy();
36
+ expect(textBlock.children[0].getAnnotationByType('BOLD')['toJSON']()['bold']).toBeTruthy();
37
37
  expect(textBlock.annotationMap.has(InternalAnnotationTypeEnum.LINK_GROUP)).toBeFalsy();
38
- textBlock.apply(new LinkGroupAnnotationAction('1', textBlock.nodes));
38
+ textBlock.apply(new LinkGroupAnnotationAction('1', textBlock.children));
39
39
  expect(textBlock.annotationMap.has(InternalAnnotationTypeEnum.LINK_GROUP)).toBeTruthy();
40
40
  });
41
41
  test('RTETextBlock should register action handle strategy properly', () => {
@@ -19,7 +19,7 @@ describe('RTECodeBlock', () => {
19
19
  language: 'js',
20
20
  content: 'const',
21
21
  });
22
- expect(codeBlock.nodes[0].toJSON()).toEqual({
22
+ expect(codeBlock.children[0].toJSON()).toEqual({
23
23
  id: '1-1',
24
24
  type: 'text',
25
25
  language: 'js',
@@ -44,11 +44,11 @@ describe('RTECodeBlock', () => {
44
44
  content: 'const',
45
45
  });
46
46
  const cloneBlock = codeBlock.clone();
47
- const cloneNode = codeBlock.nodes[0].clone();
47
+ const cloneNode = codeBlock.children[0].clone();
48
48
  expect(cloneBlock.id).toEqual(codeBlock.id);
49
49
  expect(cloneBlock.type).toEqual(codeBlock.type);
50
- expect(cloneNode.type).toEqual(codeBlock.nodes[0].type);
51
- expect(cloneNode.text).toEqual(codeBlock.nodes[0].text);
52
- expect(cloneNode.language).toEqual(codeBlock.nodes[0].language);
50
+ expect(cloneNode.type).toEqual(codeBlock.children[0].type);
51
+ expect(cloneNode.text).toEqual(codeBlock.children[0].text);
52
+ expect(cloneNode.language).toEqual(codeBlock.children[0].language);
53
53
  });
54
54
  });
@@ -4,7 +4,7 @@ describe('image block', () => {
4
4
  it('new RTEImageBlock should work as expect', () => {
5
5
  const imageBlock = new RTEImageBlock('block-1');
6
6
  const imageNode = new RTEImageNode('1', 'mock-url', imageBlock);
7
- imageBlock.nodes = [imageNode];
7
+ imageBlock.children = [imageNode];
8
8
  expect(imageBlock.toJSON()).toEqual({
9
9
  id: 'block-1',
10
10
  type: 'image',
@@ -65,7 +65,7 @@ describe('image block', () => {
65
65
  it('isNotEmpty should work as expect', () => {
66
66
  const imageBlock = new RTEImageBlock('block-1');
67
67
  const imageNode = new RTEImageNode('1', 'mock-url', imageBlock);
68
- imageBlock.nodes = [imageNode];
68
+ imageBlock.children = [imageNode];
69
69
  expect(imageBlock.isNotEmpty()).toEqual(true);
70
70
  imageNode.url = '';
71
71
  expect(imageBlock.isNotEmpty()).toEqual(false);
@@ -74,7 +74,7 @@ describe('image block', () => {
74
74
  const imageBlock = new RTEImageBlock('block-1');
75
75
  const imageNode1 = new RTEImageNode('1', 'mock-url', imageBlock);
76
76
  const imageNode2 = new RTEImageNode('2', 'mock-url', imageBlock);
77
- imageBlock.nodes = [imageNode1, imageNode2];
77
+ imageBlock.children = [imageNode1, imageNode2];
78
78
  expect(imageBlock.getLastNode()).toEqual(imageNode2);
79
79
  });
80
80
  });
@@ -79,7 +79,7 @@ describe('bullet list', () => {
79
79
  ],
80
80
  });
81
81
  expect(bulletListBlock.isNotEmpty()).toEqual(true);
82
- bulletListBlock.blocks[0].nodes[0].text = '';
82
+ bulletListBlock.children[0].children[0].text = '';
83
83
  expect(bulletListBlock.isNotEmpty()).toEqual(true);
84
84
  const childrenListBlock = RTEListBlock.from({
85
85
  id: '1-1-2',
@@ -98,9 +98,9 @@ describe('bullet list', () => {
98
98
  },
99
99
  ],
100
100
  });
101
- bulletListBlock.blocks[0].children = [childrenListBlock];
101
+ bulletListBlock.children[0].nestList = [childrenListBlock];
102
102
  expect(bulletListBlock.isNotEmpty()).toEqual(true);
103
- childrenListBlock.blocks[0].nodes[0].text = '';
103
+ childrenListBlock.children[0].children[0].text = '';
104
104
  expect(bulletListBlock.isNotEmpty()).toEqual(true);
105
105
  });
106
106
  });
@@ -124,7 +124,7 @@ describe('number list', () => {
124
124
  ],
125
125
  });
126
126
  expect(listBlock.isNotEmpty()).toEqual(true);
127
- listBlock.blocks[0].nodes[0].text = '';
127
+ listBlock.children[0].children[0].text = '';
128
128
  expect(listBlock.isNotEmpty()).toEqual(true);
129
129
  const childrenListBlock = RTEListBlock.from({
130
130
  id: '1-1-2',
@@ -143,9 +143,9 @@ describe('number list', () => {
143
143
  },
144
144
  ],
145
145
  });
146
- listBlock.blocks[0].children = [childrenListBlock];
146
+ listBlock.children[0].nestList = [childrenListBlock];
147
147
  expect(listBlock.isNotEmpty()).toEqual(true);
148
- childrenListBlock.blocks[0].nodes[0].text = '';
148
+ childrenListBlock.children[0].children[0].text = '';
149
149
  expect(listBlock.isNotEmpty()).toEqual(true);
150
150
  });
151
151
  it('getLastNode should work as expect', () => {
@@ -171,6 +171,6 @@ describe('number list', () => {
171
171
  },
172
172
  ],
173
173
  });
174
- expect(listBlock.getLastNode()).toEqual(listBlock.blocks[0].nodes[1]);
174
+ expect(listBlock.getLastNode()).toEqual(listBlock.children[0].children[1]);
175
175
  });
176
176
  });
@@ -4,7 +4,7 @@ describe('bullet list item', () => {
4
4
  it('new RTEBulletListItemBlock should work as expect', () => {
5
5
  const bulletListItemBlock = new RTEListItemBlock('1');
6
6
  const textNode = new RTETextNode('1', 'This is a text.', bulletListItemBlock);
7
- bulletListItemBlock.nodes = [textNode];
7
+ bulletListItemBlock.children = [textNode];
8
8
  expect(bulletListItemBlock).toBeDefined();
9
9
  });
10
10
  it('from method should work as expect', () => {
@@ -145,7 +145,7 @@ describe('bullet list item', () => {
145
145
  },
146
146
  ],
147
147
  });
148
- expect(listItemBlock.getLastNode()).toEqual(listItemBlock.nodes[1]);
148
+ expect(listItemBlock.getLastNode()).toEqual(listItemBlock.children[1]);
149
149
  });
150
150
  it('getLastNode should work as expect with children', () => {
151
151
  const listItemBlock = RTEListItemBlock.from({
@@ -183,6 +183,6 @@ describe('bullet list item', () => {
183
183
  },
184
184
  ],
185
185
  });
186
- expect(listItemBlock.getLastNode()).toEqual(listItemBlock.children[0].blocks[0].nodes[1]);
186
+ expect(listItemBlock.getLastNode()).toEqual(listItemBlock.nestList[0].children[0].children[1]);
187
187
  });
188
188
  });
@@ -6,7 +6,7 @@ describe('text block', () => {
6
6
  it('new RTETextBlock should work as expect', () => {
7
7
  const textBlock = new RTETextBlock('block-1', 'paragraph');
8
8
  const textNode = new RTETextNode('1', 'This is a text.', textBlock);
9
- textBlock.nodes = [textNode];
9
+ textBlock.children = [textNode];
10
10
  expect(textBlock.toJSON()).toEqual({
11
11
  id: 'block-1',
12
12
  type: 'paragraph',
@@ -82,7 +82,7 @@ describe('text block', () => {
82
82
  it('apply method should work as expect', () => {
83
83
  const titleBlock = new RTETextBlock('block-1', 'title');
84
84
  const textNode = new RTETextNode('1', 'This is a text.', titleBlock);
85
- titleBlock.nodes = [textNode];
85
+ titleBlock.children = [textNode];
86
86
  const mockDiv = document.createElement('div');
87
87
  const mockHost = document.createElement('div');
88
88
  const mockSpan = document.createElement('span');
@@ -126,7 +126,7 @@ describe('text block', () => {
126
126
  it('isNotEmpty should work as expect', () => {
127
127
  const textBlock = new RTETextBlock('block-1', 'paragraph');
128
128
  const textNode = new RTETextNode('1', 'This is a text.', textBlock);
129
- textBlock.nodes = [textNode];
129
+ textBlock.children = [textNode];
130
130
  expect(textBlock.isNotEmpty()).toEqual(true);
131
131
  textNode.text = '';
132
132
  expect(textBlock.isNotEmpty()).toEqual(false);
@@ -19,45 +19,45 @@ describe('content state', () => {
19
19
  type: 'paragraph',
20
20
  nodes: [{ id: '1-1', type: 'text', text: 'This is a paragraph' }],
21
21
  },
22
- ]).blocks[0] instanceof RTETextBlock).toBeTruthy();
22
+ ]).children[0] instanceof RTETextBlock).toBeTruthy();
23
23
  expect(VegaRTEContent.fromJSON([
24
24
  { id: '2', type: 'title', nodes: [{ id: '2-1', type: 'text', text: 'This is a title' }] },
25
- ]).blocks[0] instanceof RTETextBlock).toBeTruthy();
25
+ ]).children[0] instanceof RTETextBlock).toBeTruthy();
26
26
  expect(VegaRTEContent.fromJSON([
27
27
  {
28
28
  id: '3',
29
29
  type: 'subtitle',
30
30
  nodes: [{ id: '3-1', type: 'text', text: 'This is a subtitle' }],
31
31
  },
32
- ]).blocks[0] instanceof RTETextBlock).toBeTruthy();
32
+ ]).children[0] instanceof RTETextBlock).toBeTruthy();
33
33
  expect(VegaRTEContent.fromJSON([
34
34
  {
35
35
  id: '4',
36
36
  type: 'heading-1',
37
37
  nodes: [{ id: '4-1', type: 'text', text: 'This is a heading-1' }],
38
38
  },
39
- ]).blocks[0] instanceof RTETextBlock).toBeTruthy();
39
+ ]).children[0] instanceof RTETextBlock).toBeTruthy();
40
40
  expect(VegaRTEContent.fromJSON([
41
41
  {
42
42
  id: '5',
43
43
  type: 'heading-2',
44
44
  nodes: [{ id: '5-1', type: 'text', text: 'This is a heading-2' }],
45
45
  },
46
- ]).blocks[0] instanceof RTETextBlock).toBeTruthy();
46
+ ]).children[0] instanceof RTETextBlock).toBeTruthy();
47
47
  expect(VegaRTEContent.fromJSON([
48
48
  {
49
49
  id: '6',
50
50
  type: 'heading-3',
51
51
  nodes: [{ id: '6-1', type: 'text', text: 'This is a heading-3' }],
52
52
  },
53
- ]).blocks[0] instanceof RTETextBlock).toBeTruthy();
53
+ ]).children[0] instanceof RTETextBlock).toBeTruthy();
54
54
  expect(VegaRTEContent.fromJSON([
55
55
  {
56
56
  id: '7',
57
57
  type: 'image',
58
58
  nodes: [{ id: '7-1', type: 'image', url: 'mock-url' }],
59
59
  },
60
- ]).blocks[0] instanceof RTEImageBlock).toBeTruthy();
60
+ ]).children[0] instanceof RTEImageBlock).toBeTruthy();
61
61
  expect(VegaRTEContent.fromJSON([
62
62
  {
63
63
  id: '8',
@@ -76,7 +76,7 @@ describe('content state', () => {
76
76
  },
77
77
  ],
78
78
  },
79
- ]).blocks[0] instanceof RTEListBlock).toBeTruthy();
79
+ ]).children[0] instanceof RTEListBlock).toBeTruthy();
80
80
  });
81
81
  it('toJSON method should work as expect', () => {
82
82
  expect(VegaRTEContent.fromJSON([
@@ -143,12 +143,12 @@ describe('content state', () => {
143
143
  const clonedContentState = contentState.clone(true);
144
144
  expect(clonedContentState).not.toBe(contentState);
145
145
  expect(clonedContentState).toEqual(contentState);
146
- const block = contentState.blocks[0];
147
- const clonedBlock = clonedContentState.blocks[0];
146
+ const block = contentState.children[0];
147
+ const clonedBlock = clonedContentState.children[0];
148
148
  expect(clonedBlock).toEqual(block);
149
149
  expect(clonedBlock).not.toBe(block);
150
- const node = block.nodes[0];
151
- const clonedNode = clonedBlock.nodes[0];
150
+ const node = block.children[0];
151
+ const clonedNode = clonedBlock.children[0];
152
152
  expect(clonedNode).toEqual(node);
153
153
  expect(clonedNode).not.toBe(node);
154
154
  const blockAnnotations = block.annotationMap;
@@ -195,12 +195,12 @@ describe('content state', () => {
195
195
  ],
196
196
  },
197
197
  ]);
198
- const paragraphBlock = contentState.blocks[0];
199
- const imageBlock = contentState.blocks[1];
200
- const listBlock = contentState.blocks[2];
201
- const listItemBlock = listBlock.blocks[0];
202
- const nestedListBlock = listItemBlock.children[0];
203
- const nestedListItemBlock = nestedListBlock.blocks[0];
198
+ const paragraphBlock = contentState.children[0];
199
+ const imageBlock = contentState.children[1];
200
+ const listBlock = contentState.children[2];
201
+ const listItemBlock = listBlock.children[0];
202
+ const nestedListBlock = listItemBlock.nestList[0];
203
+ const nestedListItemBlock = nestedListBlock.children[0];
204
204
  expect(paragraphBlock.parent).toEqual(contentState);
205
205
  expect(imageBlock.parent).toEqual(contentState);
206
206
  expect(listBlock.parent).toEqual(contentState);