@useinsider/guido 3.12.0-beta.93a1238 → 3.12.0-beta.ab050f8

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.
@@ -1,4 +1,4 @@
1
- var o = /* @__PURE__ */ ((c) => (c.BUTTON_ALIGN = "recommendation-block-button-align-control", c.BUTTON_BORDER = "recommendation-block-button-border-control", c.BUTTON_BORDER_RADIUS = "recommendation-block-button-border-radius-control", c.BUTTON_COLOR = "recommendation-block-button-color-control", c.BUTTON_FIT_TO_CONTENT = "recommendation-block-button-fit-to-content-control", c.BUTTON_FONT_FAMILY = "recommendation-block-button-font-family-control", c.BUTTON_MARGINS = "recommendation-block-button-margins-control", c.BUTTON_PADDINGS = "recommendation-block-button-paddings-control", c.BUTTON_TEXT = "recommendation-block-button-text-control", c.BUTTON_TEXT_SIZE = "recommendation-block-button-text-size-control", c.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "recommendation-block-button-text-style-and-font-color-control", c.NAME_ALIGN = "recommendation-block-name-align-control", c.NAME_BACKGROUND = "recommendation-block-name-background-control", c.NAME_COLOR = "recommendation-block-name-color-control", c.NAME_FONT_FAMILY = "recommendation-block-name-font-family-control", c.NAME_PADDINGS = "recommendation-block-name-paddings-control", c.NAME_SIZE = "recommendation-block-name-size-control", c.NAME_STYLE = "recommendation-block-name-style-control", c.NAME_TEXT_TRIM = "recommendation-block-name-text-trim-control", c.PRICE_ALIGN = "recommendation-block-price-align-control", c.PRICE_BACKGROUND = "recommendation-block-price-background-control", c.PRICE_COLOR = "recommendation-block-price-color-control", c.PRICE_FONT_FAMILY = "recommendation-block-price-font-family-control", c.PRICE_PADDINGS = "recommendation-block-price-paddings-control", c.PRICE_SIZE = "recommendation-block-price-size-control", c.PRICE_STYLE = "recommendation-block-price-style-control", c.OLD_PRICE_ALIGN = "recommendation-block-old-price-align-control", c.OLD_PRICE_BACKGROUND = "recommendation-block-old-price-background-control", c.OLD_PRICE_COLOR = "recommendation-block-old-price-color-control", c.OLD_PRICE_FONT_FAMILY = "recommendation-block-old-price-font-family-control", c.OLD_PRICE_PADDINGS = "recommendation-block-old-price-paddings-control", c.OLD_PRICE_SIZE = "recommendation-block-old-price-size-control", c.OLD_PRICE_STYLE = "recommendation-block-old-price-style-control", c.OMNIBUS_PRICE_ALIGN = "recommendation-block-omnibus-price-align-control", c.OMNIBUS_PRICE_BACKGROUND = "recommendation-block-omnibus-price-background-control", c.OMNIBUS_PRICE_COLOR = "recommendation-block-omnibus-price-color-control", c.OMNIBUS_PRICE_FONT_FAMILY = "recommendation-block-omnibus-price-font-family-control", c.OMNIBUS_PRICE_PADDINGS = "recommendation-block-omnibus-price-paddings-control", c.OMNIBUS_PRICE_SIZE = "recommendation-block-omnibus-price-size-control", c.OMNIBUS_PRICE_STYLE = "recommendation-block-omnibus-price-style-control", c.OMNIBUS_PRICE_TEXT_BEFORE = "recommendation-block-omnibus-price-text-before-control", c.OMNIBUS_PRICE_TEXT_AFTER = "recommendation-block-omnibus-price-text-after-control", c.OMNIBUS_DISCOUNT_ALIGN = "recommendation-block-omnibus-discount-align-control", c.OMNIBUS_DISCOUNT_BACKGROUND = "recommendation-block-omnibus-discount-background-control", c.OMNIBUS_DISCOUNT_COLOR = "recommendation-block-omnibus-discount-color-control", c.OMNIBUS_DISCOUNT_FONT_FAMILY = "recommendation-block-omnibus-discount-font-family-control", c.OMNIBUS_DISCOUNT_PADDINGS = "recommendation-block-omnibus-discount-paddings-control", c.OMNIBUS_DISCOUNT_SIZE = "recommendation-block-omnibus-discount-size-control", c.OMNIBUS_DISCOUNT_STYLE = "recommendation-block-omnibus-discount-style-control", c.OMNIBUS_DISCOUNT_TEXT_BEFORE = "recommendation-block-omnibus-discount-text-before-control", c.OMNIBUS_DISCOUNT_TEXT_AFTER = "recommendation-block-omnibus-discount-text-after-control", c.IMAGE_SIZE = "recommendation-block-image-size-control", c.IMAGE_MARGINS = "recommendation-block-image-margins-control", c.CUSTOM_ATTR_ALIGN = "recommendation-block-custom-attr-align-control", c.CUSTOM_ATTR_BACKGROUND = "recommendation-block-custom-attr-background-control", c.CUSTOM_ATTR_COLOR = "recommendation-block-custom-attr-color-control", c.CUSTOM_ATTR_FONT_FAMILY = "recommendation-block-custom-attr-font-family-control", c.CUSTOM_ATTR_PADDINGS = "recommendation-block-custom-attr-paddings-control", c.CUSTOM_ATTR_SIZE = "recommendation-block-custom-attr-size-control", c.CUSTOM_ATTR_STYLE = "recommendation-block-custom-attr-style-control", c.CUSTOM_ATTR_TEXT_TRIM = "recommendation-block-custom-attr-text-trim-control", c.SYNC_INFO_MESSAGE = "recommendation-block-sync-info-message", c))(o || {});
1
+ var o = /* @__PURE__ */ ((c) => (c.BLOCK_BACKGROUND = "recommendation-block-background-color-control", c.BUTTON_ALIGN = "recommendation-block-button-align-control", c.BUTTON_BORDER = "recommendation-block-button-border-control", c.BUTTON_BORDER_RADIUS = "recommendation-block-button-border-radius-control", c.BUTTON_COLOR = "recommendation-block-button-color-control", c.BUTTON_FIT_TO_CONTENT = "recommendation-block-button-fit-to-content-control", c.BUTTON_FONT_FAMILY = "recommendation-block-button-font-family-control", c.BUTTON_MARGINS = "recommendation-block-button-margins-control", c.BUTTON_PADDINGS = "recommendation-block-button-paddings-control", c.BUTTON_TEXT = "recommendation-block-button-text-control", c.BUTTON_TEXT_SIZE = "recommendation-block-button-text-size-control", c.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "recommendation-block-button-text-style-and-font-color-control", c.NAME_ALIGN = "recommendation-block-name-align-control", c.NAME_BACKGROUND = "recommendation-block-name-background-control", c.NAME_COLOR = "recommendation-block-name-color-control", c.NAME_FONT_FAMILY = "recommendation-block-name-font-family-control", c.NAME_PADDINGS = "recommendation-block-name-paddings-control", c.NAME_SIZE = "recommendation-block-name-size-control", c.NAME_STYLE = "recommendation-block-name-style-control", c.NAME_TEXT_TRIM = "recommendation-block-name-text-trim-control", c.PRICE_ALIGN = "recommendation-block-price-align-control", c.PRICE_BACKGROUND = "recommendation-block-price-background-control", c.PRICE_COLOR = "recommendation-block-price-color-control", c.PRICE_FONT_FAMILY = "recommendation-block-price-font-family-control", c.PRICE_PADDINGS = "recommendation-block-price-paddings-control", c.PRICE_SIZE = "recommendation-block-price-size-control", c.PRICE_STYLE = "recommendation-block-price-style-control", c.OLD_PRICE_ALIGN = "recommendation-block-old-price-align-control", c.OLD_PRICE_BACKGROUND = "recommendation-block-old-price-background-control", c.OLD_PRICE_COLOR = "recommendation-block-old-price-color-control", c.OLD_PRICE_FONT_FAMILY = "recommendation-block-old-price-font-family-control", c.OLD_PRICE_PADDINGS = "recommendation-block-old-price-paddings-control", c.OLD_PRICE_SIZE = "recommendation-block-old-price-size-control", c.OLD_PRICE_STYLE = "recommendation-block-old-price-style-control", c.OMNIBUS_PRICE_ALIGN = "recommendation-block-omnibus-price-align-control", c.OMNIBUS_PRICE_BACKGROUND = "recommendation-block-omnibus-price-background-control", c.OMNIBUS_PRICE_COLOR = "recommendation-block-omnibus-price-color-control", c.OMNIBUS_PRICE_FONT_FAMILY = "recommendation-block-omnibus-price-font-family-control", c.OMNIBUS_PRICE_PADDINGS = "recommendation-block-omnibus-price-paddings-control", c.OMNIBUS_PRICE_SIZE = "recommendation-block-omnibus-price-size-control", c.OMNIBUS_PRICE_STYLE = "recommendation-block-omnibus-price-style-control", c.OMNIBUS_PRICE_TEXT_BEFORE = "recommendation-block-omnibus-price-text-before-control", c.OMNIBUS_PRICE_TEXT_AFTER = "recommendation-block-omnibus-price-text-after-control", c.OMNIBUS_DISCOUNT_ALIGN = "recommendation-block-omnibus-discount-align-control", c.OMNIBUS_DISCOUNT_BACKGROUND = "recommendation-block-omnibus-discount-background-control", c.OMNIBUS_DISCOUNT_COLOR = "recommendation-block-omnibus-discount-color-control", c.OMNIBUS_DISCOUNT_FONT_FAMILY = "recommendation-block-omnibus-discount-font-family-control", c.OMNIBUS_DISCOUNT_PADDINGS = "recommendation-block-omnibus-discount-paddings-control", c.OMNIBUS_DISCOUNT_SIZE = "recommendation-block-omnibus-discount-size-control", c.OMNIBUS_DISCOUNT_STYLE = "recommendation-block-omnibus-discount-style-control", c.OMNIBUS_DISCOUNT_TEXT_BEFORE = "recommendation-block-omnibus-discount-text-before-control", c.OMNIBUS_DISCOUNT_TEXT_AFTER = "recommendation-block-omnibus-discount-text-after-control", c.IMAGE_SIZE = "recommendation-block-image-size-control", c.IMAGE_MARGINS = "recommendation-block-image-margins-control", c.CUSTOM_ATTR_ALIGN = "recommendation-block-custom-attr-align-control", c.CUSTOM_ATTR_BACKGROUND = "recommendation-block-custom-attr-background-control", c.CUSTOM_ATTR_COLOR = "recommendation-block-custom-attr-color-control", c.CUSTOM_ATTR_FONT_FAMILY = "recommendation-block-custom-attr-font-family-control", c.CUSTOM_ATTR_PADDINGS = "recommendation-block-custom-attr-paddings-control", c.CUSTOM_ATTR_SIZE = "recommendation-block-custom-attr-size-control", c.CUSTOM_ATTR_STYLE = "recommendation-block-custom-attr-style-control", c.CUSTOM_ATTR_TEXT_TRIM = "recommendation-block-custom-attr-text-trim-control", c.SYNC_INFO_MESSAGE = "recommendation-block-sync-info-message", c))(o || {});
2
2
  export {
3
3
  o as RecommendationControlId
4
4
  };
