@heartlandone/vega 2.68.1 → 2.69.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 (235) hide show
  1. package/dist/cjs/{app-globals-f7106a22.js → app-globals-2dfd2b65.js} +3 -3
  2. package/dist/cjs/{design-token-e14a4e66.js → design-token-bab85370.js} +1 -1
  3. package/dist/cjs/{element-appender-slimmer-7ee27ab3.js → element-appender-slimmer-2b4eccdc.js} +2 -2
  4. package/dist/cjs/{form-field-controller-slimmer-2a091912.js → form-field-controller-slimmer-f865d397.js} +1 -1
  5. package/dist/cjs/{function-extension-f0e845f2.js → function-extension-7c4f55ab.js} +9 -6
  6. package/dist/cjs/index.cjs.js +5 -5
  7. package/dist/cjs/{language-extension-d0103d1a.js → language-extension-9f771818.js} +1 -1
  8. package/dist/cjs/loader.cjs.js +5 -5
  9. package/dist/cjs/{responsive-format-facade-347db035.js → responsive-format-facade-d673f4bd.js} +2 -2
  10. package/dist/cjs/{style-formatter-0a09f0dd.js → style-formatter-72a8b6ac.js} +1 -1
  11. package/dist/cjs/{translation-f5adcb9f.js → translation-5f9f9c0c.js} +2 -0
  12. package/dist/cjs/{translation-slimmer-4b6239d1.js → translation-slimmer-f0ebe710.js} +1 -1
  13. package/dist/cjs/vega-accordion.cjs.entry.js +4 -4
  14. package/dist/cjs/vega-app-header-button.cjs.entry.js +4 -4
  15. package/dist/cjs/vega-box.cjs.entry.js +5 -5
  16. package/dist/cjs/vega-button-circle.cjs.entry.js +4 -4
  17. package/dist/cjs/vega-button.cjs.entry.js +3 -3
  18. package/dist/cjs/vega-calendar_4.cjs.entry.js +2 -2
  19. package/dist/cjs/vega-card.cjs.entry.js +4 -4
  20. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  21. package/dist/cjs/vega-checkbox_2.cjs.entry.js +2 -2
  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-color-picker.cjs.entry.js +2 -2
  25. package/dist/cjs/vega-combo-box.cjs.entry.js +2 -2
  26. package/dist/cjs/vega-date-picker_2.cjs.entry.js +6 -6
  27. package/dist/cjs/vega-dialog_2.cjs.entry.js +4 -4
  28. package/dist/cjs/vega-divider.cjs.entry.js +4 -4
  29. package/dist/cjs/vega-dropdown_5.cjs.entry.js +15 -6
  30. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  31. package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
  32. package/dist/cjs/vega-flag-icon.cjs.entry.js +4 -4
  33. package/dist/cjs/vega-flex.cjs.entry.js +5 -5
  34. package/dist/cjs/vega-font.cjs.entry.js +4 -4
  35. package/dist/cjs/vega-form.cjs.entry.js +2 -2
  36. package/dist/cjs/vega-grid.cjs.entry.js +4 -4
  37. package/dist/cjs/vega-icon.cjs.entry.js +4 -4
  38. package/dist/cjs/vega-image-uploader.cjs.entry.js +5 -5
  39. package/dist/cjs/vega-input-credit-card.cjs.entry.js +2 -2
  40. package/dist/cjs/vega-input-numeric.cjs.entry.js +2 -2
  41. package/dist/cjs/vega-input-passcode.cjs.entry.js +2 -2
  42. package/dist/cjs/vega-input-phone-number.cjs.entry.js +3 -3
  43. package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
  44. package/dist/cjs/vega-input-select.cjs.entry.js +139 -13
  45. package/dist/cjs/vega-input.cjs.entry.js +89 -29
  46. package/dist/cjs/vega-left-nav_5.cjs.entry.js +4 -4
  47. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  48. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
  49. package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
  50. package/dist/cjs/vega-popover_2.cjs.entry.js +5 -5
  51. package/dist/cjs/vega-radio_2.cjs.entry.js +2 -2
  52. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +3 -3
  53. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -4
  54. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
  55. package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
  56. package/dist/cjs/vega-signature-capture.cjs.entry.js +8 -6
  57. package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
  58. package/dist/cjs/vega-tab-group_2.cjs.entry.js +1 -1
  59. package/dist/cjs/vega-table_11.cjs.entry.js +4 -4
  60. package/dist/cjs/vega-textarea.cjs.entry.js +3 -3
  61. package/dist/cjs/vega-time-picker_2.cjs.entry.js +6 -6
  62. package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
  63. package/dist/cjs/vega-tooltip_2.cjs.entry.js +4 -4
  64. package/dist/cjs/vega.cjs.js +5 -5
  65. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-selected-controller.js +4 -1
  66. package/dist/collection/components/vega-dropdown/vega-dropdown.js +27 -0
  67. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-password-eye-renderer.js +41 -0
  68. package/dist/collection/components/vega-input/vega-input.css +13 -0
  69. package/dist/collection/components/vega-input/vega-input.js +21 -3
  70. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.js +4 -0
  71. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-value-controller.js +18 -4
  72. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +17 -3
  73. package/dist/collection/components/vega-input-select/vega-input-select.js +14 -1
  74. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.js +9 -6
  75. package/dist/collection/components/vega-signature-capture/slimmers/written-mode/controllers/written-mode-svg-controller.js +1 -0
  76. package/dist/collection/components/vega-signature-capture/slimmers/written-mode/renderers/written-mode-renderer.js +1 -0
  77. package/dist/collection/components/vega-tab-group/vega-tab-group.js +2 -2
  78. package/dist/collection/components/vega-textarea/vega-textarea.js +2 -2
  79. package/dist/collection/global/icons/eye-slash.js +3 -0
  80. package/dist/collection/global/icons/eye.js +3 -0
  81. package/dist/collection/helpers/translation/locales/en.js +2 -0
  82. package/dist/collection/helpers/translation/tests/internal-translation-controller.test.js +2 -0
  83. package/dist/collection/helpers/validator/rules/input-select-value-in-source-rule.js +85 -0
  84. package/dist/collection/helpers/validator/test/rules/input-select-value-in-source-rule.test.js +99 -0
  85. package/dist/esm/{app-globals-2f689986.js → app-globals-92d24d99.js} +3 -3
  86. package/dist/esm/{design-token-e9e6b011.js → design-token-64e09c2a.js} +1 -1
  87. package/dist/esm/{element-appender-slimmer-8dbc8387.js → element-appender-slimmer-5c85b48f.js} +2 -2
  88. package/dist/esm/{form-field-controller-slimmer-b23d9ff3.js → form-field-controller-slimmer-bf071b75.js} +1 -1
  89. package/dist/esm/{function-extension-eb1d062f.js → function-extension-7ce27a8e.js} +9 -6
  90. package/dist/esm/index.js +5 -5
  91. package/dist/esm/{language-extension-3331131f.js → language-extension-44413556.js} +1 -1
  92. package/dist/esm/loader.js +5 -5
  93. package/dist/esm/{responsive-format-facade-b0712993.js → responsive-format-facade-f88850c5.js} +2 -2
  94. package/dist/esm/{style-formatter-a20a1ef4.js → style-formatter-7dd2c026.js} +1 -1
  95. package/dist/esm/{translation-f10b1e19.js → translation-96e5debd.js} +2 -0
  96. package/dist/esm/{translation-slimmer-984c9ce6.js → translation-slimmer-c936cb1b.js} +1 -1
  97. package/dist/esm/vega-accordion.entry.js +4 -4
  98. package/dist/esm/vega-app-header-button.entry.js +4 -4
  99. package/dist/esm/vega-box.entry.js +5 -5
  100. package/dist/esm/vega-button-circle.entry.js +4 -4
  101. package/dist/esm/vega-button.entry.js +3 -3
  102. package/dist/esm/vega-calendar_4.entry.js +2 -2
  103. package/dist/esm/vega-card.entry.js +4 -4
  104. package/dist/esm/vega-carousel.entry.js +3 -3
  105. package/dist/esm/vega-checkbox_2.entry.js +2 -2
  106. package/dist/esm/vega-chip.entry.js +4 -4
  107. package/dist/esm/vega-code-block.entry.js +2 -2
  108. package/dist/esm/vega-color-picker.entry.js +2 -2
  109. package/dist/esm/vega-combo-box.entry.js +2 -2
  110. package/dist/esm/vega-date-picker_2.entry.js +6 -6
  111. package/dist/esm/vega-dialog_2.entry.js +4 -4
  112. package/dist/esm/vega-divider.entry.js +4 -4
  113. package/dist/esm/vega-dropdown_5.entry.js +15 -6
  114. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  115. package/dist/esm/vega-file-uploader.entry.js +3 -3
  116. package/dist/esm/vega-flag-icon.entry.js +4 -4
  117. package/dist/esm/vega-flex.entry.js +5 -5
  118. package/dist/esm/vega-font.entry.js +4 -4
  119. package/dist/esm/vega-form.entry.js +2 -2
  120. package/dist/esm/vega-grid.entry.js +4 -4
  121. package/dist/esm/vega-icon.entry.js +4 -4
  122. package/dist/esm/vega-image-uploader.entry.js +5 -5
  123. package/dist/esm/vega-input-credit-card.entry.js +2 -2
  124. package/dist/esm/vega-input-numeric.entry.js +2 -2
  125. package/dist/esm/vega-input-passcode.entry.js +2 -2
  126. package/dist/esm/vega-input-phone-number.entry.js +3 -3
  127. package/dist/esm/vega-input-range.entry.js +3 -3
  128. package/dist/esm/vega-input-select.entry.js +139 -13
  129. package/dist/esm/vega-input.entry.js +90 -30
  130. package/dist/esm/vega-left-nav_5.entry.js +4 -4
  131. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  132. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
  133. package/dist/esm/vega-pagination.entry.js +4 -4
  134. package/dist/esm/vega-popover_2.entry.js +5 -5
  135. package/dist/esm/vega-radio_2.entry.js +2 -2
  136. package/dist/esm/vega-rich-text-editor_4.entry.js +3 -3
  137. package/dist/esm/vega-selection-chip_2.entry.js +4 -4
  138. package/dist/esm/vega-selection-tile_2.entry.js +2 -2
  139. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  140. package/dist/esm/vega-signature-capture.entry.js +8 -6
  141. package/dist/esm/vega-stepper.entry.js +2 -2
  142. package/dist/esm/vega-tab-group_2.entry.js +1 -1
  143. package/dist/esm/vega-table_11.entry.js +4 -4
  144. package/dist/esm/vega-textarea.entry.js +3 -3
  145. package/dist/esm/vega-time-picker_2.entry.js +6 -6
  146. package/dist/esm/vega-toggle-switch.entry.js +2 -2
  147. package/dist/esm/vega-tooltip_2.entry.js +4 -4
  148. package/dist/esm/vega.js +5 -5
  149. package/dist/sri/vega-sri-manifest.json +215 -215
  150. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-selected-controller.d.ts +1 -0
  151. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +6 -0
  152. package/dist/types/components/vega-input/slimmers/renderers/vega-input-password-eye-renderer.d.ts +9 -0
  153. package/dist/types/components/vega-input/vega-input.d.ts +4 -0
  154. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.d.ts +1 -0
  155. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-value-controller.d.ts +1 -0
  156. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +1 -0
  157. package/dist/types/components/vega-input-select/types.d.ts +1 -0
  158. package/dist/types/components/vega-input-select/vega-input-select.d.ts +1 -0
  159. package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +1 -1
  160. package/dist/types/components/vega-textarea/vega-textarea.d.ts +1 -1
  161. package/dist/types/components.d.ts +14 -4
  162. package/dist/types/global/icons/eye-slash.d.ts +3 -0
  163. package/dist/types/global/icons/eye.d.ts +3 -0
  164. package/dist/types/helpers/translation/interface.d.ts +2 -0
  165. package/dist/types/helpers/validator/rules/input-select-value-in-source-rule.d.ts +60 -0
  166. package/dist/types/helpers/validator/test/rules/input-select-value-in-source-rule.test.d.ts +1 -0
  167. package/dist/vega/index.esm.js +1 -1
  168. package/dist/vega/{p-bb0f2b5f.entry.js → p-001a56b3.entry.js} +1 -1
  169. package/dist/vega/{p-b78670c9.entry.js → p-04134522.entry.js} +1 -1
  170. package/dist/vega/{p-2c945862.entry.js → p-05d64537.entry.js} +1 -1
  171. package/dist/vega/{p-7dde3be9.entry.js → p-0cefecb6.entry.js} +1 -1
  172. package/dist/vega/{p-018d70a5.js → p-0fe9cff6.js} +1 -1
  173. package/dist/vega/{p-a6fb5a40.entry.js → p-1d5f57ec.entry.js} +1 -1
  174. package/dist/vega/{p-9fb6fbcc.js → p-1f26de89.js} +1 -1
  175. package/dist/vega/{p-76b1dae4.entry.js → p-235bf01b.entry.js} +1 -1
  176. package/dist/vega/{p-85407fb9.js → p-2c8e5ecb.js} +1 -1
  177. package/dist/vega/{p-e0979451.entry.js → p-2e6ce1e9.entry.js} +1 -1
  178. package/dist/vega/p-304275ae.entry.js +1 -0
  179. package/dist/vega/p-35cd469a.entry.js +1 -0
  180. package/dist/vega/p-366825fa.entry.js +1 -0
  181. package/dist/vega/{p-19256107.entry.js → p-3c865f86.entry.js} +1 -1
  182. package/dist/vega/{p-16d68187.js → p-3d13b234.js} +1 -1
  183. package/dist/vega/{p-56636a58.entry.js → p-3e040167.entry.js} +1 -1
  184. package/dist/vega/{p-3b800f1b.entry.js → p-45dd1adf.entry.js} +1 -1
  185. package/dist/vega/{p-b8558278.entry.js → p-4fe4d946.entry.js} +1 -1
  186. package/dist/vega/{p-238afe1b.entry.js → p-52efaadb.entry.js} +1 -1
  187. package/dist/vega/{p-5a555092.entry.js → p-54776c23.entry.js} +1 -1
  188. package/dist/vega/{p-99bf5993.entry.js → p-560d29f8.entry.js} +1 -1
  189. package/dist/vega/{p-48bc03fa.entry.js → p-58769a72.entry.js} +1 -1
  190. package/dist/vega/{p-de02f404.entry.js → p-5972c101.entry.js} +1 -1
  191. package/dist/vega/p-5f377954.js +1 -1
  192. package/dist/vega/p-6078bbac.entry.js +1 -0
  193. package/dist/vega/{p-6609d87e.entry.js → p-652626b6.entry.js} +1 -1
  194. package/dist/vega/{p-787caad3.entry.js → p-67db4cea.entry.js} +1 -1
  195. package/dist/vega/{p-b5060e84.entry.js → p-69335c91.entry.js} +1 -1
  196. package/dist/vega/{p-0a55f984.entry.js → p-71e36fae.entry.js} +1 -1
  197. package/dist/vega/{p-d5ff8b7f.js → p-75f981ce.js} +1 -1
  198. package/dist/vega/{p-c26332ae.entry.js → p-796d840c.entry.js} +1 -1
  199. package/dist/vega/{p-8dba59a6.entry.js → p-7a590741.entry.js} +1 -1
  200. package/dist/vega/{p-ad5393f0.entry.js → p-7b42da4f.entry.js} +1 -1
  201. package/dist/vega/{p-69d27eaf.entry.js → p-7cd09051.entry.js} +1 -1
  202. package/dist/vega/{p-83a50ac2.entry.js → p-85935dd4.entry.js} +1 -1
  203. package/dist/vega/{p-0849f85e.js → p-895560eb.js} +1 -1
  204. package/dist/vega/{p-56f77466.entry.js → p-91d71ae9.entry.js} +1 -1
  205. package/dist/vega/{p-d3905af1.entry.js → p-97e2b6c8.entry.js} +1 -1
  206. package/dist/vega/{p-626246b4.entry.js → p-997308b1.entry.js} +1 -1
  207. package/dist/vega/{p-22fe8c61.entry.js → p-9a507d97.entry.js} +1 -1
  208. package/dist/vega/{p-1dcb1fcd.entry.js → p-a31e6ff6.entry.js} +1 -1
  209. package/dist/vega/{p-24419ebe.entry.js → p-a5ec6ca4.entry.js} +1 -1
  210. package/dist/vega/{p-00376f71.entry.js → p-bcdd3495.entry.js} +1 -1
  211. package/dist/vega/{p-f0fb3fdd.entry.js → p-c4b9fbc8.entry.js} +1 -1
  212. package/dist/vega/{p-de8c5fae.entry.js → p-c73aeafc.entry.js} +1 -1
  213. package/dist/vega/{p-f3399ef1.entry.js → p-cdac385a.entry.js} +1 -1
  214. package/dist/vega/{p-94e167b8.entry.js → p-cebd6896.entry.js} +1 -1
  215. package/dist/vega/{p-1922303e.entry.js → p-d6934517.entry.js} +1 -1
  216. package/dist/vega/p-d70e178a.js +1 -0
  217. package/dist/vega/{p-1dd7f8b2.entry.js → p-dbcd70cc.entry.js} +1 -1
  218. package/dist/vega/{p-2478f65e.js → p-dda5a984.js} +1 -1
  219. package/dist/vega/{p-bd0e55a2.entry.js → p-dde03224.entry.js} +1 -1
  220. package/dist/vega/{p-a2506cb5.entry.js → p-df58f29b.entry.js} +1 -1
  221. package/dist/vega/{p-30a8d9d6.entry.js → p-e2ab52cd.entry.js} +1 -1
  222. package/dist/vega/{p-7747c163.js → p-e9c323a4.js} +1 -1
  223. package/dist/vega/{p-d67200e8.entry.js → p-ea96635b.entry.js} +1 -1
  224. package/dist/vega/{p-2e32fbe6.entry.js → p-ed111a57.entry.js} +1 -1
  225. package/dist/vega/p-f69f84a7.js +1 -0
  226. package/dist/vega/{p-c54148fb.entry.js → p-f6d84ffc.entry.js} +1 -1
  227. package/dist/vega/{p-82ef2de0.entry.js → p-fd43d473.entry.js} +1 -1
  228. package/dist/vega/vega.esm.js +1 -1
  229. package/package.json +1 -1
  230. package/dist/vega/p-113d305b.entry.js +0 -1
  231. package/dist/vega/p-16358fec.entry.js +0 -1
  232. package/dist/vega/p-240d9d35.entry.js +0 -1
  233. package/dist/vega/p-39482a1a.js +0 -1
  234. package/dist/vega/p-437f865f.js +0 -1
  235. package/dist/vega/p-705dad87.entry.js +0 -1
