@heartlandone/vega 2.104.0 → 2.105.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 (101) hide show
  1. package/dist/cjs/{form-field-controller-slimmer-007d10db.js → form-field-controller-slimmer-fde2b355.js} +15 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/vega-app-footer.cjs.entry.js +20 -25
  4. package/dist/cjs/vega-checkbox_2.cjs.entry.js +1 -1
  5. package/dist/cjs/vega-color-picker.cjs.entry.js +1 -1
  6. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +1 -1
  7. package/dist/cjs/vega-combo-box.cjs.entry.js +1 -1
  8. package/dist/cjs/vega-date-picker_2.cjs.entry.js +1 -1
  9. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  10. package/dist/cjs/vega-file-uploader.cjs.entry.js +1 -1
  11. package/dist/cjs/vega-image-uploader.cjs.entry.js +1 -1
  12. package/dist/cjs/vega-input-credit-card.cjs.entry.js +1 -1
  13. package/dist/cjs/vega-input-numeric.cjs.entry.js +1 -1
  14. package/dist/cjs/vega-input-passcode.cjs.entry.js +1 -1
  15. package/dist/cjs/vega-input-phone-number.cjs.entry.js +1 -1
  16. package/dist/cjs/vega-input-range.cjs.entry.js +1 -1
  17. package/dist/cjs/vega-input-select.cjs.entry.js +1 -1
  18. package/dist/cjs/vega-input.cjs.entry.js +1 -1
  19. package/dist/cjs/vega-radio_2.cjs.entry.js +1 -1
  20. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +50 -6
  21. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +1 -1
  22. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +1 -1
  23. package/dist/cjs/vega-signature-capture.cjs.entry.js +1 -1
  24. package/dist/cjs/vega-stepper.cjs.entry.js +1 -1
  25. package/dist/cjs/vega-textarea.cjs.entry.js +1 -1
  26. package/dist/cjs/vega-time-picker_2.cjs.entry.js +1 -1
  27. package/dist/cjs/vega-toggle-switch.cjs.entry.js +1 -1
  28. package/dist/cjs/vega.cjs.js +1 -1
  29. package/dist/collection/components/vega-app-footer/vega-app-footer.js +38 -35
  30. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +2 -2
  31. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.js +45 -2
  32. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +16 -0
  33. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +3 -0
  34. package/dist/collection/constants/misc.js +2 -4
  35. package/dist/collection/helpers/slimmers/form/form-field-controller-slimmer.js +12 -1
  36. package/dist/collection/helpers/validator/form-field-controller.js +4 -1
  37. package/dist/esm/{form-field-controller-slimmer-aaea8aaf.js → form-field-controller-slimmer-6f0f083f.js} +15 -1
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/esm/vega-app-footer.entry.js +20 -25
  40. package/dist/esm/vega-checkbox_2.entry.js +1 -1
  41. package/dist/esm/vega-color-picker.entry.js +1 -1
  42. package/dist/esm/vega-color-swatch-picker.entry.js +1 -1
  43. package/dist/esm/vega-combo-box.entry.js +1 -1
  44. package/dist/esm/vega-date-picker_2.entry.js +1 -1
  45. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  46. package/dist/esm/vega-file-uploader.entry.js +1 -1
  47. package/dist/esm/vega-image-uploader.entry.js +1 -1
  48. package/dist/esm/vega-input-credit-card.entry.js +1 -1
  49. package/dist/esm/vega-input-numeric.entry.js +1 -1
  50. package/dist/esm/vega-input-passcode.entry.js +1 -1
  51. package/dist/esm/vega-input-phone-number.entry.js +1 -1
  52. package/dist/esm/vega-input-range.entry.js +1 -1
  53. package/dist/esm/vega-input-select.entry.js +1 -1
  54. package/dist/esm/vega-input.entry.js +1 -1
  55. package/dist/esm/vega-radio_2.entry.js +1 -1
  56. package/dist/esm/vega-rich-text-editor_4.entry.js +50 -6
  57. package/dist/esm/vega-selection-chip_2.entry.js +1 -1
  58. package/dist/esm/vega-selection-tile_2.entry.js +1 -1
  59. package/dist/esm/vega-signature-capture.entry.js +1 -1
  60. package/dist/esm/vega-stepper.entry.js +1 -1
  61. package/dist/esm/vega-textarea.entry.js +1 -1
  62. package/dist/esm/vega-time-picker_2.entry.js +1 -1
  63. package/dist/esm/vega-toggle-switch.entry.js +1 -1
  64. package/dist/esm/vega.js +1 -1
  65. package/dist/sri/vega-sri-manifest.json +97 -97
  66. package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +14 -12
  67. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.d.ts +11 -0
  68. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +3 -2
  69. package/dist/types/components.d.ts +26 -22
  70. package/dist/types/constants/misc.d.ts +0 -2
  71. package/dist/types/helpers/slimmers/form/form-field-controller-slimmer.d.ts +7 -0
  72. package/dist/vega/{p-ea97ec60.entry.js → p-09c5aae6.entry.js} +1 -1
  73. package/dist/vega/{p-f5f78884.entry.js → p-185a24ed.entry.js} +1 -1
  74. package/dist/vega/{p-8a9e80ac.entry.js → p-1acaccd6.entry.js} +1 -1
  75. package/dist/vega/{p-ebc1e0da.entry.js → p-27c0c41f.entry.js} +1 -1
  76. package/dist/vega/{p-09ed519b.entry.js → p-2dbdd1bf.entry.js} +1 -1
  77. package/dist/vega/{p-892f3e98.entry.js → p-313ccf96.entry.js} +1 -1
  78. package/dist/vega/{p-f839e009.entry.js → p-3831f00d.entry.js} +1 -1
  79. package/dist/vega/{p-dcdd7098.entry.js → p-4b5591fb.entry.js} +1 -1
  80. package/dist/vega/{p-35de277a.entry.js → p-593a4af3.entry.js} +1 -1
  81. package/dist/vega/{p-06a0c795.entry.js → p-5a60c1ed.entry.js} +1 -1
  82. package/dist/vega/p-5f377954.js +1 -1
  83. package/dist/vega/p-5f589bdb.entry.js +1 -0
  84. package/dist/vega/{p-74b54dcc.entry.js → p-6b2da3bc.entry.js} +1 -1
  85. package/dist/vega/p-70a08fe5.js +1 -0
  86. package/dist/vega/{p-5025f7b6.entry.js → p-8a303571.entry.js} +1 -1
  87. package/dist/vega/{p-ab6c13d9.entry.js → p-9e51b1a8.entry.js} +1 -1
  88. package/dist/vega/{p-6a13ba24.entry.js → p-a222639f.entry.js} +1 -1
  89. package/dist/vega/{p-53838cd1.entry.js → p-a6467be2.entry.js} +1 -1
  90. package/dist/vega/{p-fa970e96.entry.js → p-b015a970.entry.js} +1 -1
  91. package/dist/vega/{p-c11b20c0.entry.js → p-bc8bc41e.entry.js} +1 -1
  92. package/dist/vega/{p-26fdf04e.entry.js → p-c07039d8.entry.js} +1 -1
  93. package/dist/vega/{p-70659d97.entry.js → p-c26c979f.entry.js} +1 -1
  94. package/dist/vega/{p-48470109.entry.js → p-c75c14e4.entry.js} +1 -1
  95. package/dist/vega/{p-88ada88b.entry.js → p-d1b8fb1d.entry.js} +1 -1
  96. package/dist/vega/{p-7157dd20.entry.js → p-e22a00ec.entry.js} +1 -1
  97. package/dist/vega/{p-c3532738.entry.js → p-ee2bd1e8.entry.js} +1 -1
  98. package/dist/vega/vega.esm.js +1 -1
  99. package/package.json +1 -1
  100. package/dist/vega/p-38c551a9.entry.js +0 -1
  101. package/dist/vega/p-fffc1f47.js +0 -1
