@useinsider/guido 2.1.0-beta.e2d48fe → 2.1.0-beta.e4c3fa1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/@types/config/schemas.js +70 -65
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +69 -58
- package/dist/components/organisms/base/Toaster.vue.js +4 -4
- package/dist/components/organisms/base/Toaster.vue2.js +12 -9
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +5 -5
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +15 -14
- package/dist/components/organisms/header/HeaderWrapper.vue.js +9 -9
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
- package/dist/composables/useActionsApi.js +15 -13
- package/dist/composables/useBlocksConfig.js +26 -16
- package/dist/composables/useHtmlValidator.js +114 -104
- package/dist/composables/useRecommendation.js +54 -21
- package/dist/composables/useStripo.js +25 -23
- package/dist/composables/useVersionHistoryApi.js +1 -1
- package/dist/config/compiler/recommendationCompilerRules.js +45 -39
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +121 -0
- package/dist/config/i18n/en/index.js +11 -0
- package/dist/config/i18n/en/labels.json.js +7 -0
- package/dist/config/i18n/en/toasters.json.js +56 -0
- package/dist/config/i18n/en/tooltips.json.js +82 -0
- package/dist/config/i18n/index.js +7 -0
- package/dist/config/migrator/itemsBlockMigrator.js +127 -122
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/enums/defaults.js +8 -4
- package/dist/enums/extensions/recommendationBlock.js +1 -1
- package/dist/enums/recommendation.js +16 -15
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +29 -29
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +29 -29
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +31 -29
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +0 -1
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +29 -27
- package/dist/extensions/Blocks/Items/settingsPanel.js +10 -15
- package/dist/extensions/Blocks/Recommendation/block.js +133 -9
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +69 -0
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +24 -0
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +22 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +80 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +232 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +102 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +102 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +207 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +52 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +321 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +70 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +168 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +67 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +361 -0
- package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +108 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextAfterControl.js → omnibusDiscount/textAfter.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextBeforeControl.js → omnibusDiscount/textBefore.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextAfterControl.js → omnibusPrice/textAfter.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextBeforeControl.js → omnibusPrice/textBefore.js} +14 -12
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +345 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +40 -17
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +19 -3
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +13 -4
- package/dist/extensions/Blocks/Recommendation/services/configService.js +240 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +21 -10
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +297 -209
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +228 -0
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +251 -0
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +66 -0
- package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +169 -0
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +73 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +134 -0
- package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +6 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +26 -15
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +29 -0
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +46 -0
- package/dist/extensions/Blocks/Unsubscribe/block.js +29 -29
- package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
- package/dist/extensions/Blocks/controlFactories.js +125 -93
- 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 +317 -193
- package/dist/services/recommendationApi.js +11 -8
- package/dist/services/stripoApi.js +20 -17
- package/dist/services/templateLibraryApi.js +16 -13
- package/dist/src/@types/config/schemas.d.ts +8 -0
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useRecommendation.d.ts +1 -0
- package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +17 -0
- package/dist/src/config/i18n/en/index.d.ts +1 -0
- package/dist/src/config/i18n/index.d.ts +16 -0
- package/dist/src/enums/defaults.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +67 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +0 -24
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +55 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +45 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +40 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +31 -0
- package/dist/src/extensions/Blocks/Recommendation/{cardCompositionControl.d.ts → controls/cardComposition/index.d.ts} +23 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +21 -589
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +37 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +52 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +22 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +102 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +24 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +60 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +23 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +231 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +115 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +151 -0
- package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +139 -468
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +20 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → grid/migration.d.ts} +11 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +41 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +18 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +66 -0
- package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +174 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +113 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +77 -0
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
- package/dist/src/extensions/ModulesTabIcons/extension.d.ts +2 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/dist/static/styles/components/notification.css.js +19 -0
- package/dist/static/styles/components/tools.css.js +6 -2
- package/dist/static/styles/components/version-history.css.js +10 -2
- package/dist/static/styles/components/wide-panel.css.js +18 -2
- package/dist/static/styles/customEditorStyle.css.js +35 -11
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/static/templates/empty/index.html.js +74 -0
- package/dist/static/templates/empty/style.css.js +779 -0
- package/dist/stores/unsubscribe.js +37 -34
- package/dist/utils/pairProductVariables.js +57 -56
- package/dist/utils/templatePreparation.js +15 -14
- package/package.json +1 -1
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -187
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -13
- package/dist/extensions/Blocks/Recommendation/control.js +0 -336
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -181
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -189
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -209
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -38
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -52
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useHttp as c } from "../composables/useHttp.js";
|
|
2
|
-
import { URLS as
|
|
3
|
-
const
|
|
2
|
+
import { URLS as m } from "../enums/extensions/recommendationBlock.js";
|
|
3
|
+
const f = () => {
|
|
4
4
|
const { get: o } = c();
|
|
5
5
|
return {
|
|
6
6
|
fetchRecommendationCreateData: async () => {
|
|
@@ -18,14 +18,17 @@ const R = () => {
|
|
|
18
18
|
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
fetchRecommendationProducts: async (e,
|
|
21
|
+
fetchRecommendationProducts: async (e, a) => {
|
|
22
|
+
var n;
|
|
22
23
|
try {
|
|
23
|
-
const t = decodeURIComponent(new URLSearchParams(Object.entries(
|
|
24
|
+
const t = decodeURIComponent(new URLSearchParams(Object.entries(a)).toString());
|
|
24
25
|
console.debug("🏁 Recommendation API Query:", t);
|
|
25
|
-
const
|
|
26
|
-
|
|
26
|
+
const { get: s } = c({
|
|
27
|
+
headers: {}
|
|
28
|
+
}), r = await s(
|
|
29
|
+
`${m.RECOMMENDATION_API_URL}/v2/${e}?${t}`
|
|
27
30
|
);
|
|
28
|
-
return (r == null ? void 0 : r.data) ?? [];
|
|
31
|
+
return ((n = r == null ? void 0 : r.data) == null ? void 0 : n.data) ?? [];
|
|
29
32
|
} catch (t) {
|
|
30
33
|
throw console.error("fetchRecommendationProducts error:", t), t;
|
|
31
34
|
}
|
|
@@ -33,5 +36,5 @@ const R = () => {
|
|
|
33
36
|
};
|
|
34
37
|
};
|
|
35
38
|
export {
|
|
36
|
-
|
|
39
|
+
f as useRecommendationApi
|
|
37
40
|
};
|
|
@@ -1,44 +1,47 @@
|
|
|
1
|
-
import { useHttp as
|
|
2
|
-
import { useToaster as
|
|
3
|
-
import { MAX_DEFAULT_TEMPLATE_ID as
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { useHttp as l } from "../composables/useHttp.js";
|
|
2
|
+
import { useToaster as u } from "../composables/useToaster.js";
|
|
3
|
+
import { MAX_DEFAULT_TEMPLATE_ID as d } from "../enums/defaults.js";
|
|
4
|
+
import f from "../static/templates/empty/index.html.js";
|
|
5
|
+
import g from "../static/templates/empty/style.css.js";
|
|
6
|
+
const D = () => {
|
|
7
|
+
const { get: o } = l(), { handleError: a } = u();
|
|
6
8
|
return {
|
|
7
9
|
getToken: async () => {
|
|
8
10
|
try {
|
|
9
|
-
const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await
|
|
11
|
+
const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await o(`/stripo/get-user-token?test=${t}`);
|
|
10
12
|
return e.body.token;
|
|
11
13
|
} catch (t) {
|
|
12
|
-
return
|
|
14
|
+
return a(t, "Failed to fetch token"), "";
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
getCustomFonts: async () => {
|
|
16
18
|
try {
|
|
17
|
-
const { data: t = [] } = await
|
|
19
|
+
const { data: t = [] } = await o("/stripo/get-partner-custom-fonts");
|
|
18
20
|
return t.map((e) => ({
|
|
19
21
|
...e,
|
|
20
22
|
active: !0
|
|
21
23
|
}));
|
|
22
24
|
} catch (t) {
|
|
23
|
-
return
|
|
25
|
+
return a(t, "Failed to fetch custom fonts"), [];
|
|
24
26
|
}
|
|
25
27
|
},
|
|
26
28
|
getDefaultTemplate: async () => {
|
|
27
29
|
const t = {
|
|
28
|
-
html:
|
|
29
|
-
css:
|
|
30
|
+
html: f,
|
|
31
|
+
css: g
|
|
30
32
|
};
|
|
31
33
|
try {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const e = new URLSearchParams(window.location.search), c = e.get("default-template"), p = e.get("master"), s = c ? parseInt(c) : 0, m = s >= 1 && s <= d ? s : 0;
|
|
35
|
+
if (!m && !p)
|
|
36
|
+
return t;
|
|
37
|
+
const i = `/stripo/default-template/${m}`, { data: n } = await o(i), r = typeof n == "string" ? JSON.parse(n) : n;
|
|
38
|
+
return !r || typeof r != "object" || !("html" in r) || !("css" in r) ? t : r;
|
|
36
39
|
} catch (e) {
|
|
37
|
-
return
|
|
40
|
+
return a(e, "Failed to fetch default template"), t;
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
};
|
|
41
44
|
};
|
|
42
45
|
export {
|
|
43
|
-
|
|
46
|
+
D as useStripoApi
|
|
44
47
|
};
|
|
@@ -3,29 +3,30 @@ import { useHttp as f } from "../composables/useHttp.js";
|
|
|
3
3
|
import { useToaster as w } from "../composables/useToaster.js";
|
|
4
4
|
import { useTranslations as b } from "../composables/useTranslations.js";
|
|
5
5
|
import { EditorType as h } from "../enums/defaults.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useRecommendationExtensionStore as C } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
7
|
+
import { useSaveAsTemplateStore as v } from "../stores/save-as-template.js";
|
|
7
8
|
import { base64EncodeWithSpecialChars as a } from "../utils/base64.js";
|
|
8
|
-
import { useTemplatePreparation as
|
|
9
|
-
const
|
|
10
|
-
const { get:
|
|
9
|
+
import { useTemplatePreparation as S } from "../utils/templatePreparation.js";
|
|
10
|
+
const R = () => {
|
|
11
|
+
const { get: n, post: c } = f(), { handleError: o, showToaster: i } = w(), { config: l } = T(), p = b();
|
|
11
12
|
return {
|
|
12
13
|
getCategories: async () => {
|
|
13
14
|
try {
|
|
14
|
-
const { data: e = [] } = await
|
|
15
|
+
const { data: e = [] } = await n("/newsletter/template-library/get-template-categories");
|
|
15
16
|
return e;
|
|
16
17
|
} catch (e) {
|
|
17
18
|
return o(e, "Failed to fetch template categories"), [];
|
|
18
19
|
}
|
|
19
20
|
},
|
|
20
21
|
checkTemplateNameAvailability: async (e) => {
|
|
21
|
-
const { data: { status: t = !1 } } = await
|
|
22
|
+
const { data: { status: t = !1 } } = await n(
|
|
22
23
|
`/newsletter/template-library/template-name-exists?name=${e}`
|
|
23
24
|
);
|
|
24
25
|
return !t;
|
|
25
26
|
},
|
|
26
27
|
createCategory: async (e) => {
|
|
27
28
|
try {
|
|
28
|
-
const { data: { id: t } } = await
|
|
29
|
+
const { data: { id: t } } = await c(
|
|
29
30
|
"/newsletter/template-library/create-category",
|
|
30
31
|
{ name: e }
|
|
31
32
|
);
|
|
@@ -37,7 +38,7 @@ const L = () => {
|
|
|
37
38
|
createTemplate: async () => {
|
|
38
39
|
var e, t, g, y;
|
|
39
40
|
try {
|
|
40
|
-
const { prepareTemplateDetails:
|
|
41
|
+
const { prepareTemplateDetails: m } = S(), r = v(), s = await m(), u = {
|
|
41
42
|
name: r.getTemplateName,
|
|
42
43
|
categories: r.getSelectedCategoryIds,
|
|
43
44
|
productId: ((t = (e = l.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
|
|
@@ -47,7 +48,9 @@ const L = () => {
|
|
|
47
48
|
css: a(s.css),
|
|
48
49
|
unsubscriptionPreferencePageStatus: !1,
|
|
49
50
|
unsubscriptionPreferencePages: [],
|
|
50
|
-
recommendationCampaignUrls: a(
|
|
51
|
+
recommendationCampaignUrls: a(
|
|
52
|
+
C().recommendationCampaignUrls
|
|
53
|
+
),
|
|
51
54
|
recommendationConfigs: a({}),
|
|
52
55
|
isGuido: !0,
|
|
53
56
|
stripoConfig: a({
|
|
@@ -55,7 +58,7 @@ const L = () => {
|
|
|
55
58
|
html: s.rawHtml,
|
|
56
59
|
css: s.css
|
|
57
60
|
})
|
|
58
|
-
}, { data: { type: d } } = await
|
|
61
|
+
}, { data: { type: d } } = await c(
|
|
59
62
|
"/newsletter/template-library/create-template",
|
|
60
63
|
u
|
|
61
64
|
);
|
|
@@ -76,12 +79,12 @@ const L = () => {
|
|
|
76
79
|
),
|
|
77
80
|
type: "success"
|
|
78
81
|
});
|
|
79
|
-
} catch (
|
|
80
|
-
o(
|
|
82
|
+
} catch (m) {
|
|
83
|
+
o(m, "Failed to create template");
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
};
|
|
84
87
|
};
|
|
85
88
|
export {
|
|
86
|
-
|
|
89
|
+
R as useTemplateLibraryApi
|
|
87
90
|
};
|
|
@@ -129,6 +129,10 @@ export declare const EditorSchema: v.ObjectSchema<{
|
|
|
129
129
|
readonly senderName: "";
|
|
130
130
|
readonly subject: "";
|
|
131
131
|
}>;
|
|
132
|
+
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
133
|
+
readonly savedModulesFolderName: v.OptionalSchema<v.StringSchema<undefined>, "savedModules">;
|
|
134
|
+
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
135
|
+
readonly defaultModulesFolderName: v.OptionalSchema<v.StringSchema<undefined>, "defaultModules">;
|
|
132
136
|
}, undefined>;
|
|
133
137
|
/**
|
|
134
138
|
* UI configuration - visual elements and layout
|
|
@@ -441,6 +445,10 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
441
445
|
readonly senderName: "";
|
|
442
446
|
readonly subject: "";
|
|
443
447
|
}>;
|
|
448
|
+
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
449
|
+
readonly savedModulesFolderName: v.OptionalSchema<v.StringSchema<undefined>, "savedModules">;
|
|
450
|
+
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
451
|
+
readonly defaultModulesFolderName: v.OptionalSchema<v.StringSchema<undefined>, "defaultModules">;
|
|
444
452
|
}, undefined>, {}>;
|
|
445
453
|
/** UI configuration */
|
|
446
454
|
readonly ui: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -33,8 +33,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
33
33
|
descriptionStatus: boolean;
|
|
34
34
|
descriptionText: string;
|
|
35
35
|
}>>>, {
|
|
36
|
-
className: string;
|
|
37
36
|
size: "small" | "medium" | "large";
|
|
37
|
+
className: string;
|
|
38
38
|
closeOnOutsideClick: boolean;
|
|
39
39
|
descriptionStatus: boolean;
|
|
40
40
|
descriptionText: string;
|
|
@@ -41,6 +41,8 @@ export declare const useConfig: () => {
|
|
|
41
41
|
senderName: string;
|
|
42
42
|
subject: string;
|
|
43
43
|
};
|
|
44
|
+
savedModulesFolderName: string;
|
|
45
|
+
defaultModulesFolderName: string;
|
|
44
46
|
};
|
|
45
47
|
ui: {
|
|
46
48
|
showHeader: boolean;
|
|
@@ -130,6 +132,8 @@ export declare const useConfig: () => {
|
|
|
130
132
|
senderName: string;
|
|
131
133
|
subject: string;
|
|
132
134
|
};
|
|
135
|
+
savedModulesFolderName: string;
|
|
136
|
+
defaultModulesFolderName: string;
|
|
133
137
|
} | null>;
|
|
134
138
|
ui: import("vue").ComputedRef<{
|
|
135
139
|
showHeader: boolean;
|
|
@@ -15,5 +15,6 @@ interface CampaignData extends CardWidthParams {
|
|
|
15
15
|
export declare const useRecommendation: () => {
|
|
16
16
|
calculateCardWidth: ({ mobileLeftPadding, mobileRightPadding, cardsInRow, unresponsive, }: CardWidthParams) => number;
|
|
17
17
|
getRecommendationCampaignData: (id: string) => CampaignData;
|
|
18
|
+
buildCampaignUrl: (campaignId: string) => string;
|
|
18
19
|
};
|
|
19
20
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a price template variable with the correct currency alignment.
|
|
3
|
+
* @param campaignId - The recommendation block campaign ID
|
|
4
|
+
* @param productIndex - Zero-based product index
|
|
5
|
+
* @param attribute - Price attribute name (e.g., 'price', 'original_price')
|
|
6
|
+
* @param alignment - Currency alignment from block config: 'before' or 'after'
|
|
7
|
+
* @returns Formatted price string with currency variable in correct position
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatPriceVariable(campaignId: string, productIndex: number, attribute: string, alignment: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Transforms recommendation block HTML by replacing product data with
|
|
12
|
+
* template variables.
|
|
13
|
+
* Preserves the full document structure (DOCTYPE, html, head, body).
|
|
14
|
+
* @param html - The raw template HTML
|
|
15
|
+
* @returns HTML with template variables replacing product data
|
|
16
|
+
*/
|
|
17
|
+
export declare function prepareRecommendationBlocks(html: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const en: Record<string, string>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stripo Editor Translation Overrides
|
|
3
|
+
*
|
|
4
|
+
* Custom translations for Stripo editor UI elements.
|
|
5
|
+
* Each language has its own folder with categorized JSON files.
|
|
6
|
+
*
|
|
7
|
+
* Reference: https://email-static.useinsider.com/guido/{version}/assets/i18n/en.json
|
|
8
|
+
* @module config/i18n
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Combined locale patch for Stripo editor initialization.
|
|
12
|
+
* Maps language codes to their translation overrides.
|
|
13
|
+
*/
|
|
14
|
+
export declare const localePatch: {
|
|
15
|
+
en: Record<string, string>;
|
|
16
|
+
};
|
|
@@ -9,3 +9,7 @@ export declare const TemplateTypes: {
|
|
|
9
9
|
export declare const EditorType: number;
|
|
10
10
|
export declare const MAX_DEFAULT_TEMPLATE_ID = 13;
|
|
11
11
|
export declare const ProductIds: Record<string, number>;
|
|
12
|
+
export declare const ModuleFolderDefaults: {
|
|
13
|
+
readonly SAVED_MODULES: "savedModules";
|
|
14
|
+
readonly DEFAULT_MODULES: "defaultModules";
|
|
15
|
+
};
|
|
@@ -1,11 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recommendation Block
|
|
3
|
+
*
|
|
4
|
+
* Main block class for the Recommendation extension.
|
|
5
|
+
* Handles block lifecycle including configuration initialization and migration.
|
|
6
|
+
* Supports multiple block instances with unique recommendation-id attributes.
|
|
7
|
+
*/
|
|
8
|
+
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
1
9
|
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
2
10
|
export declare const BLOCK_ID = "recommendation-block";
|
|
3
11
|
export declare class RecommendationBlock extends Block {
|
|
12
|
+
/**
|
|
13
|
+
* Stores the ID generated in getTemplate() so onCreated() can reuse it.
|
|
14
|
+
* This avoids generating a new (different) ID in onCreated().
|
|
15
|
+
*/
|
|
16
|
+
private _pendingBlockId;
|
|
4
17
|
constructor();
|
|
5
18
|
getId(): string;
|
|
6
19
|
getIcon(): string;
|
|
7
20
|
getBlockCompositionType(): BlockCompositionType;
|
|
8
21
|
getName(): string;
|
|
9
22
|
getDescription(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the template HTML for a new recommendation block.
|
|
25
|
+
* Generates a unique recommendation ID and embeds the instance class
|
|
26
|
+
* (ins-recommendation-v3-block-{id}) directly in the template HTML.
|
|
27
|
+
* This is necessary because Stripo's Angular rendering manages the class
|
|
28
|
+
* attribute and overwrites dynamically added classes via setAttribute.
|
|
29
|
+
*/
|
|
10
30
|
getTemplate(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Called when a new block is dropped into the template
|
|
33
|
+
*
|
|
34
|
+
* Uses the ID from getTemplate() (which already embedded the instance class)
|
|
35
|
+
* and assigns the recommendation-id attribute + initializes configuration.
|
|
36
|
+
* @param node - The newly created block node
|
|
37
|
+
*/
|
|
38
|
+
onCreated(node: ImmutableHtmlNode): void;
|
|
39
|
+
/**
|
|
40
|
+
* Called when the document changes or template is loaded
|
|
41
|
+
*
|
|
42
|
+
* Handles migration from legacy templates that don't have node config
|
|
43
|
+
* and assigns recommendation-id to legacy blocks that lack one.
|
|
44
|
+
* @param node - The block node that may need migration
|
|
45
|
+
*/
|
|
46
|
+
onDocumentChanged(node: ImmutableHtmlNode): void;
|
|
47
|
+
/**
|
|
48
|
+
* Called when a block is deleted from the template
|
|
49
|
+
*
|
|
50
|
+
* Cleans up the per-block state from the Pinia store.
|
|
51
|
+
* @param node - The block node being deleted
|
|
52
|
+
*/
|
|
53
|
+
onDelete(node: ImmutableHtmlNode): void;
|
|
54
|
+
/**
|
|
55
|
+
* Generates the next unique recommendation ID by scanning all existing blocks
|
|
56
|
+
* in the document and finding the maximum existing ID + 1.
|
|
57
|
+
*/
|
|
58
|
+
private _generateNextId;
|
|
59
|
+
/**
|
|
60
|
+
* Assigns a recommendation-id attribute to the block element.
|
|
61
|
+
* The instance class (ins-recommendation-v3-block-{id}) is embedded in the template
|
|
62
|
+
* HTML by getTemplate(), since Stripo's Angular rendering overwrites dynamically
|
|
63
|
+
* added classes via setAttribute.
|
|
64
|
+
*/
|
|
65
|
+
private _assignRecommendationId;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the recommendation-id from a block node
|
|
68
|
+
*/
|
|
69
|
+
private _getRecommendationId;
|
|
70
|
+
/**
|
|
71
|
+
* Gets the block element (the element with BLOCK_CLASS)
|
|
72
|
+
*/
|
|
73
|
+
private _getBlockElement;
|
|
74
|
+
/**
|
|
75
|
+
* Migrate configuration from legacy format
|
|
76
|
+
*/
|
|
77
|
+
private _migrateFromLegacy;
|
|
11
78
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Block IDs used in the Recommendation Extension
|
|
3
|
+
* These IDs are used in the esd-extension-block-id attribute to identify specific blocks
|
|
4
|
+
*/
|
|
5
|
+
export declare enum RecommendationBlockId {
|
|
6
|
+
BUTTON = "recommendation-block-button",
|
|
7
|
+
NAME = "recommendation-block-name",
|
|
8
|
+
PRICE = "recommendation-block-price",
|
|
9
|
+
OLD_PRICE = "recommendation-block-old-price",
|
|
10
|
+
OMNIBUS_PRICE = "recommendation-block-omnibus-price",
|
|
11
|
+
OMNIBUS_DISCOUNT = "recommendation-block-omnibus-discount",
|
|
12
|
+
IMAGE = "recommendation-block-image"
|
|
13
|
+
}
|
package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts}
RENAMED
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Attribute type constants used in templates
|
|
3
|
-
* These are used as keys in ElementRenderer and composition arrays
|
|
4
|
-
*/
|
|
5
|
-
export declare const ATTR_PRODUCT_IMAGE = "productImage";
|
|
6
|
-
export declare const ATTR_PRODUCT_NAME = "productName";
|
|
7
|
-
export declare const ATTR_PRODUCT_PRICE = "productPrice";
|
|
8
|
-
export declare const ATTR_PRODUCT_OLD_PRICE = "productOldPrice";
|
|
9
|
-
export declare const ATTR_PRODUCT_OMNIBUS_PRICE = "productOmnibusPrice";
|
|
10
|
-
export declare const ATTR_PRODUCT_OMNIBUS_DISCOUNT = "productOmnibusDiscount";
|
|
11
|
-
export declare const ATTR_PRODUCT_BUTTON = "productButton";
|
|
12
|
-
/**
|
|
13
|
-
* Block IDs used in the Recommendation Extension
|
|
14
|
-
* These IDs are used in the esd-extension-block-id attribute to identify specific blocks
|
|
15
|
-
*/
|
|
16
|
-
export declare enum RecommendationBlockId {
|
|
17
|
-
BUTTON = "recommendation-block-button",
|
|
18
|
-
NAME = "recommendation-block-name",
|
|
19
|
-
PRICE = "recommendation-block-price",
|
|
20
|
-
OLD_PRICE = "recommendation-block-old-price",
|
|
21
|
-
OMNIBUS_PRICE = "recommendation-block-omnibus-price",
|
|
22
|
-
OMNIBUS_DISCOUNT = "recommendation-block-omnibus-discount",
|
|
23
|
-
IMAGE = "recommendation-block-image"
|
|
24
|
-
}
|
|
25
1
|
/**
|
|
26
2
|
* Control IDs used in the Recommendation Extension
|
|
27
3
|
* These IDs are returned by the getId() method of each control
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Configuration for Recommendation Block
|
|
3
|
+
*
|
|
4
|
+
* This module provides the default values for RecommendationNodeConfig.
|
|
5
|
+
* These values are used when:
|
|
6
|
+
* - A new block is dropped into the template
|
|
7
|
+
* - Migrating legacy templates without stored config
|
|
8
|
+
* - Merging partial updates with existing config
|
|
9
|
+
*/
|
|
10
|
+
import type { RecommendationNodeConfig, CurrencyConfig, OmnibusTextConfig } from '../types/nodeConfig';
|
|
11
|
+
/**
|
|
12
|
+
* Default currency configuration
|
|
13
|
+
* Uses USD as the base currency with standard formatting
|
|
14
|
+
* Note: symbol stores the currency code (e.g., 'USD'), not the symbol character ('$')
|
|
15
|
+
* This matches the Currency Symbol dropdown which shows currency codes
|
|
16
|
+
*/
|
|
17
|
+
export declare const DEFAULT_CURRENCY: CurrencyConfig;
|
|
18
|
+
/**
|
|
19
|
+
* Default omnibus price text configuration
|
|
20
|
+
* Pre-filled with common EU Omnibus Directive text
|
|
21
|
+
*/
|
|
22
|
+
export declare const DEFAULT_OMNIBUS_PRICE: OmnibusTextConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Default omnibus discount text configuration
|
|
25
|
+
*/
|
|
26
|
+
export declare const DEFAULT_OMNIBUS_DISCOUNT: OmnibusTextConfig;
|
|
27
|
+
/**
|
|
28
|
+
* Default card composition order
|
|
29
|
+
* Defines the visual order of elements in product cards
|
|
30
|
+
*/
|
|
31
|
+
export declare const DEFAULT_COMPOSITION: string[];
|
|
32
|
+
/**
|
|
33
|
+
* Default visibility settings for card elements
|
|
34
|
+
* Omnibus elements are hidden by default (not all regions require them)
|
|
35
|
+
*/
|
|
36
|
+
export declare const DEFAULT_VISIBILITY: Record<string, boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Complete default configuration for Recommendation Block
|
|
39
|
+
*
|
|
40
|
+
* This is the single source of truth for default values.
|
|
41
|
+
* All other code should import and use this constant.
|
|
42
|
+
*/
|
|
43
|
+
export declare const DEFAULT_NODE_CONFIG: RecommendationNodeConfig;
|
|
44
|
+
/**
|
|
45
|
+
* Algorithm IDs to exclude from the recommendation algorithm dropdown.
|
|
46
|
+
* These algorithms will not be shown as options regardless of API response.
|
|
47
|
+
* View Together and Purchase Together algorithms are disabled because these require product id.
|
|
48
|
+
*/
|
|
49
|
+
export declare const EXCLUDED_ALGORITHM_IDS: number[];
|
|
50
|
+
/**
|
|
51
|
+
* Current configuration version
|
|
52
|
+
* Increment this when making breaking changes to the schema
|
|
53
|
+
* Used for migration detection
|
|
54
|
+
*/
|
|
55
|
+
export declare const CURRENT_CONFIG_VERSION = 1;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recommendation Extension Constants
|
|
3
|
+
*
|
|
4
|
+
* This module re-exports all constants for the Recommendation extension.
|
|
5
|
+
* Import from this file for cleaner imports.
|
|
6
|
+
* @example
|
|
7
|
+
* import { RecommendationBlockId, CONTAINER_SELECTOR } from './constants';
|
|
8
|
+
*/
|
|
9
|
+
export { RecommendationBlockId } from './blockIds';
|
|
10
|
+
export { RecommendationControlId } from './controlIds';
|
|
11
|
+
export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, } from './selectors';
|
|
12
|
+
export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, DEFAULT_MOBILE_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, MAX_MOBILE_PRODUCTS_PER_ROW, MIN_MOBILE_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, DEFAULT_MOBILE_COLUMN_SPACING, DEFAULT_MOBILE_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
|
|
13
|
+
export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Type-safe layout orientation values */
|
|
2
|
+
export declare const LAYOUT_VALUES: {
|
|
3
|
+
GRID: "grid";
|
|
4
|
+
LIST: "list";
|
|
5
|
+
};
|
|
6
|
+
/** Layout options for radio button UI control */
|
|
7
|
+
export declare const LAYOUT_OPTIONS: ({
|
|
8
|
+
icon: string;
|
|
9
|
+
value: "grid";
|
|
10
|
+
} | {
|
|
11
|
+
icon: string;
|
|
12
|
+
value: "list";
|
|
13
|
+
})[];
|
|
14
|
+
/** Default number of products displayed per row in grid layout */
|
|
15
|
+
export declare const DEFAULT_PRODUCTS_PER_ROW = 3;
|
|
16
|
+
/** Default number of cards in a row (used in store initialization) */
|
|
17
|
+
export declare const DEFAULT_CARDS_IN_ROW = 3;
|
|
18
|
+
/** Maximum number of products that can be displayed */
|
|
19
|
+
export declare const MAX_PRODUCT_COUNT = 9;
|
|
20
|
+
/** Minimum number of products that can be displayed */
|
|
21
|
+
export declare const MIN_PRODUCT_COUNT = 1;
|
|
22
|
+
/** Maximum number of products per row in grid layout */
|
|
23
|
+
export declare const MAX_PRODUCTS_PER_ROW = 4;
|
|
24
|
+
/** Minimum number of products per row in grid layout */
|
|
25
|
+
export declare const MIN_PRODUCTS_PER_ROW = 1;
|
|
26
|
+
/** Default number of products per row on mobile */
|
|
27
|
+
export declare const DEFAULT_MOBILE_CARDS_IN_ROW = 1;
|
|
28
|
+
/** Maximum products per row on mobile */
|
|
29
|
+
export declare const MAX_MOBILE_PRODUCTS_PER_ROW = 2;
|
|
30
|
+
/** Minimum products per row on mobile */
|
|
31
|
+
export declare const MIN_MOBILE_PRODUCTS_PER_ROW = 1;
|
|
32
|
+
/** Default column spacing between product cards (5px on each side = 10px total) */
|
|
33
|
+
export declare const DEFAULT_COLUMN_SPACING = 10;
|
|
34
|
+
/** Default row spacing between product rows (matches spacer height in template) */
|
|
35
|
+
export declare const DEFAULT_ROW_SPACING = 10;
|
|
36
|
+
/** Default mobile column spacing between product cards */
|
|
37
|
+
export declare const DEFAULT_MOBILE_COLUMN_SPACING = 10;
|
|
38
|
+
/** Default mobile row spacing between product rows (matches spacer height in template) */
|
|
39
|
+
export declare const DEFAULT_MOBILE_ROW_SPACING = 10;
|
|
40
|
+
/** Minimum spacing value */
|
|
41
|
+
export declare const MIN_SPACING = 0;
|
|
42
|
+
/** Maximum spacing value */
|
|
43
|
+
export declare const MAX_SPACING = 50;
|
|
44
|
+
/** Spacing adjustment step */
|
|
45
|
+
export declare const SPACING_STEP = 5;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS selectors and data attributes used across the Recommendation extension
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Block root selector — common ancestor of both desktop and mobile containers.
|
|
6
|
+
* Used across attribute controls so edits apply to BOTH containers simultaneously.
|
|
7
|
+
*/
|
|
8
|
+
export declare const BLOCK_ROOT_SELECTOR = ".ins-recommendation-v3-block-v2";
|
|
9
|
+
/**
|
|
10
|
+
* Container selector for the product container element
|
|
11
|
+
* Used in product regeneration logic where container-specific scoping is needed
|
|
12
|
+
*/
|
|
13
|
+
export declare const CONTAINER_SELECTOR = ".ins-recommendation-product-container";
|
|
14
|
+
/** Desktop product container selector */
|
|
15
|
+
export declare const DESKTOP_CONTAINER_SELECTOR = ".ins-recommendation-desktop-container";
|
|
16
|
+
/** Mobile product container selector */
|
|
17
|
+
export declare const MOBILE_CONTAINER_SELECTOR = ".ins-recommendation-mobile-container";
|
|
18
|
+
/**
|
|
19
|
+
* Currency HTML attributes set on the block element
|
|
20
|
+
* These are read by the HTML compiler at runtime to format prices
|
|
21
|
+
*/
|
|
22
|
+
export declare const CURRENCY_ATTR: {
|
|
23
|
+
readonly CURRENCY: "currency";
|
|
24
|
+
readonly SYMBOL: "currency-symbol";
|
|
25
|
+
readonly ALIGNMENT: "currency-alignment";
|
|
26
|
+
readonly THOUSAND_SEPARATOR: "currency-thousand-separator";
|
|
27
|
+
readonly DECIMAL_SEPARATOR: "currency-decimal-separator";
|
|
28
|
+
readonly DECIMAL_COUNT: "currency-decimal-count";
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Attribute type constants used in templates
|
|
32
|
+
* These are used as keys in ElementRenderer and composition arrays
|
|
33
|
+
*/
|
|
34
|
+
export declare const ATTR_PRODUCT_IMAGE = "productImage";
|
|
35
|
+
export declare const ATTR_PRODUCT_NAME = "productName";
|
|
36
|
+
export declare const ATTR_PRODUCT_PRICE = "productPrice";
|
|
37
|
+
export declare const ATTR_PRODUCT_OLD_PRICE = "productOldPrice";
|
|
38
|
+
export declare const ATTR_PRODUCT_OMNIBUS_PRICE = "productOmnibusPrice";
|
|
39
|
+
export declare const ATTR_PRODUCT_OMNIBUS_DISCOUNT = "productOmnibusDiscount";
|
|
40
|
+
export declare const ATTR_PRODUCT_BUTTON = "productButton";
|