@useinsider/guido 3.2.0-beta.cb38cc7 → 3.2.0-beta.ccaf9f5
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/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +43 -42
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
- package/dist/composables/useCortexBlueprintBridge.js +38 -0
- package/dist/composables/useEmailTemplateApplier.js +41 -0
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/composables/useSave.js +18 -21
- package/dist/enums/onboarding.js +7 -2
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -235
- package/dist/package.json.js +1 -1
- package/dist/services/templateLibraryApi.js +5 -4
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +17 -0
- package/dist/src/composables/useEmailTemplateApplier.d.ts +21 -0
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/pairProductVariables.js +89 -88
- package/package.json +3 -3
- package/dist/composables/validators/useCouponBlockValidator.js +0 -24
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as g, computed as s, watch as b } from "vue";
|
|
2
|
+
import { useRibbonOffset as u } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as l } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { useOnboardingStore as m } from "../../../stores/onboarding.js";
|
|
5
|
+
import { InOnboard as p } from "@useinsider/design-system-vue";
|
|
6
|
+
const k = /* @__PURE__ */ g({
|
|
6
7
|
__name: "VersionHistoryOnboarding",
|
|
7
|
-
setup(
|
|
8
|
-
const t =
|
|
8
|
+
setup(f) {
|
|
9
|
+
const t = l(), n = m(), { getTopPosition: r } = u(), e = s(() => [
|
|
9
10
|
{
|
|
10
11
|
classes: "guido-version-history-onboarding",
|
|
11
12
|
left: "409px",
|
|
12
|
-
top:
|
|
13
|
+
top: r(192),
|
|
13
14
|
position: "Left Top",
|
|
14
15
|
title: t("email-editor.onboarding-version-history-title"),
|
|
15
16
|
description: t("email-editor.onboarding-version-history-description"),
|
|
@@ -20,18 +21,18 @@ const C = /* @__PURE__ */ c({
|
|
|
20
21
|
nextButtonText: t("action-builder.ok"),
|
|
21
22
|
nextButtonClick: () => void n.close("versionHistoryOnboarding")
|
|
22
23
|
}
|
|
23
|
-
]),
|
|
24
|
+
]), a = s(() => n.onboardings.versionHistoryOnboarding.config.length > 0 && n.onboardings.versionHistoryOnboarding.isActive), d = () => {
|
|
24
25
|
var o, i;
|
|
25
26
|
(i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.nextButtonClick) == null || i.call(o);
|
|
26
|
-
},
|
|
27
|
+
}, c = () => {
|
|
27
28
|
var o, i;
|
|
28
29
|
(i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.backButtonClick) == null || i.call(o);
|
|
29
30
|
};
|
|
30
|
-
return
|
|
31
|
-
o && n.setConfig("versionHistoryOnboarding",
|
|
32
|
-
}, { immediate: !0 }), { __sfc: !0, trans: t, onboardingStore: n,
|
|
31
|
+
return b(() => n.onboardings.versionHistoryOnboarding.isActive, (o) => {
|
|
32
|
+
o && n.setConfig("versionHistoryOnboarding", e.value);
|
|
33
|
+
}, { immediate: !0 }), { __sfc: !0, trans: t, onboardingStore: n, getTopPosition: r, onboardingCardsConfig: e, isVisible: a, handleNext: d, handleBack: c, InOnboard: p };
|
|
33
34
|
}
|
|
34
35
|
});
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
k as default
|
|
37
38
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useEmailTemplateApplier as T, resetEmailTemplateApplier as E } from "./useEmailTemplateApplier.js";
|
|
2
|
+
import { getActivePinia as h } from "pinia";
|
|
3
|
+
import { watch as d, onUnmounted as y } from "vue";
|
|
4
|
+
const _ = "email_template", b = "chat", B = () => {
|
|
5
|
+
const l = h();
|
|
6
|
+
if (!l)
|
|
7
|
+
return;
|
|
8
|
+
const p = l._s, c = p == null ? void 0 : p.get(b);
|
|
9
|
+
if (!c)
|
|
10
|
+
return;
|
|
11
|
+
const { applyTemplate: m, applyTemplateDebounced: f } = T(), e = /* @__PURE__ */ new Map(), A = d(
|
|
12
|
+
() => c.messages,
|
|
13
|
+
(a) => {
|
|
14
|
+
Array.isArray(a) && a.forEach((n) => {
|
|
15
|
+
const u = n == null ? void 0 : n.segments;
|
|
16
|
+
Array.isArray(u) && u.forEach((i) => {
|
|
17
|
+
if ((i == null ? void 0 : i.type) !== "blueprint")
|
|
18
|
+
return;
|
|
19
|
+
const o = i;
|
|
20
|
+
if (o.blueprintType !== _)
|
|
21
|
+
return;
|
|
22
|
+
const r = o.blueprintId, t = o.blueprintData;
|
|
23
|
+
if (!r || !(t != null && t.html))
|
|
24
|
+
return;
|
|
25
|
+
const s = e.get(r);
|
|
26
|
+
s === void 0 ? (e.set(r, t.html), m(r, t)) : s !== t.html && (e.set(r, t.html), f(r, t));
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
{ deep: !0, immediate: !0 }
|
|
31
|
+
);
|
|
32
|
+
y(() => {
|
|
33
|
+
A(), e.clear(), E();
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
B as useCortexBlueprintBridge
|
|
38
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useActionsApi as u } from "./useActionsApi.js";
|
|
2
|
+
import { useToaster as T } from "./useToaster.js";
|
|
3
|
+
import { useTranslations as f } from "./useTranslations.js";
|
|
4
|
+
import { ToasterTypeOptions as n } from "../enums/toaster.js";
|
|
5
|
+
import { ref as y } from "vue";
|
|
6
|
+
const h = 250, s = y({}), o = {}, j = () => {
|
|
7
|
+
const { updateHtmlAndCss: l } = u(), { showToaster: r } = T(), i = f(), c = (e, t, p) => {
|
|
8
|
+
s.value = { ...s.value, [e]: "applying" };
|
|
9
|
+
try {
|
|
10
|
+
l(t, p), s.value = { ...s.value, [e]: "applied" }, r({
|
|
11
|
+
type: n.Success,
|
|
12
|
+
message: i("newsletter.ai-template-applied")
|
|
13
|
+
});
|
|
14
|
+
} catch (a) {
|
|
15
|
+
s.value = { ...s.value, [e]: "failed" }, r({
|
|
16
|
+
type: n.Alert,
|
|
17
|
+
message: a instanceof Error ? a.message : "Failed to apply template"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}, m = (e) => {
|
|
21
|
+
const t = o[e];
|
|
22
|
+
t && (clearTimeout(t), delete o[e]);
|
|
23
|
+
};
|
|
24
|
+
return { applyStatus: s, applyTemplate: (e, t) => {
|
|
25
|
+
t.html && (m(e), c(e, t.html, t.css ?? ""));
|
|
26
|
+
}, applyTemplateDebounced: (e, t) => {
|
|
27
|
+
if (!t.html)
|
|
28
|
+
return;
|
|
29
|
+
m(e);
|
|
30
|
+
const { html: p } = t, a = t.css ?? "";
|
|
31
|
+
o[e] = setTimeout(() => {
|
|
32
|
+
delete o[e], c(e, p, a);
|
|
33
|
+
}, h);
|
|
34
|
+
} };
|
|
35
|
+
}, w = () => {
|
|
36
|
+
Object.values(o).forEach(clearTimeout), Object.keys(o).forEach((l) => delete o[l]), s.value = {};
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
w as resetEmailTemplateApplier,
|
|
40
|
+
j as useEmailTemplateApplier
|
|
41
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RIBBON_SELECTOR as r } from "../enums/onboarding.js";
|
|
2
|
+
import { ref as f, onMounted as c, onBeforeUnmount as i } from "vue";
|
|
3
|
+
const m = () => {
|
|
4
|
+
const o = f(0);
|
|
5
|
+
let e = null;
|
|
6
|
+
const n = () => {
|
|
7
|
+
const t = document.querySelector(r), s = (t == null ? void 0 : t.offsetHeight) ?? 0;
|
|
8
|
+
o.value !== s && (o.value = s);
|
|
9
|
+
}, u = (t) => `${t + o.value}px`;
|
|
10
|
+
return c(() => {
|
|
11
|
+
n(), e = new MutationObserver(n), e.observe(document.body, {
|
|
12
|
+
childList: !0,
|
|
13
|
+
subtree: !0
|
|
14
|
+
});
|
|
15
|
+
}), i(() => {
|
|
16
|
+
e == null || e.disconnect();
|
|
17
|
+
}), { ribbonOffset: o, getTopPosition: u };
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
m as useRibbonOffset
|
|
21
|
+
};
|
|
@@ -1,32 +1,29 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useSaveStart as
|
|
4
|
-
import { useSyncModuleExtractor as
|
|
5
|
-
import { useStripoApi as
|
|
6
|
-
import { useTemplatePreparation as
|
|
7
|
-
import { useHtmlValidator as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
return { save: async (p = !1) => {
|
|
1
|
+
import { useActionsApi as S } from "./useActionsApi.js";
|
|
2
|
+
import { useConfig as V } from "./useConfig.js";
|
|
3
|
+
import { useSaveStart as x, useSaveComplete as y } from "./useGuidoActions.js";
|
|
4
|
+
import { useSyncModuleExtractor as w } from "./useSyncModuleExtractor.js";
|
|
5
|
+
import { useStripoApi as b } from "../services/stripoApi.js";
|
|
6
|
+
import { useTemplatePreparation as q } from "../utils/templatePreparation.js";
|
|
7
|
+
import { useHtmlValidator as H } from "./useHtmlValidator.js";
|
|
8
|
+
import { useLiquidValidator as L } from "./validators/useLiquidValidator.js";
|
|
9
|
+
const F = () => {
|
|
10
|
+
const o = x(), s = y(), { validateHtml: r } = H(), { validateLiquidSyntax: n } = L(), { callbacks: a, isFeatureEnabled: l } = V(), { extractSyncModuleData: d } = w(), { setSyncModuleUnsubscriptionPages: u } = b(), { editorSave: c } = S();
|
|
11
|
+
return { save: async (m = !1) => {
|
|
13
12
|
var i;
|
|
14
13
|
o();
|
|
15
|
-
const { prepareTemplateDetails:
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
if (d("liquidSyntax")) {
|
|
19
|
-
if (!await l(t.compiledHtml))
|
|
14
|
+
const { prepareTemplateDetails: p } = q(), t = await p();
|
|
15
|
+
if (l("liquidSyntax")) {
|
|
16
|
+
if (!await n(t.compiledHtml))
|
|
20
17
|
return;
|
|
21
18
|
} else if (!await r(t.compiledHtml, t.dynamicContentList, !0))
|
|
22
19
|
return;
|
|
23
20
|
if ((i = a.value) != null && i.externalValidation && !await a.value.externalValidation(t))
|
|
24
21
|
return;
|
|
25
|
-
await
|
|
26
|
-
const { unsubscribePayload:
|
|
27
|
-
return await
|
|
22
|
+
await c();
|
|
23
|
+
const { unsubscribePayload: f, stripoModules: v } = d(t.rawHtml);
|
|
24
|
+
return await u(f), t.modules = v, m || s(t), t;
|
|
28
25
|
} };
|
|
29
26
|
};
|
|
30
27
|
export {
|
|
31
|
-
|
|
28
|
+
F as useSave
|
|
32
29
|
};
|
package/dist/enums/onboarding.js
CHANGED
|
@@ -2,10 +2,15 @@ const e = [
|
|
|
2
2
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-0.ng-star-inserted",
|
|
3
3
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-1.ng-star-inserted",
|
|
4
4
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-2.ng-star-inserted"
|
|
5
|
-
], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]',
|
|
5
|
+
], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]', E = ".in-ribbons-wrapper", o = ".guido__amp-toggle-html", a = ".in-segments-wrapper", O = '[data-testid="guido-header"]', _ = 158, i = 10;
|
|
6
6
|
export {
|
|
7
|
+
o as AMP_TOGGLE_BUTTON_SELECTOR,
|
|
8
|
+
a as AMP_TOGGLE_WRAPPER_SELECTOR,
|
|
7
9
|
n as CARD_COMPOSITION_TAB_SELECTOR,
|
|
8
|
-
|
|
10
|
+
O as HEADER_SELECTOR,
|
|
11
|
+
_ as POPOVER_LEFT_OFFSET,
|
|
12
|
+
i as POPOVER_TOP_GAP,
|
|
13
|
+
E as RIBBON_SELECTOR,
|
|
9
14
|
e as SERVICE_HOVER_SELECTORS,
|
|
10
15
|
s as SETTINGS_TAB_SELECTOR,
|
|
11
16
|
t as UI_EDITOR_SELECTOR
|
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-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-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-4e2a4adb]{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-
|
|
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-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-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-4e2a4adb]{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-55ed300a]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-55ed300a]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-55ed300a]{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-7419ae06] .vueperslides__bullets,[data-v-796d193b] .vueperslides__bullets{pointer-events:none!important}[data-v-796d193b] .vueperslides__parallax-wrapper{height:110px!important}[data-v-cadfc82d] .vueperslides__bullets{pointer-events:none!important}[data-v-cadfc82d] .vueperslides__parallax-wrapper{height:110px!important}
|