@useinsider/guido 3.10.0-beta.37c2e49 → 3.10.0-beta.5013269

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 (30) hide show
  1. package/dist/composables/useCortexBlueprintBridge.js +7 -7
  2. package/dist/composables/useCustomInterfaceAppearance.js +18 -16
  3. package/dist/composables/useEmailTemplateApplier.js +9 -9
  4. package/dist/composables/useExport.js +18 -18
  5. package/dist/composables/useHtmlValidator.js +90 -90
  6. package/dist/composables/useStripo.js +51 -53
  7. package/dist/composables/useToaster.js +11 -11
  8. package/dist/composables/useVersionHistoryApi.js +2 -2
  9. package/dist/composables/validators/useLiquidValidator.js +1 -1
  10. package/dist/composables/validators/useUnsubscribeBlockValidator.js +10 -10
  11. package/dist/config/compiler/utils/recommendationCompilerUtils.js +94 -125
  12. package/dist/config/i18n/en/labels.json.js +4 -1
  13. package/dist/enums/toaster.js +2 -2
  14. package/dist/enums/unsubscribe.js +41 -36
  15. package/dist/extensions/Blocks/Checkbox/block.js +5 -3
  16. package/dist/extensions/Blocks/Checkbox/control.js +41 -27
  17. package/dist/extensions/Blocks/RadioButton/block.js +9 -7
  18. package/dist/extensions/Blocks/RadioButton/control.js +63 -49
  19. package/dist/extensions/Blocks/Recommendation/useRecommendationBlockWarning.js +7 -7
  20. package/dist/services/blankTemplate.js +1 -1
  21. package/dist/services/templateLibraryApi.js +7 -8
  22. package/dist/src/enums/toaster.d.ts +2 -2
  23. package/dist/src/enums/unsubscribe.d.ts +2 -0
  24. package/dist/src/stores/toaster.d.ts +3 -2
  25. package/dist/static/styles/components/dropdown-menu.css.js +12 -0
  26. package/dist/static/styles/components/notification.css.js +74 -0
  27. package/dist/stores/toaster.js +10 -10
  28. package/package.json +2 -2
  29. package/dist/composables/useStripoNotifications.js +0 -26
  30. package/dist/src/composables/useStripoNotifications.d.ts +0 -10
@@ -1,35 +1,38 @@
1
1
  import { useTranslations as R } from "../composables/useTranslations.js";
2
- import { ProductType as n } from "../@types/config/schemas.js";
2
+ import { ProductType as s } from "../@types/config/schemas.js";
3
3
  import "../@types/config/defaults.js";
