@useinsider/guido 3.13.0 → 3.13.1-beta.98d403f

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.
package/README.md CHANGED
@@ -134,7 +134,7 @@ const config: GuidoConfigInput = {
134
134
  // Optional: Editor settings
135
135
  editor?: {
136
136
  locale?: string, // Default: 'en'
137
- translationsPath?: string, // Default: 'window.trans.en'
137
+ translationsPath?: string, // Default: first locale registered on window.trans
138
138
  migrationDate?: number, // Stripo migration timestamp
139
139
  emailHeader?: {
140
140
  senderName?: string,
@@ -1,4 +1,7 @@
1
1
  import { ProductType as a, MessageType as o } from "./schemas.js";
2
+ const i = {
3
+ translationsPath: "window.trans[Object.keys(window.trans)[0]]"
4
+ };
2
5
  a.EMAIL;
3
6
  o.PROMOTIONAL;
4
7
  const e = [
@@ -33,12 +36,13 @@ const e = [
33
36
  "vikingsankara",
34
37
  "stripoeditorlivetest"
35
38
  ];
36
- function n(t) {
39
+ function s(t) {
37
40
  return e.includes(t);
38
41
  }
39
42
  export {
43
+ i as DEFAULT_EDITOR,
40
44
  o as MessageType,
41
45
  a as ProductType,
42
46
  e as TEST_PARTNERS,
43
- n as isTestPartner
47
+ s as isTestPartner
44
48
  };
@@ -1,18 +1,20 @@
1
+ import "../@types/config/schemas.js";
2
+ import { DEFAULT_EDITOR } from "../@types/config/defaults.js";
1
3
  import memoize from "../node_modules/lodash-es/memoize.js";
2
4
  import { ref } from "vue";
3
5
  import { useConfig } from "./useConfig.js";
4
6
  const useTranslations = () => {
5
7
  var o, e;
6
- const { config } = useConfig(), translationsPath = ((e = (o = config.value) == null ? void 0 : o.editor) == null ? void 0 : e.translationsPath) || "window.trans.en", translations = ref(eval(translationsPath)), trans = (n, t) => {
7
- const r = translations.value[n];
8
- return r ? t ? Object.entries(t).reduce(
8
+ const { config } = useConfig(), translationsPath = ((e = (o = config.value) == null ? void 0 : o.editor) == null ? void 0 : e.translationsPath) || DEFAULT_EDITOR.translationsPath, translations = ref(eval(translationsPath)), trans = (t, n) => {
9
+ const r = translations.value[t];
10
+ return r ? n ? Object.entries(n).reduce(
9
11
  (s, [i, a]) => s.replace(new RegExp(`{${i}}`, "g"), String(a)),
10
12
  r
11
- ) : r : (console.warn(`Translation key not found: ${n}`), n);
13
+ ) : r : (console.warn(`Translation key not found: ${t}`), t);
12
14
  };
13
15
  return memoize(
14
16
  trans,
15
- (n, t) => !t || Object.keys(t).length === 0 ? n : JSON.stringify({ key: n, params: t })
17
+ (t, n) => !n || Object.keys(n).length === 0 ? t : JSON.stringify({ key: t, params: n })
16
18
  );
17
19
  };
18
20
  export {
@@ -1,4 +1,4 @@
1
- const c = `
1
+ const r = `
2
2
  <!--[if gte mso 9]>
3
3
  <xml>
4
4
  <o:OfficeDocumentSettings>
@@ -6,15 +6,21 @@ const c = `
6
6
  <o:PixelsPerInch>96</o:PixelsPerInch>
7
7
  </o:OfficeDocumentSettings>
8
8
  </xml>
9
- <![endif]-->`, s = {
9
+ <![endif]-->`, n = {
10
10
  xmlns: "http://www.w3.org/1999/xhtml",
11
11
  "xmlns:o": "urn:schemas-microsoft-com:office:office"
12
- }, r = [
12
+ }, p = `
13
+ <style type="text/css">
14
+ ul, ol { padding: 0px 0px 0px 40px; }
15
+ li p { mso-margin-bottom-alt: 15px; }
16
+ .es-text-ltr ul, .es-text-ltr ol { padding: 0px 0px 0px 40px; }
17
+ .es-text-rtl ol, .es-text-rtl ul { padding: 0px 40px 0px 0px; }
18
+ </style>`, l = [
13
19
  {
14
20
  id: "append-office-xml",
15
21
  description: "Appending office XML into the head if it does not exist.",
16
22
  type: "custom",
17
- processor: (e) => e.includes("<o:OfficeDocumentSettings>") ? e : e.replace("</head>", `${c}</head>`),
23
+ processor: (e) => e.includes("<o:OfficeDocumentSettings>") ? e : e.replace("</head>", `${r}</head>`),
18
24
  priority: 70
19
25
  },
20
26
  {
@@ -23,14 +29,21 @@ const c = `
23
29
  type: "custom",
24
30
  processor: (e) => {
25
31
  let t = e;
26
- return Object.entries(s).forEach(([o, i]) => {
27
- const n = new RegExp(`${o}="[^"]*"`);
28
- t.search(n) === -1 && (t = t.replace("<html", `<html ${o}="${i}"`));
32
+ return Object.entries(n).forEach(([o, i]) => {
33
+ const s = new RegExp(`${o}="[^"]*"`);
34
+ t.search(s) === -1 && (t = t.replace("<html", `<html ${o}="${i}"`));
29
35
  }), t;
30
36
  },
31
37
  priority: 71
38
+ },
39
+ {
40
+ id: "append-outlook-list-css",
41
+ description: "Appending Outlook list rules into the head if the base CSS does not already carry them.",
42
+ type: "custom",
43
+ processor: (e) => e.includes("mso-margin-bottom-alt") ? e : e.replace("</head>", `${p}</head>`),
44
+ priority: 73
32
45
  }
33
46
  ];
34
47
  export {
35
- r as outlookCompilerRules
48
+ l as outlookCompilerRules
36
49
  };
@@ -0,0 +1,9 @@
1
+ import { createBlockBackgroundColorControl as o } from "../../../controlFactories.js";
2
+ const c = "checkbox-block-background-color-control", r = ".checkbox-block-v2", k = o(
3
+ c,
4
+ r
5
+ );
6
+ export {
7
+ c as CHECKBOX_BLOCK_BACKGROUND_CONTROL_ID,
8
+ k as CheckboxBlockBackgroundControl
9
+ };
@@ -1,9 +1,10 @@
1
1
  import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { CheckboxBlock as t } from "./block.js";
3
- import { CheckboxControl as e } from "./control.js";
4
- import { CheckboxIconsRegistry as r } from "./iconsRegistry.js";
5
- import { CheckboxBlockSettings as i } from "./settingsPanel.js";
6
- const d = new o().addBlock(t).withSettingsPanelRegistry(i).addControl(e).withIconsRegistry(r).build();
3
+ import { CheckboxControl as r } from "./control.js";
4
+ import { CheckboxBlockBackgroundControl as e } from "./controls/blockBackground/index.js";
5
+ import { CheckboxIconsRegistry as i } from "./iconsRegistry.js";
6
+ import { CheckboxBlockSettings as n } from "./settingsPanel.js";
7
+ const C = new o().addBlock(t).withSettingsPanelRegistry(n).addControl(r).addControl(e).withIconsRegistry(i).build();
7
8
  export {
8
- d as default
9
+ C as default
9
10
  };
@@ -1,25 +1,26 @@
1
- import { SettingsPanelRegistry as C, SettingsPanelTab as t, SettingsTab as e, ContainerControls as n, TextControls as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { CHECKBOX_BLOCK_ID as s } from "./block.js";
3
- import { CHECKBOX_CONTROL_BLOCK_ID as T } from "./control.js";
4
- class l extends C {
5
- registerBlockControls(o) {
6
- o[s] = [
1
+ import { SettingsPanelRegistry as C, SettingsPanelTab as t, SettingsTab as o, ContainerControls as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { CHECKBOX_BLOCK_ID as n } from "./block.js";
3
+ import { CHECKBOX_CONTROL_BLOCK_ID as i } from "./control.js";
4
+ import { CHECKBOX_BLOCK_BACKGROUND_CONTROL_ID as s } from "./controls/blockBackground/index.js";
5
+ class m extends C {
6
+ registerBlockControls(e) {
7
+ e[n] = [
7
8
  new t(
8
- e.SETTINGS,
9
+ o.SETTINGS,
9
10
  [
10
- T,
11
- n.EXTERNAL_INDENTS
11
+ i,
12
+ r.EXTERNAL_INDENTS
12
13
  ]
13
14
  ),
14
15
  new t(
15
- e.STYLES,
16
+ o.STYLES,
16
17
  [
17
- r.TEXT_BLOCK_BACKGROUND_COLOR
18
+ s
18
19
  ]
19
20
  )
20
21
  ];
21
22
  }
22
23
  }
23
24
  export {
24
- l as CheckboxBlockSettings
25
+ m as CheckboxBlockSettings
25
26
  };
@@ -0,0 +1,9 @@
1
+ import { createBlockBackgroundColorControl as o } from "../../../controlFactories.js";
2
+ const t = "radio-button-block-background-color-control", r = ".radio-button-v2", n = o(
3
+ t,
4
+ r
5
+ );
6
+ export {
7
+ t as RADIO_BUTTON_BLOCK_BACKGROUND_CONTROL_ID,
8
+ n as RadioButtonBlockBackgroundControl
9
+ };
@@ -1,9 +1,10 @@
1
1
  import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { RadioButtonCustomBlock as t } from "./block.js";
3
3
  import { RadioButtonControl as i } from "./control.js";
4
- import { RadioButtonIconsRegistry as n } from "./iconsRegistry.js";
5
- import { RadioButtonBlockSettingsPanel as r } from "./settingsPanel.js";
6
- const l = new o().addBlock(t).withSettingsPanelRegistry(r).addControl(i).withIconsRegistry(n).build();
4
+ import { RadioButtonBlockBackgroundControl as n } from "./controls/blockBackground/index.js";
5
+ import { RadioButtonIconsRegistry as r } from "./iconsRegistry.js";
6
+ import { RadioButtonBlockSettingsPanel as d } from "./settingsPanel.js";
7
+ const u = new o().addBlock(t).withSettingsPanelRegistry(d).addControl(i).addControl(n).withIconsRegistry(r).build();
7
8
  export {
8
- l as default
9
+ u as default
9
10
  };
@@ -1,13 +1,14 @@
1
- import { SettingsPanelRegistry as r, SettingsPanelTab as t, SettingsTab as o, ContainerControls as e, TextControls as s } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { BLOCK_ID as T } from "./block.js";
3
- import { CONTROL_BLOCK_ID as i } from "./control.js";
4
- class a extends r {
1
+ import { SettingsPanelRegistry as r, SettingsPanelTab as t, SettingsTab as o, ContainerControls as e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { BLOCK_ID as i } from "./block.js";
3
+ import { CONTROL_BLOCK_ID as O } from "./control.js";
4
+ import { RADIO_BUTTON_BLOCK_BACKGROUND_CONTROL_ID as T } from "./controls/blockBackground/index.js";
5
+ class I extends r {
5
6
  registerBlockControls(n) {
6
- n[T] = [
7
+ n[i] = [
7
8
  new t(
8
9
  o.SETTINGS,
9
10
  [
10
- i,
11
+ O,
11
12
  e.EXTERNAL_INDENTS,
12
13
  e.DISPLAY_CONDITIONS
13
14
  ]
@@ -15,12 +16,12 @@ class a extends r {
15
16
  new t(
16
17
  o.STYLES,
17
18
  [
18
- s.TEXT_BLOCK_BACKGROUND_COLOR
19
+ T
19
20
  ]
20
21
  )
21
22
  ];
22
23
  }
23
24
  }
24
25
  export {
25
- a as RadioButtonBlockSettingsPanel
26
+ I as RadioButtonBlockSettingsPanel
26
27
  };
@@ -1,80 +1,80 @@
1
1
  import { TextAlignBuiltInControl as C, TextColorBuiltInControl as x, TextSizeBuiltInControl as T, TextStyleBuiltInControl as B, TextFontFamilyBuiltInControl as m, ButtonBackgroundColorBuiltInControl as d, TextPaddingsBuiltInControl as y, ImageSizeBuiltInControl as b, ImageMarginsBuiltInControl as I, ButtonAlignBuiltInControl as S, ButtonBorderBuiltInControl as A, ButtonBorderRadiusBuiltInControl as k, ButtonColorBuiltInControl as N, ButtonFontFamilyBuiltInControl as h, ButtonMarginsBuiltInControl as p, ButtonPaddingsBuiltInControl as $, ButtonTextBuiltInControl as q, ButtonTextSizeBuiltInControl as F, ButtonTextStyleAndFontColorBuiltInControl as v, ButtonFitToContainerBuiltInControl as R, TextLineSpacingBuiltInControl as M } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  const O = "buttonTextStyleForm", a = "backgroundColor", g = /* @__PURE__ */ new Set(["", "transparent", "rgba(0, 0, 0, 0)"]), _ = ["elementColor", a], E = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
3
- function P(o, n, r) {
3
+ function P(o, e, r) {
4
4
  return class extends C {
5
5
  getId() {
6
6
  return o;
7
7
  }
8
- getTargetNodes(e) {
9
- if (!n || !r)
10
- return [e];
11
- const t = e.closest(r);
12
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
8
+ getTargetNodes(n) {
9
+ if (!e || !r)
10
+ return [n];
11
+ const t = n.closest(r);
12
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
13
13
  }
14
14
  };
15
15
  }
16
- function H(o, n, r) {
16
+ function H(o, e, r) {
17
17
  return class extends x {
18
18
  getId() {
19
19
  return o;
20
20
  }
21
- getTargetNodes(e) {
22
- if (!n || !r)
23
- return [e];
24
- const t = e.closest(r);
25
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
21
+ getTargetNodes(n) {
22
+ if (!e || !r)
23
+ return [n];
24
+ const t = n.closest(r);
25
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
26
26
  }
27
27
  };
28
28
  }
29
- function U(o, n, r) {
29
+ function U(o, e, r) {
30
30
  return class extends T {
31
31
  getId() {
32
32
  return o;
33
33
  }
34
- getTargetNodes(e) {
35
- if (!n || !r)
36
- return [e];
37
- const t = e.closest(r);
38
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
34
+ getTargetNodes(n) {
35
+ if (!e || !r)
36
+ return [n];
37
+ const t = n.closest(r);
38
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
39
39
  }
40
40
  };
41
41
  }
42
- function Y(o, n, r) {
42
+ function Y(o, e, r) {
43
43
  return class extends B {
44
44
  getId() {
45
45
  return o;
46
46
  }
47
- getTargetNodes(e) {
48
- if (!n || !r)
49
- return [e];
50
- const t = e.closest(r);
51
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
47
+ getTargetNodes(n) {
48
+ if (!e || !r)
49
+ return [n];
50
+ const t = n.closest(r);
51
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
52
52
  }
53
53
  };
54
54
  }
55
- function G(o, n, r) {
55
+ function G(o, e, r) {
56
56
  return class extends m {
57
57
  getId() {
58
58
  return o;
59
59
  }
60
- getTargetNodes(e) {
61
- if (!n || !r)
62
- return [e];
63
- const t = e.closest(r);
64
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
60
+ getTargetNodes(n) {
61
+ if (!e || !r)
62
+ return [n];
63
+ const t = n.closest(r);
64
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
65
65
  }
66
66
  };
67
67
  }
68
- function V(o, n, r) {
68
+ function V(o, e, r) {
69
69
  return class extends d {
70
70
  getId() {
71
71
  return o;
72
72
  }
73
- getTargetNodes(e) {
74
- if (!n || !r)
75
- return [e];
76
- const t = e.closest(r);
77
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
73
+ getTargetNodes(n) {
74
+ if (!e || !r)
75
+ return [n];
76
+ const t = n.closest(r);
77
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
78
78
  }
79
79
  /**
80
80
  * Mirrors the picked background onto each target cell as an INLINE style.
@@ -85,8 +85,8 @@ function V(o, n, r) {
85
85
  * (SD-143023). Writing the inline here keeps it the single source of truth and in
86
86
  * sync on every edit. Merged into the parent control's single patch (no extra apply).
87
87
  */
88
- getAdditionalModifications(e) {
89
- const t = this.getTargetNodes(e);
88
+ getAdditionalModifications(n) {
89
+ const t = this.getTargetNodes(n);
90
90
  if (!t.length)
91
91
  return;
92
92
  const i = this.api.getValues()[a], l = !i || g.has(i), s = this.api.getDocumentModifier();
@@ -98,23 +98,25 @@ function V(o, n, r) {
98
98
  };
99
99
  }
100
100
  function K(o) {
101
- const n = _.find((e) => e in o);
102
- if (!n)
101
+ const e = _.find((n) => n in o);
102
+ if (!e)
103
103
  return;
104
- const r = o[n];
104
+ const r = o[e];
105
105
  return typeof r == "string" ? r : "";
106
106
  }
107
- function L(o, n) {
108
- return n.startsWith(".") && "hasClass" in o && o.hasClass(n.slice(1));
107
+ function L(o, e) {
108
+ return e.startsWith(".") && "hasClass" in o && o.hasClass(e.slice(1));
109
109
  }
110
- function z(o, n) {
110
+ function z(o, e) {
111
+ if (!e)
112
+ return o;
111
113
  try {
112
- return L(o, n) ? o : o.closest(n) ?? void 0;
114
+ return L(o, e) ? o : o.closest(e) ?? void 0;
113
115
  } catch {
114
116
  return;
115
117
  }
116
118
  }
117
- function w(o, n) {
119
+ function w(o, e) {
118
120
  return class extends d {
119
121
  getId() {
120
122
  return o;
@@ -125,8 +127,8 @@ function w(o, n) {
125
127
  }
126
128
  /** Guard: redirect the borrowed button parent onto the block `<td>` so it never paints the Buy buttons. */
127
129
  getTargetNodes(r) {
128
- const e = z(r, n);
129
- return e ? [e] : [];
130
+ const n = z(r, e);
131
+ return n ? [n] : [];
130
132
  }
131
133
  /**
132
134
  * Writes the picked background onto the block as an inline style plus a `bgcolor`
@@ -135,147 +137,147 @@ function w(o, n) {
135
137
  * channel Outlook honours on a `<td>`, and matches what the migrator emits.
136
138
  */
137
139
  getAdditionalModifications(r) {
138
- const [e] = this.getTargetNodes(r);
139
- if (!e)
140
+ const [n] = this.getTargetNodes(r);
141
+ if (!n)
140
142
  return;
141
143
  const t = K(this.api.getValues());
142
144
  if (t === void 0)
143
145
  return;
144
- const i = !t || g.has(t), l = this.api.getDocumentModifier(), s = l.modifyHtml(e);
146
+ const i = !t || g.has(t), l = this.api.getDocumentModifier(), s = l.modifyHtml(n);
145
147
  return i ? s.removeStyle("background-color").removeAttribute("bgcolor") : (s.setStyle("background-color", t), E.test(t) ? s.setAttribute("bgcolor", t) : s.removeAttribute("bgcolor")), l;
146
148
  }
147
149
  };
148
150
  }
149
- function W(o, n, r) {
151
+ function W(o, e, r) {
150
152
  return class extends y {
151
153
  getId() {
152
154
  return o;
153
155
  }
154
- getTargetNodes(e) {
155
- if (!n || !r)
156
- return [e];
157
- const t = e.closest(r);
158
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
156
+ getTargetNodes(n) {
157
+ if (!e || !r)
158
+ return [n];
159
+ const t = n.closest(r);
160
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
159
161
  }
160
162
  };
161
163
  }
162
- function X(o, n, r) {
164
+ function X(o, e, r) {
163
165
  return class extends M {
164
166
  getId() {
165
167
  return o;
166
168
  }
167
- getTargetNodes(e) {
168
- return [e];
169
+ getTargetNodes(n) {
170
+ return [n];
169
171
  }
170
172
  };
171
173
  }
172
- function j(o, n, r = ".ins-recommendation-product-container") {
174
+ function j(o, e, r = ".ins-recommendation-product-container") {
173
175
  return class extends S {
174
176
  getId() {
175
177
  return o;
176
178
  }
177
- getTargetNodes(e) {
178
- const t = e.closest(r);
179
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
179
+ getTargetNodes(n) {
180
+ const t = n.closest(r);
181
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
180
182
  }
181
183
  };
182
184
  }
183
- function J(o, n, r = ".ins-recommendation-product-container") {
185
+ function J(o, e, r = ".ins-recommendation-product-container") {
184
186
  return class extends N {
185
187
  getId() {
186
188
  return o;
187
189
  }
188
- getTargetNodes(e) {
189
- const t = e.closest(r);
190
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
190
+ getTargetNodes(n) {
191
+ const t = n.closest(r);
192
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
191
193
  }
192
194
  };
193
195
  }
194
- function Q(o, n, r = ".ins-recommendation-product-container") {
196
+ function Q(o, e, r = ".ins-recommendation-product-container") {
195
197
  return class extends A {
196
198
  getId() {
197
199
  return o;
198
200
  }
199
- getTargetNodes(e) {
200
- const t = e.closest(r);
201
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
201
+ getTargetNodes(n) {
202
+ const t = n.closest(r);
203
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
202
204
  }
203
205
  };
204
206
  }
205
- function Z(o, n, r = ".ins-recommendation-product-container") {
207
+ function Z(o, e, r = ".ins-recommendation-product-container") {
206
208
  return class extends k {
207
209
  getId() {
208
210
  return o;
209
211
  }
210
- getTargetNodes(e) {
211
- const t = e.closest(r);
212
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
212
+ getTargetNodes(n) {
213
+ const t = n.closest(r);
214
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
213
215
  }
214
216
  };
215
217
  }
216
- function tt(o, n, r = ".ins-recommendation-product-container") {
218
+ function tt(o, e, r = ".ins-recommendation-product-container") {
217
219
  return class extends h {
218
220
  getId() {
219
221
  return o;
220
222
  }
221
- getTargetNodes(e) {
222
- const t = e.closest(r);
223
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
223
+ getTargetNodes(n) {
224
+ const t = n.closest(r);
225
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
224
226
  }
225
227
  };
226
228
  }
227
- function et(o, n, r = ".ins-recommendation-product-container") {
229
+ function et(o, e, r = ".ins-recommendation-product-container") {
228
230
  return class extends p {
229
231
  getId() {
230
232
  return o;
231
233
  }
232
- getTargetNodes(e) {
233
- const t = e.closest(r);
234
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
234
+ getTargetNodes(n) {
235
+ const t = n.closest(r);
236
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
235
237
  }
236
238
  };
237
239
  }
238
- function nt(o, n, r = ".ins-recommendation-product-container") {
240
+ function nt(o, e, r = ".ins-recommendation-product-container") {
239
241
  return class extends $ {
240
242
  getId() {
241
243
  return o;
242
244
  }
243
- getTargetNodes(e) {
244
- const t = e.closest(r);
245
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
245
+ getTargetNodes(n) {
246
+ const t = n.closest(r);
247
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
246
248
  }
247
249
  };
248
250
  }
249
- function rt(o, n, r = ".ins-recommendation-product-container") {
251
+ function rt(o, e, r = ".ins-recommendation-product-container") {
250
252
  return class extends q {
251
253
  getId() {
252
254
  return o;
253
255
  }
254
- getTargetNodes(e) {
255
- const t = e.closest(r);
256
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
256
+ getTargetNodes(n) {
257
+ const t = n.closest(r);
258
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
257
259
  }
258
260
  };
259
261
  }
260
- function ot(o, n, r = ".ins-recommendation-product-container") {
262
+ function ot(o, e, r = ".ins-recommendation-product-container") {
261
263
  return class extends F {
262
264
  getId() {
263
265
  return o;
264
266
  }
265
- getTargetNodes(e) {
266
- const t = e.closest(r);
267
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
267
+ getTargetNodes(n) {
268
+ const t = n.closest(r);
269
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
268
270
  }
269
271
  };
270
272
  }
271
- function st(o, n, r) {
273
+ function st(o, e, r) {
272
274
  return class extends v {
273
275
  getId() {
274
276
  return o;
275
277
  }
276
- getTargetNodes(e) {
277
- const t = e.closest(r);
278
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
278
+ getTargetNodes(n) {
279
+ const t = n.closest(r);
280
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
279
281
  }
280
282
  /**
281
283
  * Propagates Bold/Italic to ALL product buttons, not just the focused one.
@@ -287,11 +289,11 @@ function st(o, n, r) {
287
289
  * (`buttonTextStyleForm.{bold,italic}`) because the patched node isn't updated yet
288
290
  * when this runs. Returned modifications are merged into the parent control's patch.
289
291
  */
290
- getAdditionalModifications(e) {
291
- const t = e.closest(r);
292
+ getAdditionalModifications(n) {
293
+ const t = n.closest(r);
292
294
  if (!t)
293
295
  return;
294
- const i = t.querySelectorAll(`[esd-extension-block-id="${n}"] a.es-button`);
296
+ const i = t.querySelectorAll(`[esd-extension-block-id="${e}"] a.es-button`);
295
297
  if (!i.length)
296
298
  return;
297
299
  const l = this.api.getValues()[O];
@@ -304,41 +306,41 @@ function st(o, n, r) {
304
306
  }
305
307
  };
306
308
  }
307
- function it(o, n, r) {
309
+ function it(o, e, r) {
308
310
  return class extends R {
309
311
  getId() {
310
312
  return o;
311
313
  }
312
- getTargetNodes(e) {
313
- const t = e.closest(r);
314
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
314
+ getTargetNodes(n) {
315
+ const t = n.closest(r);
316
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
315
317
  }
316
318
  };
317
319
  }
318
- function lt(o, n, r) {
320
+ function lt(o, e, r) {
319
321
  return class extends b {
320
322
  getId() {
321
323
  return o;
322
324
  }
323
- getTargetNodes(e) {
325
+ getTargetNodes(n) {
324
326
  try {
325
- const t = e.closest(r);
326
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
327
+ const t = n.closest(r);
328
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
327
329
  } catch {
328
330
  return [];
329
331
  }
330
332
  }
331
333
  };
332
334
  }
333
- function ct(o, n, r) {
335
+ function ct(o, e, r) {
334
336
  return class extends I {
335
337
  getId() {
336
338
  return o;
337
339
  }
338
- getTargetNodes(e) {
340
+ getTargetNodes(n) {
339
341
  try {
340
- const t = e.closest(r);
341
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
342
+ const t = n.closest(r);
343
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
342
344
  } catch {
343
345
  return [];
344
346
  }
@@ -1,9 +1,4 @@
1
1
  import type { ModuleAddData, ModuleModifier } from '@@/Types/stripo';
2
- /**
3
- * Host-registered translation key for the "some attributes could not be
4
- * converted" toaster. Guido resolves it against the host's `window.trans.en`;
5
- * the copy is registered host-side.
6
- */
7
2
  export declare const UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY = "dynamic-content.unresolved-attributes-on-drop";
8
3
  /**
9
4
  * Repairs label-form dynamic-content tokens in saved modules as they are dropped
@@ -0,0 +1,15 @@
1
+ export declare const CHECKBOX_BLOCK_BACKGROUND_CONTROL_ID = "checkbox-block-background-color-control";
2
+ export declare const CheckboxBlockBackgroundControl: {
3
+ new (): {
4
+ getId(): string;
5
+ getLabels(): {
6
+ title: string;
7
+ };
8
+ getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
9
+ getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
10
+ getParentControlId(): string;
11
+ api: import("@stripoinc/ui-editor-extensions").ControlApi;
12
+ getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
13
+ isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
14
+ };
15
+ };
@@ -0,0 +1,15 @@
1
+ export declare const RADIO_BUTTON_BLOCK_BACKGROUND_CONTROL_ID = "radio-button-block-background-color-control";
2
+ export declare const RadioButtonBlockBackgroundControl: {
3
+ new (): {
4
+ getId(): string;
5
+ getLabels(): {
6
+ title: string;
7
+ };
8
+ getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
9
+ getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
10
+ getParentControlId(): string;
11
+ api: import("@stripoinc/ui-editor-extensions").ControlApi;
12
+ getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
13
+ isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
14
+ };
15
+ };
@@ -0,0 +1,15 @@
1
+ export declare const BLOCK_BACKGROUND_CONTROL_ID = "{{your-block}}-background-color-control";
2
+ export declare const BlockBackgroundControl: {
3
+ new (): {
4
+ getId(): string;
5
+ getLabels(): {
6
+ title: string;
7
+ };
8
+ getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
9
+ getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
10
+ getParentControlId(): string;
11
+ api: import("@stripoinc/ui-editor-extensions").ControlApi;
12
+ getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
13
+ isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
14
+ };
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.13.0",
3
+ "version": "3.13.1-beta.98d403f",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",