@useinsider/guido 2.0.0-beta.6e688eb → 2.0.0-beta.782343a
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 +2 -0
- package/dist/@types/config/schemas.js +3 -1
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +15 -17
- package/dist/composables/useStripo.js +40 -40
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +13 -4
- 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/selectors.js +11 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/{cardBackgroundColorControl.js → cardBackground/index.js} +2 -2
- package/dist/extensions/Blocks/Recommendation/{cardCompositionControl.js → controls/cardComposition/index.js} +18 -26
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
- package/dist/extensions/Blocks/Recommendation/{control.js → controls/main/index.js} +44 -25
- 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} +15 -13
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextBeforeControl.js → omnibusDiscount/textBefore.js} +15 -13
- 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/{spacingControl.js → spacing/index.js} +57 -62
- package/dist/extensions/Blocks/Recommendation/extension.js +37 -17
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -10
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +20 -20
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +17 -16
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +62 -87
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +364 -286
- package/dist/package.json.js +1 -1
- package/dist/services/stripoApi.js +6 -10
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/composables/useConfig.d.ts +2 -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/index.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/{cardBackgroundColorControl.d.ts → cardBackground/index.d.ts} +1 -1
- package/dist/src/extensions/Blocks/Recommendation/{cardCompositionControl.d.ts → controls/cardComposition/index.d.ts} +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +19 -589
- package/dist/src/extensions/Blocks/Recommendation/{control.d.ts → controls/main/index.d.ts} +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/{nameTextTrimControl.d.ts → name/textTrim.d.ts} +1 -1
- 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/{omnibusDiscountTextAfterControl.d.ts → omnibusDiscount/textAfter.d.ts} +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextBeforeControl.d.ts → omnibusDiscount/textBefore.d.ts} +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/{omnibusPriceTextAfterControl.d.ts → omnibusPrice/textAfter.d.ts} +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/{omnibusPriceTextBeforeControl.d.ts → omnibusPrice/textBefore.d.ts} +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/{spacingControl.d.ts → spacing/index.d.ts} +2 -5
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
- package/dist/src/stores/config.d.ts +17 -0
- package/package.json +3 -3
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
|
@@ -36,6 +36,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
36
36
|
} | undefined;
|
|
37
37
|
}[];
|
|
38
38
|
selectedUnsubscribePages: number[];
|
|
39
|
+
forceRecreate: boolean;
|
|
39
40
|
};
|
|
40
41
|
editor: {
|
|
41
42
|
locale: string;
|
|
@@ -127,6 +128,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
127
128
|
} | undefined;
|
|
128
129
|
}[];
|
|
129
130
|
selectedUnsubscribePages: number[];
|
|
131
|
+
forceRecreate: boolean;
|
|
130
132
|
};
|
|
131
133
|
editor: {
|
|
132
134
|
locale: string;
|
|
@@ -218,6 +220,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
218
220
|
} | undefined;
|
|
219
221
|
}[];
|
|
220
222
|
selectedUnsubscribePages: number[];
|
|
223
|
+
forceRecreate: boolean;
|
|
221
224
|
};
|
|
222
225
|
editor: {
|
|
223
226
|
locale: string;
|
|
@@ -309,6 +312,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
309
312
|
} | undefined;
|
|
310
313
|
}[];
|
|
311
314
|
selectedUnsubscribePages: number[];
|
|
315
|
+
forceRecreate: boolean;
|
|
312
316
|
};
|
|
313
317
|
editor: {
|
|
314
318
|
locale: string;
|
|
@@ -400,6 +404,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
400
404
|
} | undefined;
|
|
401
405
|
}[];
|
|
402
406
|
selectedUnsubscribePages: number[];
|
|
407
|
+
forceRecreate: boolean;
|
|
403
408
|
};
|
|
404
409
|
editor: {
|
|
405
410
|
locale: string;
|
|
@@ -491,6 +496,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
491
496
|
} | undefined;
|
|
492
497
|
}[];
|
|
493
498
|
selectedUnsubscribePages: number[];
|
|
499
|
+
forceRecreate: boolean;
|
|
494
500
|
};
|
|
495
501
|
editor: {
|
|
496
502
|
locale: string;
|
|
@@ -582,6 +588,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
582
588
|
} | undefined;
|
|
583
589
|
}[];
|
|
584
590
|
selectedUnsubscribePages: number[];
|
|
591
|
+
forceRecreate: boolean;
|
|
585
592
|
};
|
|
586
593
|
editor: {
|
|
587
594
|
locale: string;
|
|
@@ -673,6 +680,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
673
680
|
} | undefined;
|
|
674
681
|
}[];
|
|
675
682
|
selectedUnsubscribePages: number[];
|
|
683
|
+
forceRecreate: boolean;
|
|
676
684
|
};
|
|
677
685
|
editor: {
|
|
678
686
|
locale: string;
|
|
@@ -764,6 +772,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
764
772
|
} | undefined;
|
|
765
773
|
}[];
|
|
766
774
|
selectedUnsubscribePages: number[];
|
|
775
|
+
forceRecreate: boolean;
|
|
767
776
|
};
|
|
768
777
|
editor: {
|
|
769
778
|
locale: string;
|
|
@@ -855,6 +864,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
855
864
|
} | undefined;
|
|
856
865
|
}[];
|
|
857
866
|
selectedUnsubscribePages: number[];
|
|
867
|
+
forceRecreate: boolean;
|
|
858
868
|
};
|
|
859
869
|
editor: {
|
|
860
870
|
locale: string;
|
|
@@ -946,6 +956,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
946
956
|
} | undefined;
|
|
947
957
|
}[];
|
|
948
958
|
selectedUnsubscribePages: number[];
|
|
959
|
+
forceRecreate: boolean;
|
|
949
960
|
};
|
|
950
961
|
editor: {
|
|
951
962
|
locale: string;
|
|
@@ -1037,6 +1048,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1037
1048
|
} | undefined;
|
|
1038
1049
|
}[];
|
|
1039
1050
|
selectedUnsubscribePages: number[];
|
|
1051
|
+
forceRecreate: boolean;
|
|
1040
1052
|
};
|
|
1041
1053
|
editor: {
|
|
1042
1054
|
locale: string;
|
|
@@ -1128,6 +1140,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1128
1140
|
} | undefined;
|
|
1129
1141
|
}[];
|
|
1130
1142
|
selectedUnsubscribePages: number[];
|
|
1143
|
+
forceRecreate: boolean;
|
|
1131
1144
|
};
|
|
1132
1145
|
editor: {
|
|
1133
1146
|
locale: string;
|
|
@@ -1219,6 +1232,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1219
1232
|
} | undefined;
|
|
1220
1233
|
}[];
|
|
1221
1234
|
selectedUnsubscribePages: number[];
|
|
1235
|
+
forceRecreate: boolean;
|
|
1222
1236
|
};
|
|
1223
1237
|
editor: {
|
|
1224
1238
|
locale: string;
|
|
@@ -1310,6 +1324,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1310
1324
|
} | undefined;
|
|
1311
1325
|
}[];
|
|
1312
1326
|
selectedUnsubscribePages: number[];
|
|
1327
|
+
forceRecreate: boolean;
|
|
1313
1328
|
};
|
|
1314
1329
|
editor: {
|
|
1315
1330
|
locale: string;
|
|
@@ -1401,6 +1416,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1401
1416
|
} | undefined;
|
|
1402
1417
|
}[];
|
|
1403
1418
|
selectedUnsubscribePages: number[];
|
|
1419
|
+
forceRecreate: boolean;
|
|
1404
1420
|
};
|
|
1405
1421
|
editor: {
|
|
1406
1422
|
locale: string;
|
|
@@ -1492,6 +1508,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1492
1508
|
} | undefined;
|
|
1493
1509
|
}[];
|
|
1494
1510
|
selectedUnsubscribePages: number[];
|
|
1511
|
+
forceRecreate: boolean;
|
|
1495
1512
|
};
|
|
1496
1513
|
editor: {
|
|
1497
1514
|
locale: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.782343a",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"author": "",
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@stripoinc/ui-editor-extensions": "3.
|
|
34
|
+
"@stripoinc/ui-editor-extensions": "3.5.0",
|
|
35
35
|
"@useinsider/design-system-vue": "0.14.20",
|
|
36
36
|
"@vueuse/core": "11.3.0",
|
|
37
37
|
"lodash-es": "4.17.21",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
"guido": {
|
|
87
87
|
"stripo": {
|
|
88
|
-
"version": "2.
|
|
88
|
+
"version": "2.52.0"
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const _ = "productImage", b = "productName", n = "productPrice", i = "productOldPrice", O = "productOmnibusPrice", T = "productOmnibusDiscount", t = "productButton";
|
|
2
|
-
var o = /* @__PURE__ */ ((c) => (c.BUTTON = "recommendation-block-button", c.NAME = "recommendation-block-name", c.PRICE = "recommendation-block-price", c.OLD_PRICE = "recommendation-block-old-price", c.OMNIBUS_PRICE = "recommendation-block-omnibus-price", c.OMNIBUS_DISCOUNT = "recommendation-block-omnibus-discount", c.IMAGE = "recommendation-block-image", c))(o || {}), r = /* @__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))(r || {});
|
|
3
|
-
export {
|
|
4
|
-
t as ATTR_PRODUCT_BUTTON,
|
|
5
|
-
_ as ATTR_PRODUCT_IMAGE,
|
|
6
|
-
b as ATTR_PRODUCT_NAME,
|
|
7
|
-
i as ATTR_PRODUCT_OLD_PRICE,
|
|
8
|
-
T as ATTR_PRODUCT_OMNIBUS_DISCOUNT,
|
|
9
|
-
O as ATTR_PRODUCT_OMNIBUS_PRICE,
|
|
10
|
-
n as ATTR_PRODUCT_PRICE,
|
|
11
|
-
o as RecommendationBlockId,
|
|
12
|
-
r as RecommendationControlId
|
|
13
|
-
};
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import { createButtonAlignControl as c, createButtonBorderControl as _, createButtonBorderRadiusControl as T, createButtonColorControl as i, createButtonFitToContainerControl as B, createButtonFontFamilyControl as s, createButtonMarginsControl as S, createButtonPaddingsControl as E, createButtonTextControl as P, createButtonTextSizeControl as U, createButtonTextStyleAndFontColorControl as R, createImageMarginsControl as a, createImageSizeControl as M, createTextAlignControl as C, createTextBackgroundColorControl as r, createTextColorControl as O, createTextFontFamilyControl as I, createPaddingsControl as e, createTextSizeControl as N, createTextStyleControl as l } from "../../controlFactories.js";
|
|
2
|
-
import { RecommendationBlockId as o, RecommendationControlId as t } from "../constants.js";
|
|
3
|
-
const n = ".ins-recommendation-product-container", u = C(
|
|
4
|
-
t.NAME_ALIGN,
|
|
5
|
-
o.NAME,
|
|
6
|
-
n
|
|
7
|
-
), d = O(
|
|
8
|
-
t.NAME_COLOR,
|
|
9
|
-
o.NAME,
|
|
10
|
-
n
|
|
11
|
-
), m = N(
|
|
12
|
-
t.NAME_SIZE,
|
|
13
|
-
o.NAME,
|
|
14
|
-
n
|
|
15
|
-
), L = l(
|
|
16
|
-
t.NAME_STYLE,
|
|
17
|
-
o.NAME,
|
|
18
|
-
n
|
|
19
|
-
), F = I(
|
|
20
|
-
t.NAME_FONT_FAMILY,
|
|
21
|
-
o.NAME,
|
|
22
|
-
n
|
|
23
|
-
), g = r(
|
|
24
|
-
t.NAME_BACKGROUND,
|
|
25
|
-
o.NAME,
|
|
26
|
-
n
|
|
27
|
-
), G = e(
|
|
28
|
-
t.NAME_PADDINGS,
|
|
29
|
-
o.NAME,
|
|
30
|
-
n
|
|
31
|
-
), y = C(
|
|
32
|
-
t.PRICE_ALIGN,
|
|
33
|
-
o.PRICE,
|
|
34
|
-
n
|
|
35
|
-
), b = O(
|
|
36
|
-
t.PRICE_COLOR,
|
|
37
|
-
o.PRICE,
|
|
38
|
-
n
|
|
39
|
-
), x = N(
|
|
40
|
-
t.PRICE_SIZE,
|
|
41
|
-
o.PRICE,
|
|
42
|
-
n
|
|
43
|
-
), Y = l(
|
|
44
|
-
t.PRICE_STYLE,
|
|
45
|
-
o.PRICE,
|
|
46
|
-
n
|
|
47
|
-
), z = I(
|
|
48
|
-
t.PRICE_FONT_FAMILY,
|
|
49
|
-
o.PRICE,
|
|
50
|
-
n
|
|
51
|
-
), k = r(
|
|
52
|
-
t.PRICE_BACKGROUND,
|
|
53
|
-
o.PRICE,
|
|
54
|
-
n
|
|
55
|
-
), Z = e(
|
|
56
|
-
t.PRICE_PADDINGS,
|
|
57
|
-
o.PRICE,
|
|
58
|
-
n
|
|
59
|
-
), K = C(
|
|
60
|
-
t.OLD_PRICE_ALIGN,
|
|
61
|
-
o.OLD_PRICE,
|
|
62
|
-
n
|
|
63
|
-
), p = O(
|
|
64
|
-
t.OLD_PRICE_COLOR,
|
|
65
|
-
o.OLD_PRICE,
|
|
66
|
-
n
|
|
67
|
-
), X = N(
|
|
68
|
-
t.OLD_PRICE_SIZE,
|
|
69
|
-
o.OLD_PRICE,
|
|
70
|
-
n
|
|
71
|
-
), f = l(
|
|
72
|
-
t.OLD_PRICE_STYLE,
|
|
73
|
-
o.OLD_PRICE,
|
|
74
|
-
n
|
|
75
|
-
), h = I(
|
|
76
|
-
t.OLD_PRICE_FONT_FAMILY,
|
|
77
|
-
o.OLD_PRICE,
|
|
78
|
-
n
|
|
79
|
-
), j = r(
|
|
80
|
-
t.OLD_PRICE_BACKGROUND,
|
|
81
|
-
o.OLD_PRICE,
|
|
82
|
-
n
|
|
83
|
-
), q = e(
|
|
84
|
-
t.OLD_PRICE_PADDINGS,
|
|
85
|
-
o.OLD_PRICE,
|
|
86
|
-
n
|
|
87
|
-
), v = C(
|
|
88
|
-
t.OMNIBUS_PRICE_ALIGN,
|
|
89
|
-
o.OMNIBUS_PRICE,
|
|
90
|
-
n
|
|
91
|
-
), w = O(
|
|
92
|
-
t.OMNIBUS_PRICE_COLOR,
|
|
93
|
-
o.OMNIBUS_PRICE,
|
|
94
|
-
n
|
|
95
|
-
), H = N(
|
|
96
|
-
t.OMNIBUS_PRICE_SIZE,
|
|
97
|
-
o.OMNIBUS_PRICE,
|
|
98
|
-
n
|
|
99
|
-
), J = l(
|
|
100
|
-
t.OMNIBUS_PRICE_STYLE,
|
|
101
|
-
o.OMNIBUS_PRICE,
|
|
102
|
-
n
|
|
103
|
-
), Q = I(
|
|
104
|
-
t.OMNIBUS_PRICE_FONT_FAMILY,
|
|
105
|
-
o.OMNIBUS_PRICE,
|
|
106
|
-
n
|
|
107
|
-
), V = r(
|
|
108
|
-
t.OMNIBUS_PRICE_BACKGROUND,
|
|
109
|
-
o.OMNIBUS_PRICE,
|
|
110
|
-
n
|
|
111
|
-
), W = e(
|
|
112
|
-
t.OMNIBUS_PRICE_PADDINGS,
|
|
113
|
-
o.OMNIBUS_PRICE,
|
|
114
|
-
n
|
|
115
|
-
), $ = C(
|
|
116
|
-
t.OMNIBUS_DISCOUNT_ALIGN,
|
|
117
|
-
o.OMNIBUS_DISCOUNT,
|
|
118
|
-
n
|
|
119
|
-
), oo = O(
|
|
120
|
-
t.OMNIBUS_DISCOUNT_COLOR,
|
|
121
|
-
o.OMNIBUS_DISCOUNT,
|
|
122
|
-
n
|
|
123
|
-
), to = N(
|
|
124
|
-
t.OMNIBUS_DISCOUNT_SIZE,
|
|
125
|
-
o.OMNIBUS_DISCOUNT,
|
|
126
|
-
n
|
|
127
|
-
), no = l(
|
|
128
|
-
t.OMNIBUS_DISCOUNT_STYLE,
|
|
129
|
-
o.OMNIBUS_DISCOUNT,
|
|
130
|
-
n
|
|
131
|
-
), Co = I(
|
|
132
|
-
t.OMNIBUS_DISCOUNT_FONT_FAMILY,
|
|
133
|
-
o.OMNIBUS_DISCOUNT,
|
|
134
|
-
n
|
|
135
|
-
), ro = r(
|
|
136
|
-
t.OMNIBUS_DISCOUNT_BACKGROUND,
|
|
137
|
-
o.OMNIBUS_DISCOUNT,
|
|
138
|
-
n
|
|
139
|
-
), Oo = e(
|
|
140
|
-
t.OMNIBUS_DISCOUNT_PADDINGS,
|
|
141
|
-
o.OMNIBUS_DISCOUNT,
|
|
142
|
-
n
|
|
143
|
-
), Io = c(
|
|
144
|
-
t.BUTTON_ALIGN,
|
|
145
|
-
o.BUTTON,
|
|
146
|
-
n
|
|
147
|
-
), eo = _(
|
|
148
|
-
t.BUTTON_BORDER,
|
|
149
|
-
o.BUTTON,
|
|
150
|
-
n
|
|
151
|
-
), No = T(
|
|
152
|
-
t.BUTTON_BORDER_RADIUS,
|
|
153
|
-
o.BUTTON,
|
|
154
|
-
n
|
|
155
|
-
), lo = i(
|
|
156
|
-
t.BUTTON_COLOR,
|
|
157
|
-
o.BUTTON,
|
|
158
|
-
n
|
|
159
|
-
), co = s(
|
|
160
|
-
t.BUTTON_FONT_FAMILY,
|
|
161
|
-
o.BUTTON,
|
|
162
|
-
n
|
|
163
|
-
), _o = S(
|
|
164
|
-
t.BUTTON_MARGINS,
|
|
165
|
-
o.BUTTON,
|
|
166
|
-
n
|
|
167
|
-
), To = E(
|
|
168
|
-
t.BUTTON_PADDINGS,
|
|
169
|
-
o.BUTTON,
|
|
170
|
-
n
|
|
171
|
-
), io = P(
|
|
172
|
-
t.BUTTON_TEXT,
|
|
173
|
-
o.BUTTON,
|
|
174
|
-
n
|
|
175
|
-
), Bo = U(
|
|
176
|
-
t.BUTTON_TEXT_SIZE,
|
|
177
|
-
o.BUTTON,
|
|
178
|
-
n
|
|
179
|
-
), so = R(
|
|
180
|
-
t.BUTTON_TEXT_STYLE_AND_FONT_COLOR,
|
|
181
|
-
o.BUTTON,
|
|
182
|
-
n
|
|
183
|
-
), So = B(
|
|
184
|
-
t.BUTTON_FIT_TO_CONTENT,
|
|
185
|
-
o.BUTTON,
|
|
186
|
-
n
|
|
187
|
-
), Eo = M(
|
|
188
|
-
t.IMAGE_SIZE,
|
|
189
|
-
o.IMAGE,
|
|
190
|
-
n
|
|
191
|
-
), Po = a(
|
|
192
|
-
t.IMAGE_MARGINS,
|
|
193
|
-
o.IMAGE,
|
|
194
|
-
n
|
|
195
|
-
);
|
|
196
|
-
export {
|
|
197
|
-
Io as ButtonAlignControl,
|
|
198
|
-
eo as ButtonBorderControl,
|
|
199
|
-
No as ButtonBorderRadiusControl,
|
|
200
|
-
lo as ButtonColorControl,
|
|
201
|
-
So as ButtonFitToContentControl,
|
|
202
|
-
co as ButtonFontFamilyControl,
|
|
203
|
-
_o as ButtonMarginsControl,
|
|
204
|
-
To as ButtonPaddingsControl,
|
|
205
|
-
io as ButtonTextControl,
|
|
206
|
-
Bo as ButtonTextSizeControl,
|
|
207
|
-
so as ButtonTextStyleAndFontColorControl,
|
|
208
|
-
Po as ImageMarginsControl,
|
|
209
|
-
Eo as ImageSizeControl,
|
|
210
|
-
u as NameAlignControl,
|
|
211
|
-
g as NameBackgroundControl,
|
|
212
|
-
d as NameColorControl,
|
|
213
|
-
F as NameFontFamilyControl,
|
|
214
|
-
G as NamePaddingsControl,
|
|
215
|
-
m as NameSizeControl,
|
|
216
|
-
L as NameStyleControl,
|
|
217
|
-
K as OldPriceAlignControl,
|
|
218
|
-
j as OldPriceBackgroundControl,
|
|
219
|
-
p as OldPriceColorControl,
|
|
220
|
-
h as OldPriceFontFamilyControl,
|
|
221
|
-
q as OldPricePaddingsControl,
|
|
222
|
-
X as OldPriceSizeControl,
|
|
223
|
-
f as OldPriceStyleControl,
|
|
224
|
-
$ as OmnibusDiscountAlignControl,
|
|
225
|
-
ro as OmnibusDiscountBackgroundControl,
|
|
226
|
-
oo as OmnibusDiscountColorControl,
|
|
227
|
-
Co as OmnibusDiscountFontFamilyControl,
|
|
228
|
-
Oo as OmnibusDiscountPaddingsControl,
|
|
229
|
-
to as OmnibusDiscountSizeControl,
|
|
230
|
-
no as OmnibusDiscountStyleControl,
|
|
231
|
-
v as OmnibusPriceAlignControl,
|
|
232
|
-
V as OmnibusPriceBackgroundControl,
|
|
233
|
-
w as OmnibusPriceColorControl,
|
|
234
|
-
Q as OmnibusPriceFontFamilyControl,
|
|
235
|
-
W as OmnibusPricePaddingsControl,
|
|
236
|
-
H as OmnibusPriceSizeControl,
|
|
237
|
-
J as OmnibusPriceStyleControl,
|
|
238
|
-
y as PriceAlignControl,
|
|
239
|
-
k as PriceBackgroundControl,
|
|
240
|
-
b as PriceColorControl,
|
|
241
|
-
z as PriceFontFamilyControl,
|
|
242
|
-
Z as PricePaddingsControl,
|
|
243
|
-
x as PriceSizeControl,
|
|
244
|
-
Y as PriceStyleControl
|
|
245
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { ModificationDescription as m } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
-
import { CommonControl as c } from "../../common-control.js";
|
|
3
|
-
import { RecommendationControlId as d, RecommendationBlockId as a } from "../constants.js";
|
|
4
|
-
const n = {
|
|
5
|
-
TEXT_TRIM_ENABLED: "textTrimEnabled"
|
|
6
|
-
}, r = "text-trim-enabled", l = ".ins-recommendation-product-container";
|
|
7
|
-
class E extends c {
|
|
8
|
-
getId() {
|
|
9
|
-
return d.NAME_TEXT_TRIM;
|
|
10
|
-
}
|
|
11
|
-
getTemplate() {
|
|
12
|
-
return `
|
|
13
|
-
<div class="name-text-trim-control-container">
|
|
14
|
-
${this._GuTwoColumns([
|
|
15
|
-
this._GuLabel({ text: "Trim Long Text" }),
|
|
16
|
-
this._GuToggle(n.TEXT_TRIM_ENABLED)
|
|
17
|
-
])}
|
|
18
|
-
</div>
|
|
19
|
-
`;
|
|
20
|
-
}
|
|
21
|
-
onRender() {
|
|
22
|
-
this._setFormValues(), this._listenToFormUpdates();
|
|
23
|
-
}
|
|
24
|
-
onTemplateNodeUpdated(e) {
|
|
25
|
-
super.onTemplateNodeUpdated(e), this._setFormValues();
|
|
26
|
-
}
|
|
27
|
-
_setFormValues() {
|
|
28
|
-
const e = this._getCurrentTrimState();
|
|
29
|
-
this.api.updateValues({
|
|
30
|
-
[n.TEXT_TRIM_ENABLED]: e
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
_getCurrentTrimState() {
|
|
34
|
-
if (!this.currentNode || !("hasClass" in this.currentNode))
|
|
35
|
-
return !1;
|
|
36
|
-
if (this.currentNode.hasClass(r))
|
|
37
|
-
return !0;
|
|
38
|
-
const e = this.currentNode.closest(l);
|
|
39
|
-
if (!e)
|
|
40
|
-
return !1;
|
|
41
|
-
const t = e.querySelector(
|
|
42
|
-
`[esd-extension-block-id="${a.NAME}"]`
|
|
43
|
-
);
|
|
44
|
-
return t && "hasClass" in t ? t.hasClass(r) : !1;
|
|
45
|
-
}
|
|
46
|
-
_onTextTrimChange(e) {
|
|
47
|
-
if (!this.currentNode || !("closest" in this.currentNode))
|
|
48
|
-
return;
|
|
49
|
-
const t = this.currentNode.closest(l);
|
|
50
|
-
if (!t || !("querySelectorAll" in t))
|
|
51
|
-
return;
|
|
52
|
-
const s = Array.from(
|
|
53
|
-
t.querySelectorAll(`[esd-extension-block-id="${a.NAME}"]`)
|
|
54
|
-
);
|
|
55
|
-
if (!s.length)
|
|
56
|
-
return;
|
|
57
|
-
const o = this.api.getDocumentModifier();
|
|
58
|
-
s.forEach((i) => {
|
|
59
|
-
e ? o.modifyHtml(i).setClass(r) : o.modifyHtml(i).removeClass(r);
|
|
60
|
-
}), o.apply(
|
|
61
|
-
new m(
|
|
62
|
-
e ? "Enable product name text trimming" : "Disable product name text trimming"
|
|
63
|
-
)
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
_listenToFormUpdates() {
|
|
67
|
-
this.api.onValueChanged(n.TEXT_TRIM_ENABLED, (e) => {
|
|
68
|
-
this._onTextTrimChange(e);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
export {
|
|
73
|
-
E as NameTextTrimControl
|
|
74
|
-
};
|