@useinsider/guido 3.1.1 → 3.2.0-beta.080341b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/README.md +117 -0
  2. package/dist/@types/config/schemas.js +166 -96
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +92 -80
  5. package/dist/components/organisms/AutoSaveController.vue.js +17 -0
  6. package/dist/components/organisms/AutoSaveController.vue2.js +13 -0
  7. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +7 -7
  8. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +12 -20
  9. package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
  10. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
  11. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  12. package/dist/components/organisms/header/EditorActions.vue2.js +51 -36
  13. package/dist/components/organisms/header/RightSlot.vue.js +11 -11
  14. package/dist/components/organisms/header/RightSlot.vue2.js +17 -13
  15. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
  16. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  17. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
  18. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
  19. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
  20. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  21. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
  22. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
  23. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +18 -17
  24. package/dist/composables/useActionsApi.js +4 -4
  25. package/dist/composables/useAutoSave.js +71 -0
  26. package/dist/composables/useFullStoryBridge.js +14 -0
  27. package/dist/composables/useHtmlCompiler.js +23 -21
  28. package/dist/composables/useHtmlValidator.js +40 -38
  29. package/dist/composables/usePreviewMode.js +20 -16
  30. package/dist/composables/useRecommendation.js +46 -26
  31. package/dist/composables/useRibbonOffset.js +21 -0
  32. package/dist/composables/useSave.js +26 -15
  33. package/dist/composables/useStripo.js +48 -45
  34. package/dist/composables/validators/useCouponBlockValidator.js +24 -0
  35. package/dist/composables/validators/useLiquidValidator.js +42 -0
  36. package/dist/config/compiler/liquidCompilerRules.js +15 -0
  37. package/dist/config/compiler/recommendationCompilerRules.js +162 -43
  38. package/dist/config/compiler/unsubscribeCompilerRules.js +48 -45
  39. package/dist/config/compiler/utils/recommendationCompilerUtils.js +110 -71
  40. package/dist/config/i18n/en/tooltips.json.js +2 -1
  41. package/dist/config/migrator/checkboxMigrator.js +5 -3
  42. package/dist/config/migrator/index.js +9 -9
  43. package/dist/config/migrator/radioButtonMigrator.js +66 -44
  44. package/dist/config/migrator/recommendation/compositionMapper.js +98 -0
  45. package/dist/config/migrator/recommendation/extractors.js +27 -0
  46. package/dist/config/migrator/recommendation/htmlBuilder.js +496 -0
  47. package/dist/config/migrator/recommendation/parseLegacyConfig.js +33 -0
  48. package/dist/config/migrator/recommendation/settingsMapper.js +70 -0
  49. package/dist/config/migrator/recommendation/themeMapper.js +93 -0
  50. package/dist/config/migrator/recommendationMigrator.js +74 -290
  51. package/dist/enums/extensions/recommendationBlock.js +16 -12
  52. package/dist/enums/onboarding.js +7 -2
  53. package/dist/enums/recommendation.js +2 -2
  54. package/dist/enums/unsubscribe.js +34 -27
  55. package/dist/extensions/Blocks/CouponBlock/template.js +24 -13
  56. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +38 -38
  57. package/dist/extensions/Blocks/Items/enums/productEnums.js +19 -7
  58. package/dist/extensions/Blocks/RadioButton/template.js +1 -1
  59. package/dist/extensions/Blocks/Recommendation/block.js +60 -50
  60. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  61. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +5 -5
  62. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +27 -11
  63. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +185 -172
  64. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
  65. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
  66. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +27 -26
  67. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
  68. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +211 -162
  69. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
  70. package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
  71. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +75 -73
  72. package/dist/extensions/Blocks/Recommendation/services/configService.js +76 -33
  73. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
  74. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +123 -79
  75. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +24 -13
  76. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +30 -29
  77. package/dist/extensions/Blocks/Recommendation/templates/index.js +7 -7
  78. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +27 -15
  79. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +21 -21
  80. package/dist/extensions/Blocks/Recommendation/templates/utils.js +57 -50
  81. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
  82. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +21 -0
  83. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +13 -22
  84. package/dist/extensions/Blocks/Recommendation/utils/tagName.js +6 -6
  85. package/dist/extensions/Blocks/Unsubscribe/block.js +11 -11
  86. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +16 -17
  87. package/dist/extensions/DynamicContent/dynamic-content.js +17 -12
  88. package/dist/guido.css +1 -1
  89. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +393 -264
  90. package/dist/node_modules/valibot/dist/index.js +450 -235
  91. package/dist/package.json.js +1 -1
  92. package/dist/services/recommendationApi.js +15 -15
  93. package/dist/services/stripoApi.js +9 -9
  94. package/dist/services/templateLibraryApi.js +49 -46
  95. package/dist/src/@types/config/defaults.d.ts +5 -1
  96. package/dist/src/@types/config/index.d.ts +3 -3
  97. package/dist/src/@types/config/schemas.d.ts +245 -0
  98. package/dist/src/@types/config/types.d.ts +11 -1
  99. package/dist/src/@types/generic.d.ts +0 -1
  100. package/dist/src/@types/save-as-template.d.ts +1 -0
  101. package/dist/src/components/Guido.vue.d.ts +1 -1
  102. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +2 -0
  103. package/dist/src/components/organisms/header/AutoSaveToggle.vue.d.ts +2 -0
  104. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
  105. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
  106. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
  107. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  108. package/dist/src/composables/useActionsApi.d.ts +1 -1
  109. package/dist/src/composables/useAutoSave.d.ts +3 -0
  110. package/dist/src/composables/useConfig.d.ts +70 -0
  111. package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
  112. package/dist/src/composables/useRecommendation.d.ts +10 -1
  113. package/dist/src/composables/useRecommendation.test.d.ts +1 -0
  114. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  115. package/dist/src/composables/useSave.d.ts +1 -1
  116. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  117. package/dist/src/composables/validators/useLiquidValidator.d.ts +3 -0
  118. package/dist/src/config/compiler/liquidCompilerRules.d.ts +2 -0
  119. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +1 -1
  120. package/dist/src/config/migrator/index.d.ts +2 -1
  121. package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +2 -0
  122. package/dist/src/config/migrator/recommendation/compositionMapper.test.d.ts +1 -0
  123. package/dist/src/config/migrator/recommendation/extractors.d.ts +7 -0
  124. package/dist/src/config/migrator/recommendation/extractors.test.d.ts +1 -0
  125. package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +11 -0
  126. package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +15 -0
  127. package/dist/src/config/migrator/recommendation/parseLegacyConfig.test.d.ts +1 -0
  128. package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +7 -0
  129. package/dist/src/config/migrator/recommendation/settingsMapper.test.d.ts +1 -0
  130. package/dist/src/config/migrator/recommendation/themeMapper.d.ts +5 -0
  131. package/dist/src/config/migrator/recommendation/themeMapper.test.d.ts +1 -0
  132. package/dist/src/config/migrator/recommendation/types.d.ts +205 -0
  133. package/dist/src/config/migrator/recommendationMigrator.d.ts +13 -1
  134. package/dist/src/config/migrator/recommendationMigrator.test.d.ts +1 -0
  135. package/dist/src/enums/extensions/recommendationBlock.d.ts +3 -0
  136. package/dist/src/enums/onboarding.d.ts +6 -0
  137. package/dist/src/enums/unsubscribe.d.ts +5 -0
  138. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +2 -0
  139. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  140. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  141. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  142. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +5 -0
  143. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +5 -0
  144. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
  145. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
  146. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.test.d.ts +1 -0
  147. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
  148. package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
  149. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +21 -3
  150. package/dist/src/extensions/Blocks/Recommendation/services/configService.test.d.ts +1 -0
  151. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +34 -0
  152. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
  153. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
  154. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +20 -3
  155. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -1
  156. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +21 -0
  157. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.test.d.ts +1 -0
  158. package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -3
  159. package/dist/src/library.d.ts +1 -1
  160. package/dist/src/services/templateLibraryApi.d.ts +1 -1
  161. package/dist/src/stores/autosave.d.ts +12 -0
  162. package/dist/src/stores/config.d.ts +630 -0
  163. package/dist/src/stores/editor.d.ts +23 -0
  164. package/dist/src/stores/onboarding.d.ts +4 -0
  165. package/dist/src/stores/preview.d.ts +3 -0
  166. package/dist/src/utils/genericUtil.d.ts +1 -1
  167. package/dist/src/utils/htmlCompiler.d.ts +2 -1
  168. package/dist/src/utils/htmlEscape.d.ts +5 -0
  169. package/dist/src/utils/htmlEscape.test.d.ts +1 -0
  170. package/dist/src/utils/timeUtil.d.ts +8 -0
  171. package/dist/static/styles/base.css.js +7 -2
  172. package/dist/static/styles/components/button.css.js +16 -9
  173. package/dist/static/styles/components/loader.css.js +4 -0
  174. package/dist/static/styles/components/narrow-panel.css.js +52 -0
  175. package/dist/stores/autosave.js +17 -0
  176. package/dist/stores/editor.js +3 -1
  177. package/dist/stores/onboarding.js +4 -0
  178. package/dist/stores/preview.js +4 -3
  179. package/dist/utils/genericUtil.js +42 -20
  180. package/dist/utils/htmlCompiler.js +48 -41
  181. package/dist/utils/htmlEscape.js +13 -0
  182. package/dist/utils/pairProductVariables.js +89 -88
  183. package/dist/utils/templatePreparation.js +75 -24
  184. package/dist/utils/timeUtil.js +19 -0
  185. package/dist/utils/tooltipUtils.js +4 -5
  186. package/package.json +8 -4
  187. package/dist/enums/displayConditions.js +0 -80
  188. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
  189. package/dist/src/enums/displayConditions.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.54.0" } }, s = {
