@globalpayments/vega 2.55.1 → 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 (258) 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 +5 -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/vega-accordion.cjs.entry.js +4 -4
  15. package/dist/cjs/vega-app-header-button.cjs.entry.js +4 -4
  16. package/dist/cjs/vega-box.cjs.entry.js +5 -5
  17. package/dist/cjs/vega-button-circle.cjs.entry.js +4 -4
  18. package/dist/cjs/vega-button.cjs.entry.js +3 -3
  19. package/dist/cjs/vega-calendar_3.cjs.entry.js +49 -10
  20. package/dist/cjs/vega-card.cjs.entry.js +4 -4
  21. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  22. package/dist/cjs/vega-chip.cjs.entry.js +4 -4
  23. package/dist/cjs/vega-code-block.cjs.entry.js +2 -2
  24. package/dist/cjs/vega-date-picker_2.cjs.entry.js +4 -4
  25. package/dist/cjs/vega-dialog_2.cjs.entry.js +4 -4
  26. package/dist/cjs/vega-divider.cjs.entry.js +4 -4
  27. package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -6
  28. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  29. package/dist/cjs/vega-flag-icon.cjs.entry.js +4 -4
  30. package/dist/cjs/vega-flex.cjs.entry.js +5 -5
  31. package/dist/cjs/vega-font.cjs.entry.js +4 -4
  32. package/dist/cjs/vega-grid.cjs.entry.js +4 -4
  33. package/dist/cjs/vega-icon.cjs.entry.js +4 -4
  34. package/dist/cjs/vega-image-uploader.cjs.entry.js +3 -3
  35. package/dist/cjs/vega-input-phone-number.cjs.entry.js +2 -2
  36. package/dist/cjs/vega-input-select.cjs.entry.js +3 -3
  37. package/dist/cjs/vega-left-nav_5.cjs.entry.js +4 -4
  38. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  39. package/dist/cjs/vega-pagination.cjs.entry.js +3 -3
  40. package/dist/cjs/vega-popover_2.cjs.entry.js +4 -4
  41. package/dist/cjs/vega-rich-text-content.cjs.entry.js +13 -13
  42. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +68 -68
  43. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +3 -3
  44. package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
  45. package/dist/cjs/vega-signature-capture.cjs.entry.js +4 -4
  46. package/dist/cjs/vega-table_8.cjs.entry.js +3 -3
  47. package/dist/cjs/vega-time-picker_2.cjs.entry.js +4 -4
  48. package/dist/cjs/vega-tooltip_2.cjs.entry.js +4 -4
  49. package/dist/cjs/vega.cjs.js +4 -4
  50. package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +1 -1
  51. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +24 -7
  52. package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +11 -2
  53. package/dist/collection/components/vega-calendar/vega-calendar.css +6 -0
  54. package/dist/collection/components/vega-calendar/vega-calendar.js +43 -0
  55. package/dist/collection/components/vega-dropdown/vega-dropdown.js +1 -1
  56. package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
  57. package/dist/collection/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.js +2 -2
  58. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +4 -4
  59. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.js +2 -2
  60. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.js +1 -1
  61. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.js +1 -1
  62. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.js +3 -3
  63. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.js +3 -3
  64. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.js +2 -2
  65. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +28 -47
  66. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.js +7 -7
  67. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.js +3 -3
  68. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.js +3 -3
  69. 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
  70. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.js +3 -3
  71. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.js +2 -2
  72. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.js +3 -3
  73. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.js +3 -3
  74. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.js +1 -1
  75. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.js +4 -4
  76. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.js +3 -3
  77. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-code-block-strategy.js +1 -1
  78. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/code-block-remove-self-strategy.js +3 -3
  79. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.js +2 -2
  80. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.js +1 -1
  81. 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
  82. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.js +1 -1
  83. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.js +3 -3
  84. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.js +4 -4
  85. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.js +2 -2
  86. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.js +1 -1
  87. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.js +1 -1
  88. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.js +3 -3
  89. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +9 -9
  90. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/switch-out-from-code-block-strategy.js +2 -2
  91. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +8 -0
  92. package/dist/collection/components/vega-rich-text-editor/dto/blocks/code-block.js +5 -5
  93. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +7 -7
  94. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +6 -6
  95. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +18 -12
  96. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +9 -9
  97. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +14 -14
  98. package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +2 -2
  99. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +2 -2
  100. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +4 -4
  101. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +2 -2
  102. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/code-block-renderer.js +1 -1
  103. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.js +1 -1
  104. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +1 -1
  105. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +1 -1
  106. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/code-block-node-renderer.js +2 -2
  107. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/delete-selected-nodes-controller.js +20 -20
  108. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/focus-controller.js +1 -1
  109. 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
  110. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ol-to-rte-list-block-strategy.js +1 -1
  111. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-to-rte-list-block-strategy.js +1 -1
  112. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/delete-content-handler.js +8 -8
  113. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +8 -8
  114. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +4 -4
  115. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +5 -5
  116. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.js +6 -6
  117. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/insert-composition-text-controller.js +4 -4
  118. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/insert-image-controller.js +1 -1
  119. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/internal-code-block-selection-controller.js +1 -1
  120. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +4 -4
  121. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +1 -1
  122. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/code-block-toolbar-button-slimmer.js +1 -1
  123. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.js +3 -3
  124. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.js +56 -0
  125. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.js +1 -1
  126. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.js +3 -3
  127. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/code-block.test.js +5 -5
  128. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/image-block.test.js +3 -3
  129. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-block.test.js +7 -7
  130. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-item.test.js +3 -3
  131. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/text-block.test.js +3 -3
  132. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +18 -18
  133. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/text-node.test.js +9 -9
  134. package/dist/collection/helpers/validator/rules/rich-text-editor-required-rule.js +2 -2
  135. package/dist/esm/{app-globals-4881974a.js → app-globals-b5881948.js} +2 -2
  136. package/dist/esm/{code-block-ef2f04ca.js → code-block-1cdb0599.js} +99 -110
  137. package/dist/esm/{component-value-history-controller-slimmer.abstract-0a0ef33f.js → component-value-history-controller-slimmer.abstract-c12b2958.js} +5 -5
  138. package/dist/esm/{content-state-69d29a07.js → content-state-cf27d19b.js} +90 -84
  139. package/dist/esm/{design-token-9bbefd23.js → design-token-96e03257.js} +1 -1
  140. package/dist/esm/{element-appender-slimmer-8652e8d7.js → element-appender-slimmer-00dcccb9.js} +1 -1
  141. package/dist/esm/{image-annotation-action-1497f70e.js → image-annotation-action-e76b3396.js} +1 -1
  142. package/dist/esm/index.js +5 -5
  143. package/dist/esm/loader.js +4 -4
  144. package/dist/esm/{public-rules-3436034b.js → public-rules-e8616346.js} +3 -3
  145. package/dist/esm/{responsive-format-facade-bcc2fd21.js → responsive-format-facade-464498b6.js} +1 -1
  146. package/dist/esm/{rich-text-editor-required-rule-cc5b6a2d.js → rich-text-editor-required-rule-69844536.js} +3 -3
  147. package/dist/esm/{style-formatter-00d6c32f.js → style-formatter-670e20f7.js} +1 -1
  148. package/dist/esm/vega-accordion.entry.js +4 -4
  149. package/dist/esm/vega-app-header-button.entry.js +4 -4
  150. package/dist/esm/vega-box.entry.js +5 -5
  151. package/dist/esm/vega-button-circle.entry.js +4 -4
  152. package/dist/esm/vega-button.entry.js +3 -3
  153. package/dist/esm/vega-calendar_3.entry.js +49 -10
  154. package/dist/esm/vega-card.entry.js +4 -4
  155. package/dist/esm/vega-carousel.entry.js +3 -3
  156. package/dist/esm/vega-chip.entry.js +4 -4
  157. package/dist/esm/vega-code-block.entry.js +2 -2
  158. package/dist/esm/vega-date-picker_2.entry.js +4 -4
  159. package/dist/esm/vega-dialog_2.entry.js +4 -4
  160. package/dist/esm/vega-divider.entry.js +4 -4
  161. package/dist/esm/vega-dropdown_5.entry.js +7 -6
  162. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  163. package/dist/esm/vega-flag-icon.entry.js +4 -4
  164. package/dist/esm/vega-flex.entry.js +5 -5
  165. package/dist/esm/vega-font.entry.js +4 -4
  166. package/dist/esm/vega-grid.entry.js +4 -4
  167. package/dist/esm/vega-icon.entry.js +4 -4
  168. package/dist/esm/vega-image-uploader.entry.js +3 -3
  169. package/dist/esm/vega-input-phone-number.entry.js +2 -2
  170. package/dist/esm/vega-input-select.entry.js +3 -3
  171. package/dist/esm/vega-left-nav_5.entry.js +4 -4
  172. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  173. package/dist/esm/vega-pagination.entry.js +3 -3
  174. package/dist/esm/vega-popover_2.entry.js +4 -4
  175. package/dist/esm/vega-rich-text-content.entry.js +13 -13
  176. package/dist/esm/vega-rich-text-editor_4.entry.js +68 -68
  177. package/dist/esm/vega-selection-chip_2.entry.js +3 -3
  178. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  179. package/dist/esm/vega-signature-capture.entry.js +4 -4
  180. package/dist/esm/vega-table_8.entry.js +3 -3
  181. package/dist/esm/vega-time-picker_2.entry.js +4 -4
  182. package/dist/esm/vega-tooltip_2.entry.js +4 -4
  183. package/dist/esm/vega.js +4 -4
  184. package/dist/types/components/vega-app-header-button/types.d.ts +2 -0
  185. package/dist/types/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.d.ts +1 -0
  186. package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +1 -0
  187. package/dist/types/components/vega-calendar/types.d.ts +2 -0
  188. package/dist/types/components/vega-calendar/vega-calendar.d.ts +14 -1
  189. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +13 -2
  190. package/dist/types/components/vega-rich-text-editor/dto/blocks/code-block.d.ts +2 -2
  191. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +2 -2
  192. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +2 -2
  193. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +8 -2
  194. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +2 -2
  195. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +1 -1
  196. package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +2 -2
  197. package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +2 -2
  198. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +3 -3
  199. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +2 -2
  200. package/dist/types/components.d.ts +15 -1
  201. package/dist/types/types/components.type.d.ts +1 -0
  202. package/dist/vega/index.esm.js +1 -1
  203. package/dist/vega/{p-0e8324f2.entry.js → p-03c759ae.entry.js} +1 -1
  204. package/dist/vega/p-04c8b83d.entry.js +1 -0
  205. package/dist/vega/{p-c212a1e3.entry.js → p-08a0cbd0.entry.js} +1 -1
  206. package/dist/vega/{p-72e14f49.entry.js → p-0c660956.entry.js} +1 -1
  207. package/dist/vega/{p-1b165fbb.entry.js → p-144d2390.entry.js} +1 -1
  208. package/dist/vega/{p-c48a8510.entry.js → p-1737536e.entry.js} +1 -1
  209. package/dist/vega/{p-ad858290.entry.js → p-1a7d0e21.entry.js} +1 -1
  210. package/dist/vega/{p-9dc9fcf3.js → p-1c3e1134.js} +1 -1
  211. package/dist/vega/{p-ecd9a973.entry.js → p-1ebc1acf.entry.js} +1 -1
  212. package/dist/vega/{p-1d41f551.entry.js → p-2a6517f9.entry.js} +1 -1
  213. package/dist/vega/p-2f6c4f2c.entry.js +1 -0
  214. package/dist/vega/{p-f17c9093.entry.js → p-302e01e9.entry.js} +1 -1
  215. package/dist/vega/{p-f7062473.entry.js → p-3162a3f0.entry.js} +1 -1
  216. package/dist/vega/{p-6681efd5.js → p-397c7199.js} +1 -1
  217. package/dist/vega/{p-8270bb8f.entry.js → p-487c0f17.entry.js} +1 -1
  218. package/dist/vega/{p-ca91268b.entry.js → p-4a12fb0d.entry.js} +1 -1
  219. package/dist/vega/{p-f9cf7e36.js → p-4b2a90b8.js} +1 -1
  220. package/dist/vega/{p-84a31a31.entry.js → p-4c595d8d.entry.js} +1 -1
  221. package/dist/vega/{p-43ba9a8a.entry.js → p-576b812b.entry.js} +1 -1
  222. package/dist/vega/{p-56dc1345.entry.js → p-59f1fd3e.entry.js} +1 -1
  223. package/dist/vega/{p-5a6b8846.entry.js → p-5be150cb.entry.js} +1 -1
  224. package/dist/vega/{p-a63e2fee.entry.js → p-5cb92c51.entry.js} +1 -1
  225. package/dist/vega/p-5f377954.js +1 -1
  226. package/dist/vega/{p-201a78a2.entry.js → p-5f86a286.entry.js} +1 -1
  227. package/dist/vega/{p-4f5079bc.entry.js → p-636142ae.entry.js} +1 -1
  228. package/dist/vega/{p-327be043.js → p-66516ee9.js} +1 -1
  229. package/dist/vega/p-68864531.js +1 -0
  230. package/dist/vega/p-6a7b7214.js +1 -0
  231. package/dist/vega/p-6b8d105e.entry.js +1 -0
  232. package/dist/vega/{p-c7e2a155.entry.js → p-7728041e.entry.js} +1 -1
  233. package/dist/vega/p-778fd499.js +1 -0
  234. package/dist/vega/{p-13ca73c7.entry.js → p-7cc20ed5.entry.js} +1 -1
  235. package/dist/vega/{p-cce253c2.entry.js → p-81e56716.entry.js} +1 -1
  236. package/dist/vega/p-962b40d1.entry.js +1 -0
  237. package/dist/vega/{p-c10b4f47.entry.js → p-9d286c08.entry.js} +1 -1
  238. package/dist/vega/{p-cae183fd.entry.js → p-a42bc438.entry.js} +1 -1
  239. package/dist/vega/{p-b89a9760.js → p-ae74d511.js} +1 -1
  240. package/dist/vega/{p-da95668c.entry.js → p-b3da0b44.entry.js} +1 -1
  241. package/dist/vega/{p-1e4b6f0a.entry.js → p-c0043eed.entry.js} +1 -1
  242. package/dist/vega/p-c685adcd.js +1 -0
  243. package/dist/vega/{p-9c0cda62.js → p-d8e1ed2d.js} +1 -1
  244. package/dist/vega/{p-9a0d3d2d.entry.js → p-dc383362.entry.js} +1 -1
  245. package/dist/vega/{p-822cd8e5.js → p-dc3d93d6.js} +1 -1
  246. package/dist/vega/{p-79370ad4.entry.js → p-e2282f71.entry.js} +1 -1
  247. package/dist/vega/{p-c8a87f06.entry.js → p-e5eda663.entry.js} +1 -1
  248. package/dist/vega/{p-7704a608.entry.js → p-ec7dc51f.entry.js} +1 -1
  249. package/dist/vega/vega.esm.js +1 -1
  250. package/package.json +5 -1
  251. package/dist/vega/p-3eb2d433.js +0 -1
  252. package/dist/vega/p-3fa7d356.js +0 -1
  253. package/dist/vega/p-547692bf.entry.js +0 -1
  254. package/dist/vega/p-57005931.entry.js +0 -1
  255. package/dist/vega/p-5e8e4aba.js +0 -1
  256. package/dist/vega/p-cb36ccf0.entry.js +0 -1
  257. package/dist/vega/p-ec3495de.entry.js +0 -1
  258. package/dist/vega/p-fecb4044.js +0 -1