@@ -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 { Component, Host, h, Prop, Element, Fragment, State, Event } from '@stencil/core';
8
- import { HEARTLAND_PRIVACY_URL, HEARTLAND_TOS_URL, HEARTLAND_GOOGLE_PRIVACY_POLICY_URL, HEARTLAND_GOOGLE_TREMS_SERVICE_URL, GLOBALPAYMENTS_TOS_URL, GLOBALPAYMENTS_PRIVACY_URL, GLOBALPAYMENTS_CONTENT, HEARTLAND_CONTENT, } from '../../constants/misc';
8
+ import { HEARTLAND_GOOGLE_PRIVACY_POLICY_URL, HEARTLAND_GOOGLE_TREMS_SERVICE_URL, GLOBALPAYMENTS_TOS_URL, GLOBALPAYMENTS_PRIVACY_URL, GLOBALPAYMENTS_CONTENT, HEARTLAND_CONTENT, } from '../../constants/misc';
9
9
  import { sanitizeVegaComponent } from '../../utils/component';
10
10
  import { InjectVegaGlobalSlimmer, InjectVegaSlimmer } from 'vega-slimmer/core';
11
11
  import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/component-usage-runtime-metrics';
@@ -41,22 +41,23 @@ export class VegaAppFooter {
41
41
  this.content = this.getDefaultContent();
42
42
  /**
43
43
  * Specifies the label or text to be displayed
44
- * for the Terms of Use link in the app footer.
44
+ * for the Terms of Service link in the app footer.
45
45
  *
46
46
  * @vegaVersion 1.15.0
47
+ * @defaultValue Terms of Service
47
48
  */
48
- this.termOfUseLabel = 'Terms of Use';
49
+ this.termOfUseLabel = 'Terms of Service';
49
50
  /**
50
- * Specifies the URL or web address that the Terms of Use link
51
+ * Specifies the URL or web address that the Terms of Service link
51
52
  * in the app footer should navigate to when clicked.
52
53
  *
53
54
  * @vegaVersion 1.15.0
54
- * @defaultValue https://www.globalpayments.com/terms-of-use
55
+ * @defaultValue https://noticesandpolicies.globalpayments.com/software-terms/global-payments-software-terms-of-service
55
56
  */
56
57
  this.termOfUseUrl = this.getDefaultTermsOfUseUrl();
57
58
  /**
58
59
  * Specifies the target window or browsing context in which
59
- * the Terms of Use URL should be opened
60
+ * the Terms of Service URL should be opened
60
61
  * when the user clicks on the link.
61
62
  *
62
63
  * @vegaVersion 1.27.3
@@ -64,31 +65,32 @@ export class VegaAppFooter {
64
65
  this.termOfUseUrlTarget = '_self';
65
66
  /**
66
67
  * Specifies the label or text to be displayed
67
- * for the Privacy Policy link in the app footer.
68
+ * for the Privacy Notice link in the app footer.
68
69
  *
69
70
  * @vegaVersion 1.15.0
71
+ * @defaultValue Privacy Notice
70
72
  */
71
- this.privacyPolicyLabel = 'Privacy Policy';
73
+ this.privacyPolicyLabel = 'Privacy Notice';
72
74
  /**
73
75
  * Specifies the URL or web address that the
74
- * Privacy Policy link in the app footer should
76
+ * Privacy Notice link in the app footer should
75
77
  * navigate to when clicked.
76
78
  *
77
79
  * @vegaVersion 1.15.0
78
- * @defaultValue https://www.globalpayments.com/privacy-statement
80
+ * @defaultValue https://noticesandpolicies.globalpayments.com/genius-product-privacy-notice-for-merchant-users
79
81
  */
80
82
  this.privacyPolicyUrl = this.getDefaultPrivacyPolicyUrl();
81
83
  /**
82
84
  * Specifies the target window or browsing context
83
- * in which the Privacy Policy URL should be opened
85
+ * in which the Privacy Notice URL should be opened
84
86
  * when the user clicks on the link.
85
87
  *
86
88
  * @vegaVersion 1.27.3
87
89
  */
88
90
  this.privacyPolicyUrlTarget = '_self';
89
91
  /**
90
- * Specifies whether to hide the default Term of Use
91
- * and Privacy Policy links.
92
+ * Specifies whether to hide the default Terms of Service
93
+ * and Privacy Notice links.
92
94
  *
93
95
  * @vegaVersion 1.35.1
94
96
  */
@@ -128,14 +130,10 @@ export class VegaAppFooter {
128
130
  : GLOBALPAYMENTS_CONTENT;
129
131
  }
130
132
  getDefaultTermsOfUseUrl() {
131
- return VegaInternalThemeManager.getBranding() === 'heartland'
132
- ? HEARTLAND_TOS_URL
133
- : GLOBALPAYMENTS_TOS_URL;
133
+ return GLOBALPAYMENTS_TOS_URL;
134
134
  }
135
135
  getDefaultPrivacyPolicyUrl() {
136
- return VegaInternalThemeManager.getBranding() === 'heartland'
137
- ? HEARTLAND_PRIVACY_URL
138
- : GLOBALPAYMENTS_PRIVACY_URL;
136
+ return GLOBALPAYMENTS_PRIVACY_URL;
139
137
  }
140
138
  renderContent() {
141
139
  return (h("div", { class: "vega-app-footer-content" }, this.content !== GLOBALPAYMENTS_CONTENT && this.content !== HEARTLAND_CONTENT
@@ -154,13 +152,12 @@ export class VegaAppFooter {
154
152
  h("a", { id: this.privacyPolicyUrlId, target: this.privacyPolicyUrlTarget, href: this.getPrivacyPolicyUrl() }, this.privacyPolicyLabel)));
155
153
  }
156
154
  getTermsOfUseUrl() {
157
- return this.termOfUseUrl !== HEARTLAND_TOS_URL && this.termOfUseUrl !== GLOBALPAYMENTS_TOS_URL
155
+ return this.termOfUseUrl !== GLOBALPAYMENTS_TOS_URL
158
156
  ? this.termOfUseUrl
159
157
  : this.getDefaultTermsOfUseUrl();
160
158
  }
161
159
  getPrivacyPolicyUrl() {
162
- return this.privacyPolicyUrl !== HEARTLAND_PRIVACY_URL &&
163
- this.privacyPolicyUrl !== GLOBALPAYMENTS_PRIVACY_URL
160
+ return this.privacyPolicyUrl !== GLOBALPAYMENTS_PRIVACY_URL
164
161
  ? this.privacyPolicyUrl
165
162
  : this.getDefaultPrivacyPolicyUrl();
166
163
  }
@@ -230,12 +227,15 @@ export class VegaAppFooter {
230
227
  "tags": [{
231
228
  "name": "vegaVersion",
232
229
  "text": "1.15.0"
230
+ }, {
231
+ "name": "defaultValue",
232
+ "text": "Terms of Service"
233
233
  }],
234
- "text": "Specifies the label or text to be displayed\n for the Terms of Use link in the app footer."
234
+ "text": "Specifies the label or text to be displayed\n for the Terms of Service link in the app footer."
235
235
  },
236
236
  "attribute": "term-of-use-label",
237
237
  "reflect": false,
238
- "defaultValue": "'Terms of Use'"
238
+ "defaultValue": "'Terms of Service'"
239
239
  },
240
240
  "termOfUseUrl": {
241
241
  "type": "string",
@@ -253,9 +253,9 @@ export class VegaAppFooter {
253
253
  "text": "1.15.0"
254
254
  }, {
255
255
  "name": "defaultValue",
256
- "text": "https://www.globalpayments.com/terms-of-use"
256
+ "text": "https://noticesandpolicies.globalpayments.com/software-terms/global-payments-software-terms-of-service"
257
257
  }],
258
- "text": "Specifies the URL or web address that the Terms of Use link\n in the app footer should navigate to when clicked."
258
+ "text": "Specifies the URL or web address that the Terms of Service link\n in the app footer should navigate to when clicked."
259
259
  },
