@globalpayments/vega 2.42.0 → 2.44.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 (284) hide show
  1. package/dist/cjs/{app-globals-77b1f80b.js → app-globals-c23133a1.js} +5 -5
  2. package/dist/cjs/{child-nodes-event-prevent-slimmer-7f59159e.js → child-nodes-event-prevent-slimmer-4982065c.js} +1 -1
  3. package/dist/cjs/{content-state-45707be4.js → content-state-5659cad7.js} +2 -14
  4. package/dist/cjs/{design-token-d8362603.js → design-token-02d1846e.js} +1 -1
  5. package/dist/cjs/{element-appender-slimmer-ad1e5774.js → element-appender-slimmer-040db7e3.js} +154 -34
  6. package/dist/cjs/{form-field-controller-slimmer-928d263f.js → form-field-controller-slimmer-2d4a4f40.js} +2 -2
  7. package/dist/cjs/{image-annotation-action-0df6f005.js → image-annotation-action-64f0e28c.js} +1 -1
  8. package/dist/cjs/{index-84ce6b33.js → index-cea30b8b.js} +1 -1
  9. package/dist/cjs/index.cjs.js +8 -8
  10. package/dist/cjs/loader.cjs.js +7 -7
  11. package/dist/cjs/{public-rules-7994300f.js → public-rules-a23c74a9.js} +3 -3
  12. package/dist/cjs/{responsive-format-facade-9439e9ae.js → responsive-format-facade-22eb285c.js} +3 -3
  13. package/dist/cjs/{rich-text-editor-required-rule-11d07c7d.js → rich-text-editor-required-rule-cdc2e15e.js} +1 -1
  14. package/dist/cjs/{string-input-formatter-slimmer-017370ec.js → string-input-formatter-slimmer-90bdfcf6.js} +6 -3
  15. package/dist/cjs/{style-formatter-65652117.js → style-formatter-0536214a.js} +1 -1
  16. package/dist/cjs/{sub-state-notify-slimmer-b9e39b9d.js → sub-state-notify-slimmer-88e2f4aa.js} +1 -1
  17. package/dist/cjs/{sub-state-observer-slimmer-c6665cec.js → sub-state-observer-slimmer-8ed18a5a.js} +1 -1
  18. package/dist/cjs/{translation-2c8a32bb.js → translation-648b7910.js} +27 -0
  19. package/dist/cjs/{translation-slimmer-593b92fe.js → translation-slimmer-8eeb1c99.js} +1 -1
  20. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  21. package/dist/cjs/vega-app-header-button.cjs.entry.js +7 -7
  22. package/dist/cjs/vega-banner.cjs.entry.js +1 -1
  23. package/dist/cjs/vega-box.cjs.entry.js +7 -7
  24. package/dist/cjs/vega-breadcrumb.cjs.entry.js +2 -2
  25. package/dist/cjs/vega-button-circle.cjs.entry.js +7 -7
  26. package/dist/cjs/vega-button-group_2.cjs.entry.js +5 -5
  27. package/dist/cjs/vega-button-link.cjs.entry.js +2 -2
  28. package/dist/cjs/vega-button.cjs.entry.js +6 -6
  29. package/dist/cjs/vega-calendar_3.cjs.entry.js +7 -7
  30. package/dist/cjs/vega-card.cjs.entry.js +6 -6
  31. package/dist/cjs/vega-carousel.cjs.entry.js +5 -5
  32. package/dist/cjs/vega-checkbox_2.cjs.entry.js +5 -5
  33. package/dist/cjs/vega-chip.cjs.entry.js +7 -7
  34. package/dist/cjs/vega-color-picker.cjs.entry.js +3 -3
  35. package/dist/cjs/vega-combo-box.cjs.entry.js +5 -5
  36. package/dist/cjs/vega-date-picker_2.cjs.entry.js +11 -11
  37. package/dist/cjs/vega-dialog_2.cjs.entry.js +83 -8
  38. package/dist/cjs/vega-divider.cjs.entry.js +6 -6
  39. package/dist/cjs/vega-dropdown_5.cjs.entry.js +10 -10
  40. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  41. package/dist/cjs/vega-file-uploader.cjs.entry.js +4 -4
  42. package/dist/cjs/vega-flex.cjs.entry.js +7 -7
  43. package/dist/cjs/vega-font.cjs.entry.js +6 -6
  44. package/dist/cjs/vega-form.cjs.entry.js +5 -5
  45. package/dist/cjs/vega-grid.cjs.entry.js +6 -6
  46. package/dist/cjs/vega-icon.cjs.entry.js +6 -6
  47. package/dist/cjs/vega-image-uploader.cjs.entry.js +8 -8
  48. package/dist/cjs/vega-input-credit-card.cjs.entry.js +17 -13
  49. package/dist/cjs/vega-input-numeric.cjs.entry.js +6 -6
  50. package/dist/cjs/vega-input-phone-number.cjs.entry.js +5 -5
  51. package/dist/cjs/vega-input-range.cjs.entry.js +6 -6
  52. package/dist/cjs/vega-input-select.cjs.entry.js +8 -8
  53. package/dist/cjs/vega-input.cjs.entry.js +6 -6
  54. package/dist/cjs/{vega-internal-event-id-4ba74761.js → vega-internal-event-id-a0ca9af9.js} +4 -0
  55. package/dist/cjs/vega-left-nav_5.cjs.entry.js +17 -10
  56. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +5 -5
  57. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
  58. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +18 -10
  59. package/dist/cjs/vega-pagination.cjs.entry.js +7 -7
  60. package/dist/cjs/vega-popover_2.cjs.entry.js +6 -6
  61. package/dist/cjs/vega-radio_2.cjs.entry.js +5 -5
  62. package/dist/cjs/vega-rich-text-content.cjs.entry.js +5 -5
  63. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +10 -10
  64. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +9 -9
  65. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +7 -7
  66. package/dist/cjs/vega-sidenav_3.cjs.entry.js +7 -7
  67. package/dist/cjs/vega-signature-capture.cjs.entry.js +8 -8
  68. package/dist/cjs/vega-stepper.cjs.entry.js +5 -5
  69. package/dist/cjs/vega-tab-group_2.cjs.entry.js +2 -2
  70. package/dist/cjs/vega-table_8.cjs.entry.js +9 -9
  71. package/dist/cjs/vega-textarea.cjs.entry.js +5 -5
  72. package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
  73. package/dist/cjs/vega-toggle-switch.cjs.entry.js +3 -3
  74. package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -6
  75. package/dist/cjs/vega.cjs.js +7 -7
  76. package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +15 -10
  77. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +62 -1
  78. package/dist/collection/components/vega-modal/vega-modal.js +28 -0
  79. package/dist/collection/components/vega-nav/slimmers/renderers/vega-nav-list-renderer.js +1 -1
  80. package/dist/collection/components/vega-nav/vega-left-nav-group/slimmers/renderers/vega-left-nav-group-renderer.js +4 -1
  81. package/dist/collection/components/vega-nav/vega-left-nav-group/vega-left-nav-group.js +25 -0
  82. package/dist/collection/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-renderer.js +16 -7
  83. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +1 -2
  84. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +0 -11
  85. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-block.test.js +4 -4
  86. package/dist/collection/components/vega-rich-text-editor/test/e2e-utils.js +177 -0
  87. package/dist/collection/components/vega-rich-text-editor/test/fixture.js +257 -0
  88. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +2 -0
  89. package/dist/collection/helpers/slimmers/element-appender/element-appender-hierarchy-tree-manager.js +108 -0
  90. package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +19 -3
  91. package/dist/collection/helpers/slimmers/element-appender/test/element-appender-slimmer.test.js +232 -0
  92. package/dist/collection/helpers/slimmers/string-input-formatter-slimmer.js +5 -2
  93. package/dist/collection/helpers/translation/internal-translation-controller.js +25 -0
  94. package/dist/collection/helpers/translation/locales/en.js +2 -0
  95. package/dist/collection/helpers/translation/tests/internal-translation-controller.test.js +14 -0
  96. package/dist/collection/helpers/ui/element-appender.js +2 -2
  97. package/dist/collection/helpers/validator/test/rules/rich-text-editor-required-rule.test.js +4 -4
  98. package/dist/esm/{app-globals-0aeb2171.js → app-globals-e6203355.js} +5 -5
  99. package/dist/esm/{child-nodes-event-prevent-slimmer-2f5824ee.js → child-nodes-event-prevent-slimmer-aab1c019.js} +1 -1
  100. package/dist/esm/{content-state-2de41bc0.js → content-state-7e9f3421.js} +2 -14
  101. package/dist/esm/{design-token-b195686e.js → design-token-e1b56333.js} +1 -1
  102. package/dist/esm/{element-appender-slimmer-f425d203.js → element-appender-slimmer-9d5d4108.js} +155 -35
  103. package/dist/esm/{form-field-controller-slimmer-d18d01da.js → form-field-controller-slimmer-16f7a11b.js} +2 -2
  104. package/dist/esm/{image-annotation-action-a0dd92ed.js → image-annotation-action-1e675348.js} +1 -1
  105. package/dist/esm/{index-4153fe96.js → index-707fec53.js} +1 -1
  106. package/dist/esm/index.js +8 -8
  107. package/dist/esm/loader.js +7 -7
  108. package/dist/esm/{public-rules-31433f1e.js → public-rules-596db5ba.js} +3 -3
  109. package/dist/esm/{responsive-format-facade-cf37ffd2.js → responsive-format-facade-6e639588.js} +3 -3
  110. package/dist/esm/{rich-text-editor-required-rule-c0f5a754.js → rich-text-editor-required-rule-ef25c4da.js} +1 -1
  111. package/dist/esm/{string-input-formatter-slimmer-99bed828.js → string-input-formatter-slimmer-452c439c.js} +6 -3
  112. package/dist/esm/{style-formatter-c5aec4a3.js → style-formatter-f454626b.js} +1 -1
  113. package/dist/esm/{sub-state-notify-slimmer-e3b2bff5.js → sub-state-notify-slimmer-c7169226.js} +1 -1
  114. package/dist/esm/{sub-state-observer-slimmer-ada3467b.js → sub-state-observer-slimmer-1d3336d6.js} +1 -1
  115. package/dist/esm/{translation-a18bc15e.js → translation-fd7a290a.js} +27 -0
  116. package/dist/esm/{translation-slimmer-a8c20249.js → translation-slimmer-7c37f252.js} +1 -1
  117. package/dist/esm/vega-accordion.entry.js +6 -6
  118. package/dist/esm/vega-app-header-button.entry.js +7 -7
  119. package/dist/esm/vega-banner.entry.js +1 -1
  120. package/dist/esm/vega-box.entry.js +7 -7
  121. package/dist/esm/vega-breadcrumb.entry.js +2 -2
  122. package/dist/esm/vega-button-circle.entry.js +7 -7
  123. package/dist/esm/vega-button-group_2.entry.js +5 -5
  124. package/dist/esm/vega-button-link.entry.js +2 -2
  125. package/dist/esm/vega-button.entry.js +6 -6
  126. package/dist/esm/vega-calendar_3.entry.js +7 -7
  127. package/dist/esm/vega-card.entry.js +6 -6
  128. package/dist/esm/vega-carousel.entry.js +5 -5
  129. package/dist/esm/vega-checkbox_2.entry.js +5 -5
  130. package/dist/esm/vega-chip.entry.js +7 -7
  131. package/dist/esm/vega-color-picker.entry.js +3 -3
  132. package/dist/esm/vega-combo-box.entry.js +5 -5
  133. package/dist/esm/vega-date-picker_2.entry.js +11 -11
  134. package/dist/esm/vega-dialog_2.entry.js +83 -8
  135. package/dist/esm/vega-divider.entry.js +6 -6
  136. package/dist/esm/vega-dropdown_5.entry.js +10 -10
  137. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  138. package/dist/esm/vega-file-uploader.entry.js +4 -4
  139. package/dist/esm/vega-flex.entry.js +7 -7
  140. package/dist/esm/vega-font.entry.js +6 -6
  141. package/dist/esm/vega-form.entry.js +5 -5
  142. package/dist/esm/vega-grid.entry.js +6 -6
  143. package/dist/esm/vega-icon.entry.js +6 -6
  144. package/dist/esm/vega-image-uploader.entry.js +8 -8
  145. package/dist/esm/vega-input-credit-card.entry.js +17 -13
  146. package/dist/esm/vega-input-numeric.entry.js +6 -6
  147. package/dist/esm/vega-input-phone-number.entry.js +5 -5
  148. package/dist/esm/vega-input-range.entry.js +6 -6
  149. package/dist/esm/vega-input-select.entry.js +8 -8
  150. package/dist/esm/vega-input.entry.js +6 -6
  151. package/dist/esm/{vega-internal-event-id-7809368b.js → vega-internal-event-id-d7113cf7.js} +3 -1
  152. package/dist/esm/vega-left-nav_5.entry.js +17 -10
  153. package/dist/esm/vega-loader-wrapper_2.entry.js +5 -5
  154. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
  155. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +18 -10
  156. package/dist/esm/vega-pagination.entry.js +7 -7
  157. package/dist/esm/vega-popover_2.entry.js +6 -6
  158. package/dist/esm/vega-radio_2.entry.js +5 -5
  159. package/dist/esm/vega-rich-text-content.entry.js +5 -5
  160. package/dist/esm/vega-rich-text-editor_4.entry.js +10 -10
  161. package/dist/esm/vega-selection-chip_2.entry.js +9 -9
  162. package/dist/esm/vega-selection-tile_2.entry.js +7 -7
  163. package/dist/esm/vega-sidenav_3.entry.js +7 -7
  164. package/dist/esm/vega-signature-capture.entry.js +8 -8
  165. package/dist/esm/vega-stepper.entry.js +5 -5
  166. package/dist/esm/vega-tab-group_2.entry.js +2 -2
  167. package/dist/esm/vega-table_8.entry.js +9 -9
  168. package/dist/esm/vega-textarea.entry.js +5 -5
  169. package/dist/esm/vega-time-picker_2.entry.js +9 -9
  170. package/dist/esm/vega-toggle-switch.entry.js +3 -3
  171. package/dist/esm/vega-tooltip_2.entry.js +7 -6
  172. package/dist/esm/vega.js +7 -7
  173. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +25 -0
  174. package/dist/types/components/vega-modal/vega-modal.d.ts +10 -0
  175. package/dist/types/components/vega-nav/interface.d.ts +1 -0
  176. package/dist/types/components/vega-nav/vega-left-nav-group/slimmers/renderers/vega-left-nav-group-renderer.d.ts +1 -0
  177. package/dist/types/components/vega-nav/vega-left-nav-group/vega-left-nav-group.d.ts +4 -0
  178. package/dist/types/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-renderer.d.ts +2 -0
  179. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +0 -4
  180. package/dist/types/components/vega-rich-text-editor/test/e2e-utils.d.ts +67 -0
  181. package/dist/types/components/vega-rich-text-editor/test/fixture.d.ts +19 -0
  182. package/dist/types/components.d.ts +10 -0
  183. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +2 -0
  184. package/dist/types/helpers/slimmers/element-appender/element-appender-hierarchy-tree-manager.d.ts +48 -0
  185. package/dist/types/helpers/slimmers/element-appender/element-appender-slimmer.d.ts +2 -0
  186. package/dist/types/helpers/translation/interface.d.ts +7 -0
  187. package/dist/types/helpers/translation/internal-translation-controller.d.ts +10 -1
  188. package/dist/vega/index.esm.js +1 -1
  189. package/dist/vega/p-01d4c679.js +1 -0
  190. package/dist/vega/p-02603c02.js +1 -0
  191. package/dist/vega/{p-0b6adb26.entry.js → p-05b7d047.entry.js} +1 -1
  192. package/dist/vega/p-09279679.entry.js +1 -0
  193. package/dist/vega/{p-30840b1d.entry.js → p-0a30fcaf.entry.js} +1 -1
  194. package/dist/vega/p-0c57091c.entry.js +1 -0
  195. package/dist/vega/{p-18520b0b.entry.js → p-0cb40df0.entry.js} +1 -1
  196. package/dist/vega/{p-9ae0b8bf.entry.js → p-0eedb5a8.entry.js} +1 -1
  197. package/dist/vega/p-11ccc1a9.entry.js +1 -0
  198. package/dist/vega/{p-b129beb6.js → p-12a10bdf.js} +1 -1
  199. package/dist/vega/p-16194709.entry.js +1 -0
  200. package/dist/vega/{p-de2e3383.js → p-179887da.js} +1 -1
  201. package/dist/vega/{p-a607c168.js → p-179c59ff.js} +1 -1
  202. package/dist/vega/{p-2d4e7947.entry.js → p-184f3b15.entry.js} +1 -1
  203. package/dist/vega/{p-8d6b1d3c.entry.js → p-1917b593.entry.js} +2 -2
  204. package/dist/vega/p-19f33816.js +1 -0
  205. package/dist/vega/{p-28244d46.entry.js → p-1d8f86f9.entry.js} +1 -1
  206. package/dist/vega/{p-08c829c6.entry.js → p-21b34b8b.entry.js} +1 -1
  207. package/dist/vega/p-27192960.js +1 -0
  208. package/dist/vega/{p-b5dac03a.entry.js → p-2796fa10.entry.js} +1 -1
  209. package/dist/vega/{p-4230112f.entry.js → p-2aba65ab.entry.js} +1 -1
  210. package/dist/vega/{p-11e1a374.entry.js → p-3291b8f9.entry.js} +1 -1
  211. package/dist/vega/{p-cdaa4c9d.entry.js → p-359e08ea.entry.js} +1 -1
  212. package/dist/vega/{p-d40e55f5.entry.js → p-391d6370.entry.js} +1 -1
  213. package/dist/vega/{p-c6cceae7.entry.js → p-3c236410.entry.js} +1 -1
  214. package/dist/vega/p-40c77aa8.entry.js +1 -0
  215. package/dist/vega/{p-a8f8b1e0.entry.js → p-4a47bc03.entry.js} +1 -1
  216. package/dist/vega/{p-c6c3c0c2.entry.js → p-4e9df296.entry.js} +1 -1
  217. package/dist/vega/{p-9ac32d6b.entry.js → p-4f3cce8d.entry.js} +1 -1
  218. package/dist/vega/{p-c0e8c86f.entry.js → p-54be441e.entry.js} +1 -1
  219. package/dist/vega/{p-28bf1b10.entry.js → p-5558ab9c.entry.js} +1 -1
  220. package/dist/vega/{p-d0c06937.entry.js → p-5dbf9c42.entry.js} +1 -1
  221. package/dist/vega/p-5f377954.js +1 -1
  222. package/dist/vega/{p-4047a36f.js → p-5f5bfd9c.js} +1 -1
  223. package/dist/vega/{p-d009cdaf.entry.js → p-6465cb2d.entry.js} +1 -1
  224. package/dist/vega/p-66c5fa14.js +1 -0
  225. package/dist/vega/{p-b440309d.entry.js → p-758e6e80.entry.js} +1 -1
  226. package/dist/vega/{p-0692350d.entry.js → p-759137be.entry.js} +1 -1
  227. package/dist/vega/p-7644a589.entry.js +1 -0
  228. package/dist/vega/{p-66cd4404.entry.js → p-765469bf.entry.js} +1 -1
  229. package/dist/vega/{p-2383031a.js → p-7f9e7ca2.js} +1 -1
  230. package/dist/vega/{p-a85855b0.entry.js → p-8de75077.entry.js} +1 -1
  231. package/dist/vega/{p-de7db3c6.entry.js → p-8fe6ded4.entry.js} +1 -1
  232. package/dist/vega/{p-0fbb350f.entry.js → p-944fb238.entry.js} +1 -1
  233. package/dist/vega/{p-c2f8e6eb.js → p-99289273.js} +1 -1
  234. package/dist/vega/{p-ec4b5c1c.entry.js → p-a22c9906.entry.js} +1 -1
  235. package/dist/vega/p-a34d2aab.entry.js +1 -0
  236. package/dist/vega/{p-45eba113.entry.js → p-a37f9db6.entry.js} +1 -1
  237. package/dist/vega/p-a53359f4.entry.js +1 -0
  238. package/dist/vega/p-a7abd309.entry.js +1 -0
  239. package/dist/vega/{p-b6143b84.js → p-ad86f6da.js} +1 -1
  240. package/dist/vega/{p-715e2775.entry.js → p-b1bc88d7.entry.js} +1 -1
  241. package/dist/vega/p-c66b55f8.js +1 -0
  242. package/dist/vega/{p-332d2c1a.entry.js → p-c838c746.entry.js} +1 -1
  243. package/dist/vega/{p-ac01f362.entry.js → p-c8f159d9.entry.js} +1 -1
  244. package/dist/vega/{p-5ea5c14b.entry.js → p-ca6ef342.entry.js} +1 -1
  245. package/dist/vega/{p-5c30b476.js → p-cd53bde4.js} +1 -1
  246. package/dist/vega/p-cda9bca2.js +1 -0
  247. package/dist/vega/{p-c52dfbaf.entry.js → p-cdc7d8cf.entry.js} +1 -1
  248. package/dist/vega/{p-90ae575e.js → p-d2e11032.js} +1 -1
  249. package/dist/vega/{p-237dbeef.entry.js → p-d3aa2ea7.entry.js} +1 -1
  250. package/dist/vega/{p-653c77ec.entry.js → p-dd63dbae.entry.js} +1 -1
  251. package/dist/vega/p-e06361df.js +1 -0
  252. package/dist/vega/p-e437c58a.entry.js +1 -0
  253. package/dist/vega/{p-c6be6b2d.entry.js → p-eaa6417d.entry.js} +1 -1
  254. package/dist/vega/{p-dc7b70e9.entry.js → p-eae914b0.entry.js} +1 -1
  255. package/dist/vega/{p-df272c95.entry.js → p-ed569397.entry.js} +1 -1
  256. package/dist/vega/{p-bbbc0126.js → p-f0e9c75e.js} +1 -1
  257. package/dist/vega/{p-7a63a63c.entry.js → p-f4fd6f84.entry.js} +1 -1
  258. package/dist/vega/{p-ba5f6a53.entry.js → p-f8f056db.entry.js} +1 -1
  259. package/dist/vega/{p-24431cf0.entry.js → p-fb48539c.entry.js} +1 -1
  260. package/dist/vega/p-ffca3a50.entry.js +1 -0
  261. package/dist/vega/vega.esm.js +1 -1
  262. package/package.json +1 -1
  263. package/dist/vega/p-0eed617a.js +0 -1
  264. package/dist/vega/p-139f735b.entry.js +0 -1
  265. package/dist/vega/p-166e7211.entry.js +0 -1
  266. package/dist/vega/p-2ade4dd9.js +0 -1
  267. package/dist/vega/p-378feb27.entry.js +0 -1
  268. package/dist/vega/p-40ef693f.entry.js +0 -1
  269. package/dist/vega/p-49604637.entry.js +0 -1
  270. package/dist/vega/p-497c8b0f.entry.js +0 -1
  271. package/dist/vega/p-8876b776.js +0 -1
  272. package/dist/vega/p-9060b003.js +0 -1
  273. package/dist/vega/p-9aa54f7e.entry.js +0 -1
  274. package/dist/vega/p-a49d0f17.entry.js +0 -1
  275. package/dist/vega/p-a66b60c4.js +0 -1
  276. package/dist/vega/p-a685c7da.entry.js +0 -1
  277. package/dist/vega/p-a907df7a.entry.js +0 -1
  278. package/dist/vega/p-ab75d371.js +0 -1
  279. package/dist/vega/p-c3cb20ef.js +0 -1
  280. package/dist/vega/p-d920b18c.js +0 -1
  281. package/dist/vega/p-fa4552a1.entry.js +0 -1
  282. /package/dist/cjs/{feature-flag-controller-ccf4a113.js → feature-flag-controller-075fa683.js} +0 -0
  283. /package/dist/esm/{feature-flag-controller-723f1ff5.js → feature-flag-controller-690eac1d.js} +0 -0
  284. /package/dist/vega/{p-03b8af98.js → p-1e940ce8.js} +0 -0
