@useinsider/guido 2.1.0-beta.7d0f92a → 2.1.0-beta.7ffef92
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/extensions/recommendation/FilterItem.vue.js +11 -13
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +55 -24
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +3 -3
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +34 -21
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +9 -9
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +44 -35
- package/dist/composables/useBlocksConfig.js +26 -16
- package/dist/composables/useHtmlValidator.js +107 -119
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +27 -22
- package/dist/config/migrator/itemsBlockMigrator.js +101 -97
- package/dist/enums/defaults.js +8 -4
- package/dist/extensions/Blocks/Recommendation/block.js +26 -23
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +27 -26
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +6 -4
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +12 -10
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +124 -72
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +87 -37
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +138 -117
- package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +179 -133
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +25 -30
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +27 -30
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +20 -25
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +43 -31
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +8 -8
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +29 -0
- 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 +15 -1
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/enums/defaults.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +2 -2
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +17 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +22 -4
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +9 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +25 -2
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +12 -3
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/filterSchema.d.ts +15 -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 +1 -0
- 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 +10 -9
- package/dist/static/templates/empty/index.html.js +74 -0
- package/dist/static/templates/empty/style.css.js +779 -0
- package/package.json +1 -1
|
@@ -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 V, computed as o } from "vue";
|
|
2
|
+
import { useTranslations as _ } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { getOperatorOptions as s } from "../../../../enums/extensions/recommendationBlock.js";
|
|
4
|
+
import { useRecommendationExtensionStore as C } 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__ */ V({
|
|
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, p = _(), l = C(), F = [
|
|
18
20
|
{
|
|
19
|
-
text:
|
|
21
|
+
text: p("email-editor.standard-filter"),
|
|
20
22
|
value: "standardFilter"
|
|
21
23
|
}
|
|
22
|
-
],
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
], n = [
|
|
25
|
+
{ text: "True", value: "true" },
|
|
26
|
+
{ text: "False", value: "false" }
|
|
27
|
+
], c = o(() => t.filter.attribute || ""), r = o(() => l.getFilterList.find((e) => e.value === c.value) || { text: "", value: "", type: "" }), y = o(
|
|
28
|
+
() => {
|
|
29
|
+
var e;
|
|
30
|
+
return ((e = r.value) == null ? void 0 : e.type) === "Boolean";
|
|
31
|
+
}
|
|
32
|
+
), g = o(() => {
|
|
33
|
+
var e;
|
|
34
|
+
return s((e = r.value) == null ? void 0 : e.type).find((a) => a.value === t.filter.operator);
|
|
35
|
+
}), b = o(
|
|
36
|
+
() => n.find((e) => e.value === t.filter.value) || n[0]
|
|
37
|
+
), i = o(() => t.submitted ? A(t.filter) : /* @__PURE__ */ new Set()), h = (e) => i.value.has(e) ? "error" : "default", B = o(
|
|
38
|
+
() => i.value.has("value") ? "Enter Value to continue." : ""
|
|
39
|
+
), d = o(
|
|
40
|
+
() => {
|
|
41
|
+
var e;
|
|
42
|
+
return ((e = r.value) == null ? void 0 : e.type) === "Number";
|
|
43
|
+
}
|
|
44
|
+
), x = o(() => d.value ? "number" : "text"), T = N((e) => {
|
|
45
|
+
l.updateFilter({
|
|
46
|
+
...t.filter,
|
|
47
|
+
[e.text]: e.value
|
|
48
|
+
});
|
|
32
49
|
}, 500);
|
|
33
|
-
return { __sfc: !0, trans:
|
|
50
|
+
return { __sfc: !0, trans: p, store: l, props: t, filterTypeOptions: F, booleanValueOptions: n, attributeType: c, selectedAttributeType: r, isBooleanAttribute: y, selectedOperatorType: g, selectedBooleanValue: b, emit: v, invalidFields: i, getFieldState: h, valueErrorMessage: B, isNumericAttribute: d, valueInputType: x, updateFilter: T, handleAttributeChange: (e) => {
|
|
51
|
+
const a = l.getFilterList.find((I) => I.value === e.value), m = (a == null ? void 0 : a.type) === "Boolean", [u] = s(a == null ? void 0 : a.type);
|
|
52
|
+
l.updateFilter({
|
|
53
|
+
...t.filter,
|
|
54
|
+
attribute: e.value,
|
|
55
|
+
operator: m ? "=" : (u == null ? void 0 : u.value) ?? "",
|
|
56
|
+
value: m ? "true" : ""
|
|
57
|
+
});
|
|
58
|
+
}, handleBooleanValueChange: (e) => {
|
|
59
|
+
l.updateFilter({
|
|
60
|
+
...t.filter,
|
|
61
|
+
operator: "=",
|
|
62
|
+
value: e.value
|
|
63
|
+
});
|
|
64
|
+
}, getOperatorOptions: s, InBasicTextInput: S, InSelect: O, InButtonV2: L, LogicAdapter: E };
|
|
34
65
|
}
|
|
35
66
|
});
|
|
36
67
|
export {
|
|
37
|
-
|
|
68
|
+
K as default
|
|
38
69
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
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 } }) : e._e()], 1);
|
|
6
6
|
}, s = [], a = /* @__PURE__ */ n(
|
|
7
7
|
o,
|
|
8
|
-
|
|
8
|
+
i,
|
|
9
9
|
s,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
@@ -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
|
-
import
|
|
1
|
+
import l from "./Filters.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var o = function() {
|
|
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)]);
|
|
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-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(s, i) {
|
|
7
|
+
return e(t.FilterItem, { key: i, attrs: { filter: s, "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
9
|
}, d = [], n = /* @__PURE__ */ a(
|
|
10
|
-
|
|
10
|
+
l,
|
|
11
11
|
o,
|
|
12
12
|
d,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"bd89e39d"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const m = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
m as default
|
|
20
20
|
};
|
|
@@ -1,44 +1,53 @@
|
|
|
1
|
-
import { defineComponent as m, computed as
|
|
2
|
-
import { useTranslations as
|
|
1
|
+
import { defineComponent as m, computed as l, ref as v, watch as O } from "vue";
|
|
2
|
+
import { useTranslations as f } from "../../../../composables/useTranslations.js";
|
|
3
3
|
import { useRecommendationExtensionStore as g } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
4
|
-
import { InButtonV2 as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
4
|
+
import { InButtonV2 as R, InSegments as T } from "@useinsider/design-system-vue";
|
|
5
|
+
import U from "./FilterItem.vue.js";
|
|
6
|
+
import E from "./LogicAdapter.vue.js";
|
|
7
|
+
const w = /* @__PURE__ */ m({
|
|
8
8
|
__name: "Filters",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
props: {
|
|
10
|
+
submitted: { type: Boolean }
|
|
11
|
+
},
|
|
12
|
+
setup(A, { expose: s }) {
|
|
13
|
+
const i = f(), t = g(), u = l(() => t.getUniqueFilterGroups.map((e) => ({
|
|
14
|
+
text: e.toString(),
|
|
15
|
+
value: e
|
|
16
|
+
}))), r = v(1);
|
|
17
|
+
O(u, (e) => {
|
|
18
|
+
if (!e.length)
|
|
19
|
+
return;
|
|
20
|
+
e.some((h) => h.value === r.value) || (r.value = e[0].value);
|
|
21
|
+
});
|
|
22
|
+
const a = (e) => {
|
|
14
23
|
r.value = e;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
};
|
|
25
|
+
s({ switchToGroup: a });
|
|
26
|
+
const p = () => {
|
|
27
|
+
const e = t.getUniqueFilterGroups, o = e.length > 0 ? Math.max(...e) + 1 : 1;
|
|
28
|
+
t.addFilterGroup(o), r.value = o;
|
|
29
|
+
}, c = l(() => u.value.length >= 3), n = l(() => t.getSelectedFilterGroup(r.value)), d = l(() => n.value.length >= 10), F = l(() => n.value.length > 1), _ = l(() => u.value.length > 1), G = l(() => {
|
|
30
|
+
var o;
|
|
31
|
+
return ((o = n.value[0]) == null ? void 0 : o.outerGroupOperator) || "*";
|
|
32
|
+
});
|
|
33
|
+
return { __sfc: !0, MAX_FILTER_GROUP_COUNT: 3, MAX_FILTER_PER_GROUP_COUNT: 10, trans: i, store: t, filterGroupList: u, selectedFilterGroup: r, switchToGroup: a, handleAddFilterGroup: p, isMaxFilterGroupCount: c, selectedFilterGroupFilters: n, isMaxFilterPerGroupCount: d, hasLogicAdapter: F, hasRemoveFilterButton: _, outerGroupOperator: G, handleOuterGroupOperatorChange: (e) => {
|
|
34
|
+
n.value.forEach((o) => {
|
|
35
|
+
t.updateFilter({ ...o, outerGroupOperator: e });
|
|
36
|
+
});
|
|
37
|
+
}, handleAddFilter: () => {
|
|
38
|
+
t.addFilter(
|
|
39
|
+
t.createDefaultFilter(
|
|
40
|
+
r.value,
|
|
41
|
+
n.value.length + 1
|
|
42
|
+
)
|
|
43
|
+
);
|
|
35
44
|
}, handleDeleteFilter: (e) => {
|
|
36
|
-
|
|
45
|
+
t.deleteFilter(e);
|
|
37
46
|
}, handleDeleteFilterGroup: () => {
|
|
38
|
-
|
|
39
|
-
}, InSegments:
|
|
47
|
+
u.value.length <= 1 || t.deleteFilterGroup(r.value);
|
|
48
|
+
}, InSegments: T, InButtonV2: R, FilterItem: U, LogicAdapter: E };
|
|
40
49
|
}
|
|
41
50
|
});
|
|
42
51
|
export {
|
|
43
|
-
|
|
52
|
+
w as default
|
|
44
53
|
};
|
|
@@ -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
|
};
|