260
260
  "attribute": "term-of-use-url",
261
261
  "reflect": false,
@@ -281,7 +281,7 @@ export class VegaAppFooter {
281
281
  "name": "vegaVersion",
282
282
  "text": "1.27.3"
283
283
  }],
284
- "text": "Specifies the target window or browsing context in which\n the Terms of Use URL should be opened\n when the user clicks on the link."
284
+ "text": "Specifies the target window or browsing context in which\n the Terms of Service URL should be opened\n when the user clicks on the link."
285
285
  },
286
286
  "attribute": "term-of-use-url-target",
287
287
  "reflect": false,
@@ -302,7 +302,7 @@ export class VegaAppFooter {
302
302
  "name": "vegaVersion",
303
303
  "text": "2.54.0"
304
304
  }],
305
- "text": "Specifies the unique identifier for the Terms of Use Link."
305
+ "text": "Specifies the unique identifier for the Terms of Service link."
306
306
  },
307
307
  "attribute": "term-of-use-url-id",
308
308
  "reflect": false
@@ -321,12 +321,15 @@ export class VegaAppFooter {
321
321
  "tags": [{
322
322
  "name": "vegaVersion",
323
323
  "text": "1.15.0"
324
+ }, {
325
+ "name": "defaultValue",
326
+ "text": "Privacy Notice"
324
327
  }],
325
- "text": "Specifies the label or text to be displayed\n for the Privacy Policy link in the app footer."
328
+ "text": "Specifies the label or text to be displayed\n for the Privacy Notice link in the app footer."
326
329
  },
