@useinsider/guido 2.0.0-beta.5da4dde → 2.0.0-beta.6ae94e5
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 +2 -0
- package/dist/@types/config/schemas.js +55 -39
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +15 -17
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/composables/useStripo.js +40 -40
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +69 -153
- package/dist/extensions/Blocks/Recommendation/constants.js +1 -9
- package/dist/extensions/Blocks/Recommendation/control.js +59 -74
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +42 -16
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +72 -117
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +64 -85
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +17 -54
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +45 -74
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +52 -47
- package/dist/services/stripoApi.js +6 -10
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +30 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/composables/useConfig.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +3 -50
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +0 -32
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +2 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +7 -15
- package/dist/src/stores/config.d.ts +164 -1
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/wide-panel.css.js +4 -0
- package/dist/static/styles/customEditorStyle.css.js +0 -13
- package/dist/stores/config.js +7 -0
- package/package.json +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +0 -25
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.d.ts +0 -25
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +0 -592
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/spacingControl.d.ts +0 -60
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -19
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
const E = {
|
|
1
|
+
const R = {
|
|
3
2
|
TITLE: "You May Also Like!"
|
|
4
|
-
},
|
|
3
|
+
}, O = `
|
|
5
4
|
<tr>
|
|
6
|
-
<td class="spacer" style="height:
|
|
5
|
+
<td class="spacer" style="height: 20px;"></td>
|
|
7
6
|
</tr>
|
|
8
|
-
`,
|
|
9
|
-
<tr
|
|
7
|
+
`, w = `
|
|
8
|
+
<tr>
|
|
10
9
|
<td>
|
|
11
10
|
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
|
|
12
11
|
{-{-PRODUCTS-}-}
|
|
13
12
|
</table>
|
|
14
13
|
</td>
|
|
15
14
|
</tr>
|
|
16
|
-
`,
|
|
15
|
+
`, i = `
|
|
17
16
|
<td width="{-{-COLUMN_WIDTH-}-}" style="padding: 0 5px;" valign="top" height="100%">
|
|
18
17
|
<table
|
|
19
18
|
width="100%"
|
|
@@ -35,24 +34,14 @@ const E = {
|
|
|
35
34
|
</tr>
|
|
36
35
|
</table>
|
|
37
36
|
</td>
|
|
38
|
-
`,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
], S = {
|
|
47
|
-
[h]: !0,
|
|
48
|
-
[C]: !0,
|
|
49
|
-
[b]: !0,
|
|
50
|
-
[D]: !0,
|
|
51
|
-
[P]: !1,
|
|
52
|
-
[U]: !1,
|
|
53
|
-
[N]: !0
|
|
54
|
-
};
|
|
55
|
-
function M() {
|
|
37
|
+
`, b = [
|
|
38
|
+
"productImage",
|
|
39
|
+
"productName",
|
|
40
|
+
"productOldPrice",
|
|
41
|
+
"productPrice",
|
|
42
|
+
"productButton"
|
|
43
|
+
];
|
|
44
|
+
function C() {
|
|
56
45
|
return [
|
|
57
46
|
{
|
|
58
47
|
name: "Product Name",
|
|
@@ -134,76 +123,58 @@ function M() {
|
|
|
134
123
|
}
|
|
135
124
|
];
|
|
136
125
|
}
|
|
137
|
-
function
|
|
138
|
-
const
|
|
139
|
-
for (let
|
|
140
|
-
|
|
126
|
+
function N(p, r, e, l = b) {
|
|
127
|
+
const n = (100 / r).toFixed(2), a = [];
|
|
128
|
+
for (let o = 0; o < p.length; o += r)
|
|
129
|
+
a.push(p.slice(o, o + r));
|
|
141
130
|
let c = "";
|
|
142
|
-
return
|
|
143
|
-
|
|
144
|
-
let
|
|
145
|
-
|
|
146
|
-
|
|
131
|
+
return a.forEach((o, _) => {
|
|
132
|
+
_ > 0 && (c += O);
|
|
133
|
+
let s = "", u = "", d = "", m = "", g = "";
|
|
134
|
+
o.forEach((t) => {
|
|
135
|
+
s += i.replace(
|
|
147
136
|
"{-{-PRODUCT_CONTENT-}-}",
|
|
148
137
|
e.productImage(t)
|
|
149
|
-
), u +=
|
|
138
|
+
), u += i.replace(
|
|
150
139
|
"{-{-PRODUCT_CONTENT-}-}",
|
|
151
140
|
e.productName(t)
|
|
152
|
-
), d +=
|
|
141
|
+
), d += i.replace(
|
|
153
142
|
"{-{-PRODUCT_CONTENT-}-}",
|
|
154
143
|
e.productPrice(t)
|
|
155
|
-
),
|
|
144
|
+
), m += i.replace(
|
|
156
145
|
"{-{-PRODUCT_CONTENT-}-}",
|
|
157
146
|
e.productOldPrice(t)
|
|
158
|
-
),
|
|
159
|
-
"{-{-PRODUCT_CONTENT-}-}",
|
|
160
|
-
e.productOmnibusPrice(t)
|
|
161
|
-
), _ += o.replace(
|
|
162
|
-
"{-{-PRODUCT_CONTENT-}-}",
|
|
163
|
-
e.productOmnibusDiscount(t)
|
|
164
|
-
), g += o.replace(
|
|
147
|
+
), g += i.replace(
|
|
165
148
|
"{-{-PRODUCT_CONTENT-}-}",
|
|
166
149
|
e.productButton(t)
|
|
167
150
|
);
|
|
168
151
|
});
|
|
169
|
-
const
|
|
170
|
-
productImage:
|
|
152
|
+
const T = {
|
|
153
|
+
productImage: s,
|
|
171
154
|
productName: u,
|
|
172
155
|
productPrice: d,
|
|
173
|
-
productOldPrice:
|
|
174
|
-
productOmnibusPrice: m,
|
|
175
|
-
productOmnibusDiscount: _,
|
|
156
|
+
productOldPrice: m,
|
|
176
157
|
productButton: g
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
<tr class="recommendation-attribute-row"
|
|
181
|
-
data-attribute-type="${t}"
|
|
182
|
-
data-visibility="${O ? "1" : "0"}"${O ? "" : ' style="display: none;"'}>
|
|
183
|
-
${R[t]}
|
|
184
|
-
</tr>
|
|
185
|
-
`;
|
|
186
|
-
}).join("");
|
|
187
|
-
c += A.replace("{-{-PRODUCTS-}-}", y);
|
|
188
|
-
}), c.replaceAll("{-{-COLUMN_WIDTH-}-}", `${s}%`);
|
|
158
|
+
}, h = l.filter((t) => !!T[t]).map((t) => `<tr>${T[t]}</tr>`).join("");
|
|
159
|
+
c += w.replace("{-{-PRODUCTS-}-}", h);
|
|
160
|
+
}), c.replaceAll("{-{-COLUMN_WIDTH-}-}", `${n}%`);
|
|
189
161
|
}
|
|
190
|
-
function
|
|
191
|
-
const c =
|
|
162
|
+
function P(p, r, e, l, n = R.TITLE, a) {
|
|
163
|
+
const c = N(
|
|
192
164
|
r,
|
|
193
165
|
e,
|
|
194
166
|
l,
|
|
195
|
-
|
|
167
|
+
a
|
|
196
168
|
);
|
|
197
|
-
return
|
|
169
|
+
return p.replace("{-{-TITLE-}-}", n).replace("{-{-PRODUCT_ROWS-}-}", c);
|
|
198
170
|
}
|
|
199
171
|
export {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
I as spacer
|
|
172
|
+
R as DEFAULTS,
|
|
173
|
+
b as DEFAULT_CARD_COMPOSITION,
|
|
174
|
+
P as generateTemplate,
|
|
175
|
+
C as getDefaultProducts,
|
|
176
|
+
N as prepareProductRows,
|
|
177
|
+
i as productCardWrapper,
|
|
178
|
+
w as productRow,
|
|
179
|
+
O as spacer
|
|
209
180
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ExtensionBuilder as e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
2
|
import { UnsubscribeBlock as i } from "./block.js";
|
|
3
3
|
import { UnsubscribeControl as t } from "./control.js";
|
|
4
|
-
import { PreviewUIElement as
|
|
5
|
-
import { UnsubscribeIconsRegistry as
|
|
6
|
-
import { SettingsPanel as
|
|
4
|
+
import { PreviewUIElement as s } from "./elements/preview.js";
|
|
5
|
+
import { UnsubscribeIconsRegistry as o } from "./iconsRegistry.js";
|
|
6
|
+
import { SettingsPanel as r } from "./settingsPanel.js";
|
|
7
7
|
import n from "./styles.css.js";
|
|
8
|
-
import { UnsubscribeTagRegistry as
|
|
9
|
-
const
|
|
8
|
+
import { UnsubscribeTagRegistry as c } from "./tagRegistry.js";
|
|
9
|
+
const g = new e().addBlock(i).withSettingsPanelRegistry(r).addControl(t).addUiElement(s).addStyles(n).withLocalization({
|
|
10
10
|
en: {
|
|
11
|
-
"Unsubscribe Block": "Unsubscribe
|
|
12
|
-
"Unsubscribe Block Description": "
|
|
11
|
+
"Unsubscribe Block": "Unsubscribe",
|
|
12
|
+
"Unsubscribe Block Description": "Unsubscribe lets you add an Unsubscribe Link to direct users to opt out of receiving your messages.",
|
|
13
13
|
"Select Template": "Select Template",
|
|
14
14
|
"Unsubscribe Template": "Unsubscribe Template",
|
|
15
15
|
Showing: "Showing",
|
|
16
16
|
of: "of"
|
|
17
17
|
}
|
|
18
|
-
}).withUiElementTagRegistry(
|
|
18
|
+
}).withUiElementTagRegistry(c).withIconsRegistry(o).build();
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
g as default
|
|
21
21
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-06e6f7a7] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-
|
|
1
|
+
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-06e6f7a7] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-890b5336]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-890b5336]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-890b5336]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-a86fc486]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-a86fc486]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-a86fc486]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-a86fc486]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-a86fc486]{object-fit:cover;transform:scale(1)}[data-v-bb3bb07c] .guido__verion-history-view-option-selection-desktop svg,[data-v-bb3bb07c] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-bb3bb07c] .in-segments-wrapper__button_selected,[data-v-bb3bb07c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-4b876c1b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -23,12 +23,12 @@ ${s.map((E) => ` - ${E}`).join(`
|
|
|
23
23
|
validateImplementation(e, r) {
|
|
24
24
|
var I;
|
|
25
25
|
const s = [], E = r.name, T = Object.getPrototypeOf(this);
|
|
26
|
-
e.forEach((
|
|
27
|
-
if (typeof this[
|
|
28
|
-
s.push(`Method ${
|
|
26
|
+
e.forEach((d) => {
|
|
27
|
+
if (typeof this[d] != "function") {
|
|
28
|
+
s.push(`Method ${d}() is not defined`);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
T[
|
|
31
|
+
T[d] === r.prototype[d] && s.push(`Method ${d}() must be implemented (currently using base class error-throwing implementation)`);
|
|
32
32
|
}), u.validatedClasses.add(r), s.length > 0 ? (u.validationErrors.set(r, s), console.error(`[${E} Validation] ${E} validation failed:`, s)) : typeof process < "u" && ((I = process.env) == null ? void 0 : I.NODE_ENV) === "development" && console.log(`[${E} Validation] ✅ ${E} validated successfully`);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
@@ -254,10 +254,10 @@ var st = {
|
|
|
254
254
|
...o,
|
|
255
255
|
caption: "caption",
|
|
256
256
|
icon: "icon"
|
|
257
|
-
},
|
|
257
|
+
}, gt = {
|
|
258
258
|
...o,
|
|
259
259
|
caption: "caption"
|
|
260
|
-
},
|
|
260
|
+
}, mt = {
|
|
261
261
|
...o,
|
|
262
262
|
minValue: "min-value",
|
|
263
263
|
maxValue: "max-value",
|
|
@@ -292,11 +292,11 @@ var st = {
|
|
|
292
292
|
position: "position"
|
|
293
293
|
}, vt = {
|
|
294
294
|
...o
|
|
295
|
-
},
|
|
295
|
+
}, Gt = {
|
|
296
296
|
BUTTON: Ct,
|
|
297
|
-
CHECKBOX:
|
|
297
|
+
CHECKBOX: gt,
|
|
298
298
|
COLOR: o,
|
|
299
|
-
COUNTER:
|
|
299
|
+
COUNTER: mt,
|
|
300
300
|
LABEL: bt,
|
|
301
301
|
RADIO_BUTTONS: Nt,
|
|
302
302
|
SELECTPICKER: X,
|
|
@@ -344,7 +344,7 @@ var st = {
|
|
|
344
344
|
const e = t.querySelectorAll(O.BUTTON), r = t.asElement().hasClass(U) ? [t] : [];
|
|
345
345
|
return e.length ? e : r;
|
|
346
346
|
}
|
|
347
|
-
},
|
|
347
|
+
}, Vt = class extends i {
|
|
348
348
|
getParentControlId() {
|
|
349
349
|
return n.BLOCK_BUTTON.BORDER_RADIUS;
|
|
350
350
|
}
|
|
@@ -454,20 +454,20 @@ var st = {
|
|
|
454
454
|
}
|
|
455
455
|
};
|
|
456
456
|
k.REQUIRED_METHODS = ["getId", "getTemplate"];
|
|
457
|
-
var ee = k,
|
|
457
|
+
var ee = k, G = class extends x {
|
|
458
458
|
getTargetNodes(t) {
|
|
459
459
|
const e = t.querySelectorAll(O.IMAGE), r = t.asElement().hasClass(K) ? [t] : [];
|
|
460
460
|
return e.length ? e : r;
|
|
461
461
|
}
|
|
462
|
-
}, re = class extends
|
|
462
|
+
}, re = class extends G {
|
|
463
463
|
getParentControlId() {
|
|
464
464
|
return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
|
|
465
465
|
}
|
|
466
|
-
}, ne = class extends
|
|
466
|
+
}, ne = class extends G {
|
|
467
467
|
getParentControlId() {
|
|
468
468
|
return n.BLOCK_IMAGE.SIZE;
|
|
469
469
|
}
|
|
470
|
-
},
|
|
470
|
+
}, V = class L extends a {
|
|
471
471
|
constructor() {
|
|
472
472
|
super(L.REQUIRED_METHODS, L);
|
|
473
473
|
}
|
|
@@ -475,8 +475,8 @@ var ee = k, V = class extends x {
|
|
|
475
475
|
throw new Error("Method registerBlockControls() must be implemented by the subclass");
|
|
476
476
|
}
|
|
477
477
|
};
|
|
478
|
-
|
|
479
|
-
var se =
|
|
478
|
+
V.REQUIRED_METHODS = ["registerBlockControls"];
|
|
479
|
+
var se = V, ae = class {
|
|
480
480
|
constructor(t, e) {
|
|
481
481
|
this.tabId = t, this.controlsIds = e;
|
|
482
482
|
}
|
|
@@ -499,42 +499,46 @@ var se = G, ae = class {
|
|
|
499
499
|
const e = this.controlsIds.indexOf(t);
|
|
500
500
|
e !== -1 && this.controlsIds.splice(e, 1);
|
|
501
501
|
}
|
|
502
|
-
},
|
|
502
|
+
}, l = class extends x {
|
|
503
503
|
getTargetNodes(t) {
|
|
504
504
|
const e = t.querySelectorAll(O.TEXT), r = t.asElement().hasClass(p) ? [t] : [];
|
|
505
505
|
return e.length ? e : r;
|
|
506
506
|
}
|
|
507
|
-
}, ie = class extends
|
|
507
|
+
}, ie = class extends l {
|
|
508
508
|
getParentControlId() {
|
|
509
509
|
return n.GENERAL.TEXT_ALIGN;
|
|
510
510
|
}
|
|
511
|
-
}, oe = class extends
|
|
511
|
+
}, oe = class extends l {
|
|
512
|
+
getParentControlId() {
|
|
513
|
+
return n.BLOCK_TEXT.TEXT_BLOCK_BACKGROUND_COLOR;
|
|
514
|
+
}
|
|
515
|
+
}, Ee = class extends l {
|
|
512
516
|
getParentControlId() {
|
|
513
517
|
return n.GENERAL.TEXT_COLOR;
|
|
514
518
|
}
|
|
515
|
-
},
|
|
519
|
+
}, le = class extends l {
|
|
516
520
|
getParentControlId() {
|
|
517
521
|
return n.BLOCK_TEXT.FONT_FAMILY;
|
|
518
522
|
}
|
|
519
|
-
},
|
|
523
|
+
}, de = class extends l {
|
|
520
524
|
getParentControlId() {
|
|
521
525
|
return n.GENERAL.TEXT_LINE_SPACING;
|
|
522
526
|
}
|
|
523
|
-
},
|
|
527
|
+
}, ue = class extends l {
|
|
524
528
|
getParentControlId() {
|
|
525
529
|
return n.BLOCK_TEXT.INTERNAL_INDENTS;
|
|
526
530
|
}
|
|
527
|
-
},
|
|
531
|
+
}, Ie = class extends l {
|
|
528
532
|
getParentControlId() {
|
|
529
533
|
return n.GENERAL.TEXT_SIZE;
|
|
530
534
|
}
|
|
531
|
-
},
|
|
535
|
+
}, Oe = class extends l {
|
|
532
536
|
getParentControlId() {
|
|
533
537
|
return n.GENERAL.TEXT_STYLE;
|
|
534
538
|
}
|
|
535
539
|
}, Ut = class {
|
|
536
|
-
constructor(t, e, r = [], s, E = [], T, I = [],
|
|
537
|
-
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.i18n = t, this.styles = e, this.previewStyles = W, this.uiElements = r, this.uiElementTagRegistry = s, this.controls = E, this.settingsPanelRegistry = T, this.contextActions = I, this.blocks =
|
|
540
|
+
constructor(t, e, r = [], s, E = [], T, I = [], d = [], v, $, W, z, Z, j, q, J, tt) {
|
|
541
|
+
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.i18n = t, this.styles = e, this.previewStyles = W, this.uiElements = r, this.uiElementTagRegistry = s, this.controls = E, this.settingsPanelRegistry = T, this.contextActions = I, this.blocks = d, this.externalSmartElementsLibrary = v, this.externalImageLibrary = $, this.externalImageLibraryTab = tt, this.externalAiAssistant = z, this.externalDisplayConditionsLibrary = Z, this.externalVideoLibrary = j, this.blocksPanel = q, this.iconsRegistry = J, this.id = Math.random().toString(36).substring(2);
|
|
538
542
|
}
|
|
539
543
|
getI18n() {
|
|
540
544
|
return this.i18n;
|
|
@@ -590,7 +594,7 @@ var se = G, ae = class {
|
|
|
590
594
|
getIconsRegistry() {
|
|
591
595
|
return this.iconsRegistry;
|
|
592
596
|
}
|
|
593
|
-
},
|
|
597
|
+
}, Te = class {
|
|
594
598
|
constructor() {
|
|
595
599
|
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [];
|
|
596
600
|
}
|
|
@@ -685,9 +689,9 @@ var se = G, ae = class {
|
|
|
685
689
|
}
|
|
686
690
|
};
|
|
687
691
|
pt.REQUIRED_METHODS = ["openAiAssistant"];
|
|
688
|
-
var Kt = class
|
|
692
|
+
var Kt = class g extends a {
|
|
689
693
|
constructor() {
|
|
690
|
-
super(
|
|
694
|
+
super(g.REQUIRED_METHODS, g);
|
|
691
695
|
}
|
|
692
696
|
/**
|
|
693
697
|
* Retrieves the name of the category.
|
|
@@ -726,9 +730,9 @@ var Kt = class m extends a {
|
|
|
726
730
|
}
|
|
727
731
|
};
|
|
728
732
|
Kt.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
|
|
729
|
-
var Ft = class
|
|
733
|
+
var Ft = class m extends a {
|
|
730
734
|
constructor() {
|
|
731
|
-
super(
|
|
735
|
+
super(m.REQUIRED_METHODS, m);
|
|
732
736
|
}
|
|
733
737
|
openImageLibrary(e, r, s) {
|
|
734
738
|
throw new Error("Method openImageLibrary() must be implemented by the subclass");
|
|
@@ -783,7 +787,7 @@ var Q = class D extends a {
|
|
|
783
787
|
}
|
|
784
788
|
};
|
|
785
789
|
Q.REQUIRED_METHODS = ["registerIconsSvg"];
|
|
786
|
-
var
|
|
790
|
+
var ce = Q, _e = class {
|
|
787
791
|
constructor(t) {
|
|
788
792
|
this.key = t;
|
|
789
793
|
}
|
|
@@ -852,7 +856,7 @@ var Te = Q, ce = class {
|
|
|
852
856
|
}
|
|
853
857
|
};
|
|
854
858
|
f.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
|
|
855
|
-
var
|
|
859
|
+
var he = f, Y = class B extends a {
|
|
856
860
|
constructor() {
|
|
857
861
|
super(B.REQUIRED_METHODS, B);
|
|
858
862
|
}
|
|
@@ -861,7 +865,7 @@ var _e = f, Y = class B extends a {
|
|
|
861
865
|
}
|
|
862
866
|
};
|
|
863
867
|
Y.REQUIRED_METHODS = ["registerUiElements"];
|
|
864
|
-
var
|
|
868
|
+
var Re = Y;
|
|
865
869
|
export {
|
|
866
870
|
Xt as Block,
|
|
867
871
|
kt as BlockAttr,
|
|
@@ -873,7 +877,7 @@ export {
|
|
|
873
877
|
Qt as ButtonAlignBuiltInControl,
|
|
874
878
|
ft as ButtonBackgroundColorBuiltInControl,
|
|
875
879
|
Yt as ButtonBorderBuiltInControl,
|
|
876
|
-
|
|
880
|
+
Vt as ButtonBorderRadiusBuiltInControl,
|
|
877
881
|
$t as ButtonColorBuiltInControl,
|
|
878
882
|
w as ButtonControls,
|
|
879
883
|
Wt as ButtonFitToContainerBuiltInControl,
|
|
@@ -886,26 +890,27 @@ export {
|
|
|
886
890
|
Rt as ContainerControls,
|
|
887
891
|
ee as Control,
|
|
888
892
|
Ut as Extension,
|
|
889
|
-
|
|
893
|
+
Te as ExtensionBuilder,
|
|
890
894
|
F as GeneralControls,
|
|
891
|
-
|
|
895
|
+
ce as IconsRegistry,
|
|
892
896
|
H as ImageControls,
|
|
893
897
|
re as ImageMarginsBuiltInControl,
|
|
894
898
|
ne as ImageSizeBuiltInControl,
|
|
895
|
-
|
|
899
|
+
_e as ModificationDescription,
|
|
896
900
|
se as SettingsPanelRegistry,
|
|
897
901
|
ae as SettingsPanelTab,
|
|
898
902
|
Lt as SettingsTab,
|
|
899
903
|
ie as TextAlignBuiltInControl,
|
|
900
|
-
oe as
|
|
904
|
+
oe as TextBlockBackgroundBuiltInControl,
|
|
905
|
+
Ee as TextColorBuiltInControl,
|
|
901
906
|
P as TextControls,
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
907
|
+
le as TextFontFamilyBuiltInControl,
|
|
908
|
+
de as TextLineSpacingBuiltInControl,
|
|
909
|
+
ue as TextPaddingsBuiltInControl,
|
|
910
|
+
Ie as TextSizeBuiltInControl,
|
|
911
|
+
Oe as TextStyleBuiltInControl,
|
|
912
|
+
Gt as UEAttr,
|
|
913
|
+
he as UIElement,
|
|
914
|
+
Re as UIElementTagRegistry,
|
|
910
915
|
yt as UIElementType
|
|
911
916
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useHttp as m } from "../composables/useHttp.js";
|
|
2
|
-
import { useToaster as
|
|
3
|
-
import { MAX_DEFAULT_TEMPLATE_ID as
|
|
2
|
+
import { useToaster as i } from "../composables/useToaster.js";
|
|
3
|
+
import { MAX_DEFAULT_TEMPLATE_ID as p } from "../enums/defaults.js";
|
|
4
4
|
const y = () => {
|
|
5
|
-
const { get: r } = m(), { handleError: o } =
|
|
5
|
+
const { get: r } = m(), { handleError: o } = i();
|
|
6
6
|
return {
|
|
7
7
|
getToken: async () => {
|
|
8
8
|
try {
|
|
@@ -26,17 +26,13 @@ const y = () => {
|
|
|
26
26
|
getDefaultTemplate: async () => {
|
|
27
27
|
const t = {
|
|
28
28
|
html: "",
|
|
29
|
-
css: ""
|
|
30
|
-
forceRecreate: !0
|
|
29
|
+
css: ""
|
|
31
30
|
};
|
|
32
31
|
try {
|
|
33
|
-
const c = new URLSearchParams(window.location.search).get("default-template"), s = c ? parseInt(c) : 0, l = s >= 1 && s <=
|
|
32
|
+
const c = new URLSearchParams(window.location.search).get("default-template"), s = c ? parseInt(c) : 0, l = s >= 1 && s <= p ? s : 0, { data: n } = await r(
|
|
34
33
|
`/stripo/default-template/${l}`
|
|
35
34
|
), a = typeof n == "string" ? JSON.parse(n) : n;
|
|
36
|
-
return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? t :
|
|
37
|
-
...a,
|
|
38
|
-
forceRecreate: !0
|
|
39
|
-
};
|
|
35
|
+
return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? t : a;
|
|
40
36
|
} catch (e) {
|
|
41
37
|
return o(e, "Failed to fetch default template"), t;
|
|
42
38
|
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* - Default values for optional configuration
|
|
8
8
|
* - Validation utilities
|
|
9
9
|
*/
|
|
10
|
-
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
10
|
+
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
+
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput, ExternalValidationHandler, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
12
12
|
export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_EDITOR, DEFAULT_UI, DEFAULT_FEATURES, DEFAULT_BLOCKS, DEFAULT_COMPILER, DEFAULT_PRODUCT_TYPE, DEFAULT_MESSAGE_TYPE, DEFAULT_USERNAME, EDITOR_TYPE, TEST_PARTNERS, isTestPartner, } from './defaults';
|
|
13
13
|
export { validateConfig, parseConfig, parseConfigSafe, getValidationErrors, isValidConfig, validateIdentity, validatePartner, } from './validator';
|
|
14
14
|
export type { ValidationResult, ValidationError, } from './validator';
|
|
@@ -5,7 +5,14 @@
|
|
|
5
5
|
* All types are inferred from these schemas to ensure single source of truth.
|
|
6
6
|
* @module @types/config/schemas
|
|
7
7
|
*/
|
|
8
|
+
import type { SavedTemplateDetails } from '../stripo';
|
|
8
9
|
import * as v from 'valibot';
|
|
10
|
+
/**
|
|
11
|
+
* Handler function for external validation before save
|
|
12
|
+
* @param data - The template details to validate
|
|
13
|
+
* @returns Promise<boolean> - true if valid, false to cancel save
|
|
14
|
+
*/
|
|
15
|
+
export type ExternalValidationHandler = (data: SavedTemplateDetails) => Promise<boolean>;
|
|
9
16
|
/**
|
|
10
17
|
* Message type constants for email templates
|
|
11
18
|
*/
|
|
@@ -90,6 +97,8 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
90
97
|
}, undefined>, undefined>, readonly []>;
|
|
91
98
|
/** Selected unsubscribe page IDs */
|
|
92
99
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
100
|
+
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
101
|
+
readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
93
102
|
}, undefined>;
|
|
94
103
|
/**
|
|
95
104
|
* Email header configuration (sender name and subject)
|
|
@@ -344,6 +353,16 @@ export declare const CompilerSchema: v.ObjectSchema<{
|
|
|
344
353
|
/** Skip default compiler rules */
|
|
345
354
|
readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
346
355
|
}, undefined>;
|
|
356
|
+
/**
|
|
357
|
+
* Callbacks configuration - event handlers and hooks
|
|
358
|
+
*/
|
|
359
|
+
export declare const CallbacksSchema: v.ObjectSchema<{
|
|
360
|
+
/**
|
|
361
|
+
* External validation handler called before save completes.
|
|
362
|
+
* Return false to cancel the save operation.
|
|
363
|
+
*/
|
|
364
|
+
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
365
|
+
}, undefined>;
|
|
347
366
|
/**
|
|
348
367
|
* Complete Guido configuration schema
|
|
349
368
|
*
|
|
@@ -356,6 +375,7 @@ export declare const CompilerSchema: v.ObjectSchema<{
|
|
|
356
375
|
* - features: Feature toggles
|
|
357
376
|
* - blocks: Block configuration
|
|
358
377
|
* - compiler: HTML compilation
|
|
378
|
+
* - callbacks: Event handlers and hooks
|
|
359
379
|
*/
|
|
360
380
|
export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
361
381
|
/** Identity configuration (required) */
|
|
@@ -400,6 +420,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
400
420
|
}, undefined>, undefined>, readonly []>;
|
|
401
421
|
/** Selected unsubscribe page IDs */
|
|
402
422
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
423
|
+
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
424
|
+
readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
403
425
|
}, undefined>, {}>;
|
|
404
426
|
/** Editor settings */
|
|
405
427
|
readonly editor: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -506,4 +528,12 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
506
528
|
/** Skip default compiler rules */
|
|
507
529
|
readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
508
530
|
}, undefined>, {}>;
|
|
531
|
+
/** Callbacks and event handlers */
|
|
532
|
+
readonly callbacks: v.OptionalSchema<v.ObjectSchema<{
|
|
533
|
+
/**
|
|
534
|
+
* External validation handler called before save completes.
|
|
535
|
+
* Return false to cancel the save operation.
|
|
536
|
+
*/
|
|
537
|
+
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
538
|
+
}, undefined>, {}>;
|
|
509
539
|
}, undefined>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This ensures type definitions are always in sync with validation.
|
|
6
6
|
* @module @types/config/types
|
|
7
7
|
*/
|
|
8
|
-
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema } from './schemas';
|
|
8
|
+
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, ExternalValidationHandler } from './schemas';
|
|
9
9
|
import type * as v from 'valibot';
|
|
10
10
|
/**
|
|
11
11
|
* Complete validated Guido configuration.
|
|
@@ -41,6 +41,10 @@ export type FeaturesConfig = v.InferOutput<typeof FeaturesSchema>;
|
|
|
41
41
|
export type BlocksConfig = v.InferOutput<typeof BlocksSchema>;
|
|
42
42
|
/** Compiler configuration (custom rules, ignore defaults) */
|
|
43
43
|
export type CompilerConfig = v.InferOutput<typeof CompilerSchema>;
|
|
44
|
+
/** Callbacks configuration (event handlers and hooks) */
|
|
45
|
+
export type CallbacksConfig = v.InferOutput<typeof CallbacksSchema>;
|
|
46
|
+
/** Re-export ExternalValidationHandler for convenience */
|
|
47
|
+
export type { ExternalValidationHandler };
|
|
44
48
|
/** Email header configuration (senderName, subject) */
|
|
45
49
|
export type EmailHeader = v.InferOutput<typeof EmailHeaderSchema>;
|
|
46
50
|
/** Dynamic content item */
|
|
@@ -85,6 +89,8 @@ export type FeaturesConfigInput = v.InferInput<typeof FeaturesSchema>;
|
|
|
85
89
|
export type BlocksConfigInput = v.InferInput<typeof BlocksSchema>;
|
|
86
90
|
/** Input type for compiler configuration */
|
|
87
91
|
export type CompilerConfigInput = v.InferInput<typeof CompilerSchema>;
|
|
92
|
+
/** Input type for callbacks configuration */
|
|
93
|
+
export type CallbacksConfigInput = v.InferInput<typeof CallbacksSchema>;
|
|
88
94
|
/** Default Stripo block types */
|
|
89
95
|
export type DefaultBlockType = v.InferOutput<typeof DefaultBlockTypeSchema>;
|
|
90
96
|
/** Custom Guido block types */
|
|
@@ -31,6 +31,7 @@ export declare const useConfig: () => {
|
|
|
31
31
|
} | undefined;
|
|
32
32
|
}[];
|
|
33
33
|
selectedUnsubscribePages: number[];
|
|
34
|
+
forceRecreate: boolean;
|
|
34
35
|
};
|
|
35
36
|
editor: {
|
|
36
37
|
locale: string;
|
|
@@ -90,6 +91,9 @@ export declare const useConfig: () => {
|
|
|
90
91
|
})[];
|
|
91
92
|
ignoreDefaultRules: boolean;
|
|
92
93
|
};
|
|
94
|
+
callbacks: {
|
|
95
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
96
|
+
};
|
|
93
97
|
} | null>;
|
|
94
98
|
initialized: import("vue").Ref<boolean>;
|
|
95
99
|
identity: import("vue").ComputedRef<{
|
|
@@ -116,6 +120,7 @@ export declare const useConfig: () => {
|
|
|
116
120
|
} | undefined;
|
|
117
121
|
}[];
|
|
118
122
|
selectedUnsubscribePages: number[];
|
|
123
|
+
forceRecreate: boolean;
|
|
119
124
|
} | null>;
|
|
120
125
|
editor: import("vue").ComputedRef<{
|
|
121
126
|
locale: string;
|
|
@@ -175,6 +180,9 @@ export declare const useConfig: () => {
|
|
|
175
180
|
})[];
|
|
176
181
|
ignoreDefaultRules: boolean;
|
|
177
182
|
} | null>;
|
|
183
|
+
callbacks: import("vue").ComputedRef<{
|
|
184
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
185
|
+
} | null>;
|
|
178
186
|
templateId: import("vue").ComputedRef<string>;
|
|
179
187
|
userId: import("vue").ComputedRef<string>;
|
|
180
188
|
variationId: import("vue").ComputedRef<string>;
|