@useinsider/guido 1.0.3-beta.830bb2b → 1.0.3-beta.83937b4
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 +137 -3
- package/dist/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +36 -35
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +28 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +38 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +37 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +20 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +44 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +27 -0
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +16 -15
- package/dist/components/organisms/header/RightSlot.vue.js +11 -11
- package/dist/composables/useBlocksConfig.js +49 -0
- package/dist/composables/useStripo.js +39 -48
- package/dist/enums/defaults.js +14 -8
- package/dist/enums/extensions/recommendationBlock.js +80 -0
- package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
- package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
- package/dist/extensions/Blocks/RadioButton/template.js +6 -6
- package/dist/extensions/Blocks/Recommendation/block.js +27 -0
- package/dist/extensions/Blocks/Recommendation/control.js +277 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +10 -0
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +51 -0
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +19 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +32 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
- package/dist/extensions/Blocks/Recommendation/template.js +200 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +28 -0
- package/dist/extensions/Blocks/common-control.js +102 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +83 -72
- package/dist/services/recommendationApi.js +43 -0
- package/dist/src/@types/generic.d.ts +13 -0
- package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +19 -0
- package/dist/src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +2 -0
- package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +2 -0
- package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +16 -0
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useBlocksConfig.d.ts +11 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +555 -0
- package/dist/src/extensions/Blocks/Recommendation/template.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +7 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +66 -0
- package/dist/src/mock/api/recommendation.d.ts +2 -0
- package/dist/src/services/recommendationApi.d.ts +6 -0
- package/dist/src/stores/config.d.ts +6 -0
- package/dist/src/stores/editor.d.ts +21 -0
- package/dist/src/utils/genericUtil.d.ts +1 -0
- package/dist/stores/editor.js +2 -1
- package/dist/utils/genericUtil.js +8 -7
- package/package.json +2 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return e("div", { staticClass: "d-f" }, [(
|
|
1
|
+
import a from "./RightSlot.vue2.js";
|
|
2
|
+
import l from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var r = function() {
|
|
4
|
+
var o, i, n;
|
|
5
|
+
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "d-f" }, [(o = t.config.features) != null && o.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : s._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : s._e(), (n = t.config.features) != null && n.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }) : s._e(), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(_) {
|
|
7
7
|
return t.handleSave(!1);
|
|
8
8
|
} } })], 1);
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
l,
|
|
9
|
+
}, u = [], d = /* @__PURE__ */ l(
|
|
10
|
+
a,
|
|
12
11
|
r,
|
|
12
|
+
u,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
15
|
null
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const f = d.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
f as default
|
|
20
20
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
"amp-accordion": "ampAccordionEnabled",
|
|
3
|
+
"amp-carousel": "ampCarouselEnabled",
|
|
4
|
+
"amp-form-controls": "ampFormControlsEnabled",
|
|
5
|
+
"banner-block": "bannerEnabled",
|
|
6
|
+
"button-block": "buttonEnabled",
|
|
7
|
+
"html-block": "htmlEnabled",
|
|
8
|
+
"image-block": "imageEnabled",
|
|
9
|
+
"menu-block": "menuEnabled",
|
|
10
|
+
"social-block": "socialNetEnabled",
|
|
11
|
+
"spacer-block": "spacerEnabled",
|
|
12
|
+
"text-block": "textEnabled",
|
|
13
|
+
"timer-block": "timerEnabled",
|
|
14
|
+
"video-block": "videoEnabled"
|
|
15
|
+
}, c = {
|
|
16
|
+
"dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
|
|
17
|
+
"checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
|
|
18
|
+
"radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
|
|
19
|
+
"recommendation-block": () => import("../extensions/Blocks/Recommendation/extension.js"),
|
|
20
|
+
"unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
|
|
21
|
+
"coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
|
|
22
|
+
"items-block": null
|
|
23
|
+
// TODO: Add ItemsBlock extension when available
|
|
24
|
+
}, a = (n) => {
|
|
25
|
+
if (!n || !n.length)
|
|
26
|
+
return {};
|
|
27
|
+
const o = {};
|
|
28
|
+
return n.forEach((e) => {
|
|
29
|
+
const t = l[e];
|
|
30
|
+
t && (o[t] = !1);
|
|
31
|
+
}), o;
|
|
32
|
+
}, r = async (n) => !n || !n.length ? [] : (await Promise.all(
|
|
33
|
+
n.map(async (e) => {
|
|
34
|
+
const t = c[e];
|
|
35
|
+
return t ? (await t()).default : null;
|
|
36
|
+
})
|
|
37
|
+
)).filter((e) => e !== null), s = () => ({
|
|
38
|
+
getStripoBlocksConfig: async () => {
|
|
39
|
+
var e;
|
|
40
|
+
const o = (e = window.GuidoConfig) == null ? void 0 : e.blocks;
|
|
41
|
+
return {
|
|
42
|
+
baseBlocks: a(o == null ? void 0 : o.excludeDefaults),
|
|
43
|
+
extensions: await r(o == null ? void 0 : o.includeCustoms)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
s as useBlocksConfig
|
|
49
|
+
};
|
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useStripoApi as k } from "../services/stripoApi.js";
|
|
12
|
-
import B from "../static/styles/customEditorStyle.css.js";
|
|
13
|
-
import { useEditorStore as F } from "../stores/editor.js";
|
|
14
|
-
import { dynamicContentToMergeTags as x } from "../utils/genericUtil.js";
|
|
1
|
+
import { useActionsApi as y } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as E } from "./useBlocksConfig.js";
|
|
3
|
+
import { useCustomInterfaceAppearance as w } from "./useCustomInterfaceAppearance.js";
|
|
4
|
+
import { useStripoEventHandler as h } from "./useStripoEventHandler.js";
|
|
5
|
+
import { useToaster as b } from "./useToaster.js";
|
|
6
|
+
import { displayConditions as k } from "../enums/displayConditions.js";
|
|
7
|
+
import { useStripoApi as B } from "../services/stripoApi.js";
|
|
8
|
+
import V from "../static/styles/customEditorStyle.css.js";
|
|
9
|
+
import { useEditorStore as _ } from "../stores/editor.js";
|
|
10
|
+
import { dynamicContentToMergeTags as F } from "../utils/genericUtil.js";
|
|
15
11
|
import A from "../package.json.js";
|
|
16
|
-
const
|
|
17
|
-
const { handleError:
|
|
18
|
-
const t =
|
|
12
|
+
const L = (d) => {
|
|
13
|
+
const { handleError: u } = b(), { getToken: p, getCustomFonts: m } = B(), { handleEvent: g } = h(), { getStripoBlocksConfig: f } = E(), S = async (r, i = []) => {
|
|
14
|
+
const t = _(), { html: n, css: l, forceRecreate: a } = r, { baseBlocks: e, extensions: c } = await f();
|
|
19
15
|
window.UIEditor.initEditor(
|
|
20
16
|
document.querySelector("#guido-editor"),
|
|
21
17
|
{
|
|
22
|
-
metadata:
|
|
18
|
+
metadata: d,
|
|
23
19
|
html: n,
|
|
24
|
-
css:
|
|
25
|
-
forceRecreate:
|
|
20
|
+
css: l,
|
|
21
|
+
forceRecreate: a,
|
|
26
22
|
locale: "en",
|
|
27
23
|
undoButtonSelector: "#guido__undo-button",
|
|
28
24
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -32,13 +28,14 @@ const N = (a) => {
|
|
|
32
28
|
customAppearanceMergetags: !0,
|
|
33
29
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
34
30
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
35
|
-
customViewStyles:
|
|
31
|
+
customViewStyles: V,
|
|
36
32
|
conditionsEnabled: !0,
|
|
37
33
|
customConditionsEnabled: !0,
|
|
38
|
-
conditionCategories:
|
|
34
|
+
conditionCategories: k,
|
|
39
35
|
enableXSSSecurity: !0,
|
|
40
36
|
messageSettingsEnabled: !1,
|
|
41
37
|
selectBlockAfterDropFromSettingsPanel: !0,
|
|
38
|
+
...e ? { baseBlocks: e } : {},
|
|
42
39
|
editorFonts: {
|
|
43
40
|
showDefaultStandardFonts: !0,
|
|
44
41
|
showDefaultNotStandardFonts: !0,
|
|
@@ -46,25 +43,25 @@ const N = (a) => {
|
|
|
46
43
|
},
|
|
47
44
|
mergeTags: [
|
|
48
45
|
{
|
|
49
|
-
entries:
|
|
46
|
+
entries: F(d.preselectedDynamicContentList)
|
|
50
47
|
}
|
|
51
48
|
],
|
|
52
49
|
async onTokenRefreshRequest(o) {
|
|
53
50
|
try {
|
|
54
|
-
const
|
|
55
|
-
o(
|
|
56
|
-
} catch (
|
|
57
|
-
|
|
51
|
+
const s = await p();
|
|
52
|
+
o(s);
|
|
53
|
+
} catch (s) {
|
|
54
|
+
u(s, "Failed to refresh token");
|
|
58
55
|
}
|
|
59
56
|
},
|
|
60
57
|
onTemplateLoaded() {
|
|
61
58
|
try {
|
|
62
|
-
const { importCss: o } =
|
|
63
|
-
o(),
|
|
59
|
+
const { importCss: o } = w(), { activateCustomViewStyles: s } = y();
|
|
60
|
+
o(), s(), d.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
|
|
64
61
|
t.hasChanges = !1;
|
|
65
62
|
}, 1e3);
|
|
66
63
|
} catch (o) {
|
|
67
|
-
|
|
64
|
+
u(o, "Failed to load custom interface appearance");
|
|
68
65
|
}
|
|
69
66
|
},
|
|
70
67
|
onCodeEditorVisibilityChanged(o) {
|
|
@@ -79,41 +76,35 @@ const N = (a) => {
|
|
|
79
76
|
onDataChanged() {
|
|
80
77
|
t.hasChanges = !0;
|
|
81
78
|
},
|
|
82
|
-
onEvent:
|
|
79
|
+
onEvent: g,
|
|
83
80
|
ignoreClickOutsideSelectors: [
|
|
84
81
|
"#guido-dynamic-content-modal",
|
|
85
82
|
".in-on-board-wrapper",
|
|
86
83
|
".in-drawer__container"
|
|
87
84
|
],
|
|
88
|
-
extensions:
|
|
89
|
-
_,
|
|
90
|
-
h,
|
|
91
|
-
b,
|
|
92
|
-
V,
|
|
93
|
-
w
|
|
94
|
-
]
|
|
85
|
+
extensions: c
|
|
95
86
|
}
|
|
96
87
|
);
|
|
97
|
-
},
|
|
98
|
-
var
|
|
88
|
+
}, C = (r) => new Promise((i, t) => {
|
|
89
|
+
var c;
|
|
99
90
|
if (document.getElementById("UiEditorScript")) {
|
|
100
91
|
r(), i();
|
|
101
92
|
return;
|
|
102
93
|
}
|
|
103
|
-
const n = A.guido,
|
|
104
|
-
|
|
94
|
+
const n = A.guido, a = `https://email-static.useinsider.com/guido/${(c = n == null ? void 0 : n.stripo) == null ? void 0 : c.version}/UIEditor.js`, e = document.createElement("script");
|
|
95
|
+
e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
|
|
105
96
|
r(), i();
|
|
106
|
-
},
|
|
107
|
-
t(new Error(`Failed to load Stripo UIEditor script from S3: ${
|
|
108
|
-
}, document.body.appendChild(
|
|
97
|
+
}, e.onerror = () => {
|
|
98
|
+
t(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
99
|
+
}, document.body.appendChild(e);
|
|
109
100
|
});
|
|
110
101
|
return { initPlugin: async (r) => {
|
|
111
|
-
await
|
|
102
|
+
await C(async () => {
|
|
112
103
|
const i = await m();
|
|
113
|
-
|
|
104
|
+
await S(r, i);
|
|
114
105
|
});
|
|
115
106
|
} };
|
|
116
107
|
};
|
|
117
108
|
export {
|
|
118
|
-
|
|
109
|
+
L as useStripo
|
|
119
110
|
};
|
package/dist/enums/defaults.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = {
|
|
2
2
|
translationsPath: "window.trans.en",
|
|
3
3
|
emailHeader: {
|
|
4
4
|
senderName: "",
|
|
@@ -7,18 +7,24 @@ const a = {
|
|
|
7
7
|
extensions: {
|
|
8
8
|
unsubscribe: !0
|
|
9
9
|
},
|
|
10
|
+
blocks: {
|
|
11
|
+
excludeDefaults: [],
|
|
12
|
+
includeCustoms: []
|
|
13
|
+
},
|
|
10
14
|
features: {
|
|
11
15
|
dynamicContent: !0,
|
|
12
16
|
saveAsTemplate: !0,
|
|
13
|
-
versionHistory: !0
|
|
17
|
+
versionHistory: !0,
|
|
18
|
+
testMessage: !0
|
|
14
19
|
},
|
|
15
20
|
useHeader: !0
|
|
16
21
|
}, t = {
|
|
17
22
|
promotional: 1,
|
|
18
23
|
transactional: 2
|
|
19
|
-
},
|
|
24
|
+
}, a = "email", o = "Guido User", s = t.promotional, n = 2, i = {
|
|
20
25
|
email: 60,
|
|
21
|
-
architect: 49
|
|
26
|
+
architect: 49,
|
|
27
|
+
unsubscribePages: 97
|
|
22
28
|
}, u = [
|
|
23
29
|
"alfredtesting",
|
|
24
30
|
"electio",
|
|
@@ -52,11 +58,11 @@ const a = {
|
|
|
52
58
|
"stripoeditorlivetest"
|
|
53
59
|
];
|
|
54
60
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
e as DefaultGuidoConfig,
|
|
62
|
+
s as DefaultMessageType,
|
|
63
|
+
a as DefaultProductType,
|
|
58
64
|
o as DefaultUsername,
|
|
59
|
-
|
|
65
|
+
n as EditorType,
|
|
60
66
|
i as ProductIds,
|
|
61
67
|
u as TEST_PARTNER_LIST,
|
|
62
68
|
t as TemplateTypes
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
};
|
|
@@ -3,7 +3,7 @@ import { CheckboxBlock as t } from "./block.js";
|
|
|
3
3
|
import { CheckboxControl as e } from "./control.js";
|
|
4
4
|
import { CheckboxIconsRegistry as r } from "./iconsRegistry.js";
|
|
5
5
|
import { CheckboxBlockSettings as i } from "./settingsPanel.js";
|
|
6
|
-
const
|
|
6
|
+
const d = new o().addBlock(t).withSettingsPanelRegistry(i).addControl(e).withIconsRegistry(r).build();
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
d as default
|
|
9
9
|
};
|
|
@@ -2,7 +2,7 @@ import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-edito
|
|
|
2
2
|
import { CouponBlock as t } from "./block.js";
|
|
3
3
|
import { CouponIconsRegistry as i } from "./iconsRegistry.js";
|
|
4
4
|
import { CouponBlockSettings as n } from "./settingsPanel.js";
|
|
5
|
-
const
|
|
5
|
+
const p = new o().addBlock(t).withSettingsPanelRegistry(n).withIconsRegistry(i).build();
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
p as default
|
|
8
8
|
};
|
|
@@ -12,12 +12,12 @@ const e = {
|
|
|
12
12
|
<td align="left" width="70%" style="vertical-align: top;">
|
|
13
13
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
|
14
14
|
<tbody>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
<${t.BLOCK_TEXT}>
|
|
16
|
+
{-{-TITLE-}-}
|
|
17
|
+
</${t.BLOCK_TEXT}>
|
|
18
|
+
<${t.BLOCK_TEXT}>
|
|
19
|
+
{-{-DESCRIPTION-}-}
|
|
20
|
+
</${t.BLOCK_TEXT}>
|
|
21
21
|
</tbody>
|
|
22
22
|
</table>
|
|
23
23
|
</td>
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
};
|