@@ -6,6 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { h } from '@stencil/core';
8
8
  import { MapToComponentField, VegaSlimmer } from 'vega-slimmer/core';
9
+ import { VegaInternalTranslation } from '../../../../../helpers/translation/internal-translation-controller';
9
10
  export class PageSizeSelectorMobileRenderer extends VegaSlimmer {
10
11
  render() {
11
12
  if (this.type === 'pageSizeSelectorMobile') {
@@ -16,19 +17,27 @@ export class PageSizeSelectorMobileRenderer extends VegaSlimmer {
16
17
  }
17
18
  }
18
19
  renderPageSizeSelectorMobile() {
19
- return (h("vega-flex", { alignItems: "center", justifyContent: "center", gap: "size-4" },
20
- h("vega-font", { variant: "font-field-label", color: "text-primary" }, this.translationSlimmer.t('Show')),
21
- this.pageSizeSelectorMobileDropdownRenderer.render(h("vega-button-link", { label: `${this.pageSize.toString()} items / page` }))));
20
+ const preservedTranslationOutput = VegaInternalTranslation.tWithPreservedBlocks('Show [{0} items / page]', PageSizeSelectorMobileRenderer.clickableReg, this.pageSize);
21
+ return this.renderTranslatedMessage(preservedTranslationOutput);
22
22
  }
23
23
  renderPageSizeSelectorMobileAndCurrentPageLabel() {
24
24
  const rangeFrom = this.total > 0 ? this.pageSize * (this.current - 1) + 1 : 0;
25
25
  const rangeTo = Math.min(this.current * this.pageSize, this.total);
26
- return (h("vega-flex", { alignItems: "center", justifyContent: "center", gap: "size-4" },
27
- h("vega-font", { variant: "font-field-label", color: "text-primary" }, this.translationSlimmer.t('Viewing')),
28
- this.pageSizeSelectorMobileDropdownRenderer.render(h("vega-button-link", { label: this.translationSlimmer.t(`${rangeFrom}-${rangeTo}`) })),
29
- h("vega-font", { variant: "font-field-label", color: "text-primary" }, this.translationSlimmer.t(`of ${this.total}`))));
26
+ const preservedTranslationOutput = VegaInternalTranslation.tWithPreservedBlocks('Viewing [{0}-{1}] of {2}', PageSizeSelectorMobileRenderer.clickableReg, rangeFrom, rangeTo, this.total);
27
+ return this.renderTranslatedMessage(preservedTranslationOutput);
28
+ }
29
+ renderTranslatedMessage(preservedTranslationOutput) {
30
+ return (h("vega-flex", { alignItems: "center", justifyContent: "center", gap: "size-4" }, preservedTranslationOutput.map((outPut) => {
31
+ if (outPut.isPreserved) {
32
+ return this.pageSizeSelectorMobileDropdownRenderer.render(h("vega-button-link", { label: outPut.content }));
33
+ }
34
+ else {
35
+ return (h("vega-font", { variant: "font-field-label", color: "text-primary" }, outPut.content));
36
+ }
37
+ })));
30
38
  }
31
39
  }
40
+ PageSizeSelectorMobileRenderer.clickableReg = /(\[[^\]]*\])/g;
32
41
  __decorate([
33
42
  MapToComponentField()
34
43
  ], PageSizeSelectorMobileRenderer.prototype, "translationSlimmer", void 0);
