@useinsider/guido 3.1.1-beta.2144586 → 3.1.1-beta.22c7df2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.54.0" } }, s = {
1
+ const o = { stripo: { version: "2.60.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -1,7 +1,7 @@
1
- import { useHttp as c } from "../composables/useHttp.js";
2
- import { URLS as i } from "../enums/extensions/recommendationBlock.js";
3
- const f = () => {
4
- const { get: r } = c(), a = "6KcLM9TwheVB1mgK";
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 {
@@ -18,17 +18,15 @@ const f = () => {
18
18
  throw console.error("fetchRecommendationFilters error:", e), e;
19
19
  }
20
20
  },
21
- fetchRecommendationProducts: async (e, s) => {
21
+ fetchRecommendationProducts: async (e, i) => {
22
22
  var n;
23
23
  try {
24
- const t = decodeURIComponent(new URLSearchParams(Object.entries(s)).toString());
25
- console.debug("🏁 Recommendation API Query:", t);
26
- const { get: m } = c({
27
- headers: {
28
- "X-CLIENT-ID": a
29
- }
30
- }), o = await m(
31
- `${i.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}`
32
30
  );
33
31
  return ((n = o == null ? void 0 : o.data) == null ? void 0 : n.data) ?? [];
34
32
  } catch (t) {
@@ -38,5 +36,5 @@ const f = () => {
38
36
  };
39
37
  };
40
38
  export {
41
- f as useRecommendationApi
39
+ y as useRecommendationApi
42
40
  };
@@ -6,7 +6,7 @@
6
6
  * @param alignment - Currency alignment from block config: 'before' or 'after'
7
7
  * @returns Formatted price string with currency variable in correct position
8
8
  */
9
- export declare function formatPriceVariable(campaignId: string, productIndex: number, attribute: string, alignment: string): string;
9
+ export declare function formatPriceVariable(campaignId: string, productIndex: number, attribute: string, alignment: string, prefix?: string): string;
10
10
  /**
11
11
  * Transforms recommendation block HTML by replacing product data with
12
12
  * template variables.
@@ -3,6 +3,9 @@ import type { RecommendationFeedItem } from '@@/Types/recommendation';
3
3
  export declare const URLS: {
4
4
  RECOMMENDATION_API_URL: string;
5
5
  };
6
+ export declare const QUERY_PARAMS: {
7
+ CLIENT_ID: string;
8
+ };
6
9
  export declare const RecommendationFeedSourceMaps: RecommendationFeedItem[];
7
10
  export declare const PriceAttributes: string[];
8
11
  export declare const currencyLocationMaps: TextValueObject[];
@@ -1,4 +1,4 @@
1
- const o = `.control-shadow-wrapper:has(.button) {
1
+ const n = `.control-shadow-wrapper:has(.button) {
2
2
  border-radius: 0;
3
3
  box-shadow: none;
4
4
  background-color: transparent;
@@ -99,18 +99,12 @@ ue-check-button.checked:not(.flat-white) input:checked + label .icon-button {
99
99
  color: var(--guido-color-primary-500);
100
100
  }
101
101
 
102
- ue-select.full-width .button {
103
- border: none !important;
104
- background-color: var(--guido-color-neutral-200) !important;
105
- color: var(--guido-color-neutral-800) !important;
106
- }
107
-
108
102
  ue-select.full-width .button .icon-button {
109
103
  color: var(--guido-color-gray-600) !important;
110
104
  }
111
105
 
112
106
  ue-select.full-width .button:hover:not(:disabled,.disabled) {
113
- background-color: var(--guido-color-neutral-100) !important;
107
+ background-color: var(--guido-color-gray-0) !important;
114
108
  }
115
109
 
116
110
  ue-color {
@@ -130,7 +124,20 @@ ue-select-text-input .select-text-input-toggle .button {
130
124
  justify-content: center;
131
125
  background-color: transparent !important;
132
126
  }
127
+
128
+
129
+ .control-shadow-wrapper,
130
+ ue-button:not(.no-shadow,.flat-white),
131
+ ue-toggle:not(.no-shadow,.flat-white),
132
+ :is(ue-popover-toggler,ue-toggle-icon-picker,ue-emoji-toggle),
133
+ .button-group,
134
+ ue-counter:not(.no-shadow),
135
+ :is(ue-select,ue-mergetags,ue-font-family-select):not(.no-shadow),
136
+ ue-check-button:not(.no-shadow,.flat-white) {
137
+ background: none;
138
+ padding: 0;
139
+ }
133
140
  `;
134
141
  export {
135
- o as default
142
+ n as default
136
143
  };
@@ -28,6 +28,58 @@ ue-stripe-thumb:hover:not(.disabled),
28
28
  border-color: var(--guido-color-primary-500);
29
29
  }
30
30
 
31
+ /* Module search — initial */
32
+ .module-search-container {
33
+ background-color: var(--guido-color-gray-0);
34
+ border: 1px solid var(--guido-color-gray-300);
35
+ border-radius: 4px;
36
+ }
37
+
38
+ .module-search-container .service-element {
39
+ background-color: unset;
40
+ }
41
+
42
+ .module-filter-toggle {
43
+ top: -1px !important;
44
+ right: -1px !important;
45
+ }
46
+
47
+ .module-filter-toggle > .button,
48
+ .module-search-container:hover .module-filter-toggle > .button {
49
+ border: none;
50
+ background: transparent;
51
+ }
52
+
53
+ /* Module search — hover */
54
+ .module-search-container:has(.module-search-chip-input:hover) {
55
+ border-color: var(--guido-color-primary-500);
56
+ }
57
+
58
+ .module-search-container .module-search-chip-input .service-element:hover {
59
+ background-color: var(--guido-color-gray-0);
60
+ border-radius: 4px;
61
+ }
62
+
63
+ .module-search-container .module-filter-toggle:hover > .button {
64
+ background-color: var(--guido-color-gray-1);
65
+ }
66
+
67
+ /* Module search — selected (.on) */
68
+ .module-search-container:has(.module-search-chip-input.on),
69
+ .module-search-container:has(.module-search-chip-input.on):hover {
70
+ border-color: var(--guido-color-primary-500);
71
+ box-shadow: 0 0 0 3px var(--guido-color-primary-200) !important;
72
+ }
73
+
74
+ .module-search-container .module-search-chip-input.on .input-section {
75
+ background-color: unset;
76
+ box-shadow: unset;
77
+ }
78
+
79
+ .module-categories-list .menu-item {
80
+ padding: 8px 20px !important;
81
+ }
82
+
31
83
  .modules-layout-wrapper {
32
84
  padding: 0 16px 16px;
33
85
  grid-row-gap: 16px;
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.1.1-beta.2144586",
3
+ "version": "3.1.1-beta.22c7df2",
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,9 +32,8 @@
32
32
  "author": "",
33
33
  "license": "ISC",
34
34
  "dependencies": {
35
- "@stripoinc/ui-editor-extensions": "3.5.0",
35
+ "@stripoinc/ui-editor-extensions": "3.7.0",
36
36
  "@useinsider/design-system-vue": "1.1.0-beta.73ec2fa",
37
- "@useinsider/guido": "3.1.1-beta.22d798c",
38
37
  "@vueuse/core": "11.3.0",
39
38
  "lodash-es": "4.17.21",
40
39
  "pinia": "2.3.1",
@@ -87,7 +86,7 @@
87
86
  },
88
87
  "guido": {
89
88
  "stripo": {
90
- "version": "2.54.0"
89
+ "version": "2.60.0"
91
90
  }
92
91
  }
93
92
  }