327
330
  "attribute": "privacy-policy-label",
328
331
  "reflect": false,
329
- "defaultValue": "'Privacy Policy'"
332
+ "defaultValue": "'Privacy Notice'"
330
333
  },
331
334
  "privacyPolicyUrl": {
332
335
  "type": "string",
@@ -344,9 +347,9 @@ export class VegaAppFooter {
344
347
  "text": "1.15.0"
345
348
  }, {
346
349
  "name": "defaultValue",
347
- "text": "https://www.globalpayments.com/privacy-statement"
350
+ "text": "https://noticesandpolicies.globalpayments.com/genius-product-privacy-notice-for-merchant-users"
348
351
  }],
349
- "text": "Specifies the URL or web address that the\n Privacy Policy link in the app footer should\n navigate to when clicked."
352
+ "text": "Specifies the URL or web address that the\n Privacy Notice link in the app footer should\n navigate to when clicked."
350
353
  },
351
354
  "attribute": "privacy-policy-url",
352
355
  "reflect": false,
@@ -372,7 +375,7 @@ export class VegaAppFooter {
372
375
  "name": "vegaVersion",
373
376
  "text": "1.27.3"
374
377
  }],
375
- "text": "Specifies the target window or browsing context\n in which the Privacy Policy URL should be opened\n when the user clicks on the link."
378
+ "text": "Specifies the target window or browsing context\n in which the Privacy Notice URL should be opened\n when the user clicks on the link."
376
379
  },
