@useinsider/guido 3.30.0-beta.6054a97 → 3.30.0-beta.60f9fc0

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
@@ -235,6 +235,7 @@ one-way. While `ready` is `false` every `features` toggle reads as disabled.
235
235
  |-------|---------|-------------|
236
236
  | `ready` | - | Editor is loaded and ready |
237
237
  | `dynamic-content:open` | `DynamicContent \| null` | User wants to insert dynamic content |
238
+ | `dynamic-content:invalid-action` | `{ value: string }` | User clicked the link on an invalid chip's hover card; `value` is the chip's token |
238
239
  | `back` | - | Back button clicked |
239
240
  | `save:start` | - | Save process started |
240
241
  | `save:complete` | `SavedTemplateDetails` | Save completed successfully (includes `metadata`) |
@@ -297,6 +298,18 @@ guidoRef.value?.dynamicContent.insert({
297
298
  // Close dynamic content modal
298
299
  guidoRef.value?.dynamicContent.close();
299
300
 
301
+ // Mark chips as invalid (red, with a hover card). Each call replaces the list;
302
+ // an empty list clears every mark. `value` is the token, without braces.
303
+ guidoRef.value?.dynamicContent.setInvalid([
304
+ {
305
+ value: 'zc_profile.i12.city',
306
+ title: 'Dynamic Content Unavailable',
307
+ description: 'Segment name',
308
+ actionLabel: 'Update Segment',
309
+ actionAvailable: true,
310
+ },
311
+ ] satisfies InvalidDynamicContent[]);
312
+
300
313
  // Silent save (no UI feedback)
301
314
  guidoRef.value?.saveSilent();
302
315
 
@@ -575,6 +588,7 @@ import type {
575
588
  DynamicContent,
576
589
  DynamicContentList,
577
590
  DynamicContentNode,
591
+ InvalidDynamicContent,
578
592
  DefaultBlockType,
579
593
  CustomBlockType,
580
594
  } from '@useinsider/guido';
@@ -1,20 +1,20 @@
1
- import o from "./Guido.vue2.js";
1
+ import a from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
5
- var a = this, r = a._self._c, e = a._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), e.isLegacyUnsubscribeConversionEnabled ? r(e.LegacyUnsubscribeConvertedModal) : a._e(), e.moduleDynamicContentStore.queue.length > 0 ? r(e.AmbiguousDynamicContentModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isExternalDisplayConditionsEnabled ? r(e.DisplayConditionsHost) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(l) {
4
+ var o = function() {
5
+ var n = this, r = n._self._c, e = n._self._setupProxy;
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : n._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : n._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : n._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : n._e(), e.isLegacyUnsubscribeConversionEnabled ? r(e.LegacyUnsubscribeConvertedModal) : n._e(), e.moduleDynamicContentStore.queue.length > 0 ? r(e.AmbiguousDynamicContentModal) : n._e(), e.hoveredInvalidDynamicContent && e.hoveredInvalidEntry ? r(e.InvalidDynamicContentCard, { attrs: { entry: e.hoveredInvalidEntry, position: e.hoveredInvalidDynamicContent.position }, on: { "dynamic-content:invalid-action": e.handleInvalidDynamicContentAction, mouseenter: e.cancelInvalidCardHide, mouseleave: e.scheduleInvalidCardHide } }) : n._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : n._e(), e.isExternalDisplayConditionsEnabled ? r(e.DisplayConditionsHost) : n._e(), e.isTestPartner() ? n._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(l) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
- }, t = [], s = /* @__PURE__ */ i(
9
+ }, t = [], d = /* @__PURE__ */ i(
10
+ a,
10
11
  o,
11
- n,
12
12
  t,
13
13
  !1,
14
14
  null,
15
- "0c5f11a1"
15
+ "d21be5d5"
16
16
  );
17
- const u = s.exports;
17
+ const p = d.exports;
18
18
  export {
19
- u as default
19
+ p as default
20
20
  };
@@ -1,215 +1,238 @@
1
- import { defineComponent as Se, defineAsyncComponent as a, ref as W, computed as l, watch as $, onMounted as he, onUnmounted as Ee } from "vue";
2
- import { useCortexBlueprintBridge as Ce } from "../composables/useCortexBlueprintBridge.js";
3
- import { useEditorLock as De } from "../composables/useEditorLock.js";
4
- import { startEditorOpenMetrics as we } from "../composables/useEditorOpenMetrics.js";
5
- import { provideGuidoActions as Te } from "../composables/useGuidoActions.js";
6
- import { useGuidoStateBridge as ke } from "../composables/useGuidoStateBridge.js";
7
- import { usePartner as Fe } from "../composables/usePartner.js";
8
- import { useSaveValidationRollout as Me } from "../composables/useSaveValidationRollout.js";
9
- import { useStripo as Ie } from "../composables/useStripo.js";
10
- import { useTimerClone as Le } from "../composables/useTimerClone.js";
11
- import { useToaster as Re } from "../composables/useToaster.js";
12
- import { useTranslations as Oe } from "../composables/useTranslations.js";
13
- import { migrate as Ue } from "../config/migrator/index.js";
14
- import { ModuleFolderDefaults as G } from "../enums/defaults.js";
15
- import { RIBBON_SELECTOR as Ae } from "../enums/onboarding.js";
16
- import { ToasterTypeOptions as Ne } from "../enums/toaster.js";
17
- import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as _e } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
- import { disposeUnsubscribeListeners as Pe } from "../extensions/Blocks/Unsubscribe/block.js";
19
- import { disposeDisplayConditionRequest as xe } from "../extensions/DisplayConditions/bridge.js";
20
- import Be from "./organisms/AutoSaveController.vue.js";
21
- import He from "./organisms/base/AuthErrorModal.vue.js";
22
- import Ve from "./organisms/base/Toaster.vue.js";
23
- import We from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
24
- import $e from "./organisms/header/HeaderWrapper.vue.js";
25
- import Ge from "./organisms/LoadingWrapper.vue.js";
26
- import ze from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
27
- import qe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
28
- import Ke from "./organisms/validation/ValidationErrorDrawer.vue.js";
29
- import { useStripoApi as je } from "../services/stripoApi.js";
30
- import { useConfigStore as Je } from "../stores/config.js";
31
- import { useDynamicContentStore as Qe } from "../stores/dynamic-content.js";
32
- import { useEditorStore as C } from "../stores/editor.js";
33
- import { useModuleDynamicContentStore as q } from "../stores/module-dynamic-content.js";
34
- import { useOnboardingStore as Xe } from "../stores/onboarding.js";
35
- import { usePreviewStore as Ye } from "../stores/preview.js";
36
- import { useSaveValidationStore as Ze } from "../stores/save-validation.js";
37
- import { useTemplateStore as et } from "../stores/template.js";
38
- import { useUnsubscribeStore as tt } from "../stores/unsubscribe.js";
39
- import { readTrackFloor as K } from "../utils/linkTrackingIds.js";
40
- const Vt = /* @__PURE__ */ Se({
1
+ import { defineComponent as Me, defineAsyncComponent as s, ref as L, computed as d, watch as w, onMounted as Re, onUnmounted as Ae } from "vue";
2
+ import { useCortexBlueprintBridge as Oe } from "../composables/useCortexBlueprintBridge.js";
3
+ import { useEditorLock as Ue } from "../composables/useEditorLock.js";
4
+ import { startEditorOpenMetrics as _e } from "../composables/useEditorOpenMetrics.js";
5
+ import { provideGuidoActions as He } from "../composables/useGuidoActions.js";
6
+ import { useGuidoStateBridge as Ne } from "../composables/useGuidoStateBridge.js";
7
+ import { useInvalidDynamicContentMarking as Pe } from "../composables/useInvalidDynamicContentMarking.js";
8
+ import { usePartner as xe } from "../composables/usePartner.js";
9
+ import { useSaveValidationRollout as Be } from "../composables/useSaveValidationRollout.js";
10
+ import { useStripo as Ve } from "../composables/useStripo.js";
11
+ import { useTimerClone as We } from "../composables/useTimerClone.js";
12
+ import { useToaster as $e } from "../composables/useToaster.js";
13
+ import { useTranslations as Ge } from "../composables/useTranslations.js";
14
+ import { migrate as ze } from "../config/migrator/index.js";
15
+ import { ModuleFolderDefaults as Z } from "../enums/defaults.js";
16
+ import { RIBBON_SELECTOR as qe } from "../enums/onboarding.js";
17
+ import { ToasterTypeOptions as Ke } from "../enums/toaster.js";
18
+ import { useRecommendationExtensionStore as ee, disposeStrategyPageReturnListeners as Ye } from "../extensions/Blocks/Recommendation/store/recommendation.js";
19
+ import { disposeUnsubscribeListeners as je } from "../extensions/Blocks/Unsubscribe/block.js";
20
+ import { disposeDisplayConditionRequest as Je } from "../extensions/DisplayConditions/bridge.js";
21
+ import Qe from "./organisms/AutoSaveController.vue.js";
22
+ import Xe from "./organisms/base/AuthErrorModal.vue.js";
23
+ import Ze from "./organisms/base/Toaster.vue.js";
24
+ import et from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
25
+ import tt from "./organisms/header/HeaderWrapper.vue.js";
26
+ import ot from "./organisms/LoadingWrapper.vue.js";
27
+ import nt from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
28
+ import it from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
29
+ import rt from "./organisms/validation/ValidationErrorDrawer.vue.js";
30
+ import { useStripoApi as at } from "../services/stripoApi.js";
31
+ import { useConfigStore as st } from "../stores/config.js";
32
+ import { useDynamicContentStore as ct } from "../stores/dynamic-content.js";
33
+ import { useEditorStore as F } from "../stores/editor.js";
34
+ import { useModuleDynamicContentStore as te } from "../stores/module-dynamic-content.js";
35
+ import { useOnboardingStore as dt } from "../stores/onboarding.js";
36
+ import { usePreviewStore as lt } from "../stores/preview.js";
37
+ import { useSaveValidationStore as mt } from "../stores/save-validation.js";
38
+ import { useTemplateStore as ut } from "../stores/template.js";
39
+ import { useUnsubscribeStore as pt } from "../stores/unsubscribe.js";
40
+ import { readTrackFloor as oe } from "../utils/linkTrackingIds.js";
41
+ const eo = /* @__PURE__ */ Me({
41
42
  __name: "Guido",
42
43
  props: {
43
44
  config: null,
44
45
  ready: { type: Boolean, default: !0 }
45
46
  },
46
- emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
47
- setup(j, { expose: J, emit: i }) {
48
- const c = j, r = we(), Q = a(
47
+ emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click", "dynamic-content:invalid-action"],
48
+ setup(ne, { expose: ie, emit: r }) {
49
+ const l = ne, a = _e(), re = s(
49
50
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
50
- ), X = a(
51
+ ), ae = s(
51
52
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
52
- ), Y = a(
53
+ ), se = s(
53
54
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
54
- ), Z = a(
55
+ ), ce = s(
55
56
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
56
- ), ee = a(
57
+ ), de = s(
57
58
  () => import("./organisms/display-conditions/DisplayConditionsHost.vue.js")
58
- ), D = W(), te = a(
59
+ ), M = L(), le = s(
59
60
  () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
60
- ), oe = a(
61
+ ), me = s(
61
62
  () => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
62
- ), ne = a(
63
+ ), ue = s(
63
64
  () => import("./organisms/dynamic-content/AmbiguousDynamicContentModal.vue.js")
64
- ), y = W(), g = Qe(), w = tt(), re = q(), o = Je();
65
- c.ready && o.init(c.config);
66
- const d = C(), ie = Ye(), p = l(() => d.hasChanges), { isTestPartner: se } = Fe(), { isEnabled: ae, loadRollout: T } = Me(), { showToaster: k } = Re(), F = Oe(), M = () => {
65
+ ), pe = s(
66
+ () => import("./organisms/dynamic-content/InvalidDynamicContentCard.vue.js")
67
+ ), R = 200, S = L(), m = ct(), A = pt(), ve = te(), o = st();
68
+ l.ready && o.init(l.config);
69
+ const u = F(), ye = lt(), g = d(() => u.hasChanges), { isTestPartner: fe } = xe(), { isEnabled: ge, loadRollout: O } = Be(), { showToaster: U } = $e(), _ = Ge(), H = () => {
67
70
  var t;
68
- if (d.isVersionHistoryOpen) {
69
- console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), k({
70
- type: Ne.Warning,
71
- message: F("email-editor.save-blocked-outside-editor")
71
+ if (u.isVersionHistoryOpen) {
72
+ console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), U({
73
+ type: Ke.Warning,
74
+ message: _("email-editor.save-blocked-outside-editor")
72
75
  });
73
76
  return;
74
77
  }
75
- return (t = D.value) == null ? void 0 : t.saveSilent();
76
- }, I = (t) => {
77
- d.loadingStatus = t;
78
+ return (t = M.value) == null ? void 0 : t.saveSilent();
79
+ }, N = (t) => {
80
+ u.loadingStatus = t;
78
81
  };
79
- Ce(), ke();
80
- const b = () => {
82
+ Oe(), Ne();
83
+ const P = Pe(), h = () => {
81
84
  var t, e;
82
85
  return {
83
86
  emailId: o.templateId,
84
87
  userId: o.userId,
85
88
  username: o.username,
86
89
  partnerName: o.partnerName,
87
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
88
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
90
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || Z.SAVED_MODULES,
91
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || Z.DEFAULT_MODULES
89
92
  };
90
- }, { initPlugin: L, preloadRuntime: R } = Ie(r), { runExclusive: O, beginMount: U, isCurrentMount: v } = De();
91
- let f = 0;
92
- const { getDefaultTemplate: A } = je(), { cloneTimersOnSave: N, hasTimerBlocks: _ } = Le(), ce = l(() => {
93
+ }, { initPlugin: x, preloadRuntime: B } = Ve(a), { runExclusive: V, beginMount: W, isCurrentMount: C } = Ue();
94
+ let b = 0;
95
+ const { getDefaultTemplate: $ } = at(), { cloneTimersOnSave: G, hasTimerBlocks: z } = We(), be = d(() => {
93
96
  var t;
94
97
  return !((t = o.ui) != null && t.showHeader);
95
- }), de = l(() => o.isFeatureEnabled("reusableRecommendationStrategy")), me = l(() => o.externalDisplayConditions), le = l(
98
+ }), Se = d(() => o.isFeatureEnabled("reusableRecommendationStrategy")), he = d(() => o.externalDisplayConditions), Ce = d(
96
99
  () => o.isFeatureEnabled("legacyUnsubscribeConversion")
97
- ), ue = l(
98
- () => !!z().recommendationConfigs.strategyId
100
+ ), Ee = d(
101
+ () => !!ee().recommendationConfigs.strategyId
99
102
  );
100
- Te({
103
+ He({
101
104
  onBack: () => {
102
- console.debug("guido:back"), i("back");
105
+ console.debug("guido:back"), r("back");
103
106
  },
104
107
  onSaveStart: () => {
105
- console.debug("guido:save:start"), i("save:start");
108
+ console.debug("guido:save:start"), r("save:start");
106
109
  },
107
110
  onSaveComplete: (t) => {
108
- const e = { ...t, metadata: b() };
109
- console.debug("guido:save:complete", e), i("save:complete", e);
111
+ const e = { ...t, metadata: h() };
112
+ console.debug("guido:save:complete", e), r("save:complete", e);
110
113
  },
111
114
  onTestEmailClick: () => {
112
- console.debug("guido:test-email:click"), i("test-email:click");
115
+ console.debug("guido:test-email:click"), r("test-email:click");
113
116
  }
114
117
  });
115
- const P = (t) => {
116
- console.debug("dynamic-content:close", t), g.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
117
- }, x = () => {
118
+ const q = (t) => {
119
+ console.debug("dynamic-content:close", t), m.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
120
+ }, K = () => {
118
121
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
122
+ }, Y = (t) => {
123
+ m.setInvalidDynamicContent(t);
124
+ }, c = L(null), j = d(() => c.value ? m.getInvalidDynamicContent(c.value.value) : void 0);
125
+ let p = null;
126
+ const v = () => {
127
+ p && (clearTimeout(p), p = null);
128
+ }, E = () => {
129
+ v(), p = setTimeout(() => {
130
+ p = null, c.value = null;
131
+ }, R);
132
+ }, D = (t) => {
133
+ var n;
134
+ const { detail: e } = t;
135
+ typeof ((n = e == null ? void 0 : e.entry) == null ? void 0 : n.value) != "string" || !e.position || (v(), c.value = { value: e.entry.value, position: e.position });
119
136
  };
120
- $(() => p.value, () => {
121
- i("on-change", p.value);
137
+ w(j, (t) => {
138
+ !t && c.value && (v(), c.value = null);
122
139
  });
123
- const S = (t) => {
124
- const e = t, { attribute: s, position: u } = e.detail;
125
- console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s, u);
140
+ const De = (t) => {
141
+ console.debug("dynamic-content:invalid-action", t), v(), c.value = null, r("dynamic-content:invalid-action", { value: t.value });
126
142
  };
127
- let m = null;
128
- const h = () => {
143
+ w(() => g.value, () => {
144
+ r("on-change", g.value);
145
+ });
146
+ const I = (t) => {
147
+ const e = t, { attribute: n, position: f } = e.detail;
148
+ console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", n, f);
149
+ };
150
+ let y = null;
151
+ const T = () => {
129
152
  var e;
130
- const t = document.querySelector(Ae);
131
- (e = y.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
132
- }, E = async () => {
153
+ const t = document.querySelector(qe);
154
+ (e = S.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
155
+ }, k = async () => {
133
156
  var t;
134
- r.mark("host_ready");
157
+ a.mark("host_ready");
135
158
  try {
136
- o.initialized || o.init(c.config), d.templateId = o.templateId, r.setContext({
159
+ o.initialized || o.init(l.config), u.templateId = o.templateId, a.setContext({
137
160
  partnerName: o.partnerName,
138
161
  productType: o.productType,
139
162
  templateId: o.templateId,
140
163
  variationId: o.variationId
141
164
  });
142
- const e = o.template, s = (e == null ? void 0 : e.html) || "", u = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
143
- w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
144
- const pe = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), fe = {
165
+ const e = o.template, n = (e == null ? void 0 : e.html) || "", f = (e == null ? void 0 : e.css) || "", J = (e == null ? void 0 : e.preselectedDynamicContent) || [];
166
+ A.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
167
+ const Ie = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, Q = o.isFeatureEnabled("linkTrackingIds"), Te = {
145
168
  partnerName: o.partnerName,
146
169
  campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
147
170
  rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
148
- }, ye = {
171
+ }, ke = {
149
172
  itemsPriceFormatting: o.isFeatureEnabled("itemsPriceFormatting")
150
- }, V = (ve) => r.timed(
173
+ }, X = (Fe) => a.timed(
151
174
  "migration",
152
- () => Ue(ve, pe, fe, ye)
175
+ () => ze(Fe, Ie, Te, ke)
153
176
  );
154
- let n = {
155
- html: s && await V(s),
156
- css: u
177
+ let i = {
178
+ html: n && await X(n),
179
+ css: f
157
180
  };
158
- n.html || (n = await r.timed("default_template", () => A()), n.html = await V(n.html));
159
- const ge = H ? K(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
160
- _(n.html) && (n.html = await r.timed("timer_clone", () => N(n.html))), H && (d.trackIdSessionFloor = Math.max(ge, K(n.html)));
161
- const be = {
162
- preselectedDynamicContentList: B,
181
+ i.html || (i = await a.timed("default_template", () => $()), i.html = await X(i.html));
182
+ const Le = Q ? oe(i.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
183
+ z(i.html) && (i.html = await a.timed("timer_clone", () => G(i.html))), Q && (u.trackIdSessionFloor = Math.max(Le, oe(i.html)));
184
+ const we = {
185
+ preselectedDynamicContentList: J,
163
186
  onReady: () => {
164
- console.debug("guido:ready"), i("ready");
187
+ console.debug("guido:ready"), r("ready");
165
188
  }
166
189
  };
167
- f = U(), await L(n, b(), be, n.html !== s), g.selectedDynamicContentList = B;
190
+ b = W(), await x(i, h(), we, i.html !== n), m.selectedDynamicContentList = J;
168
191
  } catch (e) {
169
- console.error("Failed to initialize Stripo editor:", e), r.markFailed();
192
+ console.error("Failed to initialize Stripo editor:", e), a.markFailed();
170
193
  }
171
194
  };
172
- return he(async () => {
195
+ return Re(async () => {
173
196
  var e;
174
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), et().$reset(), Ze().$reset(), q().$reset(), Xe().resetOnboarding("recommendationLegacyStrategyOnboarding"), T(), h();
175
- const t = (e = y.value) == null ? void 0 : e.parentElement;
176
- if (t && (m = new ResizeObserver(h), m.observe(t)), R(), c.ready)
177
- await E();
197
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ee().$reset(), F().$reset(), ut().$reset(), mt().$reset(), te().$reset(), m.setInvalidDynamicContent([]), dt().resetOnboarding("recommendationLegacyStrategyOnboarding"), O(), T();
198
+ const t = (e = S.value) == null ? void 0 : e.parentElement;
199
+ if (t && (y = new ResizeObserver(T), y.observe(t)), B(), document.addEventListener("dynamic-content:open", I), document.addEventListener("dynamic-content:invalid-hover", D), document.addEventListener("dynamic-content:invalid-leave", E), l.ready)
200
+ await k();
178
201
  else {
179
- const s = $(() => c.ready, (u) => {
180
- u && (s(), E());
202
+ const n = w(() => l.ready, (f) => {
203
+ f && (n(), k());
181
204
  });
182
205
  }
183
- document.addEventListener("dynamic-content:open", S);
184
- }), Ee(() => {
185
- if (Pe(), _e(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
186
- xe();
206
+ }), Ae(() => {
207
+ if (je(), Ye(), a.dispose(), P.dispose(), y == null || y.disconnect(), document.removeEventListener("dynamic-content:open", I), document.removeEventListener("dynamic-content:invalid-hover", D), document.removeEventListener("dynamic-content:invalid-leave", E), v(), C(b)) {
208
+ Je();
187
209
  try {
188
- const t = C();
210
+ const t = F();
189
211
  t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
190
212
  } catch (t) {
191
213
  console.debug("Failed to close the editor readiness gate on unmount", t);
192
214
  }
193
215
  }
194
- O(async () => {
195
- if (v(f))
216
+ V(async () => {
217
+ if (C(b))
196
218
  try {
197
219
  window.UIEditor.removeEditor();
198
220
  } catch {
199
221
  console.debug("Failed to remove Stripo editor: No editor found");
200
222
  }
201
223
  }), o.reset();
202
- }), J({
224
+ }), ie({
203
225
  dynamicContent: {
204
- insert: P,
205
- close: x
226
+ insert: q,
227
+ close: K,
228
+ setInvalid: Y
206
229
  },
207
- hasChanges: p,
208
- saveSilent: M,
209
- setLoading: I
210
- }), { __sfc: !0, openMetrics: r, PreviewContainer: Q, OnboardingWrapper: X, AssignStrategyDrawer: Y, RemoveStrategyModal: Z, DisplayConditionsHost: ee, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: te, LegacyUnsubscribeConvertedModal: oe, AmbiguousDynamicContentModal: ne, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: w, moduleDynamicContentStore: re, props: c, configStore: o, editorStore: d, previewStore: ie, hasChanges: p, isTestPartner: se, isSaveValidationEnabled: ae, loadRollout: T, showToaster: k, trans: F, saveSilent: M, setLoading: I, emit: i, buildMetadata: b, initPlugin: L, preloadRuntime: R, runExclusive: O, beginMount: U, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: A, cloneTimersOnSave: N, hasTimerBlocks: _, noHeader: ce, isRrsEnabled: de, isExternalDisplayConditionsEnabled: me, isLegacyUnsubscribeConversionEnabled: le, hasAssignedStrategy: ue, insertDynamicContent: P, closeDynamicContent: x, handleDynamicContentOpen: S, ribbonObserver: m, updateRibbonOffset: h, startEditor: E, AutoSaveController: Be, AuthErrorModal: He, Toaster: Ve, FilterSelectionDrawer: We, HeaderWrapper: $e, LoadingWrapper: Ge, SaveAsTemplateDrawer: ze, UnsubscribeWrapper: qe, ValidationErrorDrawer: Ke };
230
+ hasChanges: g,
231
+ saveSilent: H,
232
+ setLoading: N
233
+ }), { __sfc: !0, openMetrics: a, PreviewContainer: re, OnboardingWrapper: ae, AssignStrategyDrawer: se, RemoveStrategyModal: ce, DisplayConditionsHost: de, autoSaveControllerRef: M, LegacyStrategyUpdatedModal: le, LegacyUnsubscribeConvertedModal: me, AmbiguousDynamicContentModal: ue, InvalidDynamicContentCard: pe, INVALID_CARD_HIDE_DELAY: R, wrapperRef: S, dynamicContentStore: m, unsubscribeStore: A, moduleDynamicContentStore: ve, props: l, configStore: o, editorStore: u, previewStore: ye, hasChanges: g, isTestPartner: fe, isSaveValidationEnabled: ge, loadRollout: O, showToaster: U, trans: _, saveSilent: H, setLoading: N, emit: r, invalidDynamicContentMarking: P, buildMetadata: h, initPlugin: x, preloadRuntime: B, runExclusive: V, beginMount: W, isCurrentMount: C, mountGeneration: b, getDefaultTemplate: $, cloneTimersOnSave: G, hasTimerBlocks: z, noHeader: be, isRrsEnabled: Se, isExternalDisplayConditionsEnabled: he, isLegacyUnsubscribeConversionEnabled: Ce, hasAssignedStrategy: Ee, insertDynamicContent: q, closeDynamicContent: K, setInvalidDynamicContent: Y, hoveredInvalidDynamicContent: c, hoveredInvalidEntry: j, invalidCardHideTimer: p, cancelInvalidCardHide: v, scheduleInvalidCardHide: E, handleInvalidDynamicContentHover: D, handleInvalidDynamicContentAction: De, handleDynamicContentOpen: I, ribbonObserver: y, updateRibbonOffset: T, startEditor: k, AutoSaveController: Qe, AuthErrorModal: Xe, Toaster: Ze, FilterSelectionDrawer: et, HeaderWrapper: tt, LoadingWrapper: ot, SaveAsTemplateDrawer: nt, UnsubscribeWrapper: it, ValidationErrorDrawer: rt };
211
234
  }
212
235
  });
213
236
  export {
214
- Vt as default
237
+ eo as default
215
238
  };
@@ -0,0 +1,22 @@
1
+ import a from "./InvalidDynamicContentCard.vue2.js";
2
+ /* empty css */
3
+ import c from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var t = this, n = t._self._c, e = t._self._setupProxy;
6
+ return n("div", { ref: "cardRef", staticClass: "invalid-dynamic-content-card", style: e.cardStyle, attrs: { id: "guido__invalid-dynamic-content-card", "aria-labelledby": "guido__invalid-dynamic-content-card-title", role: "dialog" }, on: { mouseenter: function(i) {
7
+ return e.emit("mouseenter");
8
+ }, mouseleave: function(i) {
9
+ return e.emit("mouseleave");
10
+ } } }, [n("p", { staticClass: "invalid-dynamic-content-card__title", attrs: { id: "guido__invalid-dynamic-content-card-title" } }, [t._v(" " + t._s(t.entry.title) + " ")]), n("p", { staticClass: "invalid-dynamic-content-card__description" }, [t._v(" " + t._s(t.entry.description) + " ")]), t.entry.actionAvailable && t.entry.actionLabel ? n("button", { staticClass: "invalid-dynamic-content-card__action", attrs: { id: "guido__invalid-dynamic-content-card-action", type: "button" }, on: { click: e.onAction } }, [t._v(" " + t._s(t.entry.actionLabel) + " ")]) : t._e()]);
11
+ }, o = [], d = /* @__PURE__ */ c(
12
+ a,
13
+ r,
14
+ o,
15
+ !1,
16
+ null,
17
+ "749d0533"
18
+ );
19
+ const v = d.exports;
20
+ export {
21
+ v as default
22
+ };
@@ -0,0 +1,30 @@
1
+ import { defineComponent as y, ref as u, onMounted as _, watch as x, nextTick as C, computed as R } from "vue";
2
+ const I = /* @__PURE__ */ y({
3
+ __name: "InvalidDynamicContentCard",
4
+ props: {
5
+ entry: null,
6
+ position: null
7
+ },
8
+ emits: ["dynamic-content:invalid-action", "mouseenter", "mouseleave"],
9
+ setup(m, { emit: s }) {
10
+ const t = m, i = 4, o = 8, r = u(), c = u({ width: 0, height: 0 }), a = () => {
11
+ var e;
12
+ const n = (e = r.value) == null ? void 0 : e.getBoundingClientRect();
13
+ n && (c.value = { width: n.width, height: n.height });
14
+ };
15
+ _(a), x(() => [t.entry, t.position], () => C(a));
16
+ const p = R(() => {
17
+ const { x: n, y: e, height: f = 0 } = t.position, { width: v, height: d } = c.value, h = e + f + i, l = e - i - d, w = h + d > window.innerHeight - o, g = window.innerWidth - v - o;
18
+ return {
19
+ top: `${w && l >= o ? l : h}px`,
20
+ left: `${Math.max(0, Math.min(n, g))}px`
21
+ };
22
+ });
23
+ return { __sfc: !0, CARD_OFFSET: i, VIEWPORT_MARGIN: o, props: t, emit: s, cardRef: r, cardSize: c, measureCard: a, cardStyle: p, onAction: () => {
24
+ s("dynamic-content:invalid-action", { value: t.entry.value });
25
+ } };
26
+ }
27
+ });
28
+ export {
29
+ I as default
30
+ };
@@ -3,7 +3,7 @@ import r from "./AssignStrategyDrawer.vue2.js";
3
3
  import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var a = function() {
5
5
  var e = this, s = e._self._c, t = e._self._setupProxy;
6
- return t.isRendered ? s(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, show: t.store.assignStrategyDrawerStatus, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
6
+ return t.store.assignStrategyDrawerStatus ? s(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
7
7
  return [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [t.strategiesLoading ? s(t.InSkeleton, { staticClass: "assign-strategy-select-skeleton", attrs: { sizing: t.SELECT_SKELETON_SIZING } }) : s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select w-23-s", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { create: function(c) {
8
8
  return t.store.openStrategyCreation();
9
9
  }, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];