@useinsider/guido 3.26.0 → 3.27.0-beta.13ad95b
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 +1 -0
- package/dist/@types/config/schemas.js +91 -89
- package/dist/@types/display-condition.js +25 -0
- package/dist/components/Guido.vue.js +5 -5
- package/dist/components/Guido.vue2.js +104 -98
- package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +17 -0
- package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +41 -0
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +30 -0
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +81 -0
- package/dist/components/organisms/display-conditions/DisplayConditionListState.vue.js +17 -0
- package/dist/components/organisms/display-conditions/DisplayConditionListState.vue2.js +45 -0
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +36 -0
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +63 -0
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +17 -0
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +22 -0
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +9 -10
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +42 -41
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +5 -5
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +15 -15
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +6 -6
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +28 -27
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +42 -27
- package/dist/composables/useBlocksConfig.js +29 -20
- package/dist/composables/useCustomInterfaceAppearance.js +50 -50
- package/dist/composables/useDisplayConditions.js +116 -0
- package/dist/composables/useFullStoryBridge.js +10 -9
- package/dist/composables/useTranslations.js +2 -1
- package/dist/config/compiler/utils/itemsCompilerUtils.js +43 -42
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +67 -64
- package/dist/enums/academy.js +1 -0
- package/dist/enums/display-condition.js +12 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +14 -14
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +52 -40
- package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +15 -15
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +17 -15
- package/dist/extensions/Blocks/common-control.js +25 -25
- package/dist/extensions/DisplayConditions/bridge.js +25 -0
- package/dist/extensions/DisplayConditions/constants.js +26 -0
- package/dist/extensions/DisplayConditions/control.js +215 -0
- package/dist/extensions/DisplayConditions/display-conditions.css.js +226 -0
- package/dist/extensions/DisplayConditions/extension.js +28 -0
- package/dist/extensions/DisplayConditions/iconsRegistry.js +20 -0
- package/dist/extensions/DisplayConditions/library.js +30 -0
- package/dist/extensions/DisplayConditions/settingsPanel.js +17 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +15 -17
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +93 -92
- package/dist/node_modules/valibot/dist/index.js +297 -261
- package/dist/package.json.js +2 -2
- package/dist/services/displayConditionApi.js +39 -0
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/@types/display-condition.d.ts +61 -0
- package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +43 -0
- package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +2 -0
- package/dist/src/components/organisms/display-conditions/DisplayConditionListState.vue.d.ts +18 -0
- package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +2 -0
- package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +2 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useDisplayConditions.d.ts +18 -0
- package/dist/src/enums/academy.d.ts +1 -0
- package/dist/src/enums/display-condition.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +2 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
- package/dist/src/extensions/DisplayConditions/bridge.d.ts +7 -0
- package/dist/src/extensions/DisplayConditions/constants.d.ts +23 -0
- package/dist/src/extensions/DisplayConditions/control.d.ts +25 -0
- package/dist/src/extensions/{Blocks/_Boilerplate → DisplayConditions}/iconsRegistry.d.ts +1 -1
- package/dist/src/extensions/DisplayConditions/library.d.ts +8 -0
- package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +5 -0
- package/dist/src/mock/api/display-conditions.d.ts +2 -0
- package/dist/src/services/displayConditionApi.d.ts +8 -0
- package/dist/src/stores/config.d.ts +170 -0
- package/dist/src/stores/display-condition.d.ts +86 -0
- package/dist/src/stores/onboarding.d.ts +1 -0
- package/dist/src/utils/displayCondition.d.ts +11 -0
- package/dist/src/utils/editorShadowRoot.d.ts +1 -0
- package/dist/src/utils/protectTableText.d.ts +2 -0
- package/dist/static/styles/variables.css.js +1 -0
- package/dist/stores/config.js +13 -6
- package/dist/stores/display-condition.js +29 -0
- package/dist/stores/onboarding.js +4 -1
- package/dist/utils/displayCondition.js +29 -0
- package/dist/utils/editorShadowRoot.js +8 -0
- package/dist/utils/pairProductVariables.js +29 -28
- package/dist/utils/protectTableText.js +22 -0
- package/package.json +11 -3
- package/dist/src/extensions/Blocks/_Boilerplate/block.d.ts +0 -11
- package/dist/src/extensions/Blocks/_Boilerplate/constants/controlIds.d.ts +0 -7
- package/dist/src/extensions/Blocks/_Boilerplate/constants/index.d.ts +0 -10
- package/dist/src/extensions/Blocks/_Boilerplate/constants/selectors.d.ts +0 -16
- package/dist/src/extensions/Blocks/_Boilerplate/control.d.ts +0 -17
- package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +0 -15
- package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
- package/dist/src/extensions/Blocks/_Boilerplate/template.d.ts +0 -6
- /package/dist/src/extensions/{Blocks/_Boilerplate → DisplayConditions}/extension.d.ts +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { defineComponent as T, ref as r, watch as I, computed as i } from "vue";
|
|
2
|
+
import O from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import B from "../../wrappers/WpModal.vue.js";
|
|
4
|
+
import { useDisplayConditions as L, DISPLAY_CONDITIONS_TRANS_KEY as s } from "../../../composables/useDisplayConditions.js";
|
|
5
|
+
import { useTranslations as M } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useDisplayConditionStore as h } from "../../../stores/display-condition.js";
|
|
7
|
+
import { getTooltipOptions as C } from "../../../utils/tooltipUtils.js";
|
|
8
|
+
import { InSkeleton as $, InDropdownMenu as E, InButtonV2 as b, InBasicTextInput as k } from "@useinsider/design-system-vue";
|
|
9
|
+
import w from "./DisplayConditionListState.vue.js";
|
|
10
|
+
const ee = /* @__PURE__ */ T({
|
|
11
|
+
__name: "DisplayConditionSelectDrawer",
|
|
12
|
+
setup(A) {
|
|
13
|
+
const g = [40, 76, 76, 76], l = M(), t = h(), { loadList: c, select: v, deleteSaved: d, cancel: D, describeWithAcademyLink: p } = L(), u = r(""), a = r(null), n = r(null), o = r(!1);
|
|
14
|
+
I(() => t.isSelectOpen, (e) => {
|
|
15
|
+
e && (u.value = "", a.value = null, n.value = null, c());
|
|
16
|
+
}, { immediate: !0 });
|
|
17
|
+
const f = i(() => {
|
|
18
|
+
const e = u.value.trim().toLocaleLowerCase();
|
|
19
|
+
return e ? t.list.filter((m) => `${m.name} ${m.description}`.toLocaleLowerCase().includes(e)) : t.list;
|
|
20
|
+
}), y = i(() => t.listStatus === "error" ? "error" : t.list.length ? f.value.length ? null : "no-result" : "empty"), _ = i(() => p("select-description")), S = i(() => ({
|
|
21
|
+
cancelOrBackButton: {
|
|
22
|
+
styling: "ghost",
|
|
23
|
+
type: "secondary",
|
|
24
|
+
labelText: l(`${s}.back`),
|
|
25
|
+
leftIcon: "line-arrow-left"
|
|
26
|
+
}
|
|
27
|
+
})), x = i(() => ({
|
|
28
|
+
cancelOrBackButton: {
|
|
29
|
+
type: "secondary",
|
|
30
|
+
styling: "ghost",
|
|
31
|
+
labelText: l(`${s}.cancel`),
|
|
32
|
+
disabledStatus: o.value
|
|
33
|
+
},
|
|
34
|
+
primaryButton: {
|
|
35
|
+
type: "danger",
|
|
36
|
+
labelText: l(`${s}.delete`),
|
|
37
|
+
loadingStatus: o.value
|
|
38
|
+
}
|
|
39
|
+
}));
|
|
40
|
+
return { __sfc: !0, SKELETON_HEIGHTS: g, trans: l, store: t, loadList: c, select: v, deleteSaved: d, cancel: D, describeWithAcademyLink: p, search: u, expandedId: a, menuId: n, isDeleting: o, filteredList: f, listState: y, descriptionText: _, footerButtonGroupOptions: S, deleteModalButtons: x, toggleExpanded: (e) => {
|
|
41
|
+
a.value = a.value === e.id ? null : e.id;
|
|
42
|
+
}, toggleMenu: (e) => {
|
|
43
|
+
n.value = n.value === e.id ? null : e.id;
|
|
44
|
+
}, closeMenu: (e) => {
|
|
45
|
+
n.value === e.id && (n.value = null);
|
|
46
|
+
}, expandTooltip: (e) => C(
|
|
47
|
+
`guido__display-condition-expand-tooltip-${e.id}`,
|
|
48
|
+
{ staticPosition: "top right" }
|
|
49
|
+
), menuOptions: (e) => [
|
|
50
|
+
{ text: l(`${s}.delete`), value: `guido__display-condition-delete-${e.id}` }
|
|
51
|
+
], requestDelete: (e) => {
|
|
52
|
+
n.value = null, t.pendingDelete = e;
|
|
53
|
+
}, confirmDelete: async () => {
|
|
54
|
+
!t.pendingDelete || o.value || (o.value = !0, await d(t.pendingDelete), o.value = !1);
|
|
55
|
+
}, closeDeleteModal: () => {
|
|
56
|
+
o.value || (t.pendingDelete = null);
|
|
57
|
+
}, codeOf: (e) => [e.codeBefore, e.codeAfter].filter(Boolean).join(`
|
|
58
|
+
`), WpDrawer: O, WpModal: B, KEY: s, InBasicTextInput: k, InButtonV2: b, InDropdownMenu: E, InSkeleton: $, DisplayConditionListState: w };
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
export {
|
|
62
|
+
ee as default
|
|
63
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import e from "./DisplayConditionsHost.vue2.js";
|
|
2
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var r = function() {
|
|
4
|
+
var s = this, o = s._self._c, t = s._self._setupProxy;
|
|
5
|
+
return o("div", { staticClass: "guido-display-conditions-host" }, [o(t.DisplayConditionCreateDrawer), o(t.DisplayConditionSelectDrawer)], 1);
|
|
6
|
+
}, i = [], a = /* @__PURE__ */ n(
|
|
7
|
+
e,
|
|
8
|
+
r,
|
|
9
|
+
i,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const p = a.exports;
|
|
15
|
+
export {
|
|
16
|
+
p as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as i, onMounted as s, onBeforeUnmount as m } from "vue";
|
|
2
|
+
import { useDisplayConditions as p } from "../../../composables/useDisplayConditions.js";
|
|
3
|
+
import { DisplayConditionEvent as n } from "../../../enums/display-condition.js";
|
|
4
|
+
import { useDisplayConditionStore as a } from "../../../stores/display-condition.js";
|
|
5
|
+
import d from "./DisplayConditionCreateDrawer.vue.js";
|
|
6
|
+
import f from "./DisplayConditionSelectDrawer.vue.js";
|
|
7
|
+
const E = /* @__PURE__ */ i({
|
|
8
|
+
__name: "DisplayConditionsHost",
|
|
9
|
+
setup(l) {
|
|
10
|
+
const o = a(), { handleOpen: t } = p(), e = (r) => {
|
|
11
|
+
t(r.detail);
|
|
12
|
+
};
|
|
13
|
+
return s(() => {
|
|
14
|
+
o.$reset(), document.addEventListener(n.OPEN, e);
|
|
15
|
+
}), m(() => {
|
|
16
|
+
document.removeEventListener(n.OPEN, e), o.$reset();
|
|
17
|
+
}), { __sfc: !0, store: o, handleOpen: t, onOpen: e, DisplayConditionCreateDrawer: d, DisplayConditionSelectDrawer: f };
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
E as default
|
|
22
|
+
};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css */
|
|
1
|
+
import r from "./AssignStrategyDrawer.vue2.js";
|
|
3
2
|
/* empty css */
|
|
4
3
|
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
4
|
var a = function() {
|
|
6
|
-
var e = this,
|
|
7
|
-
return t.store.assignStrategyDrawerStatus ?
|
|
8
|
-
return [
|
|
5
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
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
|
+
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) {
|
|
9
8
|
return t.store.openStrategyCreation();
|
|
10
9
|
}, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
|
|
11
|
-
}, proxy: !0 }], null, !1,
|
|
10
|
+
}, proxy: !0 }], null, !1, 3648942541) }) : e._e();
|
|
12
11
|
}, n = [], i = /* @__PURE__ */ o(
|
|
13
|
-
|
|
12
|
+
r,
|
|
14
13
|
a,
|
|
15
14
|
n,
|
|
16
15
|
!1,
|
|
17
16
|
null,
|
|
18
|
-
|
|
17
|
+
null
|
|
19
18
|
);
|
|
20
|
-
const
|
|
19
|
+
const u = i.exports;
|
|
21
20
|
export {
|
|
22
|
-
|
|
21
|
+
u as default
|
|
23
22
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, defineAsyncComponent as T, ref as w, computed as o, watch as N } from "vue";
|
|
2
2
|
import "@useinsider/design-system-organisms/style";
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { DOTTED_DATE_LOCALE as
|
|
6
|
-
import { URLS as
|
|
3
|
+
import { useToaster as R } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as P } from "../../../../composables/useTranslations.js";
|
|
5
|
+
import { DOTTED_DATE_LOCALE as U } from "../../../../enums/date.js";
|
|
6
|
+
import { URLS as G } from "../../../../enums/extensions/recommendationBlock.js";
|
|
7
7
|
import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
|
|
8
|
-
import { useRecommendationExtensionStore as
|
|
9
|
-
import { commitStrategyChange as
|
|
10
|
-
import
|
|
11
|
-
import { formatShortDate as
|
|
12
|
-
import { asText as
|
|
13
|
-
import { escapeHtml as
|
|
14
|
-
import { InSkeleton as
|
|
15
|
-
const
|
|
8
|
+
import { useRecommendationExtensionStore as M } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
9
|
+
import { commitStrategyChange as E } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
|
|
10
|
+
import $ from "./StrategyInfoBoxContent.vue.js";
|
|
11
|
+
import { formatShortDate as z } from "../../../../utils/dateUtil.js";
|
|
12
|
+
import { asText as D } from "../../../../utils/genericUtil.js";
|
|
13
|
+
import { escapeHtml as H } from "../../../../utils/htmlEscape.js";
|
|
14
|
+
import { InSkeleton as O } from "@useinsider/design-system-vue";
|
|
15
|
+
const it = /* @__PURE__ */ b({
|
|
16
16
|
__name: "AssignStrategyDrawer",
|
|
17
|
-
setup(
|
|
17
|
+
setup(F) {
|
|
18
18
|
const g = () => import("@useinsider/design-system-organisms"), p = (t, r) => ({
|
|
19
|
-
render: (
|
|
20
|
-
}),
|
|
19
|
+
render: (s) => s(O, { props: { sizing: { width: t, height: r } } })
|
|
20
|
+
}), I = T({
|
|
21
21
|
loader: async () => (await g()).OrgStrategyDetailModal,
|
|
22
22
|
loadingComponent: p(480, 240),
|
|
23
23
|
delay: 0
|
|
24
|
-
}),
|
|
24
|
+
}), h = T({
|
|
25
25
|
loader: async () => (await g()).OrgStrategyDropdown
|
|
26
|
-
}), i = "guido-edit-strategy-", a =
|
|
27
|
-
|
|
26
|
+
}), i = "guido-edit-strategy-", x = { width: 480, height: 42 }, a = P(), e = M(), { showToaster: c } = R(), n = w(null), d = "legacy", l = w(!1), A = o(() => e.strategiesLoading || e.legacyConversionLoading), C = o(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: G.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
|
|
27
|
+
N(() => e.assignStrategyDrawerStatus, (t) => {
|
|
28
28
|
if (!t)
|
|
29
29
|
return;
|
|
30
30
|
const { strategyId: r } = e.recommendationConfigs;
|
|
31
|
-
|
|
31
|
+
n.value = r || (e.isLegacyStrategyBlock ? d : null), l.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
|
|
32
32
|
c({
|
|
33
33
|
type: u.Error,
|
|
34
34
|
message: a("discovery-strategy.error-description")
|
|
@@ -36,27 +36,28 @@ const st = /* @__PURE__ */ B({
|
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
const f = (t) => {
|
|
39
|
-
const r =
|
|
39
|
+
const r = D(t.updated_at || t.created_at);
|
|
40
40
|
if (!r)
|
|
41
41
|
return "";
|
|
42
|
-
const
|
|
43
|
-
return a("recommendation-strategy.last-updated-on", { value:
|
|
44
|
-
}, S =
|
|
42
|
+
const s = z(r, U);
|
|
43
|
+
return a("recommendation-strategy.last-updated-on", { value: s });
|
|
44
|
+
}, S = o(() => ({
|
|
45
45
|
text: a("ds-steps.legacy-strategy"),
|
|
46
|
-
value:
|
|
46
|
+
value: d,
|
|
47
47
|
hidden: !0
|
|
48
|
-
})),
|
|
48
|
+
})), m = o(() => e.strategies.map((t) => ({
|
|
49
49
|
text: t.name,
|
|
50
50
|
value: t.strategy_id,
|
|
51
51
|
infoBoxProps: {
|
|
52
52
|
id: `strategy-info-${t.strategy_id}`,
|
|
53
53
|
theme: "light",
|
|
54
54
|
variant: "information",
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
size: "small",
|
|
56
|
+
class: "assign-strategy-info-box",
|
|
57
|
+
titleText: H(D(t.name)),
|
|
57
58
|
descriptionStatus: !0,
|
|
58
59
|
descriptionText: f(t),
|
|
59
|
-
slot:
|
|
60
|
+
slot: $,
|
|
60
61
|
slotProps: { strategy: t },
|
|
61
62
|
// The info box drops the option's value/text, so the id is the only channel
|
|
62
63
|
// that can carry the strategy back to the click handler.
|
|
@@ -69,17 +70,17 @@ const st = /* @__PURE__ */ B({
|
|
|
69
70
|
icon: "line-open-website"
|
|
70
71
|
}]
|
|
71
72
|
}
|
|
72
|
-
}))),
|
|
73
|
+
}))), L = o(() => e.isLegacyStrategyBlock ? [S.value, ...m.value] : m.value), B = (t) => {
|
|
73
74
|
var _;
|
|
74
75
|
const r = (_ = t == null ? void 0 : t.id) != null && _.startsWith(i) ? t.id.slice(i.length) : "";
|
|
75
76
|
if (!r)
|
|
76
77
|
return;
|
|
77
|
-
const
|
|
78
|
-
e.openStrategyEdit(r) && (String(
|
|
79
|
-
}, v =
|
|
80
|
-
const t = e.strategies.find((r) => String(r.strategy_id) === String(
|
|
78
|
+
const s = e.currentRecommendationId, y = e.recommendationConfigs.strategyId === r;
|
|
79
|
+
e.openStrategyEdit(r) && (String(n.value ?? "") === r && (n.value = null), y && (e.removeStrategy(), s !== null && E(s, "Removed recommendation strategy")));
|
|
80
|
+
}, v = o(() => {
|
|
81
|
+
const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
|
|
81
82
|
return t ? { ...t, fallback_config: null } : null;
|
|
82
|
-
}),
|
|
83
|
+
}), k = o(() => ({
|
|
83
84
|
primaryButton: {
|
|
84
85
|
styling: "solid",
|
|
85
86
|
type: "primary",
|
|
@@ -91,7 +92,7 @@ const st = /* @__PURE__ */ B({
|
|
|
91
92
|
labelText: a("products.cancel")
|
|
92
93
|
}
|
|
93
94
|
}));
|
|
94
|
-
return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal:
|
|
95
|
+
return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal: I, OrgStrategyDropdown: h, EDIT_BUTTON_ID_PREFIX: i, SELECT_SKELETON_SIZING: x, trans: a, store: e, showToaster: c, selectedStrategyId: n, LEGACY_OPTION_VALUE: d, showSelectionError: l, strategiesLoading: A, drawerDescription: C, lastUpdatedText: f, legacyStrategyOption: S, remoteStrategyOptions: m, strategyOptions: L, onInfoBoxButtonClick: B, selectedStrategy: v, footerButtonGroupOptions: k, closeDrawer: () => {
|
|
95
96
|
e.closeAssignStrategyDrawer();
|
|
96
97
|
}, assignStrategy: async () => {
|
|
97
98
|
const t = v.value;
|
|
@@ -112,16 +113,16 @@ const st = /* @__PURE__ */ B({
|
|
|
112
113
|
});
|
|
113
114
|
return;
|
|
114
115
|
}
|
|
115
|
-
const
|
|
116
|
+
const s = e.currentRecommendationId;
|
|
116
117
|
e.assignStrategy(t), c({
|
|
117
118
|
type: u.Success,
|
|
118
119
|
message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
119
|
-
}), e.closeAssignStrategyDrawer(),
|
|
120
|
+
}), e.closeAssignStrategyDrawer(), s !== null && await E(s, "Assigned recommendation strategy");
|
|
120
121
|
}, onSelect: (t) => {
|
|
121
|
-
|
|
122
|
-
} };
|
|
122
|
+
n.value = t.value, l.value = !1;
|
|
123
|
+
}, InSkeleton: O };
|
|
123
124
|
}
|
|
124
125
|
});
|
|
125
126
|
export {
|
|
126
|
-
|
|
127
|
+
it as default
|
|
127
128
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import d from "./GenericOnboarding.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import g from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var l = function() {
|
|
5
5
|
var r, n, t, i, a, s;
|
|
6
|
-
var o = this,
|
|
7
|
-
return e.isVisible ?
|
|
6
|
+
var o = this, c = o._self._c, e = o._self._setupProxy;
|
|
7
|
+
return e.isVisible ? c(e.InOnboard, { key: "guido__editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : r.classes, attrs: { id: "guido__editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : n.bottom, "left-position": (t = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : t.left, "pages-config": e.onboardingStore.onboardings.genericOnboarding.config, "pointer-position": (i = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : i.position, "right-position": (a = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : a.right, "top-position": (s = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: e.handleBack, close: function(u) {
|
|
8
8
|
return e.onboardingStore.close("genericOnboarding");
|
|
9
9
|
}, nextButtonClick: e.handleNext } }) : o._e();
|
|
10
10
|
}, p = [], _ = /* @__PURE__ */ g(
|
|
11
|
-
|
|
11
|
+
d,
|
|
12
12
|
l,
|
|
13
13
|
p,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"fcba7e99"
|
|
17
17
|
);
|
|
18
18
|
const S = _.exports;
|
|
19
19
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRibbonOffset as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { SERVICE_HOVER_SELECTORS as
|
|
5
|
-
import { useOnboardingStore as
|
|
1
|
+
import { defineComponent as u, computed as r, watch as l } from "vue";
|
|
2
|
+
import { useRibbonOffset as m } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as x } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { SERVICE_HOVER_SELECTORS as f } from "../../../enums/onboarding.js";
|
|
5
|
+
import { useOnboardingStore as k } from "../../../stores/onboarding.js";
|
|
6
|
+
import { findEditorShadowRoot as B } from "../../../utils/editorShadowRoot.js";
|
|
6
7
|
import { InOnboard as C } from "@useinsider/design-system-vue";
|
|
7
|
-
const
|
|
8
|
+
const R = /* @__PURE__ */ u({
|
|
8
9
|
__name: "GenericOnboarding",
|
|
9
10
|
setup(T) {
|
|
10
|
-
const e =
|
|
11
|
-
const t =
|
|
12
|
-
t
|
|
13
|
-
|
|
14
|
-
const d = (g = t.shadowRoot) == null ? void 0 : g.querySelector(n);
|
|
11
|
+
const e = x(), o = k(), { getTopPosition: i } = m(), s = r(() => `${window.innerWidth / 2 - 146}px`), c = () => {
|
|
12
|
+
const t = B();
|
|
13
|
+
t && f.forEach((n) => {
|
|
14
|
+
const d = t.querySelector(n);
|
|
15
15
|
d && d.classList.add("hover");
|
|
16
16
|
});
|
|
17
17
|
}, a = r(() => [
|
|
@@ -67,18 +67,18 @@ const y = /* @__PURE__ */ l({
|
|
|
67
67
|
o.close("genericOnboarding");
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
]),
|
|
70
|
+
]), g = r(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), p = () => {
|
|
71
71
|
var t, n;
|
|
72
72
|
(n = (t = o.getGenericCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
73
73
|
}, b = () => {
|
|
74
74
|
var t, n;
|
|
75
75
|
(n = (t = o.getGenericCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
76
76
|
};
|
|
77
|
-
return
|
|
77
|
+
return l(() => o.onboardings.genericOnboarding.isActive, (t) => {
|
|
78
78
|
t && o.setConfig("genericOnboarding", a.value);
|
|
79
|
-
}, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, getTopPosition: i, centerLeft: s, addHoverToServiceElements: c, onboardingCardsConfig: a, isVisible:
|
|
79
|
+
}, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, getTopPosition: i, centerLeft: s, addHoverToServiceElements: c, onboardingCardsConfig: a, isVisible: g, handleNext: p, handleBack: b, InOnboard: C };
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
R as default
|
|
84
84
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import g from "./ItemsOnboarding.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import m from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
4
|
+
var l = function() {
|
|
5
5
|
var e, n, r, i, s, a;
|
|
6
6
|
var o = this, d = o._self._c, t = o._self._setupProxy;
|
|
7
|
-
return t.isVisible ? d(t.InOnboard, { key: "guido__items-onboard", staticClass: "w-21-s p-a z-11", class: (e = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__items-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : r.left, "pages-config": t.onboardingStore.onboardings.itemsOnboarding.config, "pointer-position": (i = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : i.position, "right-position": (s = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : s.right, "top-position": (a = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(
|
|
7
|
+
return t.isVisible ? d(t.InOnboard, { key: "guido__items-onboard", staticClass: "w-21-s p-a z-11", class: (e = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__items-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : r.left, "pages-config": t.onboardingStore.onboardings.itemsOnboarding.config, "pointer-position": (i = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : i.position, "right-position": (s = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : s.right, "top-position": (a = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(b) {
|
|
8
8
|
return t.onboardingStore.close("itemsOnboarding");
|
|
9
9
|
}, nextButtonClick: t.handleNext } }) : o._e();
|
|
10
|
-
},
|
|
10
|
+
}, c = [], p = /* @__PURE__ */ m(
|
|
11
11
|
g,
|
|
12
|
-
c,
|
|
13
12
|
l,
|
|
13
|
+
c,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"1a34025a"
|
|
17
17
|
);
|
|
18
|
-
const I =
|
|
18
|
+
const I = p.exports;
|
|
19
19
|
export {
|
|
20
20
|
I as default
|
|
21
21
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as b, computed as d, watch as
|
|
2
|
-
import { useRibbonOffset as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import {
|
|
5
|
-
import { useOnboardingStore as
|
|
1
|
+
import { defineComponent as b, computed as d, watch as c } from "vue";
|
|
2
|
+
import { useRibbonOffset as u } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as l } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { CARD_COMPOSITION_TAB_SELECTOR as x, SETTINGS_TAB_SELECTOR as f } from "../../../enums/onboarding.js";
|
|
5
|
+
import { useOnboardingStore as T } from "../../../stores/onboarding.js";
|
|
6
|
+
import { findEditorShadowRoot as k } from "../../../utils/editorShadowRoot.js";
|
|
6
7
|
import { InOnboard as B } from "@useinsider/design-system-vue";
|
|
7
|
-
const
|
|
8
|
+
const v = /* @__PURE__ */ b({
|
|
8
9
|
__name: "ItemsOnboarding",
|
|
9
10
|
setup(C) {
|
|
10
|
-
const i =
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
11
|
+
const i = l(), o = T(), { getTopPosition: r } = u(), s = (t) => {
|
|
12
|
+
const n = k();
|
|
13
|
+
if (!n)
|
|
13
14
|
return;
|
|
14
|
-
const
|
|
15
|
-
|
|
15
|
+
const e = n.querySelector(t);
|
|
16
|
+
e && e.click();
|
|
16
17
|
}, a = d(() => [
|
|
17
18
|
{
|
|
18
19
|
classes: "guido-items-onboarding-card-1",
|
|
19
20
|
right: "426px",
|
|
20
|
-
top:
|
|
21
|
+
top: r(90),
|
|
21
22
|
position: "Right Top",
|
|
22
23
|
title: i("email-editor.onboarding-items-title"),
|
|
23
24
|
description: i("email-editor.onboarding-items-description"),
|
|
@@ -33,7 +34,7 @@ const E = /* @__PURE__ */ b({
|
|
|
33
34
|
{
|
|
34
35
|
classes: "guido-items-onboarding-card-2",
|
|
35
36
|
right: "426px",
|
|
36
|
-
top:
|
|
37
|
+
top: r(218),
|
|
37
38
|
position: "Right Top",
|
|
38
39
|
title: i("email-editor.onboarding-items-item-type-title"),
|
|
39
40
|
description: i("email-editor.onboarding-items-item-type-description"),
|
|
@@ -52,7 +53,7 @@ const E = /* @__PURE__ */ b({
|
|
|
52
53
|
{
|
|
53
54
|
classes: "guido-items-onboarding-card-3",
|
|
54
55
|
right: "426px",
|
|
55
|
-
top:
|
|
56
|
+
top: r(140),
|
|
56
57
|
position: "Right Top",
|
|
57
58
|
title: i("email-editor.onboarding-items-composition-title"),
|
|
58
59
|
description: i("email-editor.onboarding-items-composition-description"),
|
|
@@ -68,30 +69,30 @@ const E = /* @__PURE__ */ b({
|
|
|
68
69
|
o.close("itemsOnboarding");
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
]),
|
|
72
|
-
var t,
|
|
73
|
-
(
|
|
74
|
-
},
|
|
75
|
-
var t,
|
|
76
|
-
(
|
|
72
|
+
]), m = d(() => o.onboardings.itemsOnboarding.config.length > 0 && o.onboardings.itemsOnboarding.isActive), p = () => {
|
|
73
|
+
var t, n;
|
|
74
|
+
(n = (t = o.getItemsCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
75
|
+
}, g = () => {
|
|
76
|
+
var t, n;
|
|
77
|
+
(n = (t = o.getItemsCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
77
78
|
};
|
|
78
|
-
return
|
|
79
|
+
return c(
|
|
79
80
|
() => o.isActive("itemsOnboarding"),
|
|
80
81
|
(t) => {
|
|
81
82
|
t && o.setConfig("itemsOnboarding", a.value);
|
|
82
83
|
},
|
|
83
84
|
{ immediate: !0 }
|
|
84
|
-
),
|
|
85
|
+
), c(
|
|
85
86
|
() => o.onboardings.itemsOnboarding.cardIndex,
|
|
86
|
-
(t,
|
|
87
|
+
(t, n) => {
|
|
87
88
|
if (!o.isActive("itemsOnboarding"))
|
|
88
89
|
return;
|
|
89
|
-
const
|
|
90
|
-
|
|
90
|
+
const e = `${n}-${t}`;
|
|
91
|
+
e === "1-2" && s(x), e === "2-1" && s(f);
|
|
91
92
|
}
|
|
92
|
-
), { __sfc: !0, trans: i, onboardingStore: o, getTopPosition:
|
|
93
|
+
), { __sfc: !0, trans: i, onboardingStore: o, getTopPosition: r, switchTab: s, onboardingCardsConfig: a, isVisible: m, handleNext: p, handleBack: g, InOnboard: B };
|
|
93
94
|
}
|
|
94
95
|
});
|
|
95
96
|
export {
|
|
96
|
-
|
|
97
|
+
v as default
|
|
97
98
|
};
|
|
@@ -1,46 +1,61 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRibbonOffset as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { ACADEMY_LINKS as
|
|
5
|
-
import { useOnboardingStore as
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { defineComponent as E, computed as _, onMounted as L, onBeforeUnmount as O } from "vue";
|
|
2
|
+
import { useRibbonOffset as S } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as C } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { ACADEMY_LINKS as h } from "../../../enums/academy.js";
|
|
5
|
+
import { useOnboardingStore as k } from "../../../stores/onboarding.js";
|
|
6
|
+
import { findEditorShadowRoot as v } from "../../../utils/editorShadowRoot.js";
|
|
7
|
+
import { InOnboard as B } from "@useinsider/design-system-vue";
|
|
8
|
+
const F = /* @__PURE__ */ E({
|
|
8
9
|
__name: "RecommendationLegacyStrategyOnboarding",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
10
|
+
setup(T) {
|
|
11
|
+
const a = "recommendationLegacyStrategyOnboarding", l = "#guido__btn-update-legacy-strategy", i = C(), t = k(), { getTopPosition: m } = S(), u = `<a href="${h.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${i("action-builder.visit-academy")}</a>`, g = () => [
|
|
11
12
|
{
|
|
12
13
|
classes: "guido-recommendation-legacy-strategy-onboarding",
|
|
13
14
|
right: "40px",
|
|
14
|
-
top:
|
|
15
|
+
top: m(500),
|
|
15
16
|
position: "Top Right",
|
|
16
|
-
title:
|
|
17
|
-
description:
|
|
18
|
-
academyLink:
|
|
17
|
+
title: i("email-editor.onboarding-recommendation-strategy-legacy-title"),
|
|
18
|
+
description: i("email-editor.onboarding-recommendation-strategy-legacy-description", {
|
|
19
|
+
academyLink: u
|
|
19
20
|
}),
|
|
20
21
|
imageSource: "",
|
|
21
22
|
backButtonClick: () => {
|
|
22
23
|
},
|
|
23
24
|
nextButtonType: "text",
|
|
24
|
-
nextButtonText:
|
|
25
|
+
nextButtonText: i("action-builder.ok"),
|
|
25
26
|
nextButtonClick: () => {
|
|
26
|
-
t.close(
|
|
27
|
+
t.close(a);
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
],
|
|
30
|
+
], y = _(
|
|
30
31
|
() => t.onboardings.recommendationLegacyStrategyOnboarding.config.length > 0 && t.onboardings.recommendationLegacyStrategyOnboarding.isActive
|
|
31
|
-
),
|
|
32
|
-
var
|
|
33
|
-
(
|
|
32
|
+
), b = () => {
|
|
33
|
+
var n, o;
|
|
34
|
+
(o = (n = t.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : n.nextButtonClick) == null || o.call(n);
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
let e = null;
|
|
37
|
+
const s = ({ target: n }) => {
|
|
38
|
+
n instanceof Element && n.closest("ue-control-panel") && t.closeForSession(a);
|
|
39
|
+
};
|
|
40
|
+
let r = null;
|
|
41
|
+
const d = (n) => {
|
|
42
|
+
var o;
|
|
43
|
+
return !!((o = n.querySelector(l)) != null && o.getClientRects().length);
|
|
44
|
+
}, c = ({ target: n }) => {
|
|
45
|
+
const o = n instanceof Element ? n.closest("ue-control-panel") : null;
|
|
46
|
+
!o || r !== null || (r = requestAnimationFrame(() => {
|
|
47
|
+
r = null, d(o) || t.closeForSession(a);
|
|
48
|
+
}));
|
|
49
|
+
}, p = () => {
|
|
50
|
+
e == null || e.removeEventListener("scroll", s, !0), e == null || e.removeEventListener("click", c, !0), e == null || e.removeEventListener("keyup", c, !0), e = null, r !== null && (cancelAnimationFrame(r), r = null);
|
|
51
|
+
}, f = () => {
|
|
52
|
+
e = v(), e == null || e.addEventListener("scroll", s, !0), e == null || e.addEventListener("click", c, !0), e == null || e.addEventListener("keyup", c, !0);
|
|
53
|
+
};
|
|
54
|
+
return L(() => {
|
|
55
|
+
t.setConfig(a, g()), f();
|
|
56
|
+
}), O(p), { __sfc: !0, ONBOARDING_TYPE: a, UPDATE_BUTTON_SELECTOR: l, trans: i, onboardingStore: t, getTopPosition: m, academyLink: u, buildOnboardingCards: g, isVisible: y, handleNext: b, editorRoot: e, handlePanelScroll: s, pendingCheck: r, isUpdateButtonVisible: d, handlePanelInteraction: c, stopWatchingPanel: p, startWatchingPanel: f, InOnboard: B };
|
|
42
57
|
}
|
|
43
58
|
});
|
|
44
59
|
export {
|
|
45
|
-
|
|
60
|
+
F as default
|
|
46
61
|
};
|