377
380
  "attribute": "privacy-policy-url-target",
378
381
  "reflect": false,
@@ -393,7 +396,7 @@ export class VegaAppFooter {
393
396
  "name": "vegaVersion",
394
397
  "text": "2.54.0"
395
398
  }],
396
- "text": "Specifies the unique identifier for the Privacy Policy Link."
399
+ "text": "Specifies the unique identifier for the Privacy Notice link."
397
400
  },
398
401
  "attribute": "privacy-policy-url-id",
399
402
  "reflect": false
@@ -413,7 +416,7 @@ export class VegaAppFooter {
413
416
  "name": "vegaVersion",
414
417
  "text": "1.35.1"
415
418
  }],
416
- "text": "Specifies whether to hide the default Term of Use\n and Privacy Policy links."
419
+ "text": "Specifies whether to hide the default Terms of Service\n and Privacy Notice links."
417
420
  },
418
421
  "attribute": "hide-default-links",
419
422
  "reflect": false,
@@ -163,8 +163,8 @@ export class VegaRichTextEditorRenderer extends VegaSlimmer {
163
163
  }
164
164
  renderContent() {
165
165
  return (h(Fragment, null,
166
- this.renderTextContent(),
167
- this.richTextEditorSourceViewRenderer.render()));
166
+ this.richTextEditorSourceViewRenderer.render(),
167
+ this.renderTextContent()));
168
168
  }
169
169
  }
170
170
  __decorate([
@@ -9,6 +9,7 @@ import { h } from '@stencil/core';
9
9
  import CodeFormatter from '../../../../helpers/code-format/code-formatter';
10
10
  import { DomNodeSubjectObserverFactory } from '../../../../helpers/change-manager/subject/dom-node-subject/dom-node-subject-observer-factory';
11
11
  import { VegaInternalCodeBlockBlur } from '../../../../helpers/event-manager/event-id/vega-internal-event-id';
12
+ import { VegaChange } from '../../../../helpers/event-manager/event-id/vega-event-id';
12
13
  import { VegaRTEContent } from '../../dto/content-state';
13
14
  import extensionContextManager from '../../helpers/extension-context-manager';
14
15
  /**
@@ -18,6 +19,7 @@ export class VegaRichTextEditorSourceViewRenderer extends VegaSlimmer {
18
19
  constructor() {
19
20
  super(...arguments);
20
21
  this.prevRecord = '';
22
+ this.sourceViewCode = null;
21
23
  /**
22
24
  * Handle the blur event of the code block. When the code block loses focus, emit the source code change event with the current source code.
23
25
  */
@@ -40,6 +42,24 @@ export class VegaRichTextEditorSourceViewRenderer extends VegaSlimmer {
40
42
  }
41
43
  }
42
44
  };