1
+ const o = { stripo: { version: "2.62.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -1,34 +1,34 @@
1
- import { useHttp as c } from "../composables/useHttp.js";
2
- import { URLS as m } from "../enums/extensions/recommendationBlock.js";
3
- const f = () => {
4
- const { get: o } = c();
1
+ import { useHttp as a } from "../composables/useHttp.js";
2
+ import { QUERY_PARAMS as d, URLS as h } from "../enums/extensions/recommendationBlock.js";
3
+ const y = () => {
4
+ const { get: r } = a(), { get: s } = a({ headers: {} }), m = "6KcLM9TwheVB1mgK";
5
5
  return {
6
6
  fetchRecommendationCreateData: async () => {
7
7
  try {
8
- return (await o("/newsletter/recommendations/create-data")).data;
8
+ return (await r("/newsletter/recommendations/create-data")).data;
9
9
  } catch (e) {
10
10
  throw console.error("fetchUserModalState error:", e), e;
11
11
  }
12
12
  },
13
13
  fetchRecommendationFilters: async () => {
14
14
  try {
15
- const { data: e } = await o("/stripo/email-recommendation-attributes");
15
+ const { data: e } = await r("/stripo/email-recommendation-attributes");
16
16
  return e;
17
17
  } catch (e) {
18
18
  throw console.error("fetchRecommendationFilters error:", e), e;
19
19
  }
20
20
  },
21
- fetchRecommendationProducts: async (e, a) => {
21
+ fetchRecommendationProducts: async (e, i) => {
22
22
  var n;
23
23
  try {
24
- const t = decodeURIComponent(new URLSearchParams(Object.entries(a)).toString());
25
- console.debug("🏁 Recommendation API Query:", t);
26
- const { get: s } = c({
27
- headers: {}
28
- }), r = await s(
29
- `${m.RECOMMENDATION_API_URL}/v2/${e}?${t}`
24
+ const t = new URLSearchParams(Object.entries(i));
25
+ t.set(d.CLIENT_ID, m);
26
+ const c = decodeURIComponent(t.toString());
27
+ console.debug("🏁 Recommendation API Query:", c);
28
+ const o = await s(
29
+ `${h.RECOMMENDATION_API_URL}/v2/${e}?${c}`
30
30
  );
31
- return ((n = r == null ? void 0 : r.data) == null ? void 0 : n.data) ?? [];
31
+ return ((n = o == null ? void 0 : o.data) == null ? void 0 : n.data) ?? [];
32
32
  } catch (t) {
33
33
  throw console.error("fetchRecommendationProducts error:", t), t;
34
34
  }
@@ -36,5 +36,5 @@ const f = () => {
36
36
  };
37
37
  };
38
38
  export {
39
- f as useRecommendationApi
39
+ y as useRecommendationApi
40
40
  };
@@ -1,15 +1,15 @@
1
1
  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
- import g from "../static/templates/empty/index.html.js";
5
- import f from "../static/templates/empty/style.css.js";
4
+ import f from "../static/templates/empty/index.html.js";
5
+ import g from "../static/templates/empty/style.css.js";
6
6
  const E = () => {
7
7
  const { get: s, post: c } = d(), { handleError: r } = m();
8
8
  return {
9
9
  getToken: async () => {
10
10
  try {
11
- const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await s(`/stripo/get-user-token?test=${t}`);
12
- return e.body.token;
11
+ const { data: t } = await s("/stripo/get-user-token");
12
+ return t.body.token;
13
13
  } catch (t) {
14
14
  return r(t, "Failed to fetch token"), "";
15
15
  }
@@ -27,14 +27,14 @@ const E = () => {
27
27
  },
28
28
  getDefaultTemplate: async () => {
29
29
  const t = {
30
- html: g,
31
- css: f
30
+ html: f,
31
+ css: g
32
32
  };
33
33
  try {
34
- const e = new URLSearchParams(window.location.search), u = e.get("default-template"), l = e.get("master"), a = u ? parseInt(u) : 0, i = a >= 1 && a <= y ? a : 0;
35
- if (!i && !l)
34
+ const e = new URLSearchParams(window.location.search), u = e.get("default-template"), p = e.get("master"), a = u ? parseInt(u) : 0, i = a >= 1 && a <= y ? a : 0;
35
+ if (!i && !p)
36
36
  return t;
37
- const p = `/stripo/default-template/${i}`, { data: n } = await s(p), o = typeof n == "string" ? JSON.parse(n) : n;
37
+ const l = `/stripo/default-template/${i}`, { data: n } = await s(l), o = typeof n == "string" ? JSON.parse(n) : n;
38
38
  return !o || typeof o != "object" || !("html" in o) || !("css" in o) ? t : o;
39
39
  } catch (e) {
40
40
  return r(e, "Failed to fetch default template"), t;
@@ -1,14 +1,15 @@
1
- import { useConfig as T } from "../composables/useConfig.js";
2
- import { useHttp as f } from "../composables/useHttp.js";
3
- import { useToaster as w } from "../composables/useToaster.js";
4
- import { useTranslations as b } from "../composables/useTranslations.js";
5
- import { EditorType as h } from "../enums/defaults.js";
6
- import { useRecommendationExtensionStore as C } from "../extensions/Blocks/Recommendation/store/recommendation.js";
7
- import { useSaveAsTemplateStore as v } from "../stores/save-as-template.js";
8
- import { base64EncodeWithSpecialChars as a } from "../utils/base64.js";
9
- import { useTemplatePreparation as S } from "../utils/templatePreparation.js";
10
- const R = () => {
11
- const { get: n, post: c } = f(), { handleError: o, showToaster: i } = w(), { config: l } = T(), p = b();
1
+ import { useConfig as w } from "../composables/useConfig.js";
2
+ import { useHttp as b } from "../composables/useHttp.js";
3
+ import { useToaster as C } from "../composables/useToaster.js";
4
+ import { useTranslations as h } from "../composables/useTranslations.js";
5
+ import { useLiquidValidator as S } from "../composables/validators/useLiquidValidator.js";
6
+ import { EditorType as v } from "../enums/defaults.js";
7
+ import { useRecommendationExtensionStore as N } from "../extensions/Blocks/Recommendation/store/recommendation.js";
8
+ import { useSaveAsTemplateStore as x } from "../stores/save-as-template.js";
9
+ import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
10
+ import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
11
+ const $ = () => {
12
+ const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: g } = S(), u = h();
12
13
  return {
13
14
  getCategories: async () => {
14
15
  try {
@@ -26,7 +27,7 @@ const R = () => {
26
27
  },
27
28
  createCategory: async (e) => {
28
29
  try {
29
- const { data: { id: t } } = await c(
30
+ const { data: { id: t } } = await m(
30
31
  "/newsletter/template-library/create-category",
31
32
  { name: e }
32
33
  );
@@ -36,55 +37,57 @@ const R = () => {
36
37
  }
37
38
  },
38
39
  createTemplate: async () => {
39
- var e, t, g, y;
40
+ var e, t, d, y;
40
41
  try {
41
- const { prepareTemplateDetails: m } = S(), r = v(), s = await m(), u = {
42
- name: r.getTemplateName,
43
- categories: r.getSelectedCategoryIds,
44
- productId: ((t = (e = l.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
45
- editorType: h,
46
- messageType: ((y = (g = l.value) == null ? void 0 : g.partner) == null ? void 0 : y.messageType) || 0,
47
- content: a(s.compiledHtml),
48
- css: a(s.css),
42
+ const { prepareTemplateDetails: i } = A(), s = x(), a = await i();
43
+ if (p("liquidSyntax") && !await g(a.compiledHtml))
44
+ return !1;
45
+ const f = {
46
+ name: s.getTemplateName,
47
+ categories: s.getSelectedCategoryIds,
48
+ productId: ((t = (e = c.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
49
+ editorType: v,
50
+ messageType: ((y = (d = c.value) == null ? void 0 : d.partner) == null ? void 0 : y.messageType) || 0,
51
+ content: r(a.compiledHtml),
52
+ css: r(a.css),
49
53
  unsubscriptionPreferencePageStatus: !1,
50
54
  unsubscriptionPreferencePages: [],
51
- recommendationCampaignUrls: a(
52
- C().recommendationCampaignUrls
55
+ recommendationCampaignUrls: r(
56
+ N().recommendationCampaignUrls
53
57
  ),
54
- recommendationConfigs: a({}),
58
+ recommendationConfigs: r({}),
55
59
  isGuido: !0,
56
- stripoConfig: a({
60
+ // eslint-disable-next-line camelcase
61
+ template_engine: p("liquidSyntax") ? 1 : 0,
62
+ stripoConfig: r({
57
63
  editor: "stripo",
58
- html: s.rawHtml,
59
- css: s.css
64
+ html: a.rawHtml,
65
+ css: a.css,
66
+ dynamicContentList: a.dynamicContentList
60
67
  })
61
- }, { data: { type: d } } = await c(
68
+ }, { data: { type: T } } = await m(
62
69
  "/newsletter/template-library/create-template",
63
- u
70
+ f
64
71
  );
65
- if (d === "alert") {
66
- i({
67
- message: p(
68
- "newsletter.template-library-save-alert",
69
- { templateName: r.getTemplateName }
70
- ),
71
- type: "alert"
72
- });
73
- return;
74
- }
75
- i({
76
- message: p(
72
+ return T === "alert" ? (l({
73
+ message: u(
74
+ "newsletter.template-library-save-alert",
75
+ { templateName: s.getTemplateName }
76
+ ),
77
+ type: "alert"
78
+ }), !1) : (l({
79
+ message: u(
77
80
  "newsletter.template-library-save-success",
78
- { templateName: r.getTemplateName }
81
+ { templateName: s.getTemplateName }
79
82
  ),
80
83
  type: "success"
81
- });
82
- } catch (m) {
83
- o(m, "Failed to create template");
84
+ }), !0);
85
+ } catch (i) {
86
+ return o(i, "Failed to create template"), !1;
84
87
  }
85
88
  }
86
89
  };
87
90
  };
88
91
  export {
89
- R as useTemplateLibraryApi
92
+ $ as useTemplateLibraryApi
90
93
  };
@@ -5,11 +5,15 @@
5
5
  * These are applied during validation when values are not provided.
6
6
  * @module @types/config/defaults
7
7
  */
8
- import type { TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, EmailHeader } from './types';
8
+ import type { TemplateConfig, TemplateMigrationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, EmailHeader } from './types';
9
9
  /**
10
10
  * Default email header values
11
11
  */
12
12
  export declare const DEFAULT_EMAIL_HEADER: EmailHeader;
13
+ /**
14
+ * Default template migration configuration
15
+ */
16
+ export declare const DEFAULT_TEMPLATE_MIGRATION: TemplateMigrationConfig;
13
17
  /**
14
18
  * Default template configuration
15
19
  */
@@ -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, 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
- 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';
10
+ export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, 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, FallbackFont, TemplateConfig, TemplateConfigInput, TemplateMigrationConfig, TemplateMigrationConfigInput, LegacyRecommendationConfig, LegacyRecommendationConfigInput, 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
+ export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_TEMPLATE_MIGRATION, 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';
@@ -47,6 +47,12 @@ export declare const IdentitySchema: v.ObjectSchema<{
47
47
  /**
48
48
  * Partner configuration - organization and product context
49
49
  */
50
+ export declare const FallbackFontSchema: v.ObjectSchema<{
51
+ /** Fallback font name (e.g., "Georgia") */
52
+ readonly name: v.StringSchema<undefined>;
53
+ /** Fallback font family (e.g., "serif" or "sans-serif") */
54
+ readonly family: v.StringSchema<undefined>;
55
+ }, undefined>;
50
56
  export declare const PartnerSchema: v.ObjectSchema<{
51
57
  /** Partner/organization name (required) */
52
58
  readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "partner.name is required">]>;
@@ -56,6 +62,13 @@ export declare const PartnerSchema: v.ObjectSchema<{
56
62
  readonly messageType: v.OptionalSchema<v.PicklistSchema<[1, 2], undefined>, 1>;
57
63
  /** Display name for the current user */
58
64
  readonly username: v.OptionalSchema<v.StringSchema<undefined>, "Guido User">;
65
+ /** Fallback font settings from partner settings — used to match backend size calculation */
66
+ readonly fallbackFont: v.OptionalSchema<v.ObjectSchema<{
67
+ /** Fallback font name (e.g., "Georgia") */
68
+ readonly name: v.StringSchema<undefined>;
69
+ /** Fallback font family (e.g., "serif" or "sans-serif") */
70
+ readonly family: v.StringSchema<undefined>;
71
+ }, undefined>, undefined>;
59
72
  }, undefined>;
60
73
  /**
61
74
  * Dynamic content item schema
@@ -73,6 +86,117 @@ export declare const DynamicContentSchema: v.ObjectSchema<{
73
86
  readonly value: v.StringSchema<undefined>;
74
87
  }, undefined>, undefined>;
75
88
  }, undefined>;
89
+ /**
90
+ * Legacy recommendation block config (v1 format) keyed by block ID.
91
+ *
92
+ * Used by the recommendation migrator to enrich migrated blocks with
93
+ * filter, strategy, currency, language, and layout data that cannot be
94
+ * fully recovered from the legacy HTML alone.
95
+ *
96
+ * `looseObject` is used because legacy partner data shapes vary
97
+ * (e.g. some entries carry `verticalResponsiveness`, others `blockType`,
98
+ * `orientation`, `size`). Unknown keys are preserved and forwarded to
99
+ * the migrator unchanged.
100
+ */
101
+ export declare const LegacyRecommendationConfigSchema: v.LooseObjectSchema<{
102
+ /** Block ID (matches the dictionary key and the legacy HTML element id) */
103
+ readonly id: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
104
+ /** Decimal places for price display (legacy data may use string or number) */
105
+ readonly decimalCount: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
106
+ /** Pinned product IDs (empty array when filter-driven) */
107
+ readonly productIds: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
108
+ /** Whether the block requested live products at send time */
109
+ readonly sendProductRequestFlag: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
110
+ /** Whether to randomize product order */
111
+ readonly shuffleProducts: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
112
+ /** Filter rules driving product selection */
113
+ readonly filters: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
114
+ /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
115
+ readonly currency: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
116
+ /** Currency display settings (separators, alignment, decimals) */
117
+ readonly currencySettings: v.OptionalSchema<v.UnknownSchema, undefined>;
118
+ /** Locale (e.g. 'nl_NL') */
119
+ readonly language: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
120
+ /** Recommendation strategy key (e.g. 'newArrivals') */
121
+ readonly strategy: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
122
+ /** Snapshot of products as rendered by the legacy block */
123
+ readonly recommendedProducts: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
124
+ /** Number of product cards per row */
125
+ readonly cardsInRow: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
126
+ /** Mobile-only padding (right) */
127
+ readonly mobileRightPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
128
+ /** Mobile-only padding (left) */
129
+ readonly mobileLeftPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
130
+ /** Disable responsive scaling */
131
+ readonly unresponsive: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
132
+ /** Layout orientation ('vertical' | 'horizontal') */
133
+ readonly orientation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
134
+ /** Whether long text is trimmed */
135
+ readonly textTrimming: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
136
+ /** Block type marker used by some legacy variants */
137
+ readonly blockType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
138
+ /** Size variant marker (legacy data may use string or number) */
139
+ readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
140
+ /** Vertical responsiveness flag (legacy size=1 variants) */
141
+ readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
142
+ }, undefined>;
143
+ /**
144
+ * Migration-only inputs scoped to this template.
145
+ *
146
+ * These fields are consumed by template migrators when upgrading
147
+ * legacy block formats to current versions. They have no effect on
148
+ * editor behavior once the template is in the current format.
149
+ */
150
+ export declare const TemplateMigrationSchema: v.ObjectSchema<{
151
+ /**
152
+ * Legacy recommendation block configs keyed by block ID.
153
+ * Pass this when loading a template authored with the v1
154
+ * recommendation block so the migrator can preserve filters,
155
+ * strategy, currency, locale, and layout data.
156
+ */
157
+ readonly recommendationConfigs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.LooseObjectSchema<{
158
+ /** Block ID (matches the dictionary key and the legacy HTML element id) */
159
+ readonly id: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
160
+ /** Decimal places for price display (legacy data may use string or number) */
161
+ readonly decimalCount: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
162
+ /** Pinned product IDs (empty array when filter-driven) */
163
+ readonly productIds: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
164
+ /** Whether the block requested live products at send time */
165
+ readonly sendProductRequestFlag: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
166
+ /** Whether to randomize product order */
167
+ readonly shuffleProducts: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
168
+ /** Filter rules driving product selection */
169
+ readonly filters: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
170
+ /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
171
+ readonly currency: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
172
+ /** Currency display settings (separators, alignment, decimals) */
173
+ readonly currencySettings: v.OptionalSchema<v.UnknownSchema, undefined>;
174
+ /** Locale (e.g. 'nl_NL') */
175
+ readonly language: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
176
+ /** Recommendation strategy key (e.g. 'newArrivals') */
177
+ readonly strategy: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
178
+ /** Snapshot of products as rendered by the legacy block */
179
+ readonly recommendedProducts: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
180
+ /** Number of product cards per row */
181
+ readonly cardsInRow: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
182
+ /** Mobile-only padding (right) */
183
+ readonly mobileRightPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
184
+ /** Mobile-only padding (left) */
185
+ readonly mobileLeftPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
186
+ /** Disable responsive scaling */
187
+ readonly unresponsive: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
188
+ /** Layout orientation ('vertical' | 'horizontal') */
189
+ readonly orientation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
190
+ /** Whether long text is trimmed */
191
+ readonly textTrimming: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
192
+ /** Block type marker used by some legacy variants */
193
+ readonly blockType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
194
+ /** Size variant marker (legacy data may use string or number) */
195
+ readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
196
+ /** Vertical responsiveness flag (legacy size=1 variants) */
197
+ readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
198
+ }, undefined>, undefined>, {}>;
199
+ }, undefined>;
76
200
  /**
77
201
  * Template configuration - initial content and preselected values
78
202
  */
@@ -95,10 +219,63 @@ export declare const TemplateSchema: v.ObjectSchema<{
95
219
  readonly value: v.StringSchema<undefined>;
96
220
  }, undefined>, undefined>;
97
221
  }, undefined>, undefined>, readonly []>;
222
+ /** Valid custom field attribute names from the partner's categorized fields */
223
+ readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
98
224
  /** Selected unsubscribe page IDs */
99
225
  readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
100
226
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
101
227
  readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
228
+ /** Migration-only inputs (legacy block configs) */
229
+ readonly migration: v.OptionalSchema<v.ObjectSchema<{
230
+ /**
231
+ * Legacy recommendation block configs keyed by block ID.
232
+ * Pass this when loading a template authored with the v1
233
+ * recommendation block so the migrator can preserve filters,
234
+ * strategy, currency, locale, and layout data.
235
+ */
236
+ readonly recommendationConfigs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.LooseObjectSchema<{
237
+ /** Block ID (matches the dictionary key and the legacy HTML element id) */
238
+ readonly id: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
239
+ /** Decimal places for price display (legacy data may use string or number) */
240
+ readonly decimalCount: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
241
+ /** Pinned product IDs (empty array when filter-driven) */
242
+ readonly productIds: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
243
+ /** Whether the block requested live products at send time */
244
+ readonly sendProductRequestFlag: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
245
+ /** Whether to randomize product order */
246
+ readonly shuffleProducts: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
247
+ /** Filter rules driving product selection */
248
+ readonly filters: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
249
+ /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
250
+ readonly currency: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
251
+ /** Currency display settings (separators, alignment, decimals) */
252
+ readonly currencySettings: v.OptionalSchema<v.UnknownSchema, undefined>;
253
+ /** Locale (e.g. 'nl_NL') */
254
+ readonly language: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
255
+ /** Recommendation strategy key (e.g. 'newArrivals') */
256
+ readonly strategy: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
257
+ /** Snapshot of products as rendered by the legacy block */
258
+ readonly recommendedProducts: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
259
+ /** Number of product cards per row */
260
+ readonly cardsInRow: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
261
+ /** Mobile-only padding (right) */
262
+ readonly mobileRightPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
263
+ /** Mobile-only padding (left) */
264
+ readonly mobileLeftPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
265
+ /** Disable responsive scaling */
266
+ readonly unresponsive: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
267
+ /** Layout orientation ('vertical' | 'horizontal') */
268
+ readonly orientation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
269
+ /** Whether long text is trimmed */
270
+ readonly textTrimming: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
271
+ /** Block type marker used by some legacy variants */
272
+ readonly blockType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
273
+ /** Size variant marker (legacy data may use string or number) */
274
+ readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
275
+ /** Vertical responsiveness flag (legacy size=1 variants) */
276
+ readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
277
+ }, undefined>, undefined>, {}>;
278
+ }, undefined>, {}>;
102
279
  }, undefined>;
103
280
  /**
104
281
  * Email header configuration (sender name and subject)
@@ -161,6 +338,10 @@ export declare const FeaturesSchema: v.ObjectSchema<{
161
338
  readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
162
339
  /** Disable modules panel in the editor */
163
340
  readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
341
+ /** Enable Liquid template syntax */
342
+ readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
343
+ /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
344
+ readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
164
345
  }, undefined>;
165
346
  /**
166
347
  * Default block types available in Stripo
@@ -401,6 +582,13 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
401
582
  readonly messageType: v.OptionalSchema<v.PicklistSchema<[1, 2], undefined>, 1>;
402
583
  /** Display name for the current user */
403
584
  readonly username: v.OptionalSchema<v.StringSchema<undefined>, "Guido User">;
585
+ /** Fallback font settings from partner settings — used to match backend size calculation */
586
+ readonly fallbackFont: v.OptionalSchema<v.ObjectSchema<{
587
+ /** Fallback font name (e.g., "Georgia") */
588
+ readonly name: v.StringSchema<undefined>;
589
+ /** Fallback font family (e.g., "serif" or "sans-serif") */
590
+ readonly family: v.StringSchema<undefined>;
591
+ }, undefined>, undefined>;
404
592
  }, undefined>;
405
593
  /** Template content and presets */
406
594
  readonly template: v.OptionalSchema<v.ObjectSchema<{
@@ -422,10 +610,63 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
422
610
  readonly value: v.StringSchema<undefined>;
423
611
  }, undefined>, undefined>;
424
612
  }, undefined>, undefined>, readonly []>;
613
+ /** Valid custom field attribute names from the partner's categorized fields */
614
+ readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
425
615
  /** Selected unsubscribe page IDs */
426
616
  readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
427
617
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
428
618
  readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
619
+ /** Migration-only inputs (legacy block configs) */
620
+ readonly migration: v.OptionalSchema<v.ObjectSchema<{
621
+ /**
622
+ * Legacy recommendation block configs keyed by block ID.
623
+ * Pass this when loading a template authored with the v1
624
+ * recommendation block so the migrator can preserve filters,
625
+ * strategy, currency, locale, and layout data.
626
+ */
627
+ readonly recommendationConfigs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.LooseObjectSchema<{
628
+ /** Block ID (matches the dictionary key and the legacy HTML element id) */
629
+ readonly id: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
630
+ /** Decimal places for price display (legacy data may use string or number) */
631
+ readonly decimalCount: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
632
+ /** Pinned product IDs (empty array when filter-driven) */
633
+ readonly productIds: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
634
+ /** Whether the block requested live products at send time */
635
+ readonly sendProductRequestFlag: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
636
+ /** Whether to randomize product order */
637
+ readonly shuffleProducts: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
638
+ /** Filter rules driving product selection */
639
+ readonly filters: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
640
+ /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
641
+ readonly currency: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
642
+ /** Currency display settings (separators, alignment, decimals) */
643
+ readonly currencySettings: v.OptionalSchema<v.UnknownSchema, undefined>;
644
+ /** Locale (e.g. 'nl_NL') */
645
+ readonly language: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
646
+ /** Recommendation strategy key (e.g. 'newArrivals') */
647
+ readonly strategy: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
648
+ /** Snapshot of products as rendered by the legacy block */
649
+ readonly recommendedProducts: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
650
+ /** Number of product cards per row */
651
+ readonly cardsInRow: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
652
+ /** Mobile-only padding (right) */
653
+ readonly mobileRightPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
654
+ /** Mobile-only padding (left) */
655
+ readonly mobileLeftPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
656
+ /** Disable responsive scaling */
657
+ readonly unresponsive: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
658
+ /** Layout orientation ('vertical' | 'horizontal') */
659
+ readonly orientation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
660
+ /** Whether long text is trimmed */
661
+ readonly textTrimming: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
662
+ /** Block type marker used by some legacy variants */
663
+ readonly blockType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
664
+ /** Size variant marker (legacy data may use string or number) */
665
+ readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
666
+ /** Vertical responsiveness flag (legacy size=1 variants) */
667
+ readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
668
+ }, undefined>, undefined>, {}>;
669
+ }, undefined>, {}>;
429
670
  }, undefined>, {}>;
430
671
  /** Editor settings */
431
672
  readonly editor: v.OptionalSchema<v.ObjectSchema<{
@@ -473,6 +714,10 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
473
714
  readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
474
715
  /** Disable modules panel in the editor */
475
716
  readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
717
+ /** Enable Liquid template syntax */
718
+ readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
719
+ /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
720
+ readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
476
721
  }, undefined>, {}>;
477
722
  /** Block configuration */
478
723
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -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, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, ExternalValidationHandler } from './schemas';
8
+ import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, FallbackFontSchema, ExternalValidationHandler } from './schemas';
9
9
  import type * as v from 'valibot';
10
10
  /**
11
11
  * Complete validated Guido configuration.
@@ -29,8 +29,14 @@ export type GuidoConfig = v.InferOutput<typeof GuidoConfigSchema>;
29
29
  export type IdentityConfig = v.InferOutput<typeof IdentitySchema>;
30
30
  /** Partner configuration (name, productType, messageType, username) */
31
31
  export type PartnerConfig = v.InferOutput<typeof PartnerSchema>;
32
+ /** Fallback font settings for backend size calculation alignment */
33
+ export type FallbackFont = v.InferOutput<typeof FallbackFontSchema>;
32
34
  /** Template configuration (html, css, dynamic content, unsubscribe pages) */
33
35
  export type TemplateConfig = v.InferOutput<typeof TemplateSchema>;
36
+ /** Migration-only inputs scoped to a template */
37
+ export type TemplateMigrationConfig = v.InferOutput<typeof TemplateMigrationSchema>;
38
+ /** Legacy v1 recommendation block config (keyed by block ID in `recommendationConfigs`) */
39
+ export type LegacyRecommendationConfig = v.InferOutput<typeof LegacyRecommendationConfigSchema>;
34
40
  /** Editor configuration (locale, translations, migration date, email header) */
35
41
  export type EditorConfig = v.InferOutput<typeof EditorSchema>;
36
42
  /** UI configuration (showHeader, backButtonLabel) */
@@ -79,6 +85,10 @@ export type IdentityConfigInput = v.InferInput<typeof IdentitySchema>;
79
85
  export type PartnerConfigInput = v.InferInput<typeof PartnerSchema>;
80
86
  /** Input type for template configuration */
81
87
  export type TemplateConfigInput = v.InferInput<typeof TemplateSchema>;
88
+ /** Input type for template migration configuration */
89
+ export type TemplateMigrationConfigInput = v.InferInput<typeof TemplateMigrationSchema>;
90
+ /** Input type for a single legacy recommendation block config */
91
+ export type LegacyRecommendationConfigInput = v.InferInput<typeof LegacyRecommendationConfigSchema>;
82
92
  /** Input type for editor configuration */
83
93
  export type EditorConfigInput = v.InferInput<typeof EditorSchema>;
84
94
  /** Input type for UI configuration */
@@ -44,7 +44,6 @@ export interface TooltipOptions {
44
44
  x: number;
45
45
  y: number;
46
46
  };
47
- preventXss?: boolean;
48
47
  }
49
48
  export type TextValueObject = {
50
49
  text: string;
@@ -26,4 +26,5 @@ export interface CreateTemplateRequest {
26
26
  unsubscriptionPreferencePages: number[];
27
27
  unsubscriptionPreferencePageStatus: boolean;
28
28
  isGuido: boolean;
29
+ template_engine: number;
29
30
  }
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
11
11
  close: () => void;
12
12
  };
13
13
  hasChanges: import("vue").ComputedRef<boolean>;
14
- saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata"> | undefined> | undefined;
14
+ saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
15
15
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
16
16
  "dynamic-content:open": (detail: {
17
17
  text: string;