@useinsider/guido 3.0.0-beta.b2b28fa → 3.0.0-beta.b3b5128

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 (39) hide show
  1. package/dist/components/Guido.vue.js +4 -4
  2. package/dist/components/Guido.vue2.js +81 -91
  3. package/dist/components/organisms/header/EditorActions.vue.js +10 -8
  4. package/dist/components/organisms/header/EditorActions.vue2.js +41 -31
  5. package/dist/components/organisms/header/MigrationConfirmModal.vue.js +17 -0
  6. package/dist/components/organisms/header/MigrationConfirmModal.vue2.js +39 -0
  7. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  8. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +1 -1
  9. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +1 -1
  10. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +2 -2
  11. package/dist/config/compiler/unsubscribeCompilerRules.js +14 -14
  12. package/dist/config/i18n/en/labels.json.js +8 -3
  13. package/dist/config/migrator/itemsBlockMigrator.js +135 -131
  14. package/dist/config/migrator/recommendationMigrator.js +58 -54
  15. package/dist/enums/block.js +4 -0
  16. package/dist/extensions/Blocks/Items/block.js +30 -21
  17. package/dist/extensions/Blocks/Items/iconsRegistry.js +7 -6
  18. package/dist/extensions/Blocks/Items/items.css.js +48 -0
  19. package/dist/extensions/Blocks/Recommendation/block.js +25 -13
  20. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +5 -4
  21. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +48 -0
  22. package/dist/extensions/Blocks/common-control.js +12 -4
  23. package/dist/guido.css +1 -1
  24. package/dist/src/@types/extensions/block.d.ts +2 -0
  25. package/dist/src/@types/generic.d.ts +0 -1
  26. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
  27. package/dist/src/components/organisms/header/MigrationConfirmModal.vue.d.ts +6 -0
  28. package/dist/src/components/wrappers/WpModal.vue.d.ts +2 -2
  29. package/dist/src/enums/block.d.ts +4 -0
  30. package/dist/src/extensions/Blocks/Items/block.d.ts +3 -1
  31. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +4 -1
  32. package/dist/src/extensions/Blocks/common-control.d.ts +5 -0
  33. package/dist/src/stores/template.d.ts +29 -0
  34. package/dist/src/utils/migrationBannerHtml.d.ts +2 -0
  35. package/dist/static/assets/info.svg.js +5 -0
  36. package/dist/stores/template.js +15 -0
  37. package/dist/utils/migrationBannerHtml.js +21 -0
  38. package/dist/utils/tooltipUtils.js +4 -5
  39. package/package.json +4 -3