45
+ /**
46
+ * Updates source-mode validation without committing the raw source text to the editor value.
47
+ * This preserves the active source edit while immediately updating error UI.
48
+ */
49
+ this.handleSourceCodeChange = async (payload) => {
50
+ var _a, _b;
51
+ if (!this.sourceView)
52
+ return;
53
+ const filterInlineStyles = Boolean(this.sourceEditConfig.filterInlineStyles);
54
+ const blockBoundaryRegistry = (_a = extensionContextManager.getExtensionContext(this.host)) === null || _a === void 0 ? void 0 : _a.blockBoundaryRegistry;
55
+ this.sourceViewCode = payload.detail.code;
56
+ this.sourceValidationValue = VegaRTEContent.fromHtml(payload.detail.code, {
57
+ autoMatchFormat: (_b = this.sourceEditConfig.autoMatchFormat) !== null && _b !== void 0 ? _b : true,
58
+ filterInlineStyles,
59
+ blockBoundaryRegistry,
60
+ });
61
+ this.formFieldController.notifyValueChange(this.sourceValidationValue);
62
+ };
43
63
  }
44
64
  /**
45
65
  * Clean up the code block blur observer when the component is disconnected to prevent memory leaks.
@@ -47,6 +67,7 @@ export class VegaRichTextEditorSourceViewRenderer extends VegaSlimmer {
47
67
  clearCodeBlockBlurObserver() {
48
68
  if (this.sourceCodeBlockRef) {
49
69
  DomNodeSubjectObserverFactory.removeUniqueObserverFromNode(this.sourceCodeBlockRef, VegaInternalCodeBlockBlur);
70
+ DomNodeSubjectObserverFactory.removeUniqueObserverFromNode(this.sourceCodeBlockRef, VegaChange);
50
71
  }
51
72
  }
52
73
  /**
@@ -59,25 +80,38 @@ export class VegaRichTextEditorSourceViewRenderer extends VegaSlimmer {
59
80
  return this.sourceCodeBlockRef.value.code;
60
81
  }
61
82
  }
83
+ getValidationValue() {
84
+ return this.sourceViewCode === null ? this.value : this.sourceValidationValue;
85
+ }
62
86
  /**
63
87
  * Render the source view, which is a code block for editing the source code of the rich text editor content.
64
88
  *
65
89
  * @returns {Nullable<HTMLElement>} The rendered source view element, or null if source editing is not allowed.
66
90
  */
67
91
  render() {
92
+ var _a;
68
93
  if (!this.allowSourceEdit)
69
94
  return;
70
95
  const sourceCode = this.normalizeSourceCodeForEditing(this.getSourceTemplate());
71
- const sourceViewValue = this.sourceView ? CodeFormatter.format(sourceCode) : '';
96
+ if (!this.sourceView) {
97
+ this.sourceViewCode = null;
98
+ }
99
+ const sourceViewValue = this.sourceView
100
+ ? (_a = this.sourceViewCode) !== null && _a !== void 0 ? _a : CodeFormatter.format(sourceCode)
101
+ : '';
72
102
  // Record the source view value when rendering, which will be used to compare with the current source view value when blurring the code block to determine whether to emit the source code change event.
73
- this.prevRecord = sourceCode;
103
+ if (this.sourceViewCode === null) {
104
+ this.prevRecord = sourceCode;
105
+ }
74
106
  return (h("div", { class: {
75
107
  'source-view-container': true,
108
+ 'error': this.isValid === false,
76
109
  'vega-hidden': !this.sourceView,
77
110
  } },
78
111
  h("vega-code-block", { ref: (ref) => {
79
112
  this.sourceCodeBlockRef = ref;
80
113
  DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, VegaInternalCodeBlockBlur, this.handleCodeBlockBlur);
114
+ DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, VegaChange, this.handleSourceCodeChange);
81
115
  }, disabled: this.disabled, value: { language: 'html', code: sourceViewValue } })));
82
116
  }
