@useinsider/guido 1.0.3-beta.63633cd → 1.0.3-beta.637a0f4

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.
Files changed (49) hide show
  1. package/dist/components/Guido.vue.js +7 -7
  2. package/dist/components/Guido.vue2.js +35 -36
  3. package/dist/composables/useStripo.js +16 -18
  4. package/dist/extensions/Blocks/RadioButton/template.js +6 -6
  5. package/dist/guido.css +1 -1
  6. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +72 -83
  7. package/dist/package.json.js +1 -1
  8. package/dist/src/@types/generic.d.ts +0 -4
  9. package/dist/src/stores/editor.d.ts +0 -21
  10. package/dist/src/utils/genericUtil.d.ts +0 -1
  11. package/dist/stores/editor.js +1 -2
  12. package/dist/utils/genericUtil.js +7 -8
  13. package/package.json +3 -3
  14. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +0 -28
  15. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +0 -38
  16. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +0 -17
  17. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +0 -37
  18. package/dist/components/organisms/extensions/recommendation/Filters.vue.js +0 -20
  19. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +0 -44
  20. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +0 -17
  21. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +0 -27
  22. package/dist/enums/extensions/recommendationBlock.js +0 -80
  23. package/dist/extensions/Blocks/Recommendation/block.js +0 -27
  24. package/dist/extensions/Blocks/Recommendation/control.js +0 -277
  25. package/dist/extensions/Blocks/Recommendation/extension.js +0 -10
  26. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +0 -51
  27. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +0 -19
  28. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +0 -32
  29. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +0 -266
  30. package/dist/extensions/Blocks/Recommendation/template.js +0 -200
  31. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +0 -28
  32. package/dist/extensions/Blocks/common-control.js +0 -102
  33. package/dist/services/recommendationApi.js +0 -43
  34. package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -19
  35. package/dist/src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -2
  36. package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +0 -2
  37. package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -16
  38. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -16
  39. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -10
  40. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -29
  41. package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +0 -2
  42. package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +0 -4
  43. package/dist/src/extensions/Blocks/Recommendation/settingsPanel.d.ts +0 -4
  44. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -555
  45. package/dist/src/extensions/Blocks/Recommendation/template.d.ts +0 -6
  46. package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +0 -7
  47. package/dist/src/extensions/Blocks/common-control.d.ts +0 -66
  48. package/dist/src/mock/api/recommendation.d.ts +0 -2
  49. package/dist/src/services/recommendationApi.d.ts +0 -6
@@ -7,7 +7,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
7
7
  editorVisualMode: string;
8
8
  hasChanges: boolean;
9
9
  isStripoInitialized: boolean;
