@useinsider/guido 1.0.3-beta.8496f2a → 1.0.3-beta.8646ecc
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 +32 -3
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +73 -79
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/header/RightSlot.vue.js +1 -1
- package/dist/components/organisms/header/RightSlot.vue2.js +20 -21
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -20
- package/dist/composables/useActionsApi.js +1 -1
- package/dist/composables/useGuidoActions.js +9 -19
- package/dist/composables/useHtmlCompiler.js +13 -15
- package/dist/composables/useHtmlValidator.js +35 -36
- package/dist/composables/useStripo.js +40 -46
- package/dist/config/compiler/unsubscribeCompilerRules.js +28 -33
- package/dist/enums/defaults.js +1 -2
- package/dist/enums/onboarding.js +3 -7
- package/dist/enums/unsubscribe.js +25 -27
- package/dist/extensions/Blocks/Checkbox/control.js +14 -15
- package/dist/extensions/Blocks/Checkbox/template.js +9 -14
- package/dist/extensions/Blocks/Items/block.js +28 -29
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +57 -151
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +2 -2
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +117 -149
- package/dist/extensions/Blocks/Items/enums/productEnums.js +5 -83
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +1 -7
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +56 -57
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +55 -54
- package/dist/extensions/Blocks/Items/settingsPanel.js +31 -56
- package/dist/extensions/Blocks/Items/template.js +59 -138
- package/dist/extensions/Blocks/RadioButton/control.js +17 -18
- package/dist/extensions/Blocks/RadioButton/template.js +9 -18
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +1 -1
- package/dist/extensions/Blocks/Unsubscribe/block.js +27 -27
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +19 -25
- package/dist/extensions/DynamicContent/dynamic-content.js +33 -128
- package/dist/guido.css +1 -1
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
- package/dist/node_modules/lodash-es/keysIn.js +3 -3
- package/dist/package.json.js +1 -1
- package/dist/src/@types/generic.d.ts +6 -27
- package/dist/src/components/Guido.vue.d.ts +2 -3
- package/dist/src/composables/useGuidoActions.d.ts +0 -9
- package/dist/src/enums/onboarding.d.ts +0 -4
- package/dist/src/extensions/Blocks/Checkbox/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/block.d.ts +0 -14
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +7 -20
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +2 -8
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -8
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +0 -6
- package/dist/src/extensions/Blocks/Items/template.d.ts +1 -9
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -1
- package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +2 -9
- package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +2 -52
- package/dist/src/stores/config.d.ts +2 -3
- package/dist/src/stores/dynamic-content.d.ts +3 -3
- package/dist/src/stores/editor.d.ts +1 -1
- package/dist/src/stores/onboarding.d.ts +1 -335
- package/dist/src/stores/preview.d.ts +1 -1
- package/dist/src/stores/recommendation.d.ts +1 -1
- package/dist/src/stores/save-as-template.d.ts +1 -1
- package/dist/src/stores/toaster.d.ts +1 -1
- package/dist/src/stores/unsubscribe.d.ts +1 -1
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/genericUtil.d.ts +0 -1
- package/dist/stores/config.js +5 -5
- package/dist/stores/dynamic-content.js +2 -2
- package/dist/stores/editor.js +1 -1
- package/dist/stores/onboarding.js +36 -44
- package/dist/stores/preview.js +1 -1
- package/dist/stores/recommendation.js +3 -3
- package/dist/stores/save-as-template.js +2 -2
- package/dist/stores/toaster.js +1 -1
- package/dist/stores/unsubscribe.js +1 -1
- package/dist/stores/version-history.js +4 -4
- package/dist/utils/genericUtil.js +6 -17
- package/package.json +11 -4
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +0 -99
- package/dist/config/compiler/itemsCompilerRules.js +0 -14
- package/dist/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/lodash-es/_SetCache.js +0 -13
- package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
- package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
- package/dist/node_modules/lodash-es/_arraySome.js +0 -9
- package/dist/node_modules/lodash-es/_baseEach.js +0 -6
- package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
- package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
- package/dist/node_modules/lodash-es/_baseGet.js +0 -11
- package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
- package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
- package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
- package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
- package/dist/node_modules/lodash-es/_baseMap.js +0 -11
- package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
- package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
- package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
- package/dist/node_modules/lodash-es/_baseRange.js +0 -9
- package/dist/node_modules/lodash-es/_baseToString.js +0 -18
- package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
- package/dist/node_modules/lodash-es/_createRange.js +0 -11
- package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
- package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
- package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
- package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
- package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/lodash-es/_getTag.js +0 -28
- package/dist/node_modules/lodash-es/_hasPath.js +0 -19
- package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
- package/dist/node_modules/lodash-es/_isKey.js +0 -12
- package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
- package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
- package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
- package/dist/node_modules/lodash-es/flatMap.js +0 -8
- package/dist/node_modules/lodash-es/get.js +0 -8
- package/dist/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/lodash-es/map.js +0 -11
- package/dist/node_modules/lodash-es/property.js +0 -10
- package/dist/node_modules/lodash-es/range.js +0 -5
- package/dist/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/lodash-es/toFinite.js +0 -14
- package/dist/node_modules/lodash-es/toNumber.js +0 -22
- package/dist/node_modules/lodash-es/toString.js +0 -7
- package/dist/src/components/organisms/onboarding/ItemsOnboarding.vue.d.ts +0 -2
- package/dist/src/config/compiler/itemsCompilerRules.d.ts +0 -2
- package/dist/src/utils/environmentUtil.d.ts +0 -5
- package/dist/src/utils/pairProductVariables.d.ts +0 -7
- package/dist/utils/environmentUtil.js +0 -4
- package/dist/utils/pairProductVariables.js +0 -136
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
const t =
|
|
2
|
-
<table class="es-left ins-product-wrapper ins-product-cart" width="100%" cellspacing="0" cellpadding="0">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
const t = `<td align="center" class="ins-product-td items-block items-block-v2">
|
|
2
|
+
<table class="es-left ins-product-wrapper ins-product-cart" width="100%" cellspacing="0" cellpadding="0">
|
|
3
|
+
{-{-CONFIG_BLOCK-}-}
|
|
4
|
+
<tbody>
|
|
5
|
+
<tr>
|
|
6
|
+
<td style="padding: 16px 9px;">
|
|
7
|
+
<table class="es-left esdev-disable-select" cellspacing="0" cellpadding="0" align="left"
|
|
8
|
+
width="100%">
|
|
9
|
+
<tbody>
|
|
10
|
+
<tr>
|
|
11
|
+
<td class="product-image-class" data-slot-1>
|
|
12
|
+
{-{-PRODUCT_IMAGE-}-}
|
|
13
|
+
</td>
|
|
14
|
+
<td class="product-name-class" data-slot-2 width="130px">
|
|
15
|
+
<table width="130">
|
|
16
|
+
<tbody>
|
|
17
|
+
{-{-PRODUCT_NAME-}-}
|
|
18
|
+
</tbody>
|
|
19
|
+
</table>
|
|
20
|
+
</td>
|
|
21
|
+
<td class="product-quantity-class" data-slot-3>
|
|
22
|
+
<table width="100%">
|
|
23
|
+
<tbody>
|
|
24
|
+
{-{-PRODUCT_QUANTITY-}-}
|
|
25
|
+
</tbody>
|
|
26
|
+
</table>
|
|
27
|
+
</td>
|
|
28
|
+
<td class="product-price-class" data-slot-4>
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</table>
|
|
30
|
+
<table width="100%">
|
|
31
|
+
<tbody>
|
|
32
|
+
{-{-PRODUCT_PRICE-}-}
|
|
33
|
+
</tbody>
|
|
34
|
+
</table>
|
|
35
|
+
</td>
|
|
36
|
+
<td class="product-original-price-class" data-slot-5>
|
|
37
|
+
<table width="100%">
|
|
38
|
+
<tbody>
|
|
39
|
+
{-{-PRODUCT_ORIGINAL_PRICE-}-}
|
|
40
|
+
</tbody>
|
|
41
|
+
</table>
|
|
42
|
+
</td>
|
|
43
|
+
<td class="product-button-class" data-slot-6>
|
|
44
|
+
<table width="100%">
|
|
45
|
+
<tbody>
|
|
46
|
+
{-{-PRODUCT_BUTTON-}-}
|
|
47
|
+
</tbody>
|
|
48
|
+
</table>
|
|
49
|
+
</td>
|
|
50
|
+
</tr>
|
|
51
|
+
</tbody>
|
|
52
|
+
</table>
|
|
53
|
+
</td>
|
|
54
|
+
</tr>
|
|
55
|
+
</tbody>
|
|
56
|
+
</table>
|
|
56
57
|
</td>
|
|
57
58
|
`;
|
|
58
59
|
export {
|
|
@@ -1,93 +1,74 @@
|
|
|
1
|
-
import { SettingsPanelRegistry as O, SettingsPanelTab as T, SettingsTab as _ } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
-
import { BLOCK_ID as
|
|
3
|
-
import { COMPOSITION_CONTROL_BLOCK_ID as
|
|
4
|
-
import { CONTROL_BLOCK_ID as
|
|
1
|
+
import { SettingsPanelRegistry as O, SettingsPanelTab as T, SettingsTab as _, ContainerControls as R } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { BLOCK_ID as A } from "./block.js";
|
|
3
|
+
import { COMPOSITION_CONTROL_BLOCK_ID as S } from "./controls/cardComposition.js";
|
|
4
|
+
import { CONTROL_BLOCK_ID as C } from "./controls/settingsControl.js";
|
|
5
5
|
import { ItemsBlockId as E, ItemsBlockControlId as I } from "./enums/controlEnums.js";
|
|
6
|
-
class
|
|
6
|
+
class t extends O {
|
|
7
7
|
registerBlockControls(N) {
|
|
8
|
-
N[
|
|
8
|
+
N[A] = [
|
|
9
9
|
new T(
|
|
10
10
|
_.SETTINGS,
|
|
11
11
|
[
|
|
12
|
-
|
|
12
|
+
C,
|
|
13
|
+
R.EXTERNAL_INDENTS
|
|
13
14
|
]
|
|
14
15
|
),
|
|
15
16
|
new T(
|
|
16
17
|
"Card Composition",
|
|
17
18
|
[
|
|
18
|
-
|
|
19
|
+
S
|
|
19
20
|
]
|
|
20
21
|
).withLabel("Card Composition")
|
|
21
22
|
], N[E.ORIGINAL_PRICE] = [
|
|
22
23
|
new T(
|
|
23
24
|
_.SETTINGS,
|
|
24
|
-
[
|
|
25
|
-
I.ORIGINAL_PRICE_STYLE,
|
|
26
|
-
I.ORIGINAL_PRICE_ALIGN,
|
|
27
|
-
I.ORIGINAL_PRICE_PADDINGS
|
|
28
|
-
]
|
|
29
|
-
),
|
|
30
|
-
new T(
|
|
31
|
-
_.STYLES,
|
|
32
25
|
[
|
|
33
26
|
I.ORIGINAL_PRICE_COLOR,
|
|
27
|
+
I.ORIGINAL_PRICE_ALIGN,
|
|
34
28
|
I.ORIGINAL_PRICE_FONT_FAMILY,
|
|
35
|
-
I.ORIGINAL_PRICE_SIZE
|
|
29
|
+
I.ORIGINAL_PRICE_SIZE,
|
|
30
|
+
I.ORIGINAL_PRICE_STYLE,
|
|
31
|
+
I.ORIGINAL_PRICE_PADDINGS
|
|
36
32
|
]
|
|
37
33
|
)
|
|
38
34
|
], N[E.PRICE] = [
|
|
39
35
|
new T(
|
|
40
36
|
_.SETTINGS,
|
|
41
37
|
[
|
|
42
|
-
I.
|
|
38
|
+
I.PRICE_COLOR,
|
|
43
39
|
I.PRICE_ALIGN,
|
|
40
|
+
I.PRICE_FONT_FAMILY,
|
|
41
|
+
I.PRICE_SIZE,
|
|
42
|
+
I.PRICE_STYLE,
|
|
44
43
|
I.PRICE_HIDE_DISCOUNT,
|
|
45
44
|
I.PRICE_FORMATTED_PRICE,
|
|
46
45
|
I.PRICE_CURRENCY_SYMBOL,
|
|
47
46
|
I.PRICE_CURRENCY_LOCATION,
|
|
48
47
|
I.PRICE_PADDINGS
|
|
49
48
|
]
|
|
50
|
-
),
|
|
51
|
-
new T(
|
|
52
|
-
_.STYLES,
|
|
53
|
-
[
|
|
54
|
-
I.PRICE_COLOR,
|
|
55
|
-
I.PRICE_FONT_FAMILY,
|
|
56
|
-
I.PRICE_SIZE
|
|
57
|
-
]
|
|
58
49
|
)
|
|
59
50
|
], N[E.NAME] = [
|
|
60
51
|
new T(
|
|
61
52
|
_.SETTINGS,
|
|
62
53
|
[
|
|
63
|
-
I.
|
|
54
|
+
I.NAME_COLOR,
|
|
64
55
|
I.NAME_ALIGN,
|
|
65
|
-
I.NAME_TRIMMING,
|
|
66
|
-
I.NAME_PADDINGS
|
|
67
|
-
]
|
|
68
|
-
),
|
|
69
|
-
new T(
|
|
70
|
-
_.STYLES,
|
|
71
|
-
[
|
|
72
56
|
I.NAME_FONT_FAMILY,
|
|
73
57
|
I.NAME_SIZE,
|
|
74
|
-
I.
|
|
58
|
+
I.NAME_STYLE,
|
|
59
|
+
I.NAME_TRIMMING,
|
|
60
|
+
I.NAME_PADDINGS
|
|
75
61
|
]
|
|
76
62
|
)
|
|
77
63
|
], N[E.QUANTITY] = [
|
|
78
64
|
new T(
|
|
79
65
|
_.SETTINGS,
|
|
80
66
|
[
|
|
81
|
-
I.
|
|
82
|
-
I.QUANTITY_STYLE
|
|
83
|
-
]
|
|
84
|
-
),
|
|
85
|
-
new T(
|
|
86
|
-
_.STYLES,
|
|
87
|
-
[
|
|
67
|
+
I.QUANTITY_COLOR,
|
|
88
68
|
I.QUANTITY_ALIGN,
|
|
69
|
+
I.QUANTITY_FONT_FAMILY,
|
|
89
70
|
I.QUANTITY_SIZE,
|
|
90
|
-
I.
|
|
71
|
+
I.QUANTITY_STYLE,
|
|
91
72
|
I.QUANTITY_PADDINGS
|
|
92
73
|
]
|
|
93
74
|
)
|
|
@@ -106,26 +87,20 @@ class U extends O {
|
|
|
106
87
|
[
|
|
107
88
|
I.BUTTON_LINK,
|
|
108
89
|
I.BUTTON_TEXT,
|
|
109
|
-
I.BUTTON_ALIGN,
|
|
110
|
-
I.BUTTON_PADDINGS,
|
|
111
|
-
I.BUTTON_MARGINS
|
|
112
|
-
]
|
|
113
|
-
),
|
|
114
|
-
new T(
|
|
115
|
-
_.STYLES,
|
|
116
|
-
[
|
|
117
|
-
I.BUTTON_COLOR,
|
|
118
90
|
I.BUTTON_FONT_FAMILY,
|
|
119
91
|
I.BUTTON_TEXT_SIZE,
|
|
120
|
-
I.
|
|
121
|
-
I.
|
|
92
|
+
I.BUTTON_COLOR,
|
|
93
|
+
I.BUTTON_BORDER,
|
|
122
94
|
I.BUTTON_BORDER_RADIUS,
|
|
123
|
-
I.
|
|
95
|
+
I.BUTTON_ALIGN,
|
|
96
|
+
I.BUTTON_FIT_TO_CONTENT,
|
|
97
|
+
I.BUTTON_PADDINGS,
|
|
98
|
+
I.BUTTON_MARGINS
|
|
124
99
|
]
|
|
125
100
|
)
|
|
126
101
|
];
|
|
127
102
|
}
|
|
128
103
|
}
|
|
129
104
|
export {
|
|
130
|
-
|
|
105
|
+
t as SettingsPanel
|
|
131
106
|
};
|
|
@@ -1,189 +1,110 @@
|
|
|
1
|
-
import { BlockType as
|
|
2
|
-
import { ItemsBlockId as
|
|
3
|
-
import { productPairs as
|
|
4
|
-
import { ItemInCartOptions as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
let [R] =
|
|
8
|
-
const
|
|
9
|
-
<${
|
|
10
|
-
${
|
|
11
|
-
${
|
|
12
|
-
${
|
|
13
|
-
${
|
|
14
|
-
esd-extension-block-id="${
|
|
15
|
-
data-
|
|
16
|
-
|
|
17
|
-
data-type="${a}"
|
|
18
|
-
data-number="${t}"
|
|
1
|
+
import { BlockType as i, BlockAttr as l } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { ItemsBlockId as n } from "./enums/controlEnums.js";
|
|
3
|
+
import { productPairs as e } from "./enums/productEnums.js";
|
|
4
|
+
import { ItemInCartOptions as N, SETTINGS_ENUMS as r } from "./enums/settingsEnums.js";
|
|
5
|
+
import d from "./layouts/horizontal.html.js";
|
|
6
|
+
import P from "./layouts/vertical.html.js";
|
|
7
|
+
let [R] = e.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [A] = e.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [I] = e.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [a] = e.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [p] = e.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
|
|
8
|
+
const $ = () => `
|
|
9
|
+
<${i.BLOCK_IMAGE}
|
|
10
|
+
${l.BLOCK_IMAGE.src}="${R}"
|
|
11
|
+
${l.BLOCK_IMAGE.alt}="Product Image"
|
|
12
|
+
${l.BLOCK_IMAGE.href}="#"
|
|
13
|
+
${l.BLOCK_IMAGE.width}="70"
|
|
14
|
+
esd-extension-block-id="${n.IMAGE}"
|
|
15
|
+
data-type="CART_ITEMS"
|
|
16
|
+
data-number="1"
|
|
19
17
|
/>
|
|
20
|
-
`,
|
|
21
|
-
<${
|
|
18
|
+
`, B = () => `
|
|
19
|
+
<${i.BLOCK_TEXT}
|
|
22
20
|
width="100%"
|
|
23
21
|
align="center"
|
|
24
22
|
class="es-p10"
|
|
25
|
-
|
|
26
|
-
esd-extension-block-id="${d.NAME}"
|
|
23
|
+
esd-extension-block-id="${n.NAME}"
|
|
27
24
|
>
|
|
28
|
-
<p
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
text-decoration:none;
|
|
33
|
-
font-size: inherit;
|
|
34
|
-
font-weight: inherit;
|
|
35
|
-
line-height: inherit;
|
|
36
|
-
font-family: inherit;
|
|
37
|
-
color: inherit;
|
|
38
|
-
"
|
|
39
|
-
product-attr="name"
|
|
40
|
-
data-slot-2
|
|
41
|
-
width="100%">
|
|
42
|
-
${C}
|
|
43
|
-
</a>
|
|
25
|
+
<p
|
|
26
|
+
data-slot-2
|
|
27
|
+
width="100%">
|
|
28
|
+
${A}
|
|
44
29
|
</p>
|
|
45
|
-
</${
|
|
46
|
-
`, S = (
|
|
30
|
+
</${i.BLOCK_TEXT}>
|
|
31
|
+
`, S = (T, t) => {
|
|
47
32
|
let o = I;
|
|
48
|
-
if (
|
|
49
|
-
const
|
|
50
|
-
o = (
|
|
33
|
+
if (T && T.trim()) {
|
|
34
|
+
const E = ` ${T.trim()} `;
|
|
35
|
+
o = (t || "0") === "1" ? `${I}${E}` : `${E}${I}`;
|
|
51
36
|
}
|
|
52
|
-
const r = c === "1" ? "after" : "before", E = `data-formated="${n ? "true" : "false"}"`, s = `data-curency="${r}"`;
|
|
53
37
|
return `
|
|
54
|
-
<${
|
|
55
|
-
esd-extension-block-id="${
|
|
38
|
+
<${i.BLOCK_TEXT}
|
|
39
|
+
esd-extension-block-id="${n.PRICE}"
|
|
56
40
|
class="items-block-price"
|
|
57
41
|
width="100%"
|
|
58
42
|
align="center"
|
|
59
43
|
>
|
|
60
|
-
<p
|
|
61
|
-
product-attr="price"
|
|
62
|
-
contenteditable="false"
|
|
63
|
-
data-slot-4
|
|
64
|
-
data-type="${a}"
|
|
65
|
-
data-number="${t}"
|
|
66
|
-
${E}
|
|
67
|
-
${s}
|
|
68
|
-
${e ? `data-currency_symbol="${e}"` : ""}
|
|
69
|
-
>
|
|
44
|
+
<p contenteditable="false">
|
|
70
45
|
${o}
|
|
71
46
|
</p>
|
|
72
|
-
</${
|
|
47
|
+
</${i.BLOCK_TEXT}>
|
|
73
48
|
`;
|
|
74
|
-
},
|
|
75
|
-
let o =
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
o = (
|
|
49
|
+
}, F = (T, t) => {
|
|
50
|
+
let o = a;
|
|
51
|
+
if (T && T.trim()) {
|
|
52
|
+
const E = ` ${T.trim()} `;
|
|
53
|
+
o = (t || "0") === "1" ? `${a}${E}` : `${E}${a}`;
|
|
79
54
|
}
|
|
80
|
-
const r = c === "1" ? "after" : "before", E = `data-formated="${n ? "true" : "false"}"`, s = `data-curency="${r}"`;
|
|
81
55
|
return `
|
|
82
|
-
<${
|
|
56
|
+
<${i.BLOCK_TEXT}
|
|
83
57
|
class="items-block-price"
|
|
84
|
-
esd-extension-block-id="${
|
|
58
|
+
esd-extension-block-id="${n.ORIGINAL_PRICE}"
|
|
85
59
|
width="100%"
|
|
86
60
|
align="center"
|
|
87
61
|
>
|
|
88
62
|
<p
|
|
89
|
-
product-attr="originalPrice"
|
|
90
63
|
contenteditable="false"
|
|
91
|
-
data-slot-5
|
|
92
64
|
style="color: #cc0000"
|
|
93
|
-
data-type="${a}"
|
|
94
|
-
data-number="${t}"
|
|
95
|
-
${E}
|
|
96
|
-
${s}
|
|
97
|
-
${e ? `data-currency_symbol="${e}"` : ""}
|
|
98
65
|
>
|
|
99
66
|
<s>${o}</s>
|
|
100
67
|
</p>
|
|
101
|
-
</${
|
|
68
|
+
</${i.BLOCK_TEXT}>
|
|
102
69
|
`;
|
|
103
|
-
},
|
|
104
|
-
<${
|
|
70
|
+
}, L = () => `
|
|
71
|
+
<${i.BLOCK_TEXT}
|
|
105
72
|
width="100%"
|
|
106
73
|
align="center"
|
|
107
74
|
class="es-p10"
|
|
108
|
-
esd-extension-block-id="${
|
|
75
|
+
esd-extension-block-id="${n.QUANTITY}"
|
|
109
76
|
>
|
|
110
77
|
<p
|
|
111
|
-
product-attr="quantity"
|
|
112
78
|
data-slot-3
|
|
113
79
|
contenteditable="false"
|
|
114
80
|
width="100%">
|
|
115
|
-
${
|
|
81
|
+
${p}
|
|
116
82
|
</p>
|
|
117
|
-
</${
|
|
118
|
-
`,
|
|
119
|
-
<${
|
|
83
|
+
</${i.BLOCK_TEXT}>
|
|
84
|
+
`, g = () => `
|
|
85
|
+
<${i.BLOCK_BUTTON}
|
|
120
86
|
width="100%"
|
|
121
87
|
class="ins-button"
|
|
122
88
|
name="buy-button"
|
|
123
89
|
caption="Buy"
|
|
124
90
|
align="center"
|
|
125
|
-
esd-extension-block-id="${
|
|
126
|
-
product-attr="button"
|
|
127
|
-
data-slot-6
|
|
128
|
-
data-type="${a}"
|
|
129
|
-
data-number="${t}"
|
|
91
|
+
esd-extension-block-id="${n.BUTTON}"
|
|
130
92
|
>Buy
|
|
131
|
-
</${
|
|
93
|
+
</${i.BLOCK_BUTTON}>
|
|
132
94
|
`, U = () => `
|
|
133
95
|
<esd-config-block style="display: none;"></esd-config-block>
|
|
134
|
-
`,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"{-{-PRODUCT_PRICE-}-}",
|
|
141
|
-
S(t, n, c, o, r)
|
|
142
|
-
).replace(
|
|
143
|
-
"{-{-PRODUCT_ORIGINAL_PRICE-}-}",
|
|
144
|
-
L(
|
|
145
|
-
t,
|
|
146
|
-
n,
|
|
147
|
-
c,
|
|
148
|
-
o,
|
|
149
|
-
r
|
|
150
|
-
)
|
|
151
|
-
).replace("{-{-PRODUCT_QUANTITY-}-}", b()).replace("{-{-PRODUCT_BUTTON-}-}", h(t, n)).replace("{-{-CONFIG_BLOCK-}-}", U());
|
|
152
|
-
};
|
|
153
|
-
function x({
|
|
154
|
-
orientation: a,
|
|
155
|
-
itemsType: t = O.ITEMS_TYPE.CART_ITEMS,
|
|
156
|
-
itemId: n,
|
|
157
|
-
currencySymbol: e,
|
|
96
|
+
`, s = (T, t, o) => T.replace("{-{-PRODUCT_IMAGE-}-}", $()).replace("{-{-PRODUCT_NAME-}-}", B()).replace("{-{-PRODUCT_PRICE-}-}", S(t, o)).replace("{-{-PRODUCT_ORIGINAL_PRICE-}-}", F(t, o)).replace("{-{-PRODUCT_QUANTITY-}-}", L()).replace("{-{-PRODUCT_BUTTON-}-}", g()).replace("{-{-CONFIG_BLOCK-}-}", U());
|
|
97
|
+
function u({
|
|
98
|
+
orientation: T,
|
|
99
|
+
itemsType: t = r.ITEMS_TYPE.CART_ITEMS,
|
|
100
|
+
itemId: o,
|
|
101
|
+
currencySymbol: E,
|
|
158
102
|
currencyLocation: c,
|
|
159
|
-
formattedPrice:
|
|
103
|
+
formattedPrice: _ = !0
|
|
160
104
|
}) {
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
if (r >= 0)
|
|
164
|
-
E = String(r + 1);
|
|
165
|
-
else if (n) {
|
|
166
|
-
const s = n.match(/\((\d+)\)/);
|
|
167
|
-
s && s[1] && ([, E] = s);
|
|
168
|
-
}
|
|
169
|
-
return R = i.PAIRS_FOR_EXTENSION.imageSrc[t].DEFAULT[r >= 0 ? r : 0], C = i.PAIRS_FOR_EXTENSION.name[t].DEFAULT[r >= 0 ? r : 0], I = o ? i.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE_FORMATTED : i.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE, $ = o ? i.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE_FORMATTED : i.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE, u = i.PAIRS_FOR_EXTENSION.quantity[t].DEFAULT, a === O.ORIENTATION.VERTICAL ? p(
|
|
170
|
-
B,
|
|
171
|
-
t,
|
|
172
|
-
E,
|
|
173
|
-
a,
|
|
174
|
-
o,
|
|
175
|
-
e,
|
|
176
|
-
c
|
|
177
|
-
) : p(
|
|
178
|
-
f,
|
|
179
|
-
t,
|
|
180
|
-
E,
|
|
181
|
-
a,
|
|
182
|
-
o,
|
|
183
|
-
e,
|
|
184
|
-
c
|
|
185
|
-
);
|
|
105
|
+
const O = N[t].findIndex((C) => C.value === o);
|
|
106
|
+
return R = e.PAIRS_FOR_EXTENSION.imageSrc[t].DEFAULT[O], A = e.PAIRS_FOR_EXTENSION.name[t].DEFAULT[O], I = _ ? e.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE_FORMATTED : e.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE, a = _ ? e.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE_FORMATTED : e.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE, p = e.PAIRS_FOR_EXTENSION.quantity[t].DEFAULT, T === r.ORIENTATION.VERTICAL ? s(P, E, c) : s(d, E, c);
|
|
186
107
|
}
|
|
187
108
|
export {
|
|
188
|
-
|
|
109
|
+
u as getDefaultTemplate
|
|
189
110
|
};
|
|
@@ -2,10 +2,10 @@ var d = Object.defineProperty;
|
|
|
2
2
|
var l = (r, n, t) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
|
|
3
3
|
var o = (r, n, t) => l(r, typeof n != "symbol" ? n + "" : n, t);
|
|
4
4
|
import { useHttp as L } from "../../../composables/useHttp.js";
|
|
5
|
-
import { DEFAULT_UNSUBSCRIBE_GROUP as
|
|
5
|
+
import { DEFAULT_UNSUBSCRIBE_GROUP as E } from "../../../enums/unsubscribe.js";
|
|
6
6
|
import { Control as p, UIElementType as i, UEAttr as e, ModificationDescription as h } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
|
-
const m = "ui-elements-radio-button",
|
|
8
|
-
class
|
|
7
|
+
const m = "ui-elements-radio-button", a = "select", { get: $ } = L();
|
|
8
|
+
class _ extends p {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
o(this, "currentNode");
|
|
@@ -16,16 +16,15 @@ class S extends p {
|
|
|
16
16
|
return m;
|
|
17
17
|
}
|
|
18
18
|
_setFormValues() {
|
|
19
|
-
if (this.
|
|
19
|
+
if (this.currentNode && "getAttribute" in this.currentNode) {
|
|
20
20
|
const t = this.currentNode.getAttribute("id");
|
|
21
21
|
if (t) {
|
|
22
|
-
const s = t ===
|
|
23
|
-
s && (this.selectedUnsubGroup = s
|
|
22
|
+
const s = t === E.sendGridId ? t : Number(t);
|
|
23
|
+
s && (this.selectedUnsubGroup = s, this.api.updateValues({
|
|
24
|
+
[a]: this.selectedUnsubGroup
|
|
25
|
+
}));
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
|
-
this.api.updateValues({
|
|
27
|
-
[u]: this.selectedUnsubGroup
|
|
28
|
-
});
|
|
29
28
|
}
|
|
30
29
|
_getLabel(t, s = `${Math.random()}`) {
|
|
31
30
|
return `
|
|
@@ -55,7 +54,7 @@ class S extends p {
|
|
|
55
54
|
</${i.LABEL}>
|
|
56
55
|
|
|
57
56
|
<${i.SELECTPICKER}
|
|
58
|
-
${e.SELECTPICKER.name}="${
|
|
57
|
+
${e.SELECTPICKER.name}="${a}"
|
|
59
58
|
${e.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
|
|
60
59
|
${this._getSelect()}
|
|
61
60
|
</${i.SELECTPICKER}>
|
|
@@ -67,27 +66,27 @@ class S extends p {
|
|
|
67
66
|
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new h(`Updated text to ${t}`));
|
|
68
67
|
}
|
|
69
68
|
_listenToFormUpdates() {
|
|
70
|
-
this.api.onValueChanged(
|
|
69
|
+
this.api.onValueChanged(a, (t) => this._onSelectChange(t));
|
|
71
70
|
}
|
|
72
71
|
onTemplateNodeUpdated(t) {
|
|
73
|
-
this.currentNode = t
|
|
72
|
+
this.currentNode = t;
|
|
74
73
|
}
|
|
75
74
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
76
75
|
async onRender() {
|
|
77
76
|
const t = await $(
|
|
78
77
|
"/unsubscribe-groups/unsubscribe-list"
|
|
79
|
-
), s = [
|
|
80
|
-
[e.SELECT_ITEM.text]:
|
|
81
|
-
[e.SELECT_ITEM.value]:
|
|
78
|
+
), s = [E, ...t.data], c = s.map((u) => ({
|
|
79
|
+
[e.SELECT_ITEM.text]: u.name,
|
|
80
|
+
[e.SELECT_ITEM.value]: u.sendGridId
|
|
82
81
|
}));
|
|
83
82
|
this.unsubList = s, this.api.setUIEAttribute(
|
|
84
|
-
|
|
83
|
+
a,
|
|
85
84
|
e.SELECTPICKER.items,
|
|
86
|
-
|
|
85
|
+
c
|
|
87
86
|
), this._setFormValues(), this._listenToFormUpdates();
|
|
88
87
|
}
|
|
89
88
|
}
|
|
90
89
|
export {
|
|
91
90
|
m as CONTROL_BLOCK_ID,
|
|
92
|
-
|
|
91
|
+
_ as RadioButtonControl
|
|
93
92
|
};
|
|
@@ -5,7 +5,7 @@ const e = {
|
|
|
5
5
|
YES: "Yes",
|
|
6
6
|
NO: "No"
|
|
7
7
|
}, d = `
|
|
8
|
-
<td align="left" class="radio-button
|
|
8
|
+
<td align="left" class="radio-button-v2 esd-block-radio es-p10t es-p10b es-p30r es-p30l">
|
|
9
9
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
|
10
10
|
<tbody>
|
|
11
11
|
<tr>
|
|
@@ -75,21 +75,12 @@ const e = {
|
|
|
75
75
|
</tbody>
|
|
76
76
|
</table>
|
|
77
77
|
</td>
|
|
78
|
-
`,
|
|
79
|
-
<td
|
|
80
|
-
align="left"
|
|
81
|
-
esd-extension-block-id="radio-button-block"
|
|
78
|
+
`, l = `
|
|
79
|
+
<td
|
|
80
|
+
align="left"
|
|
81
|
+
esd-extension-block-id="radio-button-block"
|
|
82
82
|
esd-handler-name="esd-extension-RadioButtonBlock"
|
|
83
|
-
class="
|
|
84
|
-
radio-button
|
|
85
|
-
radio-button-v2
|
|
86
|
-
esd-block-ra
|
|
87
|
-
esd-radio-button-block
|
|
88
|
-
esd-extension-block
|
|
89
|
-
es-p10t
|
|
90
|
-
es-p10b
|
|
91
|
-
es-p30r
|
|
92
|
-
es-p30l"
|
|
83
|
+
class="radio-button-v2 esd-block-ra esd-radio-button-block esd-extension-block es-p10t es-p10b es-p30r es-p30l"
|
|
93
84
|
>
|
|
94
85
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
|
95
86
|
<tbody>
|
|
@@ -149,10 +140,10 @@ const e = {
|
|
|
149
140
|
</table>
|
|
150
141
|
</td>
|
|
151
142
|
`;
|
|
152
|
-
function
|
|
143
|
+
function a() {
|
|
153
144
|
return d.replace("{-{-TITLE-}-}", `<p path="1">${e.TITLE}</p>`).replace("{-{-DESCRIPTION-}-}", `<p path="1">${e.DESCRIPTION}</p>`).replace("{-{-YES-}-}", `<p path="1">${e.YES}</p>`).replace("{-{-NO-}-}", `<p path="1">${e.NO}</p>`);
|
|
154
145
|
}
|
|
155
146
|
export {
|
|
156
|
-
|
|
157
|
-
|
|
147
|
+
l as default,
|
|
148
|
+
a as getDefaultTemplate
|
|
158
149
|
};
|
|
@@ -133,7 +133,7 @@ const a = c(), d = () => ({
|
|
|
133
133
|
filterSelectionDrawerStatus: !1,
|
|
134
134
|
filterList: {},
|
|
135
135
|
filterGroup: 1
|
|
136
|
-
}), G = p("
|
|
136
|
+
}), G = p("recommendationExtension", {
|
|
137
137
|
state: () => d(),
|
|
138
138
|
getters: {
|
|
139
139
|
hasFilters: (e) => !!e.recommendationConfigs.filters.length,
|