@@ -10,10 +10,10 @@ export class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
10
10
  * @returns {Nullable<RTENode>} the previous block last node
11
11
  */
12
12
  getPreviousNode(currentNode) {
13
- const currentBlock = currentNode.parentBlock;
14
- const currentIndex = currentBlock['nodes'].indexOf(currentNode);
13
+ const currentBlock = currentNode.parent;
14
+ const currentIndex = currentBlock.children.indexOf(currentNode);
15
15
  if (currentIndex > 0) {
16
- return currentBlock['nodes'][currentIndex - 1];
16
+ return currentBlock.children[currentIndex - 1];
17
17
  }
18
18
  else if (currentBlock.parent) {
19
19
  const previousBlock = this.getPreviousBlock(currentBlock);
@@ -29,10 +29,10 @@ export class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
29
29
  * @returns {Nullable<RTENode>} the next block first node
30
30
  */
31
31
  getNextNode(currentNode) {
32
- const currentBlock = currentNode.parentBlock;
33
- const currentIndex = currentBlock['nodes'].indexOf(currentNode);
34
- if (currentBlock['nodes'][currentIndex + 1]) {
35
- return currentBlock['nodes'][currentIndex + 1];
32
+ const currentBlock = currentNode.parent;
33
+ const currentIndex = currentBlock.children.indexOf(currentNode);
34
+ if (currentBlock.children[currentIndex + 1]) {
35
+ return currentBlock.children[currentIndex + 1];
36
36
  }
37
37
  else if (currentBlock.parent) {
38
38
  const nextBlock = this.getNextBlock(currentBlock);
@@ -48,20 +48,20 @@ export class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
48
48
  * @returns {boolean} True or false;
49
49
  */
50
50
  isContentFirstNode(currentNode) {
51
- const currentBlock = currentNode.parentBlock;
52
- const currentIndex = currentBlock['nodes'].indexOf(currentNode);
51
+ const currentBlock = currentNode.parent;
52
+ const currentIndex = currentBlock.children.indexOf(currentNode);
53
53
  const parent = currentBlock.parent;
54
- if (currentBlock.type === 'list-item') {
54
+ if (currentBlock.isListItemBlock()) {
55
55
  const listParent = parent.parent;
56
56
  return (currentIndex === 0 &&
57
- Array.isArray(parent['blocks']) &&
58
- parent['blocks'][0] === currentBlock &&
57
+ Array.isArray(parent.children) &&
58
+ parent.children[0] === currentBlock &&
59
59
  listParent['type'] !== 'list-item' &&
60
- Array.isArray(listParent['blocks']) &&
61
- listParent['blocks'][0] === parent);
60
+ Array.isArray(listParent.children) &&
61
+ listParent.children[0] === parent);
62
62
  }
63
63
  else {
64
- return (currentIndex === 0 && Array.isArray(parent['blocks']) && parent['blocks'][0] === currentBlock);
64
+ return (currentIndex === 0 && Array.isArray(parent.children) && parent.children[0] === currentBlock);
65
65
  }
66
66
  }
67
67
  /**
@@ -72,10 +72,10 @@ export class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
72
72
  * @returns {Nullable<RTEBlock>} The previous block if existing
73
73
  */
74
74
  getPreviousBlock(currentBlock) {
75
- if (currentBlock && currentBlock.parent && currentBlock.parent['blocks']) {
76
- const currentBlockIndex = currentBlock.parent['blocks'].indexOf(currentBlock);
75
+ if (currentBlock && currentBlock.parent && currentBlock.parent.children) {
76
+ const currentBlockIndex = currentBlock.parent.children.indexOf(currentBlock);
77
77
  if (currentBlockIndex > 0) {
78
- return currentBlock.parent['blocks'][currentBlockIndex - 1];
78
+ return currentBlock.parent.children[currentBlockIndex - 1];
79
79
  }
80
80
  else if ((currentBlock.parent['type'] === 'number-list' ||
81
81
  currentBlock.parent['type'] === 'bullet-list') &&
@@ -91,26 +91,7 @@ export class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
91
91
  * @returns {Nullable<RTENode>} Returns the last node of the given `currentBlock` object.
92
92
  */
93
93
  getBlockLastNode(currentBlock) {
94
- if (currentBlock.type === 'list-item') {
95
- if (currentBlock['children'] && currentBlock['children'].length > 0) {
96
- return this.getBlockLastNode(currentBlock['children'][currentBlock['children'].length - 1]);
97
- }
98
- else {
99
- return currentBlock['nodes'][currentBlock['nodes'].length - 1];
100
- }
101
- }
102
- else if (currentBlock.type === 'number-list' || currentBlock.type === 'bullet-list') {
103
- const listItems = currentBlock.blocks;
104
- if (listItems) {
105
- const lastListItem = listItems[listItems.length - 1];
106
- return this.getBlockLastNode(lastListItem);
107
- }
108
- }
109
- else {
110
- if (currentBlock['nodes']) {
111
- return currentBlock['nodes'][currentBlock['nodes'].length - 1];
112
- }
113
- }
94
+ return currentBlock.getLastNode();
114
95
  }
115
96
  /**
116
97
  * Returns the first node within a given RTE block, handling different block types accordingly.
@@ -120,14 +101,14 @@ export class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
120
101
  */
121
102
  getBlockFirstNode(currentBlock) {
122
103
  if (currentBlock.type === 'number-list' || currentBlock.type === 'bullet-list') {
123
- if (currentBlock.blocks) {
124
- const firstListItem = currentBlock.blocks[0];
104
+ if (currentBlock.children) {
105
+ const firstListItem = currentBlock.children[0];
125
106
  return this.getBlockFirstNode(firstListItem);
126
107
  }
127
108
  }
128
109
  else {
129
- if (currentBlock['nodes']) {
130
- return currentBlock['nodes'][0];
110
+ if (currentBlock.children) {
111
+ return currentBlock.children[0];
131
112
  }
132
113
  }
133
114
  }
@@ -138,13 +119,13 @@ export class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
138
119
  * @returns {Nullable<RTEBlock>} The next block if existing
139
120
  */
140
121
  getNextBlock(currentBlock) {
141
- if (currentBlock && currentBlock.parent && currentBlock.parent['blocks']) {
142
- const currentBlockIndex = currentBlock.parent['blocks'].indexOf(currentBlock);
143
- if (currentBlock.parent['blocks'][currentBlockIndex + 1]) {
144
- return currentBlock.parent['blocks'][currentBlockIndex + 1];
122
+ if (currentBlock && currentBlock.parent && currentBlock.parent.children) {
123
+ const currentBlockIndex = currentBlock.parent.children.indexOf(currentBlock);
124
+ if (currentBlock.parent.children[currentBlockIndex + 1]) {
125
+ return currentBlock.parent.children[currentBlockIndex + 1];
145
126
  }
146
127
  else if (currentBlock.type === 'list-item' &&
147
- currentBlock.parent.blocks.length === currentBlockIndex + 1) {
128
+ currentBlock.parent.children.length === currentBlockIndex + 1) {
148
129
  return this.getNextBlock(currentBlock.parent);
149
130
  }
150
131
  }
@@ -33,8 +33,8 @@ export class BlockDeleteTextContentStrategy extends BlockDeleteNodeContentStrate
33
33
  else {
34
34
  const previousNode = this.getPreviousNode(startContainerNode);
35
35
  // Remove the last character will not delete paragraph, the paragraph will removed after press delete again
36
- if ((previousNode && previousNode.parentBlock === target && previousNode['text'] === '\n') ||
37
- target.nodes.length === 1) {
36
+ if ((previousNode && previousNode.parent === target && previousNode['text'] === '\n') ||
37
+ target.children.length === 1) {
38
38
  action.previousNode = startContainerNode;
39
39
  return;
40
40
  }
@@ -48,12 +48,12 @@ export class BlockDeleteTextContentStrategy extends BlockDeleteNodeContentStrate
48
48
  else {
49
49
  let previousNode = this.getPreviousNode(startContainerNode);
50
50
  let nextNode = null;
51
- if (target.nodes.length && previousNode && previousNode.parentBlock !== target) {
51
+ if (target.children.length && previousNode && previousNode.parent !== target) {
52
52
  if (startContainerNode.isEmpty()) {
53
53
  target.apply(new RemoveChildAction(startContainerNode));
54
54
  }
55
- if (target.type === previousNode.parentBlock.type) {
56
- previousNode.parentBlock.apply(new MergeTwoBlocksNodesAction(target));
55
+ if (target.type === previousNode.parent.type) {
56
+ previousNode.parent.apply(new MergeTwoBlocksNodesAction(target));
57
57
  }
58
58
  }
59
59
  else {
@@ -80,14 +80,14 @@ export class BlockDeleteTextContentStrategy extends BlockDeleteNodeContentStrate
80
80
  if (previousNode instanceof RTETextNode && previousNode.isEmpty()) {
81
81
  const shouldRemoveNode = previousNode;
82
82
  previousNode = this.getPreviousNode(previousNode);
83
- shouldRemoveNode.parentBlock.apply(new RemoveChildAction(shouldRemoveNode));
83
+ shouldRemoveNode.parent.apply(new RemoveChildAction(shouldRemoveNode));
84
84
  if (!previousNode) {
85
85
  nextNode = startContainerNode;
86
86
  }
87
87
  }
88
88
  }
89
89
  //Remove the paragraph block if the content is empty
90
- if (target.nodes.length === 0) {
90
+ if (target.children.length === 0) {
91
91
  target.parent.apply(new RemoveChildAction(target));
92
92
  }
93
93
  if (previousNode) {
@@ -20,12 +20,12 @@ export class BlockInsertBlocksBeforeStrategy extends ActionHandleStrategy {
20
20
  * @param {RTEBlock[]} blocks - An array of RTEBlock objects that you want to replace the `referBlock` with in the `blocks` array.
21
21
  */
22
22
  replaceBlockWithBlocks(target, referBlock, blocks) {
23
- if (target.blocks) {
23
+ if (target.children) {
24
24
  blocks.forEach((block) => {
25
25
  block.parent = target;
26
26
  });
27
- const arrayFixed = target.blocks;
28
- target.blocks = arrayFixed.flatMap((block) => {
27
+ const arrayFixed = target.children;
28
+ target.children = arrayFixed.flatMap((block) => {
29
29
  if (block === referBlock) {
30
30
  return blocks;
31
31
  }
@@ -25,10 +25,10 @@ export class BlockInsertLineBreakStrategy extends ActionHandleStrategy {
25
25
  const lineBreakNode = new RTETextNode(generateUUID(), '\n', target);
26
26
  const beforeText = splitNode.text.slice(0, startOffsetOfNode);
27
27
  const afterText = splitNode.text.slice(startOffsetOfNode);
28
- const nodesSplitIndex = target.nodes.indexOf(splitNode);
28
+ const nodesSplitIndex = target.children.indexOf(splitNode);
29
29
  if (nodesSplitIndex > -1) {
30
- const beforeNodes = target.nodes.slice(0, nodesSplitIndex);
31
- const afterNodes = target.nodes.slice(nodesSplitIndex + 1);
30
+ const beforeNodes = target.children.slice(0, nodesSplitIndex);
31
+ const afterNodes = target.children.slice(nodesSplitIndex + 1);
32
32
  if (beforeText) {
33
33
  beforeNodes.push(splitNode.cloneWithText(beforeText));
34
34
  }
@@ -21,7 +21,7 @@ export class BlockInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy
21
21
  * @returns {Nullable<RTETextNode>} Nullable<RTETextNode>
22
22
  */
23
23
  lineBreakMultipleBlocks(selectedBlocks, target) {
24
- const beforeNodes = target.nodes;
24
+ const beforeNodes = target.children;
25
25
  const lineBreakNode = new RTETextNode(generateUUID(), '\n', target);
26
26
  const afterNodes = this.concatBlocksNodes(selectedBlocks.slice(1));
27
27
  this.mergeLineBreakNodes(beforeNodes, lineBreakNode, afterNodes, target);
@@ -37,7 +37,7 @@ export class BlockInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy
37
37
  const nodes = [];
38
38
  blocks.map((block) => {
39
39
  if (block.type !== 'image') {
40
- nodes.push(...block['nodes']);
40
+ nodes.push(...block.children);
41
41
  block.parent.apply(new RemoveChildAction(block));
42
42
  }
43
43
  });
@@ -14,9 +14,9 @@ export class BlockMergeNodesStrategy extends ActionHandleStrategy {
14
14
  handleAction(action, target) {
15
15
  const anotherBlock = action.blockNeedToBeMerged;
16
16
  if (target.type === anotherBlock.type || (target.type !== 'image' && anotherBlock.type !== 'image')) {
17
- let shouldMergeNodes = anotherBlock['nodes'];
18
- if (anotherBlock['type'] !== 'image') {
19
- shouldMergeNodes = anotherBlock['nodes'].filter((node) => node.text);
17
+ let shouldMergeNodes = anotherBlock.children;
18
+ if (anotherBlock.type !== 'image') {
19
+ shouldMergeNodes = anotherBlock.children.filter((node) => node.text);
20
20
  }
21
21
  target.apply(new AppendChildNodesAction(shouldMergeNodes));
22
22
  anotherBlock.parent.apply(new RemoveChildAction(anotherBlock));
@@ -8,8 +8,8 @@ export class BlockRemoveChildBlockStrategy extends ActionHandleStrategy {
8
8
  */
9
9
  handleAction(action, target) {
10
10
  const blockToBeRemoved = action.entityToBeRemoved;
11
- if (target.blocks) {
12
- target.blocks = target.blocks.filter((block) => block !== blockToBeRemoved);
11
+ if (target.children) {
12
+ target.children = target.children.filter((block) => block !== blockToBeRemoved);
13
13
  }
14
14
  }
15
15
  }
@@ -12,9 +12,9 @@ export class BlockRemoveNodeStrategy extends ActionHandleStrategy {
12
12
  * @param {RTEBlockWithNodes} target - The parent block of the node that will be removed.
13
13
  */
14
14
  handleAction(action, target) {
15
- const arrayFixed = target.nodes;
16
- target.nodes = arrayFixed.filter((node) => node !== action.entityToBeRemoved);
17
- if (target.nodes.length === 0 && target.parent) {
15
+ const arrayFixed = target.children;
16
+ target.children = arrayFixed.filter((node) => node !== action.entityToBeRemoved);
17
+ if (target.children.length === 0 && target.parent) {
18
18
  target.parent.apply(new RemoveChildAction(target));
19
19
  }
20
20
  }
@@ -11,11 +11,11 @@ export class BlockReplaceNodeWithNodesStrategy extends ActionHandleStrategy {
11
11
  * @param {RTENode[]} newNodes - The array of the text node or the image node.
12
12
  */
13
13
  replaceNodeWithNodes(target, referNode, newNodes) {
14
- if (target['nodes']) {
14
+ if (target.children) {
15
15
  newNodes.forEach((node) => {
16
- node.parentBlock = target;
16
+ node.parent = target;
17
17
  });
18
- target['nodes'] = target['nodes'].flatMap((node) => {
18
+ target.children = target.children.flatMap((node) => {
19
19
  if (node === referNode) {
20
20
  return newNodes;
21
21
  }
@@ -11,7 +11,7 @@ export class BlockReplaceNodesStrategy extends ActionHandleStrategy {
11
11
  * @param {RTETextBlock | RTEImageBlock} target - The text block or the image block.
12
12
  */
13
13
  handleAction(action, target) {
14
- target.nodes = [];
14
+ target.children = [];
15
15
  target.apply(new AppendChildNodesAction(action.newChildNodes));
16
16
  }
17
17
  }
@@ -22,10 +22,10 @@ export class BlockSplitWithImageNodeStrategy extends ActionHandleStrategy {
22
22
  * @returns {Nullable<RTEBlock>} The new block after split
23
23
  */
24
24
  splitImageNodes(imageNode, imageOffset, target) {
25
- const nodesSplitIndex = target.nodes.indexOf(imageNode);
25
+ const nodesSplitIndex = target.children.indexOf(imageNode);
26
26
  if (nodesSplitIndex > -1) {
27
- const beforeNodes = target.nodes.slice(0, nodesSplitIndex + imageOffset);
28
- const afterNodes = target.nodes.slice(nodesSplitIndex + imageOffset);
27
+ const beforeNodes = target.children.slice(0, nodesSplitIndex + imageOffset);
28
+ const afterNodes = target.children.slice(nodesSplitIndex + imageOffset);
29
29
  target.apply(new ReplaceChildNodesAction(beforeNodes));
30
30
  const newBlock = this.cloneWithNodes(afterNodes, target);
31
31
  target.parent.apply(new InsertBlocksAfterAction(target, newBlock));
@@ -41,7 +41,7 @@ export class BlockSplitWithImageNodeStrategy extends ActionHandleStrategy {
41
41
  */
42
42
  cloneWithNodes(nodes, target) {
43
43
  const block = target.createNewImageBlock();
44
- block.nodes = [];
44
+ block.children = [];
45
45
  block.apply(new AppendChildNodesAction(nodes));
46
46
  return block;
47
47
  }
@@ -23,10 +23,10 @@ export class BlockSplitWithTextNodeStrategy extends ActionHandleStrategy {
23
23
  if (splitNode) {
24
24
  const beforeText = splitNode.text.slice(0, startOffsetOfNode);
25
25
  const afterText = splitNode.text.slice(startOffsetOfNode);
26
- const nodesSplitIndex = textBlock.nodes.indexOf(splitNode);
26
+ const nodesSplitIndex = textBlock.children.indexOf(splitNode);
27
27
  if (nodesSplitIndex > -1) {
28
- const beforeNodes = textBlock.nodes.slice(0, nodesSplitIndex);
29
- const afterNodes = textBlock.nodes.slice(nodesSplitIndex + 1);
28
+ const beforeNodes = textBlock.children.slice(0, nodesSplitIndex);
29
+ const afterNodes = textBlock.children.slice(nodesSplitIndex + 1);
30
30
  if (beforeText) {
31
31
  beforeNodes.push(splitNode.cloneWithText(beforeText));
32
32
  }
@@ -30,7 +30,7 @@ export class BlockTransformToCodeBlockStrategy extends ActionHandleStrategy {
30
30
  const selectedTextBlocks = selectedBlocks.filter((item) => item.type !== 'image' && item.type !== 'list-item');
31
31
  return selectedTextBlocks
32
32
  .map((block) => {
33
- return block.nodes.map((node) => node.text).join('');
33
+ return block.children.map((node) => node.text).join('');
34
34
  })
35
35
  .join('\n');
36
36
  }
@@ -15,7 +15,7 @@ export class CodeBlockRemoveSelfStrategy extends BlockDeleteNodeContentStrategy
15
15
  * @inheritDoc
16
16
  */
17
17
  handleAction(_action, target) {
18
- const node = target.nodes[0];
18
+ const node = target.children[0];
19
19
  const parent = target.parent;
20
20
  if (parent) {
21
21
  let focusNode = this.getPreviousNode(node);
@@ -28,14 +28,14 @@ export class CodeBlockRemoveSelfStrategy extends BlockDeleteNodeContentStrategy
28
28
  const focusElement = focusNode
29
29
  ? stateEntityRenderingRegistry.getDOMByEntity(focusNode)
30
30
  : null;
31
- if (parent.blocks.length === 0) {
31
+ if (parent.children.length === 0) {
32
32
  const defaultParagraph = RTETextBlock.from({
33
33
  id: generateUUID(),
34
34
  type: 'paragraph',
35
35
  nodes: [{ id: generateUUID(), type: 'text', text: '' }],
36
36
  });
37
37
  target.parent.apply(new AppendChildNodesAction([defaultParagraph]));
38
- focusNode = defaultParagraph.nodes[0];
38
+ focusNode = defaultParagraph.children[0];
39
39
  offset = 0;
40
40
  }
41
41
  this.notifyUpdateSelection(focusNode, focusElement, offset, target);
@@ -14,8 +14,8 @@ export class ImageBlockInsertImageStrategy extends ActionHandleStrategy {
14
14
  const splitNode = action.splitPointNode;
15
15
  const startOffsetOfNode = action.startOffsetOfNode;
16
16
  const newImageBlock = action.imageBlockToBeInserted;
17
- const newImageNodes = newImageBlock.nodes;
18
- if (target.nodes.length < 1) {
17
+ const newImageNodes = newImageBlock.children;
18
+ if (target.children.length < 1) {
19
19
  target.apply(new AppendChildNodesAction(newImageNodes));
20
20
  }
21
21
  else if (this.isCaretPositionAtImageBlockEnd(target, splitNode, startOffsetOfNode)) {
@@ -15,7 +15,7 @@ export class ImageInsertLineBreakStrategy extends ActionHandleStrategy {
15
15
  target.apply(insertNewParagraphAction);
16
16
  const newBlock = insertNewParagraphAction.newBlock;
17
17
  if (newBlock) {
18
- action.lineBreakNode = newBlock.nodes[0];
18
+ action.lineBreakNode = newBlock.children[0];
19
19
  }
20
20
  }
21
21
  }
@@ -34,7 +34,7 @@ export class ImageInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy
34
34
  afterNodes.push(new RTETextNode(generateUUID(), '\n', newParagraph));
35
35
  }
36
36
  newParagraph.apply(new AppendChildNodesAction(afterNodes));
37
- return newParagraph['nodes'][0];
37
+ return newParagraph['children'][0];
38
38
  }
39
39
  /**
40
40
  * Concat the child nodes of multiple RTEBlocks if both are not images.
@@ -46,7 +46,7 @@ export class ImageInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy
46
46
  const nodes = [];
47
47
  blocks.map((block) => {
48
48
  if (block.type !== 'image') {
49
- nodes.push(...block['nodes']);
49
+ nodes.push(...block.children);
50
50
  block.parent.apply(new RemoveChildAction(block));
51
51
  }
52
52
  });
@@ -13,7 +13,7 @@ export class ListItemDeleteTextContentStrategy extends BlockDeleteTextContentStr
13
13
  handleAction(action, target) {
14
14
  const listBlock = target.parent;
15
15
  this.deleteNodeContent(action, target);
16
- if (listBlock.blocks.length === 0) {
16
+ if (listBlock.children.length === 0) {
17
17
  listBlock.parent.apply(new RemoveChildAction(listBlock));
18
18
  }
19
19
  }
@@ -52,8 +52,8 @@ export class ListItemInsertNewParagraphStrategy extends ActionHandleStrategy {
52
52
  * @returns {RTEBlock} Returns a `RTEBlock`.
53
53
  */
54
54
  breakListItemAtEnd(newListItem, target) {
55
- const lastItem = target.parent.blocks[target.parent.blocks.length - 1];
56
- const currentItemIsEmpty = target.nodes.length === 1 && target.nodes[0].isEmpty();
55
+ const lastItem = target.parent.children[target.parent.children.length - 1];
56
+ const currentItemIsEmpty = target.children.length === 1 && target.children[0].isEmpty();
57
57
  if (target === lastItem && currentItemIsEmpty) {
58
58
  const parentParent = target.parent.parent;
59
59
  if (parentParent['type'] !== 'list-item') {
@@ -62,7 +62,7 @@ export class ListItemInsertNewParagraphStrategy extends ActionHandleStrategy {
62
62
  type: 'paragraph',
63
63
  nodes: [],
64
64
  });
65
- newParagraph.apply(new AppendChildNodesAction(newListItem.nodes));
65
+ newParagraph.apply(new AppendChildNodesAction(newListItem.children));
66
66
  parentParent.apply(new InsertBlocksAfterAction(target.parent, newParagraph));
67
67
  target.parent.apply(new RemoveChildAction(target));
68
68
  return newParagraph;
@@ -10,12 +10,12 @@ export class ListItemRemoveNestListStrategy extends ActionHandleStrategy {
10
10
  * @param {RTEListItemBlock} target - The list item block.
11
11
  */
12
12
  handleAction(action, target) {
13
- if (target.children) {
14
- if (target.children.length > 1) {
15
- target.children = target.children.filter((child) => child !== action.nestListBlockToBeRemoved);
13
+ if (target.nestList) {
14
+ if (target.nestList.length > 1) {
15
+ target.nestList = target.nestList.filter((child) => child !== action.nestListBlockToBeRemoved);
16
16
  }
17
17
  else {
18
- target.children = undefined;
18
+ target.nestList = undefined;
19
19
  }
20
20
  }
21
21
  }
@@ -11,8 +11,8 @@ export class ListItemRemoveNodeStrategy extends ActionHandleStrategy {
11
11
  * @param {RTEListItemBlock} target - The list item block.
12
12
  */
13
13
  handleAction(action, target) {
14
- target.nodes = target.nodes.filter((node) => node !== action.entityToBeRemoved);
15
- if (target.nodes.length === 0 && (!target.children || !target.children.length)) {
14
+ target.children = target.children.filter((node) => node !== action.entityToBeRemoved);
15
+ if (target.children.length === 0 && (!target.nestList || !target.nestList.length)) {
16
16
  target.parent.apply(new RemoveChildAction(target));
17
17
  }
18
18
  }
@@ -10,6 +10,6 @@ export class ListItemReplaceNestListStrategy extends ActionHandleStrategy {
10
10
  action.newList.forEach((listBlock) => {
11
11
  listBlock.parent = target;
12
12
  });
13
- target.children = action.newList;
13
+ target.nestList = action.newList;
14
14
  }
15
15
  }
@@ -14,7 +14,7 @@ export class ListRemoveListItemStrategy extends BlockRemoveChildBlockStrategy {
14
14
  handleAction(action, target) {
15
15
  super.handleAction(action, target);
16
16
  const parent = target.parent;
17
- if (target.blocks.length === 0 && parent) {
17
+ if (target.children.length === 0 && parent) {
18
18
  // The parent is a list item mean the current block is a nest list, so we need to use RemoveNestListAction to remove the item
19
19
  if (parent['type'] === 'list-item') {
20
20
  parent.apply(new RemoveNestListAction(target));
@@ -16,10 +16,10 @@ export class ListTransformToListStrategy extends ActionHandleStrategy {
16
16
  const isSameList = selectedBlocks.every((block) => block.parent === target);
17
17
  if (isSameList) {
18
18
  // Select one or more list items belonging to the same list, and all items in this list should be updated
19
- bulletList.apply(new AppendChildNodesAction(target.blocks));
19
+ bulletList.apply(new AppendChildNodesAction(target.children));
20
20
  target.parent.apply(new InsertBlocksAfterAction(target, bulletList));
21
21
  target.parent.apply(new RemoveChildAction(target));
22
- selectedBlocks.forEach((block) => block.nodes.map((node) => node.apply(new SyncUpSelectionAction())));
22
+ selectedBlocks.forEach((block) => block.children.map((node) => node.apply(new SyncUpSelectionAction())));
23
23
  }
24
24
  else {
25
25
  const listItems = action.selectedBlocks.map((block) => target.parent.toListItem(block));
@@ -28,7 +28,7 @@ export class ListTransformToListStrategy extends ActionHandleStrategy {
28
28
  action.selectedBlocks.forEach((block) => {
29
29
  block.parent.apply(new RemoveChildAction(block));
30
30
  });
31
- if (target.blocks.length === 0) {
31
+ if (target.children.length === 0) {
32
32
  target.parent.apply(new RemoveChildAction(target));
33
33
  }
34
34
  }
@@ -18,10 +18,10 @@ export class ListTransformToParagraphStrategy extends ActionHandleStrategy {
18
18
  let isSelectedLastBlock = false;
19
19
  const selectedBlocks = action.selectedBlocks;
20
20
  const currentParagraph = selectedBlocks.map((block) => {
21
- block.nodes.map((node) => node.apply(new SyncUpSelectionAction()));
22
- if (block === target.blocks[0])
21
+ block.children.map((node) => node.apply(new SyncUpSelectionAction()));
22
+ if (block === target.children[0])
23
23
  isSelectedFirstBlock = true;
24
- if (block === target.blocks[target.blocks.length - 1])
24
+ if (block === target.children[target.children.length - 1])
25
25
  isSelectedLastBlock = true;
26
26
  return this.toParagraph(block);
27
27
  });
@@ -32,19 +32,19 @@ export class ListTransformToParagraphStrategy extends ActionHandleStrategy {
32
32
  target.parent.apply(new InsertBlocksAfterAction(target, ...currentParagraph));
33
33
  }
34
34
  else {
35
- const startIndex = target.blocks.indexOf(selectedBlocks[0]);
36
- const lastIndex = target.blocks.indexOf(selectedBlocks[selectedBlocks.length - 1]);
35
+ const startIndex = target.children.indexOf(selectedBlocks[0]);
36
+ const lastIndex = target.children.indexOf(selectedBlocks[selectedBlocks.length - 1]);
37
37
  const firstBulletList = target.parent.createList(target.type);
38
- firstBulletList.apply(new AppendChildNodesAction(target.blocks.slice(0, startIndex)));
38
+ firstBulletList.apply(new AppendChildNodesAction(target.children.slice(0, startIndex)));
39
39
  const lastBulletList = target.parent.createList(target.type);
40
- lastBulletList.apply(new AppendChildNodesAction(target.blocks.slice(lastIndex + 1)));
40
+ lastBulletList.apply(new AppendChildNodesAction(target.children.slice(lastIndex + 1)));
41
41
  target.parent.apply(new InsertBlocksBeforeAction(target, firstBulletList, ...currentParagraph, lastBulletList));
42
42
  target.parent.apply(new RemoveChildAction(target));
43
43
  }
44
44
  selectedBlocks.map((block) => {
45
45
  target.apply(new RemoveChildAction(block));
46
46
  });
47
- if (target.blocks.length === 0) {
47
+ if (target.children.length === 0) {
48
48
  target.parent.apply(new RemoveChildAction(target));
49
49
  }
50
50
  }
@@ -56,7 +56,7 @@ export class ListTransformToParagraphStrategy extends ActionHandleStrategy {
56
56
  */
57
57
  toParagraph(block) {
58
58
  const textBlock = new RTETextBlock(generateUUID(), 'paragraph');
59
- textBlock.apply(new AppendChildNodesAction(block['nodes']));
59
+ textBlock.apply(new AppendChildNodesAction(block['children']));
60
60
  textBlock['annotationMap'] = block['annotationMap'];
61
61
  return textBlock;
62
62
  }
@@ -19,7 +19,7 @@ export class SwitchOutFromCodeBlockStrategy extends ActionHandleStrategy {
19
19
  const textArray = content.split('\n');
20
20
  const updateAction = new UpdateCodeBlockAction(textArray.slice(0, textArray.length - 2).join('\n'), language);
21
21
  updateAction.isFlushable = false;
22
- target.nodes[0].apply(updateAction);
22
+ target.children[0].apply(updateAction);
23
23
  const textBlock = RTETextBlock.from({
24
24
  id: generateUUID(),
25
25
  type: 'paragraph',
@@ -31,7 +31,7 @@ export class SwitchOutFromCodeBlockStrategy extends ActionHandleStrategy {
31
31
  if (currentNodeDom) {
32
32
  const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(currentNodeDom, VegaInternalRichTextEditorSelectionRangeChange);
33
33
  if (nodeSubject) {
34
- changeManager.notify(nodeSubject, { node: textBlock.nodes[0] });
34
+ changeManager.notify(nodeSubject, { node: textBlock.children[0] });
35
35
  }
36
36
  }
37
37
  }
@@ -75,6 +75,14 @@ export class RTEBlock {
75
75
  }
76
76
  }
77
77
  }
78
+ /**
79
+ * Check if the block is a list item block
80
+ *
81
+ * @returns {boolean} True if the block is a list item block, false otherwise.
82
+ */
83
+ isListItemBlock() {
84
+ return this.type === 'list-item';
85
+ }
78
86
  /**
79
87
  * Apply action to block
80
88
  *