@@ -44,8 +44,7 @@ export class RTEListBlock extends RTEBlock {
44
44
  * @inheritDoc
45
45
  */
46
46
  isNotEmpty() {
47
- return (this.blocks.length > 0 &&
48
- this.blocks.some((listItemBlock) => listItemBlock.isNotEmpty()));
47
+ return this.blocks.length > 0;
49
48
  }
50
49
  /**
51
50
  * @inheritDoc
@@ -71,17 +71,6 @@ export class RTEListItemBlock extends RTETextBlock {
71
71
  block.apply(new AppendChildNodesAction(nodes));
72
72
  return block;
73
73
  }
74
- /**
75
- * @inheritDoc
76
- */
77
- isNotEmpty() {
78
- if (this.children) {
79
- return super.isNotEmpty() || this.children.some((block) => block.isNotEmpty());
80
- }
81
- else {
82
- return super.isNotEmpty();
83
- }
84
- }
85
74
  /**
86
75
  * @inheritDoc
87
76
  */
@@ -80,7 +80,7 @@ describe('bullet list', () => {
80
80
  });
81
81
  expect(bulletListBlock.isNotEmpty()).toEqual(true);
82
82
  bulletListBlock.blocks[0].nodes[0].text = '';
83
- expect(bulletListBlock.isNotEmpty()).toEqual(false);
83
+ expect(bulletListBlock.isNotEmpty()).toEqual(true);
84
84
  const childrenListBlock = RTEListBlock.from({
85
85
  id: '1-1-2',
86
86
  type: 'bullet-list',
@@ -101,7 +101,7 @@ describe('bullet list', () => {
101
101
  bulletListBlock.blocks[0].children = [childrenListBlock];
102
102
  expect(bulletListBlock.isNotEmpty()).toEqual(true);
103
103
  childrenListBlock.blocks[0].nodes[0].text = '';
104
- expect(bulletListBlock.isNotEmpty()).toEqual(false);
104
+ expect(bulletListBlock.isNotEmpty()).toEqual(true);
105
105
  });
106
106
  });
107
107
  describe('number list', () => {
@@ -125,7 +125,7 @@ describe('number list', () => {
125
125
  });
126
126
  expect(listBlock.isNotEmpty()).toEqual(true);
127
127
  listBlock.blocks[0].nodes[0].text = '';
128
- expect(listBlock.isNotEmpty()).toEqual(false);
128
+ expect(listBlock.isNotEmpty()).toEqual(true);
129
129
  const childrenListBlock = RTEListBlock.from({
130
130
  id: '1-1-2',
131
131
  type: 'number-list',
@@ -146,7 +146,7 @@ describe('number list', () => {
146
146
  listBlock.blocks[0].children = [childrenListBlock];
147
147
  expect(listBlock.isNotEmpty()).toEqual(true);
148
148
  childrenListBlock.blocks[0].nodes[0].text = '';
149
- expect(listBlock.isNotEmpty()).toEqual(false);
149
+ expect(listBlock.isNotEmpty()).toEqual(true);
150
150
  });
151
151
  it('getLastNode should work as expect', () => {
152
152
  const listBlock = RTEListBlock.from({
@@ -0,0 +1,177 @@
1
+ /* This file is the e2e test method of RTE*/
2
+ import { find } from '../../../utils/e2e-utils';
3
+ import { toolbarItems } from './fixture';
4
+ /**
5
+ * set RTE toolbarItem
6
+ *
7
+ *@param {E2EPage} page - E2EPage
8
+ */
9
+ export const setToolbarItems = async (page) => {
10
+ const vegaRichTextEditor = await page.find('vega-rich-text-editor');
11
+ vegaRichTextEditor.setProperty('toolbarItems', toolbarItems);
12
+ await page.waitForChanges();
13
+ };
14
+ /**
15
+ * focus On RTE Content
16
+ *
17
+ * @param {E2EPage} page - E2EPage
18
+ */
19
+ export const focusOnContent = async (page) => {
20
+ const content = await page.find('vega-rich-text-editor >>> vega-rich-text-content');
21
+ await content.click();
22
+ };
23
+ /**
24
+ * click RTE Bold Button
25
+ *
26
+ * @param {E2EPage} page - E2EPage
27
+ */
28
+ export const clickBoldButton = async (page) => {
29
+ const boldButton = await find(page, 'vega-rich-text-editor >>> .toolbar-btn-group:nth-of-type(3) vega-rich-text-editor-toolbar-button >>> button');
30
+ await boldButton.click();
31
+ await page.waitForChanges();
32
+ };
33
+ /**
34
+ * change RTE list style
35
+ *
36
+ * @param {E2EPage} page - E2EPage
37
+ * @param {string} style - the list style
38
+ */
39
+ export const changeListStyle = async (page, style = 'number') => {
40
+ const listBtn = await find(page, 'vega-rich-text-editor >>> .toolbar-btn-group:nth-of-type(5) > vega-popover:nth-of-type(2) vega-rich-text-editor-toolbar-button >>> button');
41
+ await listBtn.click();
42
+ await page.waitForChanges();
43
+ if (style != 'number') {
44
+ const bulletsBtn = await find(page, 'vega-popover-content-box div:nth-of-type(1) vega-rich-text-editor-toolbar-button >>> button');
45
+ await bulletsBtn.click();
46
+ }
47
+ else {
48
+ const numberBtn = await find(page, 'vega-popover-content-box div:nth-of-type(2) vega-rich-text-editor-toolbar-button >>> button');
49
+ await numberBtn.click();
50
+ }
51
+ };
52
+ /**
53
+ * change RTE align style
54
+ *
55
+ * @param {E2EPage} page - E2EPage
56
+ * @param {string} style - the align style
57
+ */
58
+ export const changeAlignStyle = async (page, style) => {
59
+ const alignBtn = await find(page, 'vega-rich-text-editor >>> .toolbar-btn-group:nth-of-type(5) > vega-popover:nth-of-type(1) vega-rich-text-editor-toolbar-button >>> button');
60
+ await alignBtn.click();
61
+ await page.waitForChanges();
62
+ switch (style) {
63
+ case 'left':
64
+ await (await find(page, 'vega-popover-content-box div:nth-of-type(1) vega-rich-text-editor-toolbar-button >>> button')).click();
65
+ break;
66
+ case 'center': {
67
+ const centerAlignBtn = await find(page, 'vega-popover-content-box div:nth-of-type(2) vega-rich-text-editor-toolbar-button >>> button');
68
+ await centerAlignBtn.click();
69
+ break;
70
+ }
71
+ case 'right': {
72
+ const rightAlignBtn = await page.find('vega-popover-content-box div:nth-of-type(3) vega-rich-text-editor-toolbar-button >>> button');
73
+ await rightAlignBtn.click();
74
+ break;
75
+ }
76
+ case 'justified':
77
+ await (await find(page, 'vega-popover-content-box div:nth-of-type(4) vega-rich-text-editor-toolbar-button >>> button')).click();
78
+ break;
79
+ }
80
+ };
81
+ /**
82
+ * change RTE Indent style
83
+ *
84
+ * @param {E2EPage} page - E2EPage
85
+ * @param {string} style - the align type
86
+ */
87
+ export const changeIndent = async (page, style) => {
88
+ switch (style) {
89
+ case 'more': {
90
+ const moreButton = await find(page, 'vega-rich-text-editor >>> .toolbar-btn-group:nth-of-type(6) vega-tooltip:nth-of-type(1) vega-rich-text-editor-toolbar-button >>> button');
91
+ await moreButton.click();
92
+ break;
93
+ }
94
+ case 'less': {
95
+ const lessButton = await find(page, 'vega-rich-text-editor >>> .toolbar-btn-group:nth-of-type(6) vega-tooltip:nth-of-type(2) vega-rich-text-editor-toolbar-button >>> button');
96
+ await lessButton.click();
97
+ break;
98
+ }
99
+ }
100
+ };
101
+ /**
102
+ * click RTE clear style
103
+ *
104
+ * @param {E2EPage} page - E2EPage
105
+ */
106
+ export const clickClearBtn = async (page) => {
107
+ const clearStyleButton = await find(page, 'vega-rich-text-editor >>> vega-rich-text-editor-toolbar-button >>> button');
108
+ await clearStyleButton.click();
109
+ };
110
+ /**
111
+ * set RTE link
112
+ *
113
+ * @param {E2EPage} page - E2EPage
114
+ * @param {string} url - the link url
115
+ * @param {string} text - the link text
116
+ */
117
+ export const setLink = async (page, url = 'https://www.test.com', text = 'test') => {
118
+ const linkBtn = await find(page, 'vega-rich-text-editor >>> vega-rich-text-editor-toolbar-button >>> button');
119
+ await linkBtn.click();
120
+ await page.waitForChanges();
121
+ const urlContainer = await page.find('vega-popover-content-box vega-input:nth-of-type(1)');
122
+ const urlInputContainer = await page.find('vega-popover-content-box vega-input:nth-of-type(2) >>> input');
123
+ urlContainer.setProperty('value', url);
124
+ await page.waitForChanges();
125
+ await urlInputContainer.click();
126
+ await page.waitForChanges();
127
+ await page.keyboard.type(text);
128
+ await page.waitForChanges();
129
+ await page.keyboard.press('Enter');
130
+ await page.waitForChanges();
131
+ };
132
+ /**
133
+ * change RTE Indent style
134
+ *
135
+ * @param {E2EPage} page - E2EPage
136
+ * @param {string} behavior - the image behavior
137
+ * @param {object} config - the image parameters
138
+ * @param {string} config.size - the image size
139
+ * @param {string} config.text - the image text
140
+ */
141
+ export const controlImage = async (page, behavior, config) => {
142
+ const imageElement = await find(page, 'vega-rich-text-editor >>> vega-rich-text-content >>> vega-rich-text-image-editor img');
143
+ await page.waitForChanges();
144
+ await imageElement.click();
145
+ switch (behavior) {
146
+ case 'size':
147
+ if (config.size == 'large') {
148
+ const largeButton = await find(page, 'vega-popover-content-box vega-segment-control >>> button:nth-of-type(3)');
149
+ await largeButton.click();
150
+ }
151
+ else if (config.size == 'small') {
152
+ const smallerButton = await find(page, 'vega-popover-content-box vega-segment-control >>> button');
153
+ await smallerButton.click();
154
+ }
155
+ else {
156
+ const mediumButton = await find(page, 'vega-popover-content-box vega-segment-control >>> button:nth-of-type(2)');
157
+ await mediumButton.click();
158
+ }
159
+ break;
160
+ case 'text':
161
+ if (config.text) {
162
+ const alterButton = await find(page, 'vega-popover-content-box vega-button-group-item:nth-of-type(1) >>> vega-button-link >>> a');
163
+ await alterButton.click();
164
+ await page.waitForChanges();
165
+ await page.keyboard.type(config.text);
166
+ await page.waitForChanges();
167
+ await page.keyboard.press('Enter');
168
+ await page.waitForChanges();
169
+ }
170
+ break;
171
+ case 'delete': {
172
+ const deleteButton = await find(page, 'vega-popover-content-box vega-button-group-item:nth-of-type(2) >>> vega-button-link >>> a');
173
+ await deleteButton.click();
174
+ break;
175
+ }
176
+ }
177
+ };
@@ -0,0 +1,257 @@
1
+ /* This file is the constant values of RTE test data */
2
+ export const titleBlock = {
3
+ id: '11',
4
+ type: 'title',
5
+ nodes: [
6
+ {
7
+ id: '111',
8
+ type: 'text',
9
+ text: 'This is a title1.',
10
+ annotations: {
11
+ link: {
12
+ href: 'https://heartland.us',
13
+ groupKey: 'test1',
14
+ },
15
+ },
16
+ },
17
+ {
18
+ id: '111-1',
19
+ type: 'text',
20
+ text: 'This is a title2.This is a title3.',
21
+ },
22
+ ],
23
+ annotations: {
24
+ indent: 0,
25
+ textAlign: 'left',
26
+ },
27
+ };
28
+ export const SubtitleBlock = {
29
+ id: '12',
30
+ type: 'subtitle',
31
+ nodes: [
32
+ {
33
+ id: '112',
34
+ type: 'text',
35
+ text: 'This is a subtitle.',
36
+ },
37
+ ],
38
+ annotations: {
39
+ indent: 0,
40
+ textAlign: 'right',
41
+ },
42
+ };
43
+ export const SubtitleBlock1 = {
44
+ id: '12-1',
45
+ type: 'subtitle',
46
+ nodes: [
47
+ {
48
+ id: '112-1',
49
+ type: 'text',
50
+ text: 'This is a subtitle.',
51
+ annotations: {
52
+ link: {
53
+ href: 'https://gethired.atlassian.net/browse/VD-4819',
54
+ groupKey: 'test11',
55
+ },
56
+ },
57
+ },
58
+ ],
59
+ annotations: {
60
+ indent: 0,
61
+ textAlign: 'right',
62
+ },
63
+ };
64
+ export const ParagraphBlock = {
65
+ id: '13',
66
+ type: 'paragraph',
67
+ nodes: [
68
+ {
69
+ id: '113',
70
+ type: 'text',
71
+ text: 'This is a ParagraphBlock.',
72
+ annotations: {
73
+ textColor: 'green',
74
+ link: {
75
+ href: 'https://gethired.atlassian.net/browse/VD-4819',
76
+ groupKey: 'test11',
77
+ },
78
+ },
79
+ },
80
+ {
81
+ id: '113-1',
82
+ type: 'text',
83
+ text: 'This is a ParagraphBlock.',
84
+ annotations: { bold: true, italic: true, underline: true, strikethrough: true },
85
+ },
86
+ ],
87
+ annotations: {
88
+ indent: 0,
89
+ textAlign: 'center',
90
+ },
91
+ };
92
+ export const shortBlock = {
93
+ id: '13',
94
+ type: 'paragraph',
95
+ nodes: [
96
+ {
97
+ id: '113',
98
+ type: 'text',
99
+ text: 'paragraph',
100
+ },
101
+ ],
102
+ annotations: {
103
+ indent: 0,
104
+ textAlign: 'right',
105
+ },
106
+ };
107
+ export const HeadingBlock = {
108
+ id: '14',
109
+ type: 'heading-1',
110
+ nodes: [
111
+ {
112
+ id: '114',
113
+ type: 'text',
114
+ text: 'This is a HeadingBlock-1.',
115
+ annotations: {
116
+ link: {
117
+ href: 'https://gethired.atlassian.net/browse/VD-4819',
118
+ groupKey: 'test11',
119
+ },
120
+ },
121
+ },
122
+ ],
123
+ annotations: {
124
+ indent: 0,
125
+ textAlign: 'justify',
126
+ },
127
+ };
128
+ export const HeadingBlock2 = {
129
+ id: '14-2',
130
+ type: 'heading-2',
131
+ nodes: [
132
+ {
133
+ id: '114-3',
134
+ type: 'text',
135
+ text: 'This is a HeadingBlock-2.',
136
+ annotations: {
137
+ textColor: 'teal',
138
+ },
139
+ },
140
+ ],
141
+ annotations: {
142
+ indent: 0,
143
+ textAlign: 'justify',
144
+ },
145
+ };
146
+ export const HeadingBlock3 = {
147
+ id: '14-3',
148
+ type: 'heading-3',
149
+ nodes: [
150
+ {
151
+ id: '114-3',
152
+ type: 'text',
153
+ text: 'This is a HeadingBlock-3.',
154
+ annotations: {
155
+ textColor: 'purple',
156
+ },
157
+ },
158
+ ],
159
+ annotations: {
160
+ indent: 0,
161
+ textAlign: 'justify',
162
+ },
163
+ };
164
+ export const listItem1 = {
165
+ id: '14',
166
+ type: 'list-item',
167
+ nodes: [
168
+ {
169
+ id: '111',
170
+ type: 'text',
171
+ text: 'This is a list 1.',
172
+ annotations: {
173
+ link: {
174
+ href: 'https://heartland.us',
175
+ groupKey: 'test1',
176
+ },
177
+ },
178
+ },
179
+ {
180
+ id: '111',
181
+ type: 'text',
182
+ text: 'This is a list 2.',
183
+ },
184
+ ],
185
+ };
186
+ export const listItem2 = {
187
+ id: '14',
188
+ type: 'list-item',
189
+ nodes: [
190
+ {
191
+ id: '111',
192
+ type: 'text',
193
+ text: 'This is a list 2.',
194
+ annotations: {
195
+ textColor: 'green',
196
+ },
197
+ },
198
+ ],
199
+ };
200
+ export const listItem3 = {
201
+ id: '14',
202
+ type: 'list-item',
203
+ nodes: [
204
+ {
205
+ id: '111',
206
+ type: 'text',
207
+ text: 'This is a list 3.',
208
+ },
209
+ ],
210
+ };
211
+ export const numberList = {
212
+ id: '14',
213
+ type: 'number-list',
214
+ blocks: [listItem1, listItem2, listItem3],
215
+ annotations: {
216
+ indent: 1,
217
+ },
218
+ };
219
+ export const bulletList = {
220
+ id: '14',
221
+ type: 'bullet-list',
222
+ blocks: [listItem1, listItem2, listItem3],
223
+ };
224
+ export const listBlock = [bulletList, numberList];
225
+ export const simpleBlock = [titleBlock, SubtitleBlock, shortBlock, HeadingBlock];
226
+ export const ImageBlock = {
227
+ id: '14',
228
+ type: 'image',
229
+ nodes: [
230
+ {
231
+ id: '14',
232
+ type: 'image',
233
+ // eslint-disable-next-line spellcheck/spell-checker
234
+ url: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQ4IDI0QzQ4IDM3LjI1NDggMzcuMjU0OCA0OCAyNCA0OEMxMC43NDUyIDQ4IDAgMzcuMjU0OCAwIDI0QzAgMTAuNzQ1MiAxMC43NDUyIDAgMjQgMEMzNy4yNTQ4IDAgNDggMTAuNzQ1MiA0OCAyNFpNMTYuMDAxIDEzLjkxMjVWMzQuNzgyMkgxOS44OTY2VjI1LjY2OUgyNy42ODhWMzQuNzgyMkgzMS41ODM2VjEzLjkxMjVIMjcuNjg4VjIxLjcwMzhIMTkuODk2NlYxMy45MTI1SDE2LjAwMVoiIGZpbGw9IiM1OTYwNjMiLz48L3N2Zz4=',
235
+ },
236
+ ],
237
+ };
238
+ export const wholeBlock = [
239
+ titleBlock,
240
+ SubtitleBlock,
241
+ SubtitleBlock1,
242
+ ParagraphBlock,
243
+ HeadingBlock,
244
+ HeadingBlock2,
245
+ HeadingBlock3,
246
+ ImageBlock,
247
+ ];
248
+ export const toolbarItems = [
249
+ ['clearStyle'],
250
+ ['textStyles'],
251
+ ['bold', 'italic', 'underline', 'strikethrough', 'code'],
252
+ ['textColor'],
253
+ ['horizontalAlignment', 'bulletsNumbers'],
254
+ ['moreIndent', 'lessIndent'],
255
+ ['link'],
256
+ ['image'],
257
+ ];
@@ -43,3 +43,5 @@ export const VegaInternalPopoverUpdateTarget = new VegaInternalEventID('popoverU
43
43
  export const VegaInternalRichTextEditDeleteSelectedNodes = new VegaInternalEventID('richTextEditDeleteSelectedNodes');
44
44
  export const VegaInternalPaginationPageSizeChange = new VegaInternalEventID('paginationPageSizeChange');
45
45
  export const VegaInternalPaginationCurrentChange = new VegaInternalEventID('paginationCurrentChange');
46
+ export const VegaInternalPasteEvent = new VegaInternalEventID('pasteEvent');
47
+ export const VegaInternalNestEAHierarchyTreeChange = new VegaInternalEventID('nestEAHierarchyTreeChange');
@@ -0,0 +1,108 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { MapToComponentField, MapToComponentMethod, VegaSlimmer } from 'vega-slimmer/core';
8
+ import ChangeManager from '../../change-manager/change-manager';
9
+ import domNodeSubjectFactory from '../../change-manager/subject/dom-node-subject/dom-node-subject-factory';
10
+ import { findParent } from '../../../utils/ui';
11
+ import { VegaInternalNestEAHierarchyTreeChange } from '../../event-manager/event-id/vega-internal-event-id';
12
+ import { DomNodeSubjectObserverFactory } from '../../change-manager/subject/dom-node-subject/dom-node-subject-observer-factory';
13
+ var NestEANotifyType;
14
+ (function (NestEANotifyType) {
15
+ NestEANotifyType["SHOW"] = "show";
16
+ NestEANotifyType["HIDE"] = "hide";
17
+ })(NestEANotifyType || (NestEANotifyType = {}));
18
+ /**
19
+ * Dynamically add parents and children of nest element appender while it show or hide.
20
+ */
21
+ export class ElementAppenderHierarchyTreeManager extends VegaSlimmer {
22
+ constructor(currentEA) {
23
+ super();
24
+ this.childrenEA = [];
25
+ this.currentEA = currentEA;
26
+ }
27
+ /**
28
+ * Listen current element appender did load.
29
+ */
30
+ componentDidLoad() {
31
+ this.register();
32
+ }
33
+ /**
34
+ * Listen current element appender show.
35
+ */
36
+ onShow() {
37
+ this.notify(NestEANotifyType.SHOW);
38
+ }
39
+ /**
40
+ * Listen current element appender hide.
41
+ */
42
+ onHide() {
43
+ this.notify(NestEANotifyType.HIDE);
44
+ }
45
+ /**
46
+ * Get current parent of element appender.
47
+ *
48
+ * @returns {Nullable<ElementAppenderSlimmer>} - parent.
49
+ */
50
+ getParent() {
51
+ return this.parentEA;
52
+ }
53
+ /**
54
+ * Get current children of element appender.
55
+ *
56
+ * @returns {ElementAppenderSlimmer[]} - children.
57
+ */
58
+ getChildren() {
59
+ return this.childrenEA;
60
+ }
61
+ /**
62
+ * While current element appender show or hide we should notify nest element appender to add or remove chain.
63
+ *
64
+ * @param {NestEANotifyType} type - Notify type.
65
+ */
66
+ notify(type) {
67
+ const parent = findParent(this.showConfig.target, '.vega-element-appender-appendable');
68
+ if (parent) {
69
+ ChangeManager.notify(domNodeSubjectFactory.getSubject(parent, VegaInternalNestEAHierarchyTreeChange), {
70
+ type: type,
71
+ child: this.currentEA,
72
+ callback:
73
+ /* eslint-disable jsdoc/require-jsdoc */
74
+ (parentEASlimmer) => {
75
+ this.parentEA = parentEASlimmer;
76
+ },
77
+ });
78
+ }
79
+ }
80
+ /**
81
+ * Add a change manager to observer the nest element appender show or hide.
82
+ */
83
+ register() {
84
+ if (this.showConfig) {
85
+ DomNodeSubjectObserverFactory.addUniqueObserverToNode(this.showConfig.appendableElement, VegaInternalNestEAHierarchyTreeChange, (payload) => {
86
+ if (payload.type === NestEANotifyType.SHOW) {
87
+ this.childrenEA.push(payload.child);
88
+ }
89
+ else if (payload.type === NestEANotifyType.HIDE) {
90
+ this.childrenEA = this.childrenEA.filter((child) => child !== payload.child);
91
+ }
92
+ payload.callback(this.currentEA);
93
+ });
94
+ }
95
+ }
96
+ }
97
+ __decorate([
98
+ MapToComponentField()
99
+ ], ElementAppenderHierarchyTreeManager.prototype, "showConfig", void 0);
100
+ __decorate([
101
+ MapToComponentMethod('componentDidLoad')
102
+ ], ElementAppenderHierarchyTreeManager.prototype, "componentDidLoad", null);
103
+ __decorate([
104
+ MapToComponentMethod('show')
105
+ ], ElementAppenderHierarchyTreeManager.prototype, "onShow", null);
106
+ __decorate([
107
+ MapToComponentMethod('hide')
108
+ ], ElementAppenderHierarchyTreeManager.prototype, "onHide", null);