10
- templateId: string;
11
10
  }, {
12
11
  isUndoButtonDisabled: (state: {
13
12
  loadingStatus: boolean;
@@ -18,7 +17,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
18
17
  editorVisualMode: string;
19
18
  hasChanges: boolean;
20
19
  isStripoInitialized: boolean;
21
- templateId: string;
22
20
  } & import("pinia").PiniaCustomStateProperties<{
23
21
  loadingStatus: boolean;
24
22
  isCodeEditorOpen: boolean;
@@ -28,7 +26,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
28
26
  editorVisualMode: string;
29
27
  hasChanges: boolean;
30
28
  isStripoInitialized: boolean;
31
- templateId: string;
32
29
  }>) => boolean;
33
30
  isRedoButtonDisabled: (state: {
34
31
  loadingStatus: boolean;
@@ -39,7 +36,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
39
36
  editorVisualMode: string;
40
37
  hasChanges: boolean;
41
38
  isStripoInitialized: boolean;
42
- templateId: string;
43
39
  } & import("pinia").PiniaCustomStateProperties<{
44
40
  loadingStatus: boolean;
45
41
  isCodeEditorOpen: boolean;
@@ -49,7 +45,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
49
45
  editorVisualMode: string;
50
46
  hasChanges: boolean;
51
47
  isStripoInitialized: boolean;
52
- templateId: string;
53
48
  }>) => boolean;
54
49
  isCodeEditorButtonDisabled: (state: {
55
50
  loadingStatus: boolean;
@@ -60,7 +55,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
60
55
  editorVisualMode: string;
61
56
  hasChanges: boolean;
62
57
  isStripoInitialized: boolean;
63
- templateId: string;
64
58
  } & import("pinia").PiniaCustomStateProperties<{
65
59
  loadingStatus: boolean;
66
60
  isCodeEditorOpen: boolean;
@@ -70,7 +64,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
70
64
  editorVisualMode: string;
71
65
  hasChanges: boolean;
72
66
  isStripoInitialized: boolean;
73
- templateId: string;
74
67
  }>) => boolean;
75
68
  isPreviewButtonDisabled: (state: {
76
69
  loadingStatus: boolean;
@@ -81,7 +74,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
81
74
  editorVisualMode: string;
82
75
  hasChanges: boolean;
83
76
  isStripoInitialized: boolean;
84
- templateId: string;
85
77
  } & import("pinia").PiniaCustomStateProperties<{
86
78
  loadingStatus: boolean;
87
79
  isCodeEditorOpen: boolean;
@@ -91,7 +83,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
91
83
  editorVisualMode: string;
92
84
  hasChanges: boolean;
93
85
  isStripoInitialized: boolean;
94
- templateId: string;
95
86
  }>) => boolean;
96
87
  isViewOptionsDisabled: (state: {
97
88
  loadingStatus: boolean;
@@ -102,7 +93,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
102
93
  editorVisualMode: string;
103
94
  hasChanges: boolean;
104
95
  isStripoInitialized: boolean;
105
- templateId: string;
106
96
  } & import("pinia").PiniaCustomStateProperties<{
107
97
  loadingStatus: boolean;
108
98
  isCodeEditorOpen: boolean;
@@ -112,7 +102,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
112
102
  editorVisualMode: string;
113
103
  hasChanges: boolean;
114
104
  isStripoInitialized: boolean;
115
- templateId: string;
116
105
  }>) => boolean;
117
106
  isVersionHistoryButtonDisabled: (state: {
118
107
  loadingStatus: boolean;
@@ -123,7 +112,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
123
112
  editorVisualMode: string;
124
113
  hasChanges: boolean;
125
114
  isStripoInitialized: boolean;
126
- templateId: string;
127
115
  } & import("pinia").PiniaCustomStateProperties<{
128
116
  loadingStatus: boolean;
129
117
  isCodeEditorOpen: boolean;
@@ -133,7 +121,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
133
121
  editorVisualMode: string;
134
122
  hasChanges: boolean;
135
123
  isStripoInitialized: boolean;
136
- templateId: string;
137
124
  }>) => boolean;
138
125
  isExportButtonDisabled: (state: {
139
126
  loadingStatus: boolean;
@@ -144,7 +131,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
144
131
  editorVisualMode: string;
145
132
  hasChanges: boolean;
146
133
  isStripoInitialized: boolean;
147
- templateId: string;
148
134
  } & import("pinia").PiniaCustomStateProperties<{
149
135
  loadingStatus: boolean;
150
136
  isCodeEditorOpen: boolean;
@@ -154,7 +140,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
154
140
  editorVisualMode: string;
155
141
  hasChanges: boolean;
156
142
  isStripoInitialized: boolean;
157
- templateId: string;
158
143
  }>) => boolean;
159
144
  isSaveAsButtonDisabled: (state: {
160
145
  loadingStatus: boolean;
@@ -165,7 +150,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
165
150
  editorVisualMode: string;
166
151
  hasChanges: boolean;
167
152
  isStripoInitialized: boolean;
168
- templateId: string;
169
153
  } & import("pinia").PiniaCustomStateProperties<{
170
154
  loadingStatus: boolean;
171
155
  isCodeEditorOpen: boolean;
@@ -175,7 +159,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
175
159
  editorVisualMode: string;
176
160
  hasChanges: boolean;
177
161
  isStripoInitialized: boolean;
178
- templateId: string;
179
162
  }>) => boolean;
180
163
  isTestButtonDisabled: (state: {
181
164
  loadingStatus: boolean;
@@ -186,7 +169,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
186
169
  editorVisualMode: string;
187
170
  hasChanges: boolean;
188
171
  isStripoInitialized: boolean;
189
- templateId: string;
190
172
  } & import("pinia").PiniaCustomStateProperties<{
191
173
  loadingStatus: boolean;
192
174
  isCodeEditorOpen: boolean;
@@ -196,7 +178,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
196
178
  editorVisualMode: string;
197
179
  hasChanges: boolean;
198
180
  isStripoInitialized: boolean;
199
- templateId: string;
200
181
  }>) => boolean;
201
182
  isSaveButtonDisabled: (state: {
202
183
  loadingStatus: boolean;
@@ -207,7 +188,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
207
188
  editorVisualMode: string;
208
189
  hasChanges: boolean;
209
190
  isStripoInitialized: boolean;
210
- templateId: string;
211
191
  } & import("pinia").PiniaCustomStateProperties<{
212
192
  loadingStatus: boolean;
213
193
  isCodeEditorOpen: boolean;
@@ -217,6 +197,5 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
217
197
  editorVisualMode: string;
218
198
  hasChanges: boolean;
219
199
  isStripoInitialized: boolean;
220
- templateId: string;
221
200
  }>) => boolean;
222
201
  }, {}>;
