@useinsider/guido 3.1.1-beta.f3b45b9 → 3.1.1-beta.face0c7

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 (43) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +9 -7
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +91 -81
  5. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  6. package/dist/components/organisms/header/EditorActions.vue2.js +51 -36
  7. package/dist/components/organisms/header/RightSlot.vue.js +10 -10
  8. package/dist/components/organisms/header/RightSlot.vue2.js +16 -13
  9. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +18 -17
  10. package/dist/composables/useHtmlCompiler.js +18 -16
  11. package/dist/composables/useSave.js +23 -17
  12. package/dist/composables/useStripo.js +44 -41
  13. package/dist/composables/validators/useLiquidValidator.js +42 -0
  14. package/dist/config/compiler/liquidCompilerRules.js +15 -0
  15. package/dist/config/compiler/recommendationCompilerRules.js +158 -44
  16. package/dist/config/compiler/utils/recommendationCompilerUtils.js +49 -46
  17. package/dist/enums/extensions/recommendationBlock.js +14 -11
  18. package/dist/enums/recommendation.js +2 -2
  19. package/dist/extensions/Blocks/CouponBlock/template.js +24 -13
  20. package/dist/extensions/DynamicContent/dynamic-content.js +17 -12
  21. package/dist/guido.css +1 -1
  22. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +218 -324
  23. package/dist/package.json.js +1 -1
  24. package/dist/services/recommendationApi.js +15 -15
  25. package/dist/services/stripoApi.js +9 -9
  26. package/dist/services/templateLibraryApi.js +48 -46
  27. package/dist/src/@types/config/schemas.d.ts +4 -0
  28. package/dist/src/@types/generic.d.ts +0 -1
  29. package/dist/src/@types/save-as-template.d.ts +1 -0
  30. package/dist/src/composables/useConfig.d.ts +2 -0
  31. package/dist/src/composables/validators/useLiquidValidator.d.ts +3 -0
  32. package/dist/src/config/compiler/liquidCompilerRules.d.ts +2 -0
  33. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +1 -1
  34. package/dist/src/enums/extensions/recommendationBlock.d.ts +3 -0
  35. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +2 -0
  36. package/dist/src/services/templateLibraryApi.d.ts +1 -1
  37. package/dist/src/stores/config.d.ts +18 -0
  38. package/dist/src/utils/genericUtil.d.ts +1 -1
  39. package/dist/static/styles/base.css.js +7 -2
  40. package/dist/utils/genericUtil.js +42 -20
  41. package/dist/utils/templatePreparation.js +34 -25
  42. package/dist/utils/tooltipUtils.js +4 -5
  43. package/package.json +4 -4