4
- import { getEnvironmentPrefix as S } from "../utils/environmentUtil.js";
5
- const i = {
4
+ import { getEnvironmentPrefix as _ } from "../utils/environmentUtil.js";
5
+ const B = {
6
6
  UNSUBSCRIBE_LINK_TYPE: 1,
7
7
  PREFERENCES_LINK_TYPE: 3
8
- }, B = {
8
+ }, C = {
9
9
  UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
10
10
  DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
11
11
  GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
12
12
  PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
13
- }, s = S(), C = {
14
- UNSUBSCRIBE_URL: `https://mail.${s}.com/user/v1/unsub`,
15
- PREFERENCES_URL: `https://mail.${s}.com/user/v1/prefs`
16
- }, U = {
17
- [n.EMAIL]: "email",
18
- [n.ARCHITECT]: "journey",
19
- [n.UNSUBSCRIBE_PAGES]: "email"
20
- }, o = "iid", r = "G", c = () => ({
13
+ }, e = _(), U = {
14
+ UNSUBSCRIBE_URL: `https://mail.${e}.com/user/v1/unsub`,
15
+ PREFERENCES_URL: `https://mail.${e}.com/user/v1/prefs`
16
+ }, o = {
17
+ [s.EMAIL]: "email",
18
+ [s.ARCHITECT]: "journey",
19
+ [s.UNSUBSCRIBE_PAGES]: "email"
20
+ }, c = "iid", S = "G", N = "P", u = [
21
+ S,
22
+ N
23
+ ], T = () => ({
21
24
  name: R()("onboarding-center.email-subscribers-global-unsub-card-title"),
22
- sendGridId: r
23
- }), u = "/email/unsubscribe-pages", E = {
25
+ sendGridId: S
26
+ }), b = "/email/unsubscribe-pages", E = {
24
27
  GLOBAL_UNSUBSCRIBE: 1,
25
28
  GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
26
29
  SUBSCRIPTION_PREFERENCE_CENTER: 3,
27
30
  SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
28
31
  RESUBSCRIBE: 5
29
- }, b = {
32
+ }, P = {
30
33
  [E.GLOBAL_UNSUBSCRIBE]: "custom-unsubscribe",
31
34
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "custom-preferences"
32
- }, T = {
35
+ }, L = {
33
36
  [E.GLOBAL_UNSUBSCRIBE]: [
34
37
  E.GLOBAL_UNSUBSCRIBE,
35
38
  E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
@@ -39,32 +42,34 @@ const i = {
39
42
  E.SUBSCRIPTION_PREFERENCE_CENTER,
40
43
  E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
41
44
  ]
42
- }, P = () => {
43
- const e = R();
45
+ }, O = () => {
46
+ const n = R();
44
47
  return {
45
- [E.GLOBAL_UNSUBSCRIBE]: e("unsubscription-preference.type-global-unsubscribe"),
46
- [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: e("unsubscription-preference.type-global-unsubscription-confirmation"),
47
- [E.RESUBSCRIBE]: e("unsubscription-preference.type-resubscribe"),
48
- [E.SUBSCRIPTION_PREFERENCE_CENTER]: e("unsubscription-preference.type-subscription-preferences-center"),
49
- [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: e("unsubscription-preference.type-subscription-preferences-confirmation")
48
+ [E.GLOBAL_UNSUBSCRIBE]: n("unsubscription-preference.type-global-unsubscribe"),
49
+ [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: n("unsubscription-preference.type-global-unsubscription-confirmation"),
50
+ [E.RESUBSCRIBE]: n("unsubscription-preference.type-resubscribe"),
51
+ [E.SUBSCRIPTION_PREFERENCE_CENTER]: n("unsubscription-preference.type-subscription-preferences-center"),
52
+ [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: n("unsubscription-preference.type-subscription-preferences-confirmation")
50
53
  };
51
- }, O = {
54
+ }, p = {
52
55
  default: "{{ins-unsubscribe-link}}",
53
56
  [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
54
57
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
55
58
  };
56
59
  export {
57
- r as DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID,
58
- o as INSIDER_ID,
59
- B as LINK_REGEXES,
60
- i as LINK_TYPES,
61
- O as MERGE_TAGS,
60
+ S as DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID,
61
+ c as INSIDER_ID,
62
+ C as LINK_REGEXES,
63
+ B as LINK_TYPES,
64
+ p as MERGE_TAGS,
62
65
  E as PAGE_TYPES,
63
- U as PRODUCT_TYPE_URL_SEGMENTS,
64
- T as TYPE_COLLECTIONS,
65
- u as UNSUBSCRIBE_PAGES_LINK,
66
- b as UNSUBSCRIBE_SYNC_MODULE_TYPES,
67
- C as URLS,
68
- c as getDefaultUnsubscribeGroup,
69
- P as getTypeTranslations
66
+ N as PIXEL_TRACKING_SEND_GRID_ID,
67
+ o as PRODUCT_TYPE_URL_SEGMENTS,
68
+ L as TYPE_COLLECTIONS,
69
+ b as UNSUBSCRIBE_PAGES_LINK,
70
+ u as UNSUBSCRIBE_SENTINEL_SEND_GRID_IDS,
71
+ P as UNSUBSCRIBE_SYNC_MODULE_TYPES,
72
+ U as URLS,
73
+ T as getDefaultUnsubscribeGroup,
74
+ O as getTypeTranslations
70
75
  };
@@ -1,7 +1,7 @@
1
1
  import { Block as e, BlockCompositionType as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { getDefaultTemplate as o } from "./template.js";
3
3
  const r = "checkbox-block";
4
- class s extends e {
4
+ class l extends e {
5
5
  constructor() {
6
6
  super();
7
7
  }
@@ -18,7 +18,9 @@ class s extends e {
18
18
  return this.api.translate("Checkbox Block");
19
19
  }
20
20
  getDescription() {
21
- return this.api.translate("Checkbox Block Description");
21
+ return this.api.translate(
22
+ "Checkbox lets you select Unsubscribe and Preference Type for users to manage their opt-in or opt-out preferences."
23
+ );
22
24
  }
23
25
  getTemplate() {
24
26
  return o();
@@ -29,5 +31,5 @@ class s extends e {
29
31
  }
30
32
  export {
31
33
  r as CHECKBOX_BLOCK_ID,
32
- s as CheckboxBlock
34
+ l as CheckboxBlock
33
35
  };
@@ -1,16 +1,16 @@
1
- var E = Object.defineProperty;
2
- var d = (i, n, e) => n in i ? E(i, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[n] = e;
3
- var o = (i, n, e) => d(i, typeof n != "symbol" ? n + "" : n, e);
4
- import { useHttp as l } from "../../../composables/useHttp.js";
5
- import { getDefaultUnsubscribeGroup as L, DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID as h } from "../../../enums/unsubscribe.js";
6
- import { Control as p, UIElementType as r, UEAttr as t, ModificationDescription as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
- const b = "ui-elements-checkbox", u = "select", { get: C } = l();
8
- class I extends p {
1
+ var p = Object.defineProperty;
2
+ var L = (i, n, e) => n in i ? p(i, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[n] = e;
3
+ var a = (i, n, e) => L(i, typeof n != "symbol" ? n + "" : n, e);
4
+ import { useHttp as h } from "../../../composables/useHttp.js";
5
+ import { getDefaultUnsubscribeGroup as T, PIXEL_TRACKING_SEND_GRID_ID as C, UNSUBSCRIBE_SENTINEL_SEND_GRID_IDS as I } from "../../../enums/unsubscribe.js";
6
+ import { Control as m, UIElementType as r, UEAttr as t, ModificationDescription as S } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
+ const b = "ui-elements-checkbox", E = "select", { get: _ } = h();
8
+ class G extends m {
9
9
  constructor() {
10
10
  super(...arguments);
11
- o(this, "currentNode");
12
- o(this, "selectedUnsubGroup");
13
- o(this, "unsubList", []);
11
+ a(this, "currentNode");
12
+ a(this, "selectedUnsubGroup");
13
+ a(this, "unsubList", []);
14
14
  }
15
15
  getId() {
16
16
  return b;
@@ -19,12 +19,12 @@ class I extends p {
19
19
  if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
20
20
  const e = this.currentNode.getAttribute("id");
21
21
  if (e) {
22
- const s = e === h ? e : Number(e);
22
+ const s = I.includes(e) ? e : Number(e);
23
23
  s && (this.selectedUnsubGroup = s);
24
24
  }
25
25
  }
26
26
  this.api.updateValues({
27
- [u]: this.selectedUnsubGroup
27
+ [E]: this.selectedUnsubGroup
28
28
  });
29
29
  }
30
30
  _getLabel(e, s = `${Math.random()}`) {
@@ -46,17 +46,19 @@ class I extends p {
46
46
  return this.unsubList.map((e) => this._getSelectItem(e.name, e.sendGridId)).join("");
47
47
  }
48
48
  getTemplate() {
49
+ const e = this.api.translate("Unsubscribe & Preference Center Type"), s = this.api.translate("Select Unsubscribe and Preference Type");
49
50
  return `
50
51
  <div class="checkbox-controls-container">
51
52
  <div class="checkbox-select-container container two-columns stretch">
52
53
  <${r.LABEL}
53
- ${t.LABEL.text}="${this.api.translate("Unsubscribe Group")}"
54
+ ${t.LABEL.text}="${e}"
54
55
  ${t.LABEL.name}="${Math.random()}">
55
56
  </${r.LABEL}>
56
57
 
57
58
  <${r.SELECTPICKER}
58
- ${t.SELECTPICKER.name}="${u}"
59
- ${t.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
59
+ ${t.SELECTPICKER.name}="${E}"
60
+ ${t.SELECTPICKER.searchable}="true"
61
+ ${t.SELECTPICKER.placeholder}="${s}">
60
62
  ${this._getSelect()}
61
63
  </${r.SELECTPICKER}>
62
64
  </div>
@@ -64,30 +66,42 @@ class I extends p {
64
66
  `;
65
67
  }
66
68
  _onSelectChange(e) {
67
- this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new m(`Updated text to ${e}`));
69
+ this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new S(`Updated text to ${e}`));
68
70
  }
69
71
  _listenToFormUpdates() {
70
- this.api.onValueChanged(u, (e) => this._onSelectChange(e));
72
+ this.api.onValueChanged(E, (e) => this._onSelectChange(e));
71
73
  }
72
74
  onTemplateNodeUpdated(e) {
73
75
  this.currentNode = e, this._setFormValues();
74
76
  }
75
77
  // eslint-disable-next-line @typescript-eslint/no-misused-promises
76
78
  async onRender() {
77
- const e = await C(
79
+ const e = await _(
78
80
  "/unsubscribe-groups/unsubscribe-list"
79
- ), s = [L(), ...e.data], c = s.map((a) => ({
80
- [t.SELECT_ITEM.text]: a.name,
81
- [t.SELECT_ITEM.value]: a.sendGridId
82
- }));
83
- this.unsubList = s, this.api.setUIEAttribute(
84
- u,
81
+ ), s = {
82
+ name: this.api.translate("Pixel Tracking Opt-in"),
83
+ sendGridId: C
84
+ }, c = [T(), ...e.data], u = (o) => ({
85
+ [t.SELECT_ITEM.text]: o.name,
86
+ [t.SELECT_ITEM.value]: o.sendGridId
87
+ }), l = (o) => ({
88
+ [t.SELECT_ITEM.text]: o,
89
+ [t.SELECT_ITEM.value]: `header:${o}`,
90
+ [t.SELECT_ITEM.disabled]: !0
91
+ }), d = [
92
+ l(this.api.translate("OPT-IN SELECTION")),
93
+ u(s),
94
+ l(this.api.translate("UNSUBSCRIBE GROUPS")),
95
+ ...c.map(u)
96
+ ];
97
+ this.unsubList = [s, ...c], this.api.setUIEAttribute(
98
+ E,
85
99
  t.SELECTPICKER.items,
86
- c
100
+ d
87
101
  ), this._setFormValues(), this._listenToFormUpdates();
88
102
  }
89
103
  }
90
104
  export {
91
105
  b as CHECKBOX_CONTROL_BLOCK_ID,
92
- I as CheckboxControl
106
+ G as CheckboxControl
93
107
  };
@@ -1,7 +1,7 @@
1
- import { Block as t, BlockCompositionType as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { getDefaultTemplate as e } from "./template.js";
1
+ import { Block as t, BlockCompositionType as e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { getDefaultTemplate as o } from "./template.js";
3
3
  const r = "radio-button-block";
4
- class l extends t {
4
+ class i extends t {
5
5
  constructor() {
6
6
  super();
7
7
  }
@@ -12,16 +12,18 @@ class l extends t {
12
12
  return "radio-button-icon";
13
13
  }
14
14
  getBlockCompositionType() {
15
- return o.CONTAINER;
15
+ return e.CONTAINER;
16
16
  }
17
17
  getName() {
18
18
  return this.api.translate("Radio Button Block");
19
19
  }
20
20
  getDescription() {
21
- return this.api.translate("Radio Button Block Description");
21
+ return this.api.translate(
22
+ "Radio button lets you select Unsubscribe and Preference Type for users to manage their opt-in or opt-out preferences."
23
+ );
22
24
  }
23
25
  getTemplate() {
24
- return e();
26
+ return o();
25
27
  }
26
28
  allowInnerBlocksDND() {
27
29
  return !1;
@@ -29,5 +31,5 @@ class l extends t {
29
31
  }
30
32
  export {
31
33
  r as BLOCK_ID,
32
- l as RadioButtonCustomBlock
34
+ i as RadioButtonCustomBlock
33
35
  };
@@ -1,93 +1,107 @@
1
- var E = Object.defineProperty;
2
- var d = (r, n, t) => n in r ? E(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
- var o = (r, n, t) => d(r, typeof n != "symbol" ? n + "" : n, t);
4
- import { useHttp as l } from "../../../composables/useHttp.js";
5
- import { getDefaultUnsubscribeGroup as L, DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID as p } from "../../../enums/unsubscribe.js";
6
- import { Control as h, UIElementType as i, UEAttr as e, ModificationDescription as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
- const b = "ui-elements-radio-button", u = "select", { get: $ } = l();
8
- class I extends h {
1
+ var p = Object.defineProperty;
2
+ var L = (i, n, e) => n in i ? p(i, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[n] = e;
3
+ var a = (i, n, e) => L(i, typeof n != "symbol" ? n + "" : n, e);
4
+ import { useHttp as T } from "../../../composables/useHttp.js";
5
+ import { getDefaultUnsubscribeGroup as h, PIXEL_TRACKING_SEND_GRID_ID as I, UNSUBSCRIBE_SENTINEL_SEND_GRID_IDS as m } from "../../../enums/unsubscribe.js";
6
+ import { Control as C, UIElementType as r, UEAttr as t, ModificationDescription as S } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
+ const b = "ui-elements-radio-button", E = "select", { get: _ } = T();
8
+ class G extends C {
9
9
  constructor() {
10
10
  super(...arguments);
11
- o(this, "currentNode");
12
- o(this, "selectedUnsubGroup");
13
- o(this, "unsubList", []);
11
+ a(this, "currentNode");
12
+ a(this, "selectedUnsubGroup");
13
+ a(this, "unsubList", []);
14
14
  }
15
15
  getId() {
16
16
  return b;
17
17
  }
18
18
  _setFormValues() {
19
19
  if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
20
- const t = this.currentNode.getAttribute("id");
21
- if (t) {
22
- const s = t === p ? t : Number(t);
20
+ const e = this.currentNode.getAttribute("id");
21
+ if (e) {
22
+ const s = m.includes(e) ? e : Number(e);
23
23
  s && (this.selectedUnsubGroup = s);
24
24
  }
25
25
  }
26
26
  this.api.updateValues({
27
- [u]: this.selectedUnsubGroup
27
+ [E]: this.selectedUnsubGroup
28
28
  });
29
29
  }
30
- _getLabel(t, s = `${Math.random()}`) {
30
+ _getLabel(e, s = `${Math.random()}`) {
31
31
  return `
32
- <${i.LABEL}
33
- ${e.LABEL.text}="${t}"
34
- ${e.LABEL.name}="${s}">
35
- </${i.LABEL}>
32
+ <${r.LABEL}
33
+ ${t.LABEL.text}="${e}"
34
+ ${t.LABEL.name}="${s}">
35
+ </${r.LABEL}>
36
36
  `;
37
37
  }
38
- _getSelectItem(t, s) {
38
+ _getSelectItem(e, s) {
39
39
  return `
40
- <${i.SELECT_ITEM}
41
- ${e.SELECT_ITEM.text}="${t}"
42
- ${e.SELECT_ITEM.value}="${s}">
43
- </${i.SELECT_ITEM}>`;
40
+ <${r.SELECT_ITEM}
41
+ ${t.SELECT_ITEM.text}="${e}"
42
+ ${t.SELECT_ITEM.value}="${s}">
43
+ </${r.SELECT_ITEM}>`;
44
44
  }
45
45
  _getSelect() {
46
- return this.unsubList.map((t) => this._getSelectItem(t.name, t.sendGridId)).join("");
46
+ return this.unsubList.map((e) => this._getSelectItem(e.name, e.sendGridId)).join("");
47
47
  }
48
48
  getTemplate() {
49
+ const e = this.api.translate("Unsubscribe & Preference Center Type"), s = this.api.translate("Select Unsubscribe and Preference Type");
49
50
  return `
50
51
  <div class="checkbox-controls-container">
51
52
  <div class="checkbox-select-container container two-columns stretch">
52
- <${i.LABEL}
53
- ${e.LABEL.text}="${this.api.translate("Unsubscribe Group")}"
54
- ${e.LABEL.name}="${Math.random()}">
55
- </${i.LABEL}>
53
+ <${r.LABEL}
54
+ ${t.LABEL.text}="${e}"
55
+ ${t.LABEL.name}="${Math.random()}">
56
+ </${r.LABEL}>
56
57
 
57
- <${i.SELECTPICKER}
58
- ${e.SELECTPICKER.name}="${u}"
59
- ${e.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
58
+ <${r.SELECTPICKER}
59
+ ${t.SELECTPICKER.name}="${E}"
60
+ ${t.SELECTPICKER.searchable}="true"
61
+ ${t.SELECTPICKER.placeholder}="${s}">
60
62
  ${this._getSelect()}
61
- </${i.SELECTPICKER}>
63
+ </${r.SELECTPICKER}>
62
64
  </div>
63
65
  </div>
64
66
  `;
65
67
  }
66
- _onSelectChange(t) {
67
- this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new m(`Updated text to ${t}`));
68
+ _onSelectChange(e) {
69
+ this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new S(`Updated text to ${e}`));
68
70
  }
69
71
  _listenToFormUpdates() {
70
- this.api.onValueChanged(u, (t) => this._onSelectChange(t));
72
+ this.api.onValueChanged(E, (e) => this._onSelectChange(e));
71
73
  }
72
- onTemplateNodeUpdated(t) {
73
- this.currentNode = t, this._setFormValues();
74
+ onTemplateNodeUpdated(e) {
75
+ this.currentNode = e, this._setFormValues();
74
76
  }
75
77
  // eslint-disable-next-line @typescript-eslint/no-misused-promises
76
78
  async onRender() {
77
- const t = await $(
79
+ const e = await _(
78
80
  "/unsubscribe-groups/unsubscribe-list"
79
- ), s = [L(), ...t.data], c = s.map((a) => ({
80
- [e.SELECT_ITEM.text]: a.name,
81
- [e.SELECT_ITEM.value]: a.sendGridId
82
- }));
83
- this.unsubList = s, this.api.setUIEAttribute(
84
- u,
85
- e.SELECTPICKER.items,
86
- c
81
+ ), s = {
82
+ name: this.api.translate("Pixel Tracking Opt-in"),
83
+ sendGridId: I
84
+ }, u = [h(), ...e.data], c = (o) => ({
85
+ [t.SELECT_ITEM.text]: o.name,
86
+ [t.SELECT_ITEM.value]: o.sendGridId
87
+ }), d = (o) => ({
88
+ [t.SELECT_ITEM.text]: o,
89
+ [t.SELECT_ITEM.value]: `header:${o}`,
90
+ [t.SELECT_ITEM.disabled]: !0
91
+ }), l = [
92
+ d(this.api.translate("OPT-IN SELECTION")),
93
+ c(s),
94
+ d(this.api.translate("UNSUBSCRIBE GROUPS")),
95
+ ...u.map(c)
96
+ ];
97
+ this.unsubList = [s, ...u], this.api.setUIEAttribute(
98
+ E,
99
+ t.SELECTPICKER.items,
100
+ l
87
101
  ), this._setFormValues(), this._listenToFormUpdates();
88
102
  }
89
103
  }
90
104
  export {
91
105
  b as CONTROL_BLOCK_ID,
92
- I as RadioButtonControl
106
+ G as RadioButtonControl
93
107
  };
@@ -1,16 +1,16 @@
1
- import { useToaster as n } from "../../../composables/useToaster.js";
1
+ import { useToaster as r } from "../../../composables/useToaster.js";
2
2
  import { useTranslations as s } from "../../../composables/useTranslations.js";
3
- import { ToasterTypeOptions as r } from "../../../enums/toaster.js";
3
+ import { ToasterTypeOptions as n } from "../../../enums/toaster.js";
4
4
  import { countLiveRecommendationBlocks as i } from "./utils/recommendationBlockCount.js";
5
- const c = "newsletter.multiple-reco-blocks-warning", u = () => {
6
- const { showToaster: o } = n(), t = s();
5
+ const a = "newsletter.multiple-reco-blocks-warning", f = () => {
6
+ const { showToaster: o } = r(), t = s();
7
7
  return { warnIfMultipleBlocks: (e) => {
8
8
  i(e) > 1 && o({
9
- type: r.Info,
10
- message: t(c)
9
+ type: n.Dark,
10
+ message: t(a)
11
11
  });
12
12
  } };
13
13
  };
14
14
  export {
15
- u as useRecommendationBlockWarning
15
+ f as useRecommendationBlockWarning
16
16
  };
@@ -26,7 +26,7 @@ const u = (e) => new Promise((t) => {
26
26
  } catch (o) {
27
27
  console.error(`Failed to fetch blank template (attempt ${r}/${a}):`, o), r < a && await u(r * f);
28
28
  }
29
- return e({ type: p.Error, message: t("errors-pages.undefined-response") }), { html: "", css: "" };
29
+ return e({ type: p.Alert, message: t("errors-pages.undefined-response") }), { html: "", css: "" };
30
30
  } };
31
31
  };
32
32
  export {
@@ -4,12 +4,11 @@ import { useToaster as C } from "../composables/useToaster.js";
4
4
  import { useTranslations as h } from "../composables/useTranslations.js";
5
5
  import { useLiquidValidator as S } from "../composables/validators/useLiquidValidator.js";
6
6
  import { EditorType as v } from "../enums/defaults.js";
7
- import { ToasterTypeOptions as N } from "../enums/toaster.js";
8
- import { useRecommendationExtensionStore as x } from "../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import { useSaveAsTemplateStore as E } from "../stores/save-as-template.js";
7
+ import { useRecommendationExtensionStore as N } from "../extensions/Blocks/Recommendation/store/recommendation.js";
8
+ import { useSaveAsTemplateStore as x } from "../stores/save-as-template.js";
10
9
  import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
11
10
  import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
12
- const j = () => {
11
+ const $ = () => {
13
12
  const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: g } = S(), u = h();
14
13
  return {
15
14
  getCategories: async () => {
@@ -40,7 +39,7 @@ const j = () => {
40
39
  createTemplate: async () => {
41
40
  var e, t, d, y;
42
41
  try {
43
- const { prepareTemplateDetails: i } = A(), s = E(), a = await i();
42
+ const { prepareTemplateDetails: i } = A(), s = x(), a = await i();
44
43
  if (p("liquidSyntax") && !await g(a.compiledHtml))
45
44
  return !1;
46
45
  const f = {
@@ -54,7 +53,7 @@ const j = () => {
54
53
  unsubscriptionPreferencePageStatus: !1,
55
54
  unsubscriptionPreferencePages: [],
56
55
  recommendationCampaignUrls: r(
57
- x().recommendationCampaignUrls
56
+ N().recommendationCampaignUrls
58
57
  ),
59
58
  recommendationConfigs: r({}),
60
59
  isGuido: !0,
@@ -75,7 +74,7 @@ const j = () => {
75
74
  "newsletter.template-library-save-alert",
76
75
  { templateName: s.getTemplateName }
77
76
  ),
78
- type: N.Error
77
+ type: "alert"
79
78
  }), !1) : (l({
80
79
  message: u(
81
80
  "newsletter.template-library-save-success",
@@ -90,5 +89,5 @@ const j = () => {
90
89
  };
91
90
  };
92
91
  export {
93
- j as useTemplateLibraryApi
92
+ $ as useTemplateLibraryApi
94
93
  };
@@ -1,6 +1,6 @@
1
1
  export declare enum ToasterTypeOptions {
2
2
  Success = "success",
3
3
  Warning = "warning",
4
- Error = "error",
5
- Info = "information"
4
+ Alert = "alert",
5
+ Dark = "dark"
6
6
  }
@@ -19,6 +19,8 @@ export declare const PRODUCT_TYPE_URL_SEGMENTS: {
19
19
  };
20
20
  export declare const INSIDER_ID = "iid";
21
21
  export declare const DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID = "G";
22
+ export declare const PIXEL_TRACKING_SEND_GRID_ID = "P";
23
+ export declare const UNSUBSCRIBE_SENTINEL_SEND_GRID_IDS: string[];
22
24
  /**
23
25
  * Get the default unsubscribe group lazily so the translated name resolves at access time.
24
26
  * Must be called within a Vue component context or after Pinia is initialized.
@@ -4,14 +4,15 @@ export declare const useToasterStore: import("pinia").StoreDefinition<"guidoToas
4
4
  status: boolean;
5
5
  type: import("@@/Types/toaster").ToasterType;
6
6
  text: string;
7
+ icon: string;
8
+ withIcon: boolean;
7
9
  withoutLeftMargin: boolean;
8
- autoHide: boolean;
9
10
  actionButton?: {
10
11
  text: string;
11
12
  onClick: () => void;
12
13
  } | undefined;
13
14
  } & import("pinia").PiniaCustomStateProperties<ToasterState>) => boolean;
14
15
  }, {
15
- showToaster(this: ToasterState, { type, message, actionButton, autoHide }: ToasterOptions): void;
16
+ showToaster(this: ToasterState, { type, message, actionButton }: ToasterOptions): void;
16
17
  hideToaster(this: ToasterState): void;
17
18
  }>;
@@ -39,6 +39,18 @@ ue-dropdown .service-element.padding-t-3 {
39
39
  color: var(--guido-color-primary-500);
40
40
  }
41
41
 
42
+ /*
43
+ * SD-145233: the pixel-tracking preference dropdown has no native option groups,
44
+ * so its section titles are rendered as disabled items. Present them as
45
+ * non-interactive group headers instead of options: no hover/cursor affordance
46
+ * and a little extra vertical spacing.
47
+ */
48
+ .dropdown__menu .dropdown__item.disabled {
49
+ padding-top: 14px;
50
+ padding-bottom: 8px;
51
+ pointer-events: none;
52
+ }
53
+
42
54
  .menu {
43
55
  padding: 8px 0px;
44
56
  }