@@ -6,4 +6,3 @@ export declare const getCsrfToken: () => string;
6
6
  */
7
7
  export declare const getUrlParams: () => URLSearchParams;
8
8
  export declare const getUrlParam: (paramName: string, defaultValue?: string) => string;
9
- export declare const replaceString: (string?: string, values?: Record<string, string | number>, isRemoveEmptyValues?: boolean) => string;
@@ -8,8 +8,7 @@ const o = e("editor", {
8
8
  isPreviewModeOpen: !1,
9
9
  editorVisualMode: "desktop",
10
10
  hasChanges: !1,
11
- isStripoInitialized: !1,
12
- templateId: ""
11
+ isStripoInitialized: !1
13
12
  }),
14
13
  getters: {
15
14
  // Middle Slot
@@ -1,15 +1,14 @@
1
- const o = (e) => e.map((a) => a.format ? {
1
+ const e = (l) => l.map((a) => a.format ? {
2
2
  label: `${a.text} | ${a.format.key}=${a.format.value}`,
3
3
  value: `{{${a.value}|${a.format.key}=${a.format.value}}}`
4
4
  } : {
5
5
  label: a.fallback ? `${a.text} | ${a.fallback}` : a.text,
6
6
  value: a.fallback ? `{{${a.value}|${a.fallback}}}` : `{{${a.value}}}`
7
- }), f = () => {
8
- var e;
9
- return ((e = document.head.querySelector('meta[name="csrf-token"]')) == null ? void 0 : e.getAttribute("content")) ?? "";
10
- }, $ = (e = "", a = {}, n = !1) => Object.entries(a).reduce((l, [t, r]) => n && (r === "" || r === null || r === void 0) ? l.replace(`&${t}={${t}}`, "") : l.replace(`{${t}}`, String(r)), e);
7
+ }), r = () => {
8
+ var l;
9
+ return ((l = document.head.querySelector('meta[name="csrf-token"]')) == null ? void 0 : l.getAttribute("content")) ?? "";
10
+ };
11
11
  export {
12
- o as dynamicContentToMergeTags,
13
- f as getCsrfToken,
14
- $ as replaceString
12
+ e as dynamicContentToMergeTags,
13
+ r as getCsrfToken
15
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.3-beta.63633cd",
3
+ "version": "1.0.3-beta.637a0f4",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -32,7 +32,7 @@
32
32
  "license": "ISC",
33
33
  "dependencies": {
34
34
  "@stripoinc/ui-editor-extensions": "3.0.0",
35
- "@useinsider/design-system-vue": "0.14.20",
35
+ "@useinsider/design-system-vue": "0.14.8",
36
36
  "@vueuse/core": "11.3.0",
37
37
  "lodash-es": "4.17.21",
38
38
  "pinia": "2.3.1",
@@ -83,7 +83,7 @@
83
83
  },
84
84
  "guido": {
85
85
  "stripo": {
86
- "version": "2.42.0"
86
+ "version": "2.41.0"
87
87
  }
88
88
  }
89
89
  }
@@ -1,28 +0,0 @@
1
- import r from "./FilterItem.vue2.js";
2
- /* empty css */
3
- import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var l = function() {
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) {
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) {
11
- return t.updateFilter({ text: "operator", value: s.value });
12
- } } }), e(t.InBasicTextInput, { staticClass: "w-2", attrs: { id: "filter-item-input--value", name: "imageUrl", type: "text", "character-counter-status": !1, "label-text": t.trans("condition.value"), "max-character-length": 25, "placeholder-text": t.trans("condition.enter-value-placeholder"), "tooltip-status": !1, value: decodeURIComponent(t.props.filter.value) }, on: { input: function(s) {
13
- t.updateFilter({ text: "value", value: encodeURIComponent(s) });
14
- } } })], 1), 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
- return t.updateFilter({ text: "innerGroupOperator", value: s });
16
- } } })], 1) : a._e()]);
17
- }, n = [], o = /* @__PURE__ */ i(
18
- r,
19
- l,
20
- n,
21
- !1,
22
- null,
23
- "6562e38c"
24
- );
25
- const f = o.exports;
26
- export {
27
- f as default
28
- };
@@ -1,38 +0,0 @@
1
- import { defineComponent as f, computed as i } from "vue";
2
- import { useTranslations as v } from "../../../../composables/useTranslations.js";
3
- import { getOperatorOptions as a } from "../../../../enums/extensions/recommendationBlock.js";
4
- import { useRecommendationExtensionStore as x } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
- import { InButtonV2 as y, InSelect as F, InBasicTextInput as T } from "@useinsider/design-system-vue";
6
- import _ from "./LogicAdapter.vue.js";
7
- import { useDebounceFn as b } from "../../../../node_modules/@vueuse/shared/index.js";
8
- const h = /* @__PURE__ */ f({
9
- __name: "FilterItem",
10
- props: {
11
- filter: null,
12
- index: null,
13
- hasLogicAdapter: { type: Boolean }
14
- },
15
- emits: ["delete-filter"],
16
- setup(p, { emit: u }) {
17
- const e = p, n = v(), r = x(), m = [
18
- {
19
- text: n("email-editor.standard-filter"),
20
- value: "standardFilter"
21
- }
22
- ], s = i(() => e.filter.attribute || ""), l = i(() => r.getFilterList.find((t) => t.value === s.value) || { text: "", value: "", type: "" }), c = i(() => {
23
- var t;
24
- return a((t = l.value) == null ? void 0 : t.type).find((o) => o.value === e.filter.operator);
25
- }), d = b((t) => {
26
- console.debug("updateFilter: ", t);
27
- const o = {
28
- ...e.filter,
29
- [t.text]: t.value
30
- };
31
- r.updateFilter(o);
32
- }, 500);
33
- return { __sfc: !0, trans: n, store: r, props: e, filterTypeOptions: m, attributeType: s, selectedAttributeType: l, selectedOperatorType: c, emit: u, updateFilter: d, getOperatorOptions: a, InBasicTextInput: T, InSelect: F, InButtonV2: y, LogicAdapter: _ };
34
- }
35
- });
36
- export {
37
- h as default
38
- };
@@ -1,17 +0,0 @@
1
- import o from "./FilterSelectionDrawer.vue2.js";
2
- import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
- var l = function() {
4
- var e = this, r = e._self._c, t = e._self._setupProxy;
5
- return r(t.WpDrawer, { attrs: { id: "recommendation-filter-drawer", "title-text": "Filter Selection", "footer-button-group-options": t.footerButtonGroupOptions, status: t.store.filterSelectionDrawerStatus }, on: { cancelOrBackButtonEvent: t.closeModal, onCloseEvent: t.closeModal, primaryButtonEvent: t.applyFilter } }, [r(t.Filters)], 1);
6
- }, s = [], a = /* @__PURE__ */ n(
7
- o,
8
- l,
9
- s,
10
- !1,
11
- null,
12
- null
13
- );
14
- const p = a.exports;
15
- export {
16
- p as default
17
- };
@@ -1,37 +0,0 @@
1
- import { defineComponent as n, ref as a, computed as l } from "vue";
2
- import i from "../../../wrappers/WpDrawer.vue.js";
3
- import { useTranslations as p } from "../../../../composables/useTranslations.js";
4
- import { useRecommendationExtensionStore as c } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
- import u from "./Filters.vue.js";
6
- const b = /* @__PURE__ */ n({
7
- __name: "FilterSelectionDrawer",
8
- setup(m) {
9
- const t = p(), o = c(), e = a(!1), s = l(() => ({
10
- primaryButton: {
11
- styling: "solid",
12
- type: "primary",
13
- labelText: t(
14
- e.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
15
- ),
16
- loadingStatus: e.value,
17
- disabledStatus: !1
18
- },
19
- cancelOrBackButton: {
20
- styling: "ghost",
21
- type: "secondary",
22
- labelText: t("products.cancel"),
23
- disabledStatus: e.value
24
- }
25
- })), r = () => {
26
- o.filterSelectionDrawerStatus = !1;
27
- };
28
- return { __sfc: !0, trans: t, store: o, isApplying: e, footerButtonGroupOptions: s, closeModal: r, applyFilter: () => {
29
- e.value = !0, setTimeout(() => {
30
- console.debug("Filter applied!"), r(), o.generateFilterQuery();
31
- }, 2e3);
32
- }, WpDrawer: i, Filters: u };
33
- }
34
- });
35
- export {
36
- b as default
37
- };
@@ -1,20 +0,0 @@
1
- import s from "./Filters.vue2.js";
2
- /* empty css */
3
- import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var o = function() {
5
- var i = this, e = i._self._c, t = i._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.changeFilterGroup } }), 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-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" }) : i._e(), e("p", [i._v(" " + i._s(t.trans("email-editor.filter-group")) + " " + i._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 } }) : i._e()], 1), e("div", { staticClass: "d-f a-i-c j-c-s-b f-d-c" }, i._l(t.selectedFilterGroupFilters, function(l, r) {
7
- return e(t.FilterItem, { key: r, attrs: { filter: l, "has-logic-adapter": t.hasLogicAdapter && r !== t.selectedFilterGroupFilters.length - 1, index: r }, 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", "label-text": t.trans("smart-recommender.add-filter-condition") }, on: { click: t.handleAddFilter } })], 1)]);
9
- }, d = [], n = /* @__PURE__ */ a(
10
- s,
11
- o,
12
- d,
13
- !1,
14
- null,
15
- "1ccb6d4a"
16
- );
17
- const _ = n.exports;
18
- export {
19
- _ as default
20
- };
@@ -1,44 +0,0 @@
1
- import { defineComponent as m, computed as o, ref as h } from "vue";
2
- import { useTranslations as G } from "../../../../composables/useTranslations.js";
3
- import { useRecommendationExtensionStore as g } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
4
- import { InButtonV2 as v, InSegments as f } from "@useinsider/design-system-vue";
5
- import _ from "./FilterItem.vue.js";
6
- import A from "./LogicAdapter.vue.js";
7
- const E = /* @__PURE__ */ m({
8
- __name: "Filters",
9
- setup(R) {
10
- const i = G(), l = g(), u = o(() => l.getFilterGroupCount), t = o(() => Array.from({ length: u.value }, (e, a) => ({
11
- text: (a + 1).toString(),
12
- value: a + 1
13
- }))), r = h(1), s = (e) => {
14
- r.value = e;
15
- }, d = () => {
16
- const e = t.value.length + 1;
17
- console.debug("handleAddFilterGroup", e), t.value.push({
18
- text: e.toString(),
19
- value: e
20
- }), l.addFilterGroup(e);
21
- }, p = o(() => t.value.length >= 3), n = o(() => l.getSelectedFilterGroup(r.value)), c = o(() => n.value.length > 1), F = o(() => t.value.length > 1);
22
- return { __sfc: !0, MAX_FILTER_GROUP_COUNT: 3, trans: i, store: l, filterGroupCount: u, filterGroupList: t, selectedFilterGroup: r, changeFilterGroup: s, handleAddFilterGroup: d, isMaxFilterGroupCount: p, selectedFilterGroupFilters: n, hasLogicAdapter: c, hasRemoveFilterButton: F, handleAddFilter: () => {
23
- l.addFilter({
24
- type: "standardFilter",
25
- attribute: "",
26
- operatorReplace: "",
27
- operator: "",
28
- innerGroupOperator: "*",
29
- outerGroupOperator: "*",
30
- filterNumber: n.value.length + 1,
31
- filterGroup: r.value,
32
- isValid: !1,
33
- value: ""
34
- }), console.debug("handleAddFilter");
35
- }, handleDeleteFilter: (e) => {
36
- console.debug("handleDeleteFilter: ", e), l.deleteFilter(e);
37
- }, handleDeleteFilterGroup: () => {
38
- t.value.length !== 1 && (console.debug("handleDeleteFilterGroup"), t.value.splice(r.value - 1, 1), r.value > 1 && r.value--);
39
- }, InSegments: f, InButtonV2: v, FilterItem: _, LogicAdapter: A };
40
- }
41
- });
42
- export {
43
- E as default
44
- };
@@ -1,17 +0,0 @@
1
- import s from "./LogicAdapter.vue2.js";
2
- import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
- var o = function() {
4
- var t = this, r = t._self._c, e = t._self._setupProxy;
5
- return r(e.InSegments, { staticClass: "guido__logic-adapter f-g-1", attrs: { "segment-list": e.logicAdapterList, selected: e.selectedLogicAdapter, "with-icon": !1 }, on: { click: e.changeLogicAdapter } });
6
- }, a = [], c = /* @__PURE__ */ n(
7
- s,
8
- o,
9
- a,
10
- !1,
11
- null,
12
- null
13
- );
14
- const p = c.exports;
15
- export {
16
- p as default
17
- };
@@ -1,27 +0,0 @@
1
- import { defineComponent as s, ref as n } from "vue";
2
- import { InSegments as p } from "@useinsider/design-system-vue";
3
- const l = /* @__PURE__ */ s({
4
- __name: "LogicAdapter",
5
- props: {
6
- logic: null
7
- },
8
- emits: ["change"],
9
- setup(r, { emit: e }) {
10
- const t = r, a = n([
11
- {
12
- text: "and",
13
- value: "*"
14
- },
15
- {
16
- text: "or",
17
- value: "|"
18
- }
19
- ]), o = n(t.logic || "*");
20
- return { __sfc: !0, logicAdapterList: a, emit: e, props: t, selectedLogicAdapter: o, changeLogicAdapter: (c) => {
21
- o.value = c, e("change", c);
22
- }, InSegments: p };
23
- }
24
- });
25
- export {
26
- l as default
27
- };
@@ -1,80 +0,0 @@
1
- const s = {
2
- RECOMMENDATION_API_URL: "http://recommendationv2.api.useinsider.com"
3
- }, i = [
4
- { id: 11, key: "similarViewed", name: "Viewed Together", path: "viewed-together" },
5
- { id: 12, key: "similarBought", name: "Purchased Together", path: "purchased-together" },
6
- { id: 13, key: "userBased", name: "User Based", path: "user-based" },
7
- { id: 36, key: "highestDiscounted", name: "Highest Discounted Items", path: "highest-discounted" },
8
- { id: 38, key: "manualMerchandising", name: "Manual Merchandising", path: "manual-merchandising" },
9
- { id: 39, key: "newArrivals", name: "New Arrivals", path: "new-arrivals" },
10
- { id: 40, key: "trendingProducts", name: "Trending Products", path: "trending" },
11
- { id: 46, key: "mostValuableOfPartner", name: "Most Valuable Products", path: "most-valuable" },
12
- { id: 61, key: "mostPopular", name: "Most Popular Items", path: "most-popular" },
13
- { id: 62, key: "mostPurchased", name: "Top Sellers", path: "top-sellers" }
14
- ], u = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], l = [
15
- { text: "after the amount", value: "1" },
16
- { text: "before the amount", value: "0" }
17
- ], c = [
18
- { text: "dot(.)", value: "." },
19
- { text: "comma(,)", value: "," }
20
- ], d = [
21
- { text: "0", value: "0" },
22
- { text: "1", value: "1" },
23
- { text: "2", value: "2" },
24
- { text: "3", value: "3" },
25
- { text: "4", value: "4" },
26
- { text: "5", value: "5" }
27
- ], e = [
28
- { text: "is exactly", value: "=" },
29
- { text: "contains", value: "~" },
30
- { text: "does not contain", value: "!~" },
31
- { text: "any of", value: "||" }
32
- ], a = [
33
- { text: "is exactly", value: "=" },
34
- { text: "is not exactly", value: "!==" },
35
- { text: "contains", value: "~" },
36
- { text: "does not contain", value: "!~" },
37
- { text: "any of", value: "||" }
38
- ], r = [
39
- { text: "is equal to", value: "=" },
40
- { text: "is greater than", value: ">" },
41
- { text: "is less than", value: "<" }
42
- ], o = [
43
- { text: "is equal to", value: "=" },
44
- { text: "after", value: ">" },
45
- { text: "before", value: "<" }
46
- ], n = [
47
- { text: "true", value: "==" },
48
- { text: "false", value: "!=" }
49
- ], p = (t) => {
50
- if (!t)
51
- return e;
52
- switch (t) {
53
- case "Boolean":
54
- return n;
55
- case "Date":
56
- return o;
57
- case "Number":
58
- return r;
59
- case "String":
60
- return e;
61
- case "Strings":
62
- return a;
63
- default:
64
- return e;
65
- }
66
- };
67
- export {
68
- u as PriceAttributes,
69
- i as RecommendationFeedSourceMaps,
70
- s as URLS,
71
- d as currencyDecimalCounts,
72
- l as currencyLocationMaps,
73
- c as currencyOperators,
74
- p as getOperatorOptions,
75
- a as operatorOptionsForArrayOfStrings,
76
- n as operatorOptionsForBooleans,
77
- o as operatorOptionsForDates,
78
- r as operatorOptionsForNumbers,
79
- e as operatorOptionsForStrings
80
- };
@@ -1,27 +0,0 @@
1
- import { Block as e, BlockCompositionType as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { getDefaultTemplate as o } from "./template.js";
3
- const n = "recommendation-block";
4
- class c extends e {
5
- getId() {
6
- return n;
7
- }
8
- getIcon() {
9
- return "recommendation-icon";
10
- }
11
- getBlockCompositionType() {
12
- return t.CONTAINER;
13
- }
14
- getName() {
15
- return this.api.translate("Recommendation Block");
16
- }
17
- getDescription() {
18
- return this.api.translate("Recommendation Block Title Description");
19
- }
20
- getTemplate() {
21
- return o();
22
- }
23
- }
24
- export {
25
- n as BLOCK_ID,
26
- c as RecommendationBlock
27
- };