@useinsider/guido 2.1.0-beta.42f5dfa → 2.1.0-beta.486ee9c
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 +36 -0
- package/dist/@types/config/schemas.js +70 -65
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +69 -58
- package/dist/components/organisms/base/Toaster.vue.js +4 -4
- package/dist/components/organisms/base/Toaster.vue2.js +12 -9
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +5 -5
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +11 -13
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +54 -23
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +7 -5
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +34 -21
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +11 -11
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +48 -36
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +11 -9
- package/dist/components/organisms/header/HeaderWrapper.vue.js +9 -9
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
- package/dist/composables/useBlocksConfig.js +26 -16
- package/dist/composables/useHtmlValidator.js +107 -119
- package/dist/composables/useRecommendation.js +9 -9
- package/dist/composables/useStripo.js +25 -23
- package/dist/composables/useVersionHistoryApi.js +1 -1
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +28 -23
- package/dist/config/i18n/en/index.js +11 -0
- package/dist/config/i18n/en/labels.json.js +7 -0
- package/dist/config/i18n/en/toasters.json.js +56 -0
- package/dist/config/i18n/en/tooltips.json.js +82 -0
- package/dist/config/i18n/index.js +7 -0
- package/dist/config/migrator/itemsBlockMigrator.js +127 -122
- package/dist/config/migrator/recommendationMigrator.js +1 -1
- package/dist/enums/defaults.js +8 -4
- package/dist/extensions/Blocks/Recommendation/block.js +26 -23
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +37 -33
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +16 -12
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +15 -11
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +41 -29
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +16 -16
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +30 -32
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +217 -94
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +97 -39
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +16 -16
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +304 -209
- package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +10 -10
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +5 -5
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +14 -14
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +3 -3
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +3 -3
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +13 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +3 -3
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +223 -99
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +237 -140
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +27 -32
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +27 -30
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +22 -27
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +50 -38
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +8 -8
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +29 -0
- package/dist/extensions/Blocks/Unsubscribe/block.js +29 -29
- package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
- package/dist/extensions/ModulesTabIcons/extension.js +17 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +257 -187
- package/dist/services/recommendationApi.js +11 -9
- package/dist/services/stripoApi.js +20 -17
- package/dist/src/@types/config/schemas.d.ts +8 -0
- package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +1 -0
- package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +17 -1
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/config/i18n/en/index.d.ts +1 -0
- package/dist/src/config/i18n/index.d.ts +16 -0
- package/dist/src/enums/defaults.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +12 -2
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +12 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +50 -11
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +22 -4
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +36 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +50 -17
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +26 -2
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/migration.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +12 -3
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +14 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/filterSchema.d.ts +15 -0
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
- package/dist/src/extensions/ModulesTabIcons/extension.d.ts +2 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/dist/static/styles/components/notification.css.js +19 -0
- package/dist/static/styles/components/tools.css.js +6 -2
- package/dist/static/styles/components/version-history.css.js +10 -2
- package/dist/static/styles/components/wide-panel.css.js +18 -2
- package/dist/static/styles/customEditorStyle.css.js +59 -31
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/static/templates/empty/index.html.js +74 -0
- package/dist/static/templates/empty/style.css.js +779 -0
- package/dist/stores/unsubscribe.js +37 -34
- package/package.json +2 -2
|
@@ -1,38 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import { getOperatorOptions as
|
|
4
|
-
import { useRecommendationExtensionStore as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
import { defineComponent as _, computed as l } from "vue";
|
|
2
|
+
import { useTranslations as C } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { getOperatorOptions as p } from "../../../../enums/extensions/recommendationBlock.js";
|
|
4
|
+
import { useRecommendationExtensionStore as V } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
5
|
+
import { getInvalidFilterFields as A } from "../../../../extensions/Blocks/Recommendation/validation/filterSchema.js";
|
|
6
|
+
import { InButtonV2 as L, InSelect as O, InBasicTextInput as S } from "@useinsider/design-system-vue";
|
|
7
|
+
import E from "./LogicAdapter.vue.js";
|
|
8
|
+
import { useDebounceFn as N } from "../../../../node_modules/@vueuse/shared/index.js";
|
|
9
|
+
const K = /* @__PURE__ */ _({
|
|
9
10
|
__name: "FilterItem",
|
|
10
11
|
props: {
|
|
11
12
|
filter: null,
|
|
12
13
|
index: null,
|
|
13
|
-
hasLogicAdapter: { type: Boolean }
|
|
14
|
+
hasLogicAdapter: { type: Boolean },
|
|
15
|
+
submitted: { type: Boolean }
|
|
14
16
|
},
|
|
15
17
|
emits: ["delete-filter"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
+
setup(f, { emit: v }) {
|
|
19
|
+
const t = f, n = C(), a = V(), y = [
|
|
18
20
|
{
|
|
19
21
|
text: n("email-editor.standard-filter"),
|
|
20
22
|
value: "standardFilter"
|
|
21
23
|
}
|
|
22
|
-
],
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
], i = [
|
|
25
|
+
{ text: "True", value: "true" },
|
|
26
|
+
{ text: "False", value: "false" }
|
|
27
|
+
], d = l(() => t.filter.attribute || ""), r = l(() => a.getFilterList.find((e) => e.value === d.value) || { text: "", value: "", type: "" }), F = l(
|
|
28
|
+
() => {
|
|
29
|
+
var e;
|
|
30
|
+
return ((e = r.value) == null ? void 0 : e.type) === "Boolean";
|
|
31
|
+
}
|
|
32
|
+
), b = l(() => {
|
|
33
|
+
var e;
|
|
34
|
+
return p((e = r.value) == null ? void 0 : e.type).find((o) => o.value === t.filter.operator);
|
|
35
|
+
}), g = l(
|
|
36
|
+
() => i.find((e) => e.value === t.filter.value) || i[0]
|
|
37
|
+
), u = l(() => t.submitted ? A(t.filter) : /* @__PURE__ */ new Set()), h = (e) => u.value.has(e) ? "error" : "default", B = l(
|
|
38
|
+
() => u.value.has("value") ? n("action-builder.filter-empty-value-error") : ""
|
|
39
|
+
), c = l(
|
|
40
|
+
() => {
|
|
41
|
+
var e;
|
|
42
|
+
return ((e = r.value) == null ? void 0 : e.type) === "Number";
|
|
43
|
+
}
|
|
44
|
+
), x = l(() => c.value ? "number" : "text"), T = N((e) => {
|
|
45
|
+
a.updateFilter({
|
|
46
|
+
...t.filter,
|
|
47
|
+
[e.text]: e.value
|
|
48
|
+
});
|
|
32
49
|
}, 500);
|
|
33
|
-
return { __sfc: !0, trans: n, store:
|
|
50
|
+
return { __sfc: !0, trans: n, store: a, props: t, filterTypeOptions: y, booleanValueOptions: i, attributeType: d, selectedAttributeType: r, isBooleanAttribute: F, selectedOperatorType: b, selectedBooleanValue: g, emit: v, invalidFields: u, getFieldState: h, valueErrorMessage: B, isNumericAttribute: c, valueInputType: x, updateFilter: T, handleAttributeChange: (e) => {
|
|
51
|
+
const o = a.getFilterList.find((I) => I.value === e.value), m = (o == null ? void 0 : o.type) === "Boolean", [s] = p(o == null ? void 0 : o.type);
|
|
52
|
+
a.updateFilter({
|
|
53
|
+
...t.filter,
|
|
54
|
+
attribute: e.value,
|
|
55
|
+
operator: m ? "=" : (s == null ? void 0 : s.value) ?? "",
|
|
56
|
+
value: m ? "true" : ""
|
|
57
|
+
});
|
|
58
|
+
}, handleBooleanValueChange: (e) => {
|
|
59
|
+
a.updateFilter({
|
|
60
|
+
...t.filter,
|
|
61
|
+
operator: "=",
|
|
62
|
+
value: e.value
|
|
63
|
+
});
|
|
64
|
+
}, getOperatorOptions: p, InBasicTextInput: S, InSelect: O, InButtonV2: L, LogicAdapter: E };
|
|
34
65
|
}
|
|
35
66
|
});
|
|
36
67
|
export {
|
|
37
|
-
|
|
68
|
+
K as default
|
|
38
69
|
};
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import o from "./FilterSelectionDrawer.vue2.js";
|
|
2
2
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
3
|
+
var i = function() {
|
|
4
4
|
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
5
|
-
return r(t.WpDrawer, { attrs: { id: "recommendation-filter-drawer", "
|
|
5
|
+
return r(t.WpDrawer, { attrs: { id: "recommendation-filter-drawer", "description-status": "", "description-text": t.trans("email-editor.filter-description"), "footer-button-group-options": t.footerButtonGroupOptions, status: t.store.filterSelectionDrawerStatus, "title-text": t.trans("email-editor.add-filters") }, on: { cancelOrBackButtonEvent: t.cancelModal, onCloseEvent: t.cancelModal, primaryButtonEvent: t.applyFilter } }, [t.store.filterSelectionDrawerStatus ? r(t.Filters, { ref: "filtersRef", attrs: { submitted: t.submitted }, on: { "reset-validation": function(c) {
|
|
6
|
+
t.submitted = !1;
|
|
7
|
+
} } }) : e._e()], 1);
|
|
6
8
|
}, s = [], a = /* @__PURE__ */ n(
|
|
7
9
|
o,
|
|
8
|
-
|
|
10
|
+
i,
|
|
9
11
|
s,
|
|
10
12
|
!1,
|
|
11
13
|
null,
|
|
12
14
|
null
|
|
13
15
|
);
|
|
14
|
-
const
|
|
16
|
+
const d = a.exports;
|
|
15
17
|
export {
|
|
16
|
-
|
|
18
|
+
d as default
|
|
17
19
|
};
|
|
@@ -1,38 +1,51 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { useRecommendationExtensionStore as
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as d, ref as a, watch as y, computed as g, nextTick as v } from "vue";
|
|
2
|
+
import b from "../../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import { useTranslations as w } from "../../../../composables/useTranslations.js";
|
|
4
|
+
import { useRecommendationExtensionStore as F } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
5
|
+
import { isFilterValid as _ } from "../../../../extensions/Blocks/Recommendation/validation/filterSchema.js";
|
|
6
|
+
import h from "./Filters.vue.js";
|
|
7
|
+
const I = /* @__PURE__ */ d({
|
|
7
8
|
__name: "FilterSelectionDrawer",
|
|
8
|
-
setup(
|
|
9
|
-
const r =
|
|
9
|
+
setup(S) {
|
|
10
|
+
const r = w(), e = F(), t = a(!1), o = a(!1), c = a();
|
|
11
|
+
y(() => e.filterSelectionDrawerStatus, (n) => {
|
|
12
|
+
n && (o.value = !1);
|
|
13
|
+
});
|
|
14
|
+
const f = g(() => ({
|
|
10
15
|
primaryButton: {
|
|
11
16
|
styling: "solid",
|
|
12
17
|
type: "primary",
|
|
13
18
|
labelText: r(
|
|
14
|
-
|
|
19
|
+
t.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
|
|
15
20
|
),
|
|
16
|
-
loadingStatus:
|
|
17
|
-
disabledStatus: !1
|
|
21
|
+
loadingStatus: t.value
|
|
18
22
|
},
|
|
19
23
|
cancelOrBackButton: {
|
|
20
24
|
styling: "ghost",
|
|
21
25
|
type: "secondary",
|
|
22
26
|
labelText: r("products.cancel"),
|
|
23
|
-
disabledStatus:
|
|
27
|
+
disabledStatus: t.value
|
|
24
28
|
}
|
|
25
|
-
}))
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
}));
|
|
30
|
+
return { __sfc: !0, trans: r, store: e, isApplying: t, submitted: o, filtersRef: c, footerButtonGroupOptions: f, cancelModal: () => {
|
|
31
|
+
e.cancelFilterDrawer();
|
|
32
|
+
}, applyFilter: async () => {
|
|
33
|
+
var u;
|
|
34
|
+
o.value = !0;
|
|
35
|
+
const { filters: n } = e.recommendationConfigs, i = n.find((l) => !_(l));
|
|
36
|
+
if (i) {
|
|
37
|
+
(u = c.value) == null || u.switchToGroup(i.filterGroup), await v();
|
|
38
|
+
const { filterGroup: l, filterNumber: p } = i, m = `[data-filter-group="${l}"][data-filter-number="${p}"]`, s = document.querySelector(m);
|
|
39
|
+
s == null || s.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
t.value = !0, e.patchCurrentBlockConfig(
|
|
43
|
+
{ filters: e.recommendationConfigs.filters },
|
|
31
44
|
{ triggerRefetch: !0 }
|
|
32
|
-
),
|
|
33
|
-
}, WpDrawer:
|
|
45
|
+
), e.closeFilterDrawer(), t.value = !1;
|
|
46
|
+
}, WpDrawer: b, Filters: h };
|
|
34
47
|
}
|
|
35
48
|
});
|
|
36
49
|
export {
|
|
37
|
-
|
|
50
|
+
I as default
|
|
38
51
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import s from "./Filters.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return e("div", { staticClass: "d-f f-d-c gap-16" }, [e("div", { staticClass: "d-f a-i-c j-c-s-b gap-16" }, [e(t.InSegments, { staticClass: "f-g-1 w-1", attrs: { id: "guido__filter-group-segments", "segment-list": t.filterGroupList, selected: t.selectedFilterGroup, "with-icon": !1 }, on: { click: t.
|
|
7
|
-
return e(t.FilterItem, { key:
|
|
8
|
-
}), 1), e("div", { staticClass: "d-f a-i-c j-c-c mt-3" }, [e(t.InButtonV2, { staticClass: "w-11-s", attrs: { id: "filter-group--add-filter-button", "left-icon": "line-plus-netural", type: "subtle-primary", "label-text": t.trans("smart-recommender.add-filter-condition") }, on: { click: t.handleAddFilter } })], 1)]);
|
|
9
|
-
}, d = [], n = /* @__PURE__ */
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
|
+
var r = this, e = r._self._c, t = r._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "d-f f-d-c gap-16" }, [e("div", { staticClass: "d-f a-i-c j-c-s-b gap-16" }, [e(t.InSegments, { staticClass: "f-g-1 w-1", attrs: { id: "guido__filter-group-segments", "segment-list": t.filterGroupList, selected: t.selectedFilterGroup, "with-icon": !1 }, on: { click: t.switchToGroup } }), e(t.InButtonV2, { staticClass: "w-20-s f-g-1", attrs: { id: "guido__add-filter-group-button", "left-icon": "line-plus-netural", type: "secondary", "disabled-status": t.isMaxFilterGroupCount, "label-text": t.trans("smart-recommender.add-filter-group"), "tooltip-options": t.getTooltipOptions("add-filter-group-tooltip"), "tooltip-text": t.isMaxFilterGroupCount ? t.trans("email-editor.add-filter-group-tooltip") : "" }, on: { click: t.handleAddFilterGroup } })], 1), e("div", { staticClass: "d-f a-i-c j-c-s-b gap-16" }, [e("div", { staticClass: "d-f a-i-c" }, [t.selectedFilterGroup > 1 ? e(t.LogicAdapter, { staticClass: "mr-2", attrs: { logic: t.outerGroupOperator }, on: { change: t.handleOuterGroupOperatorChange } }) : r._e(), e("p", [r._v(" " + r._s(t.trans("email-editor.filter-group")) + " " + r._s(t.selectedFilterGroup) + " ")])], 1), t.hasRemoveFilterButton ? e(t.InButtonV2, { attrs: { id: "guido__delete-filter-group-button", "left-icon": "line-delete", styling: "text", type: "danger", "label-text-status": !1 }, on: { click: t.handleDeleteFilterGroup } }) : r._e()], 1), e("div", { staticClass: "d-f a-i-c j-c-s-b f-d-c" }, r._l(t.selectedFilterGroupFilters, function(l, i) {
|
|
7
|
+
return e(t.FilterItem, { key: i, attrs: { filter: l, "has-logic-adapter": t.hasLogicAdapter && i !== t.selectedFilterGroupFilters.length - 1, index: i, submitted: r.submitted }, on: { "delete-filter": t.handleDeleteFilter } });
|
|
8
|
+
}), 1), e("div", { staticClass: "d-f a-i-c j-c-c mt-3" }, [e(t.InButtonV2, { staticClass: "w-11-s", attrs: { id: "filter-group--add-filter-button", "left-icon": "line-plus-netural", type: "subtle-primary", "disabled-status": t.isMaxFilterPerGroupCount, "label-text": t.trans("smart-recommender.add-filter-condition"), "tooltip-text": t.isMaxFilterPerGroupCount ? t.trans("email-editor.add-filter-tooltip") : "" }, on: { click: t.handleAddFilter } })], 1)]);
|
|
9
|
+
}, d = [], n = /* @__PURE__ */ o(
|
|
10
10
|
s,
|
|
11
|
-
|
|
11
|
+
a,
|
|
12
12
|
d,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"0e1b0c54"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const g = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
g as default
|
|
20
20
|
};
|
|
@@ -1,44 +1,56 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import { useRecommendationExtensionStore as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import A from "./
|
|
7
|
-
|
|
1
|
+
import { defineComponent as v, computed as l, ref as O, watch as f } from "vue";
|
|
2
|
+
import { useTranslations as g } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { useRecommendationExtensionStore as R } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
4
|
+
import { getTooltipOptions as T } from "../../../../utils/tooltipUtils.js";
|
|
5
|
+
import { InButtonV2 as U, InSegments as E } from "@useinsider/design-system-vue";
|
|
6
|
+
import A from "./FilterItem.vue.js";
|
|
7
|
+
import C from "./LogicAdapter.vue.js";
|
|
8
|
+
const V = /* @__PURE__ */ v({
|
|
8
9
|
__name: "Filters",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
props: {
|
|
11
|
+
submitted: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
emits: ["reset-validation"],
|
|
14
|
+
setup(x, { expose: u, emit: s }) {
|
|
15
|
+
const p = g(), t = R(), a = l(() => t.getUniqueFilterGroups.map((e) => ({
|
|
16
|
+
text: e.toString(),
|
|
17
|
+
value: e
|
|
18
|
+
}))), r = O(1);
|
|
19
|
+
f(a, (e) => {
|
|
20
|
+
if (!e.length)
|
|
21
|
+
return;
|
|
22
|
+
e.some((h) => h.value === r.value) || (r.value = e[0].value);
|
|
23
|
+
});
|
|
24
|
+
const i = (e) => {
|
|
14
25
|
r.value = e;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
};
|
|
27
|
+
u({ switchToGroup: i });
|
|
28
|
+
const c = () => {
|
|
29
|
+
s("reset-validation");
|
|
30
|
+
const e = t.getUniqueFilterGroups, o = e.length > 0 ? Math.max(...e) + 1 : 1;
|
|
31
|
+
t.addFilterGroup(o), r.value = o;
|
|
32
|
+
}, d = l(() => a.value.length >= 3), n = l(() => t.getSelectedFilterGroup(r.value)), F = l(() => n.value.length >= 10), _ = l(() => n.value.length > 1), G = l(() => a.value.length > 1), m = l(() => {
|
|
33
|
+
var o;
|
|
34
|
+
return ((o = n.value[0]) == null ? void 0 : o.outerGroupOperator) || "*";
|
|
35
|
+
});
|
|
36
|
+
return { __sfc: !0, MAX_FILTER_GROUP_COUNT: 3, MAX_FILTER_PER_GROUP_COUNT: 10, trans: p, store: t, emit: s, filterGroupList: a, selectedFilterGroup: r, switchToGroup: i, handleAddFilterGroup: c, isMaxFilterGroupCount: d, selectedFilterGroupFilters: n, isMaxFilterPerGroupCount: F, hasLogicAdapter: _, hasRemoveFilterButton: G, outerGroupOperator: m, handleOuterGroupOperatorChange: (e) => {
|
|
37
|
+
n.value.forEach((o) => {
|
|
38
|
+
t.updateFilter({ ...o, outerGroupOperator: e });
|
|
39
|
+
});
|
|
40
|
+
}, handleAddFilter: () => {
|
|
41
|
+
s("reset-validation"), t.addFilter(
|
|
42
|
+
t.createDefaultFilter(
|
|
43
|
+
r.value,
|
|
44
|
+
n.value.length + 1
|
|
45
|
+
)
|
|
46
|
+
);
|
|
35
47
|
}, handleDeleteFilter: (e) => {
|
|
36
|
-
|
|
48
|
+
t.deleteFilter(e);
|
|
37
49
|
}, handleDeleteFilterGroup: () => {
|
|
38
|
-
|
|
39
|
-
}, InSegments:
|
|
50
|
+
a.value.length <= 1 || t.deleteFilterGroup(r.value);
|
|
51
|
+
}, getTooltipOptions: T, InSegments: E, InButtonV2: U, FilterItem: A, LogicAdapter: C };
|
|
40
52
|
}
|
|
41
53
|
});
|
|
42
54
|
export {
|
|
43
|
-
|
|
55
|
+
V as default
|
|
44
56
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as s, ref as n } from "vue";
|
|
2
|
-
import { InSegments as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as s, ref as n, watch as p } from "vue";
|
|
2
|
+
import { InSegments as g } from "@useinsider/design-system-vue";
|
|
3
|
+
const m = /* @__PURE__ */ s({
|
|
4
4
|
__name: "LogicAdapter",
|
|
5
5
|
props: {
|
|
6
6
|
logic: null
|
|
7
7
|
},
|
|
8
8
|
emits: ["change"],
|
|
9
|
-
setup(
|
|
10
|
-
const t =
|
|
9
|
+
setup(a, { emit: c }) {
|
|
10
|
+
const t = a, r = n([
|
|
11
11
|
{
|
|
12
12
|
text: "and",
|
|
13
13
|
value: "*"
|
|
@@ -17,11 +17,13 @@ const l = /* @__PURE__ */ s({
|
|
|
17
17
|
value: "|"
|
|
18
18
|
}
|
|
19
19
|
]), o = n(t.logic || "*");
|
|
20
|
-
return
|
|
21
|
-
o.value =
|
|
22
|
-
},
|
|
20
|
+
return p(() => t.logic, (e) => {
|
|
21
|
+
o.value = e || "*";
|
|
22
|
+
}), { __sfc: !0, logicAdapterList: r, emit: c, props: t, selectedLogicAdapter: o, changeLogicAdapter: (e) => {
|
|
23
|
+
o.value = e, c("change", e);
|
|
24
|
+
}, InSegments: g };
|
|
23
25
|
}
|
|
24
26
|
});
|
|
25
27
|
export {
|
|
26
|
-
|
|
28
|
+
m as default
|
|
27
29
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import o from "./HeaderWrapper.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var s = function() {
|
|
5
5
|
var t = this, r = t._self._c, e = t._self._setupProxy;
|
|
6
|
-
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef" })], 1)]);
|
|
7
|
-
},
|
|
6
|
+
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0", "data-testid": "guido-header" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef" })], 1)]);
|
|
7
|
+
}, d = [], i = /* @__PURE__ */ a(
|
|
8
8
|
o,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
s,
|
|
10
|
+
d,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"5c02dcc7"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const p = i.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
p as default
|
|
18
18
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { ToasterTypeOptions as
|
|
1
|
+
import { defineComponent as g, ref as y, computed as n, watch as S } from "vue";
|
|
2
|
+
import T from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import { useToaster as v } from "../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as B } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ToasterTypeOptions as C } from "../../../enums/toaster.js";
|
|
6
6
|
import { useUnsubscribeStore as w } from "../../../stores/unsubscribe.js";
|
|
7
|
-
import { InContainer as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
7
|
+
import { InContainer as h } from "@useinsider/design-system-vue";
|
|
8
|
+
import U from "./UnsubscribeBreadcrumb.vue.js";
|
|
9
|
+
const F = /* @__PURE__ */ g({
|
|
10
10
|
__name: "UnsubscribePageSelection",
|
|
11
|
-
setup(
|
|
12
|
-
const s =
|
|
11
|
+
setup(P) {
|
|
12
|
+
const s = B(), e = w(), { showToaster: a } = v(), o = y(!1), c = n(() => e.isActiveTypeLastInCollection ? o.value ? s("unsubscription-preference.applying-changes") : s("statistics.apply") : s("products.select-and-continue")), i = n(() => e.pageSelectionUpdateStatus && e.isActiveTypeFirstInCollection ? s("products.cancel") : s("newsletter.back")), u = n(() => ({
|
|
13
13
|
primaryButton: {
|
|
14
14
|
styling: "solid",
|
|
15
15
|
type: "primary",
|
|
@@ -23,28 +23,28 @@ const E = /* @__PURE__ */ f({
|
|
|
23
23
|
labelText: i.value,
|
|
24
24
|
disabledStatus: o.value
|
|
25
25
|
}
|
|
26
|
-
})),
|
|
26
|
+
})), p = (t) => e.getSelectedTemplateByActiveType === t ? "bor-w-3 bor-s-s bor-c-7" : "bor-w-1 bor-s-s bor-c-6", r = (t) => {
|
|
27
27
|
e.pageSelectionDrawerStatus = !1, t && setTimeout(() => {
|
|
28
28
|
t();
|
|
29
29
|
}, 500);
|
|
30
|
-
},
|
|
30
|
+
}, d = () => {
|
|
31
31
|
if (e.isActiveTypeFirstInCollection) {
|
|
32
32
|
r(), e.pageSelectionUpdateStatus || (e.typeSelectionDrawerStatus = !0);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
e.setPreviousType();
|
|
36
|
-
},
|
|
36
|
+
}, m = () => {
|
|
37
37
|
if (e.isActiveTypeLastInCollection) {
|
|
38
38
|
o.value = !0;
|
|
39
|
-
const t = e.selectedCollectionType, l = e.getSelectedTemplatesByCollection(t);
|
|
40
|
-
e.addUnsubscribePages(l), document.dispatchEvent(new CustomEvent("unsubscribe:select", {
|
|
39
|
+
const t = e.selectedCollectionType, l = e.getSelectedTemplatesByCollection(t), f = e.getSelectedUnsubscribePagesByCollection(t);
|
|
40
|
+
e.removeUnsubscribePages(f), e.addUnsubscribePages(l), document.dispatchEvent(new CustomEvent("unsubscribe:select", {
|
|
41
41
|
detail: {
|
|
42
42
|
collectionType: t,
|
|
43
43
|
selectedPages: l
|
|
44
44
|
}
|
|
45
45
|
})), r(() => {
|
|
46
46
|
o.value = !1, a({
|
|
47
|
-
type:
|
|
47
|
+
type: C.Success,
|
|
48
48
|
message: s("global-unsubscribe.pages-were-attached")
|
|
49
49
|
});
|
|
50
50
|
});
|
|
@@ -54,11 +54,11 @@ const E = /* @__PURE__ */ f({
|
|
|
54
54
|
}, b = (t) => {
|
|
55
55
|
e.setSelectedTemplate(t);
|
|
56
56
|
};
|
|
57
|
-
return
|
|
57
|
+
return S(() => e.pageSelectionDrawerStatus, (t) => {
|
|
58
58
|
t && e.pageSelectionUpdateStatus && e.fetchTemplates();
|
|
59
|
-
}), { __sfc: !0, trans: s, unsubscribeStore: e, showToaster: a, isApplying: o, getPrimaryButtonText: c, getCancelOrBackButtonText: i, footerButtonGroupOptions:
|
|
59
|
+
}), { __sfc: !0, trans: s, unsubscribeStore: e, showToaster: a, isApplying: o, getPrimaryButtonText: c, getCancelOrBackButtonText: i, footerButtonGroupOptions: u, getBorderClass: p, closeModal: r, handleBack: d, handleSave: m, selectTemplate: b, WpDrawer: T, InContainer: h, UnsubscribeBreadcrumb: U };
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
F as default
|
|
64
64
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import r from "../extensions/ModulesTabIcons/extension.js";
|
|
1
2
|
import { useConfigStore as l } from "../stores/config.js";
|
|
2
|
-
const
|
|
3
|
+
const a = {
|
|
3
4
|
"amp-accordion": "ampAccordionEnabled",
|
|
4
5
|
"amp-carousel": "ampCarouselEnabled",
|
|
5
6
|
"amp-form-controls": "ampFormControlsEnabled",
|
|
@@ -13,7 +14,7 @@ const r = {
|
|
|
13
14
|
"text-block": "textEnabled",
|
|
14
15
|
"timer-block": "timerEnabled",
|
|
15
16
|
"video-block": "videoEnabled"
|
|
16
|
-
},
|
|
17
|
+
}, s = {
|
|
17
18
|
"dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
|
|
18
19
|
"checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
|
|
19
20
|
"radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
|
|
@@ -21,31 +22,40 @@ const r = {
|
|
|
21
22
|
"unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
|
|
22
23
|
"coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
|
|
23
24
|
"items-block": () => import("../extensions/Blocks/Items/extension.js")
|
|
24
|
-
},
|
|
25
|
+
}, i = (n) => {
|
|
25
26
|
if (!n || !n.length)
|
|
26
27
|
return {};
|
|
27
|
-
const
|
|
28
|
+
const t = {};
|
|
28
29
|
return n.forEach((o) => {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
}),
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return t
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
const e = a[o];
|
|
31
|
+
e && (t[e] = !1);
|
|
32
|
+
}), t;
|
|
33
|
+
}, b = () => [r], m = async (n) => {
|
|
34
|
+
const t = b();
|
|
35
|
+
if (!n || !n.length)
|
|
36
|
+
return t;
|
|
37
|
+
const o = await Promise.all(
|
|
38
|
+
n.map(async (e) => {
|
|
39
|
+
const c = s[e];
|
|
40
|
+
return c ? (await c()).default : null;
|
|
41
|
+
})
|
|
42
|
+
);
|
|
43
|
+
return [
|
|
44
|
+
...t,
|
|
45
|
+
...o.filter((e) => e !== null)
|
|
46
|
+
];
|
|
47
|
+
}, E = () => {
|
|
38
48
|
const n = l();
|
|
39
49
|
return {
|
|
40
50
|
getStripoBlocksConfig: async () => {
|
|
41
51
|
const o = n.blocks;
|
|
42
52
|
return {
|
|
43
|
-
baseBlocks:
|
|
44
|
-
extensions: await
|
|
53
|
+
baseBlocks: i(o == null ? void 0 : o.excludeDefaults),
|
|
54
|
+
extensions: await m(o == null ? void 0 : o.includeCustoms)
|
|
45
55
|
};
|
|
46
56
|
}
|
|
47
57
|
};
|
|
48
58
|
};
|
|
49
59
|
export {
|
|
50
|
-
|
|
60
|
+
E as useBlocksConfig
|
|
51
61
|
};
|