@@ -1,18 +1,20 @@
1
- import { useOnboardingStore as d } from "../../../stores/onboarding.js";
2
- import { Block as g, BlockCompositionType as f, ModificationDescription as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
- import { SETTINGS_ENUMS as c, DefaultConfigValues as i } from "./enums/settingsEnums.js";
4
- import { getDefaultTemplate as p } from "./template.js";
5
- import { getItemsBlockContainer as u, getItemsBlockConfig as C, getDefaultItemsBlockConfig as I } from "./utils/nodeConfigUtils.js";
6
- const y = "items-block";
7
- class B extends g {
1
+ import { BlockId as g } from "../../../enums/block.js";
2
+ import { useOnboardingStore as p } from "../../../stores/onboarding.js";
3
+ import { getMigrationBannerHtml as f } from "../../../utils/migrationBannerHtml.js";
4
+ import { Block as u, BlockCompositionType as I, ModificationDescription as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ import { SETTINGS_ENUMS as a, DefaultConfigValues as i } from "./enums/settingsEnums.js";
6
+ import { getDefaultTemplate as C } from "./template.js";
7
+ import { getItemsBlockContainer as y, getItemsBlockConfig as b, getDefaultItemsBlockConfig as h } from "./utils/nodeConfigUtils.js";
8
+ const c = g.Items;
9
+ class E extends u {
8
10
  getId() {
9
- return y;
11
+ return c;
10
12
  }
11
13
  getIcon() {
12
14
  return "items-icon";
13
15
  }
14
16
  getBlockCompositionType() {
15
- return f.CONTAINER;
17
+ return I.CONTAINER;
16
18
  }
17
19
  getName() {
18
20
  return this.api.translate("Items");
@@ -20,10 +22,17 @@ class B extends g {
20
22
  getDescription() {
21
23
  return this.api.translate("Items lets you display personalized products based on user behavior.");
22
24
  }
25
+ getSettingsPanelTitleHtml() {
26
+ return f(
27
+ c,
28
+ this.api.translate("Items"),
29
+ this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.")
30
+ );
31
+ }
23
32
  getTemplate() {
24
- return p({
25
- orientation: c.ORIENTATION.VERTICAL,
26
- itemsType: c.ITEMS_TYPE.CART_ITEMS,
33
+ return C({
34
+ orientation: a.ORIENTATION.VERTICAL,
35
+ itemsType: a.ITEMS_TYPE.CART_ITEMS,
27
36
  itemId: "{{Abandoned Cart Item (1) Url}}",
28
37
  currencySymbol: i.productPriceCurrencySymbolControlValue,
29
38
  currencyLocation: i.productPriceCurrencyLocationControlValue,
@@ -34,21 +43,21 @@ class B extends g {
34
43
  return !1;
35
44
  }
36
45
  onCreated(n) {
37
- const s = this.api.getDocumentModifier(), r = this.api.getDocumentRootCssNode();
38
- r.querySelector('[product-attr="imageSrc"] img') || s.modifyCss(r).appendRule('[product-attr="imageSrc"] img {object-fit: contain;}');
39
- const e = u(n);
46
+ const l = this.api.getDocumentModifier(), r = this.api.getDocumentRootCssNode();
47
+ r.querySelector('[product-attr="imageSrc"] img') || l.modifyCss(r).appendRule('[product-attr="imageSrc"] img {object-fit: contain;}');
48
+ const e = y(n);
40
49
  if (!e)
41
50
  return;
42
- const a = e.getNodeConfig(), l = a && Object.keys(a).length > 0, t = C(n);
51
+ const s = e.getNodeConfig(), m = s && Object.keys(s).length > 0, t = b(n);
43
52
  if (t != null && t.initialized)
44
- l ? t.blockInstanceId || this.api.getDocumentModifier().modifyHtml(e).setNodeConfig({ ...t, blockInstanceId: String(Date.now()) }).apply(new o("Assign block instance ID to block")) : this.api.getDocumentModifier().modifyHtml(e).setNodeConfig(t).apply(new o("Migrate legacy config to nodeConfig"));
53
+ m ? t.blockInstanceId || this.api.getDocumentModifier().modifyHtml(e).setNodeConfig({ ...t, blockInstanceId: String(Date.now()) }).apply(new o("Assign block instance ID to block")) : this.api.getDocumentModifier().modifyHtml(e).setNodeConfig(t).apply(new o("Migrate legacy config to nodeConfig"));
45
54
  else {
46
- const m = I();
47
- this.api.getDocumentModifier().modifyHtml(e).setNodeConfig(m).apply(new o("Initialize Items block with default configuration")), d().startOnboarding("itemsOnboarding");
55
+ const d = h();
56
+ this.api.getDocumentModifier().modifyHtml(e).setNodeConfig(d).apply(new o("Initialize Items block with default configuration")), p().startOnboarding("itemsOnboarding");
48
57
  }
49
58
  }
50
59
  }
51
60
  export {
52
- y as BLOCK_ID,
53
- B as ItemsBlock
61
+ c as BLOCK_ID,
62
+ E as ItemsBlock
54
63
  };
@@ -1,5 +1,6 @@
1
- import { IconsRegistry as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class i extends o {
1
+ import o from "../../../static/assets/info.svg.js";
2
+ import { IconsRegistry as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
+ class s extends r {
3
4
  registerIconsSvg(t) {
4
5
  t["items-icon"] = `
5
6
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -19,14 +20,14 @@ class i extends o {
19
20
  </svg>
20
21
  `, t["horizontal-orientation"] = `
21
22
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
22
- <path d="M10 19H4C3.44772 19 3 18.5523 3 18V2C3 1.44772 3.44772 1 4 1H10V19Z" stroke="currentColor"
23
+ <path d="M10 19H4C3.44772 19 3 18.5523 3 18V2C3 1.44772 3.44772 1 4 1H10V19Z" stroke="currentColor"
23
24
  stroke-width="2" fill="none"/>
24
- <path d="M17 2V18C17 18.5523 16.5523 19 16 19H10V1H16C16.5523 1 17 1.44772 17 2Z" stroke="currentColor"
25
+ <path d="M17 2V18C17 18.5523 16.5523 19 16 19H10V1H16C16.5523 1 17 1.44772 17 2Z" stroke="currentColor"
25
26
  stroke-width="2" fill="none"/>
26
27
  </svg>
27
- `;
28
+ `, t["migration-info-icon"] = o;
28
29
  }
29
30
  }
30
31
  export {
31
- i as ItemsIconsRegistry
32
+ s as ItemsIconsRegistry
32
33
  };
@@ -17,6 +17,54 @@ const n = `/* Utils */
17
17
  .container:has(.items-controls-container) {
18
18
  padding: 0
19
19
  }
20
+
21
+ /* ─── Migration Info Box ─────────────────────────────────────────────── */
22
+ /* Shown in the settings panel title when a block was migrated from legacy */
23
+
24
+ /* Layout variables for positioning the absolutely-placed info box */
25
+ :host {
26
+ --items-migration-padding: 16px;
27
+ --items-migration-title-height: 61px;
28
+ --items-migration-box-height: 98px;
29
+ }
30
+
31
+ /* Push tabs down when info box is present inside the control panel header */
32
+ .control-panel-header:has(.items-block-migration-info) {
33
+ position: relative;
34
+ margin-bottom: calc(2 * var(--items-migration-padding) + var(--items-migration-box-height));
35
+ }
36
+
37
+ /* Info box container */
38
+ .items-block-migration-info {
39
+ display: flex;
40
+ align-items: flex-start;
41
+ gap: 8px;
42
+ padding: 12px;
43
+ background: var(--guido-color-background-onpage-message-info);
44
+ border: 1px solid var(--guido-color-border-onpage-message-info);
45
+ border-radius: 4px;
46
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
47
+ position: absolute;
48
+ left: var(--items-migration-padding);
49
+ right: var(--items-migration-padding);
50
+ top: calc(var(--items-migration-padding) + var(--items-migration-title-height));
51
+ }
52
+
53
+ /* Icon — 18x19 icon inside a 24x24 bounding box (matches Figma) */
54
+ .items-block-migration-info__icon {
55
+ flex-shrink: 0;
56
+ width: 24px;
57
+ height: 24px;
58
+ }
59
+
60
+ /* Text content */
61
+ .items-block-migration-info__text {
62
+ margin: 4px 0;
63
+ white-space: normal;
64
+ font-size: 13px;
65
+ font-weight: 400;
66
+ line-height: 16px;
67
+ }
20
68
  `;
21
69
  export {
22
70
  n as default
@@ -1,13 +1,15 @@
1
- var p = Object.defineProperty;
2
- var f = (r, o, t) => o in r ? p(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
3
- var g = (r, o, t) => f(r, typeof o != "symbol" ? o + "" : o, t);
4
- import { Block as h, BlockCompositionType as I, ModificationDescription as _ } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
1
+ var f = Object.defineProperty;
2
+ var h = (r, o, t) => o in r ? f(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
3
+ var g = (r, o, t) => h(r, typeof o != "symbol" ? o + "" : o, t);
4
+ import { BlockId as I } from "../../../enums/block.js";
5
+ import { getMigrationBannerHtml as k } from "../../../utils/migrationBannerHtml.js";
6
+ import { Block as B, BlockCompositionType as _, ModificationDescription as R } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
7
  import { ensureMobileCssRulesExist as d } from "./controls/mobileLayout/cssRules.js";
6
8
  import { RecommendationConfigService as s } from "./services/configService.js";
7
9
  import { useRecommendationExtensionStore as u } from "./store/recommendation.js";
8
- import { getDefaultTemplate as k } from "./templates/grid/template.js";
9
- const B = "recommendation-block", c = "recommendation-block-v2", a = "recommendation-id";
10
- class y extends h {
10
+ import { getDefaultTemplate as A } from "./templates/grid/template.js";
11
+ const p = I.Recommendation, c = "recommendation-block-v2", a = "recommendation-id";
12
+ class T extends B {
11
13
  constructor() {
12
14
  super();
13
15
  /**
@@ -17,13 +19,13 @@ class y extends h {
17
19
  g(this, "_pendingBlockId", null);
18
20
  }
19
21
  getId() {
20
- return B;
22
+ return p;
21
23
  }
22
24
  getIcon() {
23
25
  return "recommendation-icon";
24
26
  }
25
27
  getBlockCompositionType() {
26
- return I.CONTAINER;
28
+ return _.CONTAINER;
27
29
  }
28
30
  getName() {
29
31
  return this.api.translate("Recommendation Block");
@@ -31,6 +33,16 @@ class y extends h {
31
33
  getDescription() {
32
34
  return this.api.translate("Recommendation Block Title Description");
33
35
  }
36
+ getSettingsPanelTitleHtml() {
37
+ return k(
38
+ p,
39
+ this.api.translate("Recommendation Block"),
40
+ this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.")
41
+ );
42
+ }
43
+ allowInnerBlocksDND() {
44
+ return !1;
45
+ }
34
46
  /**
35
47
  * Returns the template HTML for a new recommendation block.
36
48
  * Generates a unique recommendation ID and embeds the instance class
@@ -40,7 +52,7 @@ class y extends h {
40
52
  */
41
53
  getTemplate() {
42
54
  const t = this._generateNextId();
43
- return this._pendingBlockId = t, k(t);
55
+ return this._pendingBlockId = t, A(t);
44
56
  }
45
57
  /**
46
58
  * Called when a new block is dropped into the template
@@ -115,7 +127,7 @@ class y extends h {
115
127
  if (!n)
116
128
  return;
117
129
  const i = this.api.getDocumentModifier();
118
- i.modifyHtml(n).setAttribute(a, e.toString()), i.apply(new _(`Assign recommendation ID ${e}`));
130
+ i.modifyHtml(n).setAttribute(a, e.toString()), i.apply(new R(`Assign recommendation ID ${e}`));
119
131
  }
120
132
  /**
121
133
  * Gets the recommendation-id from a block node
@@ -149,6 +161,6 @@ class y extends h {
149
161
  }
150
162
  }
151
163
  export {
152
- B as BLOCK_ID,
153
- y as RecommendationBlock
164
+ p as BLOCK_ID,
165
+ T as RecommendationBlock
154
166
  };
@@ -1,5 +1,6 @@
1
- import { IconsRegistry as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class o extends r {
1
+ import r from "../../../static/assets/info.svg.js";
2
+ import { IconsRegistry as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
+ class h extends t {
3
4
  registerIconsSvg(C) {
4
5
  C["recommendation-icon"] = `
5
6
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
@@ -59,9 +60,9 @@ class o extends r {
59
60
  <circle cx="3" cy="16" r="1" stroke="currentColor" stroke-width="1"/>
60
61
  <rect x="7" y="15" width="11" height="2" rx="1"/>
61
62
  </svg>
62
- `;
63
+ `, C["migration-info-icon"] = r;
63
64
  }
64
65
  }
65
66
  export {
66
- o as RecommendationIconsRegistry
67
+ h as RecommendationIconsRegistry
67
68
  };
@@ -22,6 +22,54 @@ const n = `/* Utils */
22
22
  ue-orderable.orderable-disabled .droppable-icon {
23
23
  display: none;
24
24
  }
25
+
26
+ /* ─── Migration Info Box ─────────────────────────────────────────────── */
27
+ /* Shown in the settings panel title when a block was migrated from legacy */
28
+
29
+ /* Layout variables for positioning the absolutely-placed info box */
30
+ :host {
31
+ --rec-migration-padding: 16px;
32
+ --rec-migration-title-height: 61px;
33
+ --rec-migration-box-height: 98px;
34
+ }
35
+
36
+ /* Push tabs down when info box is present inside the control panel header */
37
+ .control-panel-header:has(.recommendation-block-migration-info) {
38
+ position: relative;
39
+ margin-bottom: calc(2 * var(--rec-migration-padding) + var(--rec-migration-box-height));
40
+ }
41
+
42
+ /* Info box container */
43
+ .recommendation-block-migration-info {
44
+ display: flex;
45
+ align-items: flex-start;
46
+ gap: 8px;
47
+ padding: 12px;
48
+ background: var(--guido-color-background-onpage-message-info);
49
+ border: 1px solid var(--guido-color-border-onpage-message-info);
50
+ border-radius: 4px;
51
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
52
+ position: absolute;
53
+ left: var(--rec-migration-padding);
54
+ right: var(--rec-migration-padding);
55
+ top: calc(var(--rec-migration-padding) + var(--rec-migration-title-height));
56
+ }
57
+
58
+ /* Icon — 18x19 icon inside a 24x24 bounding box (matches Figma) */
59
+ .recommendation-block-migration-info__icon {
60
+ flex-shrink: 0;
61
+ width: 24px;
62
+ height: 24px;
63
+ }
64
+
65
+ /* Text content */
66
+ .recommendation-block-migration-info__text {
67
+ margin: 4px 0;
68
+ white-space: normal;
69
+ font-size: 13px;
70
+ font-weight: 400;
71
+ line-height: 16px;
72
+ }
25
73
  `;
26
74
  export {
27
75
  n as default
@@ -1,5 +1,5 @@
1
- var I = Object.defineProperty;
2
- var O = (T, r, e) => r in T ? I(T, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[r] = e;
1
+ var l = Object.defineProperty;
2
+ var O = (T, r, e) => r in T ? l(T, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[r] = e;
3
3
  var u = (T, r, e) => O(T, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { Control as c, UIElementType as n, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
5
  class _ extends c {
@@ -129,6 +129,14 @@ class _ extends c {
129
129
  </${n.BUTTON}>
130
130
  `;
131
131
  }
132
+ _GuIcon({ src: e, className: t = "" }) {
133
+ return `
134
+ <${n.ICON}
135
+ ${$.ICON.src}="${e}"
136
+ ${t ? `class="${t}"` : ""}>
137
+ </${n.ICON}>
138
+ `;
139
+ }
132
140
  /**
133
141
  *
134
142
  * @param param0
@@ -167,9 +175,9 @@ class _ extends c {
167
175
  _GuOrderable(e, t) {
168
176
  let E = "";
169
177
  t.forEach((a) => {
170
- const l = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
178
+ const I = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
171
179
  E += `
172
- <${n.ORDERABLE_ITEM} ${l}="${a.key}">
180
+ <${n.ORDERABLE_ITEM} ${I}="${a.key}">
173
181
  ${a.content}
174
182
  </${n.ORDERABLE_ITEM}>
175
183
  `;
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-079d2bf7] .in-progress-wrapper__progress p span:last-child{display:none!important}.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}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.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}.editor-actions[data-v-17dd4d8b]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-25780af6]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-25780af6]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-25780af6]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[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}
1
+ .gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-079d2bf7] .in-progress-wrapper__progress p span:last-child{display:none!important}.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}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.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}.editor-actions[data-v-acff76a8]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-a26d7792]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-a26d7792]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-a26d7792]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-29b9af29] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-d073b1dc] .vueperslides__bullets{pointer-events:none!important}[data-v-d073b1dc] .vueperslides__parallax-wrapper{height:110px!important}
@@ -0,0 +1,2 @@
1
+ import { BlockId as BlockIdEnum } from '@@/Enums/block';
2
+ export type BlockId = `${BlockIdEnum}`;
@@ -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;
@@ -1,4 +1,4 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {
2
- handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo").SavedTemplateDetails, "metadata"> | undefined>;
2
+ handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata"> | undefined> | undefined;
3
3
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
4
4
  export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ open: () => void;
3
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
4
+ confirm: () => void;
5
+ }, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
6
+ export default _default;
@@ -3,7 +3,7 @@ type __VLS_Props = {
3
3
  id: string;
4
4
  title: string;
5
5
  description?: string;
6
- size?: 'small' | 'medium' | 'large';
6
+ size?: 'X-small' | 'small' | 'medium' | 'large';
7
7
  footerButtonOptions?: FooterButtonGroup;
8
8
  closeButtonStatus?: boolean;
9
9
  closeOnOutsideClick?: boolean;
@@ -33,7 +33,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
33
33
  footerStatus: boolean;
34
34
  }>>>, {
35
35
  description: string;
36
- size: "small" | "medium" | "large";
36
+ size: "X-small" | "small" | "medium" | "large";
37
37
  closeOnOutsideClick: boolean;
38
38
  footerButtonOptions: FooterButtonGroup;
39
39
  closeButtonStatus: boolean;
@@ -0,0 +1,4 @@
1
+ export declare enum BlockId {
2
+ Items = "items-block",
3
+ Recommendation = "recommendation-block"
4
+ }
@@ -1,5 +1,6 @@
1
+ import type { BlockId } from '@@/Types/extensions/block';
1
2
  import { Block, BlockCompositionType, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
2
- export declare const BLOCK_ID = "items-block";
3
+ export declare const BLOCK_ID: BlockId;
3
4
  /**
4
5
  * Items Block extension for Stripo email editor.
5
6
  *
@@ -20,6 +21,7 @@ export declare class ItemsBlock extends Block {
20
21
  getBlockCompositionType(): BlockCompositionType;
21
22
  getName(): string;
22
23
  getDescription(): string;
24
+ getSettingsPanelTitleHtml(): string;
23
25
  getTemplate(): string;
24
26
  allowInnerBlocksDND(): boolean;
25
27
  onCreated(node: ImmutableHtmlNode): void;
@@ -5,9 +5,10 @@
5
5
  * Handles block lifecycle including configuration initialization and migration.
6
6
  * Supports multiple block instances with unique recommendation-id attributes.
7
7
  */
8
+ import type { BlockId } from '@@/Types/extensions/block';
8
9
  import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
9
10
  import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
10
- export declare const BLOCK_ID = "recommendation-block";
11
+ export declare const BLOCK_ID: BlockId;
11
12
  export declare class RecommendationBlock extends Block {
12
13
  /**
13
14
  * Stores the ID generated in getTemplate() so onCreated() can reuse it.
@@ -20,6 +21,8 @@ export declare class RecommendationBlock extends Block {
20
21
  getBlockCompositionType(): BlockCompositionType;
21
22
  getName(): string;
22
23
  getDescription(): string;
24
+ getSettingsPanelTitleHtml(): string;
25
+ allowInnerBlocksDND(): boolean;
23
26
  /**
24
27
  * Returns the template HTML for a new recommendation block.
25
28
  * Generates a unique recommendation ID and embeds the instance class
@@ -11,6 +11,10 @@ interface LabelProps {
11
11
  name?: string;
12
12
  position?: 'top' | 'left';
13
13
  }
14
+ interface IconProps {
15
+ src: string;
16
+ className?: string;
17
+ }
14
18
  interface IconButtonProps {
15
19
  name: string;
16
20
  icon: string;
@@ -89,6 +93,7 @@ export declare abstract class CommonControl extends Control {
89
93
  }): string;
90
94
  _GuRadioButton({ name, buttons, id }: RadioButtonProps): string;
91
95
  _GuButton({ name, label, id }: ButtonProps): string;
96
+ _GuIcon({ src, className }: IconProps): string;
92
97
  /**
93
98
  *
94
99
  * @param param0
@@ -0,0 +1,29 @@
1
+ import type { BlockId } from '@@/Types/extensions/block';
2
+ export declare const useTemplateStore: import("pinia").StoreDefinition<"guidoTemplate", {
3
+ migrations: Partial<Record<BlockId, number>>;
4
+ }, {
5
+ hasMigrations: (state: {
6
+ migrations: {
7
+ "recommendation-block"?: number | undefined;
8
+ "items-block"?: number | undefined;
9
+ };
10
+ } & import("pinia").PiniaCustomStateProperties<{
11
+ migrations: Partial<Record<BlockId, number>>;
12
+ }>) => boolean;
13
+ hasRecommendationMigrations: (state: {
14
+ migrations: {
15
+ "recommendation-block"?: number | undefined;
16
+ "items-block"?: number | undefined;
17
+ };
18
+ } & import("pinia").PiniaCustomStateProperties<{
19
+ migrations: Partial<Record<BlockId, number>>;
20
+ }>) => boolean;
21
+ hasItemsMigrations: (state: {
22
+ migrations: {
23
+ "recommendation-block"?: number | undefined;
24
+ "items-block"?: number | undefined;
25
+ };
26
+ } & import("pinia").PiniaCustomStateProperties<{
27
+ migrations: Partial<Record<BlockId, number>>;
28
+ }>) => boolean;
29
+ }, {}>;
@@ -0,0 +1,2 @@
1
+ import type { BlockId } from '@@/Types/extensions/block';
2
+ export declare function getMigrationBannerHtml(blockId: BlockId, blockName: string, infoText: string): string;
@@ -0,0 +1,5 @@
1
+ const a = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><g transform="translate(3, 2.5)"><path fill="#258DDE" d="M6.878.142c3.91-.723 7.802 1.369 9.323 5.022 1.533 3.683.231 7.927-3.11 10.138a8.47 8.47 0 0 1-10.563-.983l-.067-.065A8.318 8.318 0 0 1 0 8.343V8.25C.05 4.305 2.878.927 6.787.16l.092-.018Zm7.713 5.682c-1.216-2.92-4.342-4.582-7.467-3.97-3.125.614-5.378 3.331-5.382 6.491a6.597 6.597 0 0 0 1.952 4.688 6.718 6.718 0 0 0 8.43.83 6.595 6.595 0 0 0 2.467-8.039Z"/><path fill="#258DDE" d="M12.52 13.58a.876.876 0 0 1 1.215-.017l.016.015 3.993 3.946a.86.86 0 0 1 .002 1.222.876.876 0 0 1-1.232.002l-3.992-3.946-.016-.015a.86.86 0 0 1 .014-1.206ZM6.713 5.43a.876.876 0 0 0-1.232 0 .86.86 0 0 0 0 1.221l1.232-1.222Zm1.09 3.525a.876.876 0 0 0 1.232 0 .86.86 0 0 0 0-1.222L7.804 8.955Zm1.232-1.222a.876.876 0 0 0-1.231 0 .86.86 0 0 0 0 1.222l1.231-1.222Zm1.091 3.526a.876.876 0 0 0 1.232 0 .86.86 0 0 0 0-1.222l-1.232 1.222Zm-1.09-2.304a.86.86 0 0 0 0-1.222.876.876 0 0 0-1.232 0l1.231 1.222ZM5.48 10.037a.86.86 0 0 0 0 1.222.876.876 0 0 0 1.232 0L5.48 10.037Zm2.323-2.304a.86.86 0 0 0 0 1.222.876.876 0 0 0 1.231 0L7.804 7.733Zm3.554-1.082a.86.86 0 0 0 0-1.222.876.876 0 0 0-1.232 0l1.232 1.222Zm-5.877 0 2.323 2.304 1.231-1.222L6.713 5.43 5.48 6.651Zm2.323 2.304 2.322 2.304 1.232-1.222-2.323-2.304-1.231 1.222Zm0-1.222L5.48 10.037l1.232 1.222 2.322-2.304-1.231-1.222Zm1.231 1.222 2.323-2.304-1.232-1.222-2.322 2.304 1.231 1.222Z"/></g></svg>
2
+ `;
3
+ export {
4
+ a as default
5
+ };
@@ -0,0 +1,15 @@
1
+ import { BlockId as e } from "../enums/block.js";
2
+ import { defineStore as i } from "pinia";
3
+ const a = i("guidoTemplate", {
4
+ state: () => ({
5
+ migrations: {}
6
+ }),
7
+ getters: {
8
+ hasMigrations: (t) => Object.values(t.migrations).some((o) => (o ?? 0) > 0),
9
+ hasRecommendationMigrations: (t) => (t.migrations[e.Recommendation] ?? 0) > 0,
10
+ hasItemsMigrations: (t) => (t.migrations[e.Items] ?? 0) > 0
11
+ }
12
+ });
13
+ export {
14
+ a as useTemplateStore
15
+ };
@@ -0,0 +1,21 @@
1
+ import { useTemplateStore as o } from "../stores/template.js";
2
+ import { UIElementType as i, UEAttr as r } from "../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
+ function g(t, n, e) {
4
+ return (o().migrations[t] ?? 0) <= 0 ? "" : `<div>
5
+ <div style="display: flex; align-items: center;">
6
+ <span>${n}</span>
7
+ </div>
8
+ <div class="${t}-migration-info">
9
+ <${i.ICON}
10
+ ${r.ICON.src}="migration-info-icon"
11
+ class="${t}-migration-info__icon">
12
+ </${i.ICON}>
13
+ <p class="${t}-migration-info__text">
14
+ ${e}
15
+ </p>
16
+ </div>
17
+ </div>`;
18
+ }
19
+ export {
20
+ g as getMigrationBannerHtml
21
+ };
@@ -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.0.0-beta.b2b28fa",
3
+ "version": "3.0.0-beta.b3b5128",
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",
@@ -25,14 +25,15 @@
25
25
  "lint:fix": "NODE_OPTIONS=--max-old-space-size=2048 eslint --fix ./",
26
26
  "type-check": "vue-tsc --noEmit --project tsconfig.config.json && vue-tsc --noEmit --project tsconfig.app.json",
27
27
  "test:visual-update": "npx playwright test --update-snapshots --reporter html",
28
- "prepare": "husky"
28
+ "prepare": "husky",
29
+ "preinstall": "rm -rf ./node_modules/.vite"
29
30
  },
30
31
  "keywords": [],
31
32
  "author": "",
32
33
  "license": "ISC",
33
34
  "dependencies": {
34
35
  "@stripoinc/ui-editor-extensions": "3.5.0",
35
- "@useinsider/design-system-vue": "0.14.28",
36
+ "@useinsider/design-system-vue": "1.1.0",
36
37
  "@vueuse/core": "11.3.0",
37
38
  "lodash-es": "4.17.21",
38
39
  "pinia": "2.3.1",