83
117
  /**
@@ -119,12 +153,21 @@ __decorate([
119
153
  __decorate([
120
154
  MapToComponentField()
121
155
  ], VegaRichTextEditorSourceViewRenderer.prototype, "value", void 0);
156
+ __decorate([
157
+ MapToComponentField({ writable: true })
158
+ ], VegaRichTextEditorSourceViewRenderer.prototype, "sourceValidationValue", void 0);
159
+ __decorate([
160
+ MapToComponentField()
161
+ ], VegaRichTextEditorSourceViewRenderer.prototype, "isValid", void 0);
122
162
  __decorate([
123
163
  MapToComponentField()
124
164
  ], VegaRichTextEditorSourceViewRenderer.prototype, "disabled", void 0);
125
165
  __decorate([
126
166
  MapToComponentField()
127
167
  ], VegaRichTextEditorSourceViewRenderer.prototype, "sourceEditConfig", void 0);
168
+ __decorate([
169
+ MapToComponentField()
170
+ ], VegaRichTextEditorSourceViewRenderer.prototype, "formFieldController", void 0);
128
171
  __decorate([
129
172
  MapToComponentField()
130
173
  ], VegaRichTextEditorSourceViewRenderer.prototype, "sourceCodeChangeEventEmitter", void 0);
@@ -245,6 +245,22 @@
245
245
  .source-view-container {
246
246
  margin-top: 12px;
247
247
  }
248
+ .source-view-container.error {
249
+ border: 1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));
250
+ border-radius: 8px;
251
+ overflow: hidden;
252
+ }
253
+ .source-view-container.error:hover {
254
+ border: 1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1));
255
+ }
256
+ .source-view-container.error:focus-within {
257
+ outline: 2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));
258
+ outline-offset: 3px;
259
+ border: 1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1));
260
+ }
261
+ .source-view-container.error vega-code-block.focus {
262
+ outline: none;
263
+ }
248
264
  .source-view-container vega-code-block::part(editor-toolbar) {
249
265
  display: none;
250
266
  }
@@ -80,6 +80,7 @@ export class VegaRichTextEditor {
80
80
  validationRulesName: 'validationRules',
81
81
  defaultValue: null,
82
82
  attributeGetter: (propertyName) => this[propertyName],
83
+ validationValueGetter: () => this.sourceView ? this.richTextEditorSourceViewRenderer.getValidationValue() : this.value,
83
84
  inputContainerGetter: () => this.vegaRichTextEditorRenderer.getRichTextContainerRef(),
84
85
  touchableAreaGetter: () => [this.vegaRichTextEditorRenderer.getRichTextContentRef()],
85
86
  });
@@ -127,6 +128,7 @@ export class VegaRichTextEditor {
127
128
  this.selectionMap = new Map();
128
129
  this.isInDarkMode = VegaInternalThemeManager.isDarkMode();
129
130
  this.sourceView = false;
131
+ this.sourceValidationValue = VegaRTEContent.createEmptyContent();
130
132
  /**
131
133
  * Internal state that holds unique toolbar items.
132
134
  * Computed from `toolbarItems` to ensure each button renders only once.
@@ -711,6 +713,7 @@ export class VegaRichTextEditor {
711
713
  "selectionMap": {},
712
714
  "isInDarkMode": {},
713
715
  "sourceView": {},
716
+ "sourceValidationValue": {},
714
717
  "uniqueToolbarItems": {}
715
718
  }; }
716
719
  static get events() { return [{
@@ -1,10 +1,8 @@
1
1
  export const UUID = 'uuid';
2
2
  export const INPUT_TEXT_FOCUS_WIDTH = 2;
3
- export const HEARTLAND_TOS_URL = 'https://www.heartland.us/terms';
4
- export const HEARTLAND_PRIVACY_URL = 'https://www.heartland.us/privacy-policy';
5
3
  export const HEARTLAND_GOOGLE_PRIVACY_POLICY_URL = 'https://policies.google.com/privacy';
6
4
  export const HEARTLAND_GOOGLE_TREMS_SERVICE_URL = 'https://policies.google.com/terms';
7
5
  export const HEARTLAND_CONTENT = `© ${new Date().getFullYear()} Heartland Payment Systems, LLC – a Global Payments company. All rights reserved.`;
8
- export const GLOBALPAYMENTS_TOS_URL = 'https://www.globalpayments.com/terms-of-use';
9
- export const GLOBALPAYMENTS_PRIVACY_URL = 'https://www.globalpayments.com/privacy-statement';
6
+ export const GLOBALPAYMENTS_TOS_URL = 'https://noticesandpolicies.globalpayments.com/software-terms/global-payments-software-terms-of-service';
7
+ export const GLOBALPAYMENTS_PRIVACY_URL = 'https://noticesandpolicies.globalpayments.com/genius-product-privacy-notice-for-merchant-users';
10
8
  export const GLOBALPAYMENTS_CONTENT = `© ${new Date().getFullYear()} Global Payments Inc. All rights reserved.`;
@@ -9,7 +9,7 @@ import { camelToDashCase } from '../../../utils/string';
9
9
  import { FormFieldController, } from '../../validator/form-field-controller';
10
10
  import { FieldErrorControllerSlimmer } from './field-error-controller-silmmer';
11
11
  import changeManager from '../../change-manager/change-manager';
12
- import { FORM_ELEMENT_VALIDATE } from '../../change-manager/subject/static-subject/static-subject-title';
12
+ import { FORM_ELEMENT_VALIDATE, FORM_ELEMENT_VALUE_CHANGE, } from '../../change-manager/subject/static-subject/static-subject-title';
13
13
  import { FormFieldValidInvokeSlimmer } from './form-field-valid-invoke-slimmer';
14
14
  import { MutationObserverSlimmer } from './../mutation-observer/mutation-observer-slimmer';
15
15
  import { AttributeOldValueMutationFilter } from './../mutation-observer/mutation-observer-filters';
@@ -67,6 +67,17 @@ export class FormFieldControllerSlimmer extends VegaSlimmer {
67
67
  componentDidLoad() {
68
68
  methodPlaceholder();
69
69
  }
70
+ /**
71
+ * Notifies the form validation lifecycle that this field's value changed.
72
+ *
73
+ * @param {T} detail - The current value used by the form field.
74
+ */
75
+ notifyValueChange(detail) {
76
+ changeManager.notify(FORM_ELEMENT_VALUE_CHANGE, {
77
+ host: this.host,
78
+ detail,
79
+ });
80
+ }
70
81
  /**
71
82
  * watch the prop validationRules and call the valid method
72
83
  * some components has not a prop validationRules
@@ -219,8 +219,11 @@ export class FormFieldController {
219
219
  * valid function to validate the rules
220
220
  */
