@useinsider/guido 3.23.0-beta.9b14463 → 3.23.0-beta.a317dac

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -124,7 +124,12 @@ const config: GuidoConfigInput = {
124
124
  // host-side). Omit it and the repair is a silent no-op. Default: {}.
125
125
  dynamicContentList?: DynamicContentList,
126
126
  selectedUnsubscribePages?: number[],
127
- forceRecreate?: boolean, // Default: false - Force recreate template in Stripo storage
127
+ // Default: false. Stripo opens its stored copy for the templateId unless this is true;
128
+ // Guido sets it itself when a load-time migration rewrote the html. Set it to true
129
+ // whenever the host changed html under an existing templateId outside the editor.
130
+ // Behaviour change: releases up to v3.23.0 forced a recreate for any non-empty html and
131
+ // ignored this option, so a host that sends `false` now gets Stripo's stored copy.
132
+ forceRecreate?: boolean,
128
133
  migration?: {
129
134
  // Legacy block configs keyed by block ID. Consumed once by the migrator
130
135
  // when upgrading templates authored with v1 block formats. See the
@@ -12,7 +12,7 @@ var t = function() {
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "f2154cb6"
15
+ "93f16cac"
16
16
  );
17
17
  const v = n.exports;
18
18
  export {
@@ -141,7 +141,7 @@ const ht = /* @__PURE__ */ de({
141
141
  console.debug("guido:ready"), a("ready");
142
142
  }
143
143
  };
144
- p = L(), await M(r, v(), se), g.selectedDynamicContentList = O;
144
+ p = L(), await M(r, v(), se, r.html !== i), g.selectedDynamicContentList = O;
145
145
  } catch (e) {
146
146
  console.error("Failed to initialize Stripo editor:", e), n.markFailed();
147
147
  }
@@ -1,54 +1,54 @@
1
- import { useActionsApi as M } from "./useActionsApi.js";
2
- import { useBlocksConfig as N } from "./useBlocksConfig.js";
3
- import { useConfig as j } from "./useConfig.js";
4
- import { useCustomInterfaceAppearance as _ } from "./useCustomInterfaceAppearance.js";
5
- import { useFullStoryBridge as z } from "./useFullStoryBridge.js";
6
- import { useModuleRepair as $ } from "./useModuleRepair.js";
7
- import { useStripoEventHandler as G } from "./useStripoEventHandler.js";
8
- import { useStripoNotifications as X } from "./useStripoNotifications.js";
9
- import { useToaster as J } from "./useToaster.js";
10
- import { localePatch as K } from "../config/i18n/index.js";
1
+ import { useActionsApi as N } from "./useActionsApi.js";
2
+ import { useBlocksConfig as j } from "./useBlocksConfig.js";
3
+ import { useConfig as z } from "./useConfig.js";
4
+ import { useCustomInterfaceAppearance as v } from "./useCustomInterfaceAppearance.js";
5
+ import { useFullStoryBridge as $ } from "./useFullStoryBridge.js";
6
+ import { useModuleRepair as G } from "./useModuleRepair.js";
7
+ import { useStripoEventHandler as X } from "./useStripoEventHandler.js";
8
+ import { useStripoNotifications as J } from "./useStripoNotifications.js";
9
+ import { useToaster as K } from "./useToaster.js";
10
+ import { localePatch as Q } from "../config/i18n/index.js";
11
11
  import { en as B } from "../config/i18n/en/index.js";
12
- import { ToasterTypeOptions as Q } from "../enums/toaster.js";
13
- import { useStripoApi as W } from "../services/stripoApi.js";
14
- import Y from "../static/styles/customEditorStyle.css.js";
15
- import { useEditorStore as v } from "../stores/editor.js";
16
- import { buildMergeTagEntries as Z, flattenDynamicContentList as ee } from "../utils/genericUtil.js";
17
- import { getStripoRuntimeBaseUrl as te } from "../utils/stripoRuntime.js";
18
- let d = null, T = !1;
19
- const we = (e) => {
20
- const { features: u, template: m, isFeatureEnabled: p } = j(), { handleError: f, showToaster: F } = J(), { getToken: A, getCustomFonts: P, getSyncModulesStatus: R } = W(), { handleEvent: U } = G(), { handleModuleAdd: V } = $(), { getStripoBlocksConfig: D } = N(), { getStripoNotifications: I } = X(), g = () => d || (d = new Promise((a, s) => {
12
+ import { ToasterTypeOptions as W } from "../enums/toaster.js";
13
+ import { useStripoApi as Y } from "../services/stripoApi.js";
14
+ import Z from "../static/styles/customEditorStyle.css.js";
15
+ import { useEditorStore as T } from "../stores/editor.js";
16
+ import { buildMergeTagEntries as ee, flattenDynamicContentList as te } from "../utils/genericUtil.js";
17
+ import { getStripoRuntimeBaseUrl as oe } from "../utils/stripoRuntime.js";
18
+ let d = null, F = !1;
19
+ const ke = (t) => {
20
+ const { features: u, template: m, isFeatureEnabled: p } = z(), { handleError: f, showToaster: A } = K(), { getToken: P, getCustomFonts: R, getSyncModulesStatus: U } = Y(), { handleEvent: V } = X(), { handleModuleAdd: D } = G(), { getStripoBlocksConfig: I } = j(), { getStripoNotifications: L } = J(), g = () => d || (d = new Promise((n, a) => {
21
21
  if (document.getElementById("UiEditorScript")) {
22
- a();
22
+ n();
23
23
  return;
24
24
  }
25
- const i = te();
25
+ const i = oe();
26
26
  if (!i) {
27
- s(
27
+ a(
28
28
  new Error("guido.stripo.version is not set in package.json. Please configure the Stripo version.")
29
29
  );
30
30
  return;
31
31
  }
32
- const n = `${i}UIEditor.js`, t = document.createElement("script");
33
- t.id = "UiEditorScript", t.type = "module", t.src = n, t.onload = () => {
34
- T = !0, a();
35
- }, t.onerror = () => {
36
- t.remove(), s(new Error(`Failed to load Stripo UIEditor script from S3: ${n}`));
37
- }, document.body.appendChild(t);
32
+ const s = `${i}UIEditor.js`, e = document.createElement("script");
33
+ e.id = "UiEditorScript", e.type = "module", e.src = s, e.onload = () => {
34
+ F = !0, n();
35
+ }, e.onerror = () => {
36
+ e.remove(), a(new Error(`Failed to load Stripo UIEditor script from S3: ${s}`));
37
+ }, document.body.appendChild(e);
38
38
  }), d.catch(() => {
39
39
  d = null;
40
- }), d), L = async (a, s, i, n = [], t = !1) => {
41
- var C, w, k, b;
42
- const o = v(), { html: c, css: S } = a, { baseBlocks: y, extensions: q } = await D();
43
- e.mark("blocks_config_ready");
44
- const E = ((C = u.value) == null ? void 0 : C.displayConditions) ?? !0, x = ((w = u.value) == null ? void 0 : w.modulesDisabled) ?? !1, h = !!c || (((k = m.value) == null ? void 0 : k.forceRecreate) ?? !1), O = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
45
- e.setTemplate({ html: c, css: S, forceRecreate: h }), _().importCss(), e.mark("init_editor"), await window.UIEditor.initEditor(
40
+ }), d), q = async (n, a, i, s = [], e = !1, c = !1) => {
41
+ var w, k, b, _;
42
+ const o = T(), { html: S, css: y } = n, { baseBlocks: E, extensions: x } = await I();
43
+ t.mark("blocks_config_ready");
44
+ const h = ((w = u.value) == null ? void 0 : w.displayConditions) ?? !0, O = ((k = u.value) == null ? void 0 : k.modulesDisabled) ?? !1, C = c || (((b = m.value) == null ? void 0 : b.forceRecreate) ?? !1), H = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
45
+ t.setTemplate({ html: S, css: y, forceRecreate: C }), v().importCss(), t.mark("init_editor"), await window.UIEditor.initEditor(
46
46
  document.querySelector("#guido-editor"),
47
47
  {
48
- metadata: s,
49
- html: c,
50
- css: S,
51
- forceRecreate: h,
48
+ metadata: a,
49
+ html: S,
50
+ css: y,
51
+ forceRecreate: C,
52
52
  locale: "en",
53
53
  undoButtonSelector: "#guido__undo-button",
54
54
  redoButtonSelector: "#guido__redo-button",
@@ -58,12 +58,12 @@ const we = (e) => {
58
58
  customAppearanceMergetags: !p("liquidSyntax"),
59
59
  customAppearanceMergetagsBorderColor: "#f1f3fe",
60
60
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
61
- customViewStyles: Y,
62
- conditionsEnabled: E,
63
- customConditionsEnabled: E,
61
+ customViewStyles: Z,
62
+ conditionsEnabled: h,
63
+ customConditionsEnabled: h,
64
64
  enableXSSSecurity: !0,
65
- modulesDisabled: x,
66
- syncModulesEnabled: t,
65
+ modulesDisabled: O,
66
+ syncModulesEnabled: e,
67
67
  messageSettingsEnabled: !0,
68
68
  displayGmailAnnotations: !0,
69
69
  displayHiddenPreheader: !1,
@@ -73,37 +73,37 @@ const we = (e) => {
73
73
  copyPasteEnabled: !1,
74
74
  selectElementAfterDrop: !0,
75
75
  sameFontSizeForOutlook: !0,
76
- allowedScriptSourceDomains: O,
77
- ...y ? { baseBlocks: y } : {},
76
+ allowedScriptSourceDomains: H,
77
+ ...E ? { baseBlocks: E } : {},
78
78
  editorFonts: {
79
79
  showDefaultStandardFonts: !0,
80
80
  showDefaultNotStandardFonts: !0,
81
- customFonts: n
81
+ customFonts: s
82
82
  },
83
83
  mergeTags: [
84
84
  {
85
- entries: Z(
85
+ entries: ee(
86
86
  i.preselectedDynamicContentList,
87
- ee((b = m.value) == null ? void 0 : b.dynamicContentList),
87
+ te((_ = m.value) == null ? void 0 : _.dynamicContentList),
88
88
  p("liquidSyntax")
89
89
  )
90
90
  }
91
91
  ],
92
92
  async onTokenRefreshRequest(r) {
93
93
  try {
94
- e.mark("token_start");
95
- const l = await A();
96
- e.mark("token_end"), r(l);
94
+ t.mark("token_start");
95
+ const l = await P();
96
+ t.mark("token_end"), r(l);
97
97
  } catch (l) {
98
98
  f(l, "Failed to refresh token");
99
99
  }
100
100
  },
101
101
  onTemplateLoaded() {
102
102
  try {
103
- const { activateCustomViewStyles: r, updateTimerInClonedTemplate: l } = M(), { injectFullStory: H } = z();
104
- _().importCss(), r(), H(), l(), i.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
103
+ const { activateCustomViewStyles: r, updateTimerInClonedTemplate: l } = N(), { injectFullStory: M } = $();
104
+ v().importCss(), r(), M(), l(), i.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
105
105
  o.hasChanges = !1;
106
- }, 1e3), e.markReady();
106
+ }, 1e3), t.markReady();
107
107
  } catch (r) {
108
108
  f(r, "Failed to load custom interface appearance");
109
109
  }
@@ -120,9 +120,9 @@ const we = (e) => {
120
120
  onDataChanged() {
121
121
  o.hasChanges = !0, o.changeSeq += 1;
122
122
  },
123
- onEvent: U,
124
- onModuleAdd: V,
125
- notifications: I(),
123
+ onEvent: V,
124
+ onModuleAdd: D,
125
+ notifications: L(),
126
126
  // Stripo deselects the block on any click outside the canvas, so every surface
127
127
  // that belongs to the block's own flow has to be listed here (SD-153273).
128
128
  ignoreClickOutsideSelectors: [
@@ -132,29 +132,29 @@ const we = (e) => {
132
132
  ".in-modal-v2-wrapper",
133
133
  ".in-toasts-wrapper"
134
134
  ],
135
- extensions: q,
136
- localePatch: K
135
+ extensions: x,
136
+ localePatch: Q
137
137
  }
138
138
  );
139
139
  };
140
- return { initPlugin: async (a, s, i) => {
141
- const n = v();
140
+ return { initPlugin: async (n, a, i, s = !1) => {
141
+ const e = T();
142
142
  try {
143
- e.mark("plugin_start"), e.setScriptPreloaded(T), await g(), e.mark("script_ready");
144
- const [t, o] = await Promise.all([
145
- P(),
146
- R()
143
+ t.mark("plugin_start"), t.setScriptPreloaded(F), await g(), t.mark("script_ready");
144
+ const [c, o] = await Promise.all([
145
+ R(),
146
+ U()
147
147
  ]);
148
- e.mark("fonts_sync_ready"), n.syncModulesEnabled = o, await L(a, s, i, t, o);
148
+ t.mark("fonts_sync_ready"), e.syncModulesEnabled = o, await q(n, a, i, c, o, s);
149
149
  } catch {
150
- n.loadingStatus = !1, F({
151
- type: Q.Error,
150
+ e.loadingStatus = !1, A({
151
+ type: W.Error,
152
152
  message: B["An error has occurred. Please report the error code to support."],
153
153
  actionButton: {
154
154
  text: B["Reload page"],
155
155
  onClick: () => window.location.reload()
156
156
  }
157
- }), e.markFailed();
157
+ }), t.markFailed();
158
158
  }
159
159
  }, preloadRuntime: () => {
160
160
  g().catch(() => {
@@ -162,5 +162,5 @@ const we = (e) => {
162
162
  } };
163
163
  };
164
164
  export {
165
- we as useStripo
165
+ ke as useStripo
166
166
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .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-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-f2154cb6]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-f2154cb6]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-f2154cb6]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .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-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{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-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
1
+ @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .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-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-93f16cac]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-93f16cac]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-93f16cac]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .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-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{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-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
@@ -1,9 +1,9 @@
1
- const o = "3.23.0-beta.9b14463", s = { stripo: { version: "2.81.1" } }, t = {
1
+ const o = "3.23.0-beta.a317dac", s = { stripo: { version: "2.83.1" } }, a = {
2
2
  version: o,
3
3
  guido: s
4
4
  };
5
5
  export {
6
- t as default,
6
+ a as default,
7
7
  s as guido,
8
8
  o as version
9
9
  };
@@ -1,63 +1,60 @@
1
- import { useActionsApi as A } from "../composables/useActionsApi.js";
1
+ import { useActionsApi as h } from "../composables/useActionsApi.js";
2
2
  import { useConfig as S } from "../composables/useConfig.js";
3
- import { useHttp as E } from "../composables/useHttp.js";
3
+ import { useHttp as v } from "../composables/useHttp.js";
4
4
  import { useToaster as x } from "../composables/useToaster.js";
5
- import { useTranslations as P } from "../composables/useTranslations.js";
6
- import { useHtmlDocumentCountValidator as L } from "../composables/validators/useHtmlDocumentCountValidator.js";
5
+ import { useTranslations as A } from "../composables/useTranslations.js";
6
+ import { useHtmlDocumentCountValidator as E } from "../composables/validators/useHtmlDocumentCountValidator.js";
7
7
  import { useLiquidValidator as N } from "../composables/validators/useLiquidValidator.js";
8
8
  import { EditorType as H } from "../enums/defaults.js";
9
- import { ToasterTypeOptions as T } from "../enums/toaster.js";
9
+ import { ToasterTypeOptions as P } from "../enums/toaster.js";
10
10
  import { useRecommendationExtensionStore as D } from "../extensions/Blocks/Recommendation/store/recommendation.js";
11
- import { useSaveAsTemplateStore as q } from "../stores/save-as-template.js";
11
+ import { useSaveAsTemplateStore as L } from "../stores/save-as-template.js";
12
12
  import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
13
- import { isPlainObject as w } from "../utils/genericUtil.js";
13
+ import { isPlainObject as q } from "../utils/genericUtil.js";
14
14
  import { useTemplatePreparation as F } from "../utils/templatePreparation.js";
15
15
  const Z = () => {
16
- const { get: l, post: c } = E(), { handleError: o, showToaster: i } = x(), { config: p, isFeatureEnabled: u } = S(), { validateLiquidSyntax: b } = N(), { validateSingleHtmlDocument: C } = L(), { getTemplateData: h } = A(), n = P();
16
+ const { get: n, post: m } = v(), { handleError: s, showToaster: l } = x(), { config: c, isFeatureEnabled: p } = S(), { validateLiquidSyntax: T } = N(), { validateSingleHtmlDocument: w } = E(), { getTemplateData: b } = h(), u = A();
17
17
  return {
18
18
  getCategories: async () => {
19
19
  try {
20
- const { data: e } = await l("/newsletter/template-library/get-template-categories");
21
- return Array.isArray(e) ? e : ((!w(e) || e.type !== "alert") && console.error("[TEMPLATE_LIBRARY_API] Unexpected get-template-categories response", e), i({
22
- message: n("newsletter.template-library-service-error"),
23
- type: T.Error
24
- }), []);
20
+ const { data: e = [] } = await n("/newsletter/template-library/get-template-categories");
21
+ return e;
25
22
  } catch (e) {
26
- return o(e, "Failed to fetch template categories"), [];
23
+ return s(e, "Failed to fetch template categories"), [];
27
24
  }
28
25
  },
29
26
  checkTemplateNameAvailability: async (e) => {
30
- const { data: { status: t = !1 } } = await l(
27
+ const { data: { status: t = !1 } } = await n(
31
28
  `/newsletter/template-library/template-name-exists?name=${e}`
32
29
  );
33
30
  return !t;
34
31
  },
35
32
  createCategory: async (e) => {
36
33
  try {
37
- const { data: { id: t } } = await c(
34
+ const { data: { id: t } } = await m(
38
35
  "/newsletter/template-library/create-category",
39
36
  { name: e }
40
37
  );
41
38
  return t.toString();
42
39
  } catch (t) {
43
- return o(t, "Failed to create category"), "";
40
+ return s(t, "Failed to create category"), "";
44
41
  }
45
42
  },
46
43
  createTemplate: async () => {
47
44
  var e, t, d, y;
48
45
  try {
49
- const { prepareTemplateDetails: m } = F(), s = q(), g = await h();
50
- if (!C(g.html))
46
+ const { prepareTemplateDetails: i } = F(), o = L(), g = await b();
47
+ if (!w(g.html))
51
48
  return !1;
52
- const a = await m(g);
53
- if (u("liquidSyntax") && !await b(a.compiledHtml))
49
+ const a = await i(g);
50
+ if (p("liquidSyntax") && !await T(a.compiledHtml))
54
51
  return !1;
55
- const v = {
56
- name: s.getTemplateName,
57
- categories: s.getSelectedCategoryIds,
58
- productId: ((t = (e = p.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
52
+ const C = {
53
+ name: o.getTemplateName,
54
+ categories: o.getSelectedCategoryIds,
55
+ productId: ((t = (e = c.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
59
56
  editorType: H,
60
- messageType: ((y = (d = p.value) == null ? void 0 : d.partner) == null ? void 0 : y.messageType) || 0,
57
+ messageType: ((y = (d = c.value) == null ? void 0 : d.partner) == null ? void 0 : y.messageType) || 0,
61
58
  content: r(a.compiledHtml),
62
59
  css: r(a.css),
63
60
  unsubscriptionPreferencePageStatus: !1,
@@ -68,34 +65,34 @@ const Z = () => {
68
65
  recommendationConfigs: r({}),
69
66
  isGuido: !0,
70
67
  // eslint-disable-next-line camelcase
71
- template_engine: u("liquidSyntax") ? 1 : 0,
68
+ template_engine: p("liquidSyntax") ? 1 : 0,
72
69
  stripoConfig: r({
73
70
  editor: "stripo",
74
71
  html: a.rawHtml,
75
72
  css: a.css,
76
73
  dynamicContentList: a.dynamicContentList
77
74
  })
78
- }, { data: f } = await c(
75
+ }, { data: f } = await m(
79
76
  "/newsletter/template-library/create-template",
80
- v
77
+ C
81
78
  );
82
- if (!w(f))
79
+ if (!q(f))
83
80
  throw new Error("Unexpected create-template response");
84
- return f.type === "alert" ? (i({
85
- message: n(
81
+ return f.type === "alert" ? (l({
82
+ message: u(
86
83
  "newsletter.template-library-save-alert",
87
- { templateName: s.getTemplateName }
84
+ { templateName: o.getTemplateName }
88
85
  ),
89
- type: T.Error
90
- }), !1) : (i({
91
- message: n(
86
+ type: P.Error
87
+ }), !1) : (l({
88
+ message: u(
92
89
  "newsletter.template-library-save-success",
93
- { templateName: s.getTemplateName }
90
+ { templateName: o.getTemplateName }
94
91
  ),
95
92
  type: "success"
96
93
  }), !0);
97
- } catch (m) {
98
- return o(m, "Failed to create template"), !1;
94
+ } catch (i) {
95
+ return s(i, "Failed to create template"), !1;
99
96
  }
100
97
  }
101
98
  };
@@ -1,6 +1,6 @@
1
1
  import type { EditorOpenMetrics } from '@@/Composables/useEditorOpenMetrics';
2
2
  import type { Metadata, Options, Template } from '@@/Types/stripo';
3
3
  export declare const useStripo: (openMetrics: EditorOpenMetrics) => {
4
- initPlugin: (template: Template, metadata: Metadata, options: Options) => Promise<void>;
4
+ initPlugin: (template: Template, metadata: Metadata, options: Options, htmlChanged?: boolean) => Promise<void>;
5
5
  preloadRuntime: () => void;
6
6
  };
@@ -1,4 +1,4 @@
1
- const s = "2.81.1", n = ["UIEditor.js", "zone.js", "styles-BWH3PMR4.css", "polyfills-FF3RLU5F.js", "main-5LCHF56A.js", "chunk-2HYLRI4G.js", "chunk-4SN7BSQN.js", "chunk-5IY7ZG3R.js", "chunk-62K3AMOD.js", "chunk-GK543IRH.js", "chunk-L2EPGQ76.js", "chunk-LXS5IGCQ.js", "chunk-PNWIGF4L.js", "chunk-S2TYCIH3.js", "chunk-S5UZ4LUK.js", "chunk-V2AGQPVL.js", "chunk-XZ6MUAN5.js", "chunk-ZPL4VL4O.js", "assets/css/uiEditor.css", "assets/i18n/en.json", "assets/icons/ui-editor-icons.sprite.svg", "assets/icons/ui-editor-icons.map.json", "assets/imageeditor/scripts.min.js", "assets/imageeditor/assets/icons/merged.svg"], i = {
1
+ const s = "2.83.1", n = ["UIEditor.js", "zone.js", "styles-BWH3PMR4.css", "polyfills-FF3RLU5F.js", "main-OTN2PYRT.js", "chunk-62K3AMOD.js", "chunk-6RGJBGUG.js", "chunk-6W43DTQG.js", "chunk-EC4WGEOZ.js", "chunk-GLBBUJ54.js", "chunk-GPJLJCMF.js", "chunk-MDCDEJUH.js", "chunk-P7HQTFJV.js", "chunk-PA4WGBC4.js", "chunk-QMDAV6OU.js", "chunk-R2F3ADM2.js", "chunk-YSKQ2TWF.js", "chunk-ZU5ASRKR.js", "assets/css/uiEditor.css", "assets/i18n/en.json", "assets/icons/ui-editor-icons.sprite.svg", "assets/icons/ui-editor-icons.map.json", "assets/imageeditor/scripts.min.js", "assets/imageeditor/assets/icons/merged.svg"], i = {
2
2
  version: s,
3
3
  files: n
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.23.0-beta.9b14463",
3
+ "version": "3.23.0-beta.a317dac",
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",
@@ -128,7 +128,7 @@
128
128
  },
129
129
  "guido": {
130
130
  "stripo": {
131
- "version": "2.81.1"
131
+ "version": "2.83.1"
132
132
  }
133
133
  }
134
134
  }