@@ -1,44 +1,53 @@
1
- import { useActionsApi as S } from "../composables/useActionsApi.js";
2
- import { useHtmlCompiler as f } from "../composables/useHtmlCompiler.js";
3
- import { useRecommendationExtensionStore as C } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
- import { useDynamicContentStore as T } from "../stores/dynamic-content.js";
5
- import { useUnsubscribeStore as x } from "../stores/unsubscribe.js";
6
- const h = () => {
7
- const o = T(), e = x(), { getCompiledEmail: i, getTemplateData: s } = S(), { compileHtml: n } = f();
1
+ import { useActionsApi as T } from "../composables/useActionsApi.js";
2
+ import { useHtmlCompiler as P } from "../composables/useHtmlCompiler.js";
3
+ import { useRecommendationExtensionStore as A } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
+ import { DATA_ATTRIBUTES as l } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
5
+ import { parsePageList as h } from "../extensions/Blocks/Unsubscribe/utils/utils.js";
6
+ import { useDynamicContentStore as C } from "../stores/dynamic-content.js";
7
+ import { useUnsubscribeStore as D } from "../stores/unsubscribe.js";
8
+ function x(i, e) {
9
+ const r = new DOMParser().parseFromString(i, "text/html").querySelectorAll(`[${l.PAGE_LIST}]`), n = [];
10
+ return r.forEach((t) => {
11
+ const o = t.getAttribute(l.PAGE_LIST);
12
+ o && n.push(...h(o));
13
+ }), e.filter((t) => n.includes(t));
14
+ }
15
+ const I = () => {
16
+ const i = C(), e = D(), { getCompiledEmail: a, getTemplateData: m } = T(), { compileHtml: r } = P();
8
17
  return {
9
18
  prepareTemplateDetails: async () => {
10
- const { html: a, ampHtml: m = "", ampErrors: r = [] } = await i({
19
+ const { html: t, ampHtml: o = "", ampErrors: p = [] } = await a({
11
20
  minimize: !0,
12
21
  resetDataSavedFlag: !1
13
- }), { html: c, css: l, syncModulesIds: p = [] } = await s();
22
+ }), { html: u, css: d, syncModulesIds: g = [] } = await m();
14
23
  e.selectedUnsubscribePages.length && await e.fetchTemplates();
15
- const { compiledHtml: u, stats: t, appliedRules: d } = n(a), g = o.getSelectedDynamicContentList, b = C();
24
+ const { compiledHtml: c, stats: s, appliedRules: S } = r(t), b = i.getSelectedDynamicContentList, f = A();
16
25
  return console.debug("HTML Compilation Stats:", {
17
- originalSize: t.originalSize,
18
- compiledSize: t.compiledSize,
19
- reduction: `${t.reductionPercentage.toFixed(2)}%`,
20
- appliedRules: d,
21
- executionTime: `${t.executionTime.toFixed(2)}ms`
26
+ originalSize: s.originalSize,
27
+ compiledSize: s.compiledSize,
28
+ reduction: `${s.reductionPercentage.toFixed(2)}%`,
29
+ appliedRules: S,
30
+ executionTime: `${s.executionTime.toFixed(2)}ms`
22
31
  }), {
23
- dynamicContentList: g,
24
- compiledHtml: u,
25
- rawHtml: c,
26
- css: l,
27
- ampHtml: m,
28
- ampErrors: r,
29
- modules: p.map(Number),
32
+ dynamicContentList: b,
33
+ compiledHtml: c,
34
+ rawHtml: u,
35
+ css: d,
36
+ ampHtml: o,
37
+ ampErrors: p,
38
+ modules: g.map(Number),
30
39
  recommendation: {
31
- campaignUrls: b.recommendationCampaignUrls,
40
+ campaignUrls: f.recommendationCampaignUrls,
32
41
  configs: {}
33
42
  },
34
43
  unsubscribe: {
35
44
  status: e.unsubscribePagesStatus,
36
- config: e.selectedUnsubscribePages
45
+ config: x(c, e.selectedUnsubscribePages)
37
46
  }
38
47
  };
39
48
  }
40
49
  };
41
50
  };
42
51
  export {
43
- h as useTemplatePreparation
52
+ I as useTemplatePreparation
44
53
  };
@@ -1,11 +1,10 @@
1
- const e = (s, t = {}) => ({
2
- id: s,
1
+ const o = (i, t = {}) => ({
2
+ id: i,
3
3
  dynamicPosition: t.dynamicPosition ?? !1,
4
4
  staticPosition: t.staticPosition ?? "bottom center",
5
5
  iconStatus: t.iconStatus ?? !1,
6
- offset: t.offset,
7
- preventXss: t.preventXss
6
+ offset: t.offset
8
7
  });
9
8
  export {
10
- e as getTooltipOptions
9
+ o as getTooltipOptions
11
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.1.1-beta.f3b45b9",
3
+ "version": "3.1.1-beta.face0c7",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -32,8 +32,8 @@
32
32
  "author": "",
33
33
  "license": "ISC",
34
34
  "dependencies": {
35
- "@stripoinc/ui-editor-extensions": "3.7.0",
36
- "@useinsider/design-system-vue": "0.14.28",
35
+ "@stripoinc/ui-editor-extensions": "3.5.0",
36
+ "@useinsider/design-system-vue": "1.1.0-beta.73ec2fa",
37
37
  "@vueuse/core": "11.3.0",
38
38
  "lodash-es": "4.17.21",
39
39
  "pinia": "2.3.1",
@@ -86,7 +86,7 @@
86
86
  },
87
87
  "guido": {
88
88
  "stripo": {
89
- "version": "2.59.2"
89
+ "version": "2.54.0"
90
90
  }
91
91
  }
92
92
  }