@@ -0,0 +1,11 @@
1
+ import { createBlockBackgroundColorControl as o } from "../../../controlFactories.js";
2
+ import { RecommendationControlId as r } from "../../constants/controlIds.js";
3
+ import { BLOCK_ROOT_SELECTOR as t } from "../../constants/selectors.js";
4
+ const C = ".esd-block-text", m = o(
5
+ r.BLOCK_BACKGROUND,
6
+ t,
7
+ C
8
+ );
9
+ export {
10
+ m as BlockBackgroundColorControl
11
+ };
@@ -1,4 +1,4 @@
1
- import { ExtensionBuilder as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
1
+ import { ExtensionBuilder as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { RecommendationBlock as m } from "./block.js";
3
3
  import n from "./canvasPreview.css.js";
4
4
  import { RecommendationBlockControl as i } from "./controls/main/index.js";
@@ -6,42 +6,44 @@ import "./constants/selectors.js";
6
6
  import "./store/recommendation.js";
7
7
  import "./utils/captureStyleTemplates.js";
8
8
  import { NameControls as e } from "./controls/name/index.js";
9
- import { PriceControls as s } from "./controls/price/index.js";
10
- import { OldPriceControls as l } from "./controls/oldPrice/index.js";
9
+ import { PriceControls as l } from "./controls/price/index.js";
10
+ import { OldPriceControls as s } from "./controls/oldPrice/index.js";
11
11
  import { OmnibusPriceControls as p } from "./controls/omnibusPrice/index.js";
12
12
  import { OmnibusDiscountControls as a } from "./controls/omnibusDiscount/index.js";
13
13
  import { ButtonControls as c } from "./controls/button/index.js";
14
- import { ImageControls as f } from "./controls/image/index.js";
15
- import { CustomAttributeControls as C } from "./controls/customAttribute/index.js";
14
+ import { ImageControls as C } from "./controls/image/index.js";
15
+ import { CustomAttributeControls as f } from "./controls/customAttribute/index.js";
16
16
  import { SpacingControl as d } from "./controls/spacing/index.js";
17
- import { CardBackgroundColorControl as u } from "./controls/cardBackground/index.js";
18
- import { RecommendationCardCompositionControl as g } from "./controls/cardComposition/index.js";
19
- import { SyncInfoMessageControl as y } from "./controls/syncInfoMessage.js";
17
+ import { BlockBackgroundColorControl as u } from "./controls/blockBackground/index.js";
18
+ import { CardBackgroundColorControl as g } from "./controls/cardBackground/index.js";
19
+ import { RecommendationCardCompositionControl as y } from "./controls/cardComposition/index.js";
20
+ import { SyncInfoMessageControl as B } from "./controls/syncInfoMessage.js";
20
21
  import { RecommendationIconsRegistry as P } from "./iconsRegistry.js";
21
22
  import R from "./recommendation.css.js";
22
23
  import { SettingsPanel as S } from "./settingsPanel.js";
23
- const w = [
24
+ const k = [
24
25
  e,
25
- s,
26
26
  l,
27
+ s,
27
28
  p,
28
29
  a,
29
30
  c,
30
- f,
31
- C
32
- ], B = [
31
+ C,
32
+ f
33
+ ], w = [
33
34
  i,
34
35
  u,
35
- d,
36
36
  g,
37
- y
37
+ d,
38
+ y,
39
+ B
38
40
  ], b = [
39
- ...B,
40
- ...w.flatMap((o) => Object.values(o))
41
- ], U = b.reduce(
42
- (o, t) => o.addControl(t),
43
- new r().addBlock(m).withSettingsPanelRegistry(S)
41
+ ...w,
42
+ ...k.flatMap((o) => Object.values(o))
43
+ ], W = b.reduce(
44
+ (o, r) => o.addControl(r),
45
+ new t().addBlock(m).withSettingsPanelRegistry(S)
44
46
  ).addStyles(R).withPreviewStyles(n).withIconsRegistry(P).build();
45
47
  export {
46
- U as default
48
+ W as default
47
49
  };
@@ -1,9 +1,9 @@
1
- import { SettingsPanelRegistry as E, SettingsPanelTab as _, SettingsTab as O, ContainerControls as C, TextControls as R } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { BLOCK_ID as U } from "./block.js";
1
+ import { SettingsPanelRegistry as E, SettingsPanelTab as _, SettingsTab as I, ContainerControls as C } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { BLOCK_ID as R } from "./block.js";
3
3
  import { RecommendationBlockId as S } from "./constants/blockIds.js";
4
4
  import { RecommendationControlId as T } from "./constants/controlIds.js";
5
5
  import "./constants/selectors.js";
6
- import { CONTROL_BLOCK_ID as A } from "./controls/main/index.js";
6
+ import { CONTROL_BLOCK_ID as U } from "./controls/main/index.js";
7
7
  import "./store/recommendation.js";
8
8
  import "./utils/captureStyleTemplates.js";
9
9
  import "./controls/name/index.js";
@@ -13,37 +13,38 @@ import "./controls/omnibusPrice/index.js";
13
13
  import "./controls/omnibusDiscount/index.js";
14
14
  import "./controls/button/index.js";
15
15
  import "./controls/image/index.js";
16
- import { SPACING_CONTROL_ID as L } from "./controls/spacing/index.js";
17
- import { CARD_BACKGROUND_COLOR_CONTROL_ID as D } from "./controls/cardBackground/index.js";
18
- import { COMPOSITION_CONTROL_BLOCK_ID as B } from "./controls/cardComposition/index.js";
16
+ import { SPACING_CONTROL_ID as A } from "./controls/spacing/index.js";
17
+ import "./controls/blockBackground/index.js";
18
+ import { CARD_BACKGROUND_COLOR_CONTROL_ID as L } from "./controls/cardBackground/index.js";
19
+ import { COMPOSITION_CONTROL_BLOCK_ID as D } from "./controls/cardComposition/index.js";
19
20
  import { SYNC_INFO_MESSAGE_CONTROL_ID as N } from "./controls/syncInfoMessage.js";
20
- class d extends E {
21
- registerBlockControls(I) {
22
- I[U] = [
21
+ class s extends E {
22
+ registerBlockControls(O) {
23
+ O[R] = [
23
24
  new _(
24
- O.SETTINGS,
25
+ I.SETTINGS,
25
26
  [
26
- A,
27
+ U,
27
28
  C.EXTERNAL_INDENTS
28
29
  ]
29
30
  ),
30
31
  new _(
31
- O.STYLES,
32
+ I.STYLES,
32
33
  [
33
- R.TEXT_BLOCK_BACKGROUND_COLOR,
34
- D,
35
- L
34
+ T.BLOCK_BACKGROUND,
35
+ L,
36
+ A
36
37
  ]
37
38
  ),
38
39
  new _(
39
40
  "Card Composition",
40
41
  [
41
- B
42
+ D
42
43
  ]
43
44
  ).withLabel(this.api.translate("Card Composition"))
44
- ], I[S.NAME] = [
45
+ ], O[S.NAME] = [
45
46
  new _(
46
- O.SETTINGS,
47
+ I.SETTINGS,
47
48
  [
48
49
  N,
49
50
  T.NAME_STYLE,
@@ -53,7 +54,7 @@ class d extends E {
53
54
  ]
54
55
  ),
55
56
  new _(
56
- O.STYLES,
57
+ I.STYLES,
57
58
  [
58
59
  T.NAME_BACKGROUND,
59
60
  T.NAME_FONT_FAMILY,
@@ -61,9 +62,9 @@ class d extends E {
61
62
  T.NAME_COLOR
62
63
  ]
63
64
  )
64
- ], I[S.PRICE] = [
65
+ ], O[S.PRICE] = [
65
66
  new _(
66
- O.SETTINGS,
67
+ I.SETTINGS,
67
68
  [
68
69
  N,
69
70
  T.PRICE_STYLE,
@@ -72,7 +73,7 @@ class d extends E {
72
73
  ]
73
74
  ),
74
75
  new _(
75
- O.STYLES,
76
+ I.STYLES,
76
77
  [
77
78
  T.PRICE_BACKGROUND,
78
79
  T.PRICE_FONT_FAMILY,
@@ -80,9 +81,9 @@ class d extends E {
80
81
  T.PRICE_COLOR
81
82
  ]
82
83
  )
83
- ], I[S.OLD_PRICE] = [
84
+ ], O[S.OLD_PRICE] = [
84
85
  new _(
85
- O.SETTINGS,
86
+ I.SETTINGS,
86
87
  [
87
88
  N,
88
89
  T.OLD_PRICE_STYLE,
@@ -91,7 +92,7 @@ class d extends E {
91
92
  ]
92
93
  ),
93
94
  new _(
94
- O.STYLES,
95
+ I.STYLES,
95
96
  [
96
97
  T.OLD_PRICE_BACKGROUND,
97
98
  T.OLD_PRICE_FONT_FAMILY,
@@ -99,9 +100,9 @@ class d extends E {
99
100
  T.OLD_PRICE_COLOR
100
101
  ]
101
102
  )
102
- ], I[S.OMNIBUS_PRICE] = [
103
+ ], O[S.OMNIBUS_PRICE] = [
103
104
  new _(
104
- O.SETTINGS,
105
+ I.SETTINGS,
105
106
  [
106
107
  N,
107
108
  T.OMNIBUS_PRICE_TEXT_BEFORE,
@@ -112,7 +113,7 @@ class d extends E {
112
113
  ]
113
114
  ),
114
115
  new _(
115
- O.STYLES,
116
+ I.STYLES,
116
117
  [
117
118
  T.OMNIBUS_PRICE_BACKGROUND,
118
119
  T.OMNIBUS_PRICE_FONT_FAMILY,
@@ -120,9 +121,9 @@ class d extends E {
120
121
  T.OMNIBUS_PRICE_COLOR
121
122
  ]
122
123
  )
123
- ], I[S.OMNIBUS_DISCOUNT] = [
124
+ ], O[S.OMNIBUS_DISCOUNT] = [
124
125
  new _(
125
- O.SETTINGS,
126
+ I.SETTINGS,
126
127
  [
127
128
  N,
128
129
  T.OMNIBUS_DISCOUNT_TEXT_BEFORE,
@@ -133,7 +134,7 @@ class d extends E {
133
134
  ]
134
135
  ),
135
136
  new _(
136
- O.STYLES,
137
+ I.STYLES,
137
138
  [
138
139
  T.OMNIBUS_DISCOUNT_BACKGROUND,
139
140
  T.OMNIBUS_DISCOUNT_FONT_FAMILY,
@@ -141,9 +142,9 @@ class d extends E {
141
142
  T.OMNIBUS_DISCOUNT_COLOR
142
143
  ]
143
144
  )
144
- ], I[S.BUTTON] = [
145
+ ], O[S.BUTTON] = [
145
146
  new _(
146
- O.SETTINGS,
147
+ I.SETTINGS,
147
148
  [
148
149
  N,
149
150
  T.BUTTON_TEXT,
@@ -153,7 +154,7 @@ class d extends E {
153
154
  ]
154
155
  ),
155
156
  new _(
156
- O.STYLES,
157
+ I.STYLES,
157
158
  [
158
159
  T.BUTTON_COLOR,
159
160
  T.BUTTON_FONT_FAMILY,
@@ -164,9 +165,9 @@ class d extends E {
164
165
  T.BUTTON_BORDER
165
166
  ]
166
167
  )
167
- ], I[S.CUSTOM_ATTRIBUTE] = [
168
+ ], O[S.CUSTOM_ATTRIBUTE] = [
168
169
  new _(
169
- O.SETTINGS,
170
+ I.SETTINGS,
170
171
  [
171
172
  T.CUSTOM_ATTR_STYLE,
172
173
  T.CUSTOM_ATTR_ALIGN,
@@ -175,7 +176,7 @@ class d extends E {
175
176
  ]
176
177
  ),
177
178
  new _(
178
- O.STYLES,
179
+ I.STYLES,
179
180
  [
180
181
  T.CUSTOM_ATTR_BACKGROUND,
181
182
  T.CUSTOM_ATTR_FONT_FAMILY,
@@ -183,9 +184,9 @@ class d extends E {
183
184
  T.CUSTOM_ATTR_COLOR
184
185
  ]
185
186
  )
186
- ], I[S.IMAGE] = [
187
+ ], O[S.IMAGE] = [
187
188
  new _(
188
- O.SETTINGS,
189
+ I.SETTINGS,
189
190
  [
190
191
  N,
191
192
  T.IMAGE_SIZE,
@@ -196,5 +197,5 @@ class d extends E {
196
197
  }
197
198
  }
198
199
  export {
199
- d as SettingsPanel
200
+ s as SettingsPanel
200
201
  };
@@ -1,80 +1,80 @@
1
- import { TextAlignBuiltInControl as a, TextColorBuiltInControl as g, TextSizeBuiltInControl as f, TextStyleBuiltInControl as x, TextFontFamilyBuiltInControl as C, ButtonBackgroundColorBuiltInControl as T, TextPaddingsBuiltInControl as B, ImageSizeBuiltInControl as m, ImageMarginsBuiltInControl as y, ButtonAlignBuiltInControl as I, ButtonBorderBuiltInControl as S, ButtonBorderRadiusBuiltInControl as A, ButtonColorBuiltInControl as b, ButtonFontFamilyBuiltInControl as N, ButtonMarginsBuiltInControl as q, ButtonPaddingsBuiltInControl as $, ButtonTextBuiltInControl as k, ButtonTextSizeBuiltInControl as p, ButtonTextStyleAndFontColorBuiltInControl as h, ButtonFitToContainerBuiltInControl as F, TextLineSpacingBuiltInControl as M } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- const R = "buttonTextStyleForm", _ = "backgroundColor", E = /* @__PURE__ */ new Set(["", "transparent", "rgba(0, 0, 0, 0)"]);
3
- function z(o, n, r) {
4
- return class extends a {
1
+ import { TextAlignBuiltInControl as C, TextColorBuiltInControl as T, TextSizeBuiltInControl as B, TextStyleBuiltInControl as m, TextFontFamilyBuiltInControl as y, ButtonBackgroundColorBuiltInControl as g, TextPaddingsBuiltInControl as A, ImageSizeBuiltInControl as S, ImageMarginsBuiltInControl as I, ButtonAlignBuiltInControl as b, ButtonBorderBuiltInControl as k, ButtonBorderRadiusBuiltInControl as N, ButtonColorBuiltInControl as h, ButtonFontFamilyBuiltInControl as q, ButtonMarginsBuiltInControl as p, ButtonPaddingsBuiltInControl as $, ButtonTextBuiltInControl as F, ButtonTextSizeBuiltInControl as v, ButtonTextStyleAndFontColorBuiltInControl as M, ButtonFitToContainerBuiltInControl as R, TextLineSpacingBuiltInControl as _ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ const O = "buttonTextStyleForm", f = "backgroundColor", x = /* @__PURE__ */ new Set(["", "transparent", "rgba(0, 0, 0, 0)"]), E = ["elementColor", f], K = "esd-extension-block-id";
3
+ function U(r, e, o) {
4
+ return class extends C {
5
5
  getId() {
6
- return o;
6
+ return r;
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 || !o)
10
+ return [n];
11
+ const t = n.closest(o);
12
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
13
13
  }
14
14
  };
15
15
  }
16
- function v(o, n, r) {
17
- return class extends g {
16
+ function Y(r, e, o) {
17
+ return class extends T {
18
18
  getId() {
19
- return o;
19
+ return r;
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 || !o)
23
+ return [n];
24
+ const t = n.closest(o);
25
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
26
26
  }
27
27
  };
28
28
  }
29
- function P(o, n, r) {
30
- return class extends f {
29
+ function G(r, e, o) {
30
+ return class extends B {
31
31
  getId() {
32
- return o;
32
+ return r;
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 || !o)
36
+ return [n];
37
+ const t = n.closest(o);
38
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
39
39
  }
40
40
  };
41
41
  }
42
- function D(o, n, r) {
43
- return class extends x {
42
+ function H(r, e, o) {
43
+ return class extends m {
44
44
  getId() {
45
- return o;
45
+ return r;
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 || !o)
49
+ return [n];
50
+ const t = n.closest(o);
51
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
52
52
  }
53
53
  };
54
54
  }
55
- function K(o, n, r) {
56
- return class extends C {
55
+ function V(r, e, o) {
56
+ return class extends y {
57
57
  getId() {
58
- return o;
58
+ return r;
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 || !o)
62
+ return [n];
63
+ const t = n.closest(o);
64
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
65
65
  }
66
66
  };
67
67
  }
68
- function L(o, n, r) {
69
- return class extends T {
68
+ function w(r, e, o) {
69
+ return class extends g {
70
70
  getId() {
71
- return o;
71
+ return r;
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 || !o)
75
+ return [n];
76
+ const t = n.closest(o);
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,148 +85,211 @@ function L(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
- const s = this.api.getValues()[_], i = !s || E.has(s), c = this.api.getDocumentModifier();
92
+ const s = this.api.getValues()[f], i = !s || x.has(s), l = this.api.getDocumentModifier();
93
93
  return t.forEach((u) => {
94
- const l = c.modifyHtml(u);
95
- i ? l.removeStyle("background-color") : l.setStyle("background-color", s);
96
- }), c;
94
+ const c = l.modifyHtml(u);
95
+ i ? c.removeStyle("background-color") : c.setStyle("background-color", s);
96
+ }), l;
97
97
  }
98
98
  };
99
99
  }
100
- function U(o, n, r) {
101
- return class extends B {
100
+ function L(r) {
101
+ const e = E.find((n) => n in r);
102
+ if (!e)
103
+ return;
104
+ const o = r[e];
105
+ return typeof o == "string" ? o : "";
106
+ }
107
+ function z(r, e) {
108
+ return e.startsWith(".") && "hasClass" in r && r.hasClass(e.slice(1));
109
+ }
110
+ function a(r, e) {
111
+ try {
112
+ return z(r, e) ? r : r.closest(e) ?? void 0;
113
+ } catch {
114
+ return;
115
+ }
116
+ }
117
+ function D(r, e) {
118
+ if (!("querySelectorAll" in r))
119
+ return [];
120
+ try {
121
+ return r.querySelectorAll(e).filter((o) => "getAttribute" in o && !o.getAttribute(K));
122
+ } catch {
123
+ return [];
124
+ }
125
+ }
126
+ function W(r, e, o) {
127
+ return class extends g {
102
128
  getId() {
103
- return o;
129
+ return r;
130
+ }
131
+ /** The parent control renders its own generic title; restore the block-level wording. */
132
+ getLabels() {
133
+ return { title: this.api.translate("Block Background Color") };
134
+ }
135
+ getTargetNodes(n) {
136
+ const t = a(n, e);
137
+ return t ? [t] : [];
104
138
  }
105
- getTargetNodes(e) {
106
- if (!n || !r)
107
- return [e];
108
- const t = e.closest(r);
109
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
139
+ /**
140
+ * Writes the picked background onto the block as an inline style plus a `bgcolor`
141
+ * attribute. This is the whole mechanism, not a mirror: the parent control's own
142
+ * write never reaches the block element (verified at runtime). `bgcolor` is the
143
+ * channel Outlook honours on a `<td>`, and matches what the migrator emits.
144
+ */
145
+ getAdditionalModifications(n) {
146
+ const t = a(n, e);
147
+ if (!t)
148
+ return;
149
+ const s = L(this.api.getValues());
150
+ if (s === void 0)
151
+ return;
152
+ const i = !s || x.has(s), l = this.api.getDocumentModifier();
153
+ return [
154
+ t,
155
+ ...D(t, o)
156
+ ].forEach((c) => {
157
+ const d = l.modifyHtml(c);
158
+ i ? d.removeStyle("background-color").removeAttribute("bgcolor") : d.setStyle("background-color", s).setAttribute("bgcolor", s);
159
+ }), l;
110
160
  }
111
161
  };
112
162
  }
113
- function Y(o, n, r) {
114
- return class extends M {
163
+ function X(r, e, o) {
164
+ return class extends A {
115
165
  getId() {
116
- return o;
166
+ return r;
117
167
  }
118
- getTargetNodes(e) {
119
- return [e];
168
+ getTargetNodes(n) {
169
+ if (!e || !o)
170
+ return [n];
171
+ const t = n.closest(o);
172
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
120
173
  }
121
174
  };
122
175
  }
123
- function w(o, n, r = ".ins-recommendation-product-container") {
124
- return class extends I {
176
+ function j(r, e, o) {
177
+ return class extends _ {
125
178
  getId() {
126
- return o;
179
+ return r;
127
180
  }
128
- getTargetNodes(e) {
129
- const t = e.closest(r);
130
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
181
+ getTargetNodes(n) {
182
+ return [n];
131
183
  }
132
184
  };
133
185
  }
134
- function G(o, n, r = ".ins-recommendation-product-container") {
186
+ function J(r, e, o = ".ins-recommendation-product-container") {
135
187
  return class extends b {
136
188
  getId() {
137
- return o;
189
+ return r;
138
190
  }
139
- getTargetNodes(e) {
140
- const t = e.closest(r);
141
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
191
+ getTargetNodes(n) {
192
+ const t = n.closest(o);
193
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
142
194
  }
143
195
  };
144
196
  }
145
- function H(o, n, r = ".ins-recommendation-product-container") {
146
- return class extends S {
197
+ function Q(r, e, o = ".ins-recommendation-product-container") {
198
+ return class extends h {
147
199
  getId() {
148
- return o;
200
+ return r;
149
201
  }
150
- getTargetNodes(e) {
151
- const t = e.closest(r);
152
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
202
+ getTargetNodes(n) {
203
+ const t = n.closest(o);
204
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
153
205
  }
154
206
  };
155
207
  }
156
- function V(o, n, r = ".ins-recommendation-product-container") {
157
- return class extends A {
208
+ function Z(r, e, o = ".ins-recommendation-product-container") {
209
+ return class extends k {
158
210
  getId() {
159
- return o;
211
+ return r;
160
212
  }
161
- getTargetNodes(e) {
162
- const t = e.closest(r);
163
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
213
+ getTargetNodes(n) {
214
+ const t = n.closest(o);
215
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
164
216
  }
165
217
  };
166
218
  }
167
- function W(o, n, r = ".ins-recommendation-product-container") {
219
+ function tt(r, e, o = ".ins-recommendation-product-container") {
168
220
  return class extends N {
169
221
  getId() {
170
- return o;
222
+ return r;
171
223
  }
172
- getTargetNodes(e) {
173
- const t = e.closest(r);
174
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
224
+ getTargetNodes(n) {
225
+ const t = n.closest(o);
226
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
175
227
  }
176
228
  };
177
229
  }
178
- function X(o, n, r = ".ins-recommendation-product-container") {
230
+ function et(r, e, o = ".ins-recommendation-product-container") {
179
231
  return class extends q {
180
232
  getId() {
181
- return o;
233
+ return r;
234
+ }
235
+ getTargetNodes(n) {
236
+ const t = n.closest(o);
237
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
238
+ }
239
+ };
240
+ }
241
+ function nt(r, e, o = ".ins-recommendation-product-container") {
242
+ return class extends p {
243
+ getId() {
244
+ return r;
182
245
  }
183
- getTargetNodes(e) {
184
- const t = e.closest(r);
185
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
246
+ getTargetNodes(n) {
247
+ const t = n.closest(o);
248
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
186
249
  }
187
250
  };
188
251
  }
189
- function j(o, n, r = ".ins-recommendation-product-container") {
252
+ function rt(r, e, o = ".ins-recommendation-product-container") {
190
253
  return class extends $ {
191
254
  getId() {
192
- return o;
255
+ return r;
193
256
  }
194
- getTargetNodes(e) {
195
- const t = e.closest(r);
196
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
257
+ getTargetNodes(n) {
258
+ const t = n.closest(o);
259
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
197
260
  }
198
261
  };
199
262
  }
200
- function J(o, n, r = ".ins-recommendation-product-container") {
201
- return class extends k {
263
+ function ot(r, e, o = ".ins-recommendation-product-container") {
264
+ return class extends F {
202
265
  getId() {
203
- return o;
266
+ return r;
204
267
  }
205
- getTargetNodes(e) {
206
- const t = e.closest(r);
207
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
268
+ getTargetNodes(n) {
269
+ const t = n.closest(o);
270
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
208
271
  }
209
272
  };
210
273
  }
211
- function Q(o, n, r = ".ins-recommendation-product-container") {
212
- return class extends p {
274
+ function st(r, e, o = ".ins-recommendation-product-container") {
275
+ return class extends v {
213
276
  getId() {
214
- return o;
277
+ return r;
215
278
  }
216
- getTargetNodes(e) {
217
- const t = e.closest(r);
218
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
279
+ getTargetNodes(n) {
280
+ const t = n.closest(o);
281
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
219
282
  }
220
283
  };
221
284
  }
222
- function Z(o, n, r) {
223
- return class extends h {
285
+ function it(r, e, o) {
286
+ return class extends M {
224
287
  getId() {
225
- return o;
288
+ return r;
226
289
  }
227
- getTargetNodes(e) {
228
- const t = e.closest(r);
229
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
290
+ getTargetNodes(n) {
291
+ const t = n.closest(o);
292
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
230
293
  }
231
294
  /**
232
295
  * Propagates Bold/Italic to ALL product buttons, not just the focused one.
@@ -238,58 +301,58 @@ function Z(o, n, r) {
238
301
  * (`buttonTextStyleForm.{bold,italic}`) because the patched node isn't updated yet
239
302
  * when this runs. Returned modifications are merged into the parent control's patch.
240
303
  */
241
- getAdditionalModifications(e) {
242
- const t = e.closest(r);
304
+ getAdditionalModifications(n) {
305
+ const t = n.closest(o);
243
306
  if (!t)
244
307
  return;
245
- const s = t.querySelectorAll(`[esd-extension-block-id="${n}"] a.es-button`);
308
+ const s = t.querySelectorAll(`[esd-extension-block-id="${e}"] a.es-button`);
246
309
  if (!s.length)
247
310
  return;
248
- const i = this.api.getValues()[R];
311
+ const i = this.api.getValues()[O];
249
312
  if (!i)
250
313
  return;
251
- const c = i.bold ? "bold" : "normal", u = i.italic ? "italic" : "normal", l = this.api.getDocumentModifier();
314
+ const l = i.bold ? "bold" : "normal", u = i.italic ? "italic" : "normal", c = this.api.getDocumentModifier();
252
315
  return s.forEach((d) => {
253
- l.modifyHtml(d).setStyle("font-weight", c).setStyle("font-style", u);
254
- }), l;
316
+ c.modifyHtml(d).setStyle("font-weight", l).setStyle("font-style", u);
317
+ }), c;
255
318
  }
256
319
  };
257
320
  }
258
- function tt(o, n, r) {
259
- return class extends F {
321
+ function lt(r, e, o) {
322
+ return class extends R {
260
323
  getId() {
261
- return o;
324
+ return r;
262
325
  }
263
- getTargetNodes(e) {
264
- const t = e.closest(r);
265
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
326
+ getTargetNodes(n) {
327
+ const t = n.closest(o);
328
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
266
329
  }
267
330
  };
268
331
  }
269
- function et(o, n, r) {
270
- return class extends m {
332
+ function ct(r, e, o) {
333
+ return class extends S {
271
334
  getId() {
272
- return o;
335
+ return r;
273
336
  }
274
- getTargetNodes(e) {
337
+ getTargetNodes(n) {
275
338
  try {
276
- const t = e.closest(r);
277
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
339
+ const t = n.closest(o);
340
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
278
341
  } catch {
279
342
  return [];
280
343
  }
281
344
  }
282
345
  };
283
346
  }
284
- function nt(o, n, r) {
285
- return class extends y {
347
+ function ut(r, e, o) {
348
+ return class extends I {
286
349
  getId() {
287
- return o;
350
+ return r;
288
351
  }
289
- getTargetNodes(e) {
352
+ getTargetNodes(n) {
290
353
  try {
291
- const t = e.closest(r);
292
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
354
+ const t = n.closest(o);
355
+ return t ? t.querySelectorAll(`[esd-extension-block-id="${e}"]`) : [];
293
356
  } catch {
294
357
  return [];
295
358
  }
@@ -297,25 +360,26 @@ function nt(o, n, r) {
297
360
  };
298
361
  }
299
362
  export {
300
- w as createButtonAlignControl,
301
- H as createButtonBorderControl,
302
- V as createButtonBorderRadiusControl,
303
- G as createButtonColorControl,
304
- tt as createButtonFitToContainerControl,
305
- W as createButtonFontFamilyControl,
306
- X as createButtonMarginsControl,
307
- j as createButtonPaddingsControl,
308
- J as createButtonTextControl,
309
- Q as createButtonTextSizeControl,
310
- Z as createButtonTextStyleAndFontColorControl,
311
- nt as createImageMarginsControl,
312
- et as createImageSizeControl,
313
- U as createPaddingsControl,
314
- z as createTextAlignControl,
315
- L as createTextBackgroundColorControl,
316
- v as createTextColorControl,
317
- K as createTextFontFamilyControl,
318
- Y as createTextLineSpacingControl,
319
- P as createTextSizeControl,
320
- D as createTextStyleControl
363
+ W as createBlockBackgroundColorControl,
364
+ J as createButtonAlignControl,
365
+ Z as createButtonBorderControl,
366
+ tt as createButtonBorderRadiusControl,
367
+ Q as createButtonColorControl,
368
+ lt as createButtonFitToContainerControl,
369
+ et as createButtonFontFamilyControl,
370
+ nt as createButtonMarginsControl,
371
+ rt as createButtonPaddingsControl,
372
+ ot as createButtonTextControl,
373
+ st as createButtonTextSizeControl,
374
+ it as createButtonTextStyleAndFontColorControl,
375
+ ut as createImageMarginsControl,
376
+ ct as createImageSizeControl,
377
+ X as createPaddingsControl,
378
+ U as createTextAlignControl,
379
+ w as createTextBackgroundColorControl,
380
+ Y as createTextColorControl,
381
+ V as createTextFontFamilyControl,
382
+ j as createTextLineSpacingControl,
383
+ G as createTextSizeControl,
384
+ H as createTextStyleControl
321
385
  };
@@ -2,78 +2,77 @@ import { useHttp as d } from "../composables/useHttp.js";
2
2
  import { useToaster as m } from "../composables/useToaster.js";
3
3
  import { MAX_DEFAULT_TEMPLATE_ID as y } from "../enums/defaults.js";
4
4
  import { useBlankTemplate as f } from "./blankTemplate.js";
5
- const I = () => {
6
- const { get: a, post: i } = d(), { handleError: s } = m(), { getBlankTemplate: n } = f();
5
+ const D = () => {
6
+ const { get: s, post: u } = d(), { handleError: r } = m(), { getBlankTemplate: o } = f();
7
7
  return {
8
8
  getToken: async () => {
9
9
  try {
10
- const { data: t } = await a("/stripo/get-user-token");
10
+ const { data: t } = await s("/stripo/get-user-token");
11
11
  return t.body.token;
12
12
  } catch (t) {
13
- return s(t, "Failed to fetch token"), "";
13
+ return r(t, "Failed to fetch token"), "";
14
14
  }
15
15
  },
16
16
  getCustomFonts: async () => {
17
17
  try {
18
- const { data: t = [] } = await a("/stripo/get-partner-custom-fonts");
18
+ const { data: t = [] } = await s("/stripo/get-partner-custom-fonts");
19
19
  return t.map((e) => ({
20
20
  ...e,
21
21
  active: !0
22
22
  }));
23
23
  } catch (t) {
24
- return s(t, "Failed to fetch custom fonts"), [];
24
+ return r(t, "Failed to fetch custom fonts"), [];
25
25
  }
26
26
  },
27
27
  getDefaultTemplate: async () => {
28
28
  try {
29
- const t = new URLSearchParams(window.location.search), e = t.get("default-template"), r = t.get("master"), c = e ? parseInt(e) : 0, l = c >= 1 && c <= y ? c : 0;
30
- if (!l && !r)
31
- return await n();
32
- const p = `/stripo/default-template/${l}`, { data: u } = await a(p), o = typeof u == "string" ? JSON.parse(u) : u;
33
- return !o || typeof o != "object" || !("html" in o) || !("css" in o) ? await n() : o;
29
+ const t = new URLSearchParams(window.location.search), e = t.get("default-template"), l = t.get("master"), n = e ? parseInt(e) : 0, i = n >= 1 && n <= y ? n : 0;
30
+ if (!i && !l)
31
+ return await o();
32
+ const p = `/stripo/default-template/${i}`, { data: c } = await s(p), a = typeof c == "string" ? JSON.parse(c) : c;
33
+ return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? await o() : a;
34
34
  } catch (t) {
35
- return s(t, "Failed to fetch default template"), n();
35
+ return r(t, "Failed to fetch default template"), o();
36
36
  }
37
37
  },
38
38
  getSyncModulesStatus: async () => {
39
39
  try {
40
- const { data: t } = await a("/newsletter/settings/synchronisation-in-modules-status");
40
+ const { data: t } = await s("/newsletter/settings/synchronisation-in-modules-status");
41
41
  return t.status;
42
42
  } catch (t) {
43
- return s(t, "Failed to fetch sync modules status"), !1;
43
+ return r(t, "Failed to fetch sync modules status"), !1;
44
44
  }
45
45
  },
46
46
  updateSyncModule: async (t) => {
47
47
  try {
48
- return await i(`/stripo/stripo-modules/${t.moduleId}/update`), !0;
48
+ return await u(`/stripo/stripo-modules/${t.moduleId}/update`), !0;
49
49
  } catch (e) {
50
- return s(e, "Failed to update sync module"), !1;
50
+ return r(e, "Failed to update sync module"), !1;
51
51
  }
52
52
  },
53
53
  getSyncModule: async (t) => {
54
- const e = {
55
- id: 0,
56
- stripoId: 0,
57
- unsubscriptionPreferencePages: []
58
- };
59
54
  try {
60
- const { data: r } = await a(`/stripo/stripo-modules/${t}/get`);
61
- return Array.isArray(r) || !Array.isArray(r == null ? void 0 : r.unsubscriptionPreferencePages) ? e : r;
62
- } catch (r) {
63
- return s(r, "Failed to get sync module"), e;
55
+ const { data: e } = await s(`/stripo/stripo-modules/${t}/get`);
56
+ return e;
57
+ } catch (e) {
58
+ return r(e, "Failed to get sync module"), {
59
+ id: 0,
60
+ stripoId: 0,
61
+ unsubscriptionPreferencePages: []
62
+ };
64
63
  }
65
64
  },
66
65
  setSyncModuleUnsubscriptionPages: async (t) => {
67
66
  if (t.length === 0)
68
67
  return !0;
69
68
  try {
70
- return await i("/stripo/stripo-modules/set-unsubscription-preference-pages", t), !0;
69
+ return await u("/stripo/stripo-modules/set-unsubscription-preference-pages", t), !0;
71
70
  } catch (e) {
72
- return s(e, "Failed to set unsubscription preference pages"), !1;
71
+ return r(e, "Failed to set unsubscription preference pages"), !1;
73
72
  }
74
73
  }
75
74
  };
76
75
  };
77
76
  export {
78
- I as useStripoApi
77
+ D as useStripoApi
79
78
  };
@@ -3,6 +3,7 @@
3
3
  * These IDs are returned by the getId() method of each control
4
4
  */
5
5
  export declare enum RecommendationControlId {
6
+ BLOCK_BACKGROUND = "recommendation-block-background-color-control",
6
7
  BUTTON_ALIGN = "recommendation-block-button-align-control",
7
8
  BUTTON_BORDER = "recommendation-block-button-border-control",
8
9
  BUTTON_BORDER_RADIUS = "recommendation-block-button-border-radius-control",
@@ -0,0 +1,14 @@
1
+ export declare const BlockBackgroundColorControl: {
2
+ new (): {
3
+ getId(): string;
4
+ getLabels(): {
5
+ title: string;
6
+ };
7
+ getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
8
+ 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;
9
+ getParentControlId(): string;
10
+ api: import("@stripoinc/ui-editor-extensions").ControlApi;
11
+ getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
12
+ isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
13
+ };
14
+ };
@@ -20,6 +20,7 @@ export { ButtonControls } from './button';
20
20
  export { ImageControls } from './image';
21
21
  export { CustomAttributeControls } from './customAttribute';
22
22
  export { SpacingControl, SPACING_CONTROL_ID } from './spacing';
23
+ export { BlockBackgroundColorControl } from './blockBackground';
23
24
  export { CardBackgroundColorControl, CARD_BACKGROUND_COLOR_CONTROL_ID } from './cardBackground';
24
25
  export { RecommendationCardCompositionControl, COMPOSITION_CONTROL_BLOCK_ID } from './cardComposition';
25
26
  export { SyncInfoMessageControl, SYNC_INFO_MESSAGE_CONTROL_ID } from './syncInfoMessage';
@@ -115,6 +115,36 @@ export declare function createTextBackgroundColorControl(controlId: string, targ
115
115
  isVisible(_node: ImmutableHtmlNode): boolean;
116
116
  };
117
117
  };
118
+ /**
119
+ * Factory function to create a background color control for a whole extension block.
120
+ *
121
+ * Stripo's built-in block-background control resolves its own target and descends to the
122
+ * nearest `.esd-block-text`, which inside a Recommendation block is the title cell rather
123
+ * than the block itself (SD-145082). Overriding `getTargetNodes` moves that resolution here.
124
+ */
125
+ export declare function createBlockBackgroundColorControl(controlId: string, blockRootSelector?: string,
126
+ /** Extra cells inside the block to keep in sync — e.g. a title cell holding a pre-fix color. */
127
+ additionalTargetSelector?: string): {
128
+ new (): {
129
+ getId(): string;
130
+ /** The parent control renders its own generic title; restore the block-level wording. */
131
+ getLabels(): {
132
+ title: string;
133
+ };
134
+ getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
135
+ /**
136
+ * Writes the picked background onto the block as an inline style plus a `bgcolor`
137
+ * attribute. This is the whole mechanism, not a mirror: the parent control's own
138
+ * write never reaches the block element (verified at runtime). `bgcolor` is the
139
+ * channel Outlook honours on a `<td>`, and matches what the migrator emits.
140
+ */
141
+ getAdditionalModifications(root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
142
+ getParentControlId(): string;
143
+ api: import("@stripoinc/ui-editor-extensions").ControlApi;
144
+ getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
145
+ isVisible(_node: ImmutableHtmlNode): boolean;
146
+ };
147
+ };
118
148
  /**
119
149
  * Factory function to create paddings controls for different block elements
120
150
  * When targetBlockId and containerSelector are not provided, applies directly to root
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.12.0-beta.93a1238",
3
+ "version": "3.12.0-beta.ab050f8",
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",