@useinsider/guido 2.1.0-beta.a720424 → 2.1.0-beta.e13d291
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/extensions/Blocks/Recommendation/block.js +40 -6
- 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 +64 -0
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +20 -0
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +19 -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 +96 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +110 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +204 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +54 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +205 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +74 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +118 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +286 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +76 -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 +222 -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 +239 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +21 -10
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +41 -36
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +233 -0
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +251 -0
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +69 -0
- package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +174 -0
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +73 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +121 -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 +27 -16
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +29 -0
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +46 -0
- package/dist/extensions/Blocks/controlFactories.js +125 -93
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +223 -169
- package/dist/services/recommendationApi.js +10 -9
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +34 -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 +49 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +31 -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 +45 -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 +57 -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 +42 -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 +214 -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 +16 -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 +83 -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 +17 -16
- 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 +39 -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 +54 -0
- package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +154 -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/static/styles/customEditorStyle.css.js +25 -2
- 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/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -52
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var h = Object.defineProperty;
|
|
2
2
|
var T = (A, e, t) => e in A ? h(A, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : A[e] = t;
|
|
3
3
|
var m = (A, e, t) => T(A, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import P, { prepareProductRows as S } from "../../extensions/Blocks/Recommendation/templates/
|
|
5
|
-
import { getDefaultProducts as q } from "../../extensions/Blocks/Recommendation/templates/
|
|
4
|
+
import P, { prepareProductRows as S } from "../../extensions/Blocks/Recommendation/templates/grid/migration.js";
|
|
5
|
+
import { getDefaultProducts as q } from "../../extensions/Blocks/Recommendation/templates/utils.js";
|
|
6
6
|
class w {
|
|
7
7
|
constructor() {
|
|
8
8
|
m(this, "parser");
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Block as
|
|
2
|
-
import {
|
|
1
|
+
import { Block as o, BlockCompositionType as i } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationConfigService as t } from "./services/configService.js";
|
|
3
|
+
import { getDefaultTemplate as r } from "./templates/grid/template.js";
|
|
3
4
|
const n = "recommendation-block";
|
|
4
|
-
class
|
|
5
|
+
class g extends o {
|
|
5
6
|
constructor() {
|
|
6
7
|
super();
|
|
7
8
|
}
|
|
@@ -12,7 +13,7 @@ class m extends e {
|
|
|
12
13
|
return "recommendation-icon";
|
|
13
14
|
}
|
|
14
15
|
getBlockCompositionType() {
|
|
15
|
-
return
|
|
16
|
+
return i.CONTAINER;
|
|
16
17
|
}
|
|
17
18
|
getName() {
|
|
18
19
|
return this.api.translate("Recommendation Block");
|
|
@@ -21,10 +22,43 @@ class m extends e {
|
|
|
21
22
|
return this.api.translate("Recommendation Block Title Description");
|
|
22
23
|
}
|
|
23
24
|
getTemplate() {
|
|
24
|
-
return
|
|
25
|
+
return r();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Called when a new block is dropped into the template
|
|
29
|
+
*
|
|
30
|
+
* Initializes the block with default configuration stored via node config.
|
|
31
|
+
* This ensures the configuration persists with the template.
|
|
32
|
+
* @param node - The newly created block node
|
|
33
|
+
*/
|
|
34
|
+
onCreated(e) {
|
|
35
|
+
t.initializeConfig(this.api, e);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Called when the document changes or template is loaded
|
|
39
|
+
*
|
|
40
|
+
* Handles migration from legacy templates that don't have node config.
|
|
41
|
+
* Also handles config version upgrades for future migrations.
|
|
42
|
+
* @param node - The block node that may need migration
|
|
43
|
+
*/
|
|
44
|
+
onDocumentChanged(e) {
|
|
45
|
+
!e || !("getNodeConfig" in e) || t.needsMigration(e) && this._migrateFromLegacy(e);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Migrate configuration from legacy format
|
|
49
|
+
*
|
|
50
|
+
* Legacy templates may store configuration in:
|
|
51
|
+
* - data-attributes (data-layout, data-card-composition, etc.)
|
|
52
|
+
* - Pinia store (lost on reload - this is what we're fixing)
|
|
53
|
+
*
|
|
54
|
+
* This method reads what we can from the DOM and initializes proper node config.
|
|
55
|
+
* @param node - The block node to migrate
|
|
56
|
+
*/
|
|
57
|
+
_migrateFromLegacy(e) {
|
|
58
|
+
t.migrateFromDataAttributes(this.api, e);
|
|
25
59
|
}
|
|
26
60
|
}
|
|
27
61
|
export {
|
|
28
62
|
n as BLOCK_ID,
|
|
29
|
-
|
|
63
|
+
g as RecommendationBlock
|
|
30
64
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var b = /* @__PURE__ */ ((r) => (r.BUTTON = "recommendation-block-button", r.NAME = "recommendation-block-name", r.PRICE = "recommendation-block-price", r.OLD_PRICE = "recommendation-block-old-price", r.OMNIBUS_PRICE = "recommendation-block-omnibus-price", r.OMNIBUS_DISCOUNT = "recommendation-block-omnibus-discount", r.IMAGE = "recommendation-block-image", r))(b || {});
|
|
2
|
+
export {
|
|
3
|
+
b as RecommendationBlockId
|
|
4
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var o = /* @__PURE__ */ ((c) => (c.BUTTON_ALIGN = "recommendation-block-button-align-control", c.BUTTON_BORDER = "recommendation-block-button-border-control", c.BUTTON_BORDER_RADIUS = "recommendation-block-button-border-radius-control", c.BUTTON_COLOR = "recommendation-block-button-color-control", c.BUTTON_FIT_TO_CONTENT = "recommendation-block-button-fit-to-content-control", c.BUTTON_FONT_FAMILY = "recommendation-block-button-font-family-control", c.BUTTON_MARGINS = "recommendation-block-button-margins-control", c.BUTTON_PADDINGS = "recommendation-block-button-paddings-control", c.BUTTON_TEXT = "recommendation-block-button-text-control", c.BUTTON_TEXT_SIZE = "recommendation-block-button-text-size-control", c.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "recommendation-block-button-text-style-and-font-color-control", c.NAME_ALIGN = "recommendation-block-name-align-control", c.NAME_BACKGROUND = "recommendation-block-name-background-control", c.NAME_COLOR = "recommendation-block-name-color-control", c.NAME_FONT_FAMILY = "recommendation-block-name-font-family-control", c.NAME_PADDINGS = "recommendation-block-name-paddings-control", c.NAME_SIZE = "recommendation-block-name-size-control", c.NAME_STYLE = "recommendation-block-name-style-control", c.NAME_TEXT_TRIM = "recommendation-block-name-text-trim-control", c.PRICE_ALIGN = "recommendation-block-price-align-control", c.PRICE_BACKGROUND = "recommendation-block-price-background-control", c.PRICE_COLOR = "recommendation-block-price-color-control", c.PRICE_FONT_FAMILY = "recommendation-block-price-font-family-control", c.PRICE_PADDINGS = "recommendation-block-price-paddings-control", c.PRICE_SIZE = "recommendation-block-price-size-control", c.PRICE_STYLE = "recommendation-block-price-style-control", c.OLD_PRICE_ALIGN = "recommendation-block-old-price-align-control", c.OLD_PRICE_BACKGROUND = "recommendation-block-old-price-background-control", c.OLD_PRICE_COLOR = "recommendation-block-old-price-color-control", c.OLD_PRICE_FONT_FAMILY = "recommendation-block-old-price-font-family-control", c.OLD_PRICE_PADDINGS = "recommendation-block-old-price-paddings-control", c.OLD_PRICE_SIZE = "recommendation-block-old-price-size-control", c.OLD_PRICE_STYLE = "recommendation-block-old-price-style-control", c.OMNIBUS_PRICE_ALIGN = "recommendation-block-omnibus-price-align-control", c.OMNIBUS_PRICE_BACKGROUND = "recommendation-block-omnibus-price-background-control", c.OMNIBUS_PRICE_COLOR = "recommendation-block-omnibus-price-color-control", c.OMNIBUS_PRICE_FONT_FAMILY = "recommendation-block-omnibus-price-font-family-control", c.OMNIBUS_PRICE_PADDINGS = "recommendation-block-omnibus-price-paddings-control", c.OMNIBUS_PRICE_SIZE = "recommendation-block-omnibus-price-size-control", c.OMNIBUS_PRICE_STYLE = "recommendation-block-omnibus-price-style-control", c.OMNIBUS_PRICE_TEXT_BEFORE = "recommendation-block-omnibus-price-text-before-control", c.OMNIBUS_PRICE_TEXT_AFTER = "recommendation-block-omnibus-price-text-after-control", c.OMNIBUS_DISCOUNT_ALIGN = "recommendation-block-omnibus-discount-align-control", c.OMNIBUS_DISCOUNT_BACKGROUND = "recommendation-block-omnibus-discount-background-control", c.OMNIBUS_DISCOUNT_COLOR = "recommendation-block-omnibus-discount-color-control", c.OMNIBUS_DISCOUNT_FONT_FAMILY = "recommendation-block-omnibus-discount-font-family-control", c.OMNIBUS_DISCOUNT_PADDINGS = "recommendation-block-omnibus-discount-paddings-control", c.OMNIBUS_DISCOUNT_SIZE = "recommendation-block-omnibus-discount-size-control", c.OMNIBUS_DISCOUNT_STYLE = "recommendation-block-omnibus-discount-style-control", c.OMNIBUS_DISCOUNT_TEXT_BEFORE = "recommendation-block-omnibus-discount-text-before-control", c.OMNIBUS_DISCOUNT_TEXT_AFTER = "recommendation-block-omnibus-discount-text-after-control", c.IMAGE_SIZE = "recommendation-block-image-size-control", c.IMAGE_MARGINS = "recommendation-block-image-margins-control", c))(o || {});
|
|
2
|
+
export {
|
|
3
|
+
o as RecommendationControlId
|
|
4
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DEFAULT_ROW_SPACING as s, DEFAULT_COLUMN_SPACING as R, DEFAULT_CARDS_IN_ROW as n } from "./layout.js";
|
|
2
|
+
import { ATTR_PRODUCT_IMAGE as t, ATTR_PRODUCT_NAME as T, ATTR_PRODUCT_OLD_PRICE as e, ATTR_PRODUCT_PRICE as o, ATTR_PRODUCT_OMNIBUS_PRICE as _, ATTR_PRODUCT_OMNIBUS_DISCOUNT as r, ATTR_PRODUCT_BUTTON as U } from "./selectors.js";
|
|
3
|
+
const I = {
|
|
4
|
+
code: "USD",
|
|
5
|
+
symbol: "USD",
|
|
6
|
+
alignment: "after",
|
|
7
|
+
decimalCount: 2,
|
|
8
|
+
decimalSeparator: ".",
|
|
9
|
+
thousandSeparator: ","
|
|
10
|
+
}, O = {
|
|
11
|
+
textBefore: "",
|
|
12
|
+
textAfter: ""
|
|
13
|
+
}, i = {
|
|
14
|
+
textBefore: "",
|
|
15
|
+
textAfter: ""
|
|
16
|
+
}, C = [
|
|
17
|
+
t,
|
|
18
|
+
T,
|
|
19
|
+
e,
|
|
20
|
+
o,
|
|
21
|
+
_,
|
|
22
|
+
r,
|
|
23
|
+
U
|
|
24
|
+
], D = {
|
|
25
|
+
[t]: !0,
|
|
26
|
+
[T]: !0,
|
|
27
|
+
[o]: !0,
|
|
28
|
+
[e]: !0,
|
|
29
|
+
[_]: !1,
|
|
30
|
+
[r]: !1,
|
|
31
|
+
[U]: !0
|
|
32
|
+
}, a = {
|
|
33
|
+
// Settings
|
|
34
|
+
strategy: "mostPopular",
|
|
35
|
+
productIds: [],
|
|
36
|
+
size: "6",
|
|
37
|
+
shuffleProducts: !1,
|
|
38
|
+
language: "en_US",
|
|
39
|
+
currency: I,
|
|
40
|
+
filters: [],
|
|
41
|
+
// Layout
|
|
42
|
+
layout: "grid",
|
|
43
|
+
cardsInRow: n,
|
|
44
|
+
columnSpacing: R,
|
|
45
|
+
rowSpacing: s,
|
|
46
|
+
// Composition
|
|
47
|
+
composition: C,
|
|
48
|
+
visibility: D,
|
|
49
|
+
// Element settings
|
|
50
|
+
omnibusPrice: O,
|
|
51
|
+
omnibusDiscount: i,
|
|
52
|
+
textTrimming: !1,
|
|
53
|
+
// Meta
|
|
54
|
+
configVersion: 1
|
|
55
|
+
}, E = 1;
|
|
56
|
+
export {
|
|
57
|
+
E as CURRENT_CONFIG_VERSION,
|
|
58
|
+
C as DEFAULT_COMPOSITION,
|
|
59
|
+
I as DEFAULT_CURRENCY,
|
|
60
|
+
a as DEFAULT_NODE_CONFIG,
|
|
61
|
+
i as DEFAULT_OMNIBUS_DISCOUNT,
|
|
62
|
+
O as DEFAULT_OMNIBUS_PRICE,
|
|
63
|
+
D as DEFAULT_VISIBILITY
|
|
64
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const _ = {
|
|
2
|
+
GRID: "grid",
|
|
3
|
+
LIST: "list"
|
|
4
|
+
}, o = [
|
|
5
|
+
{ icon: "grid-orientation", value: _.GRID },
|
|
6
|
+
{ icon: "list-orientation", value: _.LIST }
|
|
7
|
+
], t = 3, n = 3, A = 9, T = 4, c = 10, s = 20, O = 0, S = 50, I = 5;
|
|
8
|
+
export {
|
|
9
|
+
n as DEFAULT_CARDS_IN_ROW,
|
|
10
|
+
c as DEFAULT_COLUMN_SPACING,
|
|
11
|
+
t as DEFAULT_PRODUCTS_PER_ROW,
|
|
12
|
+
s as DEFAULT_ROW_SPACING,
|
|
13
|
+
o as LAYOUT_OPTIONS,
|
|
14
|
+
_ as LAYOUT_VALUES,
|
|
15
|
+
T as MAX_PRODUCTS_PER_ROW,
|
|
16
|
+
A as MAX_PRODUCT_COUNT,
|
|
17
|
+
S as MAX_SPACING,
|
|
18
|
+
O as MIN_SPACING,
|
|
19
|
+
I as SPACING_STEP
|
|
20
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const c = ".ins-recommendation-product-container", T = {
|
|
2
|
+
CURRENCY: "currency",
|
|
3
|
+
SYMBOL: "currency-symbol",
|
|
4
|
+
ALIGNMENT: "currency-alignment",
|
|
5
|
+
THOUSAND_SEPARATOR: "currency-thousand-separator",
|
|
6
|
+
DECIMAL_SEPARATOR: "currency-decimal-separator",
|
|
7
|
+
DECIMAL_COUNT: "currency-decimal-count"
|
|
8
|
+
}, r = "productImage", n = "productName", o = "productPrice", t = "productOldPrice", R = "productOmnibusPrice", O = "productOmnibusDiscount", _ = "productButton";
|
|
9
|
+
export {
|
|
10
|
+
_ as ATTR_PRODUCT_BUTTON,
|
|
11
|
+
r as ATTR_PRODUCT_IMAGE,
|
|
12
|
+
n as ATTR_PRODUCT_NAME,
|
|
13
|
+
t as ATTR_PRODUCT_OLD_PRICE,
|
|
14
|
+
O as ATTR_PRODUCT_OMNIBUS_DISCOUNT,
|
|
15
|
+
R as ATTR_PRODUCT_OMNIBUS_PRICE,
|
|
16
|
+
o as ATTR_PRODUCT_PRICE,
|
|
17
|
+
c as CONTAINER_SELECTOR,
|
|
18
|
+
T as CURRENCY_ATTR
|
|
19
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { createButtonFitToContainerControl as T, createButtonTextStyleAndFontColorControl as r, createButtonTextSizeControl as e, createButtonTextControl as B, createButtonPaddingsControl as l, createButtonMarginsControl as C, createButtonFontFamilyControl as O, createButtonColorControl as N, createButtonBorderRadiusControl as i, createButtonBorderControl as a, createButtonAlignControl as c } from "../../../controlFactories.js";
|
|
2
|
+
import { RecommendationBlockId as o } from "../../constants/blockIds.js";
|
|
3
|
+
import { RecommendationControlId as t } from "../../constants/controlIds.js";
|
|
4
|
+
import { CONTAINER_SELECTOR as n } from "../../constants/selectors.js";
|
|
5
|
+
const U = c(
|
|
6
|
+
t.BUTTON_ALIGN,
|
|
7
|
+
o.BUTTON,
|
|
8
|
+
n
|
|
9
|
+
), d = a(
|
|
10
|
+
t.BUTTON_BORDER,
|
|
11
|
+
o.BUTTON,
|
|
12
|
+
n
|
|
13
|
+
), s = i(
|
|
14
|
+
t.BUTTON_BORDER_RADIUS,
|
|
15
|
+
o.BUTTON,
|
|
16
|
+
n
|
|
17
|
+
), _ = N(
|
|
18
|
+
t.BUTTON_COLOR,
|
|
19
|
+
o.BUTTON,
|
|
20
|
+
n
|
|
21
|
+
), m = O(
|
|
22
|
+
t.BUTTON_FONT_FAMILY,
|
|
23
|
+
o.BUTTON,
|
|
24
|
+
n
|
|
25
|
+
), u = C(
|
|
26
|
+
t.BUTTON_MARGINS,
|
|
27
|
+
o.BUTTON,
|
|
28
|
+
n
|
|
29
|
+
), R = l(
|
|
30
|
+
t.BUTTON_PADDINGS,
|
|
31
|
+
o.BUTTON,
|
|
32
|
+
n
|
|
33
|
+
), F = B(
|
|
34
|
+
t.BUTTON_TEXT,
|
|
35
|
+
o.BUTTON,
|
|
36
|
+
n
|
|
37
|
+
), A = e(
|
|
38
|
+
t.BUTTON_TEXT_SIZE,
|
|
39
|
+
o.BUTTON,
|
|
40
|
+
n
|
|
41
|
+
), S = r(
|
|
42
|
+
t.BUTTON_TEXT_STYLE_AND_FONT_COLOR,
|
|
43
|
+
o.BUTTON,
|
|
44
|
+
n
|
|
45
|
+
), E = T(
|
|
46
|
+
t.BUTTON_FIT_TO_CONTENT,
|
|
47
|
+
o.BUTTON,
|
|
48
|
+
n
|
|
49
|
+
), p = {
|
|
50
|
+
align: U,
|
|
51
|
+
border: d,
|
|
52
|
+
borderRadius: s,
|
|
53
|
+
color: _,
|
|
54
|
+
fontFamily: m,
|
|
55
|
+
margins: u,
|
|
56
|
+
paddings: R,
|
|
57
|
+
text: F,
|
|
58
|
+
textSize: A,
|
|
59
|
+
textStyleAndFontColor: S,
|
|
60
|
+
fitToContent: E
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
p as ButtonControls
|
|
64
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ModificationDescription as d } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { CommonControl as s } from "../../../common-control.js";
|
|
3
|
+
import { getCurrentLayout as l } from "../main/utils.js";
|
|
4
|
+
const u = "recommendation-card-background-color-control", e = {
|
|
5
|
+
CARD_BACKGROUND_COLOR: "cardBackgroundColor"
|
|
6
|
+
}, a = {
|
|
7
|
+
GRID: ".product-card-segment",
|
|
8
|
+
LIST: ".product-card-wrapper"
|
|
9
|
+
};
|
|
10
|
+
class _ extends s {
|
|
11
|
+
getId() {
|
|
12
|
+
return u;
|
|
13
|
+
}
|
|
14
|
+
getTemplate() {
|
|
15
|
+
return `
|
|
16
|
+
<div class="card-bg-control-container">
|
|
17
|
+
${this._GuTwoColumns([
|
|
18
|
+
this._GuLabel({ text: "Card Background Color" }),
|
|
19
|
+
this._GuColorPicker(e.CARD_BACKGROUND_COLOR)
|
|
20
|
+
])}
|
|
21
|
+
</div>
|
|
22
|
+
`;
|
|
23
|
+
}
|
|
24
|
+
onRender() {
|
|
25
|
+
this._setFormValues(), this._listenToFormUpdates();
|
|
26
|
+
}
|
|
27
|
+
onTemplateNodeUpdated(r) {
|
|
28
|
+
super.onTemplateNodeUpdated(r), this._setFormValues();
|
|
29
|
+
}
|
|
30
|
+
_setFormValues() {
|
|
31
|
+
const r = this._getCurrentCardBackgroundColor();
|
|
32
|
+
this.api.updateValues({
|
|
33
|
+
[e.CARD_BACKGROUND_COLOR]: r
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Gets the appropriate selector based on layout
|
|
38
|
+
* Grid: .product-card-segment (inner table per product cell)
|
|
39
|
+
* List: .product-card-wrapper (table per product row)
|
|
40
|
+
*/
|
|
41
|
+
_getCardSelector() {
|
|
42
|
+
return l(this.currentNode) === "grid" ? a.GRID : a.LIST;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Reads the current background color from the first product card element
|
|
46
|
+
* @returns The background color value or 'transparent' if not found
|
|
47
|
+
*/
|
|
48
|
+
_getCurrentCardBackgroundColor() {
|
|
49
|
+
if (!this.currentNode || !("querySelectorAll" in this.currentNode))
|
|
50
|
+
return "transparent";
|
|
51
|
+
const r = this._getCardSelector(), t = this.currentNode.querySelector(r);
|
|
52
|
+
return !t || !("getStyle" in t) ? "transparent" : t.getStyle("background-color") || "transparent";
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Handles card background color changes
|
|
56
|
+
* Applies the color to all product card elements based on layout
|
|
57
|
+
*/
|
|
58
|
+
_onCardBackgroundColorChange(r) {
|
|
59
|
+
if (!this.currentNode || !("querySelectorAll" in this.currentNode))
|
|
60
|
+
return;
|
|
61
|
+
const t = this._getCardSelector(), o = Array.from(
|
|
62
|
+
this.currentNode.querySelectorAll(t)
|
|
63
|
+
);
|
|
64
|
+
if (o.length === 0)
|
|
65
|
+
return;
|
|
66
|
+
const n = this.api.getDocumentModifier();
|
|
67
|
+
o.forEach((c) => {
|
|
68
|
+
n.modifyHtml(c).setStyle("background-color", r);
|
|
69
|
+
}), n.apply(new d("Update card background color"));
|
|
70
|
+
}
|
|
71
|
+
_listenToFormUpdates() {
|
|
72
|
+
this.api.onValueChanged(e.CARD_BACKGROUND_COLOR, (r) => {
|
|
73
|
+
this._onCardBackgroundColorChange(r);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
u as CARD_BACKGROUND_COLOR_CONTROL_ID,
|
|
79
|
+
_ as CardBackgroundColorControl
|
|
80
|
+
};
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
var T = Object.defineProperty;
|
|
2
|
+
var C = (a, s, t) => s in a ? T(a, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[s] = t;
|
|
3
|
+
var l = (a, s, t) => C(a, typeof s != "symbol" ? s + "" : s, t);
|
|
4
|
+
import { ModificationDescription as u } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
+
import { CommonControl as f } from "../../../common-control.js";
|
|
6
|
+
import { ATTR_PRODUCT_IMAGE as O, ATTR_PRODUCT_NAME as g, ATTR_PRODUCT_PRICE as R, ATTR_PRODUCT_OLD_PRICE as A, ATTR_PRODUCT_OMNIBUS_PRICE as D, ATTR_PRODUCT_OMNIBUS_DISCOUNT as N, ATTR_PRODUCT_BUTTON as V } from "../../constants/selectors.js";
|
|
7
|
+
import { useRecommendationExtensionStore as E } from "../../store/recommendation.js";
|
|
8
|
+
import { getTableDisplayValue as I } from "../../utils/tagName.js";
|
|
9
|
+
import { getCurrentLayout as P } from "../main/utils.js";
|
|
10
|
+
const S = "ui-elements-recommendation-card-composition", k = {
|
|
11
|
+
ORDERABLE: "cardComposition"
|
|
12
|
+
}, c = ".recommendation-attribute-row", v = ".product-card-wrapper > tbody", _ = "data-card-composition", d = "data-attribute-type", m = "data-visibility", n = [
|
|
13
|
+
{ key: O, label: "Product Image", visible: !0 },
|
|
14
|
+
{ key: g, label: "Product Name", visible: !0 },
|
|
15
|
+
{ key: R, label: "Product Price", visible: !0 },
|
|
16
|
+
{ key: A, label: "Product Original Price", visible: !0 },
|
|
17
|
+
{ key: D, label: "Omnibus Price", visible: !1 },
|
|
18
|
+
{ key: N, label: "Omnibus Discount", visible: !1 },
|
|
19
|
+
{ key: V, label: "Product Button", visible: !0 }
|
|
20
|
+
];
|
|
21
|
+
class H extends f {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
l(this, "store", E());
|
|
25
|
+
l(this, "unsubscribeOrientation", null);
|
|
26
|
+
}
|
|
27
|
+
getId() {
|
|
28
|
+
return S;
|
|
29
|
+
}
|
|
30
|
+
getTemplate() {
|
|
31
|
+
const t = n.map((e) => ({
|
|
32
|
+
key: e.key,
|
|
33
|
+
label: e.label,
|
|
34
|
+
content: this._createItemContent(e.label, e.key)
|
|
35
|
+
}));
|
|
36
|
+
return `
|
|
37
|
+
<div class="container" data-card-composition-control>
|
|
38
|
+
${this._GuLabel({ text: "Card Element Order & Visibility" })}
|
|
39
|
+
${this._GuOrderable(k.ORDERABLE, t)}
|
|
40
|
+
</div>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
onRender() {
|
|
44
|
+
this._initializeComposition(), this._registerValueChangeListeners(), this._updateOrderableState(), this._subscribeToOrientationChanges();
|
|
45
|
+
}
|
|
46
|
+
onTemplateNodeUpdated(t) {
|
|
47
|
+
super.onTemplateNodeUpdated(t), this._initializeComposition(), this._updateOrderableState();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates the HTML content for an orderable item with label and toggle
|
|
51
|
+
*/
|
|
52
|
+
_createItemContent(t, e) {
|
|
53
|
+
return `
|
|
54
|
+
<div style="display: flex; align-items: center; justify-content: space-between;
|
|
55
|
+
padding: 8px; gap: 8px;">
|
|
56
|
+
<span style="flex: 1;">${t}</span>
|
|
57
|
+
${this._GuToggle(`visibility_${e}`)}
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Registers event listeners for composition and visibility changes
|
|
63
|
+
*/
|
|
64
|
+
_registerValueChangeListeners() {
|
|
65
|
+
this.api.onValueChanged("cardComposition", (t) => {
|
|
66
|
+
this._applyCompositionToBlock(t);
|
|
67
|
+
}), n.forEach((t) => {
|
|
68
|
+
this.api.onValueChanged(`visibility_${t.key}`, (e) => {
|
|
69
|
+
this._applyVisibilityToBlock(t.key, e);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Initializes composition order and visibility state from the current node
|
|
75
|
+
*/
|
|
76
|
+
_initializeComposition() {
|
|
77
|
+
const t = this._readCompositionFromNode(), e = this._readVisibilityFromRows(), i = {
|
|
78
|
+
cardComposition: t,
|
|
79
|
+
...this._buildVisibilityValues(e)
|
|
80
|
+
};
|
|
81
|
+
this.api.updateValues(i);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Reads composition order from node's data-card-composition attribute
|
|
85
|
+
* Falls back to default order if attribute is not present
|
|
86
|
+
*/
|
|
87
|
+
_readCompositionFromNode() {
|
|
88
|
+
if (!this.currentNode || !("getAttribute" in this.currentNode))
|
|
89
|
+
return n.map((e) => e.key);
|
|
90
|
+
const t = this.currentNode.getAttribute(_);
|
|
91
|
+
return t ? t.split(",").filter(Boolean) : n.map((e) => e.key);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Builds visibility values object from the visibility map
|
|
95
|
+
*/
|
|
96
|
+
_buildVisibilityValues(t) {
|
|
97
|
+
return n.reduce((e, i) => (e[`visibility_${i.key}`] = t[i.key] ?? !0, e), {});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Read visibility state from individual row elements' data-visibility attributes
|
|
101
|
+
* This ensures toggles reflect the actual DOM state
|
|
102
|
+
*/
|
|
103
|
+
_readVisibilityFromRows() {
|
|
104
|
+
if (!this.currentNode)
|
|
105
|
+
return this._getDefaultVisibilities();
|
|
106
|
+
const t = Array.from(this.currentNode.querySelectorAll(c)), e = this._extractVisibilityFromRows(t);
|
|
107
|
+
return this._mergeWithDefaults(e);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Returns default visibility values for all items
|
|
111
|
+
*/
|
|
112
|
+
_getDefaultVisibilities() {
|
|
113
|
+
return n.reduce((t, e) => (t[e.key] = e.visible, t), {});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Extracts visibility values from DOM nodes
|
|
117
|
+
*/
|
|
118
|
+
_extractVisibilityFromRows(t) {
|
|
119
|
+
const e = {};
|
|
120
|
+
return t.forEach((i) => {
|
|
121
|
+
if (!("getAttribute" in i))
|
|
122
|
+
return;
|
|
123
|
+
const o = i.getAttribute(d), r = i.getAttribute(m);
|
|
124
|
+
o && r !== null && (e[o] = this._parseVisibilityValue(r));
|
|
125
|
+
}), e;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Parses visibility value from string to boolean
|
|
129
|
+
* Accepts "1", "true" as true, everything else as false
|
|
130
|
+
*/
|
|
131
|
+
_parseVisibilityValue(t) {
|
|
132
|
+
return t === "1" || t === "true";
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Merges extracted visibilities with default values for missing keys
|
|
136
|
+
*/
|
|
137
|
+
_mergeWithDefaults(t) {
|
|
138
|
+
return n.forEach((e) => {
|
|
139
|
+
e.key in t || (t[e.key] = e.visible);
|
|
140
|
+
}), t;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Apply the reordered composition to the block's HTML structure
|
|
144
|
+
* Updates the data-card-composition attribute and reorders product attributes
|
|
145
|
+
* Note: Reordering is only applied for grid layout
|
|
146
|
+
*/
|
|
147
|
+
_applyCompositionToBlock(t) {
|
|
148
|
+
if (!this.currentNode)
|
|
149
|
+
return;
|
|
150
|
+
const e = this._getCurrentLayout();
|
|
151
|
+
this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(_, t.join(",")).apply(new u("Update card composition")), e === "grid" && this._reorderProductAttributes(t);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Reorders attribute rows within each product card based on composition order
|
|
155
|
+
* Targets the tbody inside each product-attribute-cell to preserve card structure
|
|
156
|
+
*/
|
|
157
|
+
_reorderProductAttributes(t) {
|
|
158
|
+
if (!this.currentNode)
|
|
159
|
+
return;
|
|
160
|
+
const e = this.currentNode.querySelectorAll(v);
|
|
161
|
+
if (!(e != null && e.length))
|
|
162
|
+
return;
|
|
163
|
+
const i = this.api.getDocumentModifier();
|
|
164
|
+
e.forEach((o) => {
|
|
165
|
+
const r = this._buildCompositionHtml(o, t);
|
|
166
|
+
i.modifyHtml(o).setInnerHtml(r);
|
|
167
|
+
}), i.apply(new u("Reorder product attributes"));
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Builds HTML string with attributes ordered according to composition
|
|
171
|
+
*/
|
|
172
|
+
_buildCompositionHtml(t, e) {
|
|
173
|
+
return e.reduce((i, o) => {
|
|
174
|
+
const r = t.querySelector(`${c}[${d}="${o}"]`);
|
|
175
|
+
return r && "getOuterHTML" in r ? i + r.getOuterHTML() : i;
|
|
176
|
+
}, "");
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Apply visibility changes to the block's HTML structure
|
|
180
|
+
* Updates display style and data-visibility attribute for all matching elements
|
|
181
|
+
* - <tr> elements: use display: none / table-row
|
|
182
|
+
* - <td> elements: use display: none / table-cell
|
|
183
|
+
*/
|
|
184
|
+
_applyVisibilityToBlock(t, e) {
|
|
185
|
+
if (!this.currentNode)
|
|
186
|
+
return;
|
|
187
|
+
const i = this.currentNode.querySelectorAll(`${c}[${d}="${t}"]`);
|
|
188
|
+
if (!(i != null && i.length))
|
|
189
|
+
return;
|
|
190
|
+
const o = e ? "1" : "0", r = `Set ${t} visibility to ${e ? "visible" : "hidden"}`, b = this.api.getDocumentModifier();
|
|
191
|
+
i.forEach((p) => {
|
|
192
|
+
const y = I(p), h = e ? y : "none";
|
|
193
|
+
b.modifyHtml(p).setStyle("display", h).setAttribute(m, o);
|
|
194
|
+
}), b.apply(new u(r));
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Gets the current layout orientation from store or DOM
|
|
198
|
+
*/
|
|
199
|
+
_getCurrentLayout() {
|
|
200
|
+
return this.store.recommendationConfigs.orientation || P(this.currentNode);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Updates orderable state based on layout orientation
|
|
204
|
+
* Adds/removes disabled class to hide drag icons for list layout
|
|
205
|
+
*/
|
|
206
|
+
_updateOrderableState() {
|
|
207
|
+
const e = this._getCurrentLayout() === "list", i = this.getContainer();
|
|
208
|
+
if (!i)
|
|
209
|
+
return;
|
|
210
|
+
const o = i.querySelector("[data-card-composition-control]");
|
|
211
|
+
if (!o)
|
|
212
|
+
return;
|
|
213
|
+
const r = o.querySelector("ue-orderable");
|
|
214
|
+
r && r.classList.toggle("orderable-disabled", e);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Subscribe to store orientation changes
|
|
218
|
+
* Updates orderable state when layout changes via the layout control
|
|
219
|
+
*/
|
|
220
|
+
_subscribeToOrientationChanges() {
|
|
221
|
+
this.unsubscribeOrientation && this.unsubscribeOrientation();
|
|
222
|
+
let t = this.store.recommendationConfigs.orientation;
|
|
223
|
+
this.unsubscribeOrientation = this.store.$subscribe(() => {
|
|
224
|
+
const e = this.store.recommendationConfigs.orientation;
|
|
225
|
+
e !== t && (t = e, this._updateOrderableState());
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
export {
|
|
230
|
+
S as COMPOSITION_CONTROL_BLOCK_ID,
|
|
231
|
+
H as RecommendationCardCompositionControl
|
|
232
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createImageMarginsControl as m, createImageSizeControl as n } from "../../../controlFactories.js";
|
|
2
|
+
import { RecommendationBlockId as o } from "../../constants/blockIds.js";
|
|
3
|
+
import { RecommendationControlId as r } from "../../constants/controlIds.js";
|
|
4
|
+
import { CONTAINER_SELECTOR as t } from "../../constants/selectors.js";
|
|
5
|
+
const e = n(
|
|
6
|
+
r.IMAGE_SIZE,
|
|
7
|
+
o.IMAGE,
|
|
8
|
+
t
|
|
9
|
+
), i = m(
|
|
10
|
+
r.IMAGE_MARGINS,
|
|
11
|
+
o.IMAGE,
|
|
12
|
+
t
|
|
13
|
+
), C = {
|
|
14
|
+
size: e,
|
|
15
|
+
margins: i
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
C as ImageControls
|
|
19
|
+
};
|