@@ -17,6 +17,7 @@ export class VegaInputSelectSourceController extends VegaSlimmer {
17
17
  * convert the dropdown source when the component watchSource call
18
18
  */
19
19
  this.handleSourceChange = () => {
20
+ this.host.dataset.source = JSON.stringify(this.source);
20
21
  this.source = isArrayOfType(this.source, isSelectSourceItemType) ? this.source : [];
21
22
  };
22
23
  }
@@ -40,6 +41,9 @@ export class VegaInputSelectSourceController extends VegaSlimmer {
40
41
  return this.source.find((item) => item.id === id);
41
42
  }
42
43
  }
44
+ __decorate([
45
+ MapToComponentField()
46
+ ], VegaInputSelectSourceController.prototype, "host", void 0);
43
47
  __decorate([
44
48
  MapToComponentField({ writable: true })
45
49
  ], VegaInputSelectSourceController.prototype, "source", void 0);
@@ -23,9 +23,15 @@ export class VegaInputSelectValueController extends VegaSlimmer {
23
23
  if (this.selectType === 'multiple') {
24
24
  newValue = newValue;
25
25
  oldValue = oldValue;
26
- const validValue = newValue
27
- ? newValue.filter((value) => this.sourceController.getItem(value))
28
- : [];
26
+ let validValue;
27
+ if (newValue) {
28
+ validValue = !this.vegaDropdownProps.preserveValueIfNotInSource
29
+ ? newValue.filter((value) => this.sourceController.getItem(value))
30
+ : newValue;
31
+ }
32
+ else {
33
+ validValue = [];
34
+ }
29
35
  if (!isArrayEqual(validValue, oldValue, true)) {
30
36
  this.setValue(validValue);
31
37
  this.changeEventEmitter.emit(validValue);
@@ -41,7 +47,12 @@ export class VegaInputSelectValueController extends VegaSlimmer {
41
47
  else {
42
48
  if (newValue !== oldValue) {
43
49
  const sourceItem = this.sourceController.getItem(newValue);
44
- this.setValue(sourceItem ? sourceItem.id : '');
50
+ if (!this.vegaDropdownProps.preserveValueIfNotInSource) {
51
+ this.setValue(sourceItem ? sourceItem.id : '');
52
+ }
53
+ else {
54
+ this.setValue(newValue);
55
+ }
45
56
  this.changeEventEmitter.emit(this.value);
46
57
  ChangeManager.notify(FORM_ELEMENT_VALUE_CHANGE, {
47
58
  host: this.host,
@@ -95,6 +106,9 @@ __decorate([
95
106
  __decorate([
96
107
  MapToComponentField()
97
108
  ], VegaInputSelectValueController.prototype, "sourceController", void 0);
109
+ __decorate([
110
+ MapToComponentField()
111
+ ], VegaInputSelectValueController.prototype, "vegaDropdownProps", void 0);
98
112
  __decorate([
99
113
  MapToComponentMethod('watchValue')
100
114
  ], VegaInputSelectValueController.prototype, "handleValueChange", void 0);
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { h } from '@stencil/core';
8
- import { MapToComponentField, VegaSlimmer } from 'vega-slimmer/core';
8
+ import { MapToComponentField, MapToComponentMethod, VegaSlimmer } from 'vega-slimmer/core';
9
9
  import { createEnterKeyHandlerToTriggerClick } from '../../../../utils/accessibility';
10
10
  import chevronUp from '../../../../global/icons/chevron-up';
11
11
  import chevronDown from '../../../../global/icons/chevron-down';
@@ -45,9 +45,14 @@ export class VegaInputSelectDropdownRenderer extends VegaSlimmer {
45
45
  };
46
46
  this.renderSingleSelected = () => {
47
47
  const item = this.sourceController.getItem(this.value);
48
- if (item) {
48
+ if (item || (this.vegaDropdownProps.preserveValueIfNotInSource && this.value)) {
49
49
  return (h("span", { class: "vega-input-select-selected", part: "selected-box" },
50
- h("vega-text", { overflow: "ellipsis", tooltip: { placement: 'bottom' }, key: item.displayName }, item.displayName)));
50
+ h("vega-text", { overflow: "ellipsis", tooltip: { placement: 'bottom' }, key: this.vegaDropdownProps.preserveValueIfNotInSource
51
+ ? this.value
52
+ : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
53
+ item.displayName },
54
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
55
+ this.vegaDropdownProps.preserveValueIfNotInSource ? this.value : item.displayName)));
51
56
  }
52
57
  else {
53
58
  return (h("div", { class: "vega-input-select-placeholder", part: "placeholder" }, this.translationSlimmer.t(this.placeholder)));
@@ -57,6 +62,12 @@ export class VegaInputSelectDropdownRenderer extends VegaSlimmer {
57
62
  return Object.assign({ searchable: true, caseSensitive: false }, this.vegaDropdownProps);
58
63
  };
59
64
  }
65
+ watchVegaDropdownProps() {
66
+ if (this.vegaDropdownProps && this.vegaDropdownProps.preserveValueIfNotInSource !== undefined) {
67
+ this.dropdown.preserveValueIfNotInSource = this.vegaDropdownProps.preserveValueIfNotInSource;
68
+ this.dropdown.selectedSourceKey = this.value;
69
+ }
70
+ }
60
71
  show() {
61
72
  return this.dropdown.show();
62
73
  }
@@ -148,3 +159,6 @@ __decorate([
148
159
  __decorate([
149
160
  MapToComponentField()
150
161
  ], VegaInputSelectDropdownRenderer.prototype, "disabled", void 0);
162
+ __decorate([
163
+ MapToComponentMethod('watchVegaDropdownProps')
164
+ ], VegaInputSelectDropdownRenderer.prototype, "watchVegaDropdownProps", null);
@@ -25,6 +25,7 @@ import { VegaInputSelectSourceController } from './slimmers/controllers/vega-inp
25
25
  import { VegaInputSelectItemsSlotController } from './slimmers/controllers/vega-input-select-items-slot-controler';
26
26
  import { TranslationSlimmer } from '../../helpers/slimmers/translation';
27
27
  import { VegaInputSelectPrefixIconRenderer } from './slimmers/renderers/vega-input-select-prefix-icon-renderer';
28
+ import { InputSelectValueInSourceRule } from '../../helpers/validator/rules/input-select-value-in-source-rule';
28
29
  /**
29
30
  * @vegaVersion 1.0.7
30
31
  */
@@ -45,6 +46,12 @@ export class VegaInputSelect {
45
46
  propertyName: 'required',
46
47
  ruleFactory: (isRequired) => (isRequired ? new RequiredFieldRule() : null),
47
48
  },
49
+ {
50
+ propertyName: 'data-source',
51
+ ruleFactory: () => {
52
+ return new InputSelectValueInSourceRule(() => this.source);
53
+ },
54
+ },
48
55
  ],
49
56
  validationRulesName: 'validationRules',
50
57
  defaultValue: (target) => (target.selectType === 'multiple' ? [] : ''),
@@ -189,6 +196,9 @@ export class VegaInputSelect {
189
196
  watchValidationRules() {
190
197
  methodPlaceholder();
191
198
  }
199
+ watchVegaDropdownProps() {
200
+ methodPlaceholder();
201
+ }
192
202
  componentWillLoad() {
193
203
  methodPlaceholder();
194
204
  }
@@ -556,7 +566,7 @@ export class VegaInputSelect {
556
566
  "mutable": false,
557
567
  "complexType": {
558
568
  "original": "VegaDropdownPropsForSelect",
559
- "resolved": "{ size?: ResponsiveType<SizeType>; matchTargetWidth?: boolean; maxHeight?: number; positionRelativeTo?: string; searchable?: boolean; itemDisplayRule?: \"ellipsis\" | \"newline\"; matchContainerHeight?: boolean; caseSensitive?: boolean; useDefaultFilter?: boolean; searchTriggerBy?: VegaDropdownSearchTriggerByType; isScreenPosition?: boolean; resettable?: boolean; }",
569
+ "resolved": "{ size?: ResponsiveType<SizeType>; matchTargetWidth?: boolean; maxHeight?: number; positionRelativeTo?: string; searchable?: boolean; itemDisplayRule?: \"ellipsis\" | \"newline\"; matchContainerHeight?: boolean; caseSensitive?: boolean; useDefaultFilter?: boolean; searchTriggerBy?: VegaDropdownSearchTriggerByType; isScreenPosition?: boolean; resettable?: boolean; preserveValueIfNotInSource?: boolean; }",
560
570
  "references": {
561
571
  "VegaDropdownPropsForSelect": {
562
572
  "location": "import",
@@ -935,6 +945,9 @@ export class VegaInputSelect {
935
945
  }, {
936
946
  "propName": "validationRules",
937
947
  "methodName": "watchValidationRules"
948
+ }, {
949
+ "propName": "vegaDropdownProps",
950
+ "methodName": "watchVegaDropdownProps"
938
951
  }]; }
939
952
  }
940
953
  __decorate([
@@ -32,13 +32,16 @@ export class FunctionToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer
32
32
  * @returns {boolean} - true if the button should be disabled, false otherwise.
33
33
  */
34
34
  isDisabled() {
35
- const { host, getSelectedNodes } = this.extensionContext;
36
- const focusNode = getSelectedNodes()[0];
37
- let enableInsert = true;
38
- if (focusNode) {
39
- enableInsert = ActionHandleStrategyRegistry.canHandle(INSERT_FUNCTION_BLOCK, focusNode.parent);
35
+ if (this.extensionContext) {
36
+ const { host, getSelectedNodes } = this.extensionContext;
37
+ const focusNode = getSelectedNodes()[0];
38
+ let enableInsert = true;
39
+ if (focusNode) {
40
+ enableInsert = ActionHandleStrategyRegistry.canHandle(INSERT_FUNCTION_BLOCK, focusNode.parent);
41
+ }
42
+ return host.disabled || !enableInsert;
40
43
  }
41
- return host.disabled || !enableInsert;
44
+ return false;
42
45
  }
43
46
  /* istanbul ignore next */
44
47
  // eslint-disable-next-line jsdoc/require-jsdoc
@@ -164,6 +164,7 @@ export class WrittenModeSvgController extends VegaSlimmer {
164
164
  */
165
165
  generateSignatureImage() {
166
166
  const serializer = new XMLSerializer();
167
+ // TODO: Adding the SVG attribute will cause changes to the generated base64 value, leading to problems. https://gethired.atlassian.net/browse/VD-7854
167
168
  const svgData = serializer.serializeToString(this.signatureContainerRef);
168
169
  const base64Svg = btoa(unescape(encodeURIComponent(svgData)));
169
170
  return `data:image/svg+xml;base64,${base64Svg}`;
@@ -57,6 +57,7 @@ export class WrittenModeRenderer extends VegaSlimmer {
57
57
  * When the clear button is displayed, since the error message and the clear button are in the same line, this element is displayed.
58
58
  */
59
59
  renderSignaturePad() {
60
+ // TODO: Adding the SVG attribute will cause changes to the generated base64 value, leading to problems. https://gethired.atlassian.net/browse/VD-7854
60
61
  return (h("svg", { width: "100%", height: formatAndValidResponsiveToken(this.height, 'widthAndHeight'), "touch-action": "none", ref: (ref) => this.writtenModeSvgController.setSignatureContainerRef(ref) }));
61
62
  }
62
63
  renderFooter() {
@@ -87,7 +87,7 @@ export class VegaTabGroup {
87
87
  /**
88
88
  * Specifies the overflow navigation for many tab items within the tab group.
89
89
  *
90
- * @vegaVersion __VERSION__
90
+ * @vegaVersion 2.49.0
91
91
  */
92
92
  this.overflow = 'menu';
93
93
  }
@@ -316,7 +316,7 @@ export class VegaTabGroup {
316
316
  "docs": {
317
317
  "tags": [{
318
318
  "name": "vegaVersion",
319
- "text": "__VERSION__"
319
+ "text": "2.49.0"
320
320
  }],
321
321
  "text": "Specifies the overflow navigation for many tab items within the tab group."
322
322
  },
@@ -90,7 +90,7 @@ export class VegaTextarea {
90
90
  * It provides essential information and functionality
91
91
  * related to the suffix button's role and behavior.
92
92
  *
93
- * @vegaVersion __VERSION__
93
+ * @vegaVersion 2.68.0
94
94
  */
95
95
  this.labelSuffixButtonConfig = null;
96
96
  /**
@@ -363,7 +363,7 @@ export class VegaTextarea {
363
363
  "docs": {
364
364
  "tags": [{
365
365
  "name": "vegaVersion",
366
- "text": "__VERSION__"
366
+ "text": "2.68.0"
367
367
  }],
368
368
  "text": "Specifies the properties for the suffix button associated with the input.\n\nIt provides essential information and functionality\n related to the suffix button's role and behavior."
369
369
  },
@@ -0,0 +1,3 @@
1
+ export default {
2
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"/></svg>`,
3
+ };
@@ -0,0 +1,3 @@
1
+ export default {
2
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>`,
3
+ };
@@ -18,6 +18,8 @@ export const staticTranslations = {
18
18
  'The end time should be later than start time': 'The end time should be later than start time',
19
19
  'Phone number is not valid': 'Phone number is not valid',
20
20
  'Phone number is valid but it belongs to country {0}, not country {1}': 'Phone number is valid but it belongs to country {0}, not country {1}',
21
+ 'The value does not exist in the source': 'The value does not exist in the source',
22
+ 'There are values that do not exist in the source': 'There are values that do not exist in the source',
21
23
  // Component internal text
22
24
  'Viewing': 'Viewing',
23
25
  'Show': 'Show',
@@ -233,6 +233,8 @@ describe('VegaTranslationController', () => {
233
233
  'Saturday': 'Saturday',
234
234
  'am': 'am',
235
235
  'pm': 'pm',
236
+ 'The value does not exist in the source': 'The value does not exist in the source',
237
+ 'There are values that do not exist in the source': 'There are values that do not exist in the source',
236
238
  });
237
239
  /* eslint-enable @typescript-eslint/naming-convention,spellcheck/spell-checker */
238
240
  });
@@ -0,0 +1,85 @@
1
+ import { InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract';
2
+ /**
3
+ * A rule that checks if the value exists in the source or not
4
+ *
5
+ * @augments {InternalFormFieldValidationRule<SelectValueType<SelectType>>}
6
+ */
7
+ export class InputSelectValueInSourceRule extends InternalFormFieldValidationRule {
8
+ /**
9
+ * It creates a new instance of the class with the given config.
10
+ *
11
+ * @param {() => SelectSourceItem[]} inputSelectSourceGetter - The input select source getter function
12
+ */
13
+ constructor(inputSelectSourceGetter) {
14
+ super();
15
+ this.inputSelectSourceGetter = inputSelectSourceGetter;
16
+ /**
17
+ * Generate an invalid result
18
+ *
19
+ * @param {string} message Error message
20
+ * @returns {EvaluateResultTranslation} invalid validation result
21
+ */
22
+ this.invalidResult = (message) => ({
23
+ isValid: false,
24
+ message,
25
+ });
26
+ /**
27
+ * Generate a valid result
28
+ *
29
+ * @returns {EvaluateResultTranslation} invalid validation result
30
+ */
31
+ this.validResult = () => ({
32
+ isValid: true,
33
+ message: '',
34
+ });
35
+ }
36
+ /**
37
+ * If the input is accepted and the status is not disabled and visible, then return true
38
+ *
39
+ * @param {unknown} input - The input to be evaluated.
40
+ * @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
41
+ * @returns {boolean} A boolean value.
42
+ */
43
+ canEvaluate(input, status) {
44
+ return status
45
+ ? this.isAcceptedInputType(input) && !status.disabled && status.visible
46
+ : this.isAcceptedInputType(input);
47
+ }
48
+ /**
49
+ * check if the value exists in the source
50
+ *
51
+ * @param {SelectValueType<SelectType>} input - The input to be evaluated.
52
+ * @returns {EvaluateResultTranslation} - The result of the evaluation.
53
+ */
54
+ evaluate(input) {
55
+ if (typeof input === 'string' &&
56
+ !this.inputSelectSourceGetter().find((item) => item.id === input)) {
57
+ return this.invalidResult(`The value does not exist in the source`);
58
+ }
59
+ else if (Array.isArray(input) &&
60
+ !input.every((value) => this.inputSelectSourceGetter().find((item) => item.id === value))) {
61
+ return this.invalidResult(`There are values that do not exist in the source`);
62
+ }
63
+ return this.validResult();
64
+ }
65
+ /**
66
+ * If the field is not disabled, visible, and has been touched or modified, then show the error
67
+ *
68
+ * @param {FormFieldStatusMeta} status - FormFieldStatusMeta
69
+ * @returns {boolean} A boolean value.
70
+ */
71
+ shouldShowError(status) {
72
+ return !status.disabled && status.visible && (status.touched || status.modified);
73
+ }
74
+ /**
75
+ * It returns true if the input is a string or an array of two strings, and each string is a valid string
76
+ *
77
+ * @param {unknown} input - The input value to be validated.
78
+ * @returns {boolean} A boolean value.
79
+ */
80
+ isAcceptedInputType(input) {
81
+ return ((typeof input === 'string' ||
82
+ (Array.isArray(input) && input.every((item) => typeof item === 'string'))) &&
83
+ input.length > 0);
84
+ }
85
+ }
@@ -0,0 +1,99 @@
1
+ import { InputSelectValueInSourceRule } from '../../rules/input-select-value-in-source-rule';
2
+ describe('inputSelectValueInSourceRule', () => {
3
+ test('return true if input can be evaluated', () => {
4
+ const rule = new InputSelectValueInSourceRule(() => [
5
+ { id: 'Maple', displayName: 'Maple' },
6
+ { id: 'Banana', displayName: 'Banana' },
7
+ ]);
8
+ expect(rule.canEvaluate('Maple')).toEqual(true);
9
+ expect(rule.canEvaluate('Maple', {
10
+ touched: true,
11
+ modified: true,
12
+ disabled: false,
13
+ visible: true,
14
+ })).toEqual(true);
15
+ });
16
+ test('return false if input can not be evaluated', () => {
17
+ const rule = new InputSelectValueInSourceRule(() => [
18
+ { id: 'Maple', displayName: 'Maple' },
19
+ { id: 'Banana', displayName: 'Banana' },
20
+ ]);
21
+ expect(rule.canEvaluate('')).toEqual(false);
22
+ expect(rule.canEvaluate(null)).toEqual(false);
23
+ expect(rule.canEvaluate(undefined)).toEqual(false);
24
+ expect(rule.canEvaluate([])).toEqual(false);
25
+ expect(rule.canEvaluate({})).toEqual(false);
26
+ });
27
+ test('return the valid evaluate result', () => {
28
+ const rule = new InputSelectValueInSourceRule(() => [
29
+ { id: 'Maple', displayName: 'Maple' },
30
+ { id: 'Banana', displayName: 'Banana' },
31
+ ]);
32
+ expect(rule.evaluate(['Maple', 'Banana'])).toEqual({
33
+ isValid: true,
34
+ message: ``,
35
+ });
36
+ expect(rule.evaluate(['Maple'])).toEqual({
37
+ isValid: true,
38
+ message: ``,
39
+ });
40
+ expect(rule.evaluate('Maple')).toEqual({
41
+ isValid: true,
42
+ message: ``,
43
+ });
44
+ });
45
+ test('return the invalid evaluate result as expected', () => {
46
+ const rule = new InputSelectValueInSourceRule(() => [
47
+ { id: 'Maple', displayName: 'Maple' },
48
+ { id: 'Banana', displayName: 'Banana' },
49
+ ]);
50
+ expect(rule.evaluate(['Map'])).toEqual({
51
+ isValid: false,
52
+ message: `There are values that do not exist in the source`,
53
+ });
54
+ expect(rule.evaluate(['Map', 'Banana'])).toEqual({
55
+ isValid: false,
56
+ message: `There are values that do not exist in the source`,
57
+ });
58
+ expect(rule.evaluate('Map')).toEqual({
59
+ isValid: false,
60
+ message: `The value does not exist in the source`,
61
+ });
62
+ });
63
+ test('should not show error message if status is disabled or invisible', () => {
64
+ const rule = new InputSelectValueInSourceRule(() => [
65
+ { id: 'Maple', displayName: 'Maple' },
66
+ { id: 'Banana', displayName: 'Banana' },
67
+ ]);
68
+ expect(rule.shouldShowError({
69
+ touched: true,
70
+ modified: true,
71
+ disabled: true,
72
+ visible: false,
73
+ })).toEqual(false);
74
+ });
75
+ test('should show error message if status is not disabled or invisible', () => {
76
+ const rule = new InputSelectValueInSourceRule(() => [
77
+ { id: 'Maple', displayName: 'Maple' },
78
+ { id: 'Banana', displayName: 'Banana' },
79
+ ]);
80
+ expect(rule.shouldShowError({
81
+ touched: true,
82
+ modified: true,
83
+ disabled: false,
84
+ visible: true,
85
+ })).toEqual(true);
86
+ });
87
+ test('should not show error message if status is not touched or not modified', () => {
88
+ const rule = new InputSelectValueInSourceRule(() => [
89
+ { id: 'Maple', displayName: 'Maple' },
90
+ { id: 'Banana', displayName: 'Banana' },
91
+ ]);
92
+ expect(rule.shouldShowError({
93
+ touched: false,
94
+ modified: false,
95
+ disabled: false,
96
+ visible: true,
97
+ })).toEqual(false);
98
+ });
99
+ });
@@ -1,18 +1,18 @@
1
1
  import { F as FeatureFlag } from './feature-flag-controller-51659753.js';
2
- import { V as VegaLoader, a as VegaNotify, b as VegaThemeManager, c as VegaDialog, d as VegaEventManager, e as VegaZIndexManager, f as VegaSkeletonLoader, g as VegaRTETokenExtension, h as VegaRTEFunctionExtension } from './function-extension-eb1d062f.js';
2
+ import { V as VegaLoader, a as VegaNotify, b as VegaThemeManager, c as VegaDialog, d as VegaEventManager, e as VegaZIndexManager, f as VegaSkeletonLoader, g as VegaRTETokenExtension, h as VegaRTEFunctionExtension } from './function-extension-7ce27a8e.js';
3
3
  import { M as MapToComponentMethod, V as VegaSlimmer, s as setVegaLogLevel, G as GlobalSlimmersRegistry } from './global-slimmer-registry-17c4efd4.js';
4
4
  import { v as vegaEnvManager } from './vega-env-manager-8f8dc473.js';
5
5
  import { V as VegaIconManager } from './internal-icon-manager-f0486245.js';
6
6
  import './wait-for-vega-handler-c2c07ac3.js';
7
7
  import './ui-bb99c0c2.js';
8
- import { V as VegaInternalTranslation, a as VegaTranslation, s as staticTranslations } from './translation-f10b1e19.js';
8
+ import { V as VegaInternalTranslation, a as VegaTranslation, s as staticTranslations } from './translation-96e5debd.js';
9
9
  import { V as VegaRTEContent } from './dto-renderer-manager-7abc53bf.js';
10
10
  import { v as vegaNonceManager, s as setVegaNonce } from './vega-nonce-manager-87615d3c.js';
11
11
  import { V as VegaRTEPresetToolbarItems } from './code-block-e8839202.js';
12
12
  import { T as TypographyUrls } from './typography-396de03f.js';
13
13
  import { V as ValidCreditCardNumberRule } from './valid-credit-card-number-rule-81443274.js';
14
14
  import { w as waitForVega } from './index-c943d263.js';
15
- import { V as VegaRTELanguageExtension } from './language-extension-3331131f.js';
15
+ import { V as VegaRTELanguageExtension } from './language-extension-44413556.js';
16
16
  import { U as UPDATE_TRANSLATION } from './static-subject-title-52f93124.js';
17
17
  import { C as ChangeManager } from './change-manager-6a7eb88c.js';
18
18
  import { O as Observer } from './observer-3959f9dd.js';
@@ -1,7 +1,7 @@
1
1
  import { j as isBorderColorTokenType, b as BorderColors, e as BorderColorMap, k as isShadowsTokenType, f as Shadows, g as ShadowMap, l as isBorderTokenType, m as Borders, n as BorderMap, o as isSpacingTokenType, p as isBorderRadiusTokenType, q as isBackgroundColorTokenType, r as isTextColorTokenType, s as isBreakpointsTokenType, h as Spacing, t as isBorderStyleType, B as BorderRadius, C as Colors, u as isTypographyTokenType } from './type-guard-12f7654b.js';
2
2
  import { B as Breakpoints } from './breakpoints-d9faf11c.js';
3
3
  import { L as LogUtility } from './global-slimmer-registry-17c4efd4.js';
4
- import { R as ResponsiveFormatFacade } from './responsive-format-facade-b0712993.js';
4
+ import { R as ResponsiveFormatFacade } from './responsive-format-facade-f88850c5.js';
5
5
  import { a as TypographyKeys } from './typography-396de03f.js';
6
6
  import { S as StateVariantFormatter, s as stateBackgroundColorFormatter } from './state-background-color-formatter-0f01d27a.js';
7
7
  import { a as BorderStyle } from './ui-8424715a.js';
@@ -1,11 +1,11 @@
1
1
  import { c as MapToComponentField, I as InjectVegaSlimmer, V as VegaSlimmer, L as LogUtility, M as MapToComponentMethod } from './global-slimmer-registry-17c4efd4.js';
2
2
  import { f as findParent, d as isElementVisible, b as isParent } from './ui-bb99c0c2.js';
3
- import { n as InternalVegaZIndexManager } from './function-extension-eb1d062f.js';
3
+ import { n as InternalVegaZIndexManager } from './function-extension-7ce27a8e.js';
4
4
  import { c as createDynamicSlimmer } from './dynamic-slimmer-90b8af32.js';
5
5
  import { P as PageResizeObserverSlimmer } from './page-resize-observer-slimmer-0bf7fbf3.js';
6
6
  import { P as Placements, A as Alignments } from './ui-8424715a.js';
7
7
  import { E as isTranslocationType } from './type-guard-12f7654b.js';
8
- import { R as ResponsiveFormatFacade } from './responsive-format-facade-b0712993.js';
8
+ import { R as ResponsiveFormatFacade } from './responsive-format-facade-f88850c5.js';
9
9
  import { C as ChangeManager } from './change-manager-6a7eb88c.js';
10
10
  import { S as SHADOW_ROOT_ELEMENT_SCROLLING } from './static-subject-title-52f93124.js';
11
11
  import { O as Observer } from './observer-3959f9dd.js';
@@ -8,7 +8,7 @@ import { i as isAsyncFunction, g as generateUUID } from './create-public-api-run
8
8
  import { c as createDynamicSlimmer } from './dynamic-slimmer-90b8af32.js';
9
9
  import { d as domNodeSubjectFactory, D as DomNodeSubjectObserverFactory } from './dom-node-subject-observer-factory-dca87b70.js';
10
10
  import { f as VegaInternalFieldErrorStateChange, d as VegaInternalFormSubmit, g as VegaInternalValid } from './vega-internal-event-id-5c3e5f7f.js';
11
- import { V as VegaInternalTranslation } from './translation-f10b1e19.js';
11
+ import { V as VegaInternalTranslation } from './translation-96e5debd.js';
12
12
  import { P as PageResizeObserverSlimmer } from './page-resize-observer-slimmer-0bf7fbf3.js';
13
13
  import { I as InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
14
14
  import { M as MutationObserverSlimmer } from './mutation-observer-slimmer-58ebc13c.js';
@@ -2437,13 +2437,16 @@ class FunctionToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
2437
2437
  * @returns {boolean} - true if the button should be disabled, false otherwise.
2438
2438
  */
2439
2439
  isDisabled() {
2440
- const { host, getSelectedNodes } = this.extensionContext;
2441
- const focusNode = getSelectedNodes()[0];
2442
- let enableInsert = true;
2443
- if (focusNode) {
2444
- enableInsert = ActionHandleStrategyRegistry.canHandle(INSERT_FUNCTION_BLOCK, focusNode.parent);
2440
+ if (this.extensionContext) {
2441
+ const { host, getSelectedNodes } = this.extensionContext;
2442
+ const focusNode = getSelectedNodes()[0];
2443
+ let enableInsert = true;
2444
+ if (focusNode) {
2445
+ enableInsert = ActionHandleStrategyRegistry.canHandle(INSERT_FUNCTION_BLOCK, focusNode.parent);
2446
+ }
2447
+ return host.disabled || !enableInsert;
2445
2448
  }
2446
- return host.disabled || !enableInsert;
2449
+ return false;
2447
2450
  }
2448
2451
  /* istanbul ignore next */
2449
2452
  // eslint-disable-next-line jsdoc/require-jsdoc
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { g as getCurrentBreakpoint } from './page-resize-observer-slimmer-0bf7fbf3.js';
2
2
  export { L as LogUtility, s as setVegaLogLevel } from './global-slimmer-registry-17c4efd4.js';
3
- export { d as formatAndValidBackgroundColor, e as formatAndValidBorderColor, g as formatAndValidBorderRadius, c as formatAndValidBreakpointSize, a as formatAndValidGap, h as formatAndValidPadding, f as formatAndValidResponsiveToken, b as formatAndValidShadow, i as formatAndValidTextColor } from './design-token-e9e6b011.js';
3
+ export { d as formatAndValidBackgroundColor, e as formatAndValidBorderColor, g as formatAndValidBorderRadius, c as formatAndValidBreakpointSize, a as formatAndValidGap, h as formatAndValidPadding, f as formatAndValidResponsiveToken, b as formatAndValidShadow, i as formatAndValidTextColor } from './design-token-64e09c2a.js';
4
4
  export { c as camelToDashCase } from './string-a953eafc.js';
5
5
  export { d as BackgroundColorMap, a as BackgroundColors, e as BorderColorMap, b as BorderColors, B as BorderRadius, C as Colors, F as FillBackgroundColors, g as ShadowMap, f as Shadows, h as Spacing, S as StrokeBackgroundColors, c as TextColorMap, T as TextColors } from './type-guard-12f7654b.js';
6
6
  export { B as Breakpoints } from './breakpoints-d9faf11c.js';
@@ -8,19 +8,19 @@ export { I as Icons, g as getIconFromToken } from './icons-8627925e.js';
8
8
  export { b as Typography, a as TypographyKeys, T as TypographyUrls } from './typography-396de03f.js';
9
9
  export { e as BoxDisplay, B as BreakpointKeys, C as CssStates, F as FlexDirections } from './ui-8424715a.js';
10
10
  export { F as FrameworkEnum, v as VegaEnvManager } from './vega-env-manager-8f8dc473.js';
11
- export { A as ActionHandlerInterceptor, I as InsertNodeToNearestRootAction, l as RTETokenNode, m as RTETokenNodeRenderer, R as RTETokenToolbarButtonRenderer, c as VegaDialog, d as VegaEventManager, V as VegaLoader, a as VegaNotify, j as VegaRTEExtension, k as VegaRTEExtensionRenderer, h as VegaRTEFunctionExtension, g as VegaRTETokenExtension, i as VegaRTEToolbarButtonRenderer, f as VegaSkeletonLoader, b as VegaThemeManager, e as VegaZIndexManager } from './function-extension-eb1d062f.js';
11
+ export { A as ActionHandlerInterceptor, I as InsertNodeToNearestRootAction, l as RTETokenNode, m as RTETokenNodeRenderer, R as RTETokenToolbarButtonRenderer, c as VegaDialog, d as VegaEventManager, V as VegaLoader, a as VegaNotify, j as VegaRTEExtension, k as VegaRTEExtensionRenderer, h as VegaRTEFunctionExtension, g as VegaRTETokenExtension, i as VegaRTEToolbarButtonRenderer, f as VegaSkeletonLoader, b as VegaThemeManager, e as VegaZIndexManager } from './function-extension-7ce27a8e.js';
12
12
  export { F as FeatureFlag } from './feature-flag-controller-51659753.js';
13
13
  export { B as VegaJQueryDelegatedEventStrategy } from './internal-vega-event-manager-516aa721.js';
14
14
  export { V as VegaIconManager } from './internal-icon-manager-f0486245.js';
15
15
  export { V as ValidCreditCardNumberRule } from './valid-credit-card-number-rule-81443274.js';
16
16
  export { w as waitForVega } from './index-c943d263.js';
17
- export { a as VegaTranslation, s as VegaTranslationResourceEN } from './translation-f10b1e19.js';
17
+ export { a as VegaTranslation, s as VegaTranslationResourceEN } from './translation-96e5debd.js';
18
18
  export { B as BlockToRTEBlockStrategyAbstract, b as ElementToDTOStrategy, I as InsertNewParagraphAction, d as RTEImageBlock, f as RTEImageNode, e as RTEListBlock, c as RTEListItemBlock, U as UpdateCursorPositionAction, V as VegaRTEContent, h as htmlElementToAnnotationGenerator } from './dto-renderer-manager-7abc53bf.js';
19
19
  export { s as setVegaNonce } from './vega-nonce-manager-87615d3c.js';
20
20
  export { d as ActionHandleStrategy, h as AppendChildrenAction, Q as CodeLanguage, w as CustomAttributeAnnotation, v as CustomClassAnnotation, C as CustomStyleAnnotation, I as InsertChildrenAfterAction, j as InsertChildrenBeforeAction, M as ModifyContentAction, c as ModifyContentActionType, g as RTEAnnotationStyle, f as RTEBlock, z as RTEDecoratorNode, i as RTENode, e as RTETextBlock, b as RTETextNode, r as RemoveChildrenAction, V as VegaRTEPresetToolbarItems } from './code-block-e8839202.js';
21
- export { R as RTELanguageToolbarButtonRenderer, V as VegaRTELanguageExtension } from './language-extension-3331131f.js';
21
+ export { R as RTELanguageToolbarButtonRenderer, V as VegaRTELanguageExtension } from './language-extension-44413556.js';
22
22
  export { R as RTERange } from './range-adf206fd.js';
23
- export { G as GridColumns, a as GridRows } from './responsive-format-facade-b0712993.js';
23
+ export { G as GridColumns, a as GridRows } from './responsive-format-facade-f88850c5.js';
24
24
  export { C as CheckBoxRequiredRule } from './check-box-required-rule-cb0aa339.js';
25
25
  export { D as DateRequiredRule } from './date-required-rule-8944f3bf.js';
26
26
  export { I as InputPhoneNumberRequiredRule } from './input-phone-number-required-rule-be6a5572.js';
@@ -1,5 +1,5 @@
1
1
  import { V as VegaRTEContent } from './dto-renderer-manager-7abc53bf.js';
2
- import { i as VegaRTEToolbarButtonRenderer, j as VegaRTEExtension } from './function-extension-eb1d062f.js';
2
+ import { i as VegaRTEToolbarButtonRenderer, j as VegaRTEExtension } from './function-extension-7ce27a8e.js';
3
3
  import './global-slimmer-registry-17c4efd4.js';
4
4
 
5
5
  /**