@useinsider/guido 1.0.3-beta.52ded25 → 1.0.3-beta.5361682
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/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -13
- package/dist/composables/useActionsApi.js +1 -1
- package/dist/composables/useHtmlValidator.js +35 -36
- package/dist/composables/useStripo.js +25 -29
- package/dist/enums/unsubscribe.js +26 -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 +26 -26
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +2 -2
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +81 -84
- package/dist/extensions/Blocks/Items/enums/productEnums.js +4 -62
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +57 -57
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +55 -54
- package/dist/extensions/Blocks/Items/settingsPanel.js +29 -28
- package/dist/extensions/Blocks/Items/template.js +82 -79
- package/dist/extensions/Blocks/RadioButton/control.js +17 -18
- package/dist/extensions/Blocks/RadioButton/template.js +9 -18
- package/dist/extensions/Blocks/Unsubscribe/block.js +27 -27
- 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/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/settingsControl.d.ts +2 -5
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/template.d.ts +1 -9
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/package.json +10 -5
- 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/utils/environmentUtil.d.ts +0 -5
- package/dist/utils/environmentUtil.js +0 -4
|
@@ -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,26 +1,27 @@
|
|
|
1
|
-
import { SettingsPanelRegistry as O, SettingsPanelTab as T, SettingsTab as
|
|
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 N, ContainerControls as S } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { BLOCK_ID as R } from "./block.js";
|
|
3
|
+
import { COMPOSITION_CONTROL_BLOCK_ID as A } from "./controls/cardComposition.js";
|
|
4
|
+
import { CONTROL_BLOCK_ID as L } from "./controls/settingsControl.js";
|
|
5
5
|
import { ItemsBlockId as E, ItemsBlockControlId as I } from "./enums/controlEnums.js";
|
|
6
|
-
class
|
|
7
|
-
registerBlockControls(
|
|
8
|
-
|
|
6
|
+
class n extends O {
|
|
7
|
+
registerBlockControls(_) {
|
|
8
|
+
_[R] = [
|
|
9
9
|
new T(
|
|
10
|
-
|
|
10
|
+
N.SETTINGS,
|
|
11
11
|
[
|
|
12
|
-
|
|
12
|
+
L,
|
|
13
|
+
S.EXTERNAL_INDENTS
|
|
13
14
|
]
|
|
14
15
|
),
|
|
15
16
|
new T(
|
|
16
17
|
"Card Composition",
|
|
17
18
|
[
|
|
18
|
-
|
|
19
|
+
A
|
|
19
20
|
]
|
|
20
21
|
).withLabel("Card Composition")
|
|
21
|
-
],
|
|
22
|
+
], _[E.ORIGINAL_PRICE] = [
|
|
22
23
|
new T(
|
|
23
|
-
|
|
24
|
+
N.SETTINGS,
|
|
24
25
|
[
|
|
25
26
|
I.ORIGINAL_PRICE_STYLE,
|
|
26
27
|
I.ORIGINAL_PRICE_ALIGN,
|
|
@@ -28,16 +29,16 @@ class U extends O {
|
|
|
28
29
|
]
|
|
29
30
|
),
|
|
30
31
|
new T(
|
|
31
|
-
|
|
32
|
+
N.STYLES,
|
|
32
33
|
[
|
|
33
34
|
I.ORIGINAL_PRICE_COLOR,
|
|
34
35
|
I.ORIGINAL_PRICE_FONT_FAMILY,
|
|
35
36
|
I.ORIGINAL_PRICE_SIZE
|
|
36
37
|
]
|
|
37
38
|
)
|
|
38
|
-
],
|
|
39
|
+
], _[E.PRICE] = [
|
|
39
40
|
new T(
|
|
40
|
-
|
|
41
|
+
N.SETTINGS,
|
|
41
42
|
[
|
|
42
43
|
I.PRICE_STYLE,
|
|
43
44
|
I.PRICE_ALIGN,
|
|
@@ -49,16 +50,16 @@ class U extends O {
|
|
|
49
50
|
]
|
|
50
51
|
),
|
|
51
52
|
new T(
|
|
52
|
-
|
|
53
|
+
N.STYLES,
|
|
53
54
|
[
|
|
54
55
|
I.PRICE_COLOR,
|
|
55
56
|
I.PRICE_FONT_FAMILY,
|
|
56
57
|
I.PRICE_SIZE
|
|
57
58
|
]
|
|
58
59
|
)
|
|
59
|
-
],
|
|
60
|
+
], _[E.NAME] = [
|
|
60
61
|
new T(
|
|
61
|
-
|
|
62
|
+
N.SETTINGS,
|
|
62
63
|
[
|
|
63
64
|
I.NAME_STYLE,
|
|
64
65
|
I.NAME_ALIGN,
|
|
@@ -67,23 +68,23 @@ class U extends O {
|
|
|
67
68
|
]
|
|
68
69
|
),
|
|
69
70
|
new T(
|
|
70
|
-
|
|
71
|
+
N.STYLES,
|
|
71
72
|
[
|
|
72
73
|
I.NAME_FONT_FAMILY,
|
|
73
74
|
I.NAME_SIZE,
|
|
74
75
|
I.NAME_COLOR
|
|
75
76
|
]
|
|
76
77
|
)
|
|
77
|
-
],
|
|
78
|
+
], _[E.QUANTITY] = [
|
|
78
79
|
new T(
|
|
79
|
-
|
|
80
|
+
N.SETTINGS,
|
|
80
81
|
[
|
|
81
82
|
I.QUANTITY_FONT_FAMILY,
|
|
82
83
|
I.QUANTITY_STYLE
|
|
83
84
|
]
|
|
84
85
|
),
|
|
85
86
|
new T(
|
|
86
|
-
|
|
87
|
+
N.STYLES,
|
|
87
88
|
[
|
|
88
89
|
I.QUANTITY_ALIGN,
|
|
89
90
|
I.QUANTITY_SIZE,
|
|
@@ -91,18 +92,18 @@ class U extends O {
|
|
|
91
92
|
I.QUANTITY_PADDINGS
|
|
92
93
|
]
|
|
93
94
|
)
|
|
94
|
-
],
|
|
95
|
+
], _[E.IMAGE] = [
|
|
95
96
|
new T(
|
|
96
|
-
|
|
97
|
+
N.SETTINGS,
|
|
97
98
|
[
|
|
98
99
|
I.IMAGE_LINK,
|
|
99
100
|
I.IMAGE_SIZE,
|
|
100
101
|
I.IMAGE_MARGINS
|
|
101
102
|
]
|
|
102
103
|
)
|
|
103
|
-
],
|
|
104
|
+
], _[E.BUTTON] = [
|
|
104
105
|
new T(
|
|
105
|
-
|
|
106
|
+
N.SETTINGS,
|
|
106
107
|
[
|
|
107
108
|
I.BUTTON_LINK,
|
|
108
109
|
I.BUTTON_TEXT,
|
|
@@ -112,7 +113,7 @@ class U extends O {
|
|
|
112
113
|
]
|
|
113
114
|
),
|
|
114
115
|
new T(
|
|
115
|
-
|
|
116
|
+
N.STYLES,
|
|
116
117
|
[
|
|
117
118
|
I.BUTTON_COLOR,
|
|
118
119
|
I.BUTTON_FONT_FAMILY,
|
|
@@ -127,5 +128,5 @@ class U extends O {
|
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
export {
|
|
130
|
-
|
|
131
|
+
n as SettingsPanel
|
|
131
132
|
};
|
|
@@ -1,58 +1,61 @@
|
|
|
1
|
-
import { BlockType as l, BlockAttr as
|
|
2
|
-
import { ItemsBlockId as
|
|
3
|
-
import { productPairs as
|
|
4
|
-
import { ItemInCartOptions as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { BlockType as l, BlockAttr as I } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { ItemsBlockId as T } from "./enums/controlEnums.js";
|
|
3
|
+
import { productPairs as c } from "./enums/productEnums.js";
|
|
4
|
+
import { ItemInCartOptions as N, SETTINGS_ENUMS as O } from "./enums/settingsEnums.js";
|
|
5
|
+
import P from "./layouts/horizontal.html.js";
|
|
6
|
+
import S from "./layouts/vertical.html.js";
|
|
7
|
+
const B = `text-decoration:none;
|
|
8
|
+
font-family:-apple-system,
|
|
9
|
+
BlinkMacSystemFont,
|
|
10
|
+
'Segoe UI',
|
|
11
|
+
Roboto,
|
|
12
|
+
Helvetica,
|
|
13
|
+
Arial,
|
|
14
|
+
sans-serif,
|
|
15
|
+
'Apple Color Emoji',
|
|
16
|
+
'Segoe UI Emoji',
|
|
17
|
+
'Segoe UI Symbol'
|
|
18
|
+
`;
|
|
19
|
+
let [R] = c.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [C] = c.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [_] = c.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [$] = c.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [u] = c.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
|
|
20
|
+
const f = (a, t) => `
|
|
9
21
|
<${l.BLOCK_IMAGE}
|
|
10
|
-
${
|
|
11
|
-
${
|
|
12
|
-
${
|
|
13
|
-
${
|
|
14
|
-
esd-extension-block-id="${
|
|
22
|
+
${I.BLOCK_IMAGE.src}="${R}"
|
|
23
|
+
${I.BLOCK_IMAGE.alt}="Product Image"
|
|
24
|
+
${I.BLOCK_IMAGE.href}="#!"
|
|
25
|
+
${I.BLOCK_IMAGE.width}="70"
|
|
26
|
+
esd-extension-block-id="${T.IMAGE}"
|
|
15
27
|
data-slot-1
|
|
16
28
|
product-attr="imageSrc"
|
|
17
29
|
data-type="${a}"
|
|
18
30
|
data-number="${t}"
|
|
19
31
|
/>
|
|
20
|
-
`,
|
|
32
|
+
`, g = (a) => `
|
|
21
33
|
<${l.BLOCK_TEXT}
|
|
22
34
|
width="100%"
|
|
23
35
|
align="center"
|
|
24
36
|
class="es-p10"
|
|
25
37
|
data-type="${a}"
|
|
26
|
-
esd-extension-block-id="${
|
|
38
|
+
esd-extension-block-id="${T.NAME}"
|
|
27
39
|
>
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
font-family: inherit;
|
|
37
|
-
color: inherit;
|
|
38
|
-
"
|
|
39
|
-
product-attr="name"
|
|
40
|
-
data-slot-2
|
|
41
|
-
width="100%">
|
|
42
|
-
${C}
|
|
43
|
-
</a>
|
|
44
|
-
</p>
|
|
40
|
+
<a
|
|
41
|
+
href="#!"
|
|
42
|
+
style="${B}"
|
|
43
|
+
product-attr="name"
|
|
44
|
+
data-slot-2
|
|
45
|
+
width="100%">
|
|
46
|
+
${C}
|
|
47
|
+
</a>
|
|
45
48
|
</${l.BLOCK_TEXT}>
|
|
46
|
-
`,
|
|
47
|
-
let
|
|
49
|
+
`, F = (a, t, o, e, i) => {
|
|
50
|
+
let n = _;
|
|
48
51
|
if (e && e.trim()) {
|
|
49
|
-
const
|
|
50
|
-
|
|
52
|
+
const d = ` ${e.trim()} `;
|
|
53
|
+
n = (i || "0") === "1" ? `${_}${d}` : `${d}${_}`;
|
|
51
54
|
}
|
|
52
|
-
const r =
|
|
55
|
+
const r = i === "1" ? "after" : "before", s = `data-formated="${o ? "true" : "false"}"`, E = `data-curency="${r}"`;
|
|
53
56
|
return `
|
|
54
57
|
<${l.BLOCK_TEXT}
|
|
55
|
-
esd-extension-block-id="${
|
|
58
|
+
esd-extension-block-id="${T.PRICE}"
|
|
56
59
|
class="items-block-price"
|
|
57
60
|
width="100%"
|
|
58
61
|
align="center"
|
|
@@ -63,25 +66,25 @@ const g = (a, t) => `
|
|
|
63
66
|
data-slot-4
|
|
64
67
|
data-type="${a}"
|
|
65
68
|
data-number="${t}"
|
|
66
|
-
${E}
|
|
67
69
|
${s}
|
|
70
|
+
${E}
|
|
68
71
|
${e ? `data-currency_symbol="${e}"` : ""}
|
|
69
72
|
>
|
|
70
|
-
${
|
|
73
|
+
${n}
|
|
71
74
|
</p>
|
|
72
75
|
</${l.BLOCK_TEXT}>
|
|
73
76
|
`;
|
|
74
|
-
},
|
|
75
|
-
let
|
|
77
|
+
}, b = (a, t, o, e, i) => {
|
|
78
|
+
let n = $;
|
|
76
79
|
if (e && e.trim()) {
|
|
77
|
-
const
|
|
78
|
-
|
|
80
|
+
const d = ` ${e.trim()} `;
|
|
81
|
+
n = (i || "0") === "1" ? `${$}${d}` : `${d}${$}`;
|
|
79
82
|
}
|
|
80
|
-
const r =
|
|
83
|
+
const r = i === "1" ? "after" : "before", s = `data-formated="${o ? "true" : "false"}"`, E = `data-curency="${r}"`;
|
|
81
84
|
return `
|
|
82
85
|
<${l.BLOCK_TEXT}
|
|
83
86
|
class="items-block-price"
|
|
84
|
-
esd-extension-block-id="${
|
|
87
|
+
esd-extension-block-id="${T.ORIGINAL_PRICE}"
|
|
85
88
|
width="100%"
|
|
86
89
|
align="center"
|
|
87
90
|
>
|
|
@@ -92,20 +95,20 @@ const g = (a, t) => `
|
|
|
92
95
|
style="color: #cc0000"
|
|
93
96
|
data-type="${a}"
|
|
94
97
|
data-number="${t}"
|
|
95
|
-
${E}
|
|
96
98
|
${s}
|
|
99
|
+
${E}
|
|
97
100
|
${e ? `data-currency_symbol="${e}"` : ""}
|
|
98
101
|
>
|
|
99
|
-
<s>${
|
|
102
|
+
<s>${n}</s>
|
|
100
103
|
</p>
|
|
101
104
|
</${l.BLOCK_TEXT}>
|
|
102
105
|
`;
|
|
103
|
-
},
|
|
106
|
+
}, U = () => `
|
|
104
107
|
<${l.BLOCK_TEXT}
|
|
105
108
|
width="100%"
|
|
106
109
|
align="center"
|
|
107
110
|
class="es-p10"
|
|
108
|
-
esd-extension-block-id="${
|
|
111
|
+
esd-extension-block-id="${T.QUANTITY}"
|
|
109
112
|
>
|
|
110
113
|
<p
|
|
111
114
|
product-attr="quantity"
|
|
@@ -115,73 +118,73 @@ const g = (a, t) => `
|
|
|
115
118
|
${u}
|
|
116
119
|
</p>
|
|
117
120
|
</${l.BLOCK_TEXT}>
|
|
118
|
-
`,
|
|
121
|
+
`, L = (a, t) => `
|
|
119
122
|
<${l.BLOCK_BUTTON}
|
|
120
123
|
width="100%"
|
|
121
124
|
class="ins-button"
|
|
122
125
|
name="buy-button"
|
|
123
126
|
caption="Buy"
|
|
124
127
|
align="center"
|
|
125
|
-
esd-extension-block-id="${
|
|
128
|
+
esd-extension-block-id="${T.BUTTON}"
|
|
126
129
|
product-attr="button"
|
|
127
130
|
data-slot-6
|
|
128
131
|
data-type="${a}"
|
|
129
132
|
data-number="${t}"
|
|
130
133
|
>Buy
|
|
131
134
|
</${l.BLOCK_BUTTON}>
|
|
132
|
-
`,
|
|
135
|
+
`, m = () => `
|
|
133
136
|
<esd-config-block style="display: none;"></esd-config-block>
|
|
134
|
-
`, p = (a, t,
|
|
135
|
-
const A = `${`data-type="${t}" data-number="${
|
|
137
|
+
`, p = (a, t, o, e, i, n, r, s) => {
|
|
138
|
+
const A = `${`data-type="${t}" data-number="${o}"`} data-orientation="${e}"`;
|
|
136
139
|
return a.replace(
|
|
137
140
|
/<td([^>]*class="[^"]*ins-product-td[^"]*"[^>]*)>/,
|
|
138
141
|
`<td$1 ${A}>`
|
|
139
|
-
).replace("{-{-
|
|
142
|
+
).replace("{-{-PRODUCT_IMAGE-}-}", f(t, o)).replace("{-{-PRODUCT_NAME-}-}", g(t)).replace(
|
|
140
143
|
"{-{-PRODUCT_PRICE-}-}",
|
|
141
|
-
|
|
144
|
+
F(t, o, i, n, r)
|
|
142
145
|
).replace(
|
|
143
146
|
"{-{-PRODUCT_ORIGINAL_PRICE-}-}",
|
|
144
|
-
|
|
147
|
+
b(
|
|
145
148
|
t,
|
|
146
|
-
n,
|
|
147
|
-
c,
|
|
148
149
|
o,
|
|
150
|
+
i,
|
|
151
|
+
n,
|
|
149
152
|
r
|
|
150
153
|
)
|
|
151
|
-
).replace("{-{-PRODUCT_QUANTITY-}-}",
|
|
154
|
+
).replace("{-{-PRODUCT_QUANTITY-}-}", U()).replace("{-{-PRODUCT_BUTTON-}-}", L(t, o)).replace("{-{-CONFIG_BLOCK-}-}", m());
|
|
152
155
|
};
|
|
153
156
|
function x({
|
|
154
157
|
orientation: a,
|
|
155
158
|
itemsType: t = O.ITEMS_TYPE.CART_ITEMS,
|
|
156
|
-
itemId:
|
|
159
|
+
itemId: o,
|
|
157
160
|
currencySymbol: e,
|
|
158
|
-
currencyLocation:
|
|
159
|
-
formattedPrice:
|
|
161
|
+
currencyLocation: i,
|
|
162
|
+
formattedPrice: n = !0
|
|
160
163
|
}) {
|
|
161
|
-
const r =
|
|
162
|
-
let
|
|
164
|
+
const r = N[t].findIndex((E) => E.value === o);
|
|
165
|
+
let s = "1";
|
|
163
166
|
if (r >= 0)
|
|
164
|
-
|
|
165
|
-
else if (
|
|
166
|
-
const
|
|
167
|
-
|
|
167
|
+
s = String(r + 1);
|
|
168
|
+
else if (o) {
|
|
169
|
+
const E = o.match(/\((\d+)\)/);
|
|
170
|
+
E && ([s] = E);
|
|
168
171
|
}
|
|
169
|
-
return R =
|
|
170
|
-
|
|
172
|
+
return R = c.PAIRS_FOR_EXTENSION.imageSrc[t].DEFAULT[r >= 0 ? r : 0], C = c.PAIRS_FOR_EXTENSION.name[t].DEFAULT[r >= 0 ? r : 0], _ = n ? c.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE_FORMATTED : c.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE, $ = n ? c.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE_FORMATTED : c.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE, u = c.PAIRS_FOR_EXTENSION.quantity[t].DEFAULT, a === O.ORIENTATION.VERTICAL ? p(
|
|
173
|
+
S,
|
|
171
174
|
t,
|
|
172
|
-
|
|
175
|
+
s,
|
|
173
176
|
a,
|
|
174
|
-
|
|
177
|
+
n,
|
|
175
178
|
e,
|
|
176
|
-
|
|
179
|
+
i
|
|
177
180
|
) : p(
|
|
178
|
-
|
|
181
|
+
P,
|
|
179
182
|
t,
|
|
180
|
-
|
|
183
|
+
s,
|
|
181
184
|
a,
|
|
182
|
-
|
|
185
|
+
n,
|
|
183
186
|
e,
|
|
184
|
-
|
|
187
|
+
i
|
|
185
188
|
);
|
|
186
189
|
}
|
|
187
190
|
export {
|
|
@@ -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
|
};
|