221
221
  async valid(triggerStatus, showError = 'rule') {
222
+ var _a;
222
223
  const status = this.getStatus();
223
- const input = this.host.value;
224
+ const input = ((_a = this.options) === null || _a === void 0 ? void 0 : _a.validationValueGetter)
225
+ ? this.options.validationValueGetter()
226
+ : this.host.value;
224
227
  const hasAsyncRules = this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(input, status, triggerStatus);
225
228
  if (hasAsyncRules) {
226
229
  ChangeManager.notify(FORM_FIELD_PENDING_VALID_CHANGE, { host: this.host, detail: null });
@@ -601,8 +601,11 @@ class FormFieldController {
601
601
  * valid function to validate the rules
602
602
  */
603
603
  async valid(triggerStatus, showError = 'rule') {
604
+ var _a;
604
605
  const status = this.getStatus();
605
- const input = this.host.value;
606
+ const input = ((_a = this.options) === null || _a === void 0 ? void 0 : _a.validationValueGetter)
607
+ ? this.options.validationValueGetter()
608
+ : this.host.value;
606
609
  const hasAsyncRules = this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(input, status, triggerStatus);
607
610
  if (hasAsyncRules) {
608
611
  ChangeManager.notify(FORM_FIELD_PENDING_VALID_CHANGE, { host: this.host, detail: null });
@@ -1112,6 +1115,17 @@ class FormFieldControllerSlimmer extends VegaSlimmer {
1112
1115
  */
1113
1116
  componentDidLoad() {
1114
1117
  }
1118
+ /**
1119
+ * Notifies the form validation lifecycle that this field's value changed.
1120
+ *
1121
+ * @param {T} detail - The current value used by the form field.
1122
+ */
1123
+ notifyValueChange(detail) {
1124
+ ChangeManager.notify(FORM_ELEMENT_VALUE_CHANGE, {
1125
+ host: this.host,
1126
+ detail,
1127
+ });
1128
+ }
1115
1129
  /**
1116
1130
  * watch the prop validationRules and call the valid method
1117
1131
  * some components has not a prop validationRules