@useinsider/guido 2.1.0-beta.539baf9 → 2.1.0-beta.56a5c5a
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/@types/config/schemas.js +1 -1
- 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/composables/useStripo.js +25 -23
- package/dist/composables/useVersionHistoryApi.js +1 -1
- 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 +65 -64
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +58 -39
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +116 -70
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +8 -8
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +29 -0
- package/dist/guido.css +1 -1
- 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/config/i18n/en/index.d.ts +1 -0
- package/dist/src/config/i18n/index.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +18 -2
- package/dist/src/extensions/Blocks/Recommendation/validation/filterSchema.d.ts +15 -0
- package/dist/static/styles/components/notification.css.js +18 -0
- package/dist/static/styles/components/tools.css.js +6 -2
- package/dist/static/styles/variables.css.js +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as b } from "../../enums/defaults.js";
|
|
2
|
-
import { object as o, number as p, optional as e, string as t, pipe as u, picklist as n, custom as S, boolean as a, array as c,
|
|
2
|
+
import { object as o, number as p, optional as e, string as t, pipe as u, picklist as n, minLength as d, custom as S, boolean as a, array as c, literal as r, variant as k } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const m = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import r from "./FilterItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import l from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var i = function() {
|
|
5
5
|
var a = this, e = a._self._c, t = a._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "d-f f-d-c w-1 gap-16" }, [e("div", { staticClass: "d-f a-i-c j-c-s-b pt-4", class: { "bor-t-s-s bor-t-w-1 bor-t-c-50": a.index === 0 } }, [e("p", [a._v(" " + a._s(t.trans("newsletter.filter")) + " " + a._s(a.index + 1) + " ")]), e(t.InButtonV2, { attrs: { id: "guido__delete-filter-group-button", "left-icon": "line-delete", styling: "text", type: "danger", "label-text-status": !1 }, on: { click: function(s) {
|
|
6
|
+
return e("div", { staticClass: "d-f f-d-c w-1 gap-16", attrs: { "data-filter-group": a.filter.filterGroup, "data-filter-number": a.filter.filterNumber } }, [e("div", { staticClass: "d-f a-i-c j-c-s-b pt-4", class: { "bor-t-s-s bor-t-w-1 bor-t-c-50": a.index === 0 } }, [e("p", [a._v(" " + a._s(t.trans("newsletter.filter")) + " " + a._s(a.index + 1) + " ")]), e(t.InButtonV2, { attrs: { id: "guido__delete-filter-group-button", "left-icon": "line-delete", styling: "text", type: "danger", "label-text-status": !1 }, on: { click: function(s) {
|
|
7
7
|
return t.emit("delete-filter", t.props.filter);
|
|
8
|
-
} } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "disabled-status": "", "search-status": "", "button-status": !1, "label-text": t.trans("action-builder.filter-type"), options: t.filterTypeOptions, value: [t.filterTypeOptions[0]] } }), e(t.InSelect, { staticClass: "w-2", attrs: { id: "filter-item-input--attribute-type", "search-status": "", "static-position": "bottom right", "button-status": !1, "label-text": t.trans("condition.attribute"), options: t.store.getFilterList, value: [t.selectedAttributeType] }, on: { select: function(s) {
|
|
9
|
-
return t.updateFilter({ text: "attribute", value: s.value });
|
|
10
|
-
} } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.getOperatorOptions(t.selectedAttributeType.type), value: [t.selectedOperatorType] }, on: { select: function(s) {
|
|
8
|
+
} } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "disabled-status": "", "search-status": "", "button-status": !1, "label-text": t.trans("action-builder.filter-type"), options: t.filterTypeOptions, value: [t.filterTypeOptions[0]] } }), e(t.InSelect, { staticClass: "w-2", attrs: { id: "filter-item-input--attribute-type", "search-status": "", "static-position": "bottom right", "button-status": !1, "label-text": t.trans("condition.attribute"), options: t.store.getFilterList, state: t.getFieldState("attribute"), value: [t.selectedAttributeType] }, on: { select: t.handleAttributeChange } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [t.isBooleanAttribute ? e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.booleanValueOptions, state: t.getFieldState("value"), value: [t.selectedBooleanValue] }, on: { select: t.handleBooleanValueChange } }) : [e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.getOperatorOptions(t.selectedAttributeType.type), state: t.getFieldState("operator"), value: [t.selectedOperatorType] }, on: { select: function(s) {
|
|
11
9
|
return t.updateFilter({ text: "operator", value: s.value });
|
|
12
|
-
} } }), e(t.InBasicTextInput, { staticClass: "w-2", attrs: { id: "filter-item-input--value", name: "imageUrl",
|
|
10
|
+
} } }), e(t.InBasicTextInput, { staticClass: "w-2", attrs: { id: "filter-item-input--value", name: "imageUrl", "character-counter-status": !1, "label-text": t.trans("condition.value"), "max-character-length": 25, "placeholder-text": t.trans("condition.enter-value-placeholder"), "state-message": t.valueErrorMessage, states: t.getFieldState("value"), "tooltip-status": !1, type: t.valueInputType, value: decodeURIComponent(t.props.filter.value) }, on: { input: function(s) {
|
|
13
11
|
t.updateFilter({ text: "value", value: encodeURIComponent(s) });
|
|
14
|
-
} } })],
|
|
12
|
+
} } })]], 2), t.props.hasLogicAdapter ? e("div", { staticClass: "w-1 d-f a-i-c j-c-c p-r bor-b-s-s bor-b-w-1 bor-b-c-50 mt-4" }, [e(t.LogicAdapter, { staticClass: "p-a", attrs: { logic: t.props.filter.innerGroupOperator }, on: { change: function(s) {
|
|
15
13
|
return t.updateFilter({ text: "innerGroupOperator", value: s });
|
|
16
14
|
} } })], 1) : a._e()]);
|
|
17
|
-
},
|
|
15
|
+
}, o = [], n = /* @__PURE__ */ l(
|
|
18
16
|
r,
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
i,
|
|
18
|
+
o,
|
|
21
19
|
!1,
|
|
22
20
|
null,
|
|
23
|
-
"
|
|
21
|
+
"3b53a736"
|
|
24
22
|
);
|
|
25
|
-
const f =
|
|
23
|
+
const f = n.exports;
|
|
26
24
|
export {
|
|
27
25
|
f as default
|
|
28
26
|
};
|
|
@@ -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
|
};
|
|
@@ -4,21 +4,22 @@ import { useConfig as v } from "./useConfig.js";
|
|
|
4
4
|
import { useCustomInterfaceAppearance as A } from "./useCustomInterfaceAppearance.js";
|
|
5
5
|
import { useStripoEventHandler as F } from "./useStripoEventHandler.js";
|
|
6
6
|
import { useToaster as D } from "./useToaster.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import U from "../
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import H from "../
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import { localePatch as I } from "../config/i18n/index.js";
|
|
8
|
+
import { displayConditions as M } from "../enums/displayConditions.js";
|
|
9
|
+
import { useStripoApi as U } from "../services/stripoApi.js";
|
|
10
|
+
import P from "../static/styles/customEditorStyle.css.js";
|
|
11
|
+
import { useEditorStore as R } from "../stores/editor.js";
|
|
12
|
+
import { dynamicContentToMergeTags as H } from "../utils/genericUtil.js";
|
|
13
|
+
import O from "../package.json.js";
|
|
14
|
+
const Z = (c) => {
|
|
15
|
+
const { features: l, template: y } = v(), { handleError: u } = D(), { getToken: C, getCustomFonts: S } = U(), { handleEvent: E } = F(), { getStripoBlocksConfig: h } = B(), w = async (i, r = []) => {
|
|
16
|
+
var m, f, g;
|
|
17
|
+
const o = R(), { html: n, css: p } = i, { baseBlocks: s, extensions: t } = await h(), a = ((m = l.value) == null ? void 0 : m.displayConditions) ?? !0, k = ((f = l.value) == null ? void 0 : f.modulesDisabled) ?? !1, T = ((g = y.value) == null ? void 0 : g.forceRecreate) ?? !1;
|
|
17
18
|
window.UIEditor.initEditor(
|
|
18
19
|
document.querySelector("#guido-editor"),
|
|
19
20
|
{
|
|
20
21
|
metadata: c,
|
|
21
|
-
html:
|
|
22
|
+
html: n,
|
|
22
23
|
css: p,
|
|
23
24
|
forceRecreate: T,
|
|
24
25
|
locale: "en",
|
|
@@ -30,10 +31,10 @@ const W = (c) => {
|
|
|
30
31
|
customAppearanceMergetags: !0,
|
|
31
32
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
32
33
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
33
|
-
customViewStyles:
|
|
34
|
+
customViewStyles: P,
|
|
34
35
|
conditionsEnabled: a,
|
|
35
36
|
customConditionsEnabled: a,
|
|
36
|
-
conditionCategories:
|
|
37
|
+
conditionCategories: M,
|
|
37
38
|
enableXSSSecurity: !0,
|
|
38
39
|
modulesDisabled: k,
|
|
39
40
|
messageSettingsEnabled: !0,
|
|
@@ -46,11 +47,11 @@ const W = (c) => {
|
|
|
46
47
|
editorFonts: {
|
|
47
48
|
showDefaultStandardFonts: !0,
|
|
48
49
|
showDefaultNotStandardFonts: !0,
|
|
49
|
-
customFonts:
|
|
50
|
+
customFonts: r
|
|
50
51
|
},
|
|
51
52
|
mergeTags: [
|
|
52
53
|
{
|
|
53
|
-
entries:
|
|
54
|
+
entries: H(c.preselectedDynamicContentList)
|
|
54
55
|
}
|
|
55
56
|
],
|
|
56
57
|
async onTokenRefreshRequest(e) {
|
|
@@ -89,29 +90,30 @@ const W = (c) => {
|
|
|
89
90
|
".in-on-board-wrapper",
|
|
90
91
|
".in-drawer__container"
|
|
91
92
|
],
|
|
92
|
-
extensions: t
|
|
93
|
+
extensions: t,
|
|
94
|
+
localePatch: I
|
|
93
95
|
}
|
|
94
96
|
);
|
|
95
|
-
}, b = (i) => new Promise((
|
|
97
|
+
}, b = (i) => new Promise((r, o) => {
|
|
96
98
|
var a;
|
|
97
99
|
if (document.getElementById("UiEditorScript")) {
|
|
98
|
-
i(),
|
|
100
|
+
i(), r();
|
|
99
101
|
return;
|
|
100
102
|
}
|
|
101
|
-
const
|
|
103
|
+
const n = O.guido, s = `https://email-static.useinsider.com/guido/${(a = n == null ? void 0 : n.stripo) == null ? void 0 : a.version}/UIEditor.js`, t = document.createElement("script");
|
|
102
104
|
t.id = "UiEditorScript", t.type = "module", t.src = s, t.onload = () => {
|
|
103
|
-
i(),
|
|
105
|
+
i(), r();
|
|
104
106
|
}, t.onerror = () => {
|
|
105
107
|
o(new Error(`Failed to load Stripo UIEditor script from S3: ${s}`));
|
|
106
108
|
}, document.body.appendChild(t);
|
|
107
109
|
});
|
|
108
110
|
return { initPlugin: async (i) => {
|
|
109
111
|
await b(async () => {
|
|
110
|
-
const
|
|
111
|
-
await w(i,
|
|
112
|
+
const r = await S();
|
|
113
|
+
await w(i, r);
|
|
112
114
|
});
|
|
113
115
|
} };
|
|
114
116
|
};
|
|
115
117
|
export {
|
|
116
|
-
|
|
118
|
+
Z as useStripo
|
|
117
119
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const e = "Your version has been restored successfully.", o = "Restore Image", t = "Cancel", a = {
|
|
2
|
+
"The image has been deleted.": "The image has been deleted successfully.",
|
|
3
|
+
"Aim for the drop zone!": "Drag and drop your image inside the upload area to continue.",
|
|
4
|
+
"Image processing": "The image upload is in progress. This may take some time.",
|
|
5
|
+
"Can not get image from an external source.": "The image couldn’t be uploaded from the URL. Check and update your URL to continue.",
|
|
6
|
+
"The selected basic color cannot be added to My Palette. Please choose a different one from the color picker.": "The selected color is already added to My Palette. Pick a different color to add.",
|
|
7
|
+
"Copied to clipboard": "Your Image URL has been copied to clipboard successfully.",
|
|
8
|
+
"The file {fileName} has wrong format {fileFormat}": "Upload a PNG, JPG, JPEG, or GIF image to continue.",
|
|
9
|
+
"The file {fileName} size exceeds the allowed size {maxFileSize}": "Upload an image up to 10 MB to continue.",
|
|
10
|
+
"Image link invalid": "Enter a valid Image Link to continue.",
|
|
11
|
+
"Image upload failed": "Upload a valid image to continue.",
|
|
12
|
+
"Image upload error": "Upload a valid image to continue.",
|
|
13
|
+
"Error message from video service": "The video thumbnail couldn't be loaded. Check and update your Video Link to continue.",
|
|
14
|
+
"Error message from image processing": "The Play Button couldn't be added to the Video Thumbnail right now. You can select another Play Button and try again.",
|
|
15
|
+
"The AI is fine-tuning your result... Please wait! This may take up to 1 minute.": "AI content generation is in progress. This may take some time.",
|
|
16
|
+
"Can not complete AI request. Try again later": "AI content generation couldn't be completed right now. You can reload the editor or wait for a while and try again.",
|
|
17
|
+
"Http failure response for https://plugins.stripo.email/api/v1/documents/v3/documents/link: 400 OK": "Upload a valid image to continue.",
|
|
18
|
+
"Http failure response for https://plugins.stripo.email/api/v1/documents/v3/documents/base64: 400 OK": "The video thumbnail couldn’t be uploaded from the URL. Check and update your URL to continue.",
|
|
19
|
+
"AI is processing your request": "AI content generation is in progress. This may take some time.",
|
|
20
|
+
"Whoops, something went wrong. Our experts are working to resolve this issue. Try again later please": "Your action couldn't be done right now. You can reload the editor or wait for a while and try again.",
|
|
21
|
+
"Unable to paste text. Limit is 256kB. Please trim it down.": "Add a text to Text Block of up to 256KB to continue.",
|
|
22
|
+
"Banner src included merge tag": "The image upload is in progress. This may take some time.",
|
|
23
|
+
"Module deletion error": "The module couldn't be deleted right now. You can wait for a while and try again.",
|
|
24
|
+
"Can`t delete the module": "The module couldn't be deleted right now. You can wait for a while and try again.",
|
|
25
|
+
"Block action error": "Your content couldn't added right now. You can wait for a while and try again.",
|
|
26
|
+
history_revert_to_patch: e,
|
|
27
|
+
"There is no connection to the server. Please reload the page or click 'Reconnect' to continue.": "Your server connection is lost. Reload the page to continue.",
|
|
28
|
+
"Reconnecting...": "Server reconnection is in progress. This may take some time.",
|
|
29
|
+
"Failed to load version history. Contact support for assistance.": "Your version couldn't be restored right now. You can wait for a while and try again.",
|
|
30
|
+
"Connection restored": "Server connection has been restored successfully.",
|
|
31
|
+
"Invalid base64 image format. Please replace the image link.": "This image can’t be edited.",
|
|
32
|
+
"Timer update error": "Your action couldn't be undone right now. You can reload the editor or wait for a while and try again.",
|
|
33
|
+
"Cannot edit base64 images": "This image type can't be edited.",
|
|
34
|
+
"Failed to copy URL": "Your Image Link couldn't be copied to clipboard right now. You can wait for a while and try again.",
|
|
35
|
+
"Error message from image service": "The image couldn’t be uploaded from the URL. Check and update your URL to continue.",
|
|
36
|
+
"Error message from image preload": "The image couldn't be loaded from the URL you entered. Check and update your Image Link to continue.",
|
|
37
|
+
"An error has occurred. Please report the error code to support: {trace_id} and reload the editor. Also, send a bug report with email logs to the development team.": "Your design couldn't be loaded right now. You can reload the page and try again.",
|
|
38
|
+
"The number of requests within your session has been exceeded. Please wait.": "Your requests are being processed. You can wait for a while to take new actions.",
|
|
39
|
+
"An error has occurred. Please report the error code to support.": "Your design couldn't be loaded right now. You can reload the page and try again.",
|
|
40
|
+
"Warning: custom fonts": "Use custom fonts up to 10 to continue.",
|
|
41
|
+
"Image recovery error": "The image couldn't be restored right now. You can wait for a while and try again.",
|
|
42
|
+
"Image moved to trash": "The image has been deleted successfully.",
|
|
43
|
+
Recover: o,
|
|
44
|
+
Stop: t,
|
|
45
|
+
"Can`t delete the image": "The image couldn’t be deleted right now. You can wait for a while and try again.",
|
|
46
|
+
"Can`t restore the image": "The image couldn’t be restored right now. You can wait for a while and try again.",
|
|
47
|
+
"Image delete error": "The image couldn't be deleted right now. You can wait for a while and try again.",
|
|
48
|
+
"The maximum number of users who can simultaneously work with the sheet has been exceeded. Maximum allowed number: {{max_users_per_model}}": "You can’t edit the design right now as the maximum number of users are currently editing it.",
|
|
49
|
+
"The monthly limit of Timer basic block is reached. Please change the subscription pricing plan to activate new quotas": "You have reached your monthly limit of Timer Blocks. You can contact your Account Director for more information."
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
o as Recover,
|
|
53
|
+
t as Stop,
|
|
54
|
+
a as default,
|
|
55
|
+
e as history_revert_to_patch